Browse Source

修改提交后清除计划单号

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

4
src/manifest.json

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

47
src/pages/foam/upLink.vue

@ -152,14 +152,8 @@
} }
console.log("提交", JSON.stringify(param)) console.log("提交", JSON.stringify(param))
upLickSubmit(param).then(res => { upLickSubmit(param).then(res => {
uni.hideLoading() this.setPlanNumber()
uni.showToast({
title: '提交成功',
});
// this.showMessage("")
this.resetData()
}).catch(error => { }).catch(error => {
uni.hideLoading() uni.hideLoading()
this.showMessage(error) 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.scanCode = ""
this.scanCheckCode = "" this.scanCheckCode = ""
this.$refs.inputScan.focused = true
}, },
clearCode() { clearCode() {
this.scanCode = ""; this.scanCode = "";

42
src/pages/plastics/plasticsGood.vue

@ -154,27 +154,57 @@
} }
console.log("提交", JSON.stringify(param)) console.log("提交", JSON.stringify(param))
upLickSubmit(param).then(res => { upLickSubmit(param).then(res => {
this.setPlanNumber()
}).catch(error => {
uni.hideLoading()
this.showMessage(error)
})
},
setPlanNumber(){
getPlasticsGoodPlaneNumberList().then(res => {
uni.hideLoading() uni.hideLoading()
uni.showToast({ uni.showToast({
title: '提交成功', 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 => { }).catch(error => {
this.resetData(true);
uni.hideLoading() uni.hideLoading()
this.showMessage(error) this.showMessage(error)
}) })
}, },
showMessage(hint) { showMessage(hint) {
showConfirmMsg("提示", hint, false, callBack => { showConfirmMsg("提示", hint, false, callBack => {
}) })
}, },
resetData() { resetData(clearNumber) {
this.scanCode ="" if(clearNumber){
this.scanCheckCode="" this.planNumber=""
this.$refs.inputScan.focused = true }else {
this.$refs.inputScan.focused = true
}
this.scanCode = ""
this.scanCheckCode = ""
}, },
clearCode() { clearCode() {
this.scanCode = ""; this.scanCode = "";

Loading…
Cancel
Save