|
@ -52,22 +52,12 @@ |
|
|
<fieldset> |
|
|
<fieldset> |
|
|
<legend>基本信息</legend> |
|
|
<legend>基本信息</legend> |
|
|
<el-row :gutter="25"> |
|
|
<el-row :gutter="25"> |
|
|
<el-col |
|
|
<el-col v-if="state === 'create' || !ysjl.jilubianhao" :span="14"> |
|
|
v-if=" |
|
|
|
|
|
state === 'create' || |
|
|
|
|
|
ysjl.jilubianhao === null || |
|
|
|
|
|
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="jlbh4" style="width: 80px" disabled /> |
|
|
<el-input v-model="jlbh2" style="width: 80px" disabled /> |
|
|
<el-input v-model="jlbh2" style="width: 80px" disabled />- |
|
|
<el-input v-model="jlbh3" style="width: 80px" disabled />- |
|
|
<el-input |
|
|
<el-input v-model="jlbh4" style="width: 85px" /> |
|
|
v-model="jlbh3" |
|
|
|
|
|
style="width: 85px" |
|
|
|
|
|
/> |
|
|
|
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col v-else :span="9"> |
|
|
<el-col v-else :span="9"> |
|
@ -750,7 +740,7 @@ |
|
|
<el-row :gutter="10"> |
|
|
<el-row :gutter="10"> |
|
|
<el-col :span="9"> |
|
|
<el-col :span="9"> |
|
|
<el-form-item label="检验人员" prop="jianyanrenyuan"> |
|
|
<el-form-item label="检验人员" prop="jianyanrenyuan"> |
|
|
<el-input v-model="ysjl.jianyanrenyuan" disabled /> |
|
|
<el-input v-model="jianyanrenyuan" disabled /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="9"> |
|
|
<el-col :span="9"> |
|
@ -832,13 +822,6 @@ export default { |
|
|
required: true, |
|
|
required: true, |
|
|
type: Array |
|
|
type: Array |
|
|
}, |
|
|
}, |
|
|
// /** |
|
|
|
|
|
// * 格式为: [{ index: 0, relationIds: [1, 2] }] |
|
|
|
|
|
// */ |
|
|
|
|
|
// jyxmRelations: { |
|
|
|
|
|
// required: true, |
|
|
|
|
|
// type: Array |
|
|
|
|
|
// }, |
|
|
|
|
|
fromType: { |
|
|
fromType: { |
|
|
required: true, |
|
|
required: true, |
|
|
type: Number |
|
|
type: Number |
|
@ -852,8 +835,8 @@ export default { |
|
|
return { |
|
|
return { |
|
|
ysjl: {}, |
|
|
ysjl: {}, |
|
|
param: {}, |
|
|
param: {}, |
|
|
jlbh2: new Date().getFullYear(), |
|
|
jlbh2: '', |
|
|
jlbh3: '', |
|
|
jlbh3: new Date().getFullYear(), |
|
|
jlbh4: '', |
|
|
jlbh4: '', |
|
|
isRepeat: false, |
|
|
isRepeat: false, |
|
|
jianyanrenyuan: '', |
|
|
jianyanrenyuan: '', |
|
@ -863,17 +846,7 @@ export default { |
|
|
bgfyData: [], |
|
|
bgfyData: [], |
|
|
ysjlId: this.$route.query.id, |
|
|
ysjlId: this.$route.query.id, |
|
|
checkedTab: 'first', |
|
|
checkedTab: 'first', |
|
|
xmlbListAB: ['A', 'B'], |
|
|
|
|
|
xmlbListAC: ['A', 'C'], |
|
|
|
|
|
xmlbListBC: ['B', 'C'], |
|
|
|
|
|
jyxmrqShow: false, |
|
|
|
|
|
querenriqi: null, |
|
|
|
|
|
signShow: false, |
|
|
|
|
|
dialogEnclosureVisible: false, |
|
|
|
|
|
dialogRoleVisible: false, |
|
|
|
|
|
userList: [], |
|
|
userList: [], |
|
|
defaultRlr: [], |
|
|
|
|
|
renlingren: [], |
|
|
|
|
|
xinghaoList: [], |
|
|
xinghaoList: [], |
|
|
jybgData: [], |
|
|
jybgData: [], |
|
|
cols: [ |
|
|
cols: [ |
|
@ -914,14 +887,12 @@ export default { |
|
|
fubiao1: [], |
|
|
fubiao1: [], |
|
|
fubiao2: [], |
|
|
fubiao2: [], |
|
|
fubiao3: [], |
|
|
fubiao3: [], |
|
|
tree: [], |
|
|
tree: [] |
|
|
jybgTemplateId: '' |
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
|
if (this.state === 'create') { |
|
|
if (this.state === 'create') { |
|
|
this.initYsjl() |
|
|
this.initYsjl() |
|
|
this.getMaxBh() |
|
|
|
|
|
if (this.fromType === 5 || this.fromType === 6) { |
|
|
if (this.fromType === 5 || this.fromType === 6) { |
|
|
this.fubiao1 = [ |
|
|
this.fubiao1 = [ |
|
|
{ |
|
|
{ |
|
@ -968,22 +939,21 @@ export default { |
|
|
this.ysjl.xianchangjianyantiaojian = '符合' |
|
|
this.ysjl.xianchangjianyantiaojian = '符合' |
|
|
this.departmentId = this.ysjl.departmentId |
|
|
this.departmentId = this.ysjl.departmentId |
|
|
if (data.ysjl.shebeileibiedaima === '3300') { |
|
|
if (data.ysjl.shebeileibiedaima === '3300') { |
|
|
this.jlbh4 = '(F)' |
|
|
this.jlbh2 = '(F)' |
|
|
} else if (data.ysjl.shebeileibiedaima === '3200') { |
|
|
} else if (data.ysjl.shebeileibiedaima === '3200') { |
|
|
this.jlbh4 = '(Y)' |
|
|
this.jlbh2 = '(Y)' |
|
|
} else if (data.ysjl.shebeileibiedaima === '3400') { |
|
|
} else if (data.ysjl.shebeileibiedaima === '3400') { |
|
|
if (data.ysjl.shebeipinzhongdaima === '3420') { |
|
|
if (data.ysjl.shebeipinzhongdaima === '3420') { |
|
|
this.jlbh4 = '(X)' |
|
|
this.jlbh2 = '(X)' |
|
|
} else if (data.ysjl.shebeipinzhongdaima === '3430') { |
|
|
} else if (data.ysjl.shebeipinzhongdaima === '3430') { |
|
|
this.jlbh4 = '(Z)' |
|
|
this.jlbh2 = '(Z)' |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
this.jlbh4 = '(C)' |
|
|
this.jlbh2 = '(C)' |
|
|
} |
|
|
} |
|
|
this.getJyxm(1) |
|
|
this.getJyxm(1) |
|
|
this.getSbList() |
|
|
this.getSbList() |
|
|
this.jybgTemplateId = this.ysjl.jybgTemplateId |
|
|
this.getMaxBh() |
|
|
console.log(this.ysjl.jybgTemplateId) |
|
|
|
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
getSbList() { |
|
|
getSbList() { |
|
@ -1017,14 +987,12 @@ export default { |
|
|
if (fubiao[2]) { |
|
|
if (fubiao[2]) { |
|
|
this.fubiao3 = fubiao[2] |
|
|
this.fubiao3 = fubiao[2] |
|
|
} |
|
|
} |
|
|
console.log(this.fubiao1) |
|
|
|
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
getYsjl() { |
|
|
getYsjl() { |
|
|
this.ysjlService.getYsjl(this.ysjlId).then((data) => { |
|
|
this.ysjlService.getYsjl(this.ysjlId).then((data) => { |
|
|
this.ysjl = data |
|
|
this.ysjl = data |
|
|
this.departmentId = this.ysjl.departmentId |
|
|
this.departmentId = this.ysjl.departmentId |
|
|
this.jybgTemplateId = this.ysjl.jybgTemplateId |
|
|
|
|
|
this.ysjl.imagePath = '' |
|
|
this.ysjl.imagePath = '' |
|
|
if ( |
|
|
if ( |
|
|
this.ysjl.jianyanrenyuan !== null && |
|
|
this.ysjl.jianyanrenyuan !== null && |
|
@ -1101,7 +1069,7 @@ export default { |
|
|
* 查询最大记录编号 |
|
|
* 查询最大记录编号 |
|
|
*/ |
|
|
*/ |
|
|
getMaxBh() { |
|
|
getMaxBh() { |
|
|
const aheadPart = this.jlbh1 + this.jlbh2 + '-' |
|
|
const aheadPart = this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' |
|
|
this.api({ |
|
|
this.api({ |
|
|
url: '/ysjl/gainCurrentBh', |
|
|
url: '/ysjl/gainCurrentBh', |
|
|
method: 'get', |
|
|
method: 'get', |
|
@ -1110,7 +1078,7 @@ export default { |
|
|
hinderPart: '' |
|
|
hinderPart: '' |
|
|
} |
|
|
} |
|
|
}).then((data) => { |
|
|
}).then((data) => { |
|
|
this.jlbh3 = data |
|
|
this.jlbh4 = data |
|
|
this.ysjlService |
|
|
this.ysjlService |
|
|
.judgeRepeat(this.ysjl.jilubianhao, this.ysjl.id) |
|
|
.judgeRepeat(this.ysjl.jilubianhao, this.ysjl.id) |
|
|
.then((data) => { |
|
|
.then((data) => { |
|
@ -1174,54 +1142,52 @@ export default { |
|
|
return sorted |
|
|
return sorted |
|
|
}, |
|
|
}, |
|
|
buildSaveData(operation) { |
|
|
buildSaveData(operation) { |
|
|
const tableData = [] |
|
|
|
|
|
const _this = this |
|
|
|
|
|
let fubiao |
|
|
let fubiao |
|
|
if (this.fromType === 5 || this.fromType === 6) { |
|
|
if (this.fromType === 5 || this.fromType === 6) { |
|
|
console.log(this.$refs.table4.tableData, 5555) |
|
|
|
|
|
fubiao = [this.$refs.table4.tableData] |
|
|
fubiao = [this.$refs.table4.tableData] |
|
|
} else { |
|
|
} else { |
|
|
fubiao = [this.fubiao1, this.fubiao2, this.fubiao3] |
|
|
fubiao = [this.fubiao1, this.fubiao2, this.fubiao3] |
|
|
} |
|
|
} |
|
|
let arr = [] |
|
|
|
|
|
const subArr = this.sortClass(this.jybgData) |
|
|
const subArr = this.sortClass(this.bgfyData) |
|
|
subArr.map((item) => { |
|
|
subArr.forEach((item) => { |
|
|
if ( |
|
|
if (item.some((k) => k.jianyanjieguo.indexOf('X') === 0)) { |
|
|
item.some( |
|
|
this.jybgData[item[0].jybgJyjlIndex - 1].jianyanjielun = '不合格' |
|
|
(k) => k.jianyanjieguo === '不符合' || k.jianyanjieguo === 'X' |
|
|
} else if (item.every((k) => k.jianyanjieguo.indexOf('√') === 0)) { |
|
|
) |
|
|
this.jybgData[item[0].jybgJyjlIndex - 1].jianyanjielun = '合格' |
|
|
) { |
|
|
} else if (item.every((k) => k.jianyanjieguo.indexOf('/') === 0)) { |
|
|
_this.jybgData[item[0].jybgJyjlIndex - 1].jianyanjielun = '不合格' |
|
|
this.jybgData[item[0].jybgJyjlIndex - 1].jianyanjielun = '无此项' |
|
|
} else if ( |
|
|
|
|
|
item.every( |
|
|
|
|
|
(k) => k.jianyanjieguo === '符合' || k.jianyanjieguo === '√' |
|
|
|
|
|
) |
|
|
|
|
|
) { |
|
|
|
|
|
_this.jybgData[item[0].jybgJyjlIndex - 1].jianyanjielun = '合格' |
|
|
|
|
|
} else if ( |
|
|
|
|
|
item.every( |
|
|
|
|
|
(k) => k.jianyanjieguo === '无此项' || k.jianyanjieguo === '/' |
|
|
|
|
|
) |
|
|
|
|
|
) { |
|
|
|
|
|
_this.jybgData[item[0].jybgJyjlIndex - 1].jianyanjielun = '无此项' |
|
|
|
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
arr = arr.concat(this.bgfyData, this.jybgData) |
|
|
const tableData = [] |
|
|
arr.forEach((row) => { |
|
|
this.bgfyData.forEach((row) => { |
|
|
tableData.push({ |
|
|
tableData.push({ |
|
|
ysjlId: this.ysjlId, |
|
|
ysjlId: this.ysjlId, |
|
|
beizhu: row.beizhu, |
|
|
beizhu: row.beizhu, |
|
|
dicJyxmId: row.dicJyxmId, |
|
|
dicJyxmId: row.dicJyxmId, |
|
|
jianyanjieguo: row.jianyanjieguo ? row.jianyanjieguo : '', |
|
|
jianyanjieguo: row.jianyanjieguo || '', |
|
|
jianyanjielun: row.jianyanjielun ? row.jianyanjielun : '', |
|
|
jianyanjielun: row.jianyanjielun || '', |
|
|
jyxmMode: 0, |
|
|
jyxmMode: 0, |
|
|
sort: row.sort, |
|
|
sort: row.sort, |
|
|
orders: row.orders, |
|
|
orders: row.orders, |
|
|
cjState: 0 |
|
|
cjState: 0 |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
|
|
|
this.jybgData.forEach((row) => { |
|
|
|
|
|
tableData.push({ |
|
|
|
|
|
ysjlId: this.ysjlId, |
|
|
|
|
|
beizhu: row.beizhu, |
|
|
|
|
|
dicJyxmId: row.dicJyxmId, |
|
|
|
|
|
jianyanjieguo: row.jianyanjieguo || '', |
|
|
|
|
|
jianyanjielun: row.jianyanjielun || '', |
|
|
|
|
|
jyxmMode: 0, |
|
|
|
|
|
sort: row.sort, |
|
|
|
|
|
orders: row.orders, |
|
|
|
|
|
cjState: 1 |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
if (operation === 'add') { |
|
|
if (operation === 'add') { |
|
|
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh4 + this.jlbh2 + '-' + this.jlbh3 |
|
|
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + this.jlbh4 |
|
|
this.save(operation, 'post', tableData, fubiao) |
|
|
this.save(operation, 'post', tableData, fubiao) |
|
|
} else if (operation === 'build') { |
|
|
} else if (operation === 'build') { |
|
|
this.ysjl.baogaobianhao = this.ysjl.jilubianhao |
|
|
this.ysjl.baogaobianhao = this.ysjl.jilubianhao |
|
@ -1245,21 +1211,12 @@ export default { |
|
|
}) |
|
|
}) |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
|
// for (let i = 0; i < this.bgfyData.length; i++) { |
|
|
|
|
|
// if (!this.bgfyData[i].jianjianyuan || !this.bgfyData[i].querenriqi) { |
|
|
|
|
|
// this.$message.error( |
|
|
|
|
|
// '请将检验项目中的监检人员及监检日期填写完毕,再生成报告!' |
|
|
|
|
|
// ) |
|
|
|
|
|
// return false |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
|
|
|
this.save(operation, 'put', tableData, fubiao) |
|
|
this.save(operation, 'put', tableData, fubiao) |
|
|
} else if (operation === 'upd') { |
|
|
} else if (operation === 'upd') { |
|
|
this.save(operation, 'put', tableData, fubiao) |
|
|
this.save(operation, 'put', tableData, fubiao) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
save(operation, type, jyxm, fubiao) { |
|
|
save(operation, type, jyxm, fubiao) { |
|
|
console.log(this.jybgData, 2222) |
|
|
|
|
|
if (this.fromType !== 5 && this.fromType !== 6) { this.ysjl.imagePath = this.$refs.table1.imgPath } |
|
|
if (this.fromType !== 5 && this.fromType !== 6) { this.ysjl.imagePath = this.$refs.table1.imgPath } |
|
|
|
|
|
|
|
|
// 判断报告编号是否重复 |
|
|
// 判断报告编号是否重复 |
|
@ -1283,7 +1240,7 @@ export default { |
|
|
fbjyxm: JSON.stringify(fubiao) |
|
|
fbjyxm: JSON.stringify(fubiao) |
|
|
}, |
|
|
}, |
|
|
jdJyxm: jyxm, |
|
|
jdJyxm: jyxm, |
|
|
flag: operation |
|
|
state: operation |
|
|
} |
|
|
} |
|
|
}).then((data) => { |
|
|
}).then((data) => { |
|
|
Utils.$emit('ysjl-db-list') |
|
|
Utils.$emit('ysjl-db-list') |
|
@ -1297,7 +1254,6 @@ export default { |
|
|
// 刷新路由网址 |
|
|
// 刷新路由网址 |
|
|
this.common.reloadViewToUpdateYsjl(this.ysjl) |
|
|
this.common.reloadViewToUpdateYsjl(this.ysjl) |
|
|
} else if (operation === 'upd') { |
|
|
} else if (operation === 'upd') { |
|
|
this.dialogRoleVisible = false |
|
|
|
|
|
this.$message({ message: '更新成功', type: 'success' }) |
|
|
this.$message({ message: '更新成功', type: 'success' }) |
|
|
// 替换路由中的参数 |
|
|
// 替换路由中的参数 |
|
|
this.$router.push({ |
|
|
this.$router.push({ |
|
@ -1341,12 +1297,7 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
changXh: function(val) { |
|
|
changXh: function(val) { |
|
|
const xinghao = this.xinghaoList.filter((xh) => xh.xinghao === val)[0] |
|
|
// TODO |
|
|
this.$set( |
|
|
|
|
|
this.param, |
|
|
|
|
|
'jiandingbaogaobianhao', |
|
|
|
|
|
(xinghao && xinghao.jiandingbaogaobianhao) || '' |
|
|
|
|
|
) |
|
|
|
|
|
}, |
|
|
}, |
|
|
loadPhxsImage(data) { |
|
|
loadPhxsImage(data) { |
|
|
this.pic = data |
|
|
this.pic = data |
|
|