From 0aca0785b560818ea3e4ea5051c5230d8ad42c8a Mon Sep 17 00:00:00 2001 From: mhsnet Date: Mon, 22 Jul 2024 16:25:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E6=94=B6=E6=A1=B6=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jnpf-web/src/views/recyclebucket/form.vue | 470 ++++++++++++++---- 1 file changed, 361 insertions(+), 109 deletions(-) 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 253cb49..284f149 100644 --- a/jnpf-java-boot/jnpf-web/src/views/recyclebucket/form.vue +++ b/jnpf-java-boot/jnpf-web/src/views/recyclebucket/form.vue @@ -2,7 +2,10 @@
- +
@@ -17,51 +20,103 @@ {{ "下一条" }} - + {{ !dataForm.id ? "确定并新增" : "确定并继续" - }} + }} - - 保 存 + + 保 存 取 消
- - + + - +
@@ -293,14 +520,14 @@ import { } from "@/components/Generator/utils/index.js"; import { thousandsFormat } from "@/components/Generator/utils/index"; -let recycleDeviceConfigEntity = { -}; +let recycleDeviceConfigEntity = {}; export default { components: {}, props: [], data() { return { + imgList: [], checkboxLabel: "采用统一配置:", priceDesc: "", fullSetDesc: "", @@ -522,10 +749,7 @@ export default { { label: "设备编码", value: "deviceCode" }, { label: "设备名称", value: "deviceName" } ], - isShowOptions: [ - { fullName: "关闭", id: 0 }, - { fullName: "显示", id: 1 } - ], + isShowOptions: [{ fullName: "关闭", id: 0 }, { fullName: "显示", id: 1 }], isShowProps: { label: "fullName", value: "id" }, statusOptions: [ { fullName: "停用", id: "0" }, @@ -613,12 +837,44 @@ export default { }, watch: {}, created() { + this.fnGetImgList(); this.dataAll(); this.initDefaultData(); this.dataValueAll = JSON.parse(JSON.stringify(this.dataForm)); }, - mounted() { }, + mounted() {}, methods: { + fnGetImgList() { + let _query = { + currentPage: 1, + dataType: 0, + keyword: "", + menuId: "585014585363274437", + moduleId: "585010334360672901", + pageSize: 10000, + sidx: "", + sort: "", + superQueryJson: "", + type: 1 + }; + request({ + url: `/api/scm/BucketIcon/getList`, + method: "post", + data: _query + }).then(res => { + if ((res.code = 200)) { + let img_list = res.data.list; + img_list = img_list.map(x1 => { + let obj = x1.url; + return obj; + }); + this.imgList = img_list; + } + }); + }, + fnImgItemSltd(item) { + this.dataForm.bucketImg = item; + }, prev() { this.index--; if (this.index === 0) { @@ -680,17 +936,13 @@ export default { } } if (model == "productCode") { - this.fnProductCodeChg(); + //this.fnProductCodeChg(); } if (model == "doorNum") { this.fnDoorNumChg(); } }, fnProductCodeChg() { - console.log("productCode"); - console.log(this.dataForm.productCode); - console.log(this.dataForm.bucketImg); - console.log(this.productCodeOptions); if (this.dataForm.productCode) { let productCodeOne = this.productCodeOptions.filter(o1 => { return o1.id == this.dataForm.productCode; @@ -718,7 +970,7 @@ export default { recycleDeviceConfigEntity.bucket12Price ]; const doorNum = Math.min(Math.max(this.dataForm.doorNum, 1), 12); - this.priceDesc = prices[doorNum - 1] || '暂无统一配置'; + this.priceDesc = prices[doorNum - 1] || "暂无统一配置"; }, changeDataFormData(type, data, model, index, defaultValue) { if (!this.isEdit) { @@ -752,10 +1004,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]; @@ -776,7 +1028,7 @@ export default { index, "542988728520413647" ); - this.fnProductCodeChg(); + //this.fnProductCodeChg(); }); }, getproductSubCodeOptions() { @@ -792,10 +1044,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];