Selaa lähdekoodia

修改台账bug

zhangyu 4 vuotta sitten
vanhempi
commit
8c69947c87

+ 1 - 238
src/components/ledger/handsontables/assets.vue

@@ -22,16 +22,6 @@
       </el-button>
     </div>
     <qrcode :qrcodeUrl="qrcodeUrl" :dialog="myDialog" :addBody="true" ref="qrcode"/>
-    <firm
-      :firmDataType="firmDataType"
-      ref="firm"
-      :mess="mess"
-      @changeFirm="firmChange"
-      :dialog="myDialog"
-    />
-    <supply-dialog @change="supplyChange" ref="supply" :id="id" :dialog="myDialog"/>
-    <supplier-dialog :firmDataType="firmDataType" ref="supplier" @changeSupplier="supplierChange" :dialog="myDialog"/>
-    <guarantee-dialog @change="guaranteeChange" :id="id" ref="guarantee" :dialog="myDialog"/>
     <upload-files-dialog
       :read="onlyRead ? true : false"
       ref="upload"
@@ -49,18 +39,6 @@
       :firmDataType="firmDataType"
       :infoType="infoType"
     />
-    <maintainer-dialog
-      @changeMaintainer="changeMaintainer"
-      ref="maintainer"
-      :dialog="myDialog"
-      :firmDataType="firmDataType"
-    />
-    <insurer-dialog
-      @changeInsurer="changeInsurer"
-      ref="insurer"
-      :dialog="myDialog"
-      :firmDataType="firmDataType"
-    />
     <pic-dialog
       :read="onlyRead ? true : false"
       :dialog="myDialog"
@@ -156,25 +134,11 @@ import tools from "@/utils/scan/tools"
 import handsonUtils from "@/utils/scan/hasontableUtils"
 import showTools from "@/utils/handsontable/notShow"
 import buildFloor from '@/utils/handsontable/buildFloorData'
-import firm from "@/components/dialogs/list/firm"
-import supplierDialog from "@/components/dialogs/list/supplierDialog"
 import uploadFilesDialog from "@/components/dialogs/list/filesDialog"
 import uploadImgDialog from "@/components/dialogs/list/uploadImgDialog"
-import maintainerDialog from "@/components/dialogs/list/maintainerDialog"
-import insurerDialog from "@/components/dialogs/list/insurerDialog"
 import picDialog from "@/components/dialogs/list/picDialog"
 
 import qrcode from "@/components/business_space/lib/qrcode"
-// import firm from "@/components/business_space/dialogs/list/firm"
-import supplyDialog from "@/components/business_space/dialogs/list/supplyDialog"
-// import supplierDialog from "@/components/business_space/dialogs/list/supplierDialog"
-// import maintainerDialog from "@/components/business_space/dialogs/list/maintainerDialog"
-// import insurerDialog from "@/components/business_space/dialogs/list/insurerDialog"
-import guaranteeDialog from "@/components/business_space/dialogs/list/guaranteeDialog"
-// import uploadFilesDialog from "@/components/business_space/dialogs/list/filesDialog"
-// import uploadImgDialog from "@/components/business_space/dialogs/list/uploadImgDialog"
-// import detailsDialog from "@/components/business_space/lib/detailsDia"
-// import picDialog from "@/components/business_space/dialogs/list/picDialog"
 import myPagination from "@/components/common/myPagination"
 import myCascader from "@/components/ledger/lib/assets"
 import floorCascader from "@/components/ledger/lib/floorCascader"
@@ -193,13 +157,7 @@ import dataTypeMap from "@/utils/handsontable/dataTypeMap"
 export default {
   components: {
     qrcode, //二维码页面
-    firm, //
-    supplyDialog,
-    supplierDialog,
-    guaranteeDialog,
     uploadFilesDialog,
-    maintainerDialog,
-    insurerDialog,
     uploadImgDialog,
     picDialog,
     myPagination,
@@ -219,7 +177,7 @@ export default {
     showTypes() {
       return this.onlyRead ?
         [{ value: "Visible", label: '只看采集信息' }, { value: "all", label: '全部' }] :
-        [{ value: "partInfo", label: '隐藏信息点' }, { value: "Visible", label: '只看采集信息' }, { value: "all", label: '全部' }]
+        [{ value: "Visible", label: '只看采集信息' }, { value: "all", label: '全部' }]
     }
   },
   data() {
@@ -254,12 +212,6 @@ export default {
       },
       myDialog: {
         qrcode: false, //二维码弹窗
-        firm: false, //厂商弹窗
-        supply: false, //选择供应合同
-        supplier: false, //供应商选择
-        guarantee: false, //选择保单
-        maintainer: false, //选择维修商
-        insurer: false, //选择保险公司
         uploadFiles: false,//上传文件
         uploadImgs: false,//上传单个图片
         pic: false, //多个图片
@@ -918,62 +870,6 @@ export default {
             this.myDialog.changeRea = true;
           }
           return false
-        //品牌型号弹窗
-        case 'dpManufacturerId':
-          if (!this.onlyRead) {
-            this.myDialog.firm = true;
-          }
-          return false
-        //供应商信息弹窗
-        case 'dpSupplierId':
-          if (!this.onlyRead) {
-            this.myDialog.supplier = true;
-          }
-          return false
-        //维修商信息弹窗
-        case 'dpMaintainerId':
-          if (!this.onlyRead) {
-            this.myDialog.maintainer = true;
-          }
-          return false
-        //保险公司信息
-        case 'dpInsurerId':
-          if (!this.onlyRead) {
-            this.myDialog.insurer = true;
-          }
-          return false
-        //供应合同编号
-        case 'infos.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 'infos.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 'infos.insuranceFile': //保险文件
         case 'infos.archive': //设备文档
@@ -1072,139 +968,6 @@ export default {
       }
       return a;
     },
-    //如果选择供应商之后
-    supplierChange(data, type) {
-      if (type === 'dialog') {
-        let firm = { ...data, num: 8 }
-        this.firmName = firm
-      } else {
-        tools.setDataForKey(this.tableData[this.row], "dpSupplierId", data.venderId)
-        tools.setDataForKey(this.tableData[this.row], "infos.supplier", data.name)
-        tools.setDataForKey(this.tableData[this.row], 'infos.supplierPhone', data.contacts[0]?data.contacts[0].phone:null)
-        tools.setDataForKey(this.tableData[this.row], 'infos.supplierContactor', data.contacts[0]?data.contacts[0].name:null)
-        tools.setDataForKey(this.tableData[this.row], 'infos.supplierWeb', data.website?data.website:null)
-        tools.setDataForKey(this.tableData[this.row], 'infos.supplierEmail', data.contacts[0]?data.contacts[0].email:null)
-        tools.setDataForKey(this.tableData[this.row], 'infos.supplierFax', data.contacts[0]?data.contacts[0].fax:null)
-        this.handleUpdataTable(
-          [
-            [this.row, "dpSupplierId", null, data.venderId],
-            [this.row, "infos.supplier", null, data.name],
-            [this.row, 'infos.supplierPhone', null, data.contacts[0]?data.contacts[0].phone:null],
-            [this.row, 'infos.supplierContactor', null, data.contacts[0]?data.contacts[0].name:null],
-            [this.row, 'infos.supplierWeb', null, data.website?data.website:null],
-            [this.row, 'infos.supplierEmail', null, data.contacts[0]?data.contacts[0].email:null],
-            [this.row, 'infos.supplierFax', null, data.contacts[0]?data.contacts[0].fax:null],
-          ],
-          "edit"
-        )
-        // this.handleUpdataTable([[this.row, "LedgerParam.SupplyPurchase.Supplier", null, data.name]], "edit")
-      }
-    },
-    //供应合同编号
-    supplyChange(data) {
-      tools.setDataForKey(this.tableData[this.row], "infos.supplierContractID", { id: data })
-    },
-    //保险单号-保险文件
-    guaranteeChange(data) {
-      for (let key in data) {
-        this.utilToKey(key, "insuranceNo", data, "insuranceNum")
-        if (key == "contractFile") {
-          if (!!data[key]) {
-            data[key] = [data[key]]
-          }
-        }
-        this.utilToKey(key, "contractFile", data, "insuranceFile")
-      }
-    },
-    //选择型号修改
-    firmChange(data, type) {
-      if (type === 'dialog') { // 如果是批量信息维护
-        let venderName = data.venderName ? data.venderName : '空'
-        let brandName = data.brandName ? data.brandName : '空'
-        let name = data.name ? data.name : '空'
-        let firm = {
-          ...data,
-          num: 2,
-          Specification: data.name,
-          name: `${venderName}/${brandName}/${name}`
-        }
-        this.firmName = firm //批量维护dialog显示对象的字段
-      } else {
-        tools.setDataForKey(this.tableData[this.row], "dpManufacturerId", data.venderId)//生产商ID
-        tools.setDataForKey(this.tableData[this.row], "dpBrandId", data.brandId)//品牌ID
-        tools.setDataForKey(this.tableData[this.row], "dpSpecificationId", data.specificationId)//型号ID
-        tools.setDataForKey(this.tableData[this.row], "infos.manufacturer", data.venderName)
-        tools.setDataForKey(this.tableData[this.row], "infos.brand", data.brandName)
-        tools.setDataForKey(this.tableData[this.row], "infos.specification", data.name)
-        this.handleUpdataTable(
-          [
-            [this.row, "dpManufacturerId", null, data.venderId],
-            [this.row, "dpBrandId", null, data.brandId],
-            [this.row, "dpSpecificationId", null, data.specificationId],
-            [this.row, "infos.manufacturer", null, data.venderName],
-            [this.row, "infos.brand", null, data.brandName],
-            [this.row, "infos.specification", null, data.name]
-          ],
-          "edit"
-        )
-        // this.handleUpdataTable([[this.row, "LedgerParam.equipManufactor.Brand", null, data.brand]], "edit")
-        // this.handleUpdataTable([[this.row, "LedgerParam.equipManufactor.Specification", null, data.name]], "edit")
-      }
-    },
-    //保险商变更
-    changeInsurer(data, type) {
-      if (type === 'dialog') {
-        let firm = { ...data, num: 42 }
-        this.firmName = firm
-      } else {
-        tools.setDataForKey(this.tableData[this.row], "dpInsurerId", data.venderId)
-        tools.setDataForKey(this.tableData[this.row], "infos.insurer", data.name)
-        tools.setDataForKey(this.tableData[this.row], 'infos.insurerWeb', data.website?data.website:null)
-        tools.setDataForKey(this.tableData[this.row], 'infos.insurerEmail', data.contacts[0]?data.contacts[0].email:null)
-        tools.setDataForKey(this.tableData[this.row], 'infos.insurerFax', data.contacts[0]?data.contacts[0].fax:null)
-        tools.setDataForKey(this.tableData[this.row], 'infos.insurerPhone', data.contacts[0]?data.contacts[0].phone:null)
-        tools.setDataForKey(this.tableData[this.row], 'infos.insurerContactor', data.contacts[0]?data.contacts[0].name:null)
-        this.handleUpdataTable(
-          [
-            [this.row, "dpInsurerId", null, data.venderId],
-            [this.row, "infos.insurer", null, data.name],
-            [this.row, 'infos.insurerWeb', null, data.website?data.website:null],
-            [this.row, 'infos.insurerEmail', null, data.contacts[0]?data.contacts[0].email:null],
-            [this.row, 'infos.insurerFax', null, data.contacts[0]?data.contacts[0].fax:null],
-            [this.row, 'infos.insurerPhone', null, data.contacts[0]?data.contacts[0].phone:null],
-            [this.row, 'infos.insurerContactor', null, data.contacts[0]?data.contacts[0].name:null],
-          ],
-          "edit"
-        )
-      }
-    },
-    //维修商变更
-    changeMaintainer(data, type) {
-      if (type === 'dialog') {
-        let firm = { ...data, num: 35 }
-        this.firmName = firm
-      } else {
-        tools.setDataForKey(this.tableData[this.row], "dpMaintainerId", data.venderId)
-        tools.setDataForKey(this.tableData[this.row], "infos.maintainer", data.name)
-        tools.setDataForKey(this.tableData[this.row], 'infos.maintainerWeb', data.website?data.website:null)
-        tools.setDataForKey(this.tableData[this.row], 'infos.maintainerContactor', data.contacts[0]?data.contacts[0].name:null)
-        tools.setDataForKey(this.tableData[this.row], 'infos.maintainerPhone', data.contacts[0]?data.contacts[0].phone:null)
-        tools.setDataForKey(this.tableData[this.row], 'infos.maintainerEmail', data.contacts[0]?data.contacts[0].email:null)
-        tools.setDataForKey(this.tableData[this.row], 'infos.maintainerFax', data.contacts[0]?data.contacts[0].fax:null)
-        this.handleUpdataTable(
-          [
-            [this.row, "dpMaintainerId", null, data.venderId],
-            [this.row, "infos.maintainer", null, data.name],
-            [this.row, 'infos.maintainerWeb', null, data.website?data.website:null],
-            [this.row, 'infos.maintainerContactor', null, data.contacts[0]?data.contacts[0].name:null],
-            [this.row, 'infos.maintainerPhone', null, data.contacts[0]?data.contacts[0].phone:null],
-            [this.row, 'infos.maintainerEmail', null, data.contacts[0]?data.contacts[0].email:null],
-            [this.row, 'infos.maintainerFax', null, data.contacts[0]?data.contacts[0].fax:null],
-          ],
-          "edit"
-        )
-      }
-    },
     //修改关联的资产
     changeProperty(val) {
       this.setDataToMain(val.propertyId, 'propertyId', this.row);

+ 22 - 229
src/components/ledger/handsontables/device.vue

@@ -27,15 +27,6 @@
     <!-- bim坐标弹框 -->
     <bimDialog :dialog="myDialog" :bimcodeobj="bimcodeobj" @closeBIM="closeBIM" :addBody="true"
                ref="bimdialog"></bimDialog>
-    <!-- 型号弹窗 -->
-    <firm :mess="{ deviceId: deviceType.assetType }" :firmDataType="firmDataType" ref="firm" @changeFirm="firmChange"
-          :dialog="myDialog"></firm>
-    <!-- 供应商合同弹窗 -->
-    <supply-dialog ref="supply" @change="supplyChange" :id="id" :dialog="myDialog"/>
-    <!-- 供应商弹窗 -->
-    <supplier-dialog ref="supplier" :firmDataType="firmDataType" @changeSupplier="supplierChange" :dialog="myDialog"/>
-
-    <guarantee-dialog :id="id" ref="guarantee" @change="guaranteeChange" :dialog="myDialog"/>
     <!--      上传文件-->
     <upload-files-dialog :read="onlyRead ? true : false" ref="upload" @changeFile="fileChange" :keysArr="filesArr"
                          :firmDataType="firmDataType"
@@ -44,10 +35,6 @@
     <upload-img-dialog :read="onlyRead ? true : false" @changeFile="imgChange" :keysArr="imgsArr" :dialog="myDialog"
                        :firmDataType="firmDataType"
                        :information="information" :infoType="infoType"/>
-    <!--      维修商信息-->
-    <maintainer-dialog @changeMaintainer="changeMaintainer" :firmDataType="firmDataType" ref="maintainer"
-                       :dialog="myDialog"/>
-    <insurer-dialog @changeInsurer="changeInsurer" :firmDataType="firmDataType" ref="insurer" :dialog="myDialog"/>
     <pic-dialog :read="onlyRead ? true : false" :dialog="myDialog" :keysArr="picsArr" @change="changePics"
                 :firmDataType="firmDataType"
                 :information="information" :infoType="infoType"/>
@@ -125,12 +112,6 @@ import buildFloor from "@/utils/handsontable/buildFloorData";
 
 import qrcode from "@/components/ledger/lib/qrcode";
 import bimDialog from "@/components/ledger/lib/bimDialog";
-import firm from "@/components/dialogs/list/firm";
-import supplyDialog from "@/components/dialogs/list/supplyDialog";
-import supplierDialog from "@/components/dialogs/list/supplierDialog";
-import maintainerDialog from "@/components/dialogs/list/maintainerDialog";
-import insurerDialog from "@/components/dialogs/list/insurerDialog";
-import guaranteeDialog from "@/components/dialogs/list/guaranteeDialog";
 import uploadFilesDialog from "@/components/dialogs/list/filesDialog";
 import uploadImgDialog from "@/components/dialogs/list/uploadImgDialog";
 import picDialog from "@/components/dialogs/list/picDialog";
@@ -154,13 +135,7 @@ export default {
   props: ["myParam"],
   components: {
     qrcode, //二维码页面
-    firm, //
-    supplyDialog,
-    supplierDialog,
-    guaranteeDialog,
     uploadFilesDialog,
-    maintainerDialog,
-    insurerDialog,
     uploadImgDialog,
     picDialog,
     myPagination,
@@ -184,7 +159,6 @@ export default {
           {value: "all", label: "全部"}
         ]
         : [
-          {value: "partInfo", label: "隐藏信息点"},
           {value: "all", label: "全部"},
           {value: "Visible", label: "只看采集信息"}
         ];
@@ -229,12 +203,6 @@ export default {
       myDialog: {
         qrcode: false, //二维码弹窗
         bimcode: false, //bim弹窗
-        firm: false, //厂商弹窗
-        supply: false, //选择供应合同
-        supplier: false, //供应商选择
-        guarantee: false, //选择保单
-        maintainer: false, //选择维修商
-        insurer: false, //选择保险公司
         uploadFiles: false, //上传文件
         uploadImgs: false, //上传单个图片
         pic: false, //多个图片
@@ -447,13 +415,6 @@ export default {
           cascade: [
             {
               name: "property"
-              //   projection: [
-              //     "Family",
-              //     "EquipLocalName",
-              //     "EquipLocalID",
-              //     "EquipID",
-              //     "CodeType"
-              //   ]
             },
             {
               Name: "building",
@@ -1193,62 +1154,29 @@ export default {
             this.myDialog.changeRea = true;
           }
           return false;
-        //品牌型号弹窗
-        case "dpManufacturerId":
-          if (!this.onlyRead) {
-            this.myDialog.firm = true;
-          }
-          return false;
-        //供应商信息弹窗
-        case "dpSupplierId":
-          if (!this.onlyRead) {
-            this.myDialog.supplier = true;
-          }
-          return false;
-        //维修商信息弹窗
-        case "dpMaintainerId":
-          if (!this.onlyRead) {
-            this.myDialog.maintainer = true;
-          }
-          return false;
-        //保险公司信息
-        case "dpInsurerId":
-          if (!this.onlyRead) {
-            this.myDialog.insurer = true;
-          }
-          return false;
-        //供应合同编号(B1)
-        case "infos.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;
-        //保险单号(B1)
-        case "infos.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("请先选择保险商");
+        /**
+         * 关联资产后才可维护的信息点
+         */
+        case 'flowBuild': //所属建筑楼层
+        case 'infos.productDate': //生产日期
+        case 'infos.serialNum': //出厂编号
+        case 'infos.assetID': //资产编号
+        case 'infos.purchasePrice': //采购价格
+        case 'infos.insuranceNum': //保险单号
+        case 'infos.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;
+            return false;
         //保险文件--设备文档--安装质检报告
         case "infos.insuranceFile": //保险文件(F2)
         case "infos.archive": //设备文档(F2)
@@ -1303,8 +1231,6 @@ export default {
         default:
           break;
       }
-      console.log(inputData);
-      console.log('====================');
       if (!this.onlyRead && !inputData.editable) {
         this.$message("该信息点的值为自动生成,不可人工维护!");
         return false;
@@ -1367,139 +1293,6 @@ export default {
       }
       return a;
     },
-    //如果选择供应商之后
-    supplierChange(data, type) {
-      if (type === "dialog") {
-        let firm = {...data, num: 8};
-        this.firmName = firm;
-      } else {
-        tools.setDataForKey(this.tableData[this.row], "dpSupplierId", data.venderId);
-        tools.setDataForKey(this.tableData[this.row], "infos.supplier", data.name);
-        tools.setDataForKey(this.tableData[this.row], 'infos.supplierPhone', data.contacts[0] ? data.contacts[0].phone : null)
-        tools.setDataForKey(this.tableData[this.row], 'infos.supplierContactor', data.contacts[0] ? data.contacts[0].name : null)
-        tools.setDataForKey(this.tableData[this.row], 'infos.supplierWeb', data.website ? data.website : null)
-        tools.setDataForKey(this.tableData[this.row], 'infos.supplierEmail', data.contacts[0] ? data.contacts[0].email : null)
-        tools.setDataForKey(this.tableData[this.row], 'infos.supplierFax', data.contacts[0] ? data.contacts[0].fax : null)
-        this.handleUpdataTable(
-          [
-            [this.row, "dpSupplierId", null, data.venderId],
-            [this.row, "infos.supplier", null, data.name],
-            [this.row, 'infos.supplierPhone', null, data.contacts[0] ? data.contacts[0].phone : null],
-            [this.row, 'infos.supplierContactor', null, data.contacts[0] ? data.contacts[0].name : null],
-            [this.row, 'infos.supplierWeb', null, data.website ? data.website : null],
-            [this.row, 'infos.supplierEmail', null, data.contacts[0] ? data.contacts[0].email : null],
-            [this.row, 'infos.supplierFax', null, data.contacts[0] ? data.contacts[0].fax : null],
-          ],
-          "edit"
-        );
-      }
-    },
-    //供应合同编号
-    supplyChange(data) {
-      tools.setDataForKey(this.tableData[this.row], "infos.supplierContractID", {id: data});
-    },
-    //保险单号-保险文件
-    guaranteeChange(data) {
-      for (let key in data) {
-        this.utilToKey(key, "insuranceNo", data, "InsuranceNum");
-        if (key == "contractFile") {
-          if (!!data[key]) {
-            data[key] = [data[key]];
-          }
-        }
-        this.utilToKey(key, "contractFile", data, "InsuranceFile");
-      }
-    },
-    //选择型号修改
-    firmChange(data, type) {
-      if (type === "dialog") {
-        // 如果是批量信息维护
-        let venderName = data.venderName ? data.venderName : "空";
-        let brandName = data.brandName ? data.brandName : "空";
-        let name = data.name ? data.name : "空";
-        let firm = {
-          ...data,
-          num: 2,
-          Specification: data.name,
-          name: `${venderName}/${brandName}/${name}`
-        };
-        this.firmName = firm; //批量维护dialog显示对象的字段
-      } else {
-        //如果是表格操作
-        tools.setDataForKey(this.tableData[this.row], "dpManufacturerId", data.venderId); //生产商ID
-        tools.setDataForKey(this.tableData[this.row], "dpBrandId", data.brandId); //品牌ID
-        tools.setDataForKey(this.tableData[this.row], "dpSpecificationId", data.specificationId); //型号ID
-        tools.setDataForKey(this.tableData[this.row], "testReport", data.venderName);
-        tools.setDataForKey(this.tableData[this.row], "infos.manufacturer", data.venderName);
-        tools.setDataForKey(this.tableData[this.row], "infos.brand", data.name);
-        tools.setDataForKey(this.tableData[this.row], "infos.specification", data.brandName);
-        this.handleUpdataTable(
-          [
-            [this.row, "dpManufacturerId", null, data.venderId],
-            [this.row, "dpBrandId", null, data.brandId],
-            [this.row, "dpSpecificationId", null, data.specificationId],
-            [this.row, "infos.manufacturer", null, data.venderName],
-            [this.row, "infos.brand", null, data.brandName],
-            [this.row, "infos.specification", null, data.name]
-          ],
-          "edit"
-        );
-      }
-    },
-    //保险商变更
-    changeInsurer(data, type) {
-      if (type === "dialog") {
-        let firm = {...data, num: 42};
-        this.firmName = firm;
-      } else {
-        tools.setDataForKey(this.tableData[this.row], "dpInsurerId", data.venderId);
-        tools.setDataForKey(this.tableData[this.row], "infos.insurer", data.name);
-        tools.setDataForKey(this.tableData[this.row], 'infos.insurerWeb', data.website ? data.website : null)
-        tools.setDataForKey(this.tableData[this.row], 'infos.insurerEmail', data.contacts[0] ? data.contacts[0].email : null)
-        tools.setDataForKey(this.tableData[this.row], 'infos.insurerFax', data.contacts[0] ? data.contacts[0].fax : null)
-        tools.setDataForKey(this.tableData[this.row], 'infos.insurerPhone', data.contacts[0] ? data.contacts[0].phone : null)
-        tools.setDataForKey(this.tableData[this.row], 'infos.insurerContactor', data.contacts[0] ? data.contacts[0].name : null)
-        this.handleUpdataTable(
-          [
-            [this.row, "dpInsurerId", null, data.venderId],
-            [this.row, "infos.insurer", null, data.name],
-            [this.row, 'infos.insurerWeb', null, data.website ? data.website : null],
-            [this.row, 'infos.insurerEmail', null, data.contacts[0] ? data.contacts[0].email : null],
-            [this.row, 'infos.insurerFax', null, data.contacts[0] ? data.contacts[0].fax : null],
-            [this.row, 'infos.insurerPhone', null, data.contacts[0] ? data.contacts[0].phone : null],
-            [this.row, 'infos.insurerContactor', null, data.contacts[0] ? data.contacts[0].name : null],
-          ],
-          "edit"
-        );
-      }
-    },
-    //维修商变更
-    changeMaintainer(data, type) {
-      if (type === "dialog") {
-        let firm = {...data, num: 35};
-        this.firmName = firm;
-      } else {
-        tools.setDataForKey(this.tableData[this.row], "dpMaintainerId", data.venderId);
-        tools.setDataForKey(this.tableData[this.row], "infos.maintainer", data.name);
-        tools.setDataForKey(this.tableData[this.row], 'infos.maintainerWeb', data.website ? data.website : null)
-        tools.setDataForKey(this.tableData[this.row], 'infos.maintainerContactor', data.contacts[0] ? data.contacts[0].name : null)
-        tools.setDataForKey(this.tableData[this.row], 'infos.maintainerPhone', data.contacts[0] ? data.contacts[0].phone : null)
-        tools.setDataForKey(this.tableData[this.row], 'infos.maintainerEmail', data.contacts[0] ? data.contacts[0].email : null)
-        tools.setDataForKey(this.tableData[this.row], 'infos.maintainerFax', data.contacts[0] ? data.contacts[0].fax : null)
-        this.handleUpdataTable(
-          [
-            [this.row, "dpMaintainerId", null, data.venderId],
-            [this.row, "infos.maintainer", null, data.name],
-            [this.row, 'infos.maintainerWeb', null, data.website ? data.website : null],
-            [this.row, 'infos.maintainerContactor', null, data.contacts[0] ? data.contacts[0].name : null],
-            [this.row, 'infos.maintainerPhone', null, data.contacts[0] ? data.contacts[0].phone : null],
-            [this.row, 'infos.maintainerEmail', null, data.contacts[0] ? data.contacts[0].email : null],
-            [this.row, 'infos.maintainerFax', null, data.contacts[0] ? data.contacts[0].fax : null],
-          ],
-          "edit"
-        );
-      }
-    },
     //修改关联的资产
     changeProperty(val) {
       this.setDataToMain(val.propertyId, "propertyId", this.row);

+ 0 - 6
src/components/ledger/handsontables/system.vue

@@ -130,12 +130,6 @@ export default {
       },
       myDialog: {
         qrcode: false, //二维码弹窗
-        firm: false, //厂商弹窗
-        supply: false, //选择供应合同
-        supplier: false, //供应商选择
-        guarantee: false, //选择保单
-        maintainer: false, //选择维修商
-        insurer: false, //选择保险公司
         uploadFiles: false,//上传文件
         uploadImgs: false,//上传单个图片
         pic: false, //多个图片

+ 0 - 1
src/utils/handsontable/notShow.js

@@ -336,7 +336,6 @@ const showTools = {
     }
   },
   textFormat(item, onlyRead) {
-    console.log(item.path);
     if (
       // item.code == "EquipQRCode" ||
       // item.code == "RoomQRCode"

+ 21 - 1
src/views/ledger/cenotelist/cenoteadd/index.vue

@@ -51,6 +51,16 @@ export default {
       relationids: "",
       onlyRead: false,
       showTypes: [{ value: "Visible", label: '只看采集信息' }, { value: "all", label: '全部' }],
+      inputMap: {
+        flowBuild: {
+          editable: true,
+          code: "flowBuild",
+          name: "建筑楼层",
+          path: "flowBuild",
+          category: 'STATIC',
+          dataType: "ENUM"
+        }
+      }, //信息点和输入方式映射表
       showType: this.$route.query.showType,
       tableHeader: [],
       tableData: session.get("cenoteAddData") ? session.get("cenoteAddData").length ? session.get("cenoteAddData") : [{}] : [{}],
@@ -76,7 +86,12 @@ export default {
         type: 'shaft'
       }
       await getDataDictionary(param, res => {
-        this.tableHeader = res.content
+        this.tableHeader = res.content;
+        this.tableHeader.forEach(item => {
+          if (item.path) {
+            this.inputMap[item.path] = item;
+          }
+        })
         this.initTable()
       })
     },
@@ -198,8 +213,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 (!this.onlyRead && !inputData.editable) {
+        this.$message("该信息点的值为自动生成,不可人工维护!");
+        return false;
+      }
       //点击关联的元空间
       // if (val === "SpaceCount") {
       //   this.isTableRightShow = true;

+ 48 - 174
src/views/ledger/facility/addfacility.vue

@@ -1,9 +1,6 @@
 <template>
   <div id="deviceList">
     <el-row class="right">
-      <!-- <span style="width:20px;float:left;display:block;height:20px;cursor: pointer;" @click="changeAssetsFalg">
-        <i class="el-icon-fa  el-icon-fa-compass"></i>
-      </span> -->
       <span style="float:left;">当前选择的设备类型:{{ category.name }}</span>
       <el-select v-model="showType" @change="initTable" style="width:125px;margin-right:10px;vertical-align:bottom;">
         <el-option v-for="item in showTypes" :key="item.value" :label="item.label" :value="item.value"></el-option>
@@ -29,20 +26,11 @@
     </el-row>
     <!-- 二维码弹窗 -->
     <qrcode :dialog="myDialog" :qrcodeUrl="qrcodeUrl" :addBody="true" ref="qrcode"></qrcode>
-    <!-- 型号弹窗 -->
-    <firm :mess="{deviceId: firmId}" ref="firm" @changeFirm="firmChange" :dialog="myDialog"></firm>
-    <!-- 供应商合同弹窗 -->
-    <supply-dialog ref="supply" @change="supplyChange" :id="id" :dialog="myDialog"></supply-dialog>
-    <!-- 供应商弹窗 -->
-    <supplier-dialog ref="supplier" @changeSupplier="supplierChange" :dialog="myDialog"></supplier-dialog>
-    <guarantee-dialog :id="id" ref="guarantee" @change="guaranteeChange" :dialog="myDialog"></guarantee-dialog>
     <upload-files-dialog :read="onlyRead ? true : false" ref="upload" @changeFile="fileChange" :keysArr="filesArr"
                          :dialog="myDialog">
     </upload-files-dialog>
     <upload-img-dialog :read="onlyRead ? true : false" @changeFile="imgChange" :keysArr="imgsArr"
                        :dialog="myDialog"></upload-img-dialog>
-    <maintainer-dialog @changeMaintainer="changeMaintainer" ref="maintainer" :dialog="myDialog"></maintainer-dialog>
-    <insurer-dialog @changeInsurer="changeInsurer" ref="insurer" :dialog="myDialog"></insurer-dialog>
     <pic-dialog :read="onlyRead ? true : false" :dialog="myDialog" :keysArr="picsArr" @change="changePics"></pic-dialog>
     <system-type :device="category" :dialog="myDialog" :type="onlyRead?'read':'edit'" @change="changeSystemType"
                  :list="systemList"></system-type>
@@ -70,12 +58,6 @@ import { getDataDictionary } from "@/api/dict";
 import { mapGetters, mapActions } from "vuex";
 
 import qrcode from "@/components/ledger/lib/qrcode";
-import firm from "@/components/dialogs/list/firm";
-import supplyDialog from "@/components/dialogs/list/supplyDialog";
-import supplierDialog from "@/components/dialogs/list/supplierDialog";
-import maintainerDialog from "@/components/dialogs/list/maintainerDialog";
-import insurerDialog from "@/components/dialogs/list/insurerDialog";
-import guaranteeDialog from "@/components/dialogs/list/guaranteeDialog";
 import uploadFilesDialog from "@/components/dialogs/list/filesDialog";
 import uploadImgDialog from "@/components/dialogs/list/uploadImgDialog";
 import picDialog from "@/components/dialogs/list/picDialog";
@@ -84,12 +66,6 @@ import systemType from "@/components/dialogs/list/systemType";
 export default {
   components: {
     qrcode, //二维码页面
-    firm, //品牌型号弹窗
-    supplyDialog,
-    supplierDialog,
-    maintainerDialog,
-    insurerDialog,
-    guaranteeDialog,
     uploadFilesDialog,
     uploadImgDialog,
     picDialog,
@@ -100,10 +76,10 @@ export default {
     return {
       addNum: 1,
       onlyRead: false,
-      showTypes: [{ value: "partInfo", label: '隐藏信息点' }, { value: "all", label: '全部' }, {
-        value: "Visible",
-        label: '只看采集信息'
-      }],
+      showTypes: [
+        { value: "all", label: '全部' },
+        { value: "Visible", label: '只看采集信息' }
+      ],
       tableHeader: [],
       tableData: session.get("deviceAddData")
         ? session.get("deviceAddData").length
@@ -114,12 +90,6 @@ export default {
       category: "", //当前设备类
       myDialog: {
         qrcode: false, //二维码弹窗
-        firm: false, //厂商弹窗
-        supply: false, //选择供应合同
-        supplier: false, //供应商选择
-        guarantee: false, //选择保单
-        maintainer: false, //选择维修商
-        insurer: false, //选择保险公司
         uploadFiles: false, //上传文件
         uploadImgs: false, //上传单个图片
         pic: false, //多个图片
@@ -129,6 +99,16 @@ export default {
         changeRea: false,
         lookPic: false //图片查看
       },
+      inputMap: {
+        flowBuild: {
+          editable: true,
+          code: "flowBuild",
+          name: "建筑楼层",
+          path: "flowBuild",
+          category: 'STATIC',
+          dataType: "ENUM"
+        }
+      }, //信息点和输入方式映射表
       qrcodeUrl: "", //二维码图片地址
       filesArr: [], //保存临时的文件key
       imgsArr: [], //临时保存的图片key数组
@@ -169,25 +149,6 @@ export default {
         }
       })
     },
-    //维护建筑
-    // changeAssetsFalg() {
-    //   if (this.floorFlag) {
-    //     this.floorFlag = false
-    //   } else {
-    //     this.$confirm('<p>维护设备所在建筑楼层后,对后续数据影响较大,如业务空间中的所在关系or其他?暂未梳理明白……</p><p>后续要修改设备所属建筑楼层,只能通过模型中的待建模清单操作</p>', '提示', {
-    //       dangerouslyUseHTMLString: true,
-    //       confirmButtonText: '就要维护设备所属建筑楼层',
-    //       cancelButtonText: '暂时不搞了',
-    //       confirmButtonClass: 'confirmButtonClass',
-    //       cancelButtonClass: 'cancelButtonClass'
-    //     }).then(_ => {
-    //       this.floorFlag = true
-    //       this.getTableHeader()
-    //     }).catch(_ => {
-    //       this.$message("取消")
-    //     })
-    //   }
-    // },
     //将数组转换成optiosn格式
     changeArr(arr) {
       return arr.map(item => {
@@ -222,6 +183,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();
       });
     },
@@ -429,40 +395,6 @@ export default {
       }
       return a;
     },
-    //选择型号修改
-    firmChange(data) {
-      tools.setDataForKey(this.tableData[this.row], "dpManufacturerId", data.venderId)//生产商ID
-      tools.setDataForKey(this.tableData[this.row], "dpBrandId", data.brandId)//品牌ID
-      tools.setDataForKey(this.tableData[this.row], "dpSpecificationId", data.specificationId)//型号ID
-      tools.setDataForKey(this.tableData[this.row], "infos.manufacturer", data.venderName)
-      tools.setDataForKey(this.tableData[this.row], "infos.brand", data.brandName)
-      tools.setDataForKey(this.tableData[this.row], "infos.specification", data.name)
-    },
-    supplyChange(data) {
-      tools.setDataForKey(this.tableData[this.row], "infos.supplierContractID", { id: data });
-    },
-    //如果选择供应商之后
-    supplierChange(data) {
-      tools.setDataForKey(this.tableData[this.row], "dpSupplierId", data.venderId)
-      tools.setDataForKey(this.tableData[this.row], "infos.supplier", data.name)
-      tools.setDataForKey(this.tableData[this.row], 'infos.supplierPhone', data.contacts[0]?data.contacts[0].phone:null)
-      tools.setDataForKey(this.tableData[this.row], 'infos.supplierContactor', data.contacts[0]?data.contacts[0].name:null)
-      tools.setDataForKey(this.tableData[this.row], 'infos.supplierWeb', data.website?data.website:null)
-      tools.setDataForKey(this.tableData[this.row], 'infos.supplierEmail', data.contacts[0]?data.contacts[0].email:null)
-      tools.setDataForKey(this.tableData[this.row], 'infos.supplierFax', data.contacts[0]?data.contacts[0].fax:null)
-    },
-    //保险合同
-    guaranteeChange(data) {
-      for (let key in data) {
-        this.utilToKey(key, "insuranceNo", data, "insuranceNum");
-        if (key == "contractFile") {
-          if (!!data[key]) {
-            data[key] = [data[key]];
-          }
-        }
-        this.utilToKey(key, "contractFile", data, "insuranceFile");
-      }
-    },
     //上传文件弹窗触发事件
     fileChange(keys) {
       this.setDataToMain(keys, this.messKey, this.row);
@@ -471,26 +403,6 @@ export default {
     imgChange(keys) {
       this.setDataToMain(keys, this.messKey, this.row);
     },
-    //维修商变更
-    changeMaintainer(data) {
-      tools.setDataForKey(this.tableData[this.row], "dpMaintainerId", data.venderId)
-      tools.setDataForKey(this.tableData[this.row], "infos.maintainer", data.name)
-      tools.setDataForKey(this.tableData[this.row], 'infos.maintainerWeb', data.website?data.website:null)
-      tools.setDataForKey(this.tableData[this.row], 'infos.maintainerContactor', data.contacts[0]?data.contacts[0].name:null)
-      tools.setDataForKey(this.tableData[this.row], 'infos.maintainerPhone', data.contacts[0]?data.contacts[0].phone:null)
-      tools.setDataForKey(this.tableData[this.row], 'infos.maintainerEmail', data.contacts[0]?data.contacts[0].email:null)
-      tools.setDataForKey(this.tableData[this.row], 'infos.maintainerFax', data.contacts[0]?data.contacts[0].fax:null)
-    },
-    //保险商变更
-    changeInsurer(data) {
-      tools.setDataForKey(this.tableData[this.row], "dpInsurerId", data.venderId)
-      tools.setDataForKey(this.tableData[this.row], "infos.insurer", data.name)
-      tools.setDataForKey(this.tableData[this.row], 'infos.insurerWeb', data.website?data.website:null)
-      tools.setDataForKey(this.tableData[this.row], 'infos.insurerEmail', data.contacts[0]?data.contacts[0].email:null)
-      tools.setDataForKey(this.tableData[this.row], 'infos.insurerFax', data.contacts[0]?data.contacts[0].fax:null)
-      tools.setDataForKey(this.tableData[this.row], 'infos.insurerPhone', data.contacts[0]?data.contacts[0].phone:null)
-      tools.setDataForKey(this.tableData[this.row], 'infos.insurerContactor', data.contacts[0]?data.contacts[0].name:null)
-    },
     //设备图片弹窗改变事件
     changePics(keys) {
       this.setDataToMain(keys, this.messKey, this.row);
@@ -545,22 +457,15 @@ 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) {
         //操作
         case 'caozuo':
           // window.open(`http://adm.sagacloud.cn:8058/spread?id=${infos.EquipID}&pid=${this.projectId}&secret=${this.secret}`,"_blank")
           this.$message("开发中...")
           break;
-        //设备二维码图片
-        // case 'EquipQRCode':
-        //   this.qrcodeUrl = this.tableData[row.row].equipQRCode;
-        //
-        //   if (!!this.qrcodeUrl) {
-        //     this.myDialog.qrcode = true;
-        //   } else {
-        //     this.$message("此设备没有设备二维码");
-        //   }
-        //   break;
         case "defaultQRCode":
           this.qrcodeUrl = this.tableData[row.row][val];
           if (this.qrcodeUrl) {
@@ -582,62 +487,29 @@ export default {
             this.myDialog.changeRea = true;
           }
           break;
-        //品牌型号弹窗
-        case 'dpManufacturerId':
-          if (!this.onlyRead) {
-            this.myDialog.firm = true;
-          }
-          break;
-        //供应商信息弹窗
-        case 'dpSupplierId':
-          if (!this.onlyRead) {
-            this.myDialog.supplier = true;
-          }
-          break;
-        //维修商信息弹窗
-        case 'dpMaintainerId':
-          if (!this.onlyRead) {
-            this.myDialog.maintainer = true;
-          }
-          break;
-        //保险公司信息
-        case 'dpInsurerId':
-          if (!this.onlyRead) {
-            this.myDialog.insurer = true;
-          }
-          break;
-        //供应合同编号
-        case 'infos.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("请先选择供应商");
-            }
-          }
-          break;
-        //保险单号
-        case 'infos.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("请先选择保险商");
+        /**
+         * 关联资产后才可维护的信息点
+         */
+        case 'flowBuild': //所属建筑楼层
+        case 'infos.productDate': //生产日期
+        case 'infos.serialNum': //出厂编号
+        case 'infos.assetID': //资产编号
+        case 'infos.purchasePrice': //采购价格
+        case 'infos.insuranceNum': //保险单号
+        case 'infos.insuranceFile': //保险文件
+            if (!this.onlyRead) {
+                const linkId = this.tableData[row.row].linkId;
+                if (!linkId) { //未关联资产
+                    this.$confirm('请先关联资产后再维护该信息!', '提示', {
+                        confirmButtonText: '确定',
+                        showCancelButton: false,
+                        type: 'warning'
+                    }).then(() => {
+                        return false;
+                    });
+                }
             }
-          }
-          break;
+            break
         //保险文件--设备文档--安装质检报告
         case 'infos.insuranceFile': //保险文件
         case 'infos.archive': //设备文档
@@ -684,8 +556,10 @@ export default {
         default:
           break;
       }
-      this.row = row.row;
-      this.messKey = val;
+      if (!this.onlyRead && !inputData.editable) {
+        this.$message("该信息点的值为自动生成,不可人工维护!");
+        return false;
+      }
     },
     utilToKey(key, name, data, messName) {
       if (key == name) {

+ 26 - 143
src/views/ledger/property/addproperty.vue

@@ -24,19 +24,10 @@
     <el-row class="center">
       <el-button type="primary" size="medium" @click="handleCreateTableData" class="create_button">创建资产</el-button>
     </el-row>
-    <!-- 型号弹窗 -->
-    <firm :mess="{deviceId: category.Family}" ref="firm" @changeFirm="firmChange" :dialog="myDialog"></firm>
-    <!-- 供应商合同弹窗 -->
-    <supply-dialog ref="supply" @change="supplyChange" :id="id" :dialog="myDialog"></supply-dialog>
-    <!-- 供应商弹窗 -->
-    <supplier-dialog ref="supplier" @changeSupplier="supplierChange" :dialog="myDialog"></supplier-dialog>
-    <guarantee-dialog :id="id" ref="guarantee" @change="guaranteeChange" :dialog="myDialog"></guarantee-dialog>
     <upload-files-dialog :read="onlyRead ? true : false" ref="upload" @changeFile="fileChange" :keysArr="filesArr"
                          :dialog="myDialog"></upload-files-dialog>
     <upload-img-dialog :read="onlyRead ? true : false" @changeFile="imgChange" :keysArr="imgsArr"
                        :dialog="myDialog"></upload-img-dialog>
-    <maintainer-dialog @changeMaintainer="changeMaintainer" ref="maintainer" :dialog="myDialog"></maintainer-dialog>
-    <insurer-dialog @changeInsurer="changeInsurer" ref="insurer" :dialog="myDialog"></insurer-dialog>
     <pic-dialog :read="onlyRead ? true : false" :dialog="myDialog" :keysArr="picsArr" @change="changePics"></pic-dialog>
     <details-dialog :iframeSrc="iframeSrc" v-if="myDialog.details" :dialog="myDialog"></details-dialog>
   </div>
@@ -55,24 +46,12 @@ import { getDataDictionary } from "@/api/dict";
 
 import { mapGetters, mapActions } from "vuex"
 
-import firm from "@/components/dialogs/list/firm"
-import supplyDialog from "@/components/dialogs/list/supplyDialog"
-import supplierDialog from "@/components/dialogs/list/supplierDialog"
-import maintainerDialog from "@/components/dialogs/list/maintainerDialog"
-import insurerDialog from "@/components/dialogs/list/insurerDialog"
-import guaranteeDialog from "@/components/dialogs/list/guaranteeDialog"
 import uploadFilesDialog from "@/components/dialogs/list/filesDialog"
 import uploadImgDialog from "@/components/dialogs/list/uploadImgDialog"
 import picDialog from "@/components/dialogs/list/picDialog"
 
 export default {
   components: {
-    firm, //品牌型号弹窗
-    supplyDialog,
-    supplierDialog,
-    maintainerDialog,
-    insurerDialog,
-    guaranteeDialog,
     uploadFilesDialog,
     uploadImgDialog,
     picDialog,
@@ -82,10 +61,10 @@ export default {
     return {
       addNum: 1,
       onlyRead: false,
-      showTypes: [{ value: "partInfo", label: '隐藏信息点' }, { value: "all", label: '全部' }, {
-        value: "Visible",
-        label: '只看采集信息'
-      }],
+      showTypes: [
+        { value: "all", label: '全部' },
+        { value: "Visible", label: '只看采集信息' }
+      ],
       buildFloorData: [],
       tableHeader: [],
       tableData: session.get("propertyAddData")
@@ -96,12 +75,6 @@ export default {
       copyTableData: [],
       category: "", //当前设备类
       myDialog: {
-        firm: false, //厂商弹窗
-        supply: false, //选择供应合同
-        supplier: false, //供应商选择
-        guarantee: false, //选择保单
-        maintainer: false, //选择维修商
-        insurer: false, //选择保险公司
         uploadFiles: false, //上传文件
         uploadImgs: false, //上传单个图片
         pic: false, //多个图片
@@ -110,6 +83,16 @@ export default {
         details: false, //详情页
         lookPic: false //图片查看
       },
+      inputMap: {
+        flowBuild: {
+          editable: true,
+          code: "flowBuild",
+          name: "建筑楼层",
+          path: "flowBuild",
+          category: 'STATIC',
+          dataType: "ENUM"
+        }
+      }, //信息点和输入方式映射表
       qrcodeUrl: "", //二维码图片地址
       filesArr: [], //保存临时的文件key
       imgsArr: [], //临时保存的图片key数组
@@ -140,6 +123,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();
       });
     },
@@ -290,40 +278,6 @@ export default {
       }
       return a;
     },
-    //选择型号修改
-    firmChange(data) {
-      tools.setDataForKey(this.tableData[this.row], "dpManufacturerId", data.venderId)//生产商ID
-      tools.setDataForKey(this.tableData[this.row], "dpBrandId", data.brandId)//品牌ID
-      tools.setDataForKey(this.tableData[this.row], "dpSpecificationId", data.specificationId)//型号ID
-      tools.setDataForKey(this.tableData[this.row], "infos.manufacturer", data.venderName)
-      tools.setDataForKey(this.tableData[this.row], "infos.brand", data.brandName)
-      tools.setDataForKey(this.tableData[this.row], "infos.specification", data.name)
-    },
-    supplyChange(data) {
-      tools.setDataForKey(this.tableData[this.row], "infos.supplierContractID", { id: data })
-    },
-    //如果选择供应商之后
-    supplierChange(data) {
-      tools.setDataForKey(this.tableData[this.row], "dpSupplierId", data.venderId);
-      tools.setDataForKey(this.tableData[this.row], "infos.supplier", data.name);
-      tools.setDataForKey(this.tableData[this.row], 'infos.supplierPhone', data.contacts[0]?data.contacts[0].phone:null)
-      tools.setDataForKey(this.tableData[this.row], 'infos.supplierContactor', data.contacts[0]?data.contacts[0].name:null)
-      tools.setDataForKey(this.tableData[this.row], 'infos.supplierWeb', data.website?data.website:null)
-      tools.setDataForKey(this.tableData[this.row], 'infos.supplierEmail', data.contacts[0]?data.contacts[0].email:null)
-      tools.setDataForKey(this.tableData[this.row], 'infos.supplierFax', data.contacts[0]?data.contacts[0].fax:null)
-    },
-    //保险合同
-    guaranteeChange(data) {
-      for (let key in data) {
-        this.utilToKey(key, "insuranceNo", data, "insuranceNum");
-        if (key == "contractFile") {
-          if (!!data[key]) {
-            data[key] = [data[key]];
-          }
-        }
-        this.utilToKey(key, "contractFile", data, "insuranceFile");
-      }
-    },
     //上传文件弹窗触发事件
     fileChange(keys) {
       this.setDataToMain(keys, this.messKey, this.row);
@@ -332,26 +286,6 @@ export default {
     imgChange(keys) {
       this.setDataToMain(keys, this.messKey, this.row);
     },
-    //维修商变更
-    changeMaintainer(data) {
-      tools.setDataForKey(this.tableData[this.row], "dpMaintainerId", data.venderId);
-      tools.setDataForKey(this.tableData[this.row], "infos.maintainer", data.name);
-      tools.setDataForKey(this.tableData[this.row], 'infos.maintainerWeb', data.website?data.website:null)
-      tools.setDataForKey(this.tableData[this.row], 'infos.maintainerContactor', data.contacts[0]?data.contacts[0].name:null)
-      tools.setDataForKey(this.tableData[this.row], 'infos.maintainerPhone', data.contacts[0]?data.contacts[0].phone:null)
-      tools.setDataForKey(this.tableData[this.row], 'infos.maintainerEmail', data.contacts[0]?data.contacts[0].email:null)
-      tools.setDataForKey(this.tableData[this.row], 'infos.maintainerFax', data.contacts[0]?data.contacts[0].fax:null)
-    },
-    //保险商变更
-    changeInsurer(data) {
-      tools.setDataForKey(this.tableData[this.row], "dpInsurerId", data.venderId);
-      tools.setDataForKey(this.tableData[this.row], "infos.insurer", data.name);
-      tools.setDataForKey(this.tableData[this.row], 'infos.insurerWeb', data.website?data.website:null)
-      tools.setDataForKey(this.tableData[this.row], 'infos.insurerEmail', data.contacts[0]?data.contacts[0].email:null)
-      tools.setDataForKey(this.tableData[this.row], 'infos.insurerFax', data.contacts[0]?data.contacts[0].fax:null)
-      tools.setDataForKey(this.tableData[this.row], 'infos.insurerPhone', data.contacts[0]?data.contacts[0].phone:null)
-      tools.setDataForKey(this.tableData[this.row], 'infos.insurerContactor', data.contacts[0]?data.contacts[0].name:null)
-    },
     //设备图片弹窗改变事件
     changePics(keys) {
       this.setDataToMain(keys, this.messKey, this.row);
@@ -402,63 +336,10 @@ 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) {
-        //品牌型号弹窗
-        case 'dpManufacturerId':
-          if (!this.onlyRead) {
-            this.myDialog.firm = true;
-          }
-          break;
-        //供应商信息弹窗
-        case 'dpSupplierId':
-          if (!this.onlyRead) {
-            this.myDialog.supplier = true;
-          }
-          break;
-        //维修商信息弹窗
-        case 'dpMaintainerId':
-          if (!this.onlyRead) {
-            this.myDialog.maintainer = true;
-          }
-          break;
-        //保险公司信息
-        case 'dpInsurerId':
-          if (!this.onlyRead) {
-            this.myDialog.insurer = true;
-          }
-          break;
-        //供应合同编号
-        case 'infos.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("请先选择供应商");
-            }
-          }
-          break;
-        //保险单号
-        case 'infos.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("请先选择保险商");
-            }
-          }
-          break;
         //保险文件--设备文档--安装质检报告
         case 'infos.insuranceFile': //保险文件
         case 'infos.archive': //设备文档
@@ -494,8 +375,10 @@ export default {
         default:
           break;
       }
-      this.row = row.row;
-      this.messKey = val;
+      if (!this.onlyRead && !inputData.editable) {
+        this.$message("该信息点的值为自动生成,不可人工维护!");
+        return false;
+      }
     },
     utilToKey(key, name, data, messName) {
       if (key == name) {

+ 22 - 2
src/views/ledger/rentlist/rentadd/index.vue

@@ -52,6 +52,16 @@ export default {
         { value: "all", label: '全部' },
         { value: "Visible", label: '只看采集信息' }
       ],
+      inputMap: {
+        FloorId: {
+          editable: true,
+          code: "FloorId",
+          name: "所属楼层",
+          path: "FloorId",
+          category: 'STATIC',
+          dataType: "STRING"
+        }
+      }, //信息点和输入方式映射表
       showType: this.$route.query.showType,
       tableHeader: [],
       tableData: session.get("rentAddData") ? session.get("rentAddData").length ? session.get("rentAddData") : [{}] : [{}],
@@ -77,8 +87,13 @@ export default {
         type: 'tenant'
       }
       await getDataDictionary(param, res => {
-        this.tableHeader = res.content
-        this.initTable()
+        this.tableHeader = res.content;
+        this.tableHeader.forEach(item => {
+          if (item.path) {
+            this.inputMap[item.path] = item;
+          }
+        });
+        this.initTable();
       })
     },
     // 创建租户数据
@@ -196,6 +211,11 @@ export default {
       let val = this.tableExample.colToProp(row.col);
       this.row = row.row //要操作的列号
       this.messKey = val //要操作的列类型
+      let inputData = this.inputMap[val];
+      if (!this.onlyRead && !inputData.editable) {
+        this.$message("该信息点的值为自动生成,不可人工维护!");
+        return false;
+      }
       //点击关联的元空间
       // if (val === "SpaceCount") {
       //   this.isTableRightShow = true;

+ 20 - 29
src/views/ledger/system/addsystem.vue

@@ -1,9 +1,6 @@
 <template>
   <div id="deviceList">
     <el-row class="right">
-      <!-- <span style="width:20px;float:left;display:block;height:20px;cursor: pointer;" @click="changeAssetsFalg">
-        <i class="el-icon-fa  el-icon-fa-compass"></i>
-      </span> -->
       <span style="float:left;">当前选择的系统类型:{{ category.CategoryName }}</span>
       <el-select v-model="showType" @change="initTable" style="width:125px;margin-right:10px;vertical-align:bottom;">
         <el-option v-for="item in showTypes" :key="item.value" :label="item.label" :value="item.value"></el-option>
@@ -61,7 +58,6 @@ export default {
       addNum: 1,
       onlyRead: false,
       showTypes: [
-        // { value: "partInfo", label: '隐藏信息点' },
         { value: "all", label: '全部' },
         { value: "Visible", label: '只看采集信息' }
       ],
@@ -75,12 +71,6 @@ export default {
       category: "", //当前设备类
       myDialog: {
         qrcode: false, //二维码弹窗
-        firm: false, //厂商弹窗
-        supply: false, //选择供应合同
-        supplier: false, //供应商选择
-        guarantee: false, //选择保单
-        maintainer: false, //选择维修商
-        insurer: false, //选择保险公司
         uploadFiles: false, //上传文件
         uploadImgs: false, //上传单个图片
         pic: false, //多个图片
@@ -90,6 +80,16 @@ export default {
         changeRea: false,
         lookPic: false //图片查看
       },
+      inputMap: {
+        flowBuild: {
+          editable: true,
+          code: "flowBuild",
+          name: "建筑楼层",
+          path: "flowBuild",
+          category: 'STATIC',
+          dataType: "ENUM"
+        }
+      }, //信息点和输入方式映射表
       qrcodeUrl: "", //二维码图片地址
       filesArr: [], //保存临时的文件key
       imgsArr: [], //临时保存的图片key数组
@@ -110,25 +110,6 @@ export default {
     this.getTableHeader();
   },
   methods: {
-    //维护建筑
-    // changeAssetsFalg() {
-    //   if (this.floorFlag) {
-    //     this.floorFlag = false
-    //   } else {
-    //     this.$confirm('<p>维护设备所在建筑楼层后,对后续数据影响较大,如业务空间中的所在关系or其他?暂未梳理明白……</p><p>后续要修改设备所属建筑楼层,只能通过模型中的待建模清单操作</p>', '提示', {
-    //       dangerouslyUseHTMLString: true,
-    //       confirmButtonText: '就要维护设备所属建筑楼层',
-    //       cancelButtonText: '暂时不搞了',
-    //       confirmButtonClass: 'confirmButtonClass',
-    //       cancelButtonClass: 'cancelButtonClass'
-    //     }).then(_ => {
-    //       this.floorFlag = true
-    //       this.getTableHeader()
-    //     }).catch(_ => {
-    //       this.$message("取消")
-    //     })
-    //   }
-    // },
     //获取建筑数据
     getBuildData() {
       let param = {
@@ -160,6 +141,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();
       });
     },
@@ -342,6 +328,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) {
@@ -375,6 +362,10 @@ export default {
         default:
           break;
       }
+      if (!this.onlyRead && !inputData.editable) {
+        this.$message("该信息点的值为自动生成,不可人工维护!");
+        return false;
+      }
     },
     //建筑楼层
     relateSuccess(data) {