Browse Source

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

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

13
src/pages/fg/receiptByPlan.vue

@ -273,7 +273,9 @@ import { nextTick } from 'vue';
console.log(JSON.stringify(params)) console.log(JSON.stringify(params))
let list = [] let list = []
try{
var planData = await planReceiptSubmit(params) var planData = await planReceiptSubmit(params)
console.log('planData',planData)
if (planData.data) { if (planData.data) {
planData.data.forEach(item => { planData.data.forEach(item => {
@ -298,6 +300,17 @@ import { nextTick } from 'vue';
} 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
}
}
// //
let createProductputawaySwitch = getSwitchInfoByCode( let createProductputawaySwitch = getSwitchInfoByCode(

3
src/pages/login/index.vue

@ -158,6 +158,7 @@
}, },
onLoad() { onLoad() {
if(this.needCode){
getCaptchaImage().then(res => { getCaptchaImage().then(res => {
if (res) { if (res) {
var code = res.data.img; var code = res.data.img;
@ -169,6 +170,8 @@
}).catch(error => { }).catch(error => {
this.showErrorMessage(error); this.showErrorMessage(error);
}) })
}
this.getAppVersion() this.getAppVersion()
}, },
methods: { methods: {

Loading…
Cancel
Save