haojianlong пре 5 година
родитељ
комит
70ab4e1de8

+ 1 - 1
src/components/dialogs/list/systemType.vue

@@ -234,7 +234,7 @@ export default {
     //添加设备关联系统关系
     createRelatSys(){
       let param = {
-        EquipId:this.curDevice,
+        EquipID:this.curDevice,
         SysIdList:[]
       }
       this.multipleSelection.map(t => {

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

@@ -178,16 +178,13 @@ export default {
       messKey: null,
       imgsArr: [], //临时保存的图片key数组
       picsArr: [], //临时设备图片keys数组
-      projId: "",
       copyMain: null,
       graphyId: null,
       assetGroupList: [],
       iframeSrc: "",
       id: 0,
-      isWatch: true,
       onlyRead: true,
       showType: 'all',
-      allMess: true,
       linkNameFalg: false,
       qrcodeUrl: "", //二维码图片地址
       loading: false,
@@ -740,14 +737,16 @@ export default {
     },
     //如果选择供应商之后
     supplierChange(data) {
-      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], "LedgerParam.SupplyPurchase.Supplier", data.name)
+      this.handleUpdataTable([[this.row, "DPSupplierID", null, data.venderId]], "edit")
+      this.handleUpdataTable([[this.row, "LedgerParam.SupplyPurchase.Supplier", null, data.name]], "edit")
     },
+    //供应合同编号
     supplyChange(data) {
-      let changeData = { id: data }
-      this.utilToKey("id", "id", changeData, "SupplierContractID")
+      tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierContractID", { id: data })
     },
-    //保险合同
+    //保险单号-保险文件 
     guaranteeChange(data) {
       for (let key in data) {
         this.utilToKey(key, "insuranceNo", data, "InsuranceNum")
@@ -761,19 +760,26 @@ export default {
     },
     //选择型号修改
     firmChange(data) {
+      tools.setDataForKey(this.tableData[this.row], "DPManufacturerID", data.venderId)
       tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Brand", data.brand)
       tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Specification", data.name)
-      tools.setDataForKey(this.tableData[this.row], "DPManufacturerID", data.venderId)
+      this.handleUpdataTable([[this.row, "DPManufacturerID", null, data.venderId]], "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) {
-      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], "LedgerParam.InsuranceDoc.Insurer", data.name)
+      this.handleUpdataTable([[this.row, "DPInsurerID", null, data.venderId]], "edit")
+      this.handleUpdataTable([[this.row, "LedgerParam.InsuranceDoc.Insurer", null, data.name]], "edit")
     },
     //维修商变更
     changeMaintainer(data) {
-      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], "LedgerParam.OperationMainte.Maintainer", data.name)
+      this.handleUpdataTable([[this.row, "DPMaintainerID", null, data.venderId]], "edit")
+      this.handleUpdataTable([[this.row, "LedgerParam.OperationMainte.Maintainer", null, data.name]], "edit")
     },
     //修改关联的资产
     changeProperty(val) {

+ 8 - 10
src/views/ledger/facility/parts/index.vue

@@ -11,11 +11,7 @@
         <el-checkbox v-model="allMess" @change="getTableHeader"></el-checkbox>
       </div> -->
       <el-select v-model="showType" @change="initTable" style="width:100px;margin-right:10px;vertical-align:bottom;">
-        <el-option
-          v-for="item in showTypes"
-          :key="item.value"
-          :label="item.label"
-          :value="item.value">
+        <el-option v-for="item in showTypes" :key="item.value" :label="item.label" :value="item.value">
         </el-option>
       </el-select>
       <el-button @click="getTableHeader">刷新</el-button>
@@ -32,10 +28,12 @@
       </div>
     </div>
     <el-pagination class="right" v-show="tableData && tableData.length" @size-change="handleSizeChange" @current-change="handleCurrentChange"
-      :current-page="page.pageNumber" :page-sizes="page.pageSizes" :page-size="page.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="page.total"></el-pagination>
+      :current-page="page.pageNumber" :page-sizes="page.pageSizes" :page-size="page.pageSize" layout="total, sizes, prev, pager, next, jumper"
+      :total="page.total"></el-pagination>
     <!-- 二维码弹窗 -->
     <qrcode :dialog="myDialog" :qrcodeUrl="qrcodeUrl" :addBody="true" ref="qrcode"></qrcode>
-    <upload-files-dialog :read="onlyRead ? true : false" ref="upload" @changeFile="fileChange" :keysArr="filesArr" :dialog="myDialog"></upload-files-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>
     <pic-dialog :read="onlyRead ? true : false" :dialog="myDialog" :keysArr="picsArr" @change="changePics"></pic-dialog>
   </div>
@@ -95,8 +93,8 @@ export default {
         total: 0
       },
       showTypes: [
-        {value: "Visible", label: '只看要采集的信息'},
-        {value: "all", label: '全部'}
+        { value: "Visible", label: '只看要采集的信息' },
+        { value: "all", label: '全部' }
       ],
       showType: "Visible",
       tableData: [],
@@ -408,7 +406,7 @@ export default {
         data: []
       };
       params.map(item => {
-        param.data.push(item.EquipID);
+        param.data.push({ EquipID: item.EquipID });
       });
       this.$confirm("此操作将删除部件,是否继续?", "提示", {
         confirmButtonText: "确定",

+ 18 - 13
src/views/ledger/facility/partsmanage/index.vue

@@ -11,11 +11,7 @@
         <el-checkbox v-model="allMess" @change="getTableHeader"></el-checkbox>
       </div> -->
       <el-select v-model="showType" @change="initTable" style="width:100px;margin-right:10px;vertical-align:bottom;">
-        <el-option
-          v-for="item in showTypes"
-          :key="item.value"
-          :label="item.label"
-          :value="item.value">
+        <el-option v-for="item in showTypes" :key="item.value" :label="item.label" :value="item.value">
         </el-option>
       </el-select>
       <el-button @click="handleCreateTableData">添加部件</el-button>
@@ -106,9 +102,9 @@ export default {
       spaceList: "",
       onlyRead: false,
       showTypes: [
-        {value: "partInfo", label: '隐藏自动填充的信息点'},
-        {value: "all", label: '全部'}, 
-        {value: "Visible", label: '只看要采集的信息'}
+        { value: "partInfo", label: '隐藏自动填充的信息点' },
+        { value: "all", label: '全部' },
+        { value: "Visible", label: '只看要采集的信息' }
       ],
       showType: "partInfo",
       tableHeader: [],
@@ -302,7 +298,7 @@ export default {
         data: []
       };
       params.map(item => {
-        param.data.push(item.EquipID);
+        param.data.push({ EquipID: item.EquipID });
       });
       this.$confirm("此操作将删除部件,是否继续?", "提示", {
         confirmButtonText: "确定",
@@ -424,24 +420,33 @@ export default {
     },
     //选择型号修改
     firmChange(data) {
+      tools.setDataForKey(this.tableData[this.row], "DPManufacturerID", data.venderId)
       tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Brand", data.brand)
       tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Specification", data.name)
-      tools.setDataForKey(this.tableData[this.row], "DPManufacturerID", data.venderId)
+      this.handleUpdataTable([[this.row, "DPManufacturerID", null, data.venderId]], "edit")
+      this.handleUpdataTable([[this.row, "LedgerParam.EquipManufactor.Brand", null, data.brand]], "edit")
+      this.handleUpdataTable([[this.row, "LedgerParam.EquipManufactor.Specification", null, data.name]], "edit")
     },
     //供应商变更
     supplierChange(data) {
-      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], "LedgerParam.SupplyPurchase.Supplier", data.name)
+      this.handleUpdataTable([[this.row, "DPSupplierID", null, data.venderId]], "edit")
+      this.handleUpdataTable([[this.row, "LedgerParam.SupplyPurchase.Supplier", null, data.name]], "edit")
     },
     //保险商变更
     changeInsurer(data) {
-      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], "LedgerParam.InsuranceDoc.Insurer", data.name)
+      this.handleUpdataTable([[this.row, "DPInsurerID", null, data.venderId]], "edit")
+      this.handleUpdataTable([[this.row, "LedgerParam.InsuranceDoc.Insurer", null, data.name]], "edit")
     },
     //维修商变更
     changeMaintainer(data) {
-      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], "LedgerParam.OperationMainte.Maintainer", data.name)
+      this.handleUpdataTable([[this.row, "DPMaintainerID", null, data.venderId]], "edit")
+      this.handleUpdataTable([[this.row, "LedgerParam.OperationMainte.Maintainer", null, data.name]], "edit")
     },
     supplyChange(data) {
       let changeData = { id: data };