diff --git a/jnpf-java-boot/jnpf-web/src/views/recyclebucket/form.vue b/jnpf-java-boot/jnpf-web/src/views/recyclebucket/form.vue index 9230475..b058abb 100644 --- a/jnpf-java-boot/jnpf-web/src/views/recyclebucket/form.vue +++ b/jnpf-java-boot/jnpf-web/src/views/recyclebucket/form.vue @@ -2,10 +2,7 @@
- +
@@ -20,103 +17,51 @@ {{ "下一条" }} - + {{ !dataForm.id ? "确定并新增" : "确定并继续" - }} + }} - - 保 存 + + 保 存 取 消
- - + + - +
@@ -500,6 +293,9 @@ import { } from "@/components/Generator/utils/index.js"; import { thousandsFormat } from "@/components/Generator/utils/index"; +let recycleDeviceConfigEntity = { +}; + export default { components: {}, props: [], @@ -821,7 +617,7 @@ export default { this.initDefaultData(); this.dataValueAll = JSON.parse(JSON.stringify(this.dataForm)); }, - mounted() {}, + mounted() { }, methods: { prev() { this.index--; @@ -886,6 +682,9 @@ export default { if (model == "productCode") { this.fnProductCodeChg(); } + if (model == "doorNum") { + this.fnDoorNumChg(); + } }, fnProductCodeChg() { console.log("productCode"); @@ -903,6 +702,92 @@ export default { } } }, + fnDoorNumChg() { + if (this.dataForm.doorNum == 1) { + if (recycleDeviceConfigEntity.bucket1Price == null) { + this.priceDesc = '暂无统一配置'; + } else { + this.priceDesc = recycleDeviceConfigEntity.bucket1Price; + } + } + if (this.dataForm.doorNum == 2) { + if (recycleDeviceConfigEntity.bucket2Price == null) { + this.priceDesc = '暂无统一配置'; + } else { + this.priceDesc = recycleDeviceConfigEntity.bucket2Price; + } + } + if (this.dataForm.doorNum == 3) { + if (recycleDeviceConfigEntity.bucket3Price == null) { + this.priceDesc = '暂无统一配置'; + } else { + this.priceDesc = recycleDeviceConfigEntity.bucket3Price; + } + } + if (this.dataForm.doorNum == 4) { + if (recycleDeviceConfigEntity.bucket4Price == null) { + this.priceDesc = '暂无统一配置'; + } else { + this.priceDesc = recycleDeviceConfigEntity.bucket4Price; + } + } + if (this.dataForm.doorNum == 5) { + if (recycleDeviceConfigEntity.bucket5Price == null) { + this.priceDesc = '暂无统一配置'; + } else { + this.priceDesc = recycleDeviceConfigEntity.bucket5Price; + } + } + if (this.dataForm.doorNum == 6) { + if (recycleDeviceConfigEntity.bucket6Price == null) { + this.priceDesc = '暂无统一配置'; + } else { + this.priceDesc = recycleDeviceConfigEntity.bucket6Price; + } + } + if (this.dataForm.doorNum == 7) { + if (recycleDeviceConfigEntity.bucket7Price == null) { + this.priceDesc = '暂无统一配置'; + } else { + this.priceDesc = recycleDeviceConfigEntity.bucket7Price; + } + } + if (this.dataForm.doorNum == 8) { + if (recycleDeviceConfigEntity.bucket8Price == null) { + this.priceDesc = '暂无统一配置'; + } else { + this.priceDesc = recycleDeviceConfigEntity.bucket8Price; + } + } + if (this.dataForm.doorNum == 9) { + if (recycleDeviceConfigEntity.bucket9Price == null) { + this.priceDesc = '暂无统一配置'; + } else { + this.priceDesc = recycleDeviceConfigEntity.bucket9Price; + } + } + if (this.dataForm.doorNum == 10) { + if (recycleDeviceConfigEntity.bucket10Price == null) { + this.priceDesc = '暂无统一配置'; + } else { + this.priceDesc = recycleDeviceConfigEntity.bucket10Price; + } + } + if (this.dataForm.doorNum == 11) { + if (recycleDeviceConfigEntity.bucket11Price == null) { + this.priceDesc = '暂无统一配置'; + } else { + this.priceDesc = recycleDeviceConfigEntity.bucket11Price; + } + } + if (this.dataForm.doorNum == 12) { + if (recycleDeviceConfigEntity.bucket12Price == null) { + this.priceDesc = '暂无统一配置'; + } else { + this.priceDesc = recycleDeviceConfigEntity.bucket12Price; + } + } + }, changeDataFormData(type, data, model, index, defaultValue) { if (!this.isEdit) { if (type == 2) { @@ -935,10 +820,10 @@ export default { if (relationFieldAll.length > 1 && index > -1) { val = this.dataForm[relationFieldAll[0] + "List"] && - this.dataForm[relationFieldAll[0] + "List"].length + this.dataForm[relationFieldAll[0] + "List"].length ? this.dataForm[relationFieldAll[0] + "List"][index][ - relationFieldAll[1] - ] + relationFieldAll[1] + ] : ""; } else { val = this.dataForm[relationFieldAll]; @@ -975,10 +860,10 @@ export default { if (relationFieldAll.length > 1 && index > -1) { val = this.dataForm[relationFieldAll[0] + "List"] && - this.dataForm[relationFieldAll[0] + "List"].length + this.dataForm[relationFieldAll[0] + "List"].length ? this.dataForm[relationFieldAll[0] + "List"][index][ - relationFieldAll[1] - ] + relationFieldAll[1] + ] : ""; } else { val = this.dataForm[relationFieldAll]; @@ -1074,29 +959,31 @@ export default { //初始化默认数据 initDefaultData() { request({ - url: `/api/scm/RecycleDeviceConfig`, - method: "GET" - }).then(res => { - this.priceDesc = res.data.deliveryPrice; - this.useUnifiedConfig = true; - if (res.data.fullSet == 0) { - this.fullSetDesc = "关闭"; - } else { - this.fullSetDesc = "开启"; - } - this.usefullSetConfig = true; - if (res.data.smogSet == 0) { - this.smogSetDesc = "关闭"; - } else { - this.smogSetDesc = "开启"; - } - this.useSmogSetConfig = true; - this.closeDelayDesc = res.data.closeDelay; - this.closeDelayConfig = true; - res.data.closeDelay = null; - this.warningWeightDesc = res.data.warningWeight; - this.warningWeightConfig = true; - }); + url: `/api/scm/RecycleDeviceConfig`, + method: "GET" + }).then(res => { + //复制给全局对象 + recycleDeviceConfigEntity = res.data; + this.priceDesc = res.data.deliveryPrice; + this.useUnifiedConfig = true; + if (res.data.fullSet == 0) { + this.fullSetDesc = "关闭"; + } else { + this.fullSetDesc = "开启"; + } + this.usefullSetConfig = true; + if (res.data.smogSet == 0) { + this.smogSetDesc = "关闭"; + } else { + this.smogSetDesc = "开启"; + } + this.useSmogSetConfig = true; + this.closeDelayDesc = res.data.closeDelay; + this.closeDelayConfig = true; + res.data.closeDelay = null; + this.warningWeightDesc = res.data.warningWeight; + this.warningWeightConfig = true; + }); }, // 表单提交 dataFormSubmit(type) {