Browse Source

修改提交后清除计划单号

master
lijuncheng 4 months ago
parent
commit
6dd2ced160
  1. 4
      src/manifest.json
  2. 47
      src/pages/foam/upLink.vue
  3. 40
      src/pages/plastics/plasticsGood.vue

4
src/manifest.json

@ -2,8 +2,8 @@
"name" : "投入产出",
"appid" : "__UNI__37328FF",
"description" : "",
"versionName" : "1.0.3",
"versionCode" : 3,
"versionName" : "1.0.5",
"versionCode" : 5,
"transformPx" : false,
/* 5+App */
"app-plus" : {

47
src/pages/foam/upLink.vue

@ -152,14 +152,8 @@
}
console.log("提交", JSON.stringify(param))
upLickSubmit(param).then(res => {
uni.hideLoading()
uni.showToast({
title: '提交成功',
});
// this.showMessage("")
this.resetData()
this.setPlanNumber()
}).catch(error => {
uni.hideLoading()
this.showMessage(error)
@ -170,10 +164,45 @@
})
},
resetData() {
setPlanNumber(){
getUpLinkPlaneNumberList().then(res => {
uni.hideLoading()
uni.showToast({
title: '提交成功',
});
if (res.Result.length > 0) {
var list = [];
list = res.Result;
list.forEach(res => {
res.label = res.PLAN_NO;
res.value = res.SHIFT_CODE
})
var item = list.filter(r=>r.label==this.planNumber)
if(item.length==0){
this.resetData(true);
}else {
this.resetData(false)
}
} else {
this.resetData(true);
}
}).catch(error => {
this.resetData(true);
uni.hideLoading()
this.showMessage(error)
})
},
resetData(clearNumber) {
if(clearNumber){
this.planNumber=""
}else {
this.$refs.inputScan.focused = true
}
this.scanCode = ""
this.scanCheckCode = ""
this.$refs.inputScan.focused = true
},
clearCode() {
this.scanCode = "";

40
src/pages/plastics/plasticsGood.vue

@ -154,27 +154,57 @@
}
console.log("提交", JSON.stringify(param))
upLickSubmit(param).then(res => {
this.setPlanNumber()
}).catch(error => {
uni.hideLoading()
this.showMessage(error)
})
},
setPlanNumber(){
getPlasticsGoodPlaneNumberList().then(res => {
uni.hideLoading()
uni.showToast({
title: '提交成功',
});
this.resetData()
if (res.Result.length > 0) {
var list = [];
list = res.Result;
list.forEach(res => {
res.label = res.PLAN_NO;
res.value = res.SHIFT_CODE
})
var item = list.filter(r=>r.label==this.planNumber)
if(item.length==0){
this.resetData(true);
}else {
this.resetData(false)
}
} else {
this.resetData(true);
}
}).catch(error => {
this.resetData(true);
uni.hideLoading()
this.showMessage(error)
})
},
showMessage(hint) {
showConfirmMsg("提示", hint, false, callBack => {
})
},
resetData() {
this.scanCode =""
this.scanCheckCode=""
resetData(clearNumber) {
if(clearNumber){
this.planNumber=""
}else {
this.$refs.inputScan.focused = true
}
this.scanCode = ""
this.scanCheckCode = ""
},
clearCode() {
this.scanCode = "";

Loading…
Cancel
Save