From 64b0a3a7b279580fb787895499ab728562de2e39 Mon Sep 17 00:00:00 2001 From: wangwei <1610949092@qq.com> Date: Thu, 21 Nov 2024 10:59:19 +0800 Subject: [PATCH 1/2] =?UTF-8?q?11/21=20=E6=A7=BD=E4=BD=8D=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E7=BB=91=E5=AE=9A=E4=BA=A7=E5=93=811.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/basic/workplace/workplaceQueue.vue | 128 ++++++++++++++----- 1 file changed, 95 insertions(+), 33 deletions(-) diff --git a/src/views/basic/workplace/workplaceQueue.vue b/src/views/basic/workplace/workplaceQueue.vue index eace211d..84e001e2 100644 --- a/src/views/basic/workplace/workplaceQueue.vue +++ b/src/views/basic/workplace/workplaceQueue.vue @@ -102,7 +102,7 @@
高级搜索 - 维护绑定关系 --> - + @@ -148,7 +148,7 @@ 绑定产品 @@ -168,7 +168,7 @@ {{product.nameCode}} {{product.cpmctymc}} - {{product.ggxh}} + {{ product.bzgg }} + {{ product.ggxh }} - -
- 提交 +
+ + 取消 + 提交 +
@@ -266,16 +269,7 @@ export default { name: "workplaceQueue", data() { return { - //页面配置 - executeFuc(row, type, clickFuc, value) { - return executeFuc(this, row, type, clickFuc, value); - }, - executeEval(row, expression, defaultRet) { - if (expression) { - return eval(expression); - } - return defaultRet; - }, + tableObj: [], queryList: [], tableHeader: [], @@ -317,6 +311,11 @@ export default { dialogTableVisible: false, radio: 1, addBindVisible: false, + titleName: "1", + titleMap:{ + "1" : '维护绑定关系', + "2" : '绑定产品' + }, formLoading: false, dialogVisible: false, formData: formJson, @@ -383,11 +382,22 @@ export default { 1: "在库", 2: "已使用", 3: "已退回", - } + }, + bindType : 2,//2:绑定产品其他就是维护绑定 }; }, components: {}, methods: { + //页面配置 + executeFuc(row, type, clickFuc, value) { + return executeFuc(this, row, type, clickFuc, value); + }, + executeEval(row, expression, defaultRet) { + if (expression) { + return eval(expression); + } + return defaultRet; + }, onReset() { this.$router.push({ path: "", @@ -493,6 +503,13 @@ export default { }); }, submitAddBindData(){ + if (this.addBindData.id == null || this.addBindData.code == null){ + return this.$message.error("请添加槽位") + } + if (this.addBindData.udiCode == null ){ + return this.$message.error("请添加产品!") + } + this.addBindData.relId = this.product.relId bind(this.addBindData).then( (response) => { if (response.code === 20000) { @@ -503,14 +520,24 @@ export default { udiCode: null, udiCodeFlag: false } - this.sysWorkplaceQueue = {}, - this.product = {}, - this.$nextTick(() => { - this.$refs.inputRef1.focus(); // 设置焦点到第一个输入框 - }); + this.sysWorkplaceQueue = {} + this.product = {} + if (this.bindType == 2){ + this.closeAddBindData() + }else { + this.$nextTick(() => { + this.$refs.inputRef1.focus(); // 设置焦点到第一个输入框 + }); + } } else { this.$message.error(response.message) - this.$refs.inputRef1.select(); + if (this.bindType == 2){ + this.closeAddBindData() + }else { + this.$nextTick(() => { + this.$refs.inputRef1.focus(); // 设置焦点到第一个输入框 + }); + } } }).catch((error) => { this.$message.error(error.message) @@ -518,6 +545,10 @@ export default { }); }, + closeAddBindData(){ + this.addBindVisible = false + this.getCodeDetailList(); + }, enterKey() { this.getOrderDetails() }, @@ -633,17 +664,41 @@ export default { this.codeQuery.page = 1; this.getCodeDetailList(); }, - addBind() { - this.addBindData = { - code: null, + addBind(val,row) { + if (val == 1){ + this.addBindData = { + code: null, codeFlag: false, udiCode: null, udiCodeFlag: false + } + this.bindType = 1 + this.sysWorkplaceQueue = {} + this.product = {} + this.addBindVisible = true + this.$nextTick(() => { + this.$refs.inputRef1.focus(); // 设置焦点到第一个输入框 + }); + }else { + this.addBindData = { + code: null, + codeFlag: true, + udiCode: null, + udiCodeFlag: true + } + this.bindType = 2 + this.titleName = "2" + this.sysWorkplaceQueue.code = row.code + this.sysWorkplaceQueue.remark = row.remark + this.addBindData.code = row.code + this.addBindData.id = row.id + this.product = {} + this.addBindVisible = true + this.$nextTick(() => { + this.$refs.inputRef2.focus(); + }); + } - this.addBindVisible = true - this.$nextTick(() => { - this.$refs.inputRef1.focus(); // 设置焦点到第一个输入框 - }); }, getCodeDetailList() { this.codeDetailLoading = true; @@ -742,5 +797,12 @@ export default { .el-radio:focus:not(.is-focus):not(:active):not(.is-disabled) .el-radio__inner { box-shadow: none !important; } - +.center-button { + display: flex; + justify-content: center; + align-items: center; + height: 100%; + margin-bottom: 10px; + margin-top: 18px; +} From 21c27bc1ce0e110943312ac05df1aa3d62505446 Mon Sep 17 00:00:00 2001 From: wangwei <1610949092@qq.com> Date: Thu, 21 Nov 2024 11:21:50 +0800 Subject: [PATCH 2/2] =?UTF-8?q?11/21=20=E4=BB=A3=E7=A0=81=E5=A4=87?= =?UTF-8?q?=E4=BB=BD1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basic/workplace/selectDrugDialog.vue | 378 ++++++++++++ src/views/basic/workplace/workplaceQueue.vue | 569 +++++++++--------- 2 files changed, 671 insertions(+), 276 deletions(-) create mode 100644 src/views/basic/workplace/selectDrugDialog.vue diff --git a/src/views/basic/workplace/selectDrugDialog.vue b/src/views/basic/workplace/selectDrugDialog.vue new file mode 100644 index 00000000..2b73649c --- /dev/null +++ b/src/views/basic/workplace/selectDrugDialog.vue @@ -0,0 +1,378 @@ + + + + + diff --git a/src/views/basic/workplace/workplaceQueue.vue b/src/views/basic/workplace/workplaceQueue.vue index 84e001e2..f32d477c 100644 --- a/src/views/basic/workplace/workplaceQueue.vue +++ b/src/views/basic/workplace/workplaceQueue.vue @@ -23,7 +23,8 @@
+ :label="item.columnDesc+`:`" :key="item.id" + > + :label="item.columnDesc+`:`" + > + clearable + > --> + :label="item.columnDesc+`:`" + > + :label="item.columnDesc+`:`" + > 高级搜索 - 维护绑定关系 绑定产品 @@ -166,9 +171,8 @@ - + size="mini" label-width="auto" + > @@ -198,10 +203,10 @@ - - {{sysWorkplaceQueue.code}} - {{sysWorkplaceQueue.name}} - {{sysWorkplaceQueue.remark}} + + {{ sysWorkplaceQueue.code }} + {{ sysWorkplaceQueue.name }} + {{ sysWorkplaceQueue.remark }} @@ -224,31 +229,50 @@ - - {{product.nameCode}} - {{product.cpmctymc}} - {{ product.bzgg }} + + {{ product.nameCode }} + {{ product.cpmctymc }} + {{ + product.bzgg + }} + {{ product.ggxh }}
- - 取消 - 提交 - + + 取消 + 提交 +
+ + + + + + + +