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