|
@@ -544,7 +544,8 @@ export default {
|
|
|
biXuDeHuanJin: '核查人',
|
|
biXuDeHuanJin: '核查人',
|
|
|
biXuSheShi: '核查日期',
|
|
biXuSheShi: '核查日期',
|
|
|
weiHuFangShi: '设备分组',
|
|
weiHuFangShi: '设备分组',
|
|
|
- heChaXiaoZhun: '使用年限(年)'
|
|
|
|
|
|
|
+ heChaXiaoZhun: '使用年限(年)',
|
|
|
|
|
+ shiYongKeShi: '检定/校准单位'
|
|
|
},
|
|
},
|
|
|
projectColums: {
|
|
projectColums: {
|
|
|
yuanSheBeiBian: '设备编号*',
|
|
yuanSheBeiBian: '设备编号*',
|
|
@@ -959,7 +960,9 @@ export default {
|
|
|
},
|
|
},
|
|
|
async switchExportData (data) {
|
|
async switchExportData (data) {
|
|
|
const deviceGroupSql = `select id_,wei_hu_gang_wei_ from t_sbwhgwpzb` // 设备分组信息
|
|
const deviceGroupSql = `select id_,wei_hu_gang_wei_ from t_sbwhgwpzb` // 设备分组信息
|
|
|
|
|
+ const supplierSql = `select id_,gong_ying_shang_m from t_gysxxb` // 供应商信息
|
|
|
const { variables: { data: deviceGroupData }} = await this.$common.request('sql', deviceGroupSql)
|
|
const { variables: { data: deviceGroupData }} = await this.$common.request('sql', deviceGroupSql)
|
|
|
|
|
+ const { variables: { data: gysData }} = await this.$common.request('sql', supplierSql)
|
|
|
const exportData = JSON.parse(JSON.stringify(data))
|
|
const exportData = JSON.parse(JSON.stringify(data))
|
|
|
for (let i = 0; i < exportData.length; i++) {
|
|
for (let i = 0; i < exportData.length; i++) {
|
|
|
const item = exportData[i]
|
|
const item = exportData[i]
|
|
@@ -967,6 +970,7 @@ export default {
|
|
|
item.guanLiRen = this.switchIdToUserName(item.guanLiRen.split(',')[0])
|
|
item.guanLiRen = this.switchIdToUserName(item.guanLiRen.split(',')[0])
|
|
|
item.biXuDeHuanJin = this.switchIdToUserName(item.biXuDeHuanJin.split(',')[0])
|
|
item.biXuDeHuanJin = this.switchIdToUserName(item.biXuDeHuanJin.split(',')[0])
|
|
|
item.weiHuFangShi = this.switchDeviceIdToName(item.weiHuFangShi, deviceGroupData)
|
|
item.weiHuFangShi = this.switchDeviceIdToName(item.weiHuFangShi, deviceGroupData)
|
|
|
|
|
+ item.shiYongKeShi = this.switchGYSIdToName(item.shiYongKeShi, gysData)
|
|
|
}
|
|
}
|
|
|
return exportData
|
|
return exportData
|
|
|
},
|
|
},
|
|
@@ -977,6 +981,11 @@ export default {
|
|
|
valList.forEach(item => result.push((deviceGroupList?.find(i => i.id_ === item)?.wei_hu_gang_wei_) || ''))
|
|
valList.forEach(item => result.push((deviceGroupList?.find(i => i.id_ === item)?.wei_hu_gang_wei_) || ''))
|
|
|
return result.join(',')
|
|
return result.join(',')
|
|
|
},
|
|
},
|
|
|
|
|
+ // 供应商id 转 供应商名称 检定/校准单位
|
|
|
|
|
+ switchGYSIdToName (val, gysList) {
|
|
|
|
|
+ const result = gysList.find(item => item.id_ === val)?.gong_ying_shang_m || ''
|
|
|
|
|
+ return result
|
|
|
|
|
+ },
|
|
|
// 部门id 转 部门名称
|
|
// 部门id 转 部门名称
|
|
|
switchIdToDept (id) {
|
|
switchIdToDept (id) {
|
|
|
const { deptList } = this.$store.getters
|
|
const { deptList } = this.$store.getters
|
|
@@ -1294,6 +1303,17 @@ export default {
|
|
|
} else {
|
|
} else {
|
|
|
element.shiFouQiJianH = ''
|
|
element.shiFouQiJianH = ''
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ if (element.shiYongKeShi.trim()) {
|
|
|
|
|
+ const supplier = supplierList.find(i => i.gong_ying_shang_m === element.shiYongKeShi.trim())
|
|
|
|
|
+ if (supplier) {
|
|
|
|
|
+ element.shiYongKeShi = supplier.id_
|
|
|
|
|
+ } else {
|
|
|
|
|
+ element.shiYongKeShi = ''
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ element.shiYongKeShi = ''
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|