瀏覽代碼

台账四大厂商数据存储

haojianlong 4 年之前
父節點
當前提交
a12a9c9ba8

+ 6 - 26
src/components/business_space/dialogs/list/insurerDialog.vue

@@ -26,10 +26,10 @@
               </template>
             </el-table-column>
             <el-table-column header-align='center' prop="website" label="网址"></el-table-column>
-            <el-table-column header-align='center' prop="man" label="联系人"></el-table-column>
-            <el-table-column header-align='center' prop="phone" label="联系电话"></el-table-column>
-            <el-table-column header-align='center' prop="faxes" label="传真"></el-table-column>
-            <el-table-column header-align='center' prop="email" label="电子邮件"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].name" label="联系人"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].phone" label="联系电话"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].fax" label="传真"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].email" label="电子邮件"></el-table-column>
           </el-table>
         </el-radio-group>
         <div class="right" style="background: #fff;">
@@ -111,29 +111,9 @@ export default {
       }
       getLib({ "type": ["insurance"] }).then(res => {
         if (res.data.result == "success") {
-          let data = res.data.content.insurance.map(item => {
-            if (item.contacts && item.contacts.length) {
-              item.contacts.map(child => {
-                if (child.projectId == this.projectId) {
-                  item.phone = child.phone
-                  item.man = child.name
-                  item.fox = child.fox
-                  item.email = child.email
-                }
-                return child
-              })
-            }
-            if (!item.man) {
-              item.man = "--"
-              item.phone = "--"
-              item.fox = "--"
-              item.email = "--"
-            }
-            return item
-          })
-          this.allData = tools.deepCopy(data)
+          this.allData = tools.deepCopy(res.data.content.insurance)
           this.tableData = this.pagination(this.page.currentPage, this.page.size, this.allData)
-          this.page.total = data.length
+          this.page.total = this.allData.length
         } else {
           this.$message.error("请求失败:" + res.data.resultMsg)
         }

+ 6 - 26
src/components/business_space/dialogs/list/maintainerDialog.vue

@@ -26,10 +26,10 @@
               </template>
             </el-table-column>
             <el-table-column header-align='center' prop="website" label="网址"></el-table-column>
-            <el-table-column header-align='center' prop="man" label="联系人"></el-table-column>
-            <el-table-column header-align='center' prop="phone" label="联系电话"></el-table-column>
-            <el-table-column header-align='center' prop="faxes" label="传真"></el-table-column>
-            <el-table-column header-align='center' prop="email" label="电子邮件"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].name" label="联系人"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].phone" label="联系电话"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].fax" label="传真"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].email" label="电子邮件"></el-table-column>
           </el-table>
         </el-radio-group>
         <div class="right" style="background: #fff;">
@@ -109,29 +109,9 @@ export default {
       }
       getLib({ "type": ["maintenance"] }).then(res => {
         if (res.data.result == "success") {
-          let data = res.data.content.maintenance.map(item => {
-            if (item.contacts && item.contacts.length) {
-              item.contacts.map(child => {
-                if (child.projectId == this.projectId) {
-                  item.phone = child.phone
-                  item.man = child.name
-                  item.fox = child.fox
-                  item.email = child.email
-                }
-                return child
-              })
-            }
-            if (!item.man) {
-              item.man = "--"
-              item.phone = "--"
-              item.fox = "--"
-              item.email = "--"
-            }
-            return item
-          })
-          this.allData = tools.deepCopy(data)
+          this.allData = tools.deepCopy(res.data.content.maintenance)
           this.tableData = this.pagination(this.page.currentPage, this.page.size, this.allData)
-          this.page.total = data.length
+          this.page.total = this.allData.length
         } else {
           this.$message.error("请求失败:" + res.data.resultMsg)
         }

+ 6 - 26
src/components/business_space/dialogs/list/supplierDialog.vue

@@ -26,10 +26,10 @@
               </template>
             </el-table-column>
             <el-table-column header-align='center' prop="website" label="网址"></el-table-column>
-            <el-table-column header-align='center' prop="man" label="联系人"></el-table-column>
-            <el-table-column header-align='center' prop="phone" label="联系电话"></el-table-column>
-            <el-table-column header-align='center' prop="faxes" label="传真"></el-table-column>
-            <el-table-column header-align='center' prop="email" label="电子邮件"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].name" label="联系人"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].phone" label="联系电话"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].fax" label="传真"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].email" label="电子邮件"></el-table-column>
           </el-table>
         </el-radio-group>
         <div class="right" style="background: #fff;">
@@ -109,29 +109,9 @@ export default {
       }
       getLib({ "type": ["supplier"] }).then(res => {
         if (res.data.result == "success") {
-          let data = res.data.content.supplier.map(item => {
-            if (item.contacts && item.contacts.length) {
-              item.contacts.map(child => {
-                if (child.projectId == this.projectId) {
-                  item.phone = child.phone
-                  item.man = child.name
-                  item.fox = child.fox
-                  item.email = child.email
-                }
-                return child
-              })
-            }
-            if (!item.man) {
-              item.man = "--"
-              item.phone = "--"
-              item.fox = "--"
-              item.email = "--"
-            }
-            return item
-          })
-          this.allData = tools.deepCopy(data)
+          this.allData = tools.deepCopy(res.data.content.supplier)
           this.tableData = this.pagination(this.page.currentPage, this.page.size, this.allData)
-          this.page.total = data.length
+          this.page.total = this.allData.length
         } else {
           this.$message.error("请求失败:" + res.data.resultMsg)
         }

+ 6 - 26
src/components/dialogs/list/insurerDialog.vue

@@ -26,10 +26,10 @@
               </template>
             </el-table-column>
             <el-table-column header-align='center' prop="website" label="网址"></el-table-column>
-            <el-table-column header-align='center' prop="man" label="联系人"></el-table-column>
-            <el-table-column header-align='center' prop="phone" label="联系电话"></el-table-column>
-            <el-table-column header-align='center' prop="faxes" label="传真"></el-table-column>
-            <el-table-column header-align='center' prop="email" label="电子邮件"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].name" label="联系人"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].phone" label="联系电话"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].fax" label="传真"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].email" label="电子邮件"></el-table-column>
           </el-table>
         </el-radio-group>
         <div class="right" style="background: #fff;">
@@ -114,29 +114,9 @@
                 }
                 getLib({"type": ["insurance"]}).then(res => {
                     if (res.data.result == "success") {
-                        let data = res.data.content.insurance.map(item => {
-                            if (item.contacts && item.contacts.length) {
-                                item.contacts.map(child => {
-                                    if (child.projectId == this.projectId) {
-                                        item.phone = child.phone
-                                        item.man = child.name
-                                        item.fox = child.fox
-                                        item.email = child.email
-                                    }
-                                    return child
-                                })
-                            }
-                            if (!item.man) {
-                                item.man = "--"
-                                item.phone = "--"
-                                item.fox = "--"
-                                item.email = "--"
-                            }
-                            return item
-                        })
-                        this.allData = tools.deepCopy(data)
+                        this.allData = tools.deepCopy(res.data.content.insurance)
                         this.tableData = this.pagination(this.page.currentPage, this.page.size, this.allData)
-                        this.page.total = data.length
+                        this.page.total = this.allData.length
                     } else {
                         this.$message.error("请求失败:" + res.data.resultMsg)
                     }

+ 6 - 26
src/components/dialogs/list/maintainerDialog.vue

@@ -26,10 +26,10 @@
               </template>
             </el-table-column>
             <el-table-column header-align='center' prop="website" label="网址"></el-table-column>
-            <el-table-column header-align='center' prop="man" label="联系人"></el-table-column>
-            <el-table-column header-align='center' prop="phone" label="联系电话"></el-table-column>
-            <el-table-column header-align='center' prop="faxes" label="传真"></el-table-column>
-            <el-table-column header-align='center' prop="email" label="电子邮件"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].name" label="联系人"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].phone" label="联系电话"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].fax" label="传真"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].email" label="电子邮件"></el-table-column>
           </el-table>
         </el-radio-group>
         <div class="right" style="background: #fff;">
@@ -113,29 +113,9 @@
                 }
                 getLib({"type": ["maintenance"]}).then(res => {
                     if (res.data.result == "success") {
-                        let data = res.data.content.maintenance.map(item => {
-                            if (item.contacts && item.contacts.length) {
-                                item.contacts.map(child => {
-                                    if (child.projectId == this.projectId) {
-                                        item.phone = child.phone
-                                        item.man = child.name
-                                        item.fox = child.fox
-                                        item.email = child.email
-                                    }
-                                    return child
-                                })
-                            }
-                            if (!item.man) {
-                                item.man = "--"
-                                item.phone = "--"
-                                item.fox = "--"
-                                item.email = "--"
-                            }
-                            return item
-                        })
-                        this.allData = tools.deepCopy(data)
+                        this.allData = tools.deepCopy(res.data.content.maintenance)
                         this.tableData = this.pagination(this.page.currentPage, this.page.size, this.allData)
-                        this.page.total = data.length
+                        this.page.total = this.allData.length
                     } else {
                         this.$message.error("请求失败:" + res.data.resultMsg)
                     }

+ 6 - 26
src/components/dialogs/list/supplierDialog.vue

@@ -26,10 +26,10 @@
               </template>
             </el-table-column>
             <el-table-column header-align='center' prop="website" label="网址"></el-table-column>
-            <el-table-column header-align='center' prop="man" label="联系人"></el-table-column>
-            <el-table-column header-align='center' prop="phone" label="联系电话"></el-table-column>
-            <el-table-column header-align='center' prop="faxes" label="传真"></el-table-column>
-            <el-table-column header-align='center' prop="email" label="电子邮件"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].name" label="联系人"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].phone" label="联系电话"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].fax" label="传真"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].email" label="电子邮件"></el-table-column>
           </el-table>
         </el-radio-group>
         <div class="right" style="background: #fff;">
@@ -113,29 +113,9 @@
                 }
                 getLib({"type": ["supplier"]}).then(res => {
                     if (res.data.result == "success") {
-                        let data = res.data.content.supplier.map(item => {
-                            if (item.contacts && item.contacts.length) {
-                                item.contacts.map(child => {
-                                    if (child.projectId == this.projectId) {
-                                        item.phone = child.phone
-                                        item.man = child.name
-                                        item.fox = child.fox
-                                        item.email = child.email
-                                    }
-                                    return child
-                                })
-                            }
-                            if (!item.man) {
-                                item.man = "--"
-                                item.phone = "--"
-                                item.fox = "--"
-                                item.email = "--"
-                            }
-                            return item
-                        })
-                        this.allData = tools.deepCopy(data)
+                        this.allData = tools.deepCopy(res.data.content.supplier)
                         this.tableData = this.pagination(this.page.currentPage, this.page.size, this.allData)
-                        this.page.total = data.length
+                        this.page.total = this.allData.length
                     } else {
                         this.$message.error("请求失败:" + res.data.resultMsg)
                     }

+ 33 - 6
src/components/ledger/handsontables/assets.vue

@@ -1084,10 +1084,20 @@ export default {
       } 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.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"
         )
@@ -1153,14 +1163,23 @@ export default {
       } 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.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"
         )
-        // this.handleUpdataTable([[this.row, "LedgerParam.InsuranceDoc.Insurer", null, data.name]], "edit")
       }
     },
     //维修商变更
@@ -1169,17 +1188,25 @@ export default {
         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.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"
         )
-        // this.handleUpdataTable([[this.row, "LedgerParam.operationMainte.maintainer", null, data.name]], "edit")
       }
     },
     //修改关联的资产

+ 10 - 42
src/components/ledger/handsontables/device.vue

@@ -1278,12 +1278,12 @@ export default {
           }
           return false;
         //包含的部件字段
-        case "Count":
+        case "count":
           let countUrl = this.onlyRead ? "/ledger/parts" : "/ledger/partsmanage";
           this.$router.push({
             path: countUrl,
             query: {
-              deviceId: infos.EquipID,
+              deviceId: infos.id,
               typeId: this.mess.deviceId,
               pageNo: this.page.currentPage,
               pageSize: this.page.size
@@ -1386,11 +1386,7 @@ export default {
     },
     //供应合同编号
     supplyChange(data) {
-      tools.setDataForKey(
-        this.tableData[this.row],
-        "infos.supplierContractID",
-        { id: data }
-      );
+      tools.setDataForKey(this.tableData[this.row], "infos.supplierContractID", { id: data });
     },
     //保险单号-保险文件
     guaranteeChange(data) {
@@ -1420,41 +1416,13 @@ export default {
         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
-        );
+        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],

+ 18 - 3
src/views/ledger/facility/addfacility.vue

@@ -443,8 +443,13 @@ export default {
     },
     //如果选择供应商之后
     supplierChange(data) {
-      tools.setDataForKey(this.tableData[this.row], "infos.supplier", data.name)
       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) {
@@ -468,13 +473,23 @@ export default {
     },
     //维修商变更
     changeMaintainer(data) {
-      tools.setDataForKey(this.tableData[this.row], "infos.maintainer", data.name)
       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], "infos.insurer", data.name)
       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) {

+ 83 - 54
src/views/ledger/facility/partsmanage/index.vue

@@ -282,8 +282,8 @@ export default {
       let param = {
         projectId: this.projectId,
         data: {
-          Content: [],
-          Projection: []
+          content: [],
+          projection: []
         }
       }, keyList = [];
       //生成要修改字段列表
@@ -292,8 +292,8 @@ export default {
         if (item[1] && keyList.indexOf(key) == -1) {
           keyList.push(key)
         }
-        if (item[1] && item[3] == "" && param.data.Projection.indexOf(key) == -1) {
-          param.data.Projection.push(key)
+        if (item[1] && item[3] == "" && param.data.projection.indexOf(key) == -1) {
+          param.data.projection.push(key)
         }
       })
       //生成对应修改数据
@@ -311,9 +311,9 @@ export default {
         // } else {
         //   item[keyarr[0]] = item[keyarr[0]] != "" ? item[keyarr[0]] : null;
         // }
-        param.data.Content.push(item);
+        param.data.content.push(item);
       });
-      param.Projection = []
+      param.projection = []
       await updateParts(param, res => {
       });
     },
@@ -327,11 +327,11 @@ export default {
     //保存元空间关联
     async saveSpaceList() {
       let data = {
-        ShaftId: this.shaftId,
-        SpaceId: this.spaceList
+        shaftId: this.shaftId,
+        spaceId: this.spaceList
       };
       const params = {
-        ProjId: this.projectId,
+        projId: this.projectId,
         secret: this.secret,
         data: data
       };
@@ -486,20 +486,21 @@ export default {
     },
     //选择型号修改
     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], "LedgerParam.equipManufactor.manufacturer", data.venderName)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.equipManufactor.Brand", data.brandName)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.equipManufactor.Specification", data.name)
+      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, "LedgerParam.equipManufactor.manufacturer", null, data.venderName],
-          [this.row, "LedgerParam.equipManufactor.Brand", null, data.brandName],
-          [this.row, "LedgerParam.equipManufactor.Specification", null, data.name]
+          [this.row, "infos.manufacturer", null, data.venderName],
+          [this.row, "infos.brand", null, data.brandName],
+          [this.row, "infos.specification", null, data.name]
         ],
         "edit"
       )
@@ -508,25 +509,44 @@ export default {
     },
     //供应商变更
     supplierChange(data) {
-      tools.setDataForKey(this.tableData[this.row], "dpSupplierId", data.venderId)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.Supplier", data.name)
+      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, "LedgerParam.SupplyPurchase.Supplier", null, data.name]
+          [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")
     },
     //保险商变更
     changeInsurer(data) {
-      tools.setDataForKey(this.tableData[this.row], "dpInsurerId", data.venderId)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.Insurer", data.name)
+      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, "LedgerParam.insuranceDoc.insurer", null, data.name]
+          [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"
       )
@@ -534,30 +554,40 @@ export default {
     },
     //维修商变更
     changeMaintainer(data) {
-      tools.setDataForKey(this.tableData[this.row], "dpMaintainerId", data.venderId)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.operationMainte.maintainer", data.name)
+      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, "LedgerParam.operationMainte.maintainer", null, data.name]
+          [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"
       )
       // this.handleUpdataTable([[this.row, "LedgerParam.operationMainte.maintainer", null, data.name]], "edit")
     },
     supplyChange(data) {
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierContractID", { id: data });
+      tools.setDataForKey(this.tableData[this.row], "infos.supplierContractID", { id: data });
     },
     //保险合同
     guaranteeChange(data) {
       for (let key in data) {
-        this.utilToKey(key, "insuranceNo", data, "InsuranceNum");
+        this.utilToKey(key, "insuranceNo", data, "insuranceNum");
         if (key == "contractFile") {
           if (!!data[key]) {
             data[key] = [data[key]];
           }
         }
-        this.utilToKey(key, "contractFile", data, "InsuranceFile");
+        this.utilToKey(key, "contractFile", data, "insuranceFile");
       }
     },
     //修改关联的资产
@@ -633,7 +663,7 @@ export default {
           this.$message("开发中...")
           break;
         //设备二维码图片
-        case 'EquipQRCode':
+        case 'qRCodePic':
           this.qrcodeUrl = this.tableData[row.row].EquipQRCode;
           if (!!this.qrcodeUrl) {
             this.myDialog.qrcode = true;
@@ -650,7 +680,7 @@ export default {
           }
           break;
         //关联资产
-        case 'PropertyLocalName':
+        case 'propertyLocalName':
           if (this.linkNameFalg) {
             this.myDialog.changeRea = true;
           }
@@ -680,7 +710,7 @@ export default {
           }
           break;
         //供应合同编号
-        case 'LedgerParam.SupplyPurchase.SupplierContractID':
+        case 'infos.supplierContractID':
           if (!this.onlyRead) {
             let ContractIDflag = null;
             let DPSdata = this.tableData[row.row].dpSupplierId;
@@ -696,7 +726,7 @@ export default {
           }
           break;
         //保险单号
-        case 'LedgerParam.insuranceDoc.insuranceNum':
+        case 'infos.insuranceNum':
           if (!this.onlyRead) {
             let DPInsurerIDflag = null;
             let DPIdata = this.tableData[row.row].dpInsurerId;
@@ -712,39 +742,39 @@ export default {
           }
           break;
         //保险文件--设备文档--安装质检报告
-        case 'LedgerParam.InsuranceDoc.InsuranceFile': //保险文件
-        case 'LedgerParam.PhotoDoc.Archive': //设备文档
-        case 'LedgerParam.Siteinstall.CheckReport': //安装质检报告
-        case 'LedgerParam.operationMainte.MaintainManual': //维修保养手册
-        case 'LedgerParam.SupplyPurchase.ApproachingAcceptance': //进场验收单
-        case 'LedgerParam.SupplyPurchase.AcceptanceReport': //验收报告
-        case 'LedgerParam.PhotoDoc.OperationManual': //操作说明书
-        case 'LedgerParam.equipManufactor.OriginalCertificate': //原厂证明
-        case 'LedgerParam.equipManufactor.TestReport': //检测报告
-        case 'LedgerParam.PhotoDoc.ProductCertification': //产品合格证
-        case 'LedgerParam.Siteinstall.InstallInstruction': //安装说明书
-        case 'LedgerParam.SupplyPurchase.SupplierContract': //供应合同
-        case 'LedgerParam.PhotoDoc.Drawing': //设备图纸
-        case 'LedgerParam.Siteinstall.InstallDrawing': //安装图纸
+        case 'infos.insuranceFile': //保险文件
+        case 'infos.archive': //设备文档
+        case 'infos.checkReport': //安装质检报告
+        case 'infos.maintainManual': //维修保养手册
+        case 'infos.approachingAcceptance': //进场验收单
+        case 'infos.acceptanceReport': //验收报告
+        case 'infos.operationManual': //操作说明书
+        case 'infos.originalCertificate': //原厂证明
+        case 'infos.testReport': //检测报告
+        case 'infos.productCertification': //产品合格证
+        case 'infos.installInstruction': //安装说明书
+        case 'infos.supplierContract': //供应合同
+        case 'infos.drawing': //设备图纸
+        case 'infos.installDrawing': //安装图纸
           let IPSdata = tools.dataForKey(this.tableData[row.row], val);
           this.filesArr = IPSdata ? IPSdata : [];
           this.myDialog.uploadFiles = true;
           break;
         //安装照片--设备铭牌照片
-        case 'LedgerParam.Siteinstall.InstallPic':
-        case 'LedgerParam.PhotoDoc.Nameplate':
+        case 'infos.installPic':
+        case 'infos.nameplate':
           let SSPPdata = tools.dataForKey(this.tableData[row.row], val);
           this.imgsArr = SSPPdata ? SSPPdata : [];
           this.myDialog.uploadImgs = true;
           break;
         //设备照片
-        case 'LedgerParam.PhotoDoc.Pic':
+        case 'infos.pic':
           let Pdata = tools.dataForKey(this.tableData[row.row], val);
           this.picsArr = Pdata ? Pdata : [];
           this.myDialog.pic = true;
           break;
         //包含的部件字段
-        case 'Count':
+        case 'count':
           if (this.onlyRead) {
             this.$router.push({ path: '/ledger/parts', query: { deviceId: infos.EquipID } });
           } else {
@@ -776,7 +806,6 @@ export default {
     },
     //更新临时维护信息点
     handleClickUpdate() {
-      // this.$message("更新成功");
       tools.setDataForKey(this.tableData[this.row], this.updateInfoPoint, this.updateInput)
       this.handleUpdataTable([[this.row, this.updateInfoPoint, null, this.updateInput]], "edit")
       this.updateInputShow = false

+ 21 - 6
src/views/ledger/property/addproperty.vue

@@ -304,8 +304,13 @@ export default {
     },
     //如果选择供应商之后
     supplierChange(data) {
-      tools.setDataForKey(this.tableData[this.row], "infos.supplier", data.name)
-      tools.setDataForKey(this.tableData[this.row], "dpSupplierId", data.venderId)
+      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) {
@@ -329,13 +334,23 @@ export default {
     },
     //维修商变更
     changeMaintainer(data) {
-      tools.setDataForKey(this.tableData[this.row], "infos.maintainer", data.name)
-      tools.setDataForKey(this.tableData[this.row], "dpMaintainerId", data.venderId)
+      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], "infos.insurer", data.name)
-      tools.setDataForKey(this.tableData[this.row], "dpInsurerId", data.venderId)
+      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) {