From 95dc6614c274f8ad6f3b7b57bb672dce120f5665 Mon Sep 17 00:00:00 2001 From: chenhc <2369838784@qq.com> Date: Tue, 19 Mar 2024 17:42:06 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=AE=BE=E5=A4=87=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dev/DeptDeviceDetail.vue | 347 ++++++++++-------- src/views/dev/DeviceTemperamentDialog.vue | 12 +- src/views/dev/devInfoEdit.vue | 11 +- src/views/dev/deviceChangeOrder.vue | 36 +- src/views/dev/invDeviceEditDialog.vue | 16 +- src/views/dev/invTechniclDialog.vue | 12 +- src/views/dev/js/deviceChangeOrder.js | 11 +- .../purchase/company/supCompanyEditDialog.vue | 2 +- .../purApply/purOrderSelectProduct.vue | 6 + src/views/system/dict/data.vue | 51 ++- src/views/system/dict/index.vue | 46 ++- 11 files changed, 313 insertions(+), 237 deletions(-) diff --git a/src/views/dev/DeptDeviceDetail.vue b/src/views/dev/DeptDeviceDetail.vue index fb270016..0043bade 100644 --- a/src/views/dev/DeptDeviceDetail.vue +++ b/src/views/dev/DeptDeviceDetail.vue @@ -1,181 +1,188 @@ diff --git a/src/views/dev/DeviceTemperamentDialog.vue b/src/views/dev/DeviceTemperamentDialog.vue index 1366a6e5..64894108 100644 --- a/src/views/dev/DeviceTemperamentDialog.vue +++ b/src/views/dev/DeviceTemperamentDialog.vue @@ -281,12 +281,12 @@ export default { }; }, created() { - console.log("第一次this.rowData:") - console.log(this.rowData) - // if (this.rowData.editType == 1) { - // this.getDeviceCertList(); - // } - this.getBasicUnitMaintainsList(); + // console.log("第一次this.rowData:") + // console.log(this.rowData) + // // if (this.rowData.editType == 1) { + // // this.getDeviceCertList(); + // // } + // this.getBasicUnitMaintainsList(); this.headers = { ADMINID: store.getters.adminId, ADMINTOKEN: store.getters.token, diff --git a/src/views/dev/devInfoEdit.vue b/src/views/dev/devInfoEdit.vue index 911614d9..b85dbf44 100644 --- a/src/views/dev/devInfoEdit.vue +++ b/src/views/dev/devInfoEdit.vue @@ -1,5 +1,5 @@ @@ -288,6 +288,7 @@ export default { }, }, created() { + console.log(this.rowData); this.formData = JSON.parse(JSON.stringify(this.rowData)); console.log(this.formData); }, diff --git a/src/views/dev/deviceChangeOrder.vue b/src/views/dev/deviceChangeOrder.vue index 978704ff..e6c8c005 100644 --- a/src/views/dev/deviceChangeOrder.vue +++ b/src/views/dev/deviceChangeOrder.vue @@ -200,10 +200,22 @@ - - + + + + + + + + + {{ item.label }} + + @@ -213,7 +225,7 @@ style="margin-top: 10px;">
- 添加设备 + 添加设备
- {{ v[0] }} * {{ v[1] }}条 + {{ v[0] }} * {{ v[1] }}条
@@ -328,6 +340,7 @@ @@ -339,11 +352,16 @@ v-if="deviceInfoFlag" @close="deviceInfoFlag = false" > - + + + + + - +
diff --git a/src/views/dev/invDeviceEditDialog.vue b/src/views/dev/invDeviceEditDialog.vue index fa808820..d5c359f0 100644 --- a/src/views/dev/invDeviceEditDialog.vue +++ b/src/views/dev/invDeviceEditDialog.vue @@ -279,12 +279,12 @@ export default { }; }, created() { - console.log("第一次this.rowData:") - console.log(this.rowData) + // console.log("第一次this.rowData:") + // console.log(this.rowData) // if (this.rowData.editType == 1) { // this.getDeviceCertList(); // } - this.getBasicUnitMaintainsList(); + // this.getBasicUnitMaintainsList(); this.headers = { ADMINID: store.getters.adminId, ADMINTOKEN: store.getters.token, @@ -366,16 +366,6 @@ export default { // this.getCompanyCertList(); this.getDeviceCertList(); }, - getBasicUnitMaintainsList() { - getCorpList() - .then((response) => { - this.maintainsList = response.data || []; - }) - .catch(() => { - this.maintainsList = []; - }); - - }, getDeviceCertList() { diff --git a/src/views/dev/invTechniclDialog.vue b/src/views/dev/invTechniclDialog.vue index 120840af..eee4117d 100644 --- a/src/views/dev/invTechniclDialog.vue +++ b/src/views/dev/invTechniclDialog.vue @@ -278,12 +278,12 @@ export default { }; }, created() { - console.log("第一次this.rowData:") - console.log(this.rowData) - // if (this.rowData.editType == 1) { - // this.getDeviceCertList(); - // } - this.getBasicUnitMaintainsList(); + // console.log("第一次this.rowData:") + // console.log(this.rowData) + // // if (this.rowData.editType == 1) { + // // this.getDeviceCertList(); + // // } + // this.getBasicUnitMaintainsList(); this.headers = { ADMINID: store.getters.adminId, ADMINTOKEN: store.getters.token, diff --git a/src/views/dev/js/deviceChangeOrder.js b/src/views/dev/js/deviceChangeOrder.js index b2720a54..262a15c7 100644 --- a/src/views/dev/js/deviceChangeOrder.js +++ b/src/views/dev/js/deviceChangeOrder.js @@ -11,6 +11,7 @@ import deviceInfo from "@/views/dev/deviceInfo.vue"; import product from "@/views/purchase/purApply/purOrderSelectProduct"; import {copyProperties} from "@/utils"; import deviceModifyDialog from "@/views/dev/devInfoEdit.vue"; +import deptDeviceDetail from "@/views/dev/DeptDeviceDetail.vue"; import fa from "element-ui/src/locale/lang/fa"; let query = { @@ -55,12 +56,13 @@ let item = { } export default { name: "deviceChangeOrder", + dicts: ['device_source_type'], props: { type: { required: true, } }, - components: {deviceInfo, product, deviceModifyDialog}, + components: {deviceInfo, product, deviceModifyDialog,deptDeviceDetail}, computed: { deviceChangeStatus() { return deviceChangeStatus @@ -108,7 +110,7 @@ export default { chooseDeviceFlag: false, chooseProductFlag: false, deviceInfoFlag: false, - createTitle: "设备入库", + createTitle: "设备登记", curDevRow: null, //================================================== @@ -122,7 +124,7 @@ export default { this.locDeptName = this.$store.getters.locDeptName if (this.type == deviceChangeType.ADD) { - this.createTitle = "设备入库"; + this.createTitle = "设备登记"; } else if (this.type == deviceChangeType.CHANGE) { this.createTitle = "设备变更"; } else if (this.type == deviceChangeType.DESTROY) { @@ -396,6 +398,7 @@ export default { this.genCode(data) data.productName = row.cpmctymc data.productId = row.id + data.sourceType = this.createData.sourceType this.itemList.push(data) loading.close() @@ -593,7 +596,7 @@ export default { changeOrderDetailByUser(this.detailQuery).then(res => { this.detailLoading = false if (res.code != 20000) { - this.$message.error(res.message) + // this.$message.error(res.message) return } this.detailList = res.data.list || [] diff --git a/src/views/purchase/company/supCompanyEditDialog.vue b/src/views/purchase/company/supCompanyEditDialog.vue index 491cbf88..0bd41852 100644 --- a/src/views/purchase/company/supCompanyEditDialog.vue +++ b/src/views/purchase/company/supCompanyEditDialog.vue @@ -420,7 +420,7 @@ export default { if(this.editType == 1){ this.getCompanyCertList(); } - this.getBasicUnitMaintainsList(); + // this.getBasicUnitMaintainsList(); this.headers = { ADMINID: store.getters.adminId, ADMINTOKEN: store.getters.token, diff --git a/src/views/purchase/purApply/purOrderSelectProduct.vue b/src/views/purchase/purApply/purOrderSelectProduct.vue index db00d5c5..773b063a 100644 --- a/src/views/purchase/purApply/purOrderSelectProduct.vue +++ b/src/views/purchase/purApply/purOrderSelectProduct.vue @@ -217,6 +217,10 @@ export default { type: Object, required: true, }, + attributeType: { + type: Object, + required: true, + }, chooseFunc: { required: false, type: Function } @@ -234,6 +238,7 @@ export default { ylqxzcrbarmc: null, thrPiId: null, pinyinInitial: null, + attributeType: null, page: 1, limit: 10, }, @@ -529,6 +534,7 @@ export default { created() { this.findBasicProductSet(); + this.listQuery.attributeType = this.attributeType if (this.$isNotBlank(this.data)) { this.ids = []; if (this.data.stockOrderLists.length > 0) { diff --git a/src/views/system/dict/data.vue b/src/views/system/dict/data.vue index 95b054d4..6c850df0 100644 --- a/src/views/system/dict/data.vue +++ b/src/views/system/dict/data.vue @@ -360,36 +360,49 @@ export default { }, /** 提交按钮 */ submitForm: function() { - this.$refs["form"].validate(valid => { + this.$refs['form'].validate(valid => { if (valid) { if (this.form.dictCode != undefined) { updateData(this.form).then(response => { - this.$store.dispatch('dict/removeDict', this.queryParams.dictType); - this.$modal.msgSuccess("修改成功"); - this.open = false; - this.getList(); - }); + if (response.code == 20000) { + this.$store.dispatch('dict/removeDict', this.queryParams.dictType) + this.$modal.msgSuccess('修改成功') + this.open = false + this.getList() + } else { + this.$modal.msgError(response.message) + } + }) } else { addData(this.form).then(response => { - this.$store.dispatch('dict/removeDict', this.queryParams.dictType); - this.$modal.msgSuccess("新增成功"); - this.open = false; - this.getList(); - }); + if (response.code == 20000) { + this.$store.dispatch('dict/removeDict', this.queryParams.dictType) + this.$modal.msgSuccess('新增成功') + this.open = false + this.getList() + } else { + this.$modal.msgError(response.message) + } + }) } } - }); + }) }, /** 删除按钮操作 */ handleDelete(row) { - const dictCodes = row.dictCode || this.ids; + const dictCodes = row.dictCode || this.ids this.$modal.confirm('是否确认删除字典编码为"' + dictCodes + '"的数据项?').then(function() { - return delData(dictCodes); - }).then(() => { - this.getList(); - this.$modal.msgSuccess("删除成功"); - this.$store.dispatch('dict/removeDict', this.queryParams.dictType); - }).catch(() => {}); + return delData(dictCodes) + }).then((response) => { + if (response.code == 20000) { + this.getList() + this.$modal.msgSuccess('删除成功') + this.$store.dispatch('dict/removeDict', this.queryParams.dictType) + } else { + this.$modal.msgError(response.message) + } + }).catch(() => { + }) }, /** 导出按钮操作 */ handleExport() { diff --git a/src/views/system/dict/index.vue b/src/views/system/dict/index.vue index 226544b9..4c28e11b 100644 --- a/src/views/system/dict/index.vue +++ b/src/views/system/dict/index.vue @@ -291,33 +291,47 @@ export default { }, /** 提交按钮 */ submitForm: function() { - this.$refs["form"].validate(valid => { + this.$refs['form'].validate(valid => { if (valid) { if (this.form.dictId != undefined) { updateType(this.form).then(response => { - this.$modal.msgSuccess("修改成功"); - this.open = false; - this.getList(); - }); + if (response.code == 20000) { + this.$modal.msgSuccess('修改成功') + this.open = false + this.getList() + } else { + this.$modal.msgError(response.message) + } + }) } else { addType(this.form).then(response => { - this.$modal.msgSuccess("新增成功"); - this.open = false; - this.getList(); - }); + if (response.code == 20000) { + this.$modal.msgSuccess('新增成功') + this.open = false + this.getList() + } else { + this.$modal.msgError(response.message) + } + }) } } - }); + }) }, /** 删除按钮操作 */ handleDelete(row) { - const dictIds = row.dictId || this.ids; + const dictIds = row.dictId || this.ids this.$modal.confirm('是否确认删除字典编号为"' + dictIds + '"的数据项?').then(function() { - return delType(dictIds); - }).then(() => { - this.getList(); - this.$modal.msgSuccess("删除成功"); - }).catch(() => {}); + return delType(dictIds) + }).then((response) => { + if (response.code == 20000) { + this.getList() + this.$modal.msgSuccess('删除成功') + } else { + this.$modal.msgError(response.message) + } + + }).catch(() => { + }) }, /** 导出按钮操作 */ handleExport() {