质检bug修改&增加扫码调试

master
guoshuang 2 years ago
parent bf493bd65c
commit 2b7fd85111

@ -1,16 +1,20 @@
{ // launch.json configurations app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
{
// launch.json configurations app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtypelocalremote, localremote
"version": "0.0",
"configurations": [{
"app-plus" :
"version" : "0.0",
"configurations" : [
{
"app-plus" : {
"launchtype" : "local"
},
"default" :
{
"default" : {
"launchtype" : "local"
},
"type" : "uniCloud"
},
{
"playground" : "standard",
"type" : "uni-app:app-android"
}
]
}

@ -12,8 +12,10 @@
/* 5+App */
"modules" : {
//
"Camera" : {} //
"Camera" : {}, //
"Barcode" : {}
},
// "Camera" : {}
/* */
"distribute" : {
/* */

@ -13,7 +13,7 @@
<view class="single-left">
<view>rfid:</view>
<u-search placeholder="请扫描" :focus="shouciFocus" v-model="orderNo" :show-action="false"></u-search>
<!-- <uni-icons type="scan" size="25" @click="scanCodeOne" style="color: #0b9eff; margin: auto; padding: 10rpx"></uni-icons> -->
<uni-icons type="scan" size="35" @click="scanCodeOne" style="color: #0b9eff; margin: auto; padding: 22rpx"></uni-icons>
</view>
<view class="single-right">
<u-button type="primary" @click="query"></u-button>
@ -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;
}

@ -28,19 +28,19 @@
</u-form-item> -->
<!-- 订单 -->
<u-form-item label="订单">
<u-input :disabled="true" v-model="model.orderNoItemList.orderCode" placeholder="" style="overflow: hidden" />
<u-input :disabled="true" v-model="orderNoItemList.orderCode" placeholder="" style="overflow: hidden" />
</u-form-item>
<!-- 机台 -->
<u-form-item label="机台">
<u-input :disabled="true" v-model="model.orderNoItemList.machineName" placeholder="" style="overflow: hidden" />
<u-input :disabled="true" v-model="orderNoItemList.machineName" placeholder="" style="overflow: hidden" />
</u-form-item>
<!-- 产品 -->
<u-form-item label="产品">
<u-input :disabled="true" v-model="model.orderNoItemList.productName" placeholder="" />
<u-input :disabled="true" v-model="orderNoItemList.productName" placeholder="" />
</u-form-item>
<!-- 工单 -->
<u-form-item label="工单">
<u-input :disabled="true" v-model="model.orderNoItemList.workorderCode" placeholder="" />
<u-input :disabled="true" v-model="orderNoItemList.workorderCode" placeholder="" />
</u-form-item>
<u-form-item label="缓存区">
<jPicker sureColor="#ff0000" :moren="moren" @bindpicker="selectProductLOC" showKey="label" valKey="value" :val="productLocList.value" :options="model.DictList" />
@ -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() {
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(() => {

@ -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;

@ -6,7 +6,7 @@ module.exports = {
target: 'http://192.168.202.20:9000',
changeOrigin: true,
// pathRewrite: {
// '^/dev-api': '',
// '^/prod-ap': '',
// },
},
'/dev-api': {

Loading…
Cancel
Save