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))
let list = []
var planData = await planReceiptSubmit(params)
if (planData.data) {
planData.data.forEach(item => {
list.push({
itemCode: item.itemCode, //
itemName: item.itemName, //
packName: item.packName, //
packageCode: item.toPackingNumber, //
batch: item.toBatch, //
parentNumber: item.parentNumber, //
itemType: item.itemType, //
asnNumber: item.asnNumber, //ASN
supplierCode: item.supplierCode, //
qty: item.qty, //
printTimes: getCurrDateTime(), //
productionLineCode: item.productionLineCode, //线
barcodeString: item.barcodeString, //
barcodeBase64: '',
requestNumber: item.requestNumber
try{
var planData = await planReceiptSubmit(params)
console.log('planData',planData)
if (planData.data) {
planData.data.forEach(item => {
list.push({
itemCode: item.itemCode, //
itemName: item.itemName, //
packName: item.packName, //
packageCode: item.toPackingNumber, //
batch: item.toBatch, //
parentNumber: item.parentNumber, //
itemType: item.itemType, //
asnNumber: item.asnNumber, //ASN
supplierCode: item.supplierCode, //
qty: item.qty, //
printTimes: getCurrDateTime(), //
productionLineCode: item.productionLineCode, //线
barcodeString: item.barcodeString, //
barcodeBase64: '',
requestNumber: item.requestNumber
})
})
})
} else {
throw new Error("提交失败")
} else {
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() {
getCaptchaImage().then(res => {
if (res) {
var code = res.data.img;
let base64 = 'data:image/jpeg;base64,' + code
// console.log("", base64)
this.imageSrc = base64.replace(/[\r\n]/g, "")
this.uuid = res.data.uuid
}
}).catch(error => {
this.showErrorMessage(error);
})
onLoad() {
if(this.needCode){
getCaptchaImage().then(res => {
if (res) {
var code = res.data.img;
let base64 = 'data:image/jpeg;base64,' + code
// console.log("", base64)
this.imageSrc = base64.replace(/[\r\n]/g, "")
this.uuid = res.data.uuid
}
}).catch(error => {
this.showErrorMessage(error);
})
}
this.getAppVersion()
},
methods: {

Loading…
Cancel
Save