diff --git a/src/components/Print/出库单.vue b/src/components/Print/出库单.vue index 1746b49..723977c 100644 --- a/src/components/Print/出库单.vue +++ b/src/components/Print/出库单.vue @@ -165,8 +165,8 @@ export default { this.printData.materialList = res.data } }) - this.loading = false; - return; + // this.loading = false; + // return; WmOutOrderApi.generateOutorderplan({ shipment_num: getKey }).then((res) => { if (res.code === 200) { this.printData.planlList = res.data diff --git a/src/views/wmsManagement/WmGoodsNowProduction.vue b/src/views/wmsManagement/WmGoodsNowProduction.vue index 485b6e5..8e7cdfd 100644 --- a/src/views/wmsManagement/WmGoodsNowProduction.vue +++ b/src/views/wmsManagement/WmGoodsNowProduction.vue @@ -38,7 +38,7 @@ - + + - - + + @@ -151,8 +152,8 @@ - - + + diff --git a/src/views/wmsManagement/WmGoodsOutProduction.vue b/src/views/wmsManagement/WmGoodsOutProduction.vue index f1bb65b..690e542 100644 --- a/src/views/wmsManagement/WmGoodsOutProduction.vue +++ b/src/views/wmsManagement/WmGoodsOutProduction.vue @@ -41,7 +41,7 @@ - + - + @@ -164,8 +164,8 @@ - - + + diff --git a/src/views/wmsManagement/WmOutOrder.vue b/src/views/wmsManagement/WmOutOrder.vue index 27d812e..4219311 100644 --- a/src/views/wmsManagement/WmOutOrder.vue +++ b/src/views/wmsManagement/WmOutOrder.vue @@ -22,17 +22,17 @@ - - + + - + - + 搜索 @@ -137,11 +137,7 @@ title="删除" @click="handleDelete(scope.row)" > - 出库计划 + 出库计划 @@ -165,8 +161,8 @@ - - + + @@ -321,10 +317,10 @@ export default { data() { return { TheChouseMaterialDialogVisible: false, - TheOutboundPlanDialogVisible:false, - showPrintDialog:false, - printKey:'', - planKey:'', + TheOutboundPlanDialogVisible: false, + showPrintDialog: false, + printKey: '', + planKey: '', labelWidth: '100px', formLabelWidth: '100px', // 选中shipmentNum数组 @@ -506,7 +502,10 @@ export default { this.reset() this.open = true this.title = '创建出库单' - this.opertype = 1 + ;(this.form.year = new Date().getFullYear()), + (this.form.week = new Date().getMonth() + 1), + (this.form.date = new Date().getDate()), + (this.opertype = 1) }, /** 删除按钮操作 */ handleDelete(row) { @@ -570,9 +569,8 @@ export default { const list = JSON.parse(JSON.stringify(that.form.materialList)) const len = list.length for (let index = 0; index < len; index++) { - if (Ids.includes(list[index].id)) { - console.log(that.form.materialList,index) + console.log(that.form.materialList, index) that.form.materialList.splice(index, 1) } } @@ -588,22 +586,20 @@ export default { // 物料已选择 handlerMaterialChoused(list) { //TODO 需要筛选未选择的 - console.log('handlerMaterialChoused', list, this.form) const _list = JSON.parse(JSON.stringify(list)) for (let index = 0; index < _list.length; index++) { - console.log('push', _list[index], this.form) this.form.materialList.push(_list[index]) } }, // 打印出库单 handlePrint(row) { this.printKey = row.shipmentNum - this.showPrintDialog = true; + this.showPrintDialog = true }, // 配置出库计划 - handlePlan(row){ + handlePlan(row) { this.planKey = row.shipmentNum - this.TheOutboundPlanDialogVisible = true; + this.TheOutboundPlanDialogVisible = true }, // ==================================================== /** 提交按钮 */ @@ -615,15 +611,25 @@ export default { if (this.form.shipmentNum != undefined && this.opertype === 2) { updateWmOutOrder(this.form) .then((res) => { - this.msgSuccess('修改成功') - this.open = false - this.getList() + if (res.code === 200) { + this.msgSuccess('修改成功') + this.open = false + this.getList() + } else { + this.msgSuccess('修改失败') + } }) .catch((err) => { //TODO 错误逻辑 }) } else { console.log('addWmOutOrder') + for (let item of this.form.materialList) { + if ((item.requireOutNum * 1) < 1) { + this.$message.error('需求量不可为0!'+item.partnumber); + return; + } + } // const postData = { // customNo: 'BBBB', // customName: 'BBB', @@ -638,9 +644,13 @@ export default { addWmOutOrder(this.form) .then((res) => { console.log('addWmOutOrder', res) - this.msgSuccess('新增成功') - this.open = false - this.getList() + if (res.code === 200) { + this.msgSuccess('新增成功') + this.open = false + this.getList() + } else { + this.msgSuccess('新增失败') + } }) .catch((err) => { //TODO 错误逻辑 diff --git a/src/views/wmsManagement/components/TheChouseMaterial/TheChouseMaterial.vue b/src/views/wmsManagement/components/TheChouseMaterial/TheChouseMaterial.vue index 8efaae7..b636d9c 100644 --- a/src/views/wmsManagement/components/TheChouseMaterial/TheChouseMaterial.vue +++ b/src/views/wmsManagement/components/TheChouseMaterial/TheChouseMaterial.vue @@ -128,7 +128,10 @@ export default { }, getList() { this.loading = true - const data = this.queryParams + const data = { + ...this.formData, + ...this.queryParams + } getMaterialList(data).then((res) => { if (res.code === 200) { this.dataList = res.data.item1 diff --git a/src/views/wmsManagement/components/TheOutboundPlan/index.vue b/src/views/wmsManagement/components/TheOutboundPlan/index.vue index 8cea28b..791ce81 100644 --- a/src/views/wmsManagement/components/TheOutboundPlan/index.vue +++ b/src/views/wmsManagement/components/TheOutboundPlan/index.vue @@ -92,8 +92,8 @@ export default { }) }, getList() { - this.loading = false; - return; + // this.loading = false; + // return; this.loading = true setTimeout(() => { this.loading = false diff --git a/vue.config.js b/vue.config.js index dce3808..4c977c3 100644 --- a/vue.config.js +++ b/vue.config.js @@ -40,8 +40,8 @@ module.exports = { // detail: https://cli.vuejs.org/config/#devserver-proxy [process.env.VUE_APP_BASE_API]: { - // target: 'http://192.168.90.92:8888/', // 后端接口地址 - target: 'http://192.168.0.31:8888/', // 后端接口地址 + target: 'http://192.168.60.251:8888/', // 后端接口地址 + // target: 'http://192.168.0.31:8888/', // 后端接口地址 changeOrigin: true, pathRewrite: { ['^' + process.env.VUE_APP_BASE_API]: '', //需要rewrite的 @@ -49,8 +49,8 @@ module.exports = { }, msgHub: { - // target: 'http://192.168.90.92:8888/msgHub', - target: 'http://192.168.0.31:8888/msgHub', + target: 'http://192.168.60.251:8888/msgHub', + // target: 'http://192.168.0.31:8888/msgHub', ws: true, changeOrigin: true, pathRewrite: {