|
|
@ -188,7 +188,7 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row v-if="fromType == 1||fromType==5||fromType==3" :gutter="20"> |
|
|
|
<el-row v-if="fromType === 1 || fromType === 5 || fromType === 3" :gutter="20"> |
|
|
|
<el-col :span="18"> |
|
|
|
<el-form-item label="使用单位名称" prop="shiyongdanwei"> |
|
|
|
<el-input |
|
|
@ -199,7 +199,7 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row v-if="fromType == 2 ||fromType == 4" :gutter="20"> |
|
|
|
<el-row v-if="fromType === 2 || fromType === 4" :gutter="20"> |
|
|
|
<el-col :span="18"> |
|
|
|
<el-form-item |
|
|
|
label="施工单位名称" |
|
|
@ -213,7 +213,7 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row v-if="fromType == 2 ||fromType == 4" :gutter="20"> |
|
|
|
<el-row v-if="fromType === 2 || fromType === 4" :gutter="20"> |
|
|
|
<el-col :span="9"> |
|
|
|
<el-form-item |
|
|
|
label="施工单位许可证编号" |
|
|
@ -236,7 +236,7 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row v-if="fromType == 2" :gutter="20"> |
|
|
|
<el-row v-if="fromType === 2" :gutter="20"> |
|
|
|
<el-col :span="18"> |
|
|
|
<el-form-item label="安装地点" prop="anzhuangdidian"> |
|
|
|
<el-input |
|
|
@ -290,7 +290,7 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row v-if="fromType == 1 ||fromType == '5'" :gutter="20"> |
|
|
|
<el-row v-if="fromType === 1 ||fromType === 5" :gutter="20"> |
|
|
|
<el-col :span="18"> |
|
|
|
<el-form-item label="注册代码" prop="zhucedaima"> |
|
|
|
<el-input |
|
|
@ -353,7 +353,7 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row v-if="fromType == 2" :gutter="20"> |
|
|
|
<el-row v-if="fromType === 2" :gutter="20"> |
|
|
|
<el-col :span="9"> |
|
|
|
<el-form-item label="联系人" prop="lianxiren"> |
|
|
|
<el-input |
|
|
@ -386,7 +386,7 @@ |
|
|
|
</el-row> |
|
|
|
<el-row :gutter="20"> |
|
|
|
<el-col :span="9"> |
|
|
|
<el-form-item v-if="fromType==5" label="维护保养单位电话" prop="weibaodanweiDianhua"> |
|
|
|
<el-form-item v-if="fromType === 5" label="维护保养单位电话" prop="weibaodanweiDianhua"> |
|
|
|
<el-input |
|
|
|
v-model="ysjl.weibaodanweiDianhua" |
|
|
|
type="text" |
|
|
@ -411,7 +411,7 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row v-if="fromType!=='5'" :gutter="20"> |
|
|
|
<el-row v-if="fromType !== 5" :gutter="20"> |
|
|
|
<el-col :span="18"> |
|
|
|
<el-form-item label="现场检验条件" prop="xianchangjianyantiaojian"> |
|
|
|
<el-radio-group v-model="ysjl.xianchangjianyantiaojian"> |
|
|
@ -426,7 +426,7 @@ |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</fieldset> |
|
|
|
<fieldset v-if="fromType !=='5'"> |
|
|
|
<fieldset v-if="fromType !== 5"> |
|
|
|
<legend>设备技术参数</legend> |
|
|
|
<el-row :gutter="20"> |
|
|
|
<el-col :span="9"> |
|
|
@ -437,7 +437,7 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="9"> |
|
|
|
<el-form-item v-if="fromType==4" label="额定速度"> |
|
|
|
<el-form-item v-if="fromType === 4" label="额定速度"> |
|
|
|
<el-input v-model="param.edingsuduShangxing" type="text"> |
|
|
|
<span slot="suffix">m/s</span> |
|
|
|
</el-input> |
|
|
@ -478,7 +478,7 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row v-if="fromType==3|| fromType==4" :gutter="20"> |
|
|
|
<el-row v-if="fromType === 3 || fromType === 4" :gutter="20"> |
|
|
|
<el-col :span="9"> |
|
|
|
<el-form-item label="油缸数量" prop="youguanshuliang"> |
|
|
|
<el-input v-model="param.youguanshuliang" type="text" /> |
|
|
@ -546,6 +546,7 @@ |
|
|
|
</el-row> |
|
|
|
</fieldset> |
|
|
|
<fieldset> |
|
|
|
<legend>检验信息</legend> |
|
|
|
<el-row :gutter="20"> |
|
|
|
<el-col :span="20"> |
|
|
|
<el-form-item label="检验依据" prop="jianyanyiju"> |
|
|
@ -553,15 +554,11 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</fieldset> |
|
|
|
<fieldset> |
|
|
|
<legend>主要检验仪器和设备</legend> |
|
|
|
<el-row :gutter="20"> |
|
|
|
<el-col :span="20"> |
|
|
|
<el-input |
|
|
|
v-model="param.gongjuxianghao" |
|
|
|
style="width: 450px" |
|
|
|
/>号检验专用工具箱 |
|
|
|
<el-form-item label="主要检验仪器和设备" prop="gongjuxianghao"> |
|
|
|
<el-input v-model="param.gongjuxianghao" style="width: 100px" />号检验专用工具箱 |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row :gutter="20"> |
|
|
@ -585,18 +582,24 @@ |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row :gutter="20"> |
|
|
|
<el-col :span="18"> |
|
|
|
<el-col :span="18" style="height: auto;"> |
|
|
|
<el-form-item label="备注" prop="beizhu"> |
|
|
|
<el-input |
|
|
|
v-model="ysjl.beizhu" |
|
|
|
type="textarea" |
|
|
|
:autosize="{ minRows: 2, maxRows: 5 }" |
|
|
|
:disabled="edit" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row :gutter="20" style="margin: 20px 0"> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-row :gutter="20"> |
|
|
|
<el-col :span="9"> |
|
|
|
<el-form-item label="检验日期" prop="jianyanjieshuriqi"> |
|
|
|
<el-input v-model="ysjl.jianyanjieshuriqi" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="9"> |
|
|
|
<el-form-item label="现场检验日期" prop="xianchangjianyanriqi"> |
|
|
|
<el-date-picker |
|
|
|
v-model="ysjl.xianchangjianyanriqi" |
|
|
@ -606,7 +609,9 @@ |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col v-if="fromType!=='5'" :span="8"> |
|
|
|
</el-row> |
|
|
|
<el-row :gutter="20"> |
|
|
|
<el-col v-if="fromType !== 5" :span="9"> |
|
|
|
<el-form-item label="检验完成日期" prop="jianyanjieshuriqi"> |
|
|
|
<el-date-picker |
|
|
|
v-model="ysjl.jianyanjieshuriqi" |
|
|
@ -616,7 +621,7 @@ |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-col :span="9"> |
|
|
|
<el-form-item label="下次检验日期" prop="xiacijianyanriqi"> |
|
|
|
<el-date-picker |
|
|
|
v-model="ysjl.xiacijianyanriqi" |
|
|
@ -629,12 +634,12 @@ |
|
|
|
</el-row> |
|
|
|
<template> |
|
|
|
<el-row :gutter="10"> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-col :span="9"> |
|
|
|
<el-form-item label="检验人员" prop="jianyanrenyuan"> |
|
|
|
<el-input v-model="ysjl.jianyanrenyuan" /> |
|
|
|
<el-input v-model="ysjl.jianyanrenyuan" disabled /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-col :span="9"> |
|
|
|
<sign-name |
|
|
|
:jianyanrenyuan="jianyanrenyuan" |
|
|
|
:ysjl="ysjl" |
|
|
@ -642,11 +647,6 @@ |
|
|
|
@setSignValue="signNameValue" |
|
|
|
/> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="日期" prop="jianyanjieshuriqi"> |
|
|
|
<el-input v-model="ysjl.jianyanjieshuriqi" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</template> |
|
|
|
</fieldset> |
|
|
@ -655,102 +655,21 @@ |
|
|
|
<el-tab-pane label="检验项目" name="second"> |
|
|
|
<Inspection :bgfy-data="bgfyData" /> |
|
|
|
</el-tab-pane> |
|
|
|
<el-tab-pane v-if="fromType == '5'" label="附表1" name="three"> |
|
|
|
<Table2 ref="table2" /> |
|
|
|
<el-tab-pane v-if="fromType === 5" label="附表1" name="three"> |
|
|
|
<zdft-fb ref="table1" :table-data.sync="fubiao1" /> |
|
|
|
</el-tab-pane> |
|
|
|
<el-tab-pane |
|
|
|
v-for="(item, index) in arrayGroup" |
|
|
|
v-else |
|
|
|
:key="index" |
|
|
|
:label="'附表' + (index + 1)" |
|
|
|
:name="'tab' + index" |
|
|
|
> |
|
|
|
<Table |
|
|
|
ref="table3" |
|
|
|
:tabel-header="item.header" |
|
|
|
:table-data="item.data" |
|
|
|
:from-type="fromType" |
|
|
|
@addfn="addfn(item)" |
|
|
|
/> |
|
|
|
<template v-else> |
|
|
|
<el-tab-pane label="附表一" name="four"> |
|
|
|
<Table ref="table1" :tabel-header="arrayGroup[0].header" :table-data.sync="fubiao1" /> |
|
|
|
</el-tab-pane> |
|
|
|
<!-- <el-tab-pane v-if="fromType==1" label="附表二" name="four"> |
|
|
|
<Table ref="table2" :tabel-header="tableHeader1" :table-data="list1"/> |
|
|
|
</el-tab-pane> --> |
|
|
|
<el-tab-pane v-if="fromType == 1||fromType==3" label="附表3" name="five"> |
|
|
|
<Table1 ref="table1" :pic="pic" /> |
|
|
|
<el-tab-pane label="附表二" name="five"> |
|
|
|
<Table ref="table2" :tabel-header="arrayGroup[1].header" :table-data.sync="fubiao2" /> |
|
|
|
</el-tab-pane> |
|
|
|
<el-tab-pane v-if="fromType === 1 || fromType === 3" label="附表3" name="six"> |
|
|
|
<phxsb ref="table3" :table-data.sync="fubiao3" :pic="pic" /> |
|
|
|
</el-tab-pane> |
|
|
|
</el-tabs> |
|
|
|
<el-dialog |
|
|
|
:visible.sync="jyxmrqShow" |
|
|
|
title="批量修改日期" |
|
|
|
width="500px" |
|
|
|
@close="jyxmrqShow = false" |
|
|
|
> |
|
|
|
<template> |
|
|
|
<el-date-picker |
|
|
|
v-model="querenriqi" |
|
|
|
type="date" |
|
|
|
format="yyyy.MM.dd" |
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
:picker-options="pickerOptions" |
|
|
|
placeholder="选择日期" |
|
|
|
style="width: 100%" |
|
|
|
/> |
|
|
|
</template> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button @click="jyxmrqShow = false">取 消</el-button> |
|
|
|
<el-button type="primary" @click="batchUpd">确 定</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
<el-dialog |
|
|
|
title="查看相关鉴证" |
|
|
|
:modal-append-to-body="false" |
|
|
|
:visible.sync="dialogEnclosureVisible" |
|
|
|
> |
|
|
|
<enclosure |
|
|
|
:relation-id="ysjl.renwuId" |
|
|
|
:if-liaison="false" |
|
|
|
:view-button="true" |
|
|
|
:is-show-hetong="isSysUser" |
|
|
|
/> |
|
|
|
</el-dialog> |
|
|
|
<el-dialog title="编辑权限" :visible.sync="dialogRoleVisible"> |
|
|
|
<template> |
|
|
|
<div class="tag-group"> |
|
|
|
<span class="tag-group__title">已有权限人员:</span> |
|
|
|
<el-tag v-for="item in defaultRlr" :key="item" effect="dark"> |
|
|
|
{{ common.convertCnName(item) }} |
|
|
|
</el-tag> |
|
|
|
</div> |
|
|
|
<br> |
|
|
|
<el-select |
|
|
|
v-model="renlingren" |
|
|
|
multiple |
|
|
|
collapse-tags |
|
|
|
placeholder="请选择要追加的监检员" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in userList" |
|
|
|
:key="item.id" |
|
|
|
:label="item.nickname" |
|
|
|
:value="item.id" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</template> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button @click="dialogRoleVisible = false">取 消</el-button> |
|
|
|
<el-button type="primary" @click="updateRenlingren">确 定</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
<sign-name |
|
|
|
v-show="signShow" |
|
|
|
ref="qmButton" |
|
|
|
:ysjl="ysjl" |
|
|
|
:jianyanrenyuan="xmjianyanrenyuan" |
|
|
|
field-name="xmqianming" |
|
|
|
:custom-clear-sign="customClearSign" |
|
|
|
@setSignValue="signNameValue" |
|
|
|
/> |
|
|
|
</el-tabs> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script> |
|
|
@ -758,22 +677,18 @@ import Sticky from '@/components/Sticky' |
|
|
|
import SignName from '@/views/common/SignName' |
|
|
|
import Utils from '@/utils/contact' |
|
|
|
import merge from 'webpack-merge' |
|
|
|
import Enclosure from '@/views/common/Enclosure' |
|
|
|
import Inspection from '@/views/ysjl/3000/common/inspection-items' |
|
|
|
import Table from '@/views/ysjl/3000/dj/common/table' |
|
|
|
import Table1 from '@/views/ysjl/3000/dj/common/table1' |
|
|
|
import Table2 from '@/views/ysjl/3000/dj/common/table2' |
|
|
|
import Phxsb from '@/views/ysjl/3000/dj/common/phxsb' |
|
|
|
import ZdftFb from '@/views/ysjl/3000/dj/common/zdftFb' |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'BaseInfo', |
|
|
|
components: { SignName, Sticky, Enclosure, Inspection, Table, Table1, Table2 }, |
|
|
|
components: { SignName, Sticky, Inspection, Table, Phxsb, ZdftFb }, |
|
|
|
props: { |
|
|
|
arrayGroup: { |
|
|
|
require: true, |
|
|
|
type: Array, |
|
|
|
default: () => { |
|
|
|
return [] |
|
|
|
} |
|
|
|
required: true, |
|
|
|
type: Array |
|
|
|
}, |
|
|
|
// /** |
|
|
|
// * 格式为: [{ index: 0, relationIds: [1, 2] }] |
|
|
@ -784,14 +699,17 @@ export default { |
|
|
|
// }, |
|
|
|
fromType: { |
|
|
|
required: true, |
|
|
|
type: String |
|
|
|
type: Number |
|
|
|
}, |
|
|
|
jlbh1: { |
|
|
|
type: String, |
|
|
|
default: 'DT' |
|
|
|
} |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
ysjl: {}, |
|
|
|
param: {}, |
|
|
|
jlbh1: 'GJ', |
|
|
|
jlbh2: '(' + new Date().getFullYear() + ')', |
|
|
|
jlbh3: '', |
|
|
|
isRepeat: false, |
|
|
@ -808,9 +726,6 @@ export default { |
|
|
|
jyxmrqShow: false, |
|
|
|
querenriqi: null, |
|
|
|
signShow: false, |
|
|
|
xmjianyanrenyuan: '', |
|
|
|
xggcList: [], |
|
|
|
biliOptions: ['0.4', '0.5', '0.6', '0.7', '0.8', '0.9', '1'], |
|
|
|
dialogEnclosureVisible: false, |
|
|
|
dialogRoleVisible: false, |
|
|
|
userList: [], |
|
|
@ -847,38 +762,28 @@ export default { |
|
|
|
return time.getTime() > Date.now() |
|
|
|
} |
|
|
|
}, |
|
|
|
pic: '' |
|
|
|
pic: '', |
|
|
|
fubiao1: [], |
|
|
|
fubiao2: [], |
|
|
|
fubiao3: [] |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
|
if (this.state === 'create') { |
|
|
|
this.initYsjl() |
|
|
|
this.getMaxBh() |
|
|
|
} else { |
|
|
|
this.getYsjl() |
|
|
|
this.getParam() |
|
|
|
this.getJyxm(1) |
|
|
|
this.getFbList() |
|
|
|
this.getJyxmInfoByYsjl() |
|
|
|
} |
|
|
|
this.getDicJyxm(1) |
|
|
|
this.getDicData() |
|
|
|
this.userList = this.$store.getters.allUser.filter( |
|
|
|
(user) => user.departmentId === 74 && user.clientType === 'System' |
|
|
|
) |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
addfn(item) { |
|
|
|
const length = item.data.length |
|
|
|
item.data.push({ |
|
|
|
id: parseInt(length), |
|
|
|
D1: '', |
|
|
|
D2: '', |
|
|
|
D3: '', |
|
|
|
D4: '', |
|
|
|
D5: '', |
|
|
|
D6: '', |
|
|
|
D7: '' |
|
|
|
}) |
|
|
|
}, |
|
|
|
initYsjl() { |
|
|
|
this.ysjlController.init(this.$route.query).then((data) => { |
|
|
|
this.ysjl = data.ysjl |
|
|
@ -886,9 +791,8 @@ export default { |
|
|
|
this.ysjl.jianyanjieshuriqi = this.formatter.dateFormat('YYYY-MM-dd') |
|
|
|
this.ysjl.bglx = 1 |
|
|
|
this.ysjl.cjState = 'ysjl' |
|
|
|
this.ysjl.xianchangjianyantiaojian = '符合' |
|
|
|
this.getJyxm(1) |
|
|
|
// this.getFbList(); // 获取附表数据 |
|
|
|
// this.getZzdw() |
|
|
|
this.getSbList() |
|
|
|
}) |
|
|
|
}, |
|
|
@ -905,10 +809,27 @@ export default { |
|
|
|
this.xinghaoList = data |
|
|
|
}) |
|
|
|
}, |
|
|
|
getFbList() { |
|
|
|
this.ysjlController.getYsjlFb(this.ysjlId).then((data) => { |
|
|
|
console.log(data) |
|
|
|
// this.param = data |
|
|
|
getJyxmInfoByYsjl() { |
|
|
|
this.ysjlController.getJyxmInfoByYsjl(this.ysjlId).then((data) => { |
|
|
|
if (!data.fbjyxm) { |
|
|
|
return |
|
|
|
} |
|
|
|
const fubiao = JSON.parse(data.fbjyxm) |
|
|
|
if (!fubiao.length) { |
|
|
|
return |
|
|
|
} |
|
|
|
if (fubiao[0]) { |
|
|
|
this.fubiao1 = fubiao[0] |
|
|
|
} |
|
|
|
if (fubiao[1]) { |
|
|
|
this.fubiao2 = fubiao[1] |
|
|
|
} |
|
|
|
if (fubiao[2]) { |
|
|
|
this.fubiao3 = fubiao[2] |
|
|
|
} |
|
|
|
console.log(this.fubiao1) |
|
|
|
console.log(this.fubiao2) |
|
|
|
console.log(this.fubiao3) |
|
|
|
}) |
|
|
|
}, |
|
|
|
getYsjl() { |
|
|
@ -958,12 +879,12 @@ export default { |
|
|
|
if (this.$route.query.state === 'update') { |
|
|
|
this.jyxmController.getJdCyJyxm(this.ysjlId, this.$route.query.templateId, sort).then((data) => { |
|
|
|
this.bgfyData = data |
|
|
|
this.tableJs.mergeColRows(this.cols, this.rows, data) |
|
|
|
this.tableJs.getData(this.cols, this.rows, this.bgfyData) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.jyxmController.getCyJyxm(this.$route.query.templateId, sort).then((data) => { |
|
|
|
this.bgfyData = data |
|
|
|
this.tableJs.mergeColRows(this.cols, this.rows, data) |
|
|
|
this.tableJs.getData(this.cols, this.rows, this.bgfyData) |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
@ -976,33 +897,9 @@ export default { |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
getZzdw() { |
|
|
|
this.api({ |
|
|
|
url: '/dwxx/getById', |
|
|
|
method: 'get', |
|
|
|
params: { |
|
|
|
id: this.ysjl.zzdwId |
|
|
|
} |
|
|
|
}).then((data) => { |
|
|
|
this.jlbh1 += data.zhizaodanweiCode |
|
|
|
this.ysjl.zhizaoxukezhengjibie = data.zhizaoxukezhengjibie |
|
|
|
this.ysjl.zhizaoxukezhengbianhao = data.zhizaoxukezhengbianhao |
|
|
|
this.getMaxBh() |
|
|
|
}) |
|
|
|
}, |
|
|
|
getDicData() { |
|
|
|
this.api({ |
|
|
|
url: '/dicData/getDicDataByTypeCode', |
|
|
|
method: 'get', |
|
|
|
params: { |
|
|
|
typeCode: 'GL_ZZ_XGGC' |
|
|
|
} |
|
|
|
}).then((data) => { |
|
|
|
this.xggcList = data |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 查询最大记录编号 |
|
|
|
/** |
|
|
|
* 查询最大记录编号 |
|
|
|
*/ |
|
|
|
getMaxBh() { |
|
|
|
const aheadPart = this.jlbh1 + this.jlbh2 + '-' |
|
|
|
this.api({ |
|
|
@ -1026,61 +923,11 @@ export default { |
|
|
|
* @param data |
|
|
|
*/ |
|
|
|
signNameValue(data) { |
|
|
|
if (data.fieldName === 'xmqianming') { |
|
|
|
for (let i = 0; i < this.$refs.bgfyData.selection.length; i++) { |
|
|
|
const jianyanrenyuan = this.$refs.bgfyData.selection[i].jianjianyuan |
|
|
|
? this.$refs.bgfyData.selection[i].jianjianyuan.split(',') |
|
|
|
: [] |
|
|
|
if (!jianyanrenyuan.includes(data.name)) { |
|
|
|
jianyanrenyuan.push(data.name) |
|
|
|
this.$refs.bgfyData.selection[i].jianjianyuan = |
|
|
|
jianyanrenyuan.join(',') |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
const isNotHasJyry = !this.ysjl.jianyanrenyuan |
|
|
|
this.ysjl.jianyanrenyuan = String(data.id) |
|
|
|
this.jianyanrenyuan = data.name |
|
|
|
this.common.signName(this.ysjl.id, this.ysjl.jianyanrenyuan) |
|
|
|
Utils.$emit('manufacture-list') |
|
|
|
// 如果是第一检验员签名的话,需要给所有检验项目的检验人员追加当前检验人员 |
|
|
|
if ( |
|
|
|
isNotHasJyry && |
|
|
|
this.jianyanrenyuan && |
|
|
|
this.jianyanrenyuan.split(',').length === 1 |
|
|
|
) { |
|
|
|
this.bgfyData.forEach((jyxm) => { |
|
|
|
// 如果第一检验人员已在该检验项目签名的话,无需重复签名 |
|
|
|
if ( |
|
|
|
!jyxm.jianjianyuan || |
|
|
|
!jyxm.jianjianyuan |
|
|
|
.split(',') |
|
|
|
.filter((jjr) => jjr === this.jianyanrenyuan).length |
|
|
|
) { |
|
|
|
if (jyxm.jianjianyuan) { |
|
|
|
const jianjianyuan = jyxm.jianjianyuan.split(',') |
|
|
|
jianjianyuan.push(this.jianyanrenyuan) |
|
|
|
jyxm.jianjianyuan = jianjianyuan.join(',') |
|
|
|
} else { |
|
|
|
jyxm.jianjianyuan = this.jianyanrenyuan |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
customClearSign(fieldName) { |
|
|
|
if (fieldName === 'xmqianming') { |
|
|
|
for (let i = 0; i < this.$refs.bgfyData.selection.length; i++) { |
|
|
|
let jyry = this.$refs.bgfyData.selection[i].jianjianyuan || '' |
|
|
|
jyry = this.common |
|
|
|
.deleteElement( |
|
|
|
jyry.split(','), |
|
|
|
String(this.$store.getters.nickname) |
|
|
|
) |
|
|
|
.join(',') |
|
|
|
} |
|
|
|
} else { |
|
|
|
const data = { |
|
|
|
id: |
|
|
|
this.ysjl.jianyanrenyuan && |
|
|
@ -1101,25 +948,14 @@ export default { |
|
|
|
fieldName: fieldName |
|
|
|
} |
|
|
|
this.signNameValue(data) |
|
|
|
} |
|
|
|
}, |
|
|
|
saveYsjl(operation) { |
|
|
|
const tableData = [] |
|
|
|
const arr = [] |
|
|
|
if (this.fromType === '5') { |
|
|
|
arr.push(this.$refs.table2.tableData) |
|
|
|
let fubiao |
|
|
|
if (this.fromType === 5) { |
|
|
|
fubiao = [this.$refs.table1.tableData] |
|
|
|
} else { |
|
|
|
this.arrayGroup.map((item) => { |
|
|
|
item.data.forEach(k => { |
|
|
|
delete k.id |
|
|
|
}) |
|
|
|
arr.push(item.data) |
|
|
|
}) |
|
|
|
const arr1 = JSON.parse(JSON.stringify(this.$refs.table1.tableData)) |
|
|
|
arr1.map(item => { |
|
|
|
delete item.name |
|
|
|
}) |
|
|
|
arr.push(arr1) |
|
|
|
fubiao = [this.fubiao1, this.fubiao2, this.fubiao3] |
|
|
|
} |
|
|
|
this.bgfyData.forEach((row) => { |
|
|
|
tableData.push({ |
|
|
@ -1132,12 +968,11 @@ export default { |
|
|
|
sort: row.sort, |
|
|
|
orders: row.orders, |
|
|
|
cjState: 0 |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
if (operation === 'add') { |
|
|
|
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + '-' + this.jlbh3 |
|
|
|
this.save(operation, 'post', tableData, arr) |
|
|
|
this.save(operation, 'post', tableData, fubiao) |
|
|
|
} else if (operation === 'build') { |
|
|
|
this.ysjl.baogaobianhao = this.ysjl.jilubianhao |
|
|
|
if ( |
|
|
@ -1168,14 +1003,14 @@ export default { |
|
|
|
return false |
|
|
|
} |
|
|
|
} |
|
|
|
this.save(operation, 'put', tableData, arr) |
|
|
|
this.save(operation, 'put', tableData, fubiao) |
|
|
|
} else if (operation === 'upd') { |
|
|
|
this.save(operation, 'put', tableData, arr) |
|
|
|
this.save(operation, 'put', tableData, fubiao) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
save(operation, type, jyxm, fb) { |
|
|
|
if (this.fromType !== '5') this.ysjl.imagePath = this.$refs.table1.imgPath |
|
|
|
save(operation, type, jyxm, fubiao) { |
|
|
|
if (this.fromType !== 5) this.ysjl.imagePath = this.$refs.table1.imgPath |
|
|
|
|
|
|
|
// 判断报告编号是否重复 |
|
|
|
if (this.isRepeat) { |
|
|
@ -1194,7 +1029,8 @@ export default { |
|
|
|
ysjl: this.ysjl, |
|
|
|
param: this.param, |
|
|
|
cyJyxm: { |
|
|
|
fbjyxm: JSON.stringify(fb) |
|
|
|
ysjlId: this.ysjl.id, |
|
|
|
fbjyxm: JSON.stringify(fubiao) |
|
|
|
}, |
|
|
|
jdJyxm: jyxm, |
|
|
|
flag: operation |
|
|
@ -1349,13 +1185,4 @@ export default { |
|
|
|
} |
|
|
|
</style> |
|
|
|
<style lang="scss" scoped> |
|
|
|
/*.el-table/deep/ td, .el-table/deep/ th.is-leaf,.el-table--border,.el-table--group{ |
|
|
|
border-color: black; |
|
|
|
}*/ |
|
|
|
|
|
|
|
// .el-table { |
|
|
|
// /deep/tbody tr:hover > td { |
|
|
|
// background-color: oldlace; |
|
|
|
// } |
|
|
|
// } |
|
|
|
</style> |
|
|
|