Browse Source

Merge remote-tracking branch 'origin/master'

master
李磊 3 years ago
parent
commit
cc078c1e96
  1. 40
      src/views/ysjl/3000/common/index.vue
  2. 30
      src/views/ysjl/3000/dj/xfdt/index.vue
  3. 103
      src/views/ysjl/3000/dj/zw/index.vue
  4. 2
      src/views/ysjl/3000/jj/xfdt/index.vue
  5. 103
      src/views/ysjl/3000/jj/zw/index.vue
  6. 735
      src/views/ysjl/5000/dj/jdgy-cl/index.vue
  7. 709
      src/views/ysjl/5000/dj/lygg-cl/index.vue

40
src/views/ysjl/3000/common/index.vue

@ -189,7 +189,7 @@
</el-col>
</el-row>
<el-row
v-if="fromType === 1 || fromType === 5 || fromType === 3 ||fromType===8"
v-if="fromType === 1 || fromType === 5 || fromType === 3 ||fromType===8 ||fromType===10||fromType===12"
:gutter="20"
>
<el-col :span="18">
@ -202,7 +202,7 @@
</el-form-item>
</el-col>
</el-row>
<el-row v-if="fromType === 2 || fromType === 4 ||fromType===6||fromType===8" :gutter="20">
<el-row v-if="fromType === 2 || fromType === 4 ||fromType===6||fromType===8||fromType===10||fromType===12" :gutter="20">
<el-col :span="18">
<el-form-item
label="施工单位名称"
@ -216,7 +216,7 @@
</el-form-item>
</el-col>
</el-row>
<el-row v-if="fromType === 2 || fromType === 4 ||fromType===6||fromType===8" :gutter="20">
<el-row v-if="fromType === 2 || fromType === 4 ||fromType===6||fromType===8||fromType===10||fromType===12" :gutter="20">
<el-col :span="9">
<el-form-item
label="施工单位许可证编号"
@ -239,7 +239,7 @@
</el-form-item>
</el-col>
</el-row>
<el-row v-if="fromType === 2 || fromType===6||fromType===8" :gutter="20">
<el-row v-if="fromType === 2 || fromType===6||fromType===8||fromType===12" :gutter="20">
<el-col :span="18">
<el-form-item label="安装地点" prop="anzhuangdidian">
<el-input
@ -250,7 +250,7 @@
</el-form-item>
</el-col>
</el-row>
<el-row v-if="fromType!==6&&fromType!==8" :gutter="20">
<el-row v-if="fromType!==6&&fromType!==8&&fromType!==10&&fromType!==12" :gutter="20">
<el-col :span="9">
<el-form-item label="安全管理人员" prop="anquanguanlirenyuan">
<el-input
@ -271,7 +271,7 @@
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-col v-if="fromType!==10" :span="9">
<el-form-item label="使用单位代码" prop="shiyongdanweiCode">
<el-input
v-model="ysjl.shiyongdanweiCode"
@ -293,7 +293,7 @@
</el-form-item>
</el-col>
</el-row>
<el-row v-if="fromType === 1 || fromType === 5 ||fromType===7||fromType===8" :gutter="20">
<el-row v-if="fromType === 1 || fromType === 5 ||fromType===7||fromType===8||fromType===11" :gutter="20">
<el-col :span="18">
<el-form-item label="注册代码" prop="zhucedaima">
<el-input
@ -304,7 +304,7 @@
</el-form-item>
</el-col>
</el-row>
<el-row v-if="fromType!==6" :gutter="20">
<el-row v-if="fromType!==6 &&fromType!==10" :gutter="20">
<el-col :span="18">
<el-form-item label="设备使用地点" prop="anzhuangdidian">
<el-input
@ -315,7 +315,7 @@
</el-form-item>
</el-col>
</el-row>
<el-row v-if="fromType!==6&&fromType!==8" :gutter="20">
<el-row v-if="fromType!==6&&fromType!==8&&fromType!==10&&fromType!==12" :gutter="20">
<el-col :span="9">
<el-form-item label="单位内编号" prop="danweineibubianhao">
<el-input
@ -337,7 +337,7 @@
</el-col>
</el-row>
<el-row :gutter="20">
<el-col v-if="fromType!==6&&fromType!==8" :span="9">
<el-col v-if="fromType!==6&&fromType!==8&&fromType!==10&&fromType!==12" :span="9">
<el-form-item label="改造单位名称" prop="gaizaodanwei">
<el-input
v-model="ysjl.gaizaodanwei"
@ -356,7 +356,7 @@
</el-form-item>
</el-col>
</el-row>
<el-row v-if="fromType === 2 || fromType===6" :gutter="20">
<el-row v-if="fromType === 2 || fromType===6 ||fromType==10||fromType==12" :gutter="20">
<el-col :span="9">
<el-form-item label="联系人" prop="lianxiren">
<el-input
@ -422,7 +422,7 @@
</el-form-item>
</el-col>
</el-row>
<el-row v-if="fromType !== 6&&fromType !== 5&&fromType!==7&&fromType!==8" :gutter="20">
<el-row v-if="fromType !== 6&&fromType !== 5&&fromType!==7&&fromType!==8&&fromType!==10&&fromType!==11&&fromType!==12" :gutter="20">
<el-col :span="18">
<el-form-item
label="现场检验条件"
@ -474,7 +474,19 @@
<el-input
v-model="param.quyufangbaodengji"
type="text"
:disabled="edit"
/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item
label="设备名称"
prop="shebeimingcheng"
>
<el-input
v-model="ysjl.shebeimingcheng"
type="text"
/>
</el-form-item>
</el-col>
@ -728,7 +740,7 @@
/>
</el-tab-pane>
<el-tab-pane
v-if="fromType === 1 || fromType === 3||fromType===7||fromType===8"
v-if="fromType === 1 || fromType === 3||fromType===7||fromType===8 ||fromType===9"
label="附表三"
name="six"
>

30
src/views/ysjl/3000/dj/xfdt/index.vue

@ -11,7 +11,7 @@ export default {
components: { baseInfo },
data() {
return {
type: 1,
type: 9,
arrayGroup: [
{
header: [
@ -21,7 +21,7 @@ export default {
type: 1
},
{
label: '3.7 轿厢与井道壁距离单位:m)',
label: '4.7 轿厢与井道壁距离单位:m)',
prop: 'D6',
type: 1
},
@ -30,27 +30,27 @@ export default {
type: 2,
child: [
{
label: '6.6门的运行和导向',
label: '7.5门的运行和导向',
prop: 'D5',
type: 1
},
{
label: '6.7自动关闭层门装置',
label: '7.6自动关闭层门装置',
prop: 'D4',
type: 1
},
{
label: '6.8紧急开锁装置',
label: '7.7紧急开锁装置',
prop: 'D3',
type: 1
},
{
label: '6.9 门的锁紧',
label: '7.8 门的锁紧',
prop: 'D2',
type: 1
},
{
label: '6.10门的闭合',
label: '7.9门的闭合',
prop: 'D1',
type: 1
}
@ -67,42 +67,42 @@ export default {
type: 1
},
{
label: '6.3施力层门间隙',
label: '7.3.1施力层门间隙',
prop: 'D8',
type: 1
},
{
label: '6.3门扇与门扇',
label: '7.3.1门扇与门扇',
prop: 'D7',
type: 1
},
{
label: '6.3门扇与立柱',
label: '7.3.1门扇与立柱',
prop: 'D6',
type: 1
},
{
label: '6.3门扇与门楣',
label: '7.3.1门扇与门楣',
prop: 'D5',
type: 1
},
{
label: '6.3门扇与地坎',
label: '7.3.1门扇与地坎',
prop: 'D4',
type: 1
},
{
label: '6.9门锁啮合长度',
label: '7.8.1门锁啮合长度',
prop: 'D3',
type: 1
},
{
label: '6.12门刀与层门地坎间距',
label: '7.10门刀与层门地坎间距',
prop: 'D2',
type: 1
},
{
label: '6.12门锁滚轮与轿门地坎间距',
label: '7.10门锁滚轮与轿门地坎间距',
prop: 'D1',
type: 1
}

103
src/views/ysjl/3000/dj/zw/index.vue

@ -0,0 +1,103 @@
<template>
<div class="app-container">
<baseInfo :from-type="type" :array-group="arrayGroup" />
</div>
</template>
<script>
import baseInfo from '@/views/ysjl/3000/common/index'
export default {
name: 'ElevatorYeyin',
components: { baseInfo },
data() {
return {
type: 11,
arrayGroup: [
{
header: [
{
label: '层站',
prop: 'D7',
type: 1
},
{
label: '6.8门的闭合',
type: 1
}
],
data: []
},
{
header: [
{
label: '层站',
prop: 'D5',
type: 1
},
{
label: '6.2门扇与门扇',
prop: 'D4',
type: 1
},
{
label: '6.2门扇与立柱',
prop: 'D3',
type: 1
},
{
label: '7.3.1门扇与门楣',
prop: 'D2',
type: 1
},
{
label: '7.3.1门扇与地坎',
prop: 'D1',
type: 1
}
],
data: []
}
],
tableHeader2: [
{
label: '电动机电流载重量百分比',
type: 1
},
{
label: '30%',
prop: 'D1',
type: 1
},
{
label: '40%',
prop: 'D2',
type: 1
},
{
label: '45%',
prop: 'D3',
type: 1
},
{
label: '50%',
prop: 'D4',
type: 1
},
{
label: '60%',
prop: 'D5',
type: 1
}
],
list: [],
list1: []
}
},
computed: {},
created() {},
methods: {}
}
</script>
<style>
</style>

2
src/views/ysjl/3000/jj/xfdt/index.vue

@ -11,7 +11,7 @@ export default {
components: { baseInfo },
data() {
return {
type: 1,
type: 10,
arrayGroup: [
{
header: [

103
src/views/ysjl/3000/jj/zw/index.vue

@ -0,0 +1,103 @@
<template>
<div class="app-container">
<baseInfo :from-type="type" :array-group="arrayGroup" />
</div>
</template>
<script>
import baseInfo from '@/views/ysjl/3000/common/index'
export default {
name: 'ElevatorYeyin',
components: { baseInfo },
data() {
return {
type: 12,
arrayGroup: [
{
header: [
{
label: '层站',
prop: 'D7',
type: 1
},
{
label: '6.8门的闭合',
type: 1
}
],
data: []
},
{
header: [
{
label: '层站',
prop: 'D5',
type: 1
},
{
label: '6.2门扇与门扇',
prop: 'D4',
type: 1
},
{
label: '6.2门扇与立柱',
prop: 'D3',
type: 1
},
{
label: '7.3.1门扇与门楣',
prop: 'D2',
type: 1
},
{
label: '7.3.1门扇与地坎',
prop: 'D1',
type: 1
}
],
data: []
}
],
tableHeader2: [
{
label: '电动机电流载重量百分比',
type: 1
},
{
label: '30%',
prop: 'D1',
type: 1
},
{
label: '40%',
prop: 'D2',
type: 1
},
{
label: '45%',
prop: 'D3',
type: 1
},
{
label: '50%',
prop: 'D4',
type: 1
},
{
label: '60%',
prop: 'D5',
type: 1
}
],
list: [],
list1: []
}
},
computed: {},
created() {},
methods: {}
}
</script>
<style>
</style>

735
src/views/ysjl/5000/dj/jdgy-cl/index.vue

@ -0,0 +1,735 @@
<!--工业锅炉内部检验-->
<template>
<div class="app-container">
<sticky style="margin-bottom: 10px;">
<div class="sub-navbar">
<el-button v-if="state === 'create'" type="success" icon="el-icon-edit" size="medium" @click="saveYsjl('add')">
保存
</el-button>
<el-button v-if="state === 'update'" type="primary" icon="el-icon-edit" size="medium" @click="saveYsjl('upd')">
更新
</el-button>
<el-button v-if="state === 'update'" type="success" icon="el-icon-upload2" size="medium" @click="saveYsjl('build')">
生成报告
</el-button>
<el-button v-if="state !== 'create'" type="warning" icon="el-icon-view" size="medium" @click="common.viewYsjl(ysjl.id, 'YSJL', false)">
预览
</el-button>
</div>
</sticky>
<el-tabs v-model="checkedTab" type="card">
<el-tab-pane label="基本信息" name="first">
<el-form ref="ysjl" :model="ysjl" class="el-form" label-position="right" label-width="100px">
<fieldset>
<legend>基本信息</legend>
<el-row :gutter="25">
<el-col v-if="state === 'create' || ysjl.jilubianhao === null || 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 />-
<el-input v-model="jlbh3" style="width:85px" @blur="judgeRepeat(jlbh1 + jlbh2 + '-' + jlbh3 , ysjl.id)" />
</el-form-item>
</el-col>
<el-col v-else :span="9">
<el-form-item label="记录编号" prop="jilubianhao">
<el-input v-if="state !== 'create'" v-model="ysjl.jilubianhao" :disabled="edit" />
</el-form-item>
</el-col>
<el-col v-if="isRepeat" :span="2" style="vertical-align: middle;padding-top: 3px;font-size: 15px;">
<span style="color:red">编号重复</span>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="设备注册代码(使用登记证编号)" prop="zhucedaima" label-width="200">
<el-input v-model="ysjl.zhucedaima" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="车辆牌号" prop="车辆牌号">
<el-input v-model="ysjl.cheliangpaihao" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="使用单位" prop="shiyongdanwei" label-width="160px">
<el-input v-model="ysjl.shiyongdanwei" :disabled="edit" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="设备单位地址" prop="anzhuangdidian">
<el-input v-model="ysjl.anzhuangdidian" :disabled="edit" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="检验地址" prop="anzhuangdidian">
<el-input v-model="ysjl.anzhuangdidian" :disabled="edit" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="联系人" prop="shiyongdanweiLianxiren">
<el-input v-model="ysjl.shiyongdanweiLianxiren" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="联系电话" prop="shiyongdanweiDianhua">
<el-input v-model="ysjl.shiyongdanweiDianhua" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="设备品种(名称)" prop="shebeipinzhong">
<el-input v-model="ysjl.shebeipinzhong" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="产品型号" prop="guigexinghao">
<el-input v-model="ysjl.guigexinghao" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="设备代码" prop="shebeidaima">
<el-input v-model="ysjl.shebeidaima" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="产品编号" prop="chanpinbianhao">
<el-input v-model="ysjl.chanpinbianhao" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="制造单位" prop="zhizaodanwei">
<el-input v-model="ysjl.zhizaodanwei" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="制造日期" prop="zhizaoriqi">
<el-date-picker v-model="ysjl.zhizaoriqi" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="改造单位" prop="gaizaodanwei">
<el-input v-model="ysjl.gaizaodanwei" :disabled="edit" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="改造日期" prop="gaizaoriqi">
<el-date-picker v-model="ysjl.gaizaoriqi" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="发动机(电机)编号" prop="fadongjibianhao">
<el-input v-model="param.fadongjibianhao" :disabled="edit" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="燃料种类" prop="ranliaozhonglei">
<el-input v-model="param.ranliaozhonglei" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="6">
<el-form-item label="额定起重量" prop="edingqizhongliang">
<el-input v-model="param.edingqizhongliang" :disabled="edit">
<span slot="suffix">/kg</span>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="自重" prop="kongchezhongliang">
<el-input v-model="param.kongchezhongliang" :disabled="edit">
<span slot="suffix">/kg</span>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="防爆功能" prop="fangbaogongneng">
<el-input v-model="param.fangbaogongneng" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="空载最大起升高度" prop="kongzaigaodu">
<el-input v-model="param.kongzaigaodu" :disabled="edit">
<span slot="suffix">mm</span>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="空载最大运行速度" prop="sudukongzai">
<el-input v-model="param.sudukongzai" :disabled="edit">
<span slot="suffix">km/h</span>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item
label="使用区域"
prop="shiyongquyu"
>
<el-radio-group v-model="param.shiyongquyu">
<el-radio label="厂区">
厂区
</el-radio>
<el-radio label="旅游景区">
旅游景区
</el-radio>
<el-radio label="游乐场所">
游乐场所
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item
label="检验环境条件"
prop="jianyanhuanjingtiaojian"
>
<el-radio-group v-model="ysjl.jianyanhuanjingtiaojian">
<el-radio label="符合">
符合
</el-radio>
<el-radio label="不符合">
不符合
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>检验信息</legend>
<el-row :gutter="20" style="margin-bottom:20px">
<el-col :span="18">
<el-form-item label="检验依据" prop="jianyanyiju">
<el-input v-model="ysjl.jianyanyiju" type="textarea" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<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">
<el-col :span="18">
<el-form-item label="检验结论" prop="jianyanjielun">
<el-radio-group v-model="ysjl.jianyanjielun">
<el-radio label="合格">
合格
</el-radio>
<el-radio label="不合格">
不合格
</el-radio>
<el-radio label="复检合格">
复检合格
</el-radio>
<el-radio label="复检不合格">
复检不合格
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<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">
<el-col :span="9">
<el-form-item label="检验完成日期" prop="jianyanjieshuriqi">
<el-date-picker
v-model="ysjl.jianyanjieshuriqi"
value-format="yyyy-MM-dd"
placeholder="选择日期"
style="width: 100%"
/>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="下次检验日期" prop="xiacijianyanriqi">
<el-date-picker
v-model="ysjl.xiacijianyanriqi"
value-format="yyyy-MM-dd"
placeholder="选择日期"
style="width: 100%"
/>
</el-form-item>
</el-col>
</el-row>
<template>
<el-row :gutter="10">
<el-col :span="9">
<el-form-item label="检验人员" prop="jianyanrenyuan">
<el-input v-model="ysjl.jianyanrenyuan" disabled />
</el-form-item>
</el-col>
<el-col :span="9">
<sign-name
:jianyanrenyuan="jianyanrenyuan"
:ysjl="ysjl"
:custom-clear-sign="customClearSign"
@setSignValue="signNameValue"
/>
</el-col>
</el-row>
<!-- <el-row :gutter="10">
<el-col :span="9">
<el-form-item label="编制" prop="jianyanrenyuan">
<el-input v-model="ysjl.jianyanrenyuan" disabled />
</el-form-item>
</el-col>
<el-col :span="9">
<sign-name
:jianyanrenyuan="jianyanrenyuan"
:ysjl="ysjl"
:custom-clear-sign="customClearSign"
@setSignValue="signNameValue"
/>
</el-col>
</el-row> -->
</template>
</fieldset>
</el-form>
</el-tab-pane>
<el-tab-pane label="检验项目" name="second">
<el-table ref="sybjSData" :data="sybjSData" :span-method="tableJs.mergeColRows" border stripe style="width:90%">
<el-table-column align="center" label="检验项目">
<el-table-column align="center" prop="jianyanxiang" width="200" />
<el-table-column align="center" prop="jianyanmu" width="200" />
<el-table-column align="left" prop="jianyanneirong" />
</el-table-column>
<el-table-column align="center" prop="D1" label="检验结果">
<template slot-scope="scope">
<el-select v-model="scope.row.D1" :disabled="edit" type="text" placeholder="请选择" style="width: 100%;" filterable allow-create default-first-option>
<el-option label="√" value="√" />
<el-option label="○" value="○" />
<el-option label="×" value="×" />
<el-option label="/" value="/" />
</el-select>
</template>
</el-table-column>
</el-table>
<br>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import Sticky from '@/components/Sticky'
import SignName from '@/views/common/SignName'
import Utils from '@/utils/contact'
import merge from 'webpack-merge'
import { getDepartmentTreeList } from '@/api/common'
export default {
name: 'GlGynbYsjl',
components: { SignName, Sticky },
data() {
return {
jlbh1: 'GN',
jlbh2: '(' + new Date().getFullYear() + ')',
jlbh3: '',
ysjl: {
shiyongdanwei: ''
},
param: {},
state: this.$route.query.state,
jianyanrenyuan: '',
departmentId: this.$store.getters.departmentId,
isRepeat: false,
edit: false,
sybjSData: [],
tableData: [],
checkedTab: 'first',
ysjlId: this.$route.query.id,
//
//
cols: [
{
name: 'jianyanxiang', // el-table-column prop=''
getValue(row) { //
return row.jianyanxiang
}
},
{
name: 'jianyanmu', // el-table-column prop=''
getValue(row) { //
return row.jianyanmu
}
}
],
rows: [
{
name: 'jianyanxiang',
getValue(row) {
return row.jianyanxiang
}
},
{
name: 'jianyanneirong',
getValue(row) {
return row.jianyanneirong
}
}
]
}
},
computed: {
},
watch: {
// jlbh3: function(val) {
// this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + '-' + val
// this.judgeRepeat(this.ysjl.jilubianhao, this.ysjl.id)
// },
// jilubianhao: function(newValue) {
// this.judgeRepeat(newValue, this.ysjl.id)
// }
},
// F5
mounted() {
window.addEventListener('beforeunload', this.beforeunloadHandler, false)
},
created() {
if (this.state === 'create') {
this.initYsjl()
this.getJyxm(1)
//
this.getMaxBh()
} else {
this.getYsjl(this.$route.query.id)
this.getJyxm(1)
}
},
beforeDestroy() {
window.removeEventListener('beforeunload', this.beforeunloadHandler, false)
},
methods: {
/**
* 签名方法
* @param data
*/
signNameValue(data) {
this.ysjl.jianyanrenyuan = String(data.id)
this.jianyanrenyuan = data.name
this.common.signName(this.ysjl.id, this.ysjl.jianyanrenyuan)
},
customClearSign(fieldName) {
const data = {
id:
this.ysjl.jianyanrenyuan &&
this.common
.deleteElement(
this.ysjl.jianyanrenyuan.split(','),
String(this.$store.getters.userId)
)
.join(','),
name:
this.jianyanrenyuan &&
this.common
.deleteElement(
this.jianyanrenyuan.split(','),
this.$store.getters.nickname
)
.join(','),
fieldName: fieldName
}
this.signNameValue(data)
},
//
getMaxBh() {
const aheadPart = this.jlbh1 + this.jlbh2
this.api({
url: '/ysjl/gainCurrentBh',
method: 'get',
params: {
aheadPart: aheadPart + '-',
hinderPart: ''
}
}).then(data => {
this.jlbh3 = data
})
},
initYsjl() {
this.api({
url: '/ysjl/initYsjl',
method: 'post',
data: {
templateId: this.$route.query.templateId,
renwuId: this.$route.query.renwuId,
neibuleibie: this.$route.query.neibuleibie,
sblbdm: this.$route.query.sblbdm,
sblbmc: this.$route.query.sblbmc,
sbpzdm: this.$route.query.sbpzdm,
sbpzmc: this.$route.query.sbpzmc
}
}).then(data => {
this.ysjl = data.ysjl
this.param = (data.param !== null && data.param !== undefined) ? data.param : {}
this.ysjl.jianyanjieshuriqi = this.formatter.dateFormat('YYYY-MM-dd')
this.getXcjyrq()
this.ysjl.jilubianhao = this.jilubianhao
this.ysjl.baogaobianhao = null //
this.ysjl.jianyanjielun = '符合要求'
this.param.jiezhi = '水'
this.ysjl.jigouhezhunzhenghao = process.env.VUE_APP_HZZBH
this.ysjl.beizhu = '/'
this.ysjl.xiacijianyanriqishuoming = '/'
this.ysjl.anzhuangdidian = this.ysjl.shiyongdanweiDizhi
this.$set(this.param, 'qita', '/')
//
this.ysjl.zhizaoriqi = this.common.checkDateFormat(this.ysjl.zhizaoriqi)
this.ysjl.touyongriqi = this.common.checkDateFormat(this.ysjl.touyongriqi)
this.param.shangcijianyanriqi = this.common.checkDateFormat(this.param.shangcijianyanriqi)
})
},
getYsjl(id) {
this.api({
url: '/ysjl',
method: 'get',
params: {
ysjlId: id
}
}).then(data => {
this.ysjl = data
if (this.ysjl.jianyanrenyuan !== null && this.ysjl.jianyanrenyuan.length > 0) {
this.jianyanrenyuan = this.common.convertCnName(this.ysjl.jianyanrenyuan)
}
//
if (this.ysjl.jilubianhao === null || this.ysjl.jilubianhao === undefined || this.ysjl.jilubianhao === '') {
this.getMaxBh()
}
this.getParam(this.ysjl.id, this.ysjl.shebeizhongleidaima)
})
},
getParam(ysjlId, sbzldm) {
// id
this.api({
url: '/ysjl/getParamByYsjlId',
method: 'get',
params: {
ysjlId: ysjlId,
sbzldm: sbzldm
}
}).then(data => {
this.param = data
})
},
//
getJyxm(sort) {
let url = ''
let data = {}
if (this.state === 'create') {
url = '/jyxm/getCyJyxm'
data = {
templateId: this.$route.query.templateId,
order: sort
}
} else {
url = '/jyxm/getCyJyxmByYsjl'
data = {
ysjlId: this.ysjlId,
isReport: false,
templateId: this.$route.query.templateId,
order: sort
}
}
this.api({
url: url,
method: 'get',
params: data
}).then(data => {
if (this.state === 'create') {
data.forEach(row => {
this.sybjSData.push({
id: row.id,
jianyanxiang: row.jianyanxiang,
jianyanneirong: row.jianyanneirong,
D1: row.jianyanjieguo
})
})
} else {
data.forEach(row => {
this.sybjSData.push({
id: row.id,
jianyanxiang: row.jianyanxiang,
jianyanneirong: row.jianyanneirong,
D1: row.D1
})
})
}
this.tableJs.getData(this.cols, this.rows, this.sybjSData)
})
},
saveYsjl: function(operation) {
if (operation === 'add') {
if (this.jlbh3.trim() === '') {
this.$message({ message: '请先确认记录编号是否完整!', type: 'warning' })
return false
}
}
//
const tableData = []
this.sybjSData.forEach((row) => {
tableData.push({
ysjlId: this.ysjlId,
beizhu: row.beizhu,
dicJyxmId: row.dicJyxmId,
jianyanjieguo: row.jianyanjieguo ? row.jianyanjieguo : '',
jianyanjielun: row.jianyanjielun ? row.jianyanjielun : '',
jyxmMode: 0,
sort: row.sort,
orders: row.orders,
cjState: 0
})
})
let method = ''
this.ysjl.bglx = 1
this.ysjl.cjState = 'ysjl'
this.ysjl.zfState = 0
this.ysjl.jianyanxiangmu = 'gynb'
this.ysjl.jlprintState = 0
if (this.ysjl.jianyanjielun === '不符合要求') {
this.ysjl.xiacijianyanriqi = null
}
if (operation === 'add') {
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + '-' + this.jlbh3
method = 'post'
} else if (operation === 'build') {
if (this.ysjl.jianyanrenyuan === null || this.ysjl.jianyanrenyuan === '') {
this.$message({
type: 'error',
message: '请先签名再生成报告!'
})
return false
}
if (this.ysjl.sfdId === null || this.ysjl.sfdId === '') {
this.$message({
type: 'error',
message: '请先追加或者创建收费单后在尝试!'
})
return false
}
method = 'put'
} else if (operation === 'upd') {
method = 'put'
}
if (this.isRepeat) {
this.$message({ message: '记录编号重复,请先修改记录编号再保存', type: 'error' })
return false
} else {
this.$refs['ysjl'].validate(valid => {
if (valid) {
const jyxm = tableData
this.api({
url: '/ysjl',
method: method,
data: {
ysjl: this.ysjl,
param: this.param,
cyJyxm: {},
jdJyxm: jyxm
}
}).then(data => {
Utils.$emit('task-list')
Utils.$emit('ysjl-list')
if (operation === 'add' && data !== '') {
this.$message({ message: '保存成功, 请前往待办记录中查看。', type: 'success' })
this.ysjl.id = data
this.param.ysjlId = data
//
this.$store.dispatch('delCurrentViews', {
view: this.$route,
$router: this.$router
})
} else if (operation === 'upd') {
this.$message({ message: '更新成功', type: 'success' })
//
this.$router.push({
query: merge(this.$route.query, { 'jianyanrenyuan': this.ysjl.jianyanrenyuan })
})
// this.$refs.bill.updateChargeBill()
} else {
Utils.$emit('ysjl-list')
Utils.$emit('ysjl-yb-list')
Utils.$emit('bggl-daiban-list')
this.$message({ message: '生成报告成功', type: 'success' })
this.$store.dispatch('delCurrentViews', {
view: this.$route,
$router: this.$router
})
}
this.state = 'update'
})
}
})
}
},
judgeRepeat(bianhao, id) {
this.api({
url: '/ysjl/judgeRepeat',
method: 'get',
params: {
ysjlId: id,
bianhao: bianhao
}
}).then(data => {
if (data > 0) {
this.isRepeat = true
} else {
this.isRepeat = false
}
})
},
getXcjyrq() {
const xcjyrq = new Date(this.ysjl.jianyanjieshuriqi)
xcjyrq.setFullYear(xcjyrq.getFullYear() + 2, xcjyrq.getMonth(), xcjyrq.getDate() - 1)
this.ysjl.xiacijianyanriqi = this.formatter.dateFormat('YYYY-MM-dd', xcjyrq)
},
setYsjlData(data) {
this.ysjl.sfdId = data
},
// F5
beforeunloadHandler(e) {
e.returnValue = ''
}
}
}
</script>

709
src/views/ysjl/5000/dj/lygg-cl/index.vue

@ -0,0 +1,709 @@
<!--工业锅炉内部检验-->
<template>
<div class="app-container">
<sticky style="margin-bottom: 10px;">
<div class="sub-navbar">
<el-button v-if="state === 'create'" type="success" icon="el-icon-edit" size="medium" @click="saveYsjl('add')">
保存
</el-button>
<el-button v-if="state === 'update'" type="primary" icon="el-icon-edit" size="medium" @click="saveYsjl('upd')">
更新
</el-button>
<el-button v-if="state === 'update'" type="success" icon="el-icon-upload2" size="medium" @click="saveYsjl('build')">
生成报告
</el-button>
<el-button v-if="state !== 'create'" type="warning" icon="el-icon-view" size="medium" @click="common.viewYsjl(ysjl.id, 'YSJL', false)">
预览
</el-button>
</div>
</sticky>
<el-tabs v-model="checkedTab" type="card">
<el-tab-pane label="基本信息" name="first">
<el-form ref="ysjl" :model="ysjl" class="el-form" label-position="right" label-width="150px">
<fieldset>
<legend>基本信息</legend>
<el-row :gutter="25">
<el-col v-if="state === 'create' || ysjl.jilubianhao === null || 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 />-
<el-input v-model="jlbh3" style="width:85px" @blur="judgeRepeat(jlbh1 + jlbh2 + '-' + jlbh3 , ysjl.id)" />
</el-form-item>
</el-col>
<el-col v-else :span="9">
<el-form-item label="记录编号" prop="jilubianhao">
<el-input v-if="state !== 'create'" v-model="ysjl.jilubianhao" :disabled="edit" />
</el-form-item>
</el-col>
<el-col v-if="isRepeat" :span="2" style="vertical-align: middle;padding-top: 3px;font-size: 15px;">
<span style="color:red">编号重复</span>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="设备注册代码(使用登记证编号)" prop="zhucedaima" label-width="300px">
<el-input v-model="ysjl.zhucedaima" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="车辆牌号" prop="车辆牌号">
<el-input v-model="carNum" disabled style="width:80px" />
<el-input v-model="ysjl.cheliangpaihao" :disabled="edit" style="width:80px" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="使用单位" prop="shiyongdanwei" label-width="160px">
<el-input v-model="ysjl.shiyongdanwei" :disabled="edit" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="设备单位地址" prop="anzhuangdidian">
<el-input v-model="ysjl.anzhuangdidian" :disabled="edit" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="检验地址" prop="anzhuangdidian">
<el-input v-model="ysjl.anzhuangdidian" :disabled="edit" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="使用单位联系人" prop="shiyongdanweiLianxiren">
<el-input v-model="ysjl.shiyongdanweiLianxiren" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="联系电话" prop="shiyongdanweiDianhua">
<el-input v-model="ysjl.shiyongdanweiDianhua" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="设备品种(名称)" prop="shebeipinzhong">
<el-input v-model="ysjl.shebeipinzhong" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="产品型号" prop="guigexinghao">
<el-input v-model="ysjl.guigexinghao" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="设备代码" prop="shebeidaima">
<el-input v-model="ysjl.shebeidaima" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="产品编号" prop="chanpinbianhao">
<el-input v-model="ysjl.chanpinbianhao" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="制造单位" prop="zhizaodanwei">
<el-input v-model="ysjl.zhizaodanwei" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="制造日期" prop="zhizaoriqi">
<el-date-picker v-model="ysjl.zhizaoriqi" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="改造单位" prop="gaizaodanwei">
<el-input v-model="ysjl.gaizaodanwei" :disabled="edit" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="改造日期" prop="gaizaoriqi">
<el-date-picker v-model="ysjl.gaizaoriqi" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="发动机(电机)编号" prop="fadongjibianhao">
<el-input v-model="param.fadongjibianhao" :disabled="edit" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item
label="使用区域"
prop="shiyongquyu"
>
<el-radio-group v-model="param.shiyongquyu">
<el-radio label="厂区">
厂区
</el-radio>
<el-radio label="旅游景区">
旅游景区
</el-radio>
<el-radio label="游乐场所">
游乐场所
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="检验类别" prop="jianyanleibie" label-width="300px">
<el-radio-group v-model="ysjl.jianyanleibie">
<el-radio label="SC">
首次检验
</el-radio>
<el-radio label="DQ">
定期检验
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>设备技术参数</legend>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="额定载客人数" prop="edingzaizhongliang">
<el-input v-model="param.edingzaizhongliang" type="text">
<span slot="suffix"></span>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="整机整备质量" prop="zhengbeizhiliang">
<el-input v-model="param.zhengbeizhiliang" type="text">
<span slot="suffix">kg</span>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="最大运行速度" prop="sudukongzai">
<el-input
v-model="param.sudukongzai"
type="text"
>
<span slot="suffix">km/h</span>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="列车车厢数" prop="liechecheliangshu">
<el-input v-model="param.liechecheliangshu" type="text">
<span slot="suffix"></span>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="最大行驶坡度" prop="xingshipodu">
<el-input v-model="param.xingshipodu" type="text">
<span slot="suffix">%</span>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="动力方式" prop="donglifangshi">
<el-input v-model="param.donglifangshi" type="text" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>检验信息</legend>
<el-row :gutter="20" style="margin-bottom:20px">
<el-col :span="18">
<el-form-item label="检验依据" prop="jianyanyiju">
<el-input v-model="ysjl.jianyanyiju" type="textarea" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<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">
<el-col :span="18">
<el-form-item label="检验结论" prop="jianyanjielun">
<el-radio-group v-model="ysjl.jianyanjielun">
<el-radio label="合格">
合格
</el-radio>
<el-radio label="不合格">
不合格
</el-radio>
<el-radio label="复检合格">
复检合格
</el-radio>
<el-radio label="复检不合格">
复检不合格
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<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">
<el-col :span="9">
<el-form-item label="检验完成日期" prop="jianyanjieshuriqi">
<el-date-picker
v-model="ysjl.jianyanjieshuriqi"
value-format="yyyy-MM-dd"
placeholder="选择日期"
style="width: 100%"
/>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="下次检验日期" prop="xiacijianyanriqi">
<el-date-picker
v-model="ysjl.xiacijianyanriqi"
value-format="yyyy-MM-dd"
placeholder="选择日期"
style="width: 100%"
/>
</el-form-item>
</el-col>
</el-row>
<template>
<el-row :gutter="10">
<el-col :span="9">
<el-form-item label="检验人员" prop="jianyanrenyuan">
<el-input v-model="ysjl.jianyanrenyuan" disabled />
</el-form-item>
</el-col>
<el-col :span="9">
<sign-name
:jianyanrenyuan="jianyanrenyuan"
:ysjl="ysjl"
:custom-clear-sign="customClearSign"
@setSignValue="signNameValue"
/>
</el-col>
</el-row>
<!-- <el-row :gutter="10">
<el-col :span="9">
<el-form-item label="编制" prop="jianyanrenyuan">
<el-input v-model="ysjl.jianyanrenyuan" disabled />
</el-form-item>
</el-col>
<el-col :span="9">
<sign-name
:jianyanrenyuan="jianyanrenyuan"
:ysjl="ysjl"
:custom-clear-sign="customClearSign"
@setSignValue="signNameValue"
/>
</el-col>
</el-row> -->
</template>
</fieldset>
</el-form>
</el-tab-pane>
<el-tab-pane label="检验项目" name="second">
<el-table ref="sybjSData" :data="sybjSData" :span-method="tableJs.mergeColRows" border stripe style="width:90%">
<el-table-column align="center" label="检验项目">
<el-table-column align="center" prop="jianyanxiang" width="200" />
<el-table-column align="center" prop="jianyanmu" width="200" />
<el-table-column align="left" prop="jianyanneirong" />
</el-table-column>
<el-table-column align="center" prop="D1" label="检验结果">
<template slot-scope="scope">
<el-select v-model="scope.row.D1" :disabled="edit" type="text" placeholder="请选择" style="width: 100%;" filterable allow-create default-first-option>
<el-option label="√" value="√" />
<el-option label="○" value="○" />
<el-option label="×" value="×" />
<el-option label="/" value="/" />
</el-select>
</template>
</el-table-column>
</el-table>
<br>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import Sticky from '@/components/Sticky'
import SignName from '@/views/common/SignName'
import Utils from '@/utils/contact'
import merge from 'webpack-merge'
import { getDepartmentTreeList } from '@/api/common'
export default {
name: 'GlGynbYsjl',
components: { SignName, Sticky },
data() {
return {
jlbh1: 'GN',
jlbh2: '(' + new Date().getFullYear() + ')',
jlbh3: '',
ysjl: {
shiyongdanwei: ''
},
carNum: '鲁·',
param: {},
state: this.$route.query.state,
jianyanrenyuan: '',
departmentId: this.$store.getters.departmentId,
isRepeat: false,
edit: false,
sybjSData: [],
tableData: [],
checkedTab: 'first',
ysjlId: this.$route.query.id,
//
//
cols: [
{
name: 'jianyanxiang', // el-table-column prop=''
getValue(row) { //
return row.jianyanxiang
}
},
{
name: 'jianyanmu', // el-table-column prop=''
getValue(row) { //
return row.jianyanmu
}
}
],
rows: [
{
name: 'jianyanxiang',
getValue(row) {
return row.jianyanxiang
}
},
{
name: 'jianyanneirong',
getValue(row) {
return row.jianyanneirong
}
}
]
}
},
computed: {
},
watch: {
// jlbh3: function(val) {
// this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + '-' + val
// this.judgeRepeat(this.ysjl.jilubianhao, this.ysjl.id)
// },
// jilubianhao: function(newValue) {
// this.judgeRepeat(newValue, this.ysjl.id)
// }
},
// F5
mounted() {
window.addEventListener('beforeunload', this.beforeunloadHandler, false)
},
created() {
if (this.state === 'create') {
this.initYsjl()
this.getJyxm(1)
//
this.getMaxBh()
} else {
this.getYsjl(this.$route.query.id)
this.getJyxm(1)
}
},
beforeDestroy() {
window.removeEventListener('beforeunload', this.beforeunloadHandler, false)
},
methods: {
/**
* 签名方法
* @param data
*/
signNameValue(data) {
this.ysjl.jianyanrenyuan = String(data.id)
this.jianyanrenyuan = data.name
this.common.signName(this.ysjl.id, this.ysjl.jianyanrenyuan)
},
customClearSign(fieldName) {
const data = {
id:
this.ysjl.jianyanrenyuan &&
this.common
.deleteElement(
this.ysjl.jianyanrenyuan.split(','),
String(this.$store.getters.userId)
)
.join(','),
name:
this.jianyanrenyuan &&
this.common
.deleteElement(
this.jianyanrenyuan.split(','),
this.$store.getters.nickname
)
.join(','),
fieldName: fieldName
}
this.signNameValue(data)
},
//
getMaxBh() {
const aheadPart = this.jlbh1 + this.jlbh2
this.api({
url: '/ysjl/gainCurrentBh',
method: 'get',
params: {
aheadPart: aheadPart + '-',
hinderPart: ''
}
}).then(data => {
this.jlbh3 = data
})
},
initYsjl() {
this.api({
url: '/ysjl/initYsjl',
method: 'post',
data: {
templateId: this.$route.query.templateId,
renwuId: this.$route.query.renwuId,
neibuleibie: this.$route.query.neibuleibie,
sblbdm: this.$route.query.sblbdm,
sblbmc: this.$route.query.sblbmc,
sbpzdm: this.$route.query.sbpzdm,
sbpzmc: this.$route.query.sbpzmc
}
}).then(data => {
this.ysjl = data.ysjl
this.param = (data.param !== null && data.param !== undefined) ? data.param : {}
this.ysjl.jianyanjieshuriqi = this.formatter.dateFormat('YYYY-MM-dd')
this.getXcjyrq()
this.ysjl.jilubianhao = this.jilubianhao
this.ysjl.baogaobianhao = null //
this.ysjl.jigouhezhunzhenghao = process.env.VUE_APP_HZZBH
this.ysjl.beizhu = '/'
this.ysjl.anzhuangdidian = this.ysjl.shiyongdanweiDizhi
this.$set(this.param, 'qita', '/')
//
this.ysjl.zhizaoriqi = this.common.checkDateFormat(this.ysjl.zhizaoriqi)
this.ysjl.gaizaoriqi = this.common.checkDateFormat(this.ysjl.gaizaoriqi)
})
},
getYsjl(id) {
this.api({
url: '/ysjl',
method: 'get',
params: {
ysjlId: id
}
}).then(data => {
this.ysjl = data
if (this.ysjl.jianyanrenyuan !== null && this.ysjl.jianyanrenyuan.length > 0) {
this.jianyanrenyuan = this.common.convertCnName(this.ysjl.jianyanrenyuan)
}
//
if (this.ysjl.jilubianhao === null || this.ysjl.jilubianhao === undefined || this.ysjl.jilubianhao === '') {
this.getMaxBh()
}
this.getParam(this.ysjl.id, this.ysjl.shebeizhongleidaima)
})
},
getParam() {
const id = this.ysjlId || this.$route.query.templateId
this.ysjlService.getParam(id, this.$route.query.sbzldm).then((data) => {
this.param = data
})
},
getJyxm(sort) {
if (this.$route.query.state === 'update') {
this.jyxmService
.getJdCyJyxm(this.ysjlId, this.$route.query.templateId, sort)
.then((data) => {
this.sybjSData = data
this.tableJs.getData(this.cols, this.rows, this.sybjSData)
})
} else {
this.jyxmService
.getCyJyxm(this.$route.query.templateId, sort)
.then((data) => {
data.forEach((row) => {
row.dicJyxmId = row.id
})
this.sybjSData = data
this.tableJs.getData(this.cols, this.rows, this.sybjSData)
})
}
},
saveYsjl: function(operation) {
if (operation === 'add') {
if (this.jlbh3.trim() === '') {
this.$message({ message: '请先确认记录编号是否完整!', type: 'warning' })
return false
}
}
//
const tableData = []
this.sybjSData.forEach((row) => {
tableData.push({
ysjlId: this.ysjlId,
beizhu: row.beizhu,
dicJyxmId: row.dicJyxmId,
jianyanjieguo: row.jianyanjieguo ? row.jianyanjieguo : '',
jianyanjielun: row.jianyanjielun ? row.jianyanjielun : '',
jyxmMode: 0,
sort: row.sort,
orders: row.orders,
cjState: 0
})
})
let method = ''
this.ysjl.bglx = 1
this.ysjl.cjState = 'ysjl'
this.ysjl.zfState = 0
this.ysjl.jianyanxiangmu = 'gynb'
this.ysjl.jlprintState = 0
if (this.ysjl.jianyanjielun === '不合格' || this.ysjl.jianyanjielun === '复检不合格') {
this.ysjl.xiacijianyanriqi = null
}
if (operation === 'add') {
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + '-' + this.jlbh3
method = 'post'
} else if (operation === 'build') {
if (this.ysjl.jianyanrenyuan === null || this.ysjl.jianyanrenyuan === '') {
this.$message({
type: 'error',
message: '请先签名再生成报告!'
})
return false
}
if (this.ysjl.sfdId === null || this.ysjl.sfdId === '') {
this.$message({
type: 'error',
message: '请先追加或者创建收费单后在尝试!'
})
return false
}
method = 'put'
} else if (operation === 'upd') {
method = 'put'
}
if (this.isRepeat) {
this.$message({ message: '记录编号重复,请先修改记录编号再保存', type: 'error' })
return false
} else {
this.$refs['ysjl'].validate(valid => {
if (valid) {
const jyxm = tableData
this.api({
url: '/ysjl',
method: method,
data: {
ysjl: this.ysjl,
param: this.param,
cyJyxm: {},
jdJyxm: jyxm
}
}).then(data => {
Utils.$emit('task-list')
Utils.$emit('ysjl-list')
if (operation === 'add' && data !== '') {
this.$message({ message: '保存成功, 请前往待办记录中查看。', type: 'success' })
this.ysjl.id = data
this.param.ysjlId = data
//
this.$store.dispatch('delCurrentViews', {
view: this.$route,
$router: this.$router
})
} else if (operation === 'upd') {
this.$message({ message: '更新成功', type: 'success' })
//
this.$router.push({
query: merge(this.$route.query, { 'jianyanrenyuan': this.ysjl.jianyanrenyuan })
})
// this.$refs.bill.updateChargeBill()
} else {
Utils.$emit('ysjl-list')
Utils.$emit('ysjl-yb-list')
Utils.$emit('bggl-daiban-list')
this.$message({ message: '生成报告成功', type: 'success' })
this.$store.dispatch('delCurrentViews', {
view: this.$route,
$router: this.$router
})
}
this.state = 'update'
})
}
})
}
},
judgeRepeat(bianhao, id) {
this.api({
url: '/ysjl/judgeRepeat',
method: 'get',
params: {
ysjlId: id,
bianhao: bianhao
}
}).then(data => {
if (data > 0) {
this.isRepeat = true
} else {
this.isRepeat = false
}
})
},
getXcjyrq() {
const xcjyrq = new Date(this.ysjl.jianyanjieshuriqi)
xcjyrq.setFullYear(xcjyrq.getFullYear() + 2, xcjyrq.getMonth(), xcjyrq.getDate() - 1)
this.ysjl.xiacijianyanriqi = this.formatter.dateFormat('YYYY-MM-dd', xcjyrq)
},
setYsjlData(data) {
this.ysjl.sfdId = data
},
// F5
beforeunloadHandler(e) {
e.returnValue = ''
}
}
}
</script>
Loading…
Cancel
Save