Browse Source

Merge remote-tracking branch 'origin/dev' into dev

shaun-sheep 4 years ago
parent
commit
e13124c1e5

+ 82 - 36
src/components/ledger/handsontables/device.vue

@@ -1108,59 +1108,105 @@ export default {
         //品牌型号弹窗
         case 'DPManufacturerID':
           if (!this.onlyRead) {
-            this.myDialog.firm = true
+						const linkId = this.tableData[row.row].LinkId;
+						if (linkId) { //关联资产
+								this.myDialog.firm = true;
+						} else { //未关联资产
+								this.$message('请先关联资产再维护该信息!');
+						}
           }
           return false
         //供应商信息弹窗
         case 'DPSupplierID':
           if (!this.onlyRead) {
-            this.myDialog.supplier = true
+            const linkId = this.tableData[row.row].LinkId;
+						if (linkId) { //关联资产
+								this.myDialog.supplier = true;
+						} else { //未关联资产
+								this.$message('请先关联资产再维护该信息!');
+						}
           }
           return false
         //维修商信息弹窗
         case 'DPMaintainerID':
           if (!this.onlyRead) {
-            this.myDialog.maintainer = true
+            const linkId = this.tableData[row.row].LinkId;
+						if (linkId) { //关联资产
+								this.myDialog.maintainer = true;
+						} else { //未关联资产
+								this.$message('请先关联资产再维护该信息!');
+						}
           }
           return false
         //保险公司信息
         case 'DPInsurerID':
           if (!this.onlyRead) {
-            this.myDialog.insurer = true
-          }
-          return false
-        //供应合同编号
-        case 'LedgerParam.SupplyPurchase.SupplierContractID':
-          if (!this.onlyRead) {
-            let ContractIDflag = null
-            let DPSdata = this.tableData[row.row].DPSupplierID
-            if (DPSdata) {
-              ContractIDflag = DPSdata.split('-')[0]
-            }
-            if (!!ContractIDflag) {
-              this.id = ContractIDflag
-              this.myDialog.supply = true
-            } else {
-              this.$message('请先选择供应商')
-            }
-          }
-          return false
-        //保险单号
-        case 'LedgerParam.InsuranceDoc.InsuranceNum':
-          if (!this.onlyRead) {
-            let DPInsurerIDflag = null
-            let DPIdata = this.tableData[row.row].DPInsurerID
-            if (DPIdata) {
-              DPInsurerIDflag = DPIdata.split('-')[0]
-            }
-            if (!!DPInsurerIDflag) {
-              this.id = DPInsurerIDflag
-              this.myDialog.guarantee = true
-            } else {
-              this.$message('请先选择保险商')
-            }
+            const linkId = this.tableData[row.row].LinkId;
+						if (linkId) { //关联资产
+								this.myDialog.insurer = true;
+						} else { //未关联资产
+								this.$message('请先关联资产再维护该信息!');
+						}
           }
           return false
+        /**
+				 * 供应合同编号
+				 * TODO:厂商库服务无人维护,故注释供应合同编号选择改为直接输入
+				 */
+        // case 'LedgerParam.SupplyPurchase.SupplierContractID':
+        //   if (!this.onlyRead) {
+        //     let ContractIDflag = null
+        //     let DPSdata = this.tableData[row.row].DPSupplierID
+        //     if (DPSdata) {
+        //       ContractIDflag = DPSdata.split('-')[0]
+        //     }
+        //     if (!!ContractIDflag) {
+        //       this.id = ContractIDflag
+        //       this.myDialog.supply = true
+        //     } else {
+        //       this.$message('请先选择供应商')
+        //     }
+        //   }
+        //   return false
+        /** 
+				 * 保险单号
+				 * TODO:厂商库服务无人维护,故注释保险单号选择改为直接输入
+				 */
+        // case 'LedgerParam.InsuranceDoc.InsuranceNum':
+        //   if (!this.onlyRead) {
+        //     let DPInsurerIDflag = null
+        //     let DPIdata = this.tableData[row.row].DPInsurerID
+        //     if (DPIdata) {
+        //       DPInsurerIDflag = DPIdata.split('-')[0]
+        //     }
+        //     if (!!DPInsurerIDflag) {
+        //       this.id = DPInsurerIDflag
+        //       this.myDialog.guarantee = true
+        //     } else {
+        //       this.$message('请先选择保险商')
+        //     }
+        //   }
+        //   return false
+				case 'flowBuild': //所属建筑楼层
+				case 'LedgerParam.EquipManufactor.ProductDate': //生产日期
+				case 'LedgerParam.EquipManufactor.SerialNum': //出厂编号
+				case 'LedgerParam.SupplyPurchase.AssetID': //资产编号
+				case 'LedgerParam.SupplyPurchase.PurchasePrice': //采购价格
+				case 'LedgerParam.InsuranceDoc.InsuranceNum': //保险单号
+				case 'LedgerParam.InsuranceDoc.InsuranceFile': //保险文件
+						if (!this.onlyRead) {
+								const linkId = this.tableData[row.row].LinkId;
+								if (!linkId) { //未关联资产
+										this.$confirm('请先关联资产再维护该信息!', '提示', {
+												confirmButtonText: '确定',
+												showCancelButton: false,
+												type: 'warning'
+										}).then(() => {
+												return false;
+										});
+								}
+						}
+						return false
         //保险文件--设备文档--安装质检报告
         case 'LedgerParam.InsuranceDoc.InsuranceFile': //保险文件
         case 'LedgerParam.PhotoDoc.Archive': //设备文档

+ 2 - 0
src/components/ledger/rentList/roomCountDrawer.vue

@@ -285,6 +285,8 @@ export default {
       tnRelateOneZone(pa, res => { })
     },
     save() {
+      console.log(this.zoneList)
+			debugger
       this.$emit('refresh');
       this.drawer = false;
     }

+ 11 - 0
src/views/ledger/cenotelist/cenoteadd/index.vue

@@ -48,6 +48,7 @@ export default {
       relationids: "",
       onlyRead: false,
       showTypes: [{ value: "Visible", label: '只看采集信息' }, { value: "all", label: '全部' }],
+      inputMap: {}, //信息点和输入方式映射表
       showType: this.$route.query.showType,
       tableHeader: [],
       tableData: session.get("cenoteAddData")? session.get("cenoteAddData").length? session.get("cenoteAddData"): [{}]: [{}],
@@ -76,6 +77,11 @@ export default {
       }
       await getDataDictionary(param, res => {
         this.tableHeader = res.Content
+        this.tableHeader.forEach(item => {
+          if (item.Path) {
+            this.inputMap[item.Path] = item
+          }
+        })
         this.initTable()
       })
     },
@@ -197,8 +203,13 @@ export default {
     getInfors(infos, row) {
       //其他的开始判断
       let val = this.tableExample.colToProp(row.col);
+      let inputData = this.inputMap[val]
       this.row = row.row //要操作的列号
       this.messKey = val //要操作的列类型
+      if (!inputData.Editable) {
+        this.$message("该信息点的值为自动生成,不可人工维护!");
+        return false;
+      }
       //点击关联的元空间
       // if (val === "SpaceCount") {
       //   this.isTableRightShow = true;

+ 19 - 0
src/views/ledger/facility/addfacility.vue

@@ -120,6 +120,15 @@ export default {
         changeRea: false,
         lookPic: false //图片查看
       },
+      inputMap: {
+        flowBuild: {
+          InputMode: 'D1',
+          Editable: true,
+          InfoPointCode: 'flowBuild',
+          InfoPointName: '建筑楼层',
+          Path: 'flowBuild',
+        },
+      }, //信息点和输入方式映射表
       qrcodeUrl: "", //二维码图片地址
       filesArr: [], //保存临时的文件key
       imgsArr: [], //临时保存的图片key数组
@@ -213,6 +222,11 @@ export default {
       };
       await getDataDictionary(params, res => {
         this.tableHeader = res.Content;
+        this.tableHeader.forEach((item) => {
+            if (item.Path) {
+                this.inputMap[item.Path] = item
+            }
+        })
         this.initTable();
       });
     },
@@ -535,6 +549,7 @@ export default {
     },
     getInfors(infos, row) {
       let val = this.tableExample.colToProp(row.col);
+      let inputData = this.inputMap[val]
       switch (val) {
         //操作
         case 'caozuo':
@@ -708,6 +723,10 @@ export default {
         default:
           break;
       }
+      if (!inputData.Editable) {
+        this.$message('该信息点的值为自动生成,不可人工维护!')
+        return false
+      }
       this.row = row.row;
       this.messKey = val;
     },

+ 19 - 0
src/views/ledger/property/addproperty.vue

@@ -102,6 +102,15 @@ export default {
         details: false, //详情页
         lookPic: false //图片查看
       },
+      inputMap: {
+        flowBuild: {
+        InputMode: 'D1',
+        Editable:true,
+        InfoPointCode:"flowBuild",
+        InfoPointName:"建筑楼层",
+        Path:"flowBuild"
+        }
+      }, //信息点和输入方式映射表
       qrcodeUrl: "", //二维码图片地址
       filesArr: [], //保存临时的文件key
       imgsArr: [], //临时保存的图片key数组
@@ -134,6 +143,11 @@ export default {
       };
       await getDataDictionary(params, res => {
         this.tableHeader = res.Content;
+        this.tableHeader.forEach(item => {
+            if (item.Path) {
+                this.inputMap[item.Path] = item
+            }
+        })
         this.initTable();
       });
     },
@@ -395,6 +409,7 @@ export default {
     },
     getInfors(infos, row) {
       let val = this.tableExample.colToProp(row.col);
+      let inputData = this.inputMap[val];
       switch (val) {
         //品牌型号弹窗
         case 'DPManufacturerID':
@@ -487,6 +502,10 @@ export default {
         default:
           break;
       }
+      if (!inputData.Editable) {
+        this.$message("该信息点的值为自动生成,不可人工维护!");
+        return false;
+      }
       this.row = row.row;
       this.messKey = val;
     },

+ 19 - 0
src/views/ledger/rentlist/rentadd/index.vue

@@ -51,6 +51,15 @@ export default {
         { value: "all", label: '全部' }, 
         { value: "Visible", label: '只看采集信息' }
       ],
+      inputMap: {
+        FloorId: {
+          InputMode: 'B1',
+          Editable:true,
+          InfoPointCode:"FloorId",
+          InfoPointName:"所属楼层",
+          Path:"FloorId"
+        }
+      }, //信息点和输入方式映射表
       showType: this.$route.query.showType,
       tableHeader: [],
       tableData: session.get("rentAddData")? session.get("rentAddData").length? session.get("rentAddData"): [{}]: [{}],
@@ -79,6 +88,11 @@ export default {
       }
       await getDataDictionary(param, res => {
         this.tableHeader = res.Content
+        this.tableHeader.forEach(item => {
+          if (item.Path) {
+            this.inputMap[item.Path] = item
+          }
+        })
         this.initTable()
       })
     },
@@ -195,8 +209,13 @@ export default {
     getInfors(infos, row) {
       //其他的开始判断
       let val = this.tableExample.colToProp(row.col);
+      let inputData = this.inputMap[val]
       this.row = row.row //要操作的列号
       this.messKey = val //要操作的列类型
+      if (!inputData.Editable) {
+        this.$message("该信息点的值为自动生成,不可人工维护!");
+        return false;
+      }
       //点击关联的元空间
       // if (val === "SpaceCount") {
       //   this.isTableRightShow = true;

+ 19 - 0
src/views/ledger/system/addsystem.vue

@@ -88,6 +88,15 @@ export default {
         changeRea: false,
         lookPic: false //图片查看
       },
+      inputMap: {
+        flowBuild: {
+          InputMode: 'D1',
+          Editable: true,
+          InfoPointCode: "flowBuild",
+          InfoPointName: "建筑楼层",
+          Path: "flowBuild"
+        }
+      }, //信息点和输入方式映射表
       qrcodeUrl: "", //二维码图片地址
       filesArr: [], //保存临时的文件key
       imgsArr: [], //临时保存的图片key数组
@@ -160,6 +169,11 @@ export default {
       };
       await getDataDictionary(params, res => {
         this.tableHeader = res.Content;
+        this.tableHeader.forEach(item => {
+            if (item.Path) {
+                this.inputMap[item.Path] = item
+            }
+        })
         this.initTable();
       });
     },
@@ -344,6 +358,7 @@ export default {
     },
     getInfors(infos, row) {
       let val = this.tableExample.colToProp(row.col);
+      let inputData = this.inputMap[val];
       this.row = row.row;
       this.messKey = val;
       switch (val) {
@@ -376,6 +391,10 @@ export default {
         default:
           break;
       }
+      if (!inputData.Editable) {
+        this.$message("该信息点的值为自动生成,不可人工维护!");
+        return false;
+      }
     },
     //建筑楼层
     relateSuccess(data) {