|
|
|
@ -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() {
|
|
|
|
|
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(() => {
|
|
|
|
|