|
|
@ -23,7 +23,7 @@ |
|
|
|
<fieldset> |
|
|
|
<legend>基本信息</legend> |
|
|
|
<el-row :gutter="25"> |
|
|
|
<el-col v-if="state === 'create' || ysjl.jilubianhao === null || ysjl.jilubianhao === ''" :span="14"> |
|
|
|
<el-col v-if="state === 'create' || !ysjl.jilubianhao" :span="14"> |
|
|
|
<el-form-item label="记录编号"> |
|
|
|
<el-input v-model="jlbh1" style="width:80px" disabled /> |
|
|
|
<el-input v-model="jlbh2" style="width:80px" disabled />- |
|
|
@ -278,24 +278,24 @@ |
|
|
|
<fieldset> |
|
|
|
<legend>使用的主要设备</legend> |
|
|
|
<el-table ref="yqsbData" :data="yqsbData" border stripe style="width:100%"> |
|
|
|
<el-table-column align="center" prop="C1" label="编号"> |
|
|
|
<el-table-column align="center" prop="D4" label="编号"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input v-model="scope.row.C1" :label="scope.row.C2" /> |
|
|
|
<el-input v-model="scope.row.D4" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column align="center" prop="C2" label="仪器名称"> |
|
|
|
<el-table-column align="center" prop="D3" label="仪器名称"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input v-model="scope.row.C2" type="text" /> |
|
|
|
<el-input v-model="scope.row.D3" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column align="center" prop="C3" label="编号"> |
|
|
|
<el-table-column align="center" prop="D2" label="编号"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input v-model="scope.row.C3" /> |
|
|
|
<el-input v-model="scope.row.D2" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column align="center" prop="C4" label="仪器名称"> |
|
|
|
<el-table-column align="center" prop="D1" label="仪器名称"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input v-model="scope.row.C4" /> |
|
|
|
<el-input v-model="scope.row.D1" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
@ -453,10 +453,10 @@ export default { |
|
|
|
checkedTab: 'first', |
|
|
|
jyxmData: [], |
|
|
|
yqsbData: [ |
|
|
|
{ C1: '05-30-01', C2: '多功能电位滴定仪', C3: '05-26-01', C4: '锅炉用水多离子测定仪' }, |
|
|
|
{ C1: '05-07-06', C2: '台式电导率分析仪', C3: 'JS-25-01', C4: '碱式滴定管' }, |
|
|
|
{ C1: '010233100054', C2: 'PH计', C3: 'SS-25-05', C4: '酸式滴定管' }, |
|
|
|
{ C1: '05-13-03', C2: '台式浊度分析仪', C3: '05-04-04', C4: '电子天平' } |
|
|
|
{ D4: '05-30-01', D3: '多功能电位滴定仪', D2: '05-26-01', D1: '锅炉用水多离子测定仪' }, |
|
|
|
{ D4: '05-07-06', D3: '台式电导率分析仪', D2: 'JS-25-01', D1: '碱式滴定管' }, |
|
|
|
{ D4: '010233100054', D3: 'PH计', D2: 'SS-25-05', D1: '酸式滴定管' }, |
|
|
|
{ D4: '05-13-03', D3: '台式浊度分析仪', D2: '05-04-04', D1: '电子天平' } |
|
|
|
], |
|
|
|
// 表格合并相关 |
|
|
|
// 参与列合并的字段,在这里增加即可 |
|
|
@ -490,13 +490,11 @@ export default { |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
jilubianhao: function() { |
|
|
|
let bianhao |
|
|
|
if (this.ysjl.jilubianhao === null || this.ysjl.jilubianhao === undefined || this.ysjl.jilubianhao === '') { |
|
|
|
return this.jlbh1 + this.jlbh2 + '-' + this.jlbh3 |
|
|
|
if (this.ysjl.jilubianhao) { |
|
|
|
return this.judgeRepeat(this.ysjl.jilubianhao, this.ysjl.id) |
|
|
|
} else { |
|
|
|
bianhao = this.ysjl.jilubianhao |
|
|
|
return this.jlbh1 + this.jlbh2 + '-' + this.jlbh3 |
|
|
|
} |
|
|
|
return this.judgeRepeat(bianhao, this.ysjl.id) |
|
|
|
} |
|
|
|
}, |
|
|
|
watch: { |
|
|
@ -513,8 +511,7 @@ export default { |
|
|
|
this.initYsjl() |
|
|
|
} else { |
|
|
|
this.getYsjl(this.ysjlId) |
|
|
|
this.getFbjyxm(this.ysjlId) |
|
|
|
this.getJyxmByYsjl(this.ysjlId) |
|
|
|
this.getJyxmInfoByYsjl() |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
@ -560,7 +557,7 @@ export default { |
|
|
|
ysjlId: id |
|
|
|
} |
|
|
|
}).then(data => { |
|
|
|
this.ysjl = data.ysjl |
|
|
|
this.ysjl = data |
|
|
|
if (this.ysjl.jianyanrenyuan) { |
|
|
|
this.jianyanrenyuan = this.common.convertCnName(this.ysjl.jianyanrenyuan) |
|
|
|
} |
|
|
@ -569,6 +566,7 @@ export default { |
|
|
|
} |
|
|
|
this.judgeRepeat(this.ysjl.jilubianhao, this.ysjl.id) |
|
|
|
this.getParam(this.ysjl.id, this.ysjl.shebeizhongleidaima) |
|
|
|
this.getJyxmByYsjl() |
|
|
|
}) |
|
|
|
}, |
|
|
|
getParam(ysjlId, sbzldm) { |
|
|
@ -625,30 +623,32 @@ export default { |
|
|
|
this.tableJs.getData(this.cols, this.rows, this.jyxmData) |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 查询仪器设备 |
|
|
|
getFbjyxm(id) { |
|
|
|
/** |
|
|
|
* 查询仪器设备 |
|
|
|
*/ |
|
|
|
getJyxmInfoByYsjl() { |
|
|
|
this.api({ |
|
|
|
url: '/jyxm/getJyxmInfoByYsjl', |
|
|
|
method: 'get', |
|
|
|
params: { |
|
|
|
ysjlId: id, |
|
|
|
type: 'fbjyxm' |
|
|
|
ysjlId: this.ysjlId |
|
|
|
} |
|
|
|
}).then(data => { |
|
|
|
this.yqsbData = JSON.parse(data) |
|
|
|
this.yqsbData = JSON.parse(data.fbjyxm)[0] |
|
|
|
}) |
|
|
|
}, |
|
|
|
getJyxmByYsjl(id) { |
|
|
|
getJyxmByYsjl() { |
|
|
|
this.api({ |
|
|
|
url: '/jyxm/getCyJyxmByYsjl', |
|
|
|
method: 'get', |
|
|
|
params: { |
|
|
|
ysjlId: id, |
|
|
|
ysjlId: this.ysjlId, |
|
|
|
templateId: this.ysjl.templateId, |
|
|
|
isReport: false, |
|
|
|
order: 1 |
|
|
|
} |
|
|
|
}).then(data => { |
|
|
|
this.jyxmData = JSON.parse(JSON.stringify(data)) |
|
|
|
this.jyxmData = data |
|
|
|
this.tableJs.getData(this.cols, this.rows, this.jyxmData) |
|
|
|
}) |
|
|
|
}, |
|
|
@ -723,9 +723,8 @@ export default { |
|
|
|
} else { |
|
|
|
this.$refs['param'].validate(valid => { |
|
|
|
if (valid) { |
|
|
|
const tableData = [] // 检验项目存储 |
|
|
|
tableData.push(this.getProp(operation)) |
|
|
|
const jyxm = JSON.stringify([tableData]) |
|
|
|
// 检验项目存储 |
|
|
|
const jyxm = JSON.stringify([this.getProp(operation)]) |
|
|
|
this.api({ |
|
|
|
url: '/ysjl', |
|
|
|
method: type, |
|
|
@ -734,7 +733,7 @@ export default { |
|
|
|
param: this.param, |
|
|
|
cyJyxm: { |
|
|
|
jyxm: jyxm, |
|
|
|
fbjyxm: JSON.stringify(this.yqsbData), |
|
|
|
fbjyxm: JSON.stringify([this.yqsbData]), |
|
|
|
bgjyxm: jyxm |
|
|
|
}, |
|
|
|
flag: operation |
|
|
|