diff --git a/src/api/request2.js b/src/api/request2.js index 46471ad..0192dd7 100644 --- a/src/api/request2.js +++ b/src/api/request2.js @@ -234,7 +234,7 @@ export function getFoamPlaneNumberList() { */ export function getPlasticsPlaneNumberList() { return request({ - url: baseApi + "/Plan/GetList?Type=paomo", + url: baseApi + "/Plan/GetList?Type=zhusu", method: "get", data: {}, }); @@ -408,7 +408,7 @@ export function plasticsNoGoodSubmit(params) { */ export function getUpLinkPlaneNumberList() { return request({ - url: baseApi + "/Inventory/GetPlanList?state=ok", + url: baseApi + "/Inventory/GetPlanList?type=1&state=ok", method: "get", data: {}, }); @@ -427,10 +427,11 @@ export function getFoamScanUpLinkInfo(machineCode) { /** * @param params获取泡沫 不良品收货 计划单号 + * type 1泡沫 2注塑 */ -export function getFoamNoGoodNumberList() { +export function getFoamNoGoodNumberList(type) { return request({ - url: baseApi + "/Inventory/GetPlanList?state=nok", + url: baseApi + "/Inventory/GetPlanList?type=1&state=nok", method: "get", data: {}, }); @@ -441,7 +442,18 @@ export function getFoamNoGoodNumberList() { */ export function getPlasticsNoGoodNumberList() { return request({ - url: baseApi + "/Inventory/GetPlanList?state=nok", + url: baseApi + "/Inventory/GetPlanList?type=2&state=nok", + method: "get", + data: {}, + }); +} + +/** + * @param params 注塑合格品 计划 type=2 注塑 + */ +export function getPlasticsGoodPlaneNumberList() { + return request({ + url: baseApi + "/Inventory/GetPlanList?type=2&state=ok", method: "get", data: {}, }); diff --git a/src/common/classify.data.js b/src/common/classify.data.js index fc928b6..c1c6eeb 100644 --- a/src/common/classify.data.js +++ b/src/common/classify.data.js @@ -80,6 +80,14 @@ export default [{ "path": "/pages/plastics/plasticsNoGood", "index": 2, }, + { + "name": "合格品扫码", + "code":"SPDA000005", + "icon": "/unbind_pallet.svg", + "isShow":true, + "path": "/pages/plastics/plasticsGood", + "index": 2, + }, ] } diff --git a/src/pages.json b/src/pages.json index 77bb3c5..6dcab12 100644 --- a/src/pages.json +++ b/src/pages.json @@ -126,6 +126,15 @@ } } }, + { + "path": "pages/plastics/plasticsGood", + "style": { + "navigationBarTitleText": "合格品扫码(注塑)", + "titleNView": { + "buttons": [{}] + } + } + }, { "path": "pages/plastics/scanCode", "style": { diff --git a/src/pages/foam/downLink.vue b/src/pages/foam/downLink.vue index 061f3d0..dac7b2a 100644 --- a/src/pages/foam/downLink.vue +++ b/src/pages/foam/downLink.vue @@ -17,6 +17,7 @@ @@ -133,7 +134,9 @@ downLickSubmit(param).then(res => { uni.hideLoading() - this.showMessage("提交成功") + uni.showToast({ + title: '提交成功', + }); this.resetData() }).catch(error => { uni.hideLoading() @@ -148,6 +151,7 @@ resetData() { this.scanCode ="" this.scanCheckCode="" + this.$refs.inputScan.focused = true }, clearCode() { this.scanCode = "" @@ -160,6 +164,7 @@ } this.scanCode = data; this.scanCheckCode=data + this.submit(); // if(data==undefined||data==""){ // this.showMessage("扫描数据为空,请先输入") // return; diff --git a/src/pages/foam/upLink.vue b/src/pages/foam/upLink.vue index de255c4..2fda90b 100644 --- a/src/pages/foam/upLink.vue +++ b/src/pages/foam/upLink.vue @@ -31,37 +31,10 @@ - - - - - - - - 箱码 - 1234 - - - 批次 - 20240508 - - - 库位 - 103 - - - - - @@ -99,7 +72,6 @@ import { getUpLinkPlaneNumberList, upLickSubmit, - getFoamScanUpLinkInfo } from '@/api/request2.js'; import { showConfirmMsg @@ -128,15 +100,15 @@ materialList: [], planList: [], scanCode: "", - scanCheckCode:"", + scanCheckCode: "", lastTime: null, // 最后一次点击的时间 currentTime: null, // 当前点击的时间 - timeOut:uni.getStorageSync("timeOut")?uni.getStorageSync("timeOut"):config.pageTimeOut,// 设置超时时间:30分钟 + timeOut: uni.getStorageSync("timeOut") ? uni.getStorageSync("timeOut") : config.pageTimeOut, // 设置超时时间:30分钟 } }, computed: {}, - onShow(){ + onShow() { this.lastTime = new Date().getTime() }, @@ -144,7 +116,7 @@ touchScreen() { this.currentTime = new Date().getTime() // 记录这次点击的时间 console.log("当前时间", this.currentTime) - if (this.currentTime - this.lastTime > this.timeOut*60*1000) { // 判断上次最后一次点击的时间和这次点击的时间间隔是否大于30分钟 + if (this.currentTime - this.lastTime > this.timeOut * 60 * 1000) { // 判断上次最后一次点击的时间和这次点击的时间间隔是否大于30分钟 console.log("当前时间跳转") uni.reLaunch({ url: "../login/index" @@ -160,30 +132,33 @@ return } if (this.scanCheckCode == "") { - this.scanCheckCode="" - this.showMessage("请先校验扫描码") + this.scanCheckCode = "" + this.showMessage("请先校验产品码") return } - + uni.showLoading({ title: "加载中", mask: true }) var param = { - PlanID : this.planNumber, + PlanID: this.planNumber, id: this.$store.state.user.id, createTime: getCurrDateTime(), - ProductCode :this.scanCheckCode, - Type:1, - State:1, + ProductCode: this.scanCheckCode, + Type: 1, + State: 1, User: this.$store.state.user.name - + } console.log("提交", JSON.stringify(param)) upLickSubmit(param).then(res => { uni.hideLoading() - this.showMessage("提交成功") + uni.showToast({ + title: '提交成功', + }); + // this.showMessage("提交成功") this.resetData() }).catch(error => { uni.hideLoading() @@ -196,49 +171,23 @@ }) }, resetData() { - this.planNumber = ""; - this.scanCode ="" - this.scanCheckCode="" + this.scanCode = "" + this.scanCheckCode = "" + this.$refs.inputScan.focused = true }, clearCode() { this.scanCode = ""; - this.scanCheckCode="" + this.scanCheckCode = "" }, - onConfirm(data){ - if(!data){ + onConfirm(data) { + if (!data) { this.showMessage("扫描数据不能为空") return; } this.scanCode = data; - this.scanCheckCode=data - - }, - onConfirm1(data) { - if(this.planNumber==""){ - this.showMessage("请先选择单号") - this.scanCode = ""; - this.scanCheckCode = ""; - return; - } - if(data==undefined||data==""){ - this.showMessage("扫描数据为空,请先输入") - return; - } - uni.showLoading({ - title: "加载中", - mask: true - }) - getFoamScanUpLinkInfo(data).then(res => { - uni.hideLoading() - this.scanCode = data; - this.scanCheckCode = data; - console.log(data) - }).catch(error => { - this.scanCode = ""; - this.scanCheckCode = ""; - uni.hideLoading() - this.showMessage("扫描["+data+"]"+error) - }) + this.scanCheckCode = data + this.submit(); + }, showPlanSelect() { uni.showLoading({ @@ -256,7 +205,7 @@ }) this.$refs.selectPopup.openScanPopup(list) } else { - this.showMessage("原料列表为0") + this.showMessage("列表为0") } }).catch(error => { diff --git a/src/pages/plastics/plasticsGood.vue b/src/pages/plastics/plasticsGood.vue new file mode 100644 index 0000000..42bfd2b --- /dev/null +++ b/src/pages/plastics/plasticsGood.vue @@ -0,0 +1,281 @@ + + + + + \ No newline at end of file diff --git a/src/pages/plastics/scanCode.vue b/src/pages/plastics/scanCode.vue index 6258cd9..c54be10 100644 --- a/src/pages/plastics/scanCode.vue +++ b/src/pages/plastics/scanCode.vue @@ -17,33 +17,10 @@ - - - - - - - 箱码 - 1234 - - - 批次 - 20240508 - - - 库位 - 103 - - - - @@ -151,7 +128,9 @@ scanCodeSubmit(param).then(res => { uni.hideLoading() - this.showMessage("提交成功") + uni.showToast({ + title: '提交成功', + }); this.resetData() }).catch(error => { uni.hideLoading() @@ -166,6 +145,8 @@ resetData() { this.scanCode = ""; this.scanCheckCode="" + this.$refs.inputScan.focused = true + }, clearCode() { this.scanCode = ""; @@ -178,6 +159,7 @@ } this.scanCode = data; this.scanCheckCode=data + this.submit() }, openScanPopup() { diff --git a/src/static/config.js b/src/static/config.js index cfab546..13fa90c 100644 --- a/src/static/config.js +++ b/src/static/config.js @@ -1,4 +1,5 @@ -let request_url = "http://10.117.133.80:8880/api" +let request_url = "http://123.56.115.74:8088/api" +// let request_url = "http://10.117.133.80:8880/api" // let request_url = "http://192.168.0.113:12080/admin-api" let appUpdateUrl = "http://10.117.133.80:8880/appUpdate.json" diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6712303..26a13c8 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -71,6 +71,7 @@ const user = { // "SPDA000003", // "SPDA000004" // ] + res.Result.Powers.push("SPDA000005") commit('SET_ID',res.Result.LoginUserID) commit('SET_NAME',res.Result.UserName) commit('SET_POWERS',res.Result.Powers)