Pārlūkot izejas kodu

配置易耗品调整

DESKTOP-B78GIPM\admin 2 gadi atpakaļ
vecāks
revīzija
cb99a337e9

+ 55 - 28
src/views/fangwu/tabList/configureTable.vue

@@ -361,38 +361,65 @@ export default {
                 this.$message.error("未获取到数据!")
                 return
             }
-            if (this.xfData.length > 0) {
 
-                this.xfData.forEach(ele => {
-                    ele.roomLayoutId = this.layouts[this.activeIndex].id
-                })
+            let xf = JSON.parse(JSON.stringify(this.xfData))
+            let tf = JSON.parse(JSON.stringify(this.tfData))
 
-                postAction('/fw/fwRoomLayoutInConsumable/layoutInConsumableSave', this.xfData).then((res) => {
-                    if (res.success) {
-                        // this.$message.success("保存成功!")
-                        this.$emit('ok')
-                    } else {
-                        this.$message.warning(res.message)
-                    }
-                }).finally(() => {
+            xf.forEach(ele => {
+                ele.type = 1
+            })
+            tf.forEach(ele => {
+                ele.type = 2
+            })
 
-                })
-            }
-            if (this.tfData.length > 0) {
-                this.tfData.forEach(ele => {
-                    ele.roomLayoutId = this.layouts[this.activeIndex].id
-                })
-                postAction('/fw/fwRoomLayoutInConsumable/layoutInConsumableSave', this.tfData).then((res) => {
-                    if (res.success) {
-                        this.$message.success("保存成功!")
-                        this.$emit('ok')
-                    } else {
-                        this.$message.warning(res.message)
-                    }
-                }).finally(() => {
+            let arr = xf.concat(tf)
 
-                })
-            }
+            arr.forEach(ele => {
+                ele.roomLayoutId = this.layouts[this.activeIndex].id
+            })
+            postAction('/fw/fwRoomLayoutInConsumable/layoutInConsumableSave', arr).then((res) => {
+                if (res.success) {
+                    this.$message.success("保存成功!")
+                    this.$emit('ok')
+                } else {
+                    this.$message.warning(res.message)
+                }
+            }).finally(() => {
+
+            })
+
+            // if (this.xfData.length > 0) {
+
+            //     this.xfData.forEach(ele => {
+            //         ele.roomLayoutId = this.layouts[this.activeIndex].id
+            //     })
+
+            //     postAction('/fw/fwRoomLayoutInConsumable/layoutInConsumableSave', this.xfData).then((res) => {
+            //         if (res.success) {
+            //             // this.$message.success("保存成功!")
+            //             this.$emit('ok')
+            //         } else {
+            //             this.$message.warning(res.message)
+            //         }
+            //     }).finally(() => {
+
+            //     })
+            // }
+            // if (this.tfData.length > 0) {
+            //     this.tfData.forEach(ele => {
+            //         ele.roomLayoutId = this.layouts[this.activeIndex].id
+            //     })
+            //     postAction('/fw/fwRoomLayoutInConsumable/layoutInConsumableSave', this.tfData).then((res) => {
+            //         if (res.success) {
+            //             this.$message.success("保存成功!")
+            //             this.$emit('ok')
+            //         } else {
+            //             this.$message.warning(res.message)
+            //         }
+            //     }).finally(() => {
+
+            //     })
+            // }
         },
     },
 };

+ 8 - 4
src/views/fangwu/tabList/housekeepingAudit.vue

@@ -4,10 +4,14 @@
 
     <!-- 操作按钮区域 -->
     <div class="table-operator">
-        <a-button type="primary" @click="searchButton('')">全部</a-button>
-        <a-button type="primary" @click="searchButton(0)">待审核</a-button>
-        <a-button type="primary" @click="searchButton(1)">已审核</a-button>
-        <a-button type="primary" @click="searchButton(2)">审核不通过</a-button>
+        <!-- <a-button ghost @click="searchButton('')">全部</a-button>
+        <a-button ghost @click="searchButton(0)">待审核</a-button>
+        <a-button ghost @click="searchButton(1)">已审核</a-button>
+        <a-button ghost @click="searchButton(2)">审核不通过</a-button> -->
+        <a-button @click="searchButton('')">全部</a-button>
+        <a-button @click="searchButton(0)">待审核</a-button>
+        <a-button @click="searchButton(1)">已审核</a-button>
+        <a-button @click="searchButton(2)">审核不通过</a-button>
     </div>
 
     <!-- table区域-begin -->