From 9c6561a271f4564b376d67d98c14568d2c29bab0 Mon Sep 17 00:00:00 2001 From: 44673626 <44673626@qq.com> Date: Wed, 1 Jun 2022 19:11:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E4=BC=97=E5=A4=87=E4=BB=B6=E6=97=A0?= =?UTF-8?q?=E5=8D=95=E5=8F=B7=E5=8A=A0=E4=B8=8A=E8=BF=87=E8=B4=A6=E6=97=A5?= =?UTF-8?q?=E6=9C=9F=E6=A3=80=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../newJit/baseData/billM100Manager/index.vue | 2 +- .../billManage/sparepartOutOrder/detail.vue | 85 +++++++++++++------ vue/static/config.js | 4 +- 3 files changed, 63 insertions(+), 28 deletions(-) diff --git a/vue/src/views/newJit/baseData/billM100Manager/index.vue b/vue/src/views/newJit/baseData/billM100Manager/index.vue index 38d2bbe7..939cb1ab 100644 --- a/vue/src/views/newJit/baseData/billM100Manager/index.vue +++ b/vue/src/views/newJit/baseData/billM100Manager/index.vue @@ -312,7 +312,7 @@ export default { handler(newValue, oldValue) { if (newValue) { let date = new Date(); - let min = date.getMinutes(); + let min = date..getMinutes(); date.setMinutes(min + 1); //这里加1分钟,是为了解决值改变后,系统秒数就过期限制了,无法点击“此刻”按钮, 如果监听 “系统时间”的改变,则会影响性能。 let nowDate = moment(date).format("HH:mm:ss"); let st = ""; diff --git a/vue/src/views/ux/billManage/sparepartOutOrder/detail.vue b/vue/src/views/ux/billManage/sparepartOutOrder/detail.vue index d515117c..26c58410 100644 --- a/vue/src/views/ux/billManage/sparepartOutOrder/detail.vue +++ b/vue/src/views/ux/billManage/sparepartOutOrder/detail.vue @@ -190,6 +190,7 @@ import permission from "@/directive/permission/index.js"; import CRMTableHead from "../../components/CRMTableHead"; import { downloadFile } from "@/utils/crmindex.js"; import JobSelectVerson from "@/components/CreateCom/Job-Select.vue"; +import moment from "moment"; export default { name: "sendUnsettledDiffReport", @@ -345,7 +346,7 @@ export default { tempsTabs.push({ label: "零件描述", prop: "materialDesc", width: 250 }); tempsTabs.push({ label: "寄售库存", prop: "stockQty", width: 100 }); tempsTabs.push({ label: "结算数量", prop: "qty", width: 100 }); - tempsTabs.push({ + tempsTabs.push({ label: "实际出库数量", prop: "realityNumber", width: 160, @@ -411,7 +412,7 @@ export default { logic: 0, column: column, action: 0, - value: params.value,realityNumber + value: params.value, }; this.selectJobVersionValue = params.value; this.listQuery.Filters.push(filter); @@ -495,34 +496,68 @@ export default { return; //this.getList(); } else { - if (this.accountDatelist != "") { - this.listOutPutQuery.accountDate = this.accountDatelist.accountDate; - } - //this.listOutPutQuery.accountDate = this.accountDatelist; + let myalert = ""; + var getAccountMonth = moment(this.accountDatelist.accountDate).format( + "YYYY-MM" + ); + let date = new Date(); + let currentMonth = moment(date).format("YYYY-MM"); console.log( - "全部确认出库条件:" + JSON.stringify(this.listOutPutQuery) + "过账日期:" + + JSON.stringify(getAccountMonth) + + "当前日期:" + + JSON.stringify(currentMonth) ); + if (getAccountMonth <= currentMonth) { + myalert = "过账日期小于或等于当前月份"; + } else { + this.$message({ + type: "warning", + message: "选择的过账日期不能大于当前月份!", + }); + this.formLoading = false; + return; + } - this.$axios - .posts( - "/api/settleaccount/wmsSharePartoutput/WmsSharePartOutPut-Pass", - this.listOutPutQuery - ) - .then((response) => { - const index = this.list.indexOf(row); - this.$notify({ - title: "成功", - message: "生成成功", - type: "success", - duration: 2000, - }); - this.accountDatelist.accountDate = ""; - this.dialogFormVisible = false; - this.getList(); - this.formLoading = false; + this.$confirm("是否确认" + myalert + "?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }) + .then(() => { + this.listOutPutQuery.accountDate = this.accountDatelist.accountDate; + console.log( + "全部确认出库条件:" + JSON.stringify(this.listOutPutQuery) + ); + + this.$axios + .posts( + "/api/settleaccount/wmsSharePartoutput/WmsSharePartOutPut-Pass", + this.listOutPutQuery + ) + .then((response) => { + const index = this.list.indexOf(row); + this.$notify({ + title: "成功", + message: "生成成功", + type: "success", + duration: 2000, + }); + this.accountDatelist.accountDate = ""; + this.dialogFormVisible = false; + this.getList(); + this.formLoading = false; + }) + .catch(() => { + this.formLoading = false; + }); }) .catch(() => { - this.formLoading = false; + this.$message({ + type: "info", + message: "已取消操作", + }); + this.formLoading = false; }); } }, diff --git a/vue/static/config.js b/vue/static/config.js index b9188ddc..6757964e 100644 --- a/vue/static/config.js +++ b/vue/static/config.js @@ -37,8 +37,8 @@ if (process.env.NODE_ENV === 'development') { configJSON = { base: { - ip: 'http://192.168.0.67', - //ip: 'http://192.168.0.140', + //ip: 'http://192.168.0.67', + ip: 'http://192.168.0.140', //ip: 'http://149.223.116.5', //ip: 'http://124.220.28.250', //ip: 'http://10.123.148.162',