diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json
index 582561b..9b0d791 100644
--- a/.hbuilderx/launch.json
+++ b/.hbuilderx/launch.json
@@ -1,16 +1,20 @@
-{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
- // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
- "version": "0.0",
- "configurations": [{
- "app-plus" :
- {
- "launchtype" : "local"
- },
- "default" :
- {
- "launchtype" : "local"
- },
- "type" : "uniCloud"
- }
+{
+ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
+ // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
+ "version" : "0.0",
+ "configurations" : [
+ {
+ "app-plus" : {
+ "launchtype" : "local"
+ },
+ "default" : {
+ "launchtype" : "local"
+ },
+ "type" : "uniCloud"
+ },
+ {
+ "playground" : "standard",
+ "type" : "uni-app:app-android"
+ }
]
}
diff --git a/src/manifest.json b/src/manifest.json
index e44b541..a1640d4 100644
--- a/src/manifest.json
+++ b/src/manifest.json
@@ -12,8 +12,10 @@
/* 5+App特有相关 */
"modules" : {
// 相机模块
- "Camera" : {} //只需要添加这行就可以
+ "Camera" : {}, //只需要添加这行就可以
+ "Barcode" : {}
},
+ // "Camera" : {}
/* 模块配置 */
"distribute" : {
/* 应用发布信息 */
diff --git a/src/pages/mes/PalletChange/index.vue b/src/pages/mes/PalletChange/index.vue
index 2155860..ba18313 100644
--- a/src/pages/mes/PalletChange/index.vue
+++ b/src/pages/mes/PalletChange/index.vue
@@ -13,7 +13,7 @@
rfid:
-
+
查询
@@ -206,11 +206,12 @@ export default class PalletChange extends BasePage {
scanCodeOne() {
uni.scanCode({
scanType: ['barCode'],
- success: function (res) {
- console.log('条码类型:' + res.scanType);
- console.log('条码内容:' + res.result);
+ success: (res) => {
this.orderNo = res.result;
},
+ fail(result) {
+ this.customToast(result);
+ },
});
}
}
@@ -283,7 +284,7 @@ export default class PalletChange extends BasePage {
display: flex;
view {
- width: 142rpx;
+ // width: 142rpx;
height: 100%;
line-height: 100rpx;
}
diff --git a/src/pages/mes/ProductionQtyInsp/index.vue b/src/pages/mes/ProductionQtyInsp/index.vue
index 02ec28e..edcf127 100644
--- a/src/pages/mes/ProductionQtyInsp/index.vue
+++ b/src/pages/mes/ProductionQtyInsp/index.vue
@@ -28,19 +28,19 @@
-->
-
+
-
+
-
+
-
+
@@ -126,6 +126,7 @@ export default class productCheckReceipt extends BasePage {
autoHeight = true;
imgList: any = [];
imgUrlList: any = [];
+ orderNoItemList: any = {};
isqualified = [
{
label: '合格',
@@ -138,8 +139,12 @@ export default class productCheckReceipt extends BasePage {
];
productCodeList: any = {};
- async onReady() {
- await this.model.getDictList();
+ async onLoad() {
+ try {
+ await this.model.getDictList();
+ } catch (error) {
+ console.error('接口调用出错:', error);
+ }
//this.remove = this.model.WlList[0];
}
scrollLeft() {
@@ -225,7 +230,13 @@ export default class productCheckReceipt extends BasePage {
this.customToast('请输入nficl');
return;
}
- await this.model.queryOrderNo(this.orderNo);
+ let orderNoItemList = await this.model.queryOrderNo(this.orderNo);
+ if (orderNoItemList == undefined) {
+ this.customToast('该rfid未查到数据,请使用正确的rfid!');
+ } else {
+ this.orderNoItemList = orderNoItemList;
+ }
+ //console.log('this.orderNoItemList', this.orderNoItemList);
}
histroyItem: any = {};
generateGUID() {
@@ -237,10 +248,48 @@ export default class productCheckReceipt extends BasePage {
}
async selectProductCode(e: any) {
this.productCodeList = e.pickerName;
- if (this.productCodeList.value == '0') {
+ // if (this.productCodeList.value == '0') {
+ // }
+ }
+ barcode: any = '';
+ async onSubmit() {
+ if (this.orderNo == '' || this.orderNo.length == 0) {
+ this.customToast('请输入nficl');
+ return;
+ }
+ if (this.orderNoItemList.orderCode == undefined) {
+ this.customToast('该rfid不可用,不可质检');
+ return;
+ }
+ if (this.productCodeList.value == '') {
+ this.customToast('请选择是否合格');
+ return;
+ }
+ if (this.badMeg == '') {
+ this.customToast('请输入不良描述');
+ return;
+ }
+
+ console.log('tupian', this.imgList.join(','));
+ let params = {
+ rfid: this.orderNo,
+ factoryCode: session.FactoryCode,
+ orderCode: this.orderNoItemList.orderCode,
+ workorderCode: this.orderNoItemList.workorderCode,
+ machineCode: this.orderNoItemList.machineCode,
+ machineName: this.orderNoItemList.machineName,
+ badMeg: this.badMeg,
+ productCode: this.orderNoItemList.productCode,
+ productName: this.orderNoItemList.productName,
+ productSpc: this.orderNoItemList.productSpc,
+ isqua: this.productCodeList.value,
+ fileId: this.imgList.join(','),
+ };
+ await this.model.OnSubmit(params);
+ if (this.model.SubmitCode == 200) {
+ // this.customToast('质检成功!');
// 创建一个新的日期对象
var currentDate = new Date();
-
// 获取年份、月份、日期、小时、分钟和秒
var year = currentDate.getFullYear();
var month = ('0' + (currentDate.getMonth() + 1)).slice(-2);
@@ -255,44 +304,11 @@ export default class productCheckReceipt extends BasePage {
rfidNo: this.orderNo,
reqCode: this.generateGUID(),
reqTime: formattedDate,
- currentStationNo: model.orderNoItemList.machineCode,
+ currentStationNo: this.orderNoItemList.machineCode,
productionState: this.productLocList.value,
+ checkResult: this.productCodeList.value,
};
await this.model.sendDestinationStations(params);
- }
- }
- barcode: any = '';
- async onSubmit() {
- if (this.orderNo == '' || this.orderNo.length == 0) {
- this.customToast('请输入nficl');
- return;
- }
- if (this.productCodeList.value == '') {
- this.customToast('请选择是否合格');
- return;
- }
- if (this.badMeg == '') {
- this.customToast('请输入不良描述');
- return;
- }
- console.log('tupian', this.imgList.join(','));
- let params = {
- rfid: this.orderNo,
- factoryCode: session.FactoryCode,
- orderCode: model.orderNoItemList.orderCode,
- workorderCode: model.orderNoItemList.workorderCode,
- machineCode: model.orderNoItemList.machineCode,
- machineName: model.orderNoItemList.machineName,
- badMeg: this.badMeg,
- productCode: model.orderNoItemList.productCode,
- productName: model.orderNoItemList.productName,
- productSpc: model.orderNoItemList.productSpc,
- isqua: this.productCodeList.value,
- fileId: this.imgList.join(','),
- };
- await this.model.OnSubmit(params);
- if (this.model.SubmitCode == 200) {
- // this.customToast('质检成功!');
this.uni.showToast({ title: '质检成功' });
this.orderNo = '';
this.badMeg = '';
@@ -300,6 +316,7 @@ export default class productCheckReceipt extends BasePage {
this.productLocList = {};
this.imgUrlList = [];
this.imgList = [];
+ this.orderNoItemList = {};
this.model.empty();
this.shouciFocus = false;
this.$nextTick(() => {
diff --git a/src/pages/shouye/index.vue b/src/pages/shouye/index.vue
index 027c751..1322603 100644
--- a/src/pages/shouye/index.vue
+++ b/src/pages/shouye/index.vue
@@ -156,7 +156,8 @@ export default class RawHome extends BasePage {
}
.u-col {
// margin-bottom: 30rpx;
- margin-left: 12px;
+ // margin-left: 12px;
+ flex: 1;
}
.u-btn {
height: 160rpx;
diff --git a/vue.config.js b/vue.config.js
index cab3949..bc81a17 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -6,7 +6,7 @@ module.exports = {
target: 'http://192.168.202.20:9000',
changeOrigin: true,
// pathRewrite: {
- // '^/dev-api': '',
+ // '^/prod-ap': '',
// },
},
'/dev-api': {