Quellcode durchsuchen

feat: 添加业主监控功能选项

Signed-off-by: tangshizhe <48740614+tangshizhe@users.noreply.github.com>
tangshizhe vor 1 Jahr
Ursprung
Commit
432c7abea3
1 geänderte Dateien mit 110 neuen und 2 gelöschten Zeilen
  1. 110 2
      src/views/order/components/bigOrder.vue

+ 110 - 2
src/views/order/components/bigOrder.vue

@@ -837,6 +837,7 @@ export default {
             this.resArr3 = []
             this.resArr4 = []
             this.resArr5 = []
+            this.resArr6 = []
             this.$request('/order/getServer').data().success((res) => {// 获取自定义套餐所有服务选项
                 this.servedData = res.data.lists
                 res.data.lists.forEach(v => {
@@ -852,6 +853,8 @@ export default {
                                 this.resArr4.push(v)
                             } else if (v.id == 14 || v.id == 22) {
                                 this.resArr5.push(v)
+                            } else if (v.id == 24 || v.id == 25) {
+                                this.resArr6.push(v)
                             } else {
                                 if (v.id !== 12) {
                                     resList.push(v)
@@ -889,6 +892,12 @@ export default {
                                 } else {
                                     this.resArr5.push(v)
                                 }
+                            } else if (v.id == 24 || v.id == 25) {
+                                if (this.currentId.indexOf(v.id) > -1) {
+                                    resList.splice(20, 0, v)
+                                } else {
+                                    this.resArr6.push(v)
+                                }
                             } else {
                                 if (v.id !== 12) {
                                     resList.push(v)
@@ -965,12 +974,25 @@ export default {
                     s_pkcount: null,
                     _checked: false
                 }
+                let arr6 = {
+                    i_ispackage: 0,
+                    i_isserver: 1,
+                    i_pkprice: null,
+                    i_price_month: null,
+                    i_price_year: null,
+                    s_count_year: null,
+                    id: 9124,
+                    s_name: '',
+                    s_pkcount: null,
+                    _checked: false
+                }
                 if (this.repair == '1') {
                     resList.splice(1, 0, arr1)
                     resList.splice(3, 0, arr2)
                     resList.splice(13, 0, arr3)
                     resList.splice(14, 0, arr4)
                     resList.splice(15, 0, arr5)
+                    resList.splice(17, 0, arr6)
                 } else if (this.repair == '2') {
                     if (!(this.currentId.indexOf(17) > -1) && !(this.currentId.indexOf(18) > -1)) {
                         resList.splice(1, 0, arr1)
@@ -987,6 +1009,9 @@ export default {
                     if (!(this.currentId.indexOf(14) > -1) && !(this.currentId.indexOf(22) > -1)) {
                         resList.splice(15, 0, arr5)
                     }
+                    if (!(this.currentId.indexOf(24) > -1) && !(this.currentId.indexOf(25) > -1)) {
+                        resList.splice(18, 0, arr6)
+                    }
                 }
                 this.serData = resList
                 if (val) {
@@ -1502,7 +1527,7 @@ export default {
             selection.map(v => {
                 arrs1.push(v.id)
                 if (this.repair == '1') {
-                    if (v.id !== 9119 && v.id !== 9120 && v.id !== 9121 && v.id !== 9122 && v.id !== 9123) {
+                    if (v.id !== 9119 && v.id !== 9120 && v.id !== 9121 && v.id !== 9122 && v.id !== 9123 && v.id !== 9124) {
                         arrs.push(v)
                     }
                 } else {
@@ -1520,9 +1545,11 @@ export default {
                     strItems.splice(1,0,this.strItems4)
                 } else if (v.id == 9123) {
                     strItems.splice(1,0,this.strItems5)
+                } else if (v.id == 9124) {
+                    strItems.splice(1,0,this.strItems6)
                 }
             })
-            if (arrs1.indexOf(9119) > -1 || arrs1.indexOf(9120) > -1 || arrs1.indexOf(9121) > -1 || arrs1.indexOf(9122) > -1 || arrs1.indexOf(9123) > -1) {
+            if (arrs1.indexOf(9119) > -1 || arrs1.indexOf(9120) > -1 || arrs1.indexOf(9121) > -1 || arrs1.indexOf(9122) > -1 || arrs1.indexOf(9123) > -1 || arrs1.indexOf(9124) > -1) {
                 this.sumSel = arrs.concat(strItems)
             } else {
                 this.sumSel = arrs
@@ -1584,6 +1611,12 @@ export default {
             if (arr1.indexOf(9123) > -1 && this.strItems5.id == 14) {
                 document.getElementById('counts1').disabled = false
             }
+            if (arr1.indexOf(9124) > -1 && this.strItems5.id == 24) {
+                document.getElementById('counts4').disabled = false
+            }
+            if (arr1.indexOf(9124) > -1 && this.strItems5.id == 15) {
+                document.getElementById('counts1').disabled = false
+            }
         },
         canChange(selection, row) {// 取消单个
             let arr2 = []
@@ -2037,6 +2070,7 @@ export default {
             resArr3: [],
             resArr4: [],
             resArr5: [],
+            resArr6: [],
             optionDis1: false,
             optionDis2: false,
             optionDis3: false,
@@ -2222,6 +2256,7 @@ export default {
             strItems3: [],
             strItems4: [],
             strItems5: [],
+            strItems6: [],
             value1: '',
             columns2: [
                 {
@@ -2647,6 +2682,79 @@ export default {
                                     }, this.resArr5[0].s_name)
                                 ]
                                 )
+                            } else if (row.id == 9124) {
+                                return h('Select', {
+                                    props: {
+                                        placeholder: '请选择业主监控',
+                                        value: '',
+                                    },
+                                    on: {
+                                        'on-change': (val) => {
+                                            row.i_price_year = JSON.parse(val).i_price_year
+                                            row.i_price_month = JSON.parse(val).i_price_month
+                                        },
+                                        'on-select': val => {
+                                            this.strItems6 = JSON.parse(val.value)
+                                            const arrs = [], arrs1 = [], strItems = []
+                                            this.serData.forEach(s => {
+                                                if (this.selData.length == 0) {
+                                                    if (this.repair == '1') {
+                                                        if (s.id == 1) {
+                                                            this.selData.push(s)
+                                                        }
+                                                    } else {
+                                                        if (!s._disabled) {
+                                                            this.selData.push(s)
+                                                        }
+                                                    }
+                                                }
+                                            })
+                                            this.selData.map(v => {
+                                                arrs1.push(v.id)
+                                                if (this.repair == '1') {
+                                                    if (v.id != 9119 && v.id !== 9120 && v.id !== 9121 && v.id !== 9122 && v.id !== 9123  && v.id !== 9124) {
+                                                        arrs.push(v)
+                                                    }
+                                                } else {
+                                                    if (v.id != 9119 && !v._disabled) {
+                                                        arrs.push(v)
+                                                    }
+                                                }
+                                                if (v.id == 9119) {
+                                                    strItems.splice(1,0,this.strItems1)
+                                                } else if (v.id == 9120) {
+                                                    strItems.splice(1,0,this.strItems2)
+                                                } else if (v.id == 9121) {
+                                                    strItems.splice(1,0,this.strItems3)
+                                                } else if (v.id == 9122) {
+                                                    strItems.splice(1,0,this.strItems4)
+                                                } else if (v.id == 9123) {
+                                                    strItems.splice(1,0,this.strItems5)
+                                                } else if (v.id == 9124) {
+                                                    strItems.splice(1,0,this.strItems6)
+                                                }
+                                            })
+                                            if (arrs1.indexOf(9119) > -1 || arrs1.indexOf(9120) > -1 || arrs1.indexOf(9121) > -1 || arrs1.indexOf(9122) > -1 || arrs1.indexOf(9123) > -1 || arrs1.indexOf(9123) > -1) {
+                                                this.sumSel = arrs.concat(strItems)
+                                            } else {
+                                                this.sumSel = arrs
+                                            }
+                                        }
+                                    }
+                                },
+                                [
+                                    h('Option',{
+                                        props: {
+                                            value: JSON.stringify(this.resArr6[1])
+                                        }
+                                    }, this.resArr6[1].s_name),
+                                    h('Option',{
+                                        props: {
+                                            value: JSON.stringify(this.resArr6[0])
+                                        }
+                                    }, this.resArr6[0].s_name)
+                                ]
+                                )
                             } else {
                                 return h('span', row.s_name ? row.s_name : '-')
                             }