|
@ -239,9 +239,10 @@ |
|
|
> |
|
|
> |
|
|
<el-cascader |
|
|
<el-cascader |
|
|
ref="editCascader" |
|
|
ref="editCascader" |
|
|
v-model="bjd.quhuadaima" |
|
|
v-model="quhuadaimas" |
|
|
placeholder="请选择" |
|
|
placeholder="请选择" |
|
|
:options="areaList" |
|
|
:options="areaList" |
|
|
|
|
|
style="width: 100%;" |
|
|
@change="quhuaChange" |
|
|
@change="quhuaChange" |
|
|
/> |
|
|
/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
@ -288,8 +289,8 @@ |
|
|
> |
|
|
> |
|
|
<el-date-picker |
|
|
<el-date-picker |
|
|
v-model="bjd.baojianriqi" |
|
|
v-model="bjd.baojianriqi" |
|
|
type="datetime" |
|
|
type="date" |
|
|
value-format="yyyy-MM-dd HH:mm:ss" |
|
|
value-format="yyyy-MM-dd" |
|
|
placeholder="选择日期" |
|
|
placeholder="选择日期" |
|
|
style="width: 98%" |
|
|
style="width: 98%" |
|
|
/> |
|
|
/> |
|
@ -309,16 +310,16 @@ |
|
|
> |
|
|
> |
|
|
<el-date-picker |
|
|
<el-date-picker |
|
|
v-model="bjd.shouliriqi" |
|
|
v-model="bjd.shouliriqi" |
|
|
type="datetime" |
|
|
type="date" |
|
|
value-format="yyyy-MM-dd HH:mm:ss" |
|
|
value-format="yyyy-MM-dd" |
|
|
placeholder="选择日期" |
|
|
placeholder="选择日期" |
|
|
style="width: 95%" |
|
|
style="width: 100%;" |
|
|
/> |
|
|
/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
<el-row v-if="!(bjd.shebeizhongleidaima === '1000')" :gutter="20"> |
|
|
<el-row v-if="!(bjd.shebeizhongleidaima === '1000')" :gutter="20"> |
|
|
<el-col :span="18"> |
|
|
<el-col :span="18" style="height: auto;"> |
|
|
<el-form-item label="备注:" prop="beizhu"> |
|
|
<el-form-item label="备注:" prop="beizhu"> |
|
|
<el-input |
|
|
<el-input |
|
|
v-model="bjd.bjdBeizhu" |
|
|
v-model="bjd.bjdBeizhu" |
|
@ -328,20 +329,20 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
<div v-if="formState === 'finish'" style="margin-top: 10px"> |
|
|
<template v-if="formState === 'finish'"> |
|
|
<el-row> |
|
|
<el-row :gutter="20"> |
|
|
<el-col :span="9"> |
|
|
<el-col :span="9"> |
|
|
<el-form-item label="受理人:" prop="shouliren"> |
|
|
<el-form-item label="受理人:" prop="shouliren"> |
|
|
<el-input v-model="bjd.shouliren" type="text" /> |
|
|
<el-input :model="formatter.getChineseName(null, null, bjd.shouliren)" type="text" disabled /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="9"> |
|
|
<el-col :span="9"> |
|
|
<el-form-item label="最后修改人:" prop="updateBy"> |
|
|
<el-form-item label="最后修改人:" prop="updateBy"> |
|
|
<el-input v-model="bjd.updateBy" type="text" /> |
|
|
<el-input :model="formatter.getChineseName(null, null, bjd.updateBy)" type="text" disabled /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
</div> |
|
|
</template> |
|
|
<el-row :gutter="20"> |
|
|
<el-row :gutter="20"> |
|
|
<el-col :span="9"> |
|
|
<el-col :span="9"> |
|
|
<el-form-item |
|
|
<el-form-item |
|
@ -359,6 +360,56 @@ |
|
|
<el-input v-model="bjd.baojiandianhua" type="text" /> |
|
|
<el-input v-model="bjd.baojiandianhua" type="text" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
|
|
|
<el-col :span="9"> |
|
|
|
|
|
<el-form-item |
|
|
|
|
|
:rules="[ |
|
|
|
|
|
{ |
|
|
|
|
|
required: true, |
|
|
|
|
|
message: |
|
|
|
|
|
'检验科室电话不能为空', |
|
|
|
|
|
trigger: 'change', |
|
|
|
|
|
}, |
|
|
|
|
|
]" |
|
|
|
|
|
label="检验科室电话:" |
|
|
|
|
|
prop="departmentDianhua" |
|
|
|
|
|
> |
|
|
|
|
|
<el-input v-model="bjd.departmentDianhua" type="text" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
<el-row :gutter="20"> |
|
|
|
|
|
<el-col :span="9"> |
|
|
|
|
|
<el-form-item |
|
|
|
|
|
:rules="[ |
|
|
|
|
|
{ |
|
|
|
|
|
required: true, |
|
|
|
|
|
message: |
|
|
|
|
|
'报告查询电话不能为空', |
|
|
|
|
|
trigger: 'change', |
|
|
|
|
|
}, |
|
|
|
|
|
]" |
|
|
|
|
|
label="报告查询电话:" |
|
|
|
|
|
prop="reportQueryDianhua" |
|
|
|
|
|
> |
|
|
|
|
|
<el-input v-model="bjd.reportQueryDianhua" type="text" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="9"> |
|
|
|
|
|
<el-form-item |
|
|
|
|
|
:rules="[ |
|
|
|
|
|
{ |
|
|
|
|
|
required: true, |
|
|
|
|
|
message: |
|
|
|
|
|
'报检受理电话不能为空', |
|
|
|
|
|
trigger: 'change', |
|
|
|
|
|
}, |
|
|
|
|
|
]" |
|
|
|
|
|
label="报检受理电话:" |
|
|
|
|
|
prop="inspectionAcceptanceDianhua" |
|
|
|
|
|
> |
|
|
|
|
|
<el-input v-model="bjd.inspectionAcceptanceDianhua" type="text" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
</fieldset> |
|
|
</fieldset> |
|
|
</el-form> |
|
|
</el-form> |
|
@ -1541,7 +1592,8 @@ export default { |
|
|
fixedWidth: '', |
|
|
fixedWidth: '', |
|
|
isShengju: true, |
|
|
isShengju: true, |
|
|
form: this.$route.params.form, |
|
|
form: this.$route.params.form, |
|
|
areaList: [] |
|
|
areaList: [], |
|
|
|
|
|
quhuadaimas: [] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
watch: { |
|
|
watch: { |
|
@ -1556,19 +1608,21 @@ export default { |
|
|
if (this.formState === 'newBuild') { |
|
|
if (this.formState === 'newBuild') { |
|
|
this.isShengju = false |
|
|
this.isShengju = false |
|
|
this.tableData = [] |
|
|
this.tableData = [] |
|
|
this.$set(this.bjd, 'shouliriqi', new Date()) |
|
|
const date = this.formatter.dateFormat('YYYY-MM-dd') |
|
|
this.$set(this.bjd, 'baojianriqi', new Date()) |
|
|
this.$set(this.bjd, 'shouliriqi', date) |
|
|
this.getSblb() |
|
|
this.$set(this.bjd, 'baojianriqi', date) |
|
|
} else if (this.formState === 'update' || this.formState === 'finish') { |
|
|
} else if (this.formState === 'update' || this.formState === 'finish') { |
|
|
// 查询报检信息 |
|
|
// 查询报检信息 |
|
|
this.getBjdInfo() |
|
|
this.getBjdInfo() |
|
|
|
|
|
// 查询报检参数信息 |
|
|
|
|
|
this.getParamById() |
|
|
} else if (this.formState === 'create') { |
|
|
} else if (this.formState === 'create') { |
|
|
// 直接起草过来的数据 |
|
|
// 直接起草过来的数据 |
|
|
this.getSblb() |
|
|
|
|
|
// 先加载当前的数据 |
|
|
// 先加载当前的数据 |
|
|
// this.tableData = this.$route.query.params |
|
|
// this.tableData = this.$route.query.params |
|
|
this.getParamList(this.$route.query.params, true) |
|
|
this.getParamList(this.$route.query.params, true) |
|
|
} |
|
|
} |
|
|
|
|
|
this.getSblb() |
|
|
if (this.sbzldm === 'F000') { |
|
|
if (this.sbzldm === 'F000') { |
|
|
this.templateName = '安全阀报检导入模板.xlsx' |
|
|
this.templateName = '安全阀报检导入模板.xlsx' |
|
|
} |
|
|
} |
|
@ -1583,7 +1637,7 @@ export default { |
|
|
methods: { |
|
|
methods: { |
|
|
getArea() { |
|
|
getArea() { |
|
|
this.api({ |
|
|
this.api({ |
|
|
url: '/area/getAll', |
|
|
url: '/area/all', |
|
|
method: 'get', |
|
|
method: 'get', |
|
|
params: {} |
|
|
params: {} |
|
|
}).then(res => { |
|
|
}).then(res => { |
|
@ -1605,10 +1659,12 @@ export default { |
|
|
// ***第一次起草 |
|
|
// ***第一次起草 |
|
|
if (init) { |
|
|
if (init) { |
|
|
this.bjd = this.tableData[0] // 将第一条数据给报检单基本信息赋值 |
|
|
this.bjd = this.tableData[0] // 将第一条数据给报检单基本信息赋值 |
|
|
this.$set(this.bjd, 'shouliriqi', new Date()) |
|
|
const date = this.formatter.dateFormat('YYYY-MM-dd') |
|
|
this.$set(this.bjd, 'baojianriqi', new Date()) |
|
|
this.$set(this.bjd, 'shouliriqi', date) |
|
|
|
|
|
this.$set(this.bjd, 'baojianriqi', date) |
|
|
this.bjd.lingqufangshi = '自取' |
|
|
this.bjd.lingqufangshi = '自取' |
|
|
} |
|
|
} |
|
|
|
|
|
this.loadQuhua() |
|
|
if (this.bjd.shebeizhongleidaima === '3000') { |
|
|
if (this.bjd.shebeizhongleidaima === '3000') { |
|
|
this.$set(this.bjd, 'baojiandianhua', this.bjd.weibaodanweiDianhua) |
|
|
this.$set(this.bjd, 'baojiandianhua', this.bjd.weibaodanweiDianhua) |
|
|
} |
|
|
} |
|
@ -1622,33 +1678,38 @@ export default { |
|
|
}, |
|
|
}, |
|
|
getBjdInfo() { |
|
|
getBjdInfo() { |
|
|
this.apibjd({ |
|
|
this.apibjd({ |
|
|
url: '/bjd/getBjdById', |
|
|
url: '/bjd', |
|
|
method: 'get', |
|
|
method: 'get', |
|
|
params: { |
|
|
params: { |
|
|
bjdId: this.$route.params.id |
|
|
bjdId: this.$route.params.id |
|
|
} |
|
|
} |
|
|
}).then((data) => { |
|
|
}).then((data) => { |
|
|
this.bjd = data |
|
|
this.bjd = data |
|
|
if ( |
|
|
if (!this.bjd.baojiandianhua) { |
|
|
this.bjd.baojiandianhua === undefined || |
|
|
|
|
|
this.bjd.baojiandianhua === null |
|
|
|
|
|
) { |
|
|
|
|
|
this.bjd.baojiandianhua = this.bjd.weibaodanweiDianhua |
|
|
this.bjd.baojiandianhua = this.bjd.weibaodanweiDianhua |
|
|
} |
|
|
} |
|
|
this.getSblb() |
|
|
this.loadQuhua() |
|
|
// 查询报检参数信息 |
|
|
|
|
|
this.getParamById() |
|
|
|
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
loadQuhua() { |
|
|
|
|
|
if (!this.bjd || !this.bjd.quhuadaima) { |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const qhdm = this.bjd.quhuadaima |
|
|
|
|
|
this.quhuadaimas = [qhdm.substr(0, 2).padEnd(6, '0'), qhdm.substr(0, 4).padEnd(6, '0'), qhdm] |
|
|
|
|
|
console.log(this.quhuadaimas) |
|
|
|
|
|
}, |
|
|
getParamById() { |
|
|
getParamById() { |
|
|
this.apibjd({ |
|
|
this.apibjd({ |
|
|
url: '/renwu/getParamByBjdId', |
|
|
url: '/renwu/getParamByBjdId', |
|
|
method: 'get', |
|
|
method: 'get', |
|
|
params: { |
|
|
params: { |
|
|
bjdId: this.bjd.id |
|
|
bjdId: this.$route.params.id |
|
|
} |
|
|
} |
|
|
}).then((data) => { |
|
|
}).then((data) => { |
|
|
this.tableData = data |
|
|
this.tableData = data |
|
|
|
|
|
this.$refs.bjBaseList.doLayout() |
|
|
for (const tableObj of this.tableData) { |
|
|
for (const tableObj of this.tableData) { |
|
|
const sblbpz = [] |
|
|
const sblbpz = [] |
|
|
// 如果设备类别代码不存在,或者设备类别代码是设备种类代码时 |
|
|
// 如果设备类别代码不存在,或者设备类别代码是设备种类代码时 |
|
@ -1842,8 +1903,9 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
quhuaChange(val) { |
|
|
quhuaChange(val) { |
|
|
const arr = this.$refs['editCascader'].getCheckedNodes()[0].pathLabels |
|
|
const data = this.$refs.editCascader.getCheckedNodes()[0].data |
|
|
this.bjd.quhuamingcheng = arr.toString() |
|
|
this.bjd.quhuamingcheng = data.label |
|
|
|
|
|
this.bjd.quhuadaima = data.value |
|
|
}, |
|
|
}, |
|
|
tableRowClassName({ row, rowIndex }) { |
|
|
tableRowClassName({ row, rowIndex }) { |
|
|
row.index = rowIndex |
|
|
row.index = rowIndex |
|
@ -2126,7 +2188,6 @@ export default { |
|
|
this.selection[i].sblbpz = sblbpz |
|
|
this.selection[i].sblbpz = sblbpz |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
this.tableData.push() |
|
|
|
|
|
this.dialogFormParam = false |
|
|
this.dialogFormParam = false |
|
|
}, |
|
|
}, |
|
|
delRow: function() { |
|
|
delRow: function() { |
|
@ -2202,26 +2263,8 @@ export default { |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
formTime(v) { |
|
|
|
|
|
const date = new Date(v) |
|
|
|
|
|
const y = date.getFullYear() |
|
|
|
|
|
let m = date.getMonth() + 1 |
|
|
|
|
|
m = m < 10 ? '0' + m : m |
|
|
|
|
|
let d = date.getDate() |
|
|
|
|
|
d = d < 10 ? '0' + d : d |
|
|
|
|
|
const h = date.getHours() |
|
|
|
|
|
let minute = date.getMinutes() |
|
|
|
|
|
minute = minute < 10 ? '0' + minute : minute |
|
|
|
|
|
const seconds = |
|
|
|
|
|
date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds() |
|
|
|
|
|
const time = |
|
|
|
|
|
y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + seconds |
|
|
|
|
|
return time |
|
|
|
|
|
}, |
|
|
|
|
|
// 报检单保存 |
|
|
// 报检单保存 |
|
|
bjdSave(audit) { |
|
|
bjdSave(audit) { |
|
|
this.bjd.baojianriqi = this.formTime(this.bjd.baojianriqi) |
|
|
|
|
|
this.bjd.shouliriqi = this.formTime(this.bjd.shouliriqi) |
|
|
|
|
|
this.$refs['bjd'].validate((valid) => { |
|
|
this.$refs['bjd'].validate((valid) => { |
|
|
if (valid) { |
|
|
if (valid) { |
|
|
if (this.judgeNull(this.bjd.quhuadaima)) { |
|
|
if (this.judgeNull(this.bjd.quhuadaima)) { |
|
@ -2231,7 +2274,7 @@ export default { |
|
|
}) |
|
|
}) |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
|
if (this.tableData === null || this.tableData.length === 0) { |
|
|
if (this.tableData.length === 0) { |
|
|
this.$message({ |
|
|
this.$message({ |
|
|
type: 'error', |
|
|
type: 'error', |
|
|
message: '报检设备不能为空!' |
|
|
message: '报检设备不能为空!' |
|
@ -2350,12 +2393,15 @@ export default { |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
this.tableData = data.tableData |
|
|
if (data && data.renwus.length) { |
|
|
for (const tableObj of this.tableData) { |
|
|
this.tableData = data.renwus |
|
|
const sblbpz = [] |
|
|
this.$refs.bjBaseList.doLayout() |
|
|
sblbpz.push(tableObj.shebeileibiedaima) |
|
|
for (const tableObj of this.tableData) { |
|
|
sblbpz.push(tableObj.shebeipinzhongdaima) |
|
|
const sblbpz = [] |
|
|
this.$set(tableObj, 'sblbpz', sblbpz) |
|
|
sblbpz.push(tableObj.shebeileibiedaima) |
|
|
|
|
|
sblbpz.push(tableObj.shebeipinzhongdaima) |
|
|
|
|
|
this.$set(tableObj, 'sblbpz', sblbpz) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
if ( |
|
|
if ( |
|
|
this.formState === 'create' || |
|
|
this.formState === 'create' || |
|
|