|
@@ -22,18 +22,22 @@
|
|
|
<!-- 二维码弹窗 -->
|
|
|
<qrcode :dialog="myDialog" :qrcodeUrl="qrcodeUrl" :addBody="true" ref="qrcode"></qrcode>
|
|
|
<!-- 型号弹窗 -->
|
|
|
- <firm :mess="{deviceId: deviceType.assetType}" ref="firm" @changeFirm="firmChange" :dialog="myDialog"></firm>
|
|
|
+ <firm :mess="{deviceId: deviceType.assetType}" :firmDataType="firmDataType" 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>
|
|
|
+ <supplier-dialog ref="supplier" :firmDataType="firmDataType" @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>
|
|
|
+ <!-- 维修商信息-->
|
|
|
+ <maintainer-dialog @changeMaintainer="changeMaintainer" :firmDataType="firmDataType" ref="maintainer"
|
|
|
+ :dialog="myDialog"></maintainer-dialog>
|
|
|
+ <insurer-dialog @changeInsurer="changeInsurer" :firmDataType="firmDataType" ref="insurer" :dialog="myDialog"></insurer-dialog>
|
|
|
<pic-dialog :read="onlyRead ? true : false" :dialog="myDialog" :keysArr="picsArr" @change="changePics"></pic-dialog>
|
|
|
<div class=" middle_sty" style="height: 91%; text-align:center" v-show="!mess.deviceId && (!tableData || !tableData.length)">
|
|
|
<p>
|
|
@@ -83,7 +87,7 @@
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
<!-- 维护信息弹窗-->
|
|
|
- <batchDialog ref="batchDialogs" @code="fourVendors" :firmName="firmName"/>
|
|
|
+ <batchDialog ref="batchDialogs" @code="fourVendors" :firmName="firmName" @deviceList="deviceList"/>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -225,6 +229,8 @@ export default {
|
|
|
updateInfoPoint: '',//临时维护信息点
|
|
|
updateInput: '', //临时维护信息点值
|
|
|
firmName: '',//维护信息显示厂家名称
|
|
|
+ firmDataType: 'row',
|
|
|
+ // maintenanceList: {},//批量信息维护信息统计
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
@@ -708,6 +714,9 @@ export default {
|
|
|
|
|
|
}
|
|
|
},
|
|
|
+ deviceList(data) {
|
|
|
+ console.log(data,'我是单项传来的对象')
|
|
|
+ },
|
|
|
//获取到了正确的信息
|
|
|
getInfors(infos, row, el) {
|
|
|
let val = this.hot.colToProp(row.col);
|
|
@@ -884,20 +893,25 @@ export default {
|
|
|
return a;
|
|
|
},
|
|
|
//如果选择供应商之后
|
|
|
- supplierChange(data) {
|
|
|
- let firm = {...data, num: 8}
|
|
|
- this.firmName = firm
|
|
|
- console.log(data, '供应商')
|
|
|
- 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],
|
|
|
- [this.row, "LedgerParam.SupplyPurchase.Supplier", null, data.name]
|
|
|
- ],
|
|
|
- "edit"
|
|
|
- )
|
|
|
- // this.handleUpdataTable([[this.row, "LedgerParam.SupplyPurchase.Supplier", null, data.name]], "edit")
|
|
|
+ supplierChange(data, type) {
|
|
|
+ if (type === 'dialog') {
|
|
|
+ let firm = {...data, num: 8}
|
|
|
+ this.firmName = firm
|
|
|
+ console.log(data, '供应商')
|
|
|
+ // this.maintenanceList.supplier = data
|
|
|
+ } else {
|
|
|
+ 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],
|
|
|
+ [this.row, "LedgerParam.SupplyPurchase.Supplier", null, data.name]
|
|
|
+ ],
|
|
|
+ "edit"
|
|
|
+ )
|
|
|
+ // this.handleUpdataTable([[this.row, "LedgerParam.SupplyPurchase.Supplier", null, data.name]], "edit")
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
//供应合同编号
|
|
|
supplyChange(data) {
|
|
@@ -916,53 +930,68 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
//选择型号修改
|
|
|
- firmChange(data) {
|
|
|
- let firm = {...data, num: 2, name: `${data.brand}/${data.name}`}
|
|
|
- console.log(firm, '型号')
|
|
|
- this.firmName = firm
|
|
|
- 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)
|
|
|
- this.handleUpdataTable(
|
|
|
- [
|
|
|
- [this.row, "DPManufacturerID", null, data.venderId],
|
|
|
- [this.row, "LedgerParam.EquipManufactor.Brand", null, data.brand],
|
|
|
- [this.row, "LedgerParam.EquipManufactor.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")
|
|
|
+ firmChange(data, type) {
|
|
|
+ if (type === 'dialog') { // 如果是批量信息维护
|
|
|
+ console.log(data, type, '=====')
|
|
|
+ let firm = {...data, num: 2, name: `${data.brand}/${data.name}`}
|
|
|
+ this.firmName = firm //批量维护dialog显示对象的字段
|
|
|
+ // this.maintenanceList.firm = data
|
|
|
+ // console.log(this.maintenanceList, 'array')
|
|
|
+ } else { //如果是表格操作
|
|
|
+ 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)
|
|
|
+ this.handleUpdataTable(
|
|
|
+ [
|
|
|
+ [this.row, "DPManufacturerID", null, data.venderId],
|
|
|
+ [this.row, "LedgerParam.EquipManufactor.Brand", null, data.brand],
|
|
|
+ [this.row, "LedgerParam.EquipManufactor.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) {
|
|
|
- let firm = {...data, num: 42}
|
|
|
- this.firmName = firm
|
|
|
- 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],
|
|
|
- [this.row, "LedgerParam.InsuranceDoc.Insurer", null, data.name]
|
|
|
- ],
|
|
|
- "edit"
|
|
|
- )
|
|
|
- // this.handleUpdataTable([[this.row, "LedgerParam.InsuranceDoc.Insurer", null, data.name]], "edit")
|
|
|
+ changeInsurer(data, type) {
|
|
|
+ if (type === 'dialog') {
|
|
|
+ let firm = {...data, num: 42}
|
|
|
+ this.firmName = firm
|
|
|
+ // this.maintenanceList.insurer = data
|
|
|
+ } else {
|
|
|
+ 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],
|
|
|
+ [this.row, "LedgerParam.InsuranceDoc.Insurer", null, data.name]
|
|
|
+ ],
|
|
|
+ "edit"
|
|
|
+ )
|
|
|
+ // this.handleUpdataTable([[this.row, "LedgerParam.InsuranceDoc.Insurer", null, data.name]], "edit")
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
//维修商变更
|
|
|
- changeMaintainer(data) {
|
|
|
- let firm = {...data, num: 35}
|
|
|
- this.firmName = firm
|
|
|
- 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],
|
|
|
- [this.row, "LedgerParam.OperationMainte.Maintainer", null, data.name]
|
|
|
- ],
|
|
|
- "edit"
|
|
|
- )
|
|
|
- // this.handleUpdataTable([[this.row, "LedgerParam.OperationMainte.Maintainer", null, data.name]], "edit")
|
|
|
+ changeMaintainer(data, type) {
|
|
|
+ if (type === 'dialog') {
|
|
|
+ let firm = {...data, num: 35}
|
|
|
+ this.firmName = firm
|
|
|
+ // this.maintenanceList.maintainer = data
|
|
|
+ } else {
|
|
|
+ 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],
|
|
|
+ [this.row, "LedgerParam.OperationMainte.Maintainer", null, data.name]
|
|
|
+ ],
|
|
|
+ "edit"
|
|
|
+ )
|
|
|
+ // this.handleUpdataTable([[this.row, "LedgerParam.OperationMainte.Maintainer", null, data.name]], "edit")
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
//修改关联的资产
|
|
|
changeProperty(val) {
|
|
@@ -1006,8 +1035,9 @@ export default {
|
|
|
},
|
|
|
// 批量信息维护
|
|
|
Batch() {
|
|
|
+ this.firmDataType = 'dialog'
|
|
|
this.$refs.batchDialogs.batchDialog = true
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
watch: {
|
|
|
projectId() {
|