diff --git a/src/manifest.json b/src/manifest.json index 97b1f16..810ea11 100644 --- a/src/manifest.json +++ b/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" : { diff --git a/src/pages/foam/upLink.vue b/src/pages/foam/upLink.vue index 2fda90b..f2fe4b2 100644 --- a/src/pages/foam/upLink.vue +++ b/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 = ""; diff --git a/src/pages/plastics/plasticsGood.vue b/src/pages/plastics/plasticsGood.vue index 42bfd2b..dadd4cd 100644 --- a/src/pages/plastics/plasticsGood.vue +++ b/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="" - this.$refs.inputScan.focused = true + resetData(clearNumber) { + if(clearNumber){ + this.planNumber="" + }else { + this.$refs.inputScan.focused = true + } + this.scanCode = "" + this.scanCheckCode = "" }, clearCode() { this.scanCode = "";