|
|
@ -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() { |
|
|
|
resetData(clearNumber) { |
|
|
|
if(clearNumber){ |
|
|
|
this.planNumber="" |
|
|
|
}else { |
|
|
|
this.$refs.inputScan.focused = true |
|
|
|
} |
|
|
|
this.scanCode = "" |
|
|
|
this.scanCheckCode = "" |
|
|
|
this.$refs.inputScan.focused = true |
|
|
|
}, |
|
|
|
clearCode() { |
|
|
|
this.scanCode = ""; |
|
|
|