Browse Source

HL-5055 按计划完工,每次提交后要判断一下计划的状态,如果计划已完成提示:计划已完成,返回开工阶段

ljc_0803^2
wangyufei 3 months ago
parent
commit
e08a8ae336
  1. 59
      src/pages/fg/receiptByPlan.vue
  2. 27
      src/pages/login/index.vue

59
src/pages/fg/receiptByPlan.vue

@ -273,30 +273,43 @@ import { nextTick } from 'vue';
console.log(JSON.stringify(params)) console.log(JSON.stringify(params))
let list = [] let list = []
var planData = await planReceiptSubmit(params) try{
if (planData.data) { var planData = await planReceiptSubmit(params)
console.log('planData',planData)
planData.data.forEach(item => { if (planData.data) {
list.push({
itemCode: item.itemCode, // planData.data.forEach(item => {
itemName: item.itemName, // list.push({
packName: item.packName, // itemCode: item.itemCode, //
packageCode: item.toPackingNumber, // itemName: item.itemName, //
batch: item.toBatch, // packName: item.packName, //
parentNumber: item.parentNumber, // packageCode: item.toPackingNumber, //
itemType: item.itemType, // batch: item.toBatch, //
asnNumber: item.asnNumber, //ASN parentNumber: item.parentNumber, //
supplierCode: item.supplierCode, // itemType: item.itemType, //
qty: item.qty, // asnNumber: item.asnNumber, //ASN
printTimes: getCurrDateTime(), // supplierCode: item.supplierCode, //
productionLineCode: item.productionLineCode, //线 qty: item.qty, //
barcodeString: item.barcodeString, // printTimes: getCurrDateTime(), //
barcodeBase64: '', productionLineCode: item.productionLineCode, //线
requestNumber: item.requestNumber barcodeString: item.barcodeString, //
barcodeBase64: '',
requestNumber: item.requestNumber
})
}) })
}) } else {
} else { throw new Error("提交失败")
throw new Error("提交失败") }
}catch(error){
console.log('异常',error)
if(error.indexOf('请返回开工阶段')>-1){
uni.hideLoading()
this.showErrorMessage('计划已完成')
this.clearData()
this.openFg();
return
}
} }
// //

27
src/pages/login/index.vue

@ -157,18 +157,21 @@
} }
}, },
onLoad() { onLoad() {
getCaptchaImage().then(res => { if(this.needCode){
if (res) { getCaptchaImage().then(res => {
var code = res.data.img; if (res) {
let base64 = 'data:image/jpeg;base64,' + code var code = res.data.img;
// console.log("", base64) let base64 = 'data:image/jpeg;base64,' + code
this.imageSrc = base64.replace(/[\r\n]/g, "") // console.log("", base64)
this.uuid = res.data.uuid this.imageSrc = base64.replace(/[\r\n]/g, "")
} this.uuid = res.data.uuid
}).catch(error => { }
this.showErrorMessage(error); }).catch(error => {
}) this.showErrorMessage(error);
})
}
this.getAppVersion() this.getAppVersion()
}, },
methods: { methods: {

Loading…
Cancel
Save