Browse Source

移除多余代码

master
李磊 3 years ago
parent
commit
a39cc9653f
  1. 2
      src/api/ysjl.js
  2. 4
      src/utils/common.js
  3. 2
      src/views/allot/components/chengya_list.vue
  4. 2
      src/views/allot/components/jidian_list.vue
  5. 2
      src/views/allot/project.vue
  6. 2
      src/views/allot/tuihui_list.vue
  7. 2
      src/views/assign/list.vue
  8. 4
      src/views/assign/missionList.vue
  9. 2
      src/views/assign/old_list.vue
  10. 4
      src/views/bggl/2000/jj/cyqp.vue
  11. 6
      src/views/bggl/8000/dj/dq/edit.vue
  12. 6
      src/views/bggl/8000/dj/nd/edit.vue
  13. 4
      src/views/bggl/8000/jj/edit.vue
  14. 2
      src/views/bggl/components/boiler_db_list.vue
  15. 2
      src/views/bjd/department_list.vue
  16. 652
      src/views/chargeBill/components/complex.vue
  17. 2
      src/views/common/AllotFp/index.vue
  18. 2
      src/views/common/DepartmentUser/index.vue
  19. 2
      src/views/common/SignName/index.vue
  20. 2
      src/views/flow/definition.vue
  21. 3
      src/views/print/1000/grant_create.vue
  22. 18
      src/views/task/list.vue
  23. 2
      src/views/user/permission.vue
  24. 954
      src/views/ysjl/1000/common/dzsclJyxmBzz.js
  25. 117
      src/views/ysjl/1000/common/glft.vue
  26. 501
      src/views/ysjl/1000/common/sfqk.vue
  27. 968
      src/views/ysjl/1000/common/sz/dzscl.vue
  28. 15
      src/views/ysjl/1000/common/sz/gyscl.vue
  29. 828
      src/views/ysjl/1000/dj/nb/2.0/dznb.vue
  30. 694
      src/views/ysjl/1000/dj/nb/2.0/gynb.vue
  31. 810
      src/views/ysjl/1000/dj/nb/dznb.vue
  32. 310
      src/views/ysjl/1000/dj/nb/gynb.vue
  33. 643
      src/views/ysjl/1000/dj/sy/2.0/sysy.vue
  34. 150
      src/views/ysjl/1000/dj/sy/sysy.vue
  35. 14
      src/views/ysjl/1000/dj/sz/dzscl.vue
  36. 781
      src/views/ysjl/1000/dj/wb/2.0/dzwb.vue
  37. 708
      src/views/ysjl/1000/dj/wb/2.0/gywb.vue
  38. 809
      src/views/ysjl/1000/dj/wb/dzwb.vue
  39. 149
      src/views/ysjl/1000/dj/wb/gywb.vue
  40. 172
      src/views/ysjl/1000/fenxiang/dxt.vue
  41. 167
      src/views/ysjl/1000/jj/2.0/fenxiang/aqfj.vue
  42. 254
      src/views/ysjl/1000/jj/2.0/fenxiang/bhcd.vue
  43. 120
      src/views/ysjl/1000/jj/2.0/fenxiang/sjwjsc.vue
  44. 133
      src/views/ysjl/1000/jj/2.0/fenxiang/wgjh.vue
  45. 697
      src/views/ysjl/1000/jj/2.0/gzwx.vue
  46. 716
      src/views/ysjl/1000/jj/2.0/jkjd.vue
  47. 915
      src/views/ysjl/1000/jj/2.0/sg.vue
  48. 949
      src/views/ysjl/1000/jj/2.0/zg.vue
  49. 714
      src/views/ysjl/1000/jj/gzwx.vue
  50. 551
      src/views/ysjl/1000/jj/jkjd.vue
  51. 859
      src/views/ysjl/1000/jj/sg.vue
  52. 14
      src/views/ysjl/1000/jj/sz/dzscl.vue
  53. 14
      src/views/ysjl/1000/jj/sz/gyscl.vue
  54. 941
      src/views/ysjl/1000/jj/zg.vue
  55. 855
      src/views/ysjl/1000/zj/common/index.vue
  56. 49
      src/views/ysjl/1000/zj/fqg.vue
  57. 52
      src/views/ysjl/1000/zj/gks.vue
  58. 49
      src/views/ysjl/1000/zj/glbj.vue
  59. 698
      src/views/ysjl/1000/zj/lxcpg.vue
  60. 51
      src/views/ysjl/1000/zj/sgs.vue
  61. 51
      src/views/ysjl/1000/zj/sz.vue
  62. 49
      src/views/ysjl/1000/zj/yjrzt.vue
  63. 2
      src/views/ysjl/2000/2100/fenxiang/ydjc.vue
  64. 8
      src/views/ysjl/2000/2100/zbg/dj/edit.vue
  65. 4
      src/views/ysjl/2000/2100/zbg/jj/dxgz.vue
  66. 4
      src/views/ysjl/2000/2100/zbg/nd/edit.vue
  67. 6
      src/views/ysjl/2000/2200/zbg/dj/edit.vue
  68. 6
      src/views/ysjl/2000/2200/zbg/nd/tuoche.vue
  69. 4
      src/views/ysjl/2000/2300/zbg/jj/cyqp.vue
  70. 6
      src/views/ysjl/2000/2400/common/ycjl.vue
  71. 6
      src/views/ysjl/2000/2400/zbg/jj/edit.vue
  72. 4
      src/views/ysjl/7000/jj/edit.vue
  73. 6
      src/views/ysjl/8000/jj/edit.vue
  74. 4
      src/views/ysjl/8000/jj/edit2.vue
  75. 2
      src/views/ysjl/F000/dj/edit.vue
  76. 45
      src/views/ysjl/components/original_db_list.vue
  77. 4
      src/views/ysjl/elevator/common/index.vue

2
src/api/ysjl.js

@ -12,7 +12,7 @@ export default {
url: '/ysjl/initYsjl',
method: 'post',
data: {
modelId: data.modelId,
templateId: data.templateId,
renwuId: data.renwuId,
neibuleibie: data.neibuleibie,
sblbdm: data.sblbdm,

4
src/utils/common.js

@ -375,7 +375,7 @@ export default {
jianyanrenyuan: ysjl.jianyanrenyuan,
state: 'update',
renwuId: ysjl.renwuId,
ysjlTemplateId: ysjl.ysjlTemplateId,
templateId: ysjl.templateId,
jylb: ysjl.jianyanleibie,
neibuleibie: ysjl.neibuleibie,
sbzldm: ysjl.shebeizhongleidaima,
@ -432,7 +432,7 @@ export default {
url: '/ysjl/initYsjl',
method: 'post',
data: {
modelId: query.modelId,
templateId: query.templateId,
renwuId: query.renwuId,
neibuleibie: query.neibuleibie,
sblbdm: query.sblbdm,

2
src/views/allot/components/chengya_list.vue

@ -476,7 +476,7 @@ export default {
//
getDepartment() {
this.api({
url: '/department/getAllDepartment',
url: '/department/all',
method: 'get'
}).then(data => {
this.depts = data

2
src/views/allot/components/jidian_list.vue

@ -558,7 +558,7 @@ export default {
//
getDepartment() {
this.api({
url: '/department/getAllDepartment',
url: '/department/all',
method: 'get'
}).then(data => {
this.depts = data

2
src/views/allot/project.vue

@ -459,7 +459,7 @@ export default {
//
getDepartment() {
this.api({
url: '/department/getAllDepartment',
url: '/department/all',
method: 'get'
}).then(data => {
this.depts = data

2
src/views/allot/tuihui_list.vue

@ -433,7 +433,7 @@ export default {
},
getDepartment() {
this.api({
url: '/department/getAllDepartment',
url: '/department/all',
method: 'get'
}).then(data => {
this.depts = data

2
src/views/assign/list.vue

@ -444,7 +444,7 @@ export default {
//
getDepartment() {
this.api({
url: '/department/getAllDepartment',
url: '/department/all',
method: 'get'
}).then(data => {
this.depts = data

4
src/views/assign/missionList.vue

@ -469,7 +469,7 @@ export default {
query: {
state: 'create',
renwuId: this.renwuId,
modelId: this.template.value,
templateId: this.template.value,
jylb: this.jianyanleibie,
neibuleibie: this.neibuleibie,
departmentId: this.$store.getters.departmentId,
@ -485,7 +485,7 @@ export default {
url: '/ysjl/initYsjl',
method: 'post',
data: {
modelId: this.template.value,
templateId: this.template.value,
renwuId: this.renwuId,
neibuleibie: this.neibuleibie,
sblbdm: this.sbxxList.sblbdm,

2
src/views/assign/old_list.vue

@ -246,7 +246,7 @@ export default {
//
getDepartment() {
this.api({
url: '/department/getAllDepartment',
url: '/department/all',
method: 'get'
}).then(data => {
this.depts = data

4
src/views/bggl/2000/jj/cyqp.vue

@ -349,7 +349,7 @@ export default {
url: '/ysjl/initYsjl',
method: 'post',
data: {
modelId: this.$route.query.modelId,
templateId: this.$route.query.templateId,
renwuId: this.$route.query.renwuId,
neibuleibie: this.$route.query.neibuleibie,
sblbdm: this.$route.query.sblbdm,
@ -446,7 +446,7 @@ export default {
if (this.state === 'create') {
url = '/jyxm/getCyJyxm'
data = {
templateId: this.$route.query.modelId,
templateId: this.$route.query.templateId,
order: sort
}
} else {

6
src/views/bggl/8000/dj/dq/edit.vue

@ -717,7 +717,7 @@ export default {
}
],
info: {
modelId: this.$route.query.modelId,
modelId: this.$route.query.templateId,
sbzldm: this.$route.query.sbzldm,
sblbdm: this.$route.query.sblbdm,
ysjlId: this.$route.query.id,
@ -761,7 +761,7 @@ export default {
url: '/ysjl/initYsjl',
method: 'post',
data: {
modelId: this.$route.query.modelId,
templateId: this.$route.query.templateId,
renwuId: this.$route.query.renwuId,
neibuleibie: this.$route.query.neibuleibie,
sblbdm: this.$route.query.sblbdm,
@ -876,7 +876,7 @@ export default {
if (this.state === 'create') {
url = '/jyxm/getCyJyxm'
data = {
templateId: this.$route.query.modelId,
templateId: this.$route.query.templateId,
order: sort
}
} else {

6
src/views/bggl/8000/dj/nd/edit.vue

@ -399,7 +399,7 @@ export default {
}
],
info: {
modelId: this.$route.query.modelId,
modelId: this.$route.query.templateId,
sbzldm: this.$route.query.sbzldm,
sblbdm: this.$route.query.sblbdm,
ysjlId: this.$route.query.id,
@ -442,7 +442,7 @@ export default {
url: '/ysjl/initYsjl',
method: 'post',
data: {
modelId: this.$route.query.modelId,
templateId: this.$route.query.templateId,
renwuId: this.$route.query.renwuId,
neibuleibie: this.$route.query.neibuleibie,
sblbdm: this.$route.query.sblbdm,
@ -543,7 +543,7 @@ export default {
if (this.state === 'create') {
url = '/jyxm/getCyJyxm'
data = {
templateId: this.$route.query.modelId,
templateId: this.$route.query.templateId,
order: sort
}
} else {

4
src/views/bggl/8000/jj/edit.vue

@ -436,7 +436,7 @@ export default {
param: {},
checkedTab: 'first',
info: {
modelId: this.$route.query.modelId,
modelId: this.$route.query.templateId,
sbzldm: this.$route.query.sbzldm,
sblbdm: this.$route.query.sblbdm,
ysjlId: this.$route.query.id,
@ -473,7 +473,7 @@ export default {
url: '/ysjl/initYsjl',
method: 'post',
data: {
modelId: this.$route.query.modelId,
templateId: this.$route.query.templateId,
renwuId: this.$route.query.renwuId,
neibuleibie: this.$route.query.neibuleibie,
sblbdm: this.$route.query.sblbdm,

2
src/views/bggl/components/boiler_db_list.vue

@ -1126,7 +1126,7 @@ export default {
url: '/ysjl/initYsjl',
method: 'post',
data: {
modelId: this.modelId
templateId: this.templateId
}
}).then(data => {
this.$router.push({ path: data.path + '/' + data.ysjl.id + '/create', query: { ysjl: data.ysjl, param: data.param }})

2
src/views/bjd/department_list.vue

@ -271,7 +271,7 @@ export default {
//
getDepartment() {
this.api({
url: '/department/getAllDepartment',
url: '/department/all',
method: 'get'
}).then(data => {
this.depts = data

652
src/views/chargeBill/components/complex.vue

@ -1,652 +0,0 @@
<template>
<div class="app-container">
<el-button type="primary" size="mini" icon="el-icon-edit" :disabled="chargeBillDetailList.length < 1" @click="updateChargeBill">
保存通知单
</el-button>
<el-button type="success" size="mini" icon="el-icon-circle-plus-outline" @click="createSfd">
创建报告收费通知单
</el-button>
<el-button type="success" size="mini" icon="el-icon-circle-plus-outline" :disabled="chargeBillDetailList.length < 1" @click="addCharges">
添加收费项
</el-button>
<el-button type="danger" size="mini" icon="el-icon-delete" @click="clearBill">
清空收费项
</el-button>
<el-button type="danger" size="mini" icon="el-icon-remove-outline" :disabled="selection.length < 1" @click="delYsjlSfd">
删除收费项
</el-button>
<el-upload
action=""
:http-request="uploadCredential"
:on-exceed="handleExceed"
:show-file-list="false"
style="display: inline-block;"
accept="image/png,image/gif,image/jpg,image/jpeg"
>
<el-button type="warning" size="mini" icon="el-icon-upload">
上传交费凭据
</el-button>
</el-upload>
<el-table
ref="chargeBillDetailList"
:data="chargeBillDetailList"
:row-class-name="tableRowClassName"
fit
highlight-current-row
border
stripe
max-height="450"
show-summary
:summary-method="getSummaries"
style="width:100%;margin-top: 5px;"
@row-click="onRowClick"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="40" />
<el-table-column align="center" type="index" width="50" label="序号" />
<el-table-column align="center" prop="jilubianhao" label="记录编号" />
<el-table-column align="center" prop="chanpinbianhao" label="出厂编号" />
<el-table-column align="center" prop="guigexinghao" label="受检设备(产品)型号" />
<el-table-column v-if="jianyanleibie !== 'ZJ'" align="center" prop="neibuleibie" :formatter="formatter.formatterCategory" label="检验项目" />
<el-table-column v-else align="center" :prop="chargeBillState === 'create' ? 'ss1' : 'zaojia'" label="检验项目(产品出厂价格)" />
<el-table-column align="center" prop="jianyanheding" label="应收检验费金额">
<template slot-scope="scope">
<el-input-number v-model="scope.row.jianyanheding" label="请输入应收金额" placeholder="请输入应收金额" :controls="false" @blur="updateChargeBill" />
</template>
</el-table-column>
</el-table>
<br>
<el-form ref="chargeBill" :model="chargeBill" class="el-form" label-position="right" label-width="130px">
<el-row :gutter="20">
<el-col :span="6">
<el-form-item label="非税收入通用票据:">
<el-input v-model="chargeBill.nonTaxIncomeBill" style="width: 220px" @blur="updateChargeBill" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" style="height: 125px">
<el-col :span="6">
<el-form-item label="记事:">
<el-input v-model="chargeBill.record" type="textarea" rows="5" style="width: 600px" @blur="updateChargeBill" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="6">
<el-form-item label="检验人员:">
<el-select v-model="jianyanrenyuan" multiple placeholder="请选择" @change="updateChargeBill">
<el-option v-for="item in users" :key="item.id" :label="item.nickname" :value="item.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="日期:" label-width="100px">
<el-date-picker v-model="chargeBill.inspectionDate" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" @change="updateChargeBill" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div v-if="imageSrc !== ''" class="demo-image__preview">
<el-image :src="imageSrc" style="width: 500px; height: 500px" :preview-src-list="imageSrcList" />
</div>
<el-dialog title="添加检验设备收费列表" width="80%" :visible.sync="ysjlListVisible" @close="ysjlListVisible = false">
<div class="filter-container">
<el-form>
<el-form-item>
<el-input v-model="ysjlListQuery.jilubianhao" placeholder="记录编号" clearable style="width: 160px" />
<el-input v-model="ysjlListQuery.shiyongdanwei" placeholder="使用单位" clearable style="width: 400px" />
<el-button type="primary" icon="el-icon-search" @click="handleYsjlListFilter">
查询
</el-button>
<el-button type="success" icon="el-icon-search" :disabled="ysjlSelection.length < 1" @click="addYsjlSave">
添加
</el-button>
</el-form-item>
</el-form>
</div>
<el-table
ref="ysjlTableList"
:data="ysjlTableList"
border
fit
highlight-current-row
stripe
max-height="450"
@row-click="onYsjlClick"
@selection-change="handleYsjlSelectionChange"
>
<el-table-column type="selection" width="45" />
<el-table-column align="center" label="记录编号" prop="jilubianhao" min-width="120" />
<el-table-column align="center" label="使用单位" prop="shiyongdanwei" min-width="150" />
<el-table-column align="center" label="注册代码" prop="zhucedaima" min-width="120" />
<el-table-column align="center" label="使用登记证编号" prop="shiyongdengjibianhao" min-width="120" />
<el-table-column align="center" label="出厂编号" prop="chanpinbianhao" min-width="100" />
<el-table-column align="center" label="单位内部编号" prop="danweineibubianhao" min-width="80" />
<el-table-column :formatter="formatter.formatterCategory" align="center" label="检验项" prop="neibuleibie" min-width="80" />
</el-table>
<pagination v-show="totalCount>0" :total="totalCount" :page-num.sync="ysjlListQuery.pageNum" :page-row.sync="ysjlListQuery.pageRow" @pagination="getNotHasSfdList" />
</el-dialog>
<el-dialog title="加入收费通知单列表" width="80%" :visible.sync="appendBillVisible" @close="appendBillVisible = false">
<div class="filter-container">
<el-form>
<el-form-item>
<el-input v-model="query.jilubianhao" placeholder="记录编号" clearable style="width: 160px" />
<el-input v-model="query.inspectedUnit" placeholder="受检单位" clearable style="width: 250px" />
<el-button type="primary" icon="el-icon-search" @click="handleBillFilter">
查询
</el-button>
</el-form-item>
</el-form>
</div>
<el-table
ref="chargeBillList"
:data="chargeBillList"
border
fit
highlight-current-row
stripe
max-height="450"
>
<el-table-column align="center" label="收费编号" prop="serialNumber" min-width="120" />
<el-table-column align="center" label="受检单位" prop="inspectedUnit" min-width="150" />
<el-table-column align="center" label="非税收入通用票据" prop="nonTaxIncomeBill" min-width="120" />
<el-table-column align="center" label="记事" prop="record" min-width="120" />
<el-table-column align="center" label="操作" fixed="right" min-width="140">
<template slot-scope="{row}">
<el-button size="mini" type="success" icon="el-icon-search" @click="onAppendBill(row.id)">
加入通知单
</el-button>
<el-button size="mini" title="详情" icon="el-icon-info" circle @click="showDetailsInit(row)" />
</template>
</el-table-column>
</el-table>
<pagination v-show="count>0" :total="count" :page-num.sync="query.pageNum" :page-row.sync="query.pageSize" @pagination="handleBillFilter" />
</el-dialog>
<detail v-if="detailListVisible" :charge-bill="appendChargeBill" :data="tableDetailsList" :version="18" />
</div>
</template>
<script>
import Detail from '@/views/chargeBill/components/detail'
import Pagination from '@/components/Pagination'
import qs from 'qs'
export default {
name: 'ComplexBill',
components: { Pagination, Detail },
props: {
ysjl: {
type: Object,
required: true
},
version: {
type: Number,
default: 18
}
},
data() {
return {
inspectedUnit: this.ysjl.shiyongdanwei,
shebeizhongleidaima: this.ysjl.shebeizhongleidaima,
jianyanleibie: this.ysjl.jianyanleibie,
selection: [],
chargeBill: {},
jianyanrenyuan: [],
chargeBillDetailList: [], //
ysjlListQuery: {
pageNum: 1, //
pageRow: 10, //
shiyongdanwei: this.inspectedUnit,
billState: false,
cjState: 'ysjl',
shebeizhongleidaima: '1000',
hasLook: 1,
hasChild: true
},
ysjlListVisible: false,
ysjlTableList: [], //
totalCount: 0,
ysjlSelection: [],
users: [],
chargeBillState: 'create',
chargeBillList: [],
appendBillVisible: false,
query: {
pageNum: 1, //
pageRow: 10 //
},
count: 0,
imageSrc: '',
imageSrcList: [],
detailListVisible: false,
appendChargeBill: {},
tableDetailsList: []
}
},
mounted() {
const that = this
this.common.$on('CloseAppendChargeBillDetailList', function() {
that.detailListVisible = false
})
this.getUserList()
if (this.ysjl.sfdId) {
this.chargeBillState = 'update'
this.getSfdById(this.ysjl.sfdId)
}
},
methods: {
/**
* 加入收费通知单
*/
onAppendBill(billId) {
const ysjlIdSet = [this.ysjl.id]
this.appendBill(billId, ysjlIdSet)
},
/**
* 获取检验人员可选列表
*/
getUserList() {
this.api({
url: '/user/getUserListByDepartmentId',
method: 'get',
params: {
departmentId: this.$store.getters.departmentId
}
}).then(data => {
this.users = data
})
},
/**
* 获取收费通知单
*/
getSfdById(billId) {
if (billId) {
this.apibjd({
url: '/charge/findById/' + billId,
method: 'get'
}).then(data => {
if (data) {
this.chargeBill = data
// this.chargeBill.inspectionPerson = Number(data.inspectionPerson)
const person = this.chargeBill.inspectionPerson === null ? this.$store.getters.userId + '' : this.chargeBill.inspectionPerson + ''
if (person.indexOf(',') !== -1) {
person.split(',').forEach(renyuanid => {
this.jianyanrenyuan.push(Number(renyuanid.replace('[', '').replace(']', '')))
})
} else {
this.jianyanrenyuan.push(Number(person))
}
this.apibjd({
url: '/charge/getDetailByBillId/' + billId,
method: 'get',
params: { version: this.version }
}).then(data => {
this.chargeBillDetailList = data
})
if (this.chargeBill.fileName !== undefined && this.chargeBill.fileName !== null) {
this.previewCredentials(this.chargeBill.fileName)
}
}
})
}
},
/**
* 更新收费单信息
*/
updateChargeBill() {
if (this.chargeBillDetailList.length > 0) {
if (this.jianyanrenyuan === null) {
this.$message.info('检验人员不能为空!')
return false
} else {
this.chargeBill.inspectionPerson = this.jianyanrenyuan.toString()
this.apibjd({
url: '/charge/updateBill',
method: 'post',
data: {
chargeBill: this.chargeBill,
chargeBillVOList: this.chargeBillDetailList
}
}).then(() => {
this.$message.success('保存通知单成功!')
const ysjl = this.chargeBillDetailList.filter(ysjl => ysjl.ysjlId === this.ysjl.id)[0]
if (ysjl && ysjl.jianyanheding) {
this.ysjl.jianyanheding = ysjl.jianyanheding
}
})
}
}
},
/**
* 创建收费单
*/
async createSfd() {
if (this.ysjl.sfdId) {
this.$message.info('已加入收费单请勿重复操作!')
} else {
const data = await this.getBillList(null, null, this.inspectedUnit, this.shebeizhongleidaima, this.jianyanleibie, false)
this.chargeBill.inspectedUnit = this.inspectedUnit
this.chargeBill.shebeizhongleidaima = this.shebeizhongleidaima
this.chargeBill.jianyanleibie = this.jianyanleibie
if (data.length < 1) {
this.saveChargeBill()
} else {
this.$confirm('请问需要将此报告追加到已生成的收费通知单里面吗???‘确定’表示追加,‘取消’表示不追加并新建收费通知单。', '警告', {
distinguishCancelAndClose: true,
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
if (this.chargeBillList.length === 1) {
this.onAppendBill(this.chargeBillList[0].id)
} else {
this.appendBillVisible = true
}
}).catch((action) => {
if (action === 'cancel') {
this.saveChargeBill()
}
})
}
}
},
/**
* 根据条件查询收费单集合
* @param id 收费单主键
* @param jilubianhao 记录编号
* @param inspectedUnit 受检单位
* @param shebeizhongleidaima 设备种类代码
* @param jianyanleibie 检验类别
* @param jfState 缴费状态
*/
async getBillList(id, jilubianhao, inspectedUnit, shebeizhongleidaima, jianyanleibie, jfState) {
let result = []
await this.apibjd({
url: '/charge/getBill',
method: 'get',
params: {
id: id,
jilubianhao: jilubianhao,
inspectedUnit: inspectedUnit,
shebeizhongleidaima: shebeizhongleidaima,
jianyanleibie: jianyanleibie,
jfState: jfState
}
}).then(data => {
result = data
this.chargeBillList = data
})
return result
},
/**
* 加入收费单列表查询
*/
handleBillFilter() {
this.getBillList(null, this.query.jilubianhao, this.query.inspectedUnit, null, null, false)
},
/**
* 收费单追加事件
* @param billId 收费单主键
* @param ysjlIdSet 原始记录主键集合
*/
appendBill(billId, ysjlIdSet) {
this.apibjd({
url: '/charge/appendBill',
method: 'post',
params: {
billId: billId,
ysjlIdSet: ysjlIdSet,
version: this.version
},
paramsSerializer: function(params) {
return qs.stringify(params, { indices: false })
}
}).then(() => {
this.$message.success('追加成功!')
this.ysjl.sfdId = billId
this.getSfdById(billId)
this.updateChargeBill()
})
},
/**
* 创建收费单
*/
saveChargeBill() {
const arr = [this.ysjl.id]
this.apibjd({
url: '/charge/saveBill',
method: 'post',
data: {
chargeBill: this.chargeBill,
version: this.version,
ysjlIdSet: arr
},
paramsSerializer: function(params) {
return qs.stringify(params, { indices: false })
}
}).then(data => {
this.$message({ message: '保存通知单成功!!!', type: 'success' })
this.ysjl.sfdId = data
this.getSfdById(data)
this.updateChargeBill()
})
},
/**
* 展示可添加收费项列表
*/
async addCharges() {
await this.getNotHasSfdList()
this.ysjlListVisible = true
},
/**
* 获取可添加收费项集合
*/
async getNotHasSfdList() {
let result = []
await this.api({
url: '/ysjl/getNotHasSfdList',
method: 'get',
params: this.ysjlListQuery
}).then(data => {
result = data.list
this.ysjlTableList = data.list
this.totalCount = data.total
})
return result
},
//
handleYsjlListFilter() {
this.ysjlListQuery.pageNum = 1
this.getNotHasSfdList()
},
/**
* 添加追加收费项
* @returns {boolean}
*/
async addYsjlSave() {
if (this.chargeBill.finishState) {
this.$message.warning('该收费单已经办结,无法进行追加操作!')
return false
}
const ysjlIdSet = this.ysjlSelection.map(item => item.id)
this.appendBill(this.chargeBill.id, ysjlIdSet)
await this.getNotHasSfdList()
await this.handleYsjlListFilter()
},
/**
* 清空收费单
*/
clearBill() {
if (this.chargeBill.finishState) {
this.$message.warning('该收费单已经办结,无法进行清除操作!')
return false
}
this.$confirm('此操作将会删除该报检单所有信息, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const billIdSet = [this.chargeBill.id]
this.apibjd({
url: '/charge/sendBackByBillIdSet',
method: 'post',
params: { billIdSet: billIdSet },
paramsSerializer: function(params) {
return qs.stringify(params, { indices: false })
}
}).then(() => {
this.$message.success('收费单清除成功!')
this.chargeBill = {}
this.chargeBillDetailList = []
this.ysjl.sfdId = ''
this.jianyanrenyuan = []
})
}).catch(() => {
this.$message.info('已取消清空!')
})
},
/**
* 删除某收费项
*/
delYsjlSfd() {
if (this.chargeBill.finishState) {
this.$message.warning('该收费单已经办结,无法进行清除操作!')
return false
}
this.$confirm('数据删除后将不能恢复, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const ysjlIdSet = this.selection.map(item => item.ysjlId)
const ifBack = this.selection.length === this.chargeBillDetailList.length
this.apibjd({
url: '/charge/delBillDetail',
method: 'post',
params: {
billId: this.chargeBill.id,
ysjlIdSet: ysjlIdSet,
ifBack: ifBack
},
paramsSerializer: function(params) {
return qs.stringify(params, { indices: false })
}
}).then(() => {
this.$message.success('删除成功!')
if (ifBack) {
this.ysjl.sfdId = ''
this.chargeBill = {}
this.chargeBillDetailList = []
} else {
if (ysjlIdSet.includes(this.ysjl.id)) {
this.ysjl.sfdId = ''
this.chargeBill = {}
this.chargeBillDetailList = []
} else {
this.getSfdById(this.chargeBill.id)
}
}
})
}).catch(() => {
this.$message.info('已取消删除!')
})
},
onYsjlClick(row) {
this.$refs.ysjlTableList.toggleRowSelection(row)
},
handleYsjlSelectionChange: function(val) {
this.ysjlSelection = val
},
tableRowClassName({ row, rowIndex }) {
row.index = rowIndex
},
onRowClick(row) {
this.$refs.chargeBillDetailList.toggleRowSelection(row)
},
handleSelectionChange(val) {
this.selection = val
},
uploadCredential(back) {
if (this.chargeBill.id === undefined) {
this.$message.error('请先创建收费单后在尝试上传附件!!')
return false
}
const file = back.file
const isJPG = file.type === 'image/jpeg' || file.type === 'image/png'
if (!isJPG) {
this.$message.error('只能上传jpg/png格式的图片')
return false
}
const fd = new FormData()
fd.append('file', file)
fd.append('billId', this.chargeBill.id)
this.apibjd({
url: '/charge/uploadVoucher',
method: 'post',
data: fd
}).then((data) => {
this.$message.success('上传成功!')
const path = process.env.VUE_APP_BASE_API + 'showImage/voucher/' + data
this.imageSrc = path
this.imageSrcList[0] = path
})
return true
},
previewCredentials(fileName) {
if (fileName) {
const path = process.env.VUE_APP_BASE_API + 'showImage/voucher/' + fileName
this.imageSrc = path
this.imageSrcList[0] = path
} else {
this.$message.warning('暂无上传交费凭据!')
}
},
handleExceed() {
this.$notify.warning('请删除已有凭据后,重新上传新凭据!')
},
getSummaries(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 1) {
sums[index] = '总价'
return
}
const values = data.map(item => Number(item[column.property]))
if (!values.every(value => isNaN(value))) {
sums[6] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[6] += ' 元'
} else {
sums[index] = ''
}
})
return sums
},
/**
* 获得收费通知单详情列表
*/
showDetailsInit(row) {
this.apibjd({
url: '/charge/getDetailByBillId/' + row.id,
method: 'get',
params: { version: 18 }
}).then(data => {
this.appendChargeBill = row
this.tableDetailsList = data
this.detailListVisible = true
})
}
}
}
</script>
<style scoped>
</style>

2
src/views/common/AllotFp/index.vue

@ -145,7 +145,7 @@ export default {
},
getDepartment() {
this.api({
url: '/department/getAllDepartment',
url: '/department/all',
method: 'get'
}).then(data => {
this.depts = data

2
src/views/common/DepartmentUser/index.vue

@ -32,7 +32,7 @@ export default {
methods: {
getDepartment() {
this.api({
url: '/department/getAllDepartment',
url: '/department/all',
method: 'get'
}).then(data => {
this.depts = data

2
src/views/common/SignName/index.vue

@ -62,7 +62,7 @@ export default {
methods: {
getDepartment() {
this.api({
url: '/department/getAllDepartment',
url: '/department/all',
method: 'get'
}).then(data => {
this.depts = data

2
src/views/flow/definition.vue

@ -185,7 +185,7 @@ export default {
},
getAllDepartment() {
this.api({
url: '/department/getAllDepartment',
url: '/department/all',
method: 'get'
}).then(data => {
this.listDepartment = data

3
src/views/print/1000/grant_create.vue

@ -140,10 +140,9 @@
// import Sticky from '@/components/Sticky'
import Pagination from '@/components/Pagination'
import SignInfo from '../sign_info'
import ComplexBill from '@/views/chargeBill/components/complex'
export default {
name: 'GrantReportGlCreate',
components: { Pagination, SignInfo, ComplexBill },
components: { Pagination, SignInfo },
data() {
return {
totalCount: 0,

18
src/views/task/list.vue

@ -28,13 +28,13 @@
</sticky>
<el-form>
<el-form-item>
<el-select v-model="listQuery.searchOwnRw.shebeizhongleidaima" placeholder="请选择设备种类" clearable>
<el-select v-model="listQuery.shebeizhongleidaima" placeholder="请选择设备种类" clearable>
<el-option v-for="item in sbzlList" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
<el-input v-model="listQuery.searchOwnRw.shiyongdanwei" placeholder="使用单位名称" clearable style="width: 340px" @keyup.enter.native="handleFilter" />
<el-input v-model="listQuery.searchOwnRw.zhucedaima" placeholder="注册代码" clearable style="width: 230px" @keyup.enter.native="handleFilter" />
<el-input v-model="listQuery.searchOwnRw.shiyongdengjibianhao" placeholder="使用登记证号" clearable style="width: 200px" @keyup.enter.native="handleFilter" />
<!--<el-input v-model="listQuery.searchOwnRw.danweineibubianhao" placeholder="单位内编号" clearable style="width: 200px" @keyup.enter.native="handleFilter" />-->
<el-input v-model="listQuery.shiyongdanwei" placeholder="使用单位名称" clearable style="width: 340px" @keyup.enter.native="handleFilter" />
<el-input v-model="listQuery.zhucedaima" placeholder="注册代码" clearable style="width: 230px" @keyup.enter.native="handleFilter" />
<el-input v-model="listQuery.shiyongdengjibianhao" placeholder="使用登记证号" clearable style="width: 200px" @keyup.enter.native="handleFilter" />
<!--<el-input v-model="listQuery.danweineibubianhao" placeholder="单位内编号" clearable style="width: 200px" @keyup.enter.native="handleFilter" />-->
<el-button type="primary" icon="el-icon-search" @click="handleFilter">
查询
</el-button>
@ -248,8 +248,7 @@ export default {
modelList: [],
listQuery: {
pageNum: 1, //
pageRow: 20, //
searchOwnRw: {}
pageRow: 20 //
},
listQueryCopy: {
pageNum: 1, //
@ -305,7 +304,7 @@ export default {
getOwnList(this.listQuery).then(data => {
console.log(data.list)
this.list = data.list
this.totalCount = data.totalCount
this.totalCount = data.total
const messagePush = this.$store.getters.messageCount
for (let i = 0; i < messagePush.length; i++) {
if (messagePush[i].key === 'MyTask') {
@ -532,7 +531,7 @@ export default {
query: {
state: 'create',
renwuId: this.renwuId,
modelId: this.template.value,
templateId: this.template.value,
jylb: this.jianyanleibie,
neibuleibie: this.neibuleibie,
departmentId: this.$store.getters.departmentId,
@ -616,7 +615,6 @@ export default {
})
},
clearQuery() {
this.$set(this.listQuery, 'searchOwnRw', {})
this.getList()
},
clearCopyQuery() {

2
src/views/user/permission.vue

@ -466,7 +466,7 @@ export default {
type: 'warning'
}).then(() => {
this.api({
url: '/permission/deletePermission',
url: '/permission',
method: 'delete',
params: {
id: id

954
src/views/ysjl/1000/common/dzsclJyxmBzz.js

@ -1,954 +0,0 @@
export default {
getHyYtRadio(jyxmData, params) { // 还原 有铜
const bgJyxmData = []
const yali = params.edingyali
const lushui = params.shuichulifangfa
const luxing = params.huanjingtiaojian
for (let i = 0; i < jyxmData.length; i++) {
const bgJyxm = {
id: '',
c1: '-',
c2: '',
c3: '-',
c4: ''
}
bgJyxm.id = jyxmData[i].id
if (lushui === '炉水固体碱化处理') {
if (yali >= 3.8 && yali <= 5.8) {
if (i === 0) {
bgJyxm.c3 = '9.0~11.0'
} else if (i === 1) {
bgJyxm.c3 = '5~15'
}
} else if (yali >= 5.9 && yali <= 10.0) {
if (i === 0) {
bgJyxm.c3 = '9.0~10.5'
} else if (i === 1) {
bgJyxm.c3 = '2~10'
} else if (i === 4) {
bgJyxm.c3 = '≤20'
} else if (i === 5) {
bgJyxm.c3 = '<50'
}
} else if (yali >= 10.1 && yali <= 12.6) {
if (i === 0) {
bgJyxm.c3 = '9.0~10'
} else if (i === 1) {
bgJyxm.c3 = '2~6'
} else if (i === 4) {
bgJyxm.c3 = '≤2.0'
} else if (i === 5) {
bgJyxm.c3 = '≤30'
}
} else if (yali >= 12.7 && yali <= 15.6) {
if (i === 0) {
bgJyxm.c3 = '9.0~9.7'
} else if (i === 1) {
bgJyxm.c3 = '≤3'
} else if (i === 2) {
bgJyxm.c3 = '≤1.5'
} else if (i === 4) {
bgJyxm.c3 = '≤0.45'
} else if (i === 5) {
bgJyxm.c3 = '≤20'
}
} else if (yali > 15.6) {
if (i === 0) {
bgJyxm.c3 = '9.0~9.7'
} else if (i === 1) {
bgJyxm.c3 = '≤1'
} else if (i === 2) {
bgJyxm.c3 = '≤0.4'
} else if (i === 4) {
bgJyxm.c3 = '≤0.10'
} else if (i === 5) {
bgJyxm.c3 = '≤15'
} else if (i === 8) {
bgJyxm.c3 = '<5'
}
}
} else if (lushui === '炉水全挥发处理') {
if (yali > 15.6) {
if (i === 0) {
bgJyxm.c3 = '9.0~9.7'
} else if (i === 2) {
bgJyxm.c3 = '≤0.03'
} else if (i === 4) {
bgJyxm.c3 = '≤0.08'
} else if (i === 8) {
bgJyxm.c3 = '<1.0'
}
}
}
// 还原 有铜 汽包炉
if (luxing === '汽包炉') {
if (yali >= 3.8 && yali <= 5.8) {
if (i === 6) {
bgJyxm.c1 = '≤2.0'
} else if (i === 7) {
bgJyxm.c1 = '≤15'
} else if (i === 8) {
bgJyxm.c1 = '8.8~9.3'
} else if (i === 9) {
bgJyxm.c1 = '≤10'
} else if (i === 10) {
bgJyxm.c1 = '≤50'
}
} else if (yali >= 5.9 && yali <= 12.6) {
if (i === 7) {
bgJyxm.c1 = '≤7'
} else if (i === 8) {
bgJyxm.c1 = '8.8~9.3'
} else if (i === 9) {
bgJyxm.c1 = '≤5'
} else if (i === 10) {
bgJyxm.c1 = '≤30'
} else if (i === 12) {
bgJyxm.c1 = '≤0.30'
} else if (i === 15) {
bgJyxm.c1 = '≤500'
}
} else if (yali >= 12.7 && yali <= 15.6) {
if (i === 7) {
bgJyxm.c1 = '≤7'
} else if (i === 8) {
bgJyxm.c1 = '8.8~9.3'
} else if (i === 9) {
bgJyxm.c1 = '≤5'
} else if (i === 10) {
bgJyxm.c1 = '≤20'
} else if (i === 12) {
bgJyxm.c1 = '≤0.30'
} else if (i === 15) {
bgJyxm.c1 = '≤500'
}
} else if (yali > 15.6) {
if (i === 7) {
bgJyxm.c1 = '≤7'
} else if (i === 8) {
bgJyxm.c1 = '8.8~9.3'
} else if (i === 9) {
bgJyxm.c1 = '≤3'
} else if (i === 10) {
bgJyxm.c1 = '≤15'
} else if (i === 12) {
bgJyxm.c1 = '≤0.15'
} else if (i === 14) {
bgJyxm.c1 = '≤20'
} else if (i === 15) {
bgJyxm.c1 = '≤200'
}
}
} else if (luxing === '直流炉') { // 还原性全挥发处理 无铜系统 直流炉
if (i === 6) {
if (yali >= 5.9 && yali <= 18.3) {
if (i === 7) {
bgJyxm.c1 = '≤7'
} else if (i === 8) {
bgJyxm.c1 = '8.8~9.3'
} else if (i === 9) {
bgJyxm.c1 = '≤3'
} else if (i === 10) {
bgJyxm.c1 = '≤10'
} else if (i === 12) {
bgJyxm.c1 = '≤0.15'
} else if (i === 13) {
bgJyxm.c1 = '≤3'
} else if (i === 14) {
bgJyxm.c1 = '≤15'
} else if (i === 15) {
bgJyxm.c1 = '≤200'
}
} else if (yali > 18.3) {
if (i === 7) {
bgJyxm.c1 = '≤7'
} else if (i === 8) {
bgJyxm.c1 = '8.8~9.3'
} else if (i === 9) {
bgJyxm.c1 = '≤2'
} else if (i === 10) {
bgJyxm.c1 = '≤5'
} else if (i === 12) {
bgJyxm.c1 = '≤0.10'
} else if (i === 13) {
bgJyxm.c1 = '≤2'
} else if (i === 14) {
bgJyxm.c1 = '≤10'
} else if (i === 15) {
bgJyxm.c1 = '≤200'
}
}
}
}
// 蒸汽质量 过热
if (i === 11) {
if (yali >= 3.8 && yali <= 5.8) {
bgJyxm.c3 = '≤15'
} else if (yali >= 5.9 && yali <= 15.6) {
bgJyxm.c3 = '≤5'
} else if (yali >= 15.7 && yali <= 18.3) {
bgJyxm.c3 = '≤3'
} else if (yali > 18.3) {
bgJyxm.c3 = '≤2'
}
} else if (i === 12) {
if (yali >= 3.8 && yali <= 5.8) {
bgJyxm.c3 = '≤20'
} else if (yali >= 5.9 && yali <= 15.6) {
bgJyxm.c3 = '≤15'
} else if (yali >= 15.7 && yali <= 18.3) {
bgJyxm.c3 = '≤15'
} else if (yali > 18.3) {
bgJyxm.c3 = '≤10'
}
} else if (i === 13) {
if (yali >= 3.8 && yali <= 5.8) {
bgJyxm.c3 = '≤0.30'
} else if (yali >= 5.9 && yali <= 15.6) {
bgJyxm.c3 = '≤0.15'
} else if (yali >= 15.7 && yali <= 18.3) {
bgJyxm.c3 = '≤0.15'
} else if (yali > 18.3) {
bgJyxm.c3 = '≤10'
}
} else if (i === 14) {
if (yali >= 3.8 && yali <= 5.8) {
bgJyxm.c3 = '≤20'
} else if (yali >= 5.9 && yali <= 15.6) {
bgJyxm.c3 = '≤15'
} else if (yali >= 15.7 && yali <= 18.3) {
bgJyxm.c3 = '≤10'
} else if (yali > 18.3) {
bgJyxm.c3 = '≤5'
}
} else if (i === 15) {
if (yali >= 3.8 && yali <= 5.8) {
bgJyxm.c3 = '≤5'
} else if (yali >= 5.9 && yali <= 15.6) {
bgJyxm.c3 = '≤3'
} else if (yali >= 15.7 && yali <= 18.3) {
bgJyxm.c3 = '≤3'
} else if (yali > 18.3) {
bgJyxm.c3 = '≤2'
}
}
bgJyxm.c2 = jyxmData[i].c4
bgJyxm.c4 = jyxmData[i].c8
bgJyxmData.push(bgJyxm)
}
return bgJyxmData
},
getHyWtRadio(jyxmData, params) { // 还原 无铜
const bgJyxmData = []
const yali = params.edingyali
const lushui = params.shuichulifangfa
const luxing = params.huanjingtiaojian
for (let i = 0; i < jyxmData.length; i++) {
const bgJyxm = {
id: '',
c1: '-',
c2: '',
c3: '-',
c4: ''
}
bgJyxm.id = jyxmData[i].id
if (lushui === '炉水固体碱化处理') {
if (yali >= 3.8 && yali <= 5.8) {
if (i === 0) {
bgJyxm.c3 = '9.0~11.0'
} else if (i === 1) {
bgJyxm.c3 = '5~15'
}
} else if (yali >= 5.9 && yali <= 10.0) {
if (i === 0) {
bgJyxm.c3 = '9.0~10.5'
} else if (i === 1) {
bgJyxm.c3 = '2~10'
} else if (i === 4) {
bgJyxm.c3 = '≤20'
} else if (i === 5) {
bgJyxm.c3 = '<50'
}
} else if (yali >= 10.1 && yali <= 12.6) {
if (i === 0) {
bgJyxm.c3 = '9.0~10'
} else if (i === 1) {
bgJyxm.c3 = '2~6'
} else if (i === 4) {
bgJyxm.c3 = '≤2.0'
} else if (i === 5) {
bgJyxm.c3 = '≤30'
}
} else if (yali >= 12.7 && yali <= 15.6) {
if (i === 0) {
bgJyxm.c3 = '9.0~9.7'
} else if (i === 1) {
bgJyxm.c3 = '≤3'
} else if (i === 2) {
bgJyxm.c3 = '≤1.5'
} else if (i === 4) {
bgJyxm.c3 = '≤0.45'
} else if (i === 5) {
bgJyxm.c3 = '≤20'
}
} else if (yali > 15.6) {
if (i === 0) {
bgJyxm.c3 = '9.0~9.7'
} else if (i === 1) {
bgJyxm.c3 = '≤1'
} else if (i === 2) {
bgJyxm.c3 = '≤0.4'
} else if (i === 4) {
bgJyxm.c3 = '≤0.10'
} else if (i === 5) {
bgJyxm.c3 = '≤15'
} else if (i === 8) {
bgJyxm.c3 = '<5'
}
}
} else if (lushui === '炉水全挥发处理') {
if (yali > 15.6) {
if (i === 0) {
bgJyxm.c3 = '9.0~9.7'
} else if (i === 2) {
bgJyxm.c3 = '≤0.03'
} else if (i === 4) {
bgJyxm.c3 = '≤0.08'
} else if (i === 8) {
bgJyxm.c3 = '<1.0'
}
}
}
// 还原 无铜 汽包炉
if (luxing === '汽包炉') {
if (yali >= 3.8 && yali <= 5.8) {
if (i === 6) {
bgJyxm.c1 = '≤2.0'
} else if (i === 7) {
bgJyxm.c1 = '≤15'
} else if (i === 9) {
bgJyxm.c1 = '≤10'
} else if (i === 10) {
bgJyxm.c1 = '≤50'
}
} else if (yali >= 5.9 && yali <= 12.6) {
if (i === 7) {
bgJyxm.c1 = '≤7'
} else if (i === 8) {
bgJyxm.c1 = '9.2~9.6'
} else if (i === 9) {
bgJyxm.c1 = '≤5'
} else if (i === 10) {
bgJyxm.c1 = '≤30'
} else if (i === 12) {
bgJyxm.c1 = '≤0.30'
} else if (i === 15) {
bgJyxm.c1 = '≤500'
}
} else if (yali >= 12.7 && yali <= 15.6) {
if (i === 7) {
bgJyxm.c1 = '≤7'
} else if (i === 8) {
bgJyxm.c1 = '9.2~9.6'
} else if (i === 9) {
bgJyxm.c1 = '≤5'
} else if (i === 10) {
bgJyxm.c1 = '≤20'
} else if (i === 12) {
bgJyxm.c1 = '≤0.30'
} else if (i === 15) {
bgJyxm.c1 = '≤500'
}
} else if (yali > 15.6) {
if (i === 7) {
bgJyxm.c1 = '≤7'
} else if (i === 8) {
bgJyxm.c1 = '9.2~9.6'
} else if (i === 9) {
bgJyxm.c1 = '≤3'
} else if (i === 10) {
bgJyxm.c1 = '≤15'
} else if (i === 12) {
bgJyxm.c1 = '≤0.15'
} else if (i === 14) {
bgJyxm.c1 = '≤20'
} else if (i === 15) {
bgJyxm.c1 = '≤200'
}
}
} else if (luxing === '直流炉') { // 还原性全挥发处理 无铜系统 直流炉
if (i === 6) {
if (yali >= 5.9 && yali <= 18.3) {
if (i === 7) {
bgJyxm.c1 = '≤7'
} else if (i === 8) {
bgJyxm.c1 = '8.8~9.3'
} else if (i === 9) {
bgJyxm.c1 = '≤3'
} else if (i === 10) {
bgJyxm.c1 = '≤10'
} else if (i === 12) {
bgJyxm.c1 = '≤0.15'
} else if (i === 13) {
bgJyxm.c1 = '≤3'
} else if (i === 14) {
bgJyxm.c1 = '≤15'
} else if (i === 15) {
bgJyxm.c1 = '≤200'
}
} else if (yali > 18.3) {
if (i === 7) {
bgJyxm.c1 = '≤7'
} else if (i === 8) {
bgJyxm.c1 = '8.8~9.3'
} else if (i === 9) {
bgJyxm.c1 = '≤2'
} else if (i === 10) {
bgJyxm.c1 = '≤5'
} else if (i === 12) {
bgJyxm.c1 = '≤0.10'
} else if (i === 13) {
bgJyxm.c1 = '≤2'
} else if (i === 14) {
bgJyxm.c1 = '≤10'
} else if (i === 15) {
bgJyxm.c1 = '≤200'
}
}
}
}
// 蒸汽质量 过热
if (i === 11) {
if (yali >= 3.8 && yali <= 5.8) {
bgJyxm.c3 = '≤15'
} else if (yali >= 5.9 && yali <= 15.6) {
bgJyxm.c3 = '≤5'
} else if (yali >= 15.7 && yali <= 18.3) {
bgJyxm.c3 = '≤3'
} else if (yali > 18.3) {
bgJyxm.c3 = '≤2'
}
} else if (i === 12) {
if (yali >= 3.8 && yali <= 5.8) {
bgJyxm.c3 = '≤20'
} else if (yali >= 5.9 && yali <= 15.6) {
bgJyxm.c3 = '≤15'
} else if (yali >= 15.7 && yali <= 18.3) {
bgJyxm.c3 = '≤15'
} else if (yali > 18.3) {
bgJyxm.c3 = '≤10'
}
} else if (i === 13) {
if (yali >= 3.8 && yali <= 5.8) {
bgJyxm.c3 = '≤0.30'
} else if (yali >= 5.9 && yali <= 15.6) {
bgJyxm.c3 = '≤0.15'
} else if (yali >= 15.7 && yali <= 18.3) {
bgJyxm.c3 = '≤0.15'
} else if (yali > 18.3) {
bgJyxm.c3 = '≤10'
}
} else if (i === 14) {
if (yali >= 3.8 && yali <= 5.8) {
bgJyxm.c3 = '≤20'
} else if (yali >= 5.9 && yali <= 15.6) {
bgJyxm.c3 = '≤15'
} else if (yali >= 15.7 && yali <= 18.3) {
bgJyxm.c3 = '≤10'
} else if (yali > 18.3) {
bgJyxm.c3 = '≤5'
}
} else if (i === 15) {
if (yali >= 3.8 && yali <= 5.8) {
bgJyxm.c3 = '≤5'
} else if (yali >= 5.9 && yali <= 15.6) {
bgJyxm.c3 = '≤3'
} else if (yali >= 15.7 && yali <= 18.3) {
bgJyxm.c3 = '≤3'
} else if (yali > 18.3) {
bgJyxm.c3 = '≤2'
}
}
bgJyxm.c2 = jyxmData[i].c4
bgJyxm.c4 = jyxmData[i].c8
bgJyxmData.push(bgJyxm)
}
return bgJyxmData
},
getYhYtRadio(jyxmData, params) { // 氧化 有铜
const bgJyxmData = []
const yali = params.edingyali
const lushui = params.shuichulifangfa
const luxing = params.huanjingtiaojian
for (let i = 0; i < jyxmData.length; i++) {
const bgJyxm = {
id: '',
c1: '-',
c2: '',
c3: '-',
c4: ''
}
bgJyxm.id = jyxmData[i].id
if (lushui === '炉水固体碱化处理') {
if (yali >= 3.8 && yali <= 5.8) {
if (i === 0) {
bgJyxm.c3 = '9.0~11.0'
} else if (i === 1) {
bgJyxm.c3 = '5~15'
}
} else if (yali >= 5.9 && yali <= 10.0) {
if (i === 0) {
bgJyxm.c3 = '9.0~10.5'
} else if (i === 1) {
bgJyxm.c3 = '2~10'
} else if (i === 4) {
bgJyxm.c3 = '≤20'
} else if (i === 5) {
bgJyxm.c3 = '<50'
}
} else if (yali >= 10.1 && yali <= 12.6) {
if (i === 0) {
bgJyxm.c3 = '9.0~10'
} else if (i === 1) {
bgJyxm.c3 = '2~6'
} else if (i === 4) {
bgJyxm.c3 = '≤2.0'
} else if (i === 5) {
bgJyxm.c3 = '≤30'
}
} else if (yali >= 12.7 && yali <= 15.6) {
if (i === 0) {
bgJyxm.c3 = '9.0~9.7'
} else if (i === 1) {
bgJyxm.c3 = '≤3'
} else if (i === 2) {
bgJyxm.c3 = '≤1.5'
} else if (i === 4) {
bgJyxm.c3 = '≤0.45'
} else if (i === 5) {
bgJyxm.c3 = '≤20'
}
} else if (yali > 15.6) {
if (i === 0) {
bgJyxm.c3 = '9.0~9.7'
} else if (i === 1) {
bgJyxm.c3 = '≤1'
} else if (i === 2) {
bgJyxm.c3 = '≤0.4'
} else if (i === 4) {
bgJyxm.c3 = '≤0.10'
} else if (i === 5) {
bgJyxm.c3 = '≤15'
} else if (i === 8) {
bgJyxm.c3 = '<5'
}
}
} else if (lushui === '炉水全挥发处理') {
if (yali > 15.6) {
if (i === 0) {
bgJyxm.c3 = '9.0~9.7'
} else if (i === 2) {
bgJyxm.c3 = '≤0.03'
} else if (i === 4) {
bgJyxm.c3 = '≤0.08'
} else if (i === 8) {
bgJyxm.c3 = '<1.0'
}
}
}
// 氧化 有铜 汽包炉
if (luxing === '汽包炉') {
if (yali >= 3.8 && yali <= 5.8) {
if (i === 6) {
bgJyxm.c1 = '≤2.0'
} else if (i === 7) {
bgJyxm.c1 = '≤15'
} else if (i === 8) {
bgJyxm.c1 = '8.8~9.3'
} else if (i === 9) {
bgJyxm.c1 = '≤10'
} else if (i === 10) {
bgJyxm.c1 = '≤50'
}
} else if (yali >= 5.9 && yali <= 12.6) {
if (i === 7) {
bgJyxm.c1 = '≤10'
} else if (i === 8) {
bgJyxm.c1 = '8.8~9.3'
} else if (i === 9) {
bgJyxm.c1 = '≤5'
} else if (i === 10) {
bgJyxm.c1 = '≤30'
} else if (i === 12) {
bgJyxm.c1 = '≤0.30'
} else if (i === 15) {
bgJyxm.c1 = '≤500'
}
} else if (yali >= 12.7 && yali <= 15.6) {
if (i === 7) {
bgJyxm.c1 = '≤10'
} else if (i === 8) {
bgJyxm.c1 = '8.8~9.3'
} else if (i === 9) {
bgJyxm.c1 = '≤5'
} else if (i === 10) {
bgJyxm.c1 = '≤20'
} else if (i === 12) {
bgJyxm.c1 = '≤0.30'
} else if (i === 15) {
bgJyxm.c1 = '≤500'
}
} else if (yali > 15.6) {
if (i === 7) {
bgJyxm.c1 = '≤10'
} else if (i === 8) {
bgJyxm.c1 = '8.8~9.3'
} else if (i === 9) {
bgJyxm.c1 = '≤3'
} else if (i === 10) {
bgJyxm.c1 = '≤15'
} else if (i === 12) {
bgJyxm.c1 = '≤0.15'
} else if (i === 14) {
bgJyxm.c1 = '≤20'
} else if (i === 15) {
bgJyxm.c1 = '≤200'
}
}
} else if (luxing === '直流炉') {
if (i === 6) {
if (yali >= 5.9 && yali <= 18.3) {
if (i === 7) {
bgJyxm.c1 = '≤7'
} else if (i === 8) {
bgJyxm.c1 = '8.8~9.3'
} else if (i === 9) {
bgJyxm.c1 = '≤3'
} else if (i === 10) {
bgJyxm.c1 = '≤10'
} else if (i === 12) {
bgJyxm.c1 = '≤0.15'
} else if (i === 13) {
bgJyxm.c1 = '≤3'
} else if (i === 14) {
bgJyxm.c1 = '≤15'
} else if (i === 15) {
bgJyxm.c1 = '≤200'
}
} else if (yali > 18.3) {
if (i === 7) {
bgJyxm.c1 = '≤7'
} else if (i === 8) {
bgJyxm.c1 = '8.8~9.3'
} else if (i === 9) {
bgJyxm.c1 = '≤2'
} else if (i === 10) {
bgJyxm.c1 = '≤5'
} else if (i === 12) {
bgJyxm.c1 = '≤0.10'
} else if (i === 13) {
bgJyxm.c1 = '≤2'
} else if (i === 14) {
bgJyxm.c1 = '≤10'
} else if (i === 15) {
bgJyxm.c1 = '≤200'
}
}
}
}
// 蒸汽质量 过热
if (i === 11) {
if (yali >= 3.8 && yali <= 5.8) {
bgJyxm.c3 = '≤15'
} else if (yali >= 5.9 && yali <= 15.6) {
bgJyxm.c3 = '≤5'
} else if (yali >= 15.7 && yali <= 18.3) {
bgJyxm.c3 = '≤3'
} else if (yali > 18.3) {
bgJyxm.c3 = '≤2'
}
} else if (i === 12) {
if (yali >= 3.8 && yali <= 5.8) {
bgJyxm.c3 = '≤20'
} else if (yali >= 5.9 && yali <= 15.6) {
bgJyxm.c3 = '≤15'
} else if (yali >= 15.7 && yali <= 18.3) {
bgJyxm.c3 = '≤15'
} else if (yali > 18.3) {
bgJyxm.c3 = '≤10'
}
} else if (i === 13) {
if (yali >= 3.8 && yali <= 5.8) {
bgJyxm.c3 = '≤0.30'
} else if (yali >= 5.9 && yali <= 15.6) {
bgJyxm.c3 = '≤0.15'
} else if (yali >= 15.7 && yali <= 18.3) {
bgJyxm.c3 = '≤0.15'
} else if (yali > 18.3) {
bgJyxm.c3 = '≤10'
}
} else if (i === 14) {
if (yali >= 3.8 && yali <= 5.8) {
bgJyxm.c3 = '≤20'
} else if (yali >= 5.9 && yali <= 15.6) {
bgJyxm.c3 = '≤15'
} else if (yali >= 15.7 && yali <= 18.3) {
bgJyxm.c3 = '≤10'
} else if (yali > 18.3) {
bgJyxm.c3 = '≤5'
}
} else if (i === 15) {
if (yali >= 3.8 && yali <= 5.8) {
bgJyxm.c3 = '≤5'
} else if (yali >= 5.9 && yali <= 15.6) {
bgJyxm.c3 = '≤3'
} else if (yali >= 15.7 && yali <= 18.3) {
bgJyxm.c3 = '≤3'
} else if (yali > 18.3) {
bgJyxm.c3 = '≤2'
}
}
bgJyxm.c2 = jyxmData[i].c4
bgJyxm.c4 = jyxmData[i].c8
bgJyxmData.push(bgJyxm)
}
return bgJyxmData
},
getYhWtRadio(jyxmData, params) { // 氧化 无铜
const bgJyxmData = []
const yali = params.edingyali
const lushui = params.shuichulifangfa
const luxing = params.huanjingtiaojian
for (let i = 0; i < jyxmData.length; i++) {
const bgJyxm = {
id: '',
c1: '-',
c2: '',
c3: '-',
c4: ''
}
bgJyxm.id = jyxmData[i].id
if (lushui === '炉水固体碱化处理') {
if (yali >= 3.8 && yali <= 5.8) {
if (i === 0) {
bgJyxm.c3 = '9.0~11.0'
} else if (i === 1) {
bgJyxm.c3 = '5~15'
}
} else if (yali >= 5.9 && yali <= 10.0) {
if (i === 0) {
bgJyxm.c3 = '9.0~10.5'
} else if (i === 1) {
bgJyxm.c3 = '2~10'
} else if (i === 4) {
bgJyxm.c3 = '≤20'
} else if (i === 5) {
bgJyxm.c3 = '<50'
}
} else if (yali >= 10.1 && yali <= 12.6) {
if (i === 0) {
bgJyxm.c3 = '9.0~10'
} else if (i === 1) {
bgJyxm.c3 = '2~6'
} else if (i === 4) {
bgJyxm.c3 = '≤2.0'
} else if (i === 5) {
bgJyxm.c3 = '≤30'
}
} else if (yali >= 12.7 && yali <= 15.6) {
if (i === 0) {
bgJyxm.c3 = '9.0~9.7'
} else if (i === 1) {
bgJyxm.c3 = '≤3'
} else if (i === 2) {
bgJyxm.c3 = '≤1.5'
} else if (i === 4) {
bgJyxm.c3 = '≤0.45'
} else if (i === 5) {
bgJyxm.c3 = '≤20'
}
} else if (yali > 15.6) {
if (i === 0) {
bgJyxm.c3 = '9.0~9.7'
} else if (i === 1) {
bgJyxm.c3 = '≤1'
} else if (i === 2) {
bgJyxm.c3 = '≤0.4'
} else if (i === 4) {
bgJyxm.c3 = '≤0.10'
} else if (i === 5) {
bgJyxm.c3 = '≤15'
} else if (i === 8) {
bgJyxm.c3 = '<5'
}
}
} else if (lushui === '炉水全挥发处理') {
if (yali > 15.6) {
if (i === 0) {
bgJyxm.c3 = '9.0~9.7'
} else if (i === 2) {
bgJyxm.c3 = '≤0.03'
} else if (i === 4) {
bgJyxm.c3 = '≤0.08'
} else if (i === 8) {
bgJyxm.c3 = '<1.0'
}
}
}
// 氧化 无铜 汽包炉
if (luxing === '汽包炉') {
if (yali >= 3.8 && yali <= 5.8) {
if (i === 6) {
bgJyxm.c1 = '≤2.0'
} else if (i === 7) {
bgJyxm.c1 = '≤15'
} else if (i === 9) {
bgJyxm.c1 = '≤10'
} else if (i === 10) {
bgJyxm.c1 = '≤50'
}
} else if (yali >= 5.9 && yali <= 12.6) {
if (i === 7) {
bgJyxm.c1 = '≤7'
} else if (i === 8) {
bgJyxm.c1 = '9.2~9.6'
} else if (i === 9) {
bgJyxm.c1 = '≤5'
} else if (i === 10) {
bgJyxm.c1 = '≤30'
} else if (i === 12) {
bgJyxm.c1 = '≤0.30'
} else if (i === 15) {
bgJyxm.c1 = '≤500'
}
} else if (yali >= 12.7 && yali <= 15.6) {
if (i === 7) {
bgJyxm.c1 = '≤7'
} else if (i === 8) {
bgJyxm.c1 = '9.2~9.6'
} else if (i === 9) {
bgJyxm.c1 = '≤5'
} else if (i === 10) {
bgJyxm.c1 = '≤20'
} else if (i === 12) {
bgJyxm.c1 = '≤0.30'
} else if (i === 15) {
bgJyxm.c1 = '≤500'
}
} else if (yali > 15.6) {
if (i === 7) {
bgJyxm.c1 = '≤7'
} else if (i === 8) {
bgJyxm.c1 = '9.2~9.6'
} else if (i === 9) {
bgJyxm.c1 = '≤3'
} else if (i === 10) {
bgJyxm.c1 = '≤15'
} else if (i === 12) {
bgJyxm.c1 = '≤0.15'
} else if (i === 14) {
bgJyxm.c1 = '≤20'
} else if (i === 15) {
bgJyxm.c1 = '≤200'
}
}
} else if (luxing === '直流炉') { // 还原性全挥发处理 无铜系统 直流炉
if (i === 6) {
if (yali >= 5.9 && yali <= 18.3) {
if (i === 7) {
bgJyxm.c1 = '≤7'
} else if (i === 8) {
bgJyxm.c1 = '8.8~9.3'
} else if (i === 9) {
bgJyxm.c1 = '≤3'
} else if (i === 10) {
bgJyxm.c1 = '≤10'
} else if (i === 12) {
bgJyxm.c1 = '≤0.15'
} else if (i === 13) {
bgJyxm.c1 = '≤3'
} else if (i === 14) {
bgJyxm.c1 = '≤15'
} else if (i === 15) {
bgJyxm.c1 = '≤200'
}
} else if (yali > 18.3) {
if (i === 7) {
bgJyxm.c1 = '≤7'
} else if (i === 8) {
bgJyxm.c1 = '8.8~9.3'
} else if (i === 9) {
bgJyxm.c1 = '≤2'
} else if (i === 10) {
bgJyxm.c1 = '≤5'
} else if (i === 12) {
bgJyxm.c1 = '≤0.10'
} else if (i === 13) {
bgJyxm.c1 = '≤2'
} else if (i === 14) {
bgJyxm.c1 = '≤10'
} else if (i === 15) {
bgJyxm.c1 = '≤200'
}
}
}
}
// 蒸汽质量 过热
if (i === 11) {
if (yali >= 3.8 && yali <= 5.8) {
bgJyxm.c3 = '≤15'
} else if (yali >= 5.9 && yali <= 15.6) {
bgJyxm.c3 = '≤5'
} else if (yali >= 15.7 && yali <= 18.3) {
bgJyxm.c3 = '≤3'
} else if (yali > 18.3) {
bgJyxm.c3 = '≤2'
}
} else if (i === 12) {
if (yali >= 3.8 && yali <= 5.8) {
bgJyxm.c3 = '≤20'
} else if (yali >= 5.9 && yali <= 15.6) {
bgJyxm.c3 = '≤15'
} else if (yali >= 15.7 && yali <= 18.3) {
bgJyxm.c3 = '≤15'
} else if (yali > 18.3) {
bgJyxm.c3 = '≤10'
}
} else if (i === 13) {
if (yali >= 3.8 && yali <= 5.8) {
bgJyxm.c3 = '≤0.30'
} else if (yali >= 5.9 && yali <= 15.6) {
bgJyxm.c3 = '≤0.15'
} else if (yali >= 15.7 && yali <= 18.3) {
bgJyxm.c3 = '≤0.15'
} else if (yali > 18.3) {
bgJyxm.c3 = '≤10'
}
} else if (i === 14) {
if (yali >= 3.8 && yali <= 5.8) {
bgJyxm.c3 = '≤20'
} else if (yali >= 5.9 && yali <= 15.6) {
bgJyxm.c3 = '≤15'
} else if (yali >= 15.7 && yali <= 18.3) {
bgJyxm.c3 = '≤10'
} else if (yali > 18.3) {
bgJyxm.c3 = '≤5'
}
} else if (i === 15) {
if (yali >= 3.8 && yali <= 5.8) {
bgJyxm.c3 = '≤5'
} else if (yali >= 5.9 && yali <= 15.6) {
bgJyxm.c3 = '≤3'
} else if (yali >= 15.7 && yali <= 18.3) {
bgJyxm.c3 = '≤3'
} else if (yali > 18.3) {
bgJyxm.c3 = '≤2'
}
}
bgJyxm.c2 = jyxmData[i].c4
bgJyxm.c4 = jyxmData[i].c8
bgJyxmData.push(bgJyxm)
}
return bgJyxmData
}
}

117
src/views/ysjl/1000/common/glft.vue

@ -1,117 +0,0 @@
<template>
<span>
<el-button v-if="state === 'update'" type="success" icon="el-icon-circle-plus" size="medium" @click="addJyfa">
添加附图
</el-button>
<el-button v-if="state !== 'create'" type="info" icon="el-icon-info" size="medium" @click="viewFt">
查看附图
</el-button>
</span>
</template>
<script>
export default {
name: 'Glft',
props: {
state: {
required: true,
type: String
},
ysjl: {
required: true,
type: Object
},
ysjlId: {
required: true,
type: Number
},
departmentId: {
required: true,
type: Number
}
},
data() {
return {
jyfaParam: {
bglx: 3,
ysjlId: '',
type: '',
jianyanxiangmu: 'dxt',
userId: this.$store.getters.userId,
templateId: ''
},
ftYsjlId: ''
}
},
created() {
if (this.state !== 'create') {
this.getJyfaInfo()
}
},
methods: {
//
getJyfaInfo() {
if (!this.ysjlId) {
return
}
this.api({
url: '/ysjl/getJyfaInfo',
method: 'get',
params: {
ysjlId: this.ysjlId
}
}).then(data => {
if (data && data.length) {
this.ftYsjlId = data[0].id
}
})
},
//
addJyfa() {
// id
this.api({
url: '/ysjl/getJyfa',
method: 'get',
params: {
ysjlId: this.ysjl.id,
sbzldm: this.ysjl.shebeizhongleidaima,
jylb: this.ysjl.jianyanleibie,
nblb: this.ysjl.neibuleibie,
viewType: 'ysjl'
}
}).then(data => {
//
if (this.ftYsjlId) {
this.$router.push({ path: '/ysjl/' + this.ysjl.shebeizhongleidaima + '/dxt', query: { id: this.ftYsjlId, jyxm: 'dxt', departmentId: this.departmentId }})
} else {
const jyfaObj = data.menusJSON[1].children[0]
this.jyfaParam.ysjlId = this.ysjl.id
this.jyfaParam.type = jyfaObj.title
this.jyfaParam.templateId = jyfaObj.id
this.jyfaParam.userId = this.$store.getters.userId
this.api({
url: '/ysjl/addJyfa',
method: 'get',
params: this.jyfaParam
}).then(data => {
this.getJyfaInfo()
this.$router.push({ path: '/ysjl/' + this.ysjl.shebeizhongleidaima + '/dxt', query: { id: data, jyxm: 'dxt', departmentId: this.departmentId }})
})
}
})
},
viewFt() {
if (this.ftYsjlId) {
this.$router.push({ path: '/ysjl/' + this.ysjl.shebeizhongleidaima + '/dxt', query: { id: this.ftYsjlId, jyxm: 'dxt', departmentId: this.departmentId }})
} else {
this.$message({ message: '请添加附图后再查看!', type: 'warning' })
return false
}
}
}
}
</script>
<style scoped>
</style>

501
src/views/ysjl/1000/common/sfqk.vue

@ -1,501 +0,0 @@
<!--检验收费情况-->
<template>
<div class="app-container">
<el-button type="primary" size="mini" icon="el-icon-edit" @click="saveJysf">
保存通知单
</el-button>
<el-button type="success" size="mini" icon="el-icon-circle-plus-outline" @click="createSfd">
生成当前报告通知单
</el-button>
<el-button type="success" size="mini" icon="el-icon-circle-plus-outline" @click="addJybg">
添加报告
</el-button>
<el-button type="danger" size="mini" icon="el-icon-delete" @click="clearBill">
清空
</el-button>
<el-button type="danger" size="mini" icon="el-icon-remove-outline" @click="delYsjlSfd">
删除
</el-button>
<el-table
ref="jysfList"
:data="jysfTableData"
:row-class-name="tableRowClassName"
fit
highlight-current-row
border
stripe
max-height="450"
style="width:56%;margin-top: 5px;"
@row-click="onRowClick"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="40" />
<el-table-column align="center" type="index" width="50" label="序号" />
<el-table-column :formatter="fmtBgbh" align="center" prop="jilubianhao" width="150" label="检验证书编号" />
<el-table-column align="center" prop="chanpinbianhao" width="120" label="出厂编号" />
<el-table-column align="center" prop="guigexinghao" width="200" label="受检设备(产品)型号" />
<el-table-column v-if="jylb !== 'ZJ'" align="center" prop="neibuleibie" :formatter="formatter.formatterCategory" width="125" label="检验项目" />
<el-table-column v-else align="center" :prop="sfqkState === 'create' ? 'ss1' : 'zaojia'" width="200" label="检验项目(产品出厂价格)" />
<el-table-column align="center" prop="jianyanheding" width="225" label="应收检验费金额">
<template slot-scope="{row}">
<el-input-number v-model="row.jianyanheding" :disabled="row.retreatState === 2 && row.jfState !== null && row.jfState" label="请输入应收金额" placeholder="请输入应收金额" :controls="false" />
</template>
</el-table-column>
</el-table>
<br>
<el-form ref="bill" :model="bill" class="el-form" label-position="right" label-width="130px">
<el-row :gutter="20">
<el-col :span="6">
<el-form-item label="非税收入通用票据:">
<el-input v-model="bill.nonTaxIncomeBill" style="width: 220px" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" style="height: 125px">
<el-col :span="6">
<el-form-item label="记事:">
<el-input v-model="bill.record" type="textarea" rows="5" style="width: 600px" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="6">
<el-form-item label="检验人员:">
<el-select v-model="bill.inspectionPerson" placeholder="请选择">
<el-option
v-for="item in users"
:key="item.id"
:label="item.nickname"
:value="item.id"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="日期:" label-width="100px">
<el-date-picker v-model="bill.inspectionDate" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<br>
<el-dialog title="添加检验设备收费列表" width="80%" :visible.sync="ysjlListVisible" @close="ysjlListVisible = false">
<div class="filter-container">
<el-form>
<el-form-item>
<el-input v-model="listQuery.jilubianhao" placeholder="记录编号" clearable style="width: 160px" />
<el-input v-model="listQuery.shiyongdanwei" placeholder="单位名称" clearable style="width: 400px" />
<el-button type="primary" icon="el-icon-search" @click="handleFilter">
查询
</el-button>
<el-button type="success" icon="el-icon-search" @click="addYsjlSave">
添加
</el-button>
</el-form-item>
</el-form>
</div>
<el-table
ref="ysjlTableList"
:data="ysjlTableList"
border
fit
highlight-current-row
stripe
max-height="450"
@row-click="onYsjlClick"
@selection-change="handleYsjlSelectionChange"
>
<el-table-column type="selection" width="45" />
<el-table-column align="center" label="记录编号" prop="jilubianhao" min-width="120" />
<el-table-column align="center" label="使用单位" prop="shiyongdanwei" min-width="150" />
<el-table-column align="center" label="注册代码" prop="zhucedaima" min-width="120" />
<el-table-column align="center" label="使用登记证编号" prop="shiyongdengjibianhao" min-width="120" />
<el-table-column align="center" label="出厂编号" prop="chanpinbianhao" min-width="100" />
<el-table-column align="center" label="单位内部编号" prop="danweineibubianhao" min-width="80" />
<el-table-column :formatter="formatter.formatterCategory" align="center" label="检验项" prop="neibuleibie" min-width="80" />
</el-table>
<pagination v-show="totalCount>0" :total="totalCount" :page-num.sync="listQuery.pageNum" :page-row.sync="listQuery.pageSize" @pagination="getList" />
</el-dialog>
</div>
</template>
<script>
import Utils from '@/utils/contact'
import Pagination from '@/components/Pagination'
import qs from 'qs'
export default {
name: 'Glsfqk',
components: { Pagination },
props: {
jylb: {
type: String,
default: 'DJ'
},
ysjl: {
type: Object,
required: true
}
},
data() {
return {
jysfTableData: [], //
ysjlListVisible: false,
ysjlTableList: [], //
bill: {
id: null,
serialNumber: '',
record: ''
},
totalCount: 0,
listQuery: {
jilubianhao: '',
shiyongdanwei: '',
chanpinbianhao: '',
cjState: 'ysjl',
shebeizhongleidaima: '1000',
hasLook: 1,
hasChild: true
},
selection: [],
delRowIndex: [],
listSfdQuery: {
shiyongdanwei: ''
},
users: [],
ysjlSelection: [],
sfqkState: 'create',
init: false
}
},
watch: {
ysjl: function(newYsjl, oldYsjl) {
//
const that = this
this.common.$on('reload-sfd-' + this.ysjl.renwuId, function(sfdId) {
//
if (sfdId) {
that.getSfdById(sfdId)
}
})
//
if (newYsjl.renwuId && !oldYsjl.renwuId && !this.init) {
this.init = true
//
if (this.ysjl.sfdId) {
this.sfqkState = 'update'
this.getSfdById()
}
this.getUserList()
}
}
},
methods: {
/**
* 同步刷新其他报告的收费单信息
* @param renwuIds 任务主键
* @param isDel 是否是删除如果是则移除该任务的收费单Id
*/
refresh(renwuIds, isDel) {
renwuIds.forEach(renwuId => {
if (this.ysjl.renwuId !== renwuId) {
Utils.$emit('reload-sfd-' + renwuId, isDel ? null : this.sfd.id)
} else if (isDel) {
Utils.$emit('reload-sfd-' + renwuId, null)
}
})
},
/**
* 初始化收费通知单由于清空收费单信息也会重新初始化所以有些在data中已经声明过的就又再声明了一次
*/
/**
* 获取收费通知单
*/
getSfdById(sfdId) {
if (sfdId) {
this.ysjl.sfdId = sfdId
} else if (!this.ysjl.sfdId) {
return
}
this.apibjd({
url: '/charge/getBill',
method: 'get',
params: {
billId: this.ysjl.sfdId
}
}).then(data => {
if (data) {
this.bill = data
if (this.bill.inspectionPerson !== null) {
this.bill.inspectionPerson = Number(this.bill.inspectionPerson)
}
this.apibjd({
url: '/charge/getDetailByBillId/' + this.ysjl.sfdId,
method: 'get',
params: {
version: '18'
}
}).then(data => {
this.jysfTableData = data
})
this.sfqkState = 'update'
}
})
},
/**
* 获取检验人员可选列表
*/
getUserList() {
this.api({
url: '/user/getUserListByDepartmentId',
method: 'get',
params: {
departmentId: this.$store.getters.departmentId
}
}).then(data => {
this.users = data
})
},
//
saveJysf() {
if (this.sfqkState !== 'update') {
this.$message({ message: '请先创建通知到在执行保存操作!!!', type: 'info' })
return false
}
this.bill.updateBy = this.$store.getters.userId
if (!this.bill.inspectionPerson) {
//
this.$message({ message: '检验人员不能为空!!!', type: 'info' })
return false
}
this.apibjd({
url: '/charge/updateBill',
method: 'post',
data: {
chargeBill: this.bill,
chargeBillVOList: this.jysfTableData
}
}).then(data => {
if (data !== 0) {
this.$message({ message: '保存通知单成功!!!', type: 'success' })
this.sfqkState = 'update'
// this.refresh(this.jysfTableData.map(ysjlSfd => ysjlSfd.id))
// Utils.$emit('ysjl-list')
this.delRowIndex = []
} else {
this.$message({ message: '保存通知单失败!!!', type: 'error' })
}
})
},
//
addYsjlSave() {
if (this.ysjlSelection === null || this.ysjlSelection.length === 0) {
this.$message({ message: '请选择要添加的报告', type: 'error' })
return false
}
const ysjl = this.ysjlSelection.filter(ysjl => this.jysfTableData.filter(jysf => jysf.id === ysjl.renwuId).length)
if (ysjl.length) {
this.$message.error('报告已添加到当前收费单:' + ysjl.map(tempYsjl => tempYsjl.jilubianhao).join(','))
return false
}
for (let i = 0; i < this.ysjlSelection.length; i++) {
const ysjl = this.ysjlSelection[i]
this.appendBill(this.ysjl.sfdId, ysjl.id)
}
this.ysjlListVisible = false
},
createSfd() {
this.apibjd({
url: '/charge/getBill',
method: 'get',
params: {
shiyongdanwei: this.ysjl.shiyongdanwei
}
}).then(data => {
if (data === null) {
this.saveBill()
} else {
if (!this.ysjl.sfdId) {
this.$confirm('请问需要将此报告追加到已生成的收费通知单里面吗???‘确定’表示追加,‘取消’表示不追加。', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
//
this.appendBill(data.id, this.ysjl.id)
}).catch(() => {
this.$message({
type: 'info',
message: '已取消追加,正在生成独立收费单!!!'
})
this.saveBill()
})
} else {
this.$message({
type: 'info',
message: '已生成收费单请勿重复操作!!!'
})
}
}
})
},
appendBill(billId, ysjlId) {
//
this.apibjd({
url: '/charge/appendBill',
method: 'post',
data: {
billId: billId,
ysjlId: ysjlId,
version: '18'
}
}).then(() => {
this.$message({
type: 'success',
message: '追加成功!!!'
})
this.getSfdById(billId)
})
},
saveBill() {
this.bill.inspectedUnit = this.ysjl.jianyanleibie === 'ZJ' ? this.ysjl.zhizaodanwei : this.ysjl.shiyongdanwei
const arr = []
arr.push(this.ysjl.id)
this.apibjd({
url: '/charge/saveBill',
method: 'post',
data: {
chargeBill: this.bill,
version: '18',
ysjlIdSet: arr
},
paramsSerializer: function(params) {
return qs.stringify(params, { indices: false })
}
}).then(data => {
this.$message({ message: '保存通知单成功!!!', type: 'success' })
this.sfqkState = 'update'
this.delRowIndex = []
this.getSfdById(data)
})
},
addJybg() {
if (this.sfqkState !== 'update') {
this.$message({ message: '请先保存收费单再添加!', type: 'warning' })
} else {
this.listQuery.shiyongdanwei = this.bill.shiyongdanwei
this.ysjlListVisible = true
this.getList()
}
},
handleFilter() {
//
this.listQuery.pageNum = 1
this.getList()
},
getList() {
this.api({
url: '/ysjl/getNotHasSfdList',
method: 'get',
params: this.listQuery
}).then(data => {
this.ysjlTableList = data.list
this.totalCount = data.total
})
},
getIndex($index) {
//
return (this.listQuery.pageNum - 1) * this.listQuery.pageSize + $index + 1
},
tableRowClassName({ row, rowIndex }) {
row.index = rowIndex
},
//
onRowClick(row) {
this.$refs.jysfList.toggleRowSelection(row)
},
handleSelectionChange(val) {
this.selection = val
this.delRowIndex = []
for (let i = 0; i < val.length; i++) {
this.delRowIndex.push(val[i].index)
}
},
delYsjlSfd() { //
if (this.delRowIndex.length === 0) {
this.$message({
type: 'error',
message: '请选中需要删除的数据,删除成功后请重新保存收费单!!'
})
return false
}
this.$confirm('数据删除后将不能恢复, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.apibjd({
url: '/charge/delBill',
method: 'delete',
params: {
ysjlIds: this.$refs.jysfList.selection.map(rw => {
return rw.ysjlId
}).join(',')
}
}).then(() => {
this.$message({ message: '收费单记录删除成功!!!', type: 'success' })
for (let i = 0; i < this.delRowIndex.length; i++) {
this.jysfTableData.splice(this.delRowIndex[i], 1)
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
clearBill() {
this.$confirm('此操作将会删除该报检单所有信息, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.apibjd({
url: '/charge/clearBill',
method: 'delete',
params: {
billId: this.bill.id
}
}).then(() => {
this.$message({ message: '收费单清除成功!!!', type: 'success' })
Utils.$emit('ysjl-list')
this.jysfTableData = []
this.bill = {}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消清空'
})
})
},
onYsjlClick(row) {
this.$refs.ysjlTableList.toggleRowSelection(row)
},
handleYsjlSelectionChange: function(val) {
this.ysjlSelection = val
},
sfrChange(val) {
this.bill.inspectionPerson = val
},
fmtBgbh(row, column, cellValue) {
cellValue = cellValue || row.jilubianhao
return cellValue
}
}
}
</script>
<style>
.el-button+.el-alert {
margin: 5px auto;
}
</style>

968
src/views/ysjl/1000/common/sz/dzscl.vue

@ -1,968 +0,0 @@
<!--电站锅炉运行水处理监督检验原始记录-->
<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-show="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')">
预览
</el-button>
<Ft v-if="state !== 'create'" :state="state" :ysjl="ysjl" :ysjl-id="Number(ysjlId ? ysjlId : 0)" :department-id="Number(departmentId ? departmentId : 0)" style="margin-left: 10px;" />
</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="130px">
<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:80px" />
</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="shiyongdanwei">
<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" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="安全管理部门" prop="anquanguanlibumen">
<el-input v-model="ysjl.anquanguanlibumen" :disabled="edit" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="联系人" prop="shiyongdanweiLianxiren">
<el-input v-model="ysjl.shiyongdanweiLianxiren" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="联系电话" prop="shiyongdanweiDianhua">
<el-input v-model="ysjl.shiyongdanweiDianhua" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="作业人员持证情况" prop="shuichulizuoyerenshu">
<el-input v-model="param.shuichulizuoyerenshu" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="锅炉类别" prop="shebeileibiedaima">
<el-select v-model="ysjl.shebeileibiedaima" style="width: 215px" @change="getSbpzList">
<el-option v-for="item in sblbList" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="设备品种" prop="shebeipinzhongdaima">
<el-select v-model="ysjl.shebeipinzhongdaima" style="width: 215px">
<el-option v-for="item in sbpzList" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>水处理设备</legend>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="补给水处理系统" prop="xunhuanfangshi">
<el-input v-model="param.xunhuanfangshi" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="系统出力" prop="edingchuli">
<el-input v-model="param.edingchuli" type="text">
<template slot="append">
t/h
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="给水系统" prop="shuichulishebei">
<el-select v-model="param.shuichulishebei" :disabled="edit" type="text" placeholder="请选择" style="width:232px" @change="setJyxmStandard">
<el-option label="氧化性全挥发处理" value="氧化性全挥发处理" />
<el-option label="还原性全挥发处理" value="还原性全挥发处理" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="炉水处理" prop="shuichulifangfa">
<el-select v-model="param.shuichulifangfa" :disabled="edit" type="text" placeholder="请选择" style="width:232px" @change="setJyxmStandard">
<el-option label="炉水固体碱化处理" value="炉水固体碱化处理" />
<el-option label="炉水全挥发处理" value="炉水全挥发处理" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="回水系统" prop="guoneichuliyaoji">
<el-select v-model="param.guoneichuliyaoji" :disabled="edit" type="text" placeholder="请选择" style="width:232px" @change="setJyxmStandard">
<el-option label="有铜系统" value="有铜系统" />
<el-option label="无铜系统" value="无铜系统" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="系统出力和运行周期" prop="xtclhyxzq" label-width="150px">
<el-select v-model="param.xtclhyxzq" :disabled="edit" type="text" placeholder="请选择" style="width:212px">
<el-option label="满足锅炉给水要求" value="满足锅炉给水要求" />
<el-option label="不能满足锅炉给水要求" value="不能满足锅炉给水要求" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="锅炉类型" prop="huanjingtiaojian">
<el-select v-model="param.huanjingtiaojian" :disabled="edit" type="text" placeholder="请选择" style="width:232px" @change="setJyxmStandard">
<el-option label="汽包炉" value="汽包炉" />
<el-option label="直流炉" value="直流炉" />
</el-select>
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>锅炉情况</legend>
<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="guigexinghao">
<el-input v-model="ysjl.guigexinghao" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="6">
<el-form-item label="额定蒸发量" prop="edingzhengfaliang">
<el-input v-model="param.edingzhengfaliang" type="text" />
</el-form-item>
</el-col>
<el-col :span="3">
<el-select v-model="param.edinggonglv" type="text" placeholder="请选择">
<el-option label="t/h" value="t/h" />
<el-option label="MW" value="MW" />
</el-select>
</el-col>
<el-col :span="9">
<el-form-item label="额定压力" prop="edingyali">
<el-input v-model="param.edingyali" type="text" @blur="setJyxmStandard">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="过热器减温方式" prop="guoreqichukouwendu">
<el-input v-model="param.guoreqichukouwendu" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="使用登记证号" prop="shiyongdengjibianhao">
<el-input v-model="ysjl.shiyongdengjibianhao" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="汽机形式" prop="ranshaofangshi">
<el-select v-model="param.ranshaofangshi" :disabled="edit" type="text" placeholder="请选择" style="width:232px">
<el-option label="凝汽式" value="凝汽式" />
<el-option label="背压式" value="背压式" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="单位内编号" prop="danweineibubianhao">
<el-input v-model="ysjl.danweineibubianhao" type="text" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>使用的主要设备</legend>
<el-table ref="yqsbData" :data="yqsbData" border stripe style="width:100%">
<el-table-column align="center" prop="C1" width="110" label="是否使用">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.C1" style="width: 100px" true-label="" false-label="" />
</template>
</el-table-column>
<el-table-column align="center" prop="C2" label="编号">
<template slot-scope="scope">
<el-input v-model="scope.row.C2" :label="scope.row.C2" disabled />
</template>
</el-table-column>
<el-table-column align="center" prop="C3" label="仪器名称">
<template slot-scope="scope">
<el-input v-model="scope.row.C3" type="text" disabled />
</template>
</el-table-column>
<el-table-column align="center" prop="C4" width="110" label="是否使用">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.C4" true-label="" false-label="" />
</template>
</el-table-column>
<el-table-column align="center" prop="C5" label="编号">
<template slot-scope="scope">
<el-input v-model="scope.row.C5" disabled />
</template>
</el-table-column>
<el-table-column align="center" prop="C6" label="仪器名称">
<template slot-scope="scope">
<el-input v-model="scope.row.C6" disabled />
</template>
</el-table-column>
</el-table>
</fieldset>
<fieldset>
<legend>检验信息</legend>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="检验结论" prop="jianyanjielun">
<el-select v-model="ysjl.jianyanjielun" :disabled="edit" type="text" placeholder="请选择" style="width:232px">
<el-option label="符合要求" value="符合要求" />
<el-option label="基本符合要求" value="基本符合要求" />
<el-option label="不符合要求" value="不符合要求" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="执行标准" prop="jianyanyiju">
<el-input v-model="ysjl.jianyanyiju" :disabled="edit" :rows="2" type="textarea" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" style="margin-top: 30px">
<el-col :span="18" style="height: 90px">
<el-form-item label="整改意见和期限" prop="wentijizai">
<el-input v-model="param.wentijizai" :rows="3" type="textarea" placeholder="" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="检验开始日期" prop="jianyankaishiriqi">
<el-date-picker v-model="ysjl.jianyankaishiriqi" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%;" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="检验结束日期" prop="jianyanjieshuriqi">
<el-date-picker v-model="ysjl.jianyanjieshuriqi" type="date" placeholder="选择日期" style="width: 100%;" @change="getXcjyrq" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="下次检验日期" prop="xiacijianyanriqi">
<el-input v-if="ysjl.jianyanjielun === '不符合要求'" v-model="ysjl.xiacijianyanriqishuoming" type="text" disabled="true" />
<el-date-picker v-else v-model="ysjl.xiacijianyanriqi" type="date" placeholder="选择日期" editable style="width: 100%;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="9">
<el-form-item label="检验人员" prop="jianyanrenyuan">
<el-input v-model="jianyanrenyuan" disabled />
<el-input v-show="false" v-model="ysjl.jianyanrenyuan" />
</el-form-item>
</el-col>
<el-col v-if="state !== 'bgView'" :span="9">
<sign-name :ysjl="ysjl" :jianyanrenyuan="jianyanrenyuan" :disabled="edit" @setSignValue="singNameValue" />
</el-col>
</el-row>
</fieldset>
</el-form>
</el-tab-pane>
<el-tab-pane label="水、汽分析" name="second">
<el-table :data="jyxmData" :span-method="tableJs.mergeColRows" border stripe style="width:100%;max-width: 2000px;">
<el-table-column type="index" align="center" width="30" label="序号" />
<el-table-column align="center" prop="jianyanxiang" width="40" label="水样" />
<el-table-column align="center" prop="jianyanmu" width="130" label="项目" />
<el-table-column align="center" style="width: 50%" prop="c1" label="实测1">
<template slot-scope="scope">
<el-input v-model="scope.row.c1" :disabled="edit" @blur="setRounding(scope.$index)" />
</template>
</el-table-column>
<el-table-column align="center" style="width: 100%" prop="c2" label="实测2">
<template slot-scope="scope">
<el-input v-model="scope.row.c2" :disabled="edit" @blur="setRounding(scope.$index)" />
</template>
</el-table-column>
<el-table-column align="center" width="90" prop="c3" label="空白">
<template slot-scope="scope">
<el-input v-model="scope.row.c3" :disabled="edit" />
</template>
</el-table-column>
<el-table-column align="center" prop="c9" label="标准值">
<template slot-scope="scope">
<el-input v-model="scope.row.c9" :disabled="edit" />
</template>
</el-table-column>
<el-table-column align="center" width="110" prop="c4" label="实测值">
<template slot-scope="scope">
<el-input v-model="scope.row.c4" :disabled="edit" />
</template>
</el-table-column>
<el-table-column align="center" prop="jianyanjieguo" width="40" label="水样" />
<el-table-column align="center" prop="beizhu" width="130" label="项目" />
<el-table-column align="center" style="width: 50%" prop="c5" label="实测1">
<template slot-scope="scope">
<el-input v-model="scope.row.c5" :disabled="edit" @blur="setRounding2(scope.$index)" />
</template>
</el-table-column>
<el-table-column align="center" style="width: 100%" prop="c6" label="实测2">
<template slot-scope="scope">
<el-input v-model="scope.row.c6" :disabled="edit" @blur="setRounding2(scope.$index)" />
</template>
</el-table-column>
<el-table-column align="center" width="90" prop="c7" label="空白">
<template slot-scope="scope">
<el-input v-model="scope.row.c7" :disabled="edit" />
</template>
</el-table-column>
<el-table-column align="center" prop="c10" label="标准值">
<template slot-scope="scope">
<el-input v-model="scope.row.c10" :disabled="edit" />
</template>
</el-table-column>
<el-table-column align="center" width="110" prop="c8" label="实测值">
<template slot-scope="scope">
<el-input v-model="scope.row.c8" :disabled="edit" />
</template>
</el-table-column>
<!--<el-table-column align="center" width="200" prop="beizhu" label="标准值">
<template slot-scope="scope">
<el-input v-model="scope.row.beizhu" :disabled="edit" />
</template>
</el-table-column>-->
</el-table>
<br>
</el-tab-pane>
<el-tab-pane v-if="state !== 'create'" label="检验收费情况" name="jysfqk">
<complex-bill v-if="complexShow" ref="bill" :ysjl="ysjl" />
</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 Ft from '@/views/ysjl/1000/common/glft'
import ComplexBill from '@/views/chargeBill/components/complex'
import Bzz from '../../common/dzsclJyxmBzz.js'
export default {
name: 'GlDzsclYsjl',
components: { SignName, Sticky, Ft, ComplexBill },
data() {
return {
jlbh1: 'SJD',
jlbh2: '(' + new Date().getFullYear() + ')',
jlbh3: '',
ysjl: {},
param: {},
state: this.$route.query.state,
jianyanrenyuan: '',
jianjianyuan: '',
departmentId: this.$store.getters.departmentId,
isRepeat: false,
edit: false,
checkedTab: 'first',
jyxmData: [],
yqsbData: [
{ C1: '☑', C2: '320126', C3: '电导仪', C4: '☑', C5: 'JS-25-01', C6: '碱式滴定管' },
{ C1: '☑', C2: '1-10130641', C3: '多离子测定仪', C4: '☑', C5: 'SS-25-05', C6: '酸式滴定管' },
{ C1: '☑', C2: '010233100054', C3: 'PH计', C4: '☑', C5: 'B534348173', C6: '电子天平' },
{ C1: '☑', C2: 'RZT-01-07', C3: '自动电位滴定仪', C4: '☑', C5: '629001', C6: '浊度仪' }
],
sblbList: [],
//
//
cols: [
{
name: 'jianyanxiang', // el-table-column prop=''
getValue(row) { //
return row.jianyanxiang
}
},
{
name: 'jianyanjieguo',
getValue(row) {
return row.jianyanjieguo
}
}
],
//
rows: [
{
name: 'jianyanxiang',
getValue(row) {
return row.jianyanxiang
}
},
{
name: 'jianyanjieguo',
getValue(row) {
return row.jianyanjieguo
}
}
],
sbpzList: [], //
multipleSelection: [],
ysjlId: this.$route.query.id,
tableData2: [],
complexShow: false
}
},
computed: {
jilubianhao: function() {
let bianhao
if (this.ysjl.jilubianhao === null || this.ysjl.jilubianhao === undefined || this.ysjl.jilubianhao === '') {
return this.jlbh1 + this.jlbh2 + '-' + this.jlbh3
} else {
bianhao = this.ysjl.jilubianhao
}
return this.judgeRepeat(bianhao, this.ysjl.id)
}
},
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)
}
},
created() {
if (this.state === 'create') {
this.initYsjl()
} else {
this.getYsjl()
this.getFbjyxm(this.ysjlId)
this.getJyxmByYsjl(this.ysjlId)
this.getSblbList()
}
},
methods: {
initYsjl() {
this.api({
url: '/ysjl/initYsjl',
method: 'post',
data: {
modelId: this.$route.query.modelId,
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.getXcjyrq()
this.ysjl.jilubianhao = this.jilubianhao
this.ysjl.baogaobianhao = null //
this.ysjl.jigouhezhunzhenghao = process.env.VUE_APP_HZZBH
this.ysjl.jianyanjielun = '符合要求'
this.ysjl.jianyanyiju = 'GB/T 12145-2008《火力发电机组及蒸汽动力设备水汽质量》、DL/T 912-2005《超临界火力发电机组水汽质量标准》'
this.ysjl.anquanguanlibumen = '/'
this.ysjl.danweineibubianhao = '/'
this.ysjl.shebeidaima = '/'
this.$set(this.param, 'shuichulizuoyerenshu', '/')
this.$set(this.param, 'ranshaofangshi', '凝汽式')
this.$set(this.param, 'edinggonglv', 't/h')
this.$set(this.param, 'shuichulishebei', '氧化性全挥发处理')
this.$set(this.param, 'shuichulifangfa', '炉水固体碱化处理')
this.$set(this.param, 'guoneichuliyaoji', '有铜系统')
this.$set(this.param, 'xtclhyxzq', '满足锅炉给水要求')
this.$set(this.param, 'ranshaofangshi', '凝汽式')
this.getMaxBh()
this.getJyxm(1)
this.getSblbList()
if (this.ysjl.shebeileibiedaima !== null && this.ysjl.shebeileibiedaima !== '') {
this.getSbpzList(this.ysjl.shebeileibiedaima)
}
})
},
getYsjl() {
this.api({
url: '/ysjl/getYsjlById',
method: 'get',
params: {
ysjlId: this.ysjlId
}
}).then(data => {
this.ysjl = data.ysjl
this.complexShow = true
if (this.ysjl.jianyanrenyuan !== null && this.ysjl.jianyanrenyuan !== undefined && this.ysjl.jianyanrenyuan.length > 0) {
this.jianyanrenyuan = this.common.convertCnName(this.ysjl.jianyanrenyuan)
}
this.judgeRepeat(this.ysjl.jilubianhao, this.ysjl.id)
this.getParam(this.ysjl.shebeizhongleidaima)
if (this.ysjl.shebeileibiedaima !== null && this.ysjl.shebeileibiedaima !== '') {
this.getSbpzList(this.ysjl.shebeileibiedaima)
}
if (this.ysjl.jilubianhao === '' || this.ysjl.jilubianhao === null || this.ysjl.jilubianhao === undefined) {
this.getMaxBh()
}
})
},
getParam(sbzldm) {
// id
this.api({
url: '/ysjl/getParamByYsjlId',
method: 'get',
params: {
ysjlId: this.ysjlId,
sbzldm: sbzldm
}
}).then(data => {
this.param = data
})
},
//
singNameValue(data) {
this.jianyanrenyuan = data.name
this.ysjl.jianyanrenyuan = data.id
if (this.state !== 'create') {
this.common.signName(this.ysjl.id, this.ysjl.jianyanrenyuan)
Utils.$emit('ysjl-list')
}
},
getSblbList() {
this.getSbList('1000', undefined, 2)
},
getSbpzList(val) {
this.sbpzList = []
this.getSbList('1000', val, 3)
},
setSblb(val) {
let obj = {}
obj = this.sblbList.find((item) => { // sblbList
return item.value === val //
})
this.$set(this.ysjl, 'shebeileibie', obj.label)
this.$set(this.ysjl, 'shebeileibiedaima', val)
},
setSbpz(val) {
let obj = {}
obj = this.sbpzList.find((item) => { // sblbList
return item.value === val //
})
this.$set(this.ysjl, 'shebeipinzhong', obj.label)
this.$set(this.ysjl, 'shebeipinzhongdaima', val)
},
getSbList(sbzl, sblb, level) {
this.api({
url: '/sedirectory/getList',
method: 'get',
params: {
sbzl: sbzl,
sblb: sblb,
level: level
}
}).then(data => {
switch (level) {
case 2:
this.sblbList = data
return ''
case 3:
this.sbpzList = data
return ''
default:
this.sbzlList = data
return ''
}
})
},
//
getJyxm(sort) {
this.api({
url: '/jyxm/getCyJyxm',
method: 'get',
params: {
templateId: this.ysjl.modelId,
order: sort
}
}).then(data => {
for (let i = 0; i < data.length; i++) {
const jyxmRow = {}
this.$set(jyxmRow, 'id', data[i].id)
this.$set(jyxmRow, 'jianyanxiang', data[i].jianyanxiang)
this.$set(jyxmRow, 'jianyanmu', data[i].jianyanmu)
this.$set(jyxmRow, 'beizhu', data[i].beizhu)
this.$set(jyxmRow, 'jianyanjieguo', data[i].jianyanjieguo)
this.$set(jyxmRow, 'c1', '/')
this.$set(jyxmRow, 'c2', '/')
this.$set(jyxmRow, 'c3', '0')
this.$set(jyxmRow, 'c4', '/')
this.$set(jyxmRow, 'c5', '/')
this.$set(jyxmRow, 'c6', '/')
this.$set(jyxmRow, 'c7', '0')
this.$set(jyxmRow, 'c8', '/')
this.$set(jyxmRow, 'c9', '/')
this.$set(jyxmRow, 'c10', '/')
if (i === 23) {
this.$set(jyxmRow, 'c1', '')
this.$set(jyxmRow, 'c2', '')
this.$set(jyxmRow, 'c3', '')
this.$set(jyxmRow, 'c4', '')
this.$set(jyxmRow, 'c9', '')
}
this.$set(jyxmRow, 'jianyanneirong', data[i].jianyanneirong)
this.$set(jyxmRow, 'xiangmuleibie', data[i].xiangmuleibie)
this.jyxmData.push(jyxmRow)
}
this.tableJs.getData(this.cols, this.rows, this.jyxmData)
})
},
getFbjyxm(id) {
this.api({
url: '/jyxm/getJyxmInfoByYsjl',
method: 'get',
params: {
ysjlId: id,
type: 'fbjyxm'
}
}).then(data => {
this.yqsbData = JSON.parse(data)
})
},
getJyxmByYsjl(id) {
this.api({
url: '/jyxm/getCyJyxmByYsjl',
method: 'get',
params: {
ysjlId: id,
isReport: false,
order: 1
}
}).then(data => {
this.jyxmData = data
this.tableJs.getData(this.cols, this.rows, data)
})
},
// id,
getProp(operation) {
const retData = []
for (let i = 0, length = this.jyxmData.length; i < length; i++) {
const retRow = {}
retRow.id = this.jyxmData[i].id
retRow.c1 = this.jyxmData[i].c1 === null ? '' : this.jyxmData[i].c1
retRow.c2 = this.jyxmData[i].c2 === null ? '' : this.jyxmData[i].c2
retRow.c3 = this.jyxmData[i].c3 === null ? '' : this.jyxmData[i].c3
retRow.c4 = this.jyxmData[i].c4 === null ? '' : this.jyxmData[i].c4
retRow.c5 = this.jyxmData[i].c5 === null ? '' : this.jyxmData[i].c5
retRow.c6 = this.jyxmData[i].c6 === null ? '' : this.jyxmData[i].c6
retRow.c7 = this.jyxmData[i].c7 === null ? '' : this.jyxmData[i].c7
retRow.c8 = this.jyxmData[i].c8 === null ? '' : this.jyxmData[i].c8
retRow.c9 = this.jyxmData[i].c9 === null ? '' : this.jyxmData[i].c9
retRow.c10 = this.jyxmData[i].c10 === null ? '' : this.jyxmData[i].c10
// 1 2
// this.jyxmData[i].jianyanjieguo = (Number(this.jyxmData[i].jyjg1) + '' !== 'NaN' && Number(this.jyxmData[i].jyjg2) + '' !== 'NaN') ? (Number(this.jyxmData[i].jyjg1) + Number(this.jyxmData[i].jyjg2)) / 2 : this.jyxmData[i].jianyanjieguo
// retRow.jianyanjieguo = this.jyxmData[i].jianyanjieguo
// retRow.beizhu = this.jyxmData[i].beizhu
if (operation === 'build') {
if (retRow.c1 === '/') {
retRow.c3 = '/'
}
if (retRow.c5 === '/') {
retRow.c7 = '/'
}
}
retData.push(retRow)
}
return retData
},
saveYsjl: function(operation) {
this.setSblb(this.ysjl.shebeileibiedaima)
this.setSbpz(this.ysjl.shebeipinzhongdaima)
if (operation === 'add') {
if (this.jlbh3.trim() === '') {
this.$message({ message: '请先确认报告编号是否完整!', type: 'warning' })
return false
}
}
const tableData = [] //
const bgTableData = []
tableData.push(this.getProp(operation))
if (operation === 'build') {
const data3 = []
for (let i = 0; i < this.jyxmData.length; i++) {
const jyxm3 = {}
this.$set(jyxm3, 'id', this.jyxmData[i].id)
this.$set(jyxm3, 'c1', this.jyxmData[i].jianyanneirong)
this.$set(jyxm3, 'c2', this.jyxmData[i].c4)
this.$set(jyxm3, 'c3', this.jyxmData[i].xiangmuleibie)
this.$set(jyxm3, 'c4', this.jyxmData[i].c8)
data3.push(jyxm3)
}
bgTableData.push(data3)
}
let url = ''
let data = {}
this.ysjl.bglx = 1
this.ysjl.zfState = false
this.ysjl.jianyanxiangmu = 'dzscl'
this.ysjl.jlprintState = 0
if (operation === 'add') {
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + '-' + this.jlbh3
url = '/ysjl/saveYsjl'
data = {
ysjl: this.ysjl,
param: this.param,
jyxm: JSON.stringify(tableData),
fbjyxm: JSON.stringify(this.yqsbData),
flag: operation
}
this.ysjl.cjState = 'ysjl'
} else if (operation === 'upd') {
url = '/ysjl/updateYsjl'
data = {
ysjl: this.ysjl,
param: this.param,
jyxm: JSON.stringify(tableData),
fbjyxm: JSON.stringify(this.yqsbData),
flag: operation
}
} 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
}
url = '/ysjl/updateYsjl'
data = {
ysjl: this.ysjl,
param: this.param,
jyxm: JSON.stringify(tableData),
fbjyxm: JSON.stringify(this.yqsbData),
bgjyxm: JSON.stringify(bgTableData),
flag: operation
}
}
if (this.isRepeat) {
this.$message({ message: '报告编号重复,请先修改报告编号再保存', type: 'error' })
return false
} else {
this.$refs['ysjl'].validate(valid => {
if (valid) {
this.api({
url: url,
method: 'post',
data: data
}).then(data => {
//
Utils.$emit('task-list')
Utils.$emit('ysjl-list')
Utils.$emit('bggl-daiban-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
})
// this.$router.push({
// path: '/ysjl/1000/dj/dzscl/' + this.ysjl.id,
// query: { state: 'update', id: this.ysjl.id, departmentId: this.ysjl.departmentId, jianyanrenyuan: this.ysjl.jianyanrenyuan }
// })
} else if (operation === 'upd') {
Utils.$emit('ysjl-list')
this.$message({ message: '更新成功', type: 'success' })
// this.$refs.bill.updateChargeBill()
} else {
Utils.$emit('ysjl-list')
// 16
this.common.updRenwuState(this.ysjl.id, 2, true)
Utils.$emit('bggl-daiban-list')
this.$message({ message: '生成报告成功', type: 'success' })
this.$store.dispatch('delCurrentViews', {
view: this.$route,
$router: this.$router
})
}
this.state = 'update'
})
}
})
}
},
//
getMaxBh() {
const aheadPart = this.jlbh1 + this.jlbh2 + '-'
this.api({
url: '/ysjl/gainCurrentBh',
method: 'get',
params: {
aheadPart: aheadPart,
hinderPart: ''
}
}).then(data => {
this.jlbh3 = data
})
},
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
}
})
},
indexMethod(index) {
return index + 24
},
getXcjyrq() {
var dateTemp = this.ysjl.jianyanjieshuriqi.split('-')
const xcjyrq = new Date((Number(dateTemp[0]) + 1) + '-' + dateTemp[1] + '-' + dateTemp[2])
this.ysjl.xiacijianyanriqi = xcjyrq.setDate(xcjyrq.getDate() - 1)
},
setJyxmStandard() { //
try {
this.getBuildJyxm()
} catch (e) {
//
console.log('其他参数信息不全,导致报错。')
}
},
//
getBuildJyxm() {
let bgjyxm = []
const shuichulishebei = this.param.shuichulishebei
const guoneichuliyaoji = this.param.guoneichuliyaoji
if (shuichulishebei === '氧化性全挥发处理') {
if (guoneichuliyaoji === '有铜系统') {
bgjyxm = Bzz.getYhYtRadio(this.jyxmData, this.param)
} else if (guoneichuliyaoji === '无铜系统') {
bgjyxm = Bzz.getYhWtRadio(this.jyxmData, this.param)
}
} else if (shuichulishebei === '还原性全挥发处理') {
if (guoneichuliyaoji === '有铜系统') {
bgjyxm = Bzz.getHyYtRadio(this.jyxmData, this.param)
} else if (guoneichuliyaoji === '无铜系统') {
bgjyxm = Bzz.getHyWtRadio(this.jyxmData, this.param)
}
}
for (let i = 0; i < this.jyxmData.length; i++) {
this.jyxmData[i].c9 = bgjyxm[i].c1
this.jyxmData[i].c10 = bgjyxm[i].c3
}
return bgjyxm
},
setRounding(index) {
if (isNaN(this.jyxmData[index].c1) || isNaN(this.jyxmData[index].c2)) {
return false
}
//
const c1 = (parseFloat(this.jyxmData[index].c1)).toFixed(2)
this.jyxmData[index].c1 = c1
const c2 = (parseFloat(this.jyxmData[index].c2)).toFixed(2)
this.jyxmData[index].c2 = c2
if (!isNaN(c1) && !isNaN(c2)) {
this.jyxmData[index].c4 = parseFloat((parseFloat(c1) + parseFloat(c2)) / 2).toFixed(2)
}
},
setRounding2(index) {
if (isNaN(this.jyxmData[index].c5) || isNaN(this.jyxmData[index].c6)) {
return false
}
//
const c5 = (parseFloat(this.jyxmData[index].c5)).toFixed(2)
this.jyxmData[index].c5 = c5
const c6 = (parseFloat(this.jyxmData[index].c6)).toFixed(2)
this.jyxmData[index].c6 = c6
if (!isNaN(c5) && !isNaN(c6)) {
this.jyxmData[index].c8 = parseFloat((parseFloat(c5) + parseFloat(c6)) / 2).toFixed(2)
}
}
}
}
</script>
<style>
.el-textarea__inner {
border: 1px solid #91393975;
border-radius: 4px;
}
.el-form-item__error {
padding-top: 0px;
position: absolute;
}
.el-input.is-disabled .el-input__inner {
color: #606266;
}
.el-textarea.is-disabled .el-textarea__inner {
color: #606266;
}
.el-dialog__body {
padding-top: 10px;
}
</style>

15
src/views/ysjl/1000/common/sz/gyscl.vue

@ -15,10 +15,6 @@
<el-button v-show="state !== 'create'" type="warning" icon="el-icon-view" size="medium" @click="common.viewYsjl(ysjl.id, 'YSJL')">
预览
</el-button>
<!--<el-button type="info" icon="el-icon-edit" size="medium" @click="getBuildJyxm">
赋值
</el-button>-->
<Ft v-show="state !== 'create'" :state="state" :ysjl="ysjl" :ysjl-id="Number(ysjlId ? ysjlId : 0)" :department-id="Number(departmentId ? departmentId : 0)" style="margin-left: 10px;" />
</div>
</sticky>
<el-tabs v-model="checkedTab" type="card">
@ -440,9 +436,6 @@
</el-table>
<br>
</el-tab-pane>
<el-tab-pane v-if="state !== 'create'" label="检验收费情况" name="jysfqk">
<complex-bill v-if="complexShow" ref="bill" :ysjl="ysjl" />
</el-tab-pane>
</el-tabs>
</div>
</template>
@ -450,12 +443,10 @@
import Sticky from '@/components/Sticky'
import SignName from '@/views/common/SignName'
import Utils from '@/utils/contact'
import Ft from '@/views/ysjl/1000/common/glft'
import Bzz from '../../common/gysclJyxmBzz.js'
import ComplexBill from '@/views/chargeBill/components/complex'
export default {
name: 'GlGysclYsjl',
components: { SignName, Sticky, Ft, ComplexBill },
components: { SignName, Sticky },
data() {
return {
jlbh1: 'SJG',
@ -504,7 +495,6 @@ export default {
],
multipleSelection: [],
ysjlId: this.$route.query.id,
complexShow: false,
tableData: [] //
}
},
@ -543,7 +533,7 @@ export default {
url: '/ysjl/initYsjl',
method: 'post',
data: {
modelId: this.$route.query.modelId,
templateId: this.$route.query.templateId,
renwuId: this.$route.query.renwuId,
neibuleibie: this.$route.query.neibuleibie,
sblbdm: this.$route.query.sblbdm,
@ -580,7 +570,6 @@ export default {
}
}).then(data => {
this.ysjl = data.ysjl
this.complexShow = true
if (this.ysjl.jianyanrenyuan) {
this.jianyanrenyuan = this.common.convertCnName(this.ysjl.jianyanrenyuan)
}

828
src/views/ysjl/1000/dj/nb/2.0/dznb.vue

@ -1,828 +0,0 @@
<!--工业锅炉内部检验-->
<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>
<Ft v-if="state !== 'create'" :state="state" :ysjl="ysjl" :ysjl-id="Number(ysjlId ? ysjlId : 0)" :department-id="Number(departmentId ? departmentId : 0)" style="margin-left: 10px;" />
</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="130px">
<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:80px" disabled />-
<el-input v-model="jlbh4" style="width:85px" @blur="judgeRepeat(jlbh1 + jlbh2 + jlbh3 + '-' + jlbh4 , 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="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="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="shiyongdengjibianhao">
<el-input v-model="ysjl.shiyongdengjibianhao" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="单位邮编" prop="shiyongdanweiYoubian">
<el-input v-model="ysjl.shiyongdanweiYoubian" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="累计运行小时" prop="leijiyunxingxiaoshi">
<el-input v-model="param.leijiyunxingxiaoshi" :disabled="edit">
<template slot="append">
h
</template>
</el-input>
</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="danweineibubianhao">
<el-input v-model="ysjl.danweineibubianhao" :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="18">
<el-form-item label="制造单位" prop="zhizaodanwei">
<el-input v-model="ysjl.zhizaodanwei" :disabled="edit" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<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-col :span="9">
<el-form-item label="投用日期" prop="touyongriqi">
<el-date-picker v-model="ysjl.touyongriqi" 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="shigongdanwei">
<el-input v-model="ysjl.shigongdanwei" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="出厂编号" prop="chanpinbianhao">
<el-input v-model="ysjl.chanpinbianhao" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="上次检验日期" prop="shangcijianyanriqi">
<el-date-picker v-model="param.shangcijianyanriqi" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%;" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>性能参数</legend>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="额定蒸发量" prop="edingzhengfaliang">
<el-input v-model="param.edingzhengfaliang">
<template slot="append">
t/h
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="再热蒸汽流量" prop="zairezhengqiliuliang">
<el-input v-model="param.zairezhengqiliuliang">
<template slot="append">
t/h
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="过热器出口压力" prop="guoreqichukouyali">
<el-input v-model="param.guoreqichukouyali" @change="grqckylChange">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="锅筒工作压力" prop="guotonggongzuoyali">
<el-input v-model="param.guotonggongzuoyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="锅筒工作温度" prop="guotonggongzuowendu">
<el-input v-model="param.guotonggongzuowendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="过热器出口温度" prop="guoreqichukouwendu">
<el-input v-model="param.guoreqichukouwendu" @change="grqckwdChange">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="再热器出口压力" prop="zaireqichukouyali">
<el-input v-model="param.zaireqichukouyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="再热器出口温度" prop="zaireqichukouwendu">
<el-input v-model="param.zaireqichukouwendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="给水压力" prop="geishuiyali">
<el-input v-model="param.geishuiyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="再热器进口压力" prop="zaireqijinkouyali">
<el-input v-model="param.zaireqijinkouyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="再热器进口温度" prop="zaireqijinkouwendu">
<el-input v-model="param.zaireqijinkouwendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="给水温度" prop="geishuiwendu">
<el-input v-model="param.geishuiwendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>允许使用参数</legend>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="允许压力" prop="yali">
<el-input v-model="param.yali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="允许温度" prop="wendu">
<el-input v-model="param.wendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="允许介质" prop="jiezhi">
<el-input v-model="param.jiezhi" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="其他" prop="qita">
<el-input v-model="param.qita" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>检查与校验</legend>
<el-row :gutter="20" style="height: 110px;">
<el-col :span="18">
<el-form-item label="缺陷及其处理:" prop="wentijizai">
<el-input v-model="param.wentijizai" :rows="4" :disabled="edit" type="textarea" palceholder="检验发现的缺陷位置、性质、程度及处理意见(必要时附图)" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="9">
<el-form-item label="检验人员" prop="jianyanrenyuan">
<el-input v-model="jianyanrenyuan" disabled />
<el-input v-show="false" v-model="ysjl.jianyanrenyuan" />
</el-form-item>
</el-col>
<el-col :span="9">
<sign-name :jianyanrenyuan="jianyanrenyuan" :ysjl="ysjl" @setSignValue="singNameValue" />
</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" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%;" @change="getXcjyrq" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="检验结论" prop="jianyanjielun">
<el-select v-model="ysjl.jianyanjielun" :disabled="edit" type="text" placeholder="请选择" style="width:232px">
<el-option label="符合要求" value="符合要求" />
<el-option label="基本符合要求" value="基本符合要求" />
<el-option label="不符合要求" value="不符合要求" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="下次检验日期" prop="xiacijianyanriqi">
<el-input v-if="ysjl.jianyanjielun === '不符合要求'" v-model="ysjl.xiacijianyanriqishuoming" type="text" disabled="true" />
<el-date-picker v-else v-model="ysjl.xiacijianyanriqi" type="date" placeholder="选择日期" editable style="width: 100%;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" style="height: 110px;">
<el-col :span="18">
<el-form-item label="说明:" prop="beizhu">
<el-input v-model="ysjl.beizhu" :rows="4" :disabled="edit" type="textarea" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" style="height: 110px;">
<el-col :span="18">
<el-form-item label="备注:" prop="shuoming">
<el-input v-model="param.shuoming" :rows="4" :disabled="edit" type="textarea" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
</el-form>
</el-tab-pane>
<el-tab-pane label="检查项目" name="second">
<el-form ref="ysjl" :model="ysjl" class="el-form" label-position="right" label-width="130px">
<el-row :gutter="20" style="height: 110px;">
<el-col :span="18">
<el-form-item label="情况说明:" prop="shuoming">
<el-input v-model="param.shuoming" :rows="4" :disabled="edit" type="textarea" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table :data="sybjSData" border stripe style="width:90%">
<el-table-column align="center" label="内部检验情况汇总">
<el-table-column align="center" label="部件及对应编号">
<el-table-column align="center" prop="jianyanxiang" />
<el-table-column align="center" type="index" width="60" />
<el-table-column align="center" prop="jianyanneirong">
<template slot-scope="scope">
<el-input v-if="scope.$index < 11 || scope.$index === 15 || scope.$index === 16" v-model="scope.row.jianyanneirong" :disabled="true" />
<el-input v-else v-model="scope.row.jianyanneirong" />
</template>
</el-table-column>
</el-table-column>
<el-table-column align="center" prop="D3" label="缺陷类别">
<template slot-scope="scope">
<el-input v-model="scope.row.D3" :disabled="edit" />
</template>
</el-table-column>
<el-table-column align="center" prop="D2" label="单项记录编号">
<template slot-scope="scope">
<el-input v-model="scope.row.D2" :disabled="edit" />
</template>
</el-table-column>
<el-table-column align="center" prop="D1" label="备注">
<template slot-scope="scope">
<el-input v-model="scope.row.D1" :disabled="edit" />
</template>
</el-table-column>
</el-table-column>
</el-table>
<br>
</el-tab-pane>
<el-tab-pane label="锅炉结构简图" name="third">
<el-form ref="ysjl" :model="ysjl" class="el-form" label-position="right" label-width="130px">
<fieldset>
<legend>附图</legend>
<span v-if="state === 'create'" style="color: red;font-size: 26px;">请先保存再上传图片</span>
<pictureUpload ref="picture" :info="info" @changed="changed" />
</fieldset>
</el-form>
</el-tab-pane>
<el-tab-pane v-if="state !== 'create'" label="检验收费情况" name="jysfqk">
<complex-bill v-if="complexShow" ref="bill" :ysjl="ysjl" />
</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 pictureUpload from '@/components/Upload'
import Ft from '@/views/ysjl/1000/common/glft'
import ComplexBill from '@/views/chargeBill/components/complex'
export default {
name: 'GlDznbYsjl2',
components: { SignName, Sticky, pictureUpload, Ft, ComplexBill },
data() {
return {
jlbh1: 'GDN(',
jlbh2: new Date().getFullYear(),
jlbh3: ')',
jlbh4: '',
ysjl: {},
param: {},
state: this.$route.query.state,
jianyanrenyuan: '',
departmentId: this.$store.getters.departmentId,
isRepeat: false,
edit: false,
sybjSData: [],
tableData: [],
users: [],
checkedTab: 'first',
ysjlId: this.$route.query.id,
info: {
ysjlId: this.$route.query.id,
jyxm: 'dznb'
},
complexShow: false,
cols: [
{
name: 'jianyanxiang', // el-table-column prop=''
getValue(row) { //
return row.jianyanxiang
}
}
],
rows: [
{
name: 'jianyanxiang', // el-table-column prop=''
getValue(row) { //
return row.jianyanxiang
}
}
]
}
},
computed: {
jilubianhao: function() {
let bianhao
if (this.ysjl.jilubianhao === null || this.ysjl.jilubianhao === undefined || this.ysjl.jilubianhao === '') {
return this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + this.jlbh4
} else {
bianhao = this.ysjl.jilubianhao
}
return this.judgeRepeat(bianhao, this.ysjl.id)
}
},
watch: {
jlbh4: function(val) {
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + val
this.judgeRepeat(this.ysjl.jilubianhao, this.ysjl.id)
},
jilubianhao: function(newValue) {
this.judgeRepeat(newValue, this.ysjl.id)
},
state: function(val) {
this.$refs.picture.stateChange(val)
}
},
// F5
mounted() {
window.addEventListener('beforeunload', this.beforeunloadHandler, false)
},
created() {
if (this.state === 'create') {
//
this.getMaxBh()
this.initYsjl()
} else {
this.getYsjl(this.$route.query.id)
}
this.getJyxm(1)
this.getUserList()
if (this.param.yali === '' || this.param.yali === undefined) {
this.$set(this.param, 'yali', this.param.guoreqichukouyali)
}
this.$nextTick(() => {
this.$refs.picture.stateChange(this.state)
})
},
beforeDestroy() {
window.removeEventListener('beforeunload', this.beforeunloadHandler, false)
},
methods: {
//
singNameValue(data) {
this.jianyanrenyuan = data.name
this.ysjl.jianyanrenyuan = data.id
if (this.state !== 'create') {
this.common.signName(this.ysjl.id, this.ysjl.jianyanrenyuan)
Utils.$emit('ysjl-list')
}
},
//
getMaxBh() {
const aheadPart = this.jlbh1 + '' + this.jlbh2 + '' + this.jlbh3
this.api({
url: '/ysjl/gainCurrentBh',
method: 'get',
params: {
aheadPart: aheadPart + '-',
hinderPart: ''
}
}).then(data => {
this.jlbh4 = data
})
},
initYsjl() {
this.api({
url: '/ysjl/initYsjl',
method: 'post',
data: {
modelId: this.$route.query.modelId,
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.getXcjyrq()
this.ysjl.jilubianhao = this.jilubianhao
this.ysjl.baogaobianhao = null //
this.ysjl.jianyanjielun = '符合要求'
this.ysjl.jigouhezhunzhenghao = process.env.VUE_APP_HZZBH
this.ysjl.beizhu = '/'
this.ysjl.anzhuangdidian = this.ysjl.shiyongdanweiDizhi
this.ysjl.xiacijianyanriqishuoming = '/'
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/getYsjlById',
method: 'get',
params: {
ysjlId: id
}
}).then(data => {
this.ysjl = data.ysjl
this.complexShow = true
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
this.fileList = data.imagePath === null || data.imagePath === undefined ? JSON.parse('[]') : JSON.parse(data.imagePath)
if (this.fileList.length > 0) {
for (let i = 0; i < this.fileList.length; i++) {
this.fileList[i].url = process.env.VUE_APP_IMG_URL + '1000/dznb/' + this.fileList[i].name
}
}
this.$refs.picture.getChange(this.ysjl.shebeizhongleidaima, this.state, this.fileList, 1)
})
},
//
getJyxm(sort) {
let url = ''
let data = {}
if (this.state === 'create') {
url = '/jyxm/getCyJyxm'
data = {
templateId: this.$route.query.modelId,
order: sort
}
} else {
url = '/jyxm/getCyJyxmByYsjl'
data = {
ysjlId: this.ysjlId,
isReport: false,
templateId: this.$route.query.modelId,
order: sort
}
}
this.api({
url: url,
method: 'get',
params: data
}).then(data => {
if (this.state === 'create') {
for (let i = 0; i < data.length; i++) {
const row = data[i]
this.sybjSData.push({
id: row.id,
jianyanxiang: row.jianyanxiang,
jianyanneirong: row.jianyanneirong,
D3: '',
D2: '',
D1: ''
})
}
} else {
data.forEach(row => {
this.sybjSData.push({
id: row.id,
jianyanxiang: row.jianyanxiang,
jianyanneirong: row.jianyanneirong,
D3: row.d3,
D2: row.d2,
D1: row.d1
})
})
}
this.tableJs.getData(this.cols, this.rows, this.sybjSData)
})
},
// id,
getProp: function(data) {
const retData = []
for (let i = 0; i < data.length; i++) {
const retRow = {}
retData.push(retRow)
}
return retData
},
getUserList() {
this.api({
url: '/user/getAllUserList',
method: 'get'
}).then(data => {
this.users = data
})
},
saveYsjl: function(operation) {
if (operation === 'add') {
if (this.jlbh4.trim() === '') {
this.$message({ message: '请先确认记录编号是否完整!', type: 'warning' })
return false
}
}
this.tableData = []
this.tableData.push(this.sybjSData.map(row => {
return {
id: row.id,
D3: row.D3,
D2: row.D2,
D1: row.D1
}
}))
let url = ''
this.ysjl.bglx = 1
this.ysjl.cjState = 'ysjl'
this.ysjl.zfState = '0'
this.ysjl.jianyanxiangmu = 'dznb'
this.ysjl.jlprintState = 0
if (this.ysjl.jianyanjielun === '不符合要求') {
this.ysjl.xiacijianyanriqi = null
}
if (operation === 'add') {
this.ysjl.jilubianhao = this.jlbh1 + '' + this.jlbh2 + '' + this.jlbh3 + '-' + this.jlbh4
url = '/ysjl/saveYsjl'
} 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
}
url = '/ysjl/updateYsjl'
} else if (operation === 'upd') {
url = '/ysjl/updateYsjl'
}
if (this.isRepeat) {
this.$message({ message: '记录编号重复,请先修改记录编号再保存', type: 'error' })
return false
} else {
this.$refs['ysjl'].validate(valid => {
if (valid) {
const jyxm = JSON.stringify(this.tableData)
this.api({
url: url,
method: 'post',
data: {
ysjl: this.ysjl,
param: this.param,
jyxm: jyxm,
bgjyxm: jyxm,
flag: operation
}
}).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
// 16
this.common.updStateByNew(this.ysjl.renwuId, '2', false)
//
this.$store.dispatch('delCurrentViews', {
view: this.$route,
$router: this.$router
})
// this.$router.push({
// path: '/ysjl/1000/nb/dznb' + '/' + this.ysjl.id,
// query: { state: 'update', id: this.ysjl.id, departmentId: this.ysjl.departmentId, jianyanrenyuan: this.ysjl.jianyanrenyuan }
// })
} 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() {
var dateTemp = this.ysjl.jianyanjieshuriqi.split('-')
const xcjyrq = new Date((Number(dateTemp[0]) + 3) + '-' + dateTemp[1] + '-' + dateTemp[2])
this.ysjl.xiacijianyanriqi = xcjyrq.setDate(xcjyrq.getDate() - 1)
},
// F5
beforeunloadHandler(e) {
e.returnValue = ''
},
changed(item) {
this.param.imagePath = item
},
grqckylChange(val) {
this.param.yali = val
},
grqckwdChange(val) {
this.param.wendu = val
}
}
}
</script>

694
src/views/ysjl/1000/dj/nb/2.0/gynb.vue

@ -1,694 +0,0 @@
<!--工业锅炉内部检验-->
<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>
<Ft v-if="state !== 'create'" :state="state" :ysjl="ysjl" :ysjl-id="Number(ysjlId ? ysjlId : 0)" :department-id="Number(departmentId ? departmentId : 0)" style="margin-left: 10px;" />
</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="130px">
<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:80px" disabled />-
<el-input v-model="jlbh4" style="width:85px" @blur="judgeRepeat(jlbh1 + jlbh2 + jlbh3 + '-' + jlbh4 , 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="shiyongdengjibianhao">
<el-input v-model="ysjl.shiyongdengjibianhao" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="设备(注册)代码" prop="zhucedaima">
<el-input v-model="ysjl.zhucedaima" :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="9">
<el-form-item label="单位邮编" prop="shiyongdanweiYoubian">
<el-input v-model="ysjl.shiyongdanweiYoubian" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="使用编号" prop="danweineibubianhao">
<el-input v-model="ysjl.danweineibubianhao" :disabled="edit" />
</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="guigexinghao">
<el-input v-model="ysjl.guigexinghao" :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="18">
<el-form-item label="制造单位" prop="zhizaodanwei">
<el-input v-model="ysjl.zhizaodanwei" :disabled="edit" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="投用日期" prop="touyongriqi">
<el-date-picker v-model="ysjl.touyongriqi" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%;" />
</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="18">
<el-form-item label="安装单位" prop="shigongdanwei">
<el-input v-model="ysjl.shigongdanwei" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="上次检验日期" prop="shangcijianyanriqi">
<el-date-picker v-model="param.shangcijianyanriqi" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%;" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>性能参数</legend>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="额定蒸发量(热功率)" prop="edingzhengfaliang" label-width="160px">
<el-input v-model="param.edingzhengfaliang">
<template slot="append">
t/h(MW)
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="额定压力" prop="edingyali">
<el-input v-model="param.edingyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="额定温度" prop="edingwendu">
<el-input v-model="param.edingwendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="使用压力" prop="gongzuoyali">
<el-input v-model="param.gongzuoyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="出口温度" prop="chukouwendu">
<el-input v-model="param.chukouwendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="回流温度" prop="huiliuwendu">
<el-input v-model="param.huiliuwendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>允许使用参数</legend>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="压力" prop="yali">
<el-input v-model="param.yali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="温度" prop="wendu">
<el-input v-model="param.wendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="介质" prop="jiezhi">
<el-select v-model="param.jiezhi" filterable allow-create default-first-option placeholder="请选择" style="width:232px">
<el-option label="水" value="水" />
<el-option label="有机热载体" value="有机热载体" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="其他" prop="qita">
<el-input v-model="param.qita" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>检查与校验</legend>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="检验依据" prop="jianyanyiju">
<el-input v-model="ysjl.jianyanyiju" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" style="height: 110px;">
<el-col :span="18">
<el-form-item label="缺陷及其处理:" prop="wentijizai">
<el-input v-model="param.wentijizai" :rows="4" :disabled="edit" type="textarea" palceholder="检验发现的缺陷位置、性质、程度及处理意见(必要时附图)" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="9">
<el-form-item label="检验人员" prop="jianyanrenyuan">
<el-input v-model="jianyanrenyuan" disabled />
<el-input v-show="false" v-model="ysjl.jianyanrenyuan" />
</el-form-item>
</el-col>
<el-col :span="9">
<sign-name :jianyanrenyuan="jianyanrenyuan" :ysjl="ysjl" @setSignValue="singNameValue" />
</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" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%;" @change="getXcjyrq" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="检验结论" prop="jianyanjielun">
<el-select v-model="ysjl.jianyanjielun" :disabled="edit" type="text" placeholder="请选择" style="width:232px">
<el-option label="符合要求" value="符合要求" />
<el-option label="基本符合要求" value="基本符合要求" />
<el-option label="不符合要求" value="不符合要求" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="下次检验日期" prop="xiacijianyanriqi">
<el-input v-if="ysjl.jianyanjielun === '不符合要求'" v-model="ysjl.xiacijianyanriqishuoming" type="text" disabled="true" />
<el-date-picker v-else v-model="ysjl.xiacijianyanriqi" type="date" placeholder="选择日期" editable style="width: 100%;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" style="height: 110px;">
<el-col :span="18">
<el-form-item label="说明:" prop="beizhu">
<el-input v-model="ysjl.beizhu" :rows="4" :disabled="edit" type="textarea" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" style="height: 110px;">
<el-col :span="18">
<el-form-item label="其它缺陷情况或说明:" prop="shuoming" label-width="160px">
<el-input v-model="param.shuoming" :rows="4" :disabled="edit" type="textarea" />
</el-form-item>
</el-col>
</el-row>
</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="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-tab-pane v-if="state !== 'create'" label="检验收费情况" name="jysfqk">
<complex-bill v-if="complexShow" ref="bill" :ysjl.sync="ysjl" />
</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 Ft from '@/views/ysjl/1000/common/glft'
import ComplexBill from '@/views/chargeBill/components/complex'
export default {
name: 'GlGynbYsjl2',
components: { SignName, Sticky, Ft, ComplexBill },
data() {
return {
jlbh1: 'GN(',
jlbh2: new Date().getFullYear(),
jlbh3: ')',
jlbh4: '',
ysjl: {
shiyongdanwei: ''
},
param: {},
state: this.$route.query.state,
jianyanrenyuan: '',
departmentId: this.$store.getters.departmentId,
isRepeat: false,
edit: false,
sybjSData: [],
tableData: [],
users: [],
checkedTab: 'first',
ysjlId: this.$route.query.id,
complexShow: false,
//
//
cols: [
{
name: 'jianyanxiang', // el-table-column prop=''
getValue(row) { //
return row.jianyanxiang
}
}
]
}
},
computed: {
jilubianhao: function() {
let bianhao
if (!this.ysjl.jilubianhao) {
return this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + this.jlbh4
} else {
bianhao = this.ysjl.jilubianhao
}
return this.judgeRepeat(bianhao, this.ysjl.id)
}
},
watch: {
jlbh4: function(val) {
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + 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)
}
this.getUserList()
},
beforeDestroy() {
window.removeEventListener('beforeunload', this.beforeunloadHandler, false)
},
methods: {
//
singNameValue(data) {
this.jianyanrenyuan = data.name
this.ysjl.jianyanrenyuan = data.id
if (this.state !== 'create') {
this.common.signName(this.ysjl.id, this.ysjl.jianyanrenyuan)
Utils.$emit('ysjl-list')
}
},
//
getMaxBh() {
const aheadPart = this.jlbh1 + '' + this.jlbh2 + '' + this.jlbh3
this.api({
url: '/ysjl/gainCurrentBh',
method: 'get',
params: {
aheadPart: aheadPart + '-',
hinderPart: ''
}
}).then(data => {
this.jlbh4 = data
})
},
initYsjl() {
this.api({
url: '/ysjl/initYsjl',
method: 'post',
data: {
modelId: this.$route.query.modelId,
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.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/getYsjlById',
method: 'get',
params: {
ysjlId: id
}
}).then(data => {
this.ysjl = data.ysjl
this.complexShow = true
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.modelId,
order: sort
}
} else {
url = '/jyxm/getCyJyxmByYsjl'
data = {
ysjlId: this.ysjlId,
isReport: false,
templateId: this.$route.query.modelId,
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, undefined, this.sybjSData)
})
},
getUserList() {
this.api({
url: '/user/getAllUserList',
method: 'get'
}).then(data => {
this.users = data
})
},
saveYsjl: function(operation) {
if (operation === 'add') {
if (this.jlbh4.trim() === '') {
this.$message({ message: '请先确认记录编号是否完整!', type: 'warning' })
return false
}
}
//
this.tableData = []
this.tableData.push(this.sybjSData.map(row => {
return {
id: row.id,
D1: row.D1
}
}))
let url = ''
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 + '-' + this.jlbh4
url = '/ysjl/saveYsjl'
} 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
}
url = '/ysjl/updateYsjl'
} else if (operation === 'upd') {
url = '/ysjl/updateYsjl'
}
if (this.isRepeat) {
this.$message({ message: '记录编号重复,请先修改记录编号再保存', type: 'error' })
return false
} else {
this.$refs['ysjl'].validate(valid => {
if (valid) {
const jyxm = JSON.stringify(this.tableData)
this.api({
url: url,
method: 'post',
data: {
ysjl: this.ysjl,
param: this.param,
jyxm: jyxm,
bgjyxm: jyxm,
flag: operation
}
}).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
// 16
this.common.updStateByNew(this.ysjl.renwuId, '2', false)
//
this.$store.dispatch('delCurrentViews', {
view: this.$route,
$router: this.$router
})
// this.$router.push({
// path: '/ysjl/1000/nb/gynb' + '/' + this.ysjl.id,
// query: { state: 'update', id: this.ysjl.id, departmentId: this.ysjl.departmentId, jianyanrenyuan: this.ysjl.jianyanrenyuan }
// })
} 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() {
var dateTemp = this.ysjl.jianyanjieshuriqi.split('-')
const xcjyrq = new Date((Number(dateTemp[0]) + 2) + '-' + dateTemp[1] + '-' + dateTemp[2])
this.ysjl.xiacijianyanriqi = xcjyrq.setDate(xcjyrq.getDate() - 1)
},
setYsjlData(data) {
this.ysjl.sfdId = data
},
// F5
beforeunloadHandler(e) {
e.returnValue = ''
}
}
}
</script>

810
src/views/ysjl/1000/dj/nb/dznb.vue

@ -1,810 +0,0 @@
<!--工业锅炉内部检验-->
<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>
<Ft v-if="state !== 'create'" :state="state" :ysjl="ysjl" :ysjl-id="Number(ysjlId ? ysjlId : 0)" :department-id="Number(departmentId ? departmentId : 0)" style="margin-left: 10px;" />
</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="130px">
<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:80px" disabled />-
<el-input v-model="jlbh4" style="width:85px" @blur="judgeRepeat(jlbh1 + jlbh2 + jlbh3 + '-' + jlbh4 , 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="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="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="shiyongdengjibianhao">
<el-input v-model="ysjl.shiyongdengjibianhao" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="单位邮编" prop="shiyongdanweiYoubian">
<el-input v-model="ysjl.shiyongdanweiYoubian" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="累计运行小时" prop="leijiyunxingxiaoshi">
<el-input v-model="param.leijiyunxingxiaoshi" :disabled="edit">
<template slot="append">
h
</template>
</el-input>
</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="danweineibubianhao">
<el-input v-model="ysjl.danweineibubianhao" :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="18">
<el-form-item label="制造单位" prop="zhizaodanwei">
<el-input v-model="ysjl.zhizaodanwei" :disabled="edit" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<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-col :span="9">
<el-form-item label="投用日期" prop="touyongriqi">
<el-date-picker v-model="ysjl.touyongriqi" 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="shigongdanwei">
<el-input v-model="ysjl.shigongdanwei" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="出厂编号" prop="chanpinbianhao">
<el-input v-model="ysjl.chanpinbianhao" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="上次检验日期" prop="shangcijianyanriqi">
<el-date-picker v-model="param.shangcijianyanriqi" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%;" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>性能参数</legend>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="额定蒸发量" prop="edingzhengfaliang">
<el-input v-model="param.edingzhengfaliang">
<template slot="append">
t/h
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="再热蒸汽流量" prop="zairezhengqiliuliang">
<el-input v-model="param.zairezhengqiliuliang">
<template slot="append">
t/h
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="过热器出口压力" prop="guoreqichukouyali">
<el-input v-model="param.guoreqichukouyali" @change="grqckylChange">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="锅筒工作压力" prop="guotonggongzuoyali">
<el-input v-model="param.guotonggongzuoyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="锅筒工作温度" prop="guotonggongzuowendu">
<el-input v-model="param.guotonggongzuowendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="过热器出口温度" prop="guoreqichukouwendu">
<el-input v-model="param.guoreqichukouwendu" @change="grqckwdChange">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="再热器出口压力" prop="zaireqichukouyali">
<el-input v-model="param.zaireqichukouyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="再热器出口温度" prop="zaireqichukouwendu">
<el-input v-model="param.zaireqichukouwendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="给水压力" prop="geishuiyali">
<el-input v-model="param.geishuiyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="再热器进口压力" prop="zaireqijinkouyali">
<el-input v-model="param.zaireqijinkouyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="再热器进口温度" prop="zaireqijinkouwendu">
<el-input v-model="param.zaireqijinkouwendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="给水温度" prop="geishuiwendu">
<el-input v-model="param.geishuiwendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>允许使用参数</legend>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="允许压力" prop="yali">
<el-input v-model="param.yali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="允许温度" prop="wendu">
<el-input v-model="param.wendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="允许介质" prop="jiezhi">
<el-input v-model="param.jiezhi" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="其他" prop="qita">
<el-input v-model="param.qita" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>检查与校验</legend>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="检验依据" prop="jianyanyiju">
<el-input v-model="ysjl.jianyanyiju" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" style="height: 110px;">
<el-col :span="18">
<el-form-item label="缺陷及其处理:" prop="wentijizai">
<el-input v-model="param.wentijizai" :rows="4" :disabled="edit" type="textarea" palceholder="检验发现的缺陷位置、性质、程度及处理意见(必要时附图)" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="9">
<el-form-item label="检验人员" prop="jianyanrenyuan">
<el-input v-model="jianyanrenyuan" disabled />
<el-input v-show="false" v-model="ysjl.jianyanrenyuan" />
</el-form-item>
</el-col>
<el-col :span="9">
<sign-name :jianyanrenyuan="jianyanrenyuan" :ysjl="ysjl" @setSignValue="singNameValue" />
</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" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%;" @change="getXcjyrq" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="检验结论" prop="jianyanjielun">
<el-select v-model="ysjl.jianyanjielun" :disabled="edit" type="text" placeholder="请选择" style="width:232px">
<el-option label="符合要求" value="符合要求" />
<el-option label="基本符合要求" value="基本符合要求" />
<el-option label="不符合要求" value="不符合要求" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="下次检验日期" prop="xiacijianyanriqi">
<el-input v-if="ysjl.jianyanjielun === '不符合要求'" v-model="ysjl.xiacijianyanriqishuoming" type="text" disabled="true" />
<el-date-picker v-else v-model="ysjl.xiacijianyanriqi" type="date" placeholder="选择日期" editable style="width: 100%;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" style="height: 110px;">
<el-col :span="18">
<el-form-item label="说明:" prop="beizhu">
<el-input v-model="ysjl.beizhu" :rows="4" :disabled="edit" type="textarea" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
</el-form>
</el-tab-pane>
<el-tab-pane label="检查项目" name="second">
<el-form ref="ysjl" :model="ysjl" class="el-form" label-position="right" label-width="130px">
<el-row :gutter="20" style="height: 110px;">
<el-col :span="18">
<el-form-item label="备注:" prop="shuoming">
<el-input v-model="param.shuoming" :rows="4" :disabled="edit" type="textarea" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table :data="sybjSData" :span-method="arraySpanMethod" border stripe style="width:90%">
<el-table-column align="center" label="内部检验情况汇总">
<el-table-column align="center" prop="C1" label="检查项目" />
<el-table-column align="center" prop="C2" label="检查内容">
<template slot-scope="scope">
<el-input v-if="scope.$index < 10" v-model="scope.row.C2" :disabled="true" />
<el-input v-else v-model="scope.row.C2" />
</template>
</el-table-column>
<el-table-column align="center" prop="C3" label="缺陷类别">
<template slot-scope="scope">
<el-input v-model="scope.row.C3" :disabled="edit" />
</template>
</el-table-column>
<el-table-column align="center" prop="C4" label="单项记录编号">
<template slot-scope="scope">
<el-input v-model="scope.row.C4" :disabled="edit" />
</template>
</el-table-column>
<el-table-column align="center" prop="C5" label="备注">
<template slot-scope="scope">
<el-input v-model="scope.row.C5" :disabled="edit" />
</template>
</el-table-column>
</el-table-column>
</el-table>
<br>
</el-tab-pane>
<el-tab-pane label="锅炉结构简图" name="third">
<el-form ref="ysjl" :model="ysjl" class="el-form" label-position="right" label-width="130px">
<fieldset>
<legend>附图</legend>
<span v-if="state === 'create'" style="color: red;font-size: 26px;">请先保存再上传图片</span>
<pictureUpload ref="picture" :info="info" @changed="changed" />
</fieldset>
</el-form>
</el-tab-pane>
<el-tab-pane v-if="state !== 'create'" label="检验收费情况" name="jysfqk">
<complex-bill v-if="complexShow" ref="bill" :ysjl="ysjl" />
</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 pictureUpload from '@/components/Upload'
import Ft from '@/views/ysjl/1000/common/glft'
import ComplexBill from '@/views/chargeBill/components/complex'
export default {
name: 'GlDznbYsjl',
components: { SignName, Sticky, pictureUpload, Ft, ComplexBill },
data() {
return {
jlbh1: 'GDN(',
jlbh2: new Date().getFullYear(),
jlbh3: ')',
jlbh4: '',
ysjl: {},
param: {},
state: this.$route.query.state,
jianyanrenyuan: '',
departmentId: this.$store.getters.departmentId,
isRepeat: false,
edit: false,
sybjSData: [],
tableData: [],
users: [],
checkedTab: 'first',
ysjlId: this.$route.query.id,
info: {
ysjlId: this.$route.query.id,
jyxm: 'dznb'
},
complexShow: false
}
},
computed: {
jilubianhao: function() {
let bianhao
if (this.ysjl.jilubianhao === null || this.ysjl.jilubianhao === undefined || this.ysjl.jilubianhao === '') {
return this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + this.jlbh4
} else {
bianhao = this.ysjl.jilubianhao
}
return this.judgeRepeat(bianhao, this.ysjl.id)
}
},
watch: {
jlbh4: function(val) {
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + val
this.judgeRepeat(this.ysjl.jilubianhao, this.ysjl.id)
},
jilubianhao: function(newValue) {
this.judgeRepeat(newValue, this.ysjl.id)
},
state: function(val) {
this.$refs.picture.stateChange(val)
}
},
// F5
mounted() {
window.addEventListener('beforeunload', this.beforeunloadHandler, false)
},
created() {
if (this.state === 'create') {
//
this.getMaxBh()
this.initYsjl()
this.getJyxm(1)
} else {
this.getYsjl(this.$route.query.id)
this.getJyxmById()
}
this.getUserList()
if (this.param.yali === '' || this.param.yali === undefined) {
this.$set(this.param, 'yali', this.param.guoreqichukouyali)
}
this.$nextTick(() => {
this.$refs.picture.stateChange(this.state)
})
},
beforeDestroy() {
window.removeEventListener('beforeunload', this.beforeunloadHandler, false)
},
methods: {
//
singNameValue(data) {
this.jianyanrenyuan = data.name
this.ysjl.jianyanrenyuan = data.id
if (this.state !== 'create') {
this.common.signName(this.ysjl.id, this.ysjl.jianyanrenyuan)
Utils.$emit('ysjl-list')
}
},
//
getMaxBh() {
const aheadPart = this.jlbh1 + '' + this.jlbh2 + '' + this.jlbh3
this.api({
url: '/ysjl/gainCurrentBh',
method: 'get',
params: {
aheadPart: aheadPart + '-',
hinderPart: ''
}
}).then(data => {
this.jlbh4 = data
})
},
initYsjl() {
this.api({
url: '/ysjl/initYsjl',
method: 'post',
data: {
modelId: this.$route.query.modelId,
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.getXcjyrq()
this.ysjl.jilubianhao = this.jilubianhao
this.ysjl.baogaobianhao = null //
this.ysjl.jianyanjielun = '符合要求'
this.ysjl.jigouhezhunzhenghao = process.env.VUE_APP_HZZBH
this.ysjl.jianyanyiju = '《锅炉安全技术监察规程》、《锅炉定期检验规则》'
this.ysjl.beizhu = '/'
this.ysjl.anzhuangdidian = this.ysjl.shiyongdanweiDizhi
this.ysjl.xiacijianyanriqishuoming = '/'
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/getYsjlById',
method: 'get',
params: {
ysjlId: id
}
}).then(data => {
this.ysjl = data.ysjl
this.complexShow = true
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
this.fileList = data.imagePath === null || data.imagePath === undefined ? JSON.parse('[]') : JSON.parse(data.imagePath)
if (this.fileList.length > 0) {
for (let i = 0; i < this.fileList.length; i++) {
this.fileList[i].url = process.env.VUE_APP_IMG_URL + '1000/dznb/' + this.fileList[i].name
}
}
this.$refs.picture.getChange(this.ysjl.shebeizhongleidaima, this.state, this.fileList, 1)
})
},
//
getJyxm(sort) {
let url = ''
let data = {}
if (this.state === 'create') {
url = '/jyxm/getCyJyxm'
data = {
templateId: this.$route.query.modelId,
order: sort
}
}
this.api({
url: url,
method: 'get',
params: data
}).then(data => {
for (let i = 0; i < data.length; i++) {
const sybjSRow = {}
this.$set(sybjSRow, 'C1', data[i].jianyanxiang)
this.$set(sybjSRow, 'C2', data[i].jianyanneirong)
this.sybjSData.push(sybjSRow)
}
})
},
getJyxmById() {
this.api({
url: '/jyxm/getJyxmInfoByYsjl',
method: 'get',
params: {
ysjlId: this.ysjlId,
type: 'jyxm'
}
}).then(data => {
data = JSON.parse(data)
this.sybjSData = data[0]
})
},
// id,
getProp: function(data) {
const retData = []
for (let i = 0; i < data.length; i++) {
const retRow = {}
retData.push(retRow)
}
return retData
},
getUserList() {
this.api({
url: '/user/getAllUserList',
method: 'get'
}).then(data => {
this.users = data
})
},
arraySpanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) {
if (rowIndex === 0) {
return {
rowspan: 15,
colspan: 1
}
} else if (rowIndex === 15) {
return {
rowspan: 4,
colspan: 1
}
} else {
return {
rowspan: 0,
colspan: 0
}
}
}
},
saveYsjl: function(operation) {
if (operation === 'add') {
if (this.jlbh4.trim() === '') {
this.$message({ message: '请先确认记录编号是否完整!', type: 'warning' })
return false
}
}
this.tableData = []
this.tableData.push(this.sybjSData)
let url = ''
this.ysjl.bglx = 1
this.ysjl.cjState = 'ysjl'
this.ysjl.zfState = '0'
this.ysjl.jianyanxiangmu = 'dznb'
this.ysjl.jlprintState = 0
if (this.ysjl.jianyanjielun === '不符合要求') {
this.ysjl.xiacijianyanriqi = null
}
if (operation === 'add') {
this.ysjl.jilubianhao = this.jlbh1 + '' + this.jlbh2 + '' + this.jlbh3 + '-' + this.jlbh4
url = '/ysjl/saveYsjl'
} 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
}
url = '/ysjl/updateYsjl'
} else if (operation === 'upd') {
url = '/ysjl/updateYsjl'
}
if (this.isRepeat) {
this.$message({ message: '记录编号重复,请先修改记录编号再保存', type: 'error' })
return false
} else {
this.$refs['ysjl'].validate(valid => {
if (valid) {
const jyxm = JSON.stringify(this.tableData)
this.api({
url: url,
method: 'post',
data: {
ysjl: this.ysjl,
param: this.param,
jyxm: jyxm,
bgjyxm: jyxm,
flag: operation
}
}).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
// 16
this.common.updStateByNew(this.ysjl.renwuId, '2', false)
//
this.$store.dispatch('delCurrentViews', {
view: this.$route,
$router: this.$router
})
// this.$router.push({
// path: '/ysjl/1000/nb/dznb' + '/' + this.ysjl.id,
// query: { state: 'update', id: this.ysjl.id, departmentId: this.ysjl.departmentId, jianyanrenyuan: this.ysjl.jianyanrenyuan }
// })
} 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() {
var dateTemp = this.ysjl.jianyanjieshuriqi.split('-')
const xcjyrq = new Date((Number(dateTemp[0]) + 3) + '-' + dateTemp[1] + '-' + dateTemp[2])
this.ysjl.xiacijianyanriqi = xcjyrq.setDate(xcjyrq.getDate() - 1)
},
// F5
beforeunloadHandler(e) {
e.returnValue = ''
},
changed(item) {
this.param.imagePath = item
},
grqckylChange(val) {
this.param.yali = val
},
grqckwdChange(val) {
this.param.wendu = val
}
}
}
</script>

310
src/views/ysjl/1000/dj/nb/gynb.vue

@ -15,7 +15,6 @@
<el-button v-if="state !== 'create'" type="warning" icon="el-icon-view" size="medium" @click="common.viewYsjl(ysjl.id, 'YSJL', false)">
预览
</el-button>
<Ft v-if="state !== 'create'" :state="state" :ysjl="ysjl" :ysjl-id="Number(ysjlId ? ysjlId : 0)" :department-id="Number(departmentId ? departmentId : 0)" style="margin-left: 10px;" />
</div>
</sticky>
<el-tabs v-model="checkedTab" type="card">
@ -27,9 +26,8 @@
<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:80px" disabled />-
<el-input v-model="jlbh4" style="width:85px" @blur="judgeRepeat(jlbh1 + jlbh2 + jlbh3 + '-' + jlbh4 , ysjl.id)" />
<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">
@ -41,6 +39,18 @@
<span style="color:red">编号重复</span>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="使用登记证编号" prop="shiyongdengjibianhao">
<el-input v-model="ysjl.shiyongdengjibianhao" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="设备(注册)代码" prop="zhucedaima">
<el-input v-model="ysjl.zhucedaima" :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">
@ -57,49 +67,37 @@
</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="zhucedaima">
<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="shiyongdengjibianhao">
<el-input v-model="ysjl.shiyongdengjibianhao" :disabled="edit" />
<el-form-item label="单位邮编" prop="shiyongdanweiYoubian">
<el-input v-model="ysjl.shiyongdanweiYoubian" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="单位邮编" prop="shiyongdanweiYoubian">
<el-input v-model="ysjl.shiyongdanweiYoubian" :disabled="edit" />
<el-form-item label="使用编号" prop="danweineibubianhao">
<el-input v-model="ysjl.danweineibubianhao" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="联系人" prop="shiyongdanweiLianxiren">
<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-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="danweineibubianhao">
<el-input v-model="ysjl.danweineibubianhao" :disabled="edit" />
<el-form-item label="锅炉型号" prop="guigexinghao">
<el-input v-model="ysjl.guigexinghao" :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 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>
@ -111,28 +109,16 @@
</el-col>
</el-row>
<el-row :gutter="20">
<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-col :span="9">
<el-form-item label="投用日期" prop="touyongriqi">
<el-date-picker v-model="ysjl.touyongriqi" 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="chanpinbianhao">
<el-input v-model="ysjl.chanpinbianhao" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="上次检验日期" prop="shangcijianyanriqi">
<el-date-picker v-model="param.shangcijianyanriqi" 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">
@ -141,21 +127,26 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="上次检验日期" prop="shangcijianyanriqi">
<el-date-picker v-model="param.shangcijianyanriqi" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%;" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>性能参数</legend>
<el-row :gutter="20">
<el-col :span="6">
<el-form-item label="额定出力" prop="edingchuli">
<el-input v-model="param.edingchuli" />
<el-col :span="9">
<el-form-item label="额定蒸发量(热功率)" prop="edingzhengfaliang" label-width="160px">
<el-input v-model="param.edingzhengfaliang">
<template slot="append">
t/h(MW)
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="3">
<el-select v-model="param.edinggonglv" :disabled="edit" type="text" placeholder="请选择">
<el-option label="t/h" value="t/h" />
<el-option label="MW" value="MW" />
</el-select>
</el-col>
<el-col :span="9">
<el-form-item label="额定压力" prop="edingyali">
<el-input v-model="param.edingyali">
@ -278,6 +269,14 @@
<el-date-picker v-model="ysjl.jianyanjieshuriqi" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%;" @change="getXcjyrq" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="下次检验日期" prop="xiacijianyanriqi">
<el-input v-if="ysjl.jianyanjielun === '不符合要求'" v-model="ysjl.xiacijianyanriqishuoming" type="text" disabled />
<el-date-picker v-else v-model="ysjl.xiacijianyanriqi" type="date" placeholder="选择日期" editable style="width: 100%;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="检验结论" prop="jianyanjielun">
<el-select v-model="ysjl.jianyanjielun" :disabled="edit" type="text" placeholder="请选择" style="width:232px">
@ -288,74 +287,32 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="下次检验日期" prop="xiacijianyanriqi">
<el-input v-if="ysjl.jianyanjielun === '不符合要求'" v-model="ysjl.xiacijianyanriqishuoming" type="text" disabled="true" />
<el-date-picker v-else v-model="ysjl.xiacijianyanriqi" type="date" placeholder="选择日期" editable style="width: 100%;" />
<el-row :gutter="20" style="height: 110px;">
<el-col :span="18">
<el-form-item label="说明:" prop="beizhu">
<el-input v-model="ysjl.beizhu" :rows="4" :disabled="edit" type="textarea" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" style="height: 110px;">
<el-col :span="18">
<el-form-item label="说明:" prop="beizhu">
<el-input v-model="ysjl.beizhu" :rows="4" :disabled="edit" type="textarea" />
<el-form-item label="其它缺陷情况或说明:" prop="shuoming" label-width="160px">
<el-input v-model="param.shuoming" :rows="4" :disabled="edit" type="textarea" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
</el-form>
</el-tab-pane>
<el-tab-pane label="检查项目" name="second">
<el-table :data="sybjSData" border stripe style="width:90%">
<el-table-column align="center" prop="C1" label="检查项目" />
<el-table-column align="center" prop="C2" label="检查结果">
<template slot-scope="scope">
<el-select v-model="scope.row.C2" :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-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="left" prop="jianyanneirong" />
</el-table-column>
<el-table-column align="center" prop="C3" label="检查项目" />
<el-table-column align="center" prop="C4" label="检查结果">
<el-table-column align="center" prop="D1" label="检验结果">
<template slot-scope="scope">
<el-select v-model="scope.row.C4" :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-column align="center" prop="C5" label="检查项目" />
<el-table-column align="center" prop="C6" label="检查结果">
<template slot-scope="scope">
<el-select v-model="scope.row.C6" :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-column align="center" prop="C7" label="检查项目" />
<el-table-column align="center" prop="C8" label="检查结果">
<template slot-scope="scope">
<el-select v-model="scope.row.C8" :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-column align="center" prop="C9" label="检查项目" />
<el-table-column align="center" prop="C10" label="检查结果">
<template slot-scope="scope">
<el-select v-show="scope.row.C9 !== undefined" v-model="scope.row.C10" :disabled="edit" type="text" placeholder="请选择" style="width: 100%;" filterable allow-create default-first-option>
<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="×" />
@ -366,9 +323,6 @@
</el-table>
<br>
</el-tab-pane>
<el-tab-pane v-if="state !== 'create'" label="检验收费情况" name="jysfqk">
<complex-bill v-if="complexShow" ref="bill" :ysjl.sync="ysjl" />
</el-tab-pane>
</el-tabs>
</div>
</template>
@ -377,18 +331,15 @@ import Sticky from '@/components/Sticky'
import SignName from '@/views/common/SignName'
import Utils from '@/utils/contact'
import merge from 'webpack-merge'
import Ft from '@/views/ysjl/1000/common/glft'
import ComplexBill from '@/views/chargeBill/components/complex'
export default {
name: 'GlGynbYsjl',
components: { SignName, Sticky, Ft, ComplexBill },
components: { SignName, Sticky },
data() {
return {
jlbh1: 'GN(',
jlbh2: new Date().getFullYear(),
jlbh3: ')',
jlbh4: '',
jlbh1: 'GN',
jlbh2: '(' + new Date().getFullYear() + ')',
jlbh3: '',
ysjl: {
shiyongdanwei: ''
},
@ -403,14 +354,23 @@ export default {
users: [],
checkedTab: 'first',
ysjlId: this.$route.query.id,
complexShow: false
//
//
cols: [
{
name: 'jianyanxiang', // el-table-column prop=''
getValue(row) { //
return row.jianyanxiang
}
}
]
}
},
computed: {
jilubianhao: function() {
let bianhao
if (!this.ysjl.jilubianhao) {
return this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + this.jlbh4
return this.jlbh1 + this.jlbh2 + '-' + this.jlbh3
} else {
bianhao = this.ysjl.jilubianhao
}
@ -418,8 +378,8 @@ export default {
}
},
watch: {
jlbh4: function(val) {
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + val
jlbh3: function(val) {
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + '-' + val
this.judgeRepeat(this.ysjl.jilubianhao, this.ysjl.id)
},
jilubianhao: function(newValue) {
@ -438,7 +398,7 @@ export default {
this.getMaxBh()
} else {
this.getYsjl(this.$route.query.id)
this.getJyxmById()
this.getJyxm(1)
}
this.getUserList()
},
@ -457,7 +417,7 @@ export default {
},
//
getMaxBh() {
const aheadPart = this.jlbh1 + '' + this.jlbh2 + '' + this.jlbh3
const aheadPart = this.jlbh1 + this.jlbh2
this.api({
url: '/ysjl/gainCurrentBh',
method: 'get',
@ -466,7 +426,7 @@ export default {
hinderPart: ''
}
}).then(data => {
this.jlbh4 = data
this.jlbh3 = data
})
},
initYsjl() {
@ -474,7 +434,7 @@ export default {
url: '/ysjl/initYsjl',
method: 'post',
data: {
modelId: this.$route.query.modelId,
templateId: this.$route.query.templateId,
renwuId: this.$route.query.renwuId,
neibuleibie: this.$route.query.neibuleibie,
sblbdm: this.$route.query.sblbdm,
@ -485,22 +445,17 @@ export default {
}).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.jianyanyiju = '《锅炉安全技术监察规程》、《锅炉定期检验规则》'
this.ysjl.beizhu = '/'
this.ysjl.xiacijianyanriqishuoming = '/'
this.ysjl.anzhuangdidian = this.ysjl.shiyongdanweiDizhi
this.$set(this.param, 'qita', '/')
if (this.$route.query.sblbdm === '1100') {
this.$set(this.param, 'edinggonglv', 't/h')
} else {
this.$set(this.param, 'edinggonglv', 'MW')
}
//
this.ysjl.zhizaoriqi = this.common.checkDateFormat(this.ysjl.zhizaoriqi)
this.ysjl.touyongriqi = this.common.checkDateFormat(this.ysjl.touyongriqi)
@ -509,14 +464,13 @@ export default {
},
getYsjl(id) {
this.api({
url: '/ysjl/getYsjlById',
url: '/ysjl',
method: 'get',
params: {
ysjlId: id
}
}).then(data => {
this.ysjl = data.ysjl
this.complexShow = true
this.ysjl = data
if (this.ysjl.jianyanrenyuan !== null && this.ysjl.jianyanrenyuan.length > 0) {
this.jianyanrenyuan = this.common.convertCnName(this.ysjl.jianyanrenyuan)
}
@ -547,7 +501,15 @@ export default {
if (this.state === 'create') {
url = '/jyxm/getCyJyxm'
data = {
templateId: this.$route.query.modelId,
templateId: this.$route.query.templateId,
order: sort
}
} else {
url = '/jyxm/getCyJyxmByYsjl'
data = {
ysjlId: this.ysjlId,
isReport: false,
templateId: this.$route.query.templateId,
order: sort
}
}
@ -556,40 +518,31 @@ export default {
method: 'get',
params: data
}).then(data => {
for (let i = 0; i < data.length; i++) {
const sybjSRow = {}
this.$set(sybjSRow, 'C1', data[i].jianyanxiang)
this.$set(sybjSRow, 'C2', '√')
this.$set(sybjSRow, 'C3', data[i].jianyanneirong)
this.$set(sybjSRow, 'C4', '√')
this.$set(sybjSRow, 'C5', data[i].jianyanjieguo)
this.$set(sybjSRow, 'C6', '√')
this.$set(sybjSRow, 'C7', data[i].xiangmuleibie)
this.$set(sybjSRow, 'C8', '√')
if (data[i].gongzuojianzheng) {
this.$set(sybjSRow, 'C9', data[i].gongzuojianzheng)
this.$set(sybjSRow, 'C10', '√')
}
this.sybjSData.push(sybjSRow)
}
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
})
})
},
getJyxmById() {
this.api({
url: '/jyxm/getJyxmInfoByYsjl',
method: 'get',
params: {
ysjlId: this.ysjlId,
type: 'jyxm'
}
}).then(data => {
data = JSON.parse(data)
this.sybjSData = data[0]
this.tableJs.getData(this.cols, undefined, this.sybjSData)
})
},
getUserList() {
this.api({
url: '/user/getAllUserList',
url: '/user/all',
method: 'get'
}).then(data => {
this.users = data
@ -597,26 +550,31 @@ export default {
},
saveYsjl: function(operation) {
if (operation === 'add') {
if (this.jlbh4.trim() === '') {
if (this.jlbh3.trim() === '') {
this.$message({ message: '请先确认记录编号是否完整!', type: 'warning' })
return false
}
}
//
this.tableData = []
this.tableData.push(this.sybjSData)
let url = ''
this.tableData.push(this.sybjSData.map(row => {
return {
id: row.id,
D1: row.D1
}
}))
let method = ''
this.ysjl.bglx = 1
this.ysjl.cjState = 'ysjl'
this.ysjl.zfState = '0'
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 + '-' + this.jlbh4
url = '/ysjl/saveYsjl'
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({
@ -632,9 +590,9 @@ export default {
})
return false
}
url = '/ysjl/updateYsjl'
method = 'put'
} else if (operation === 'upd') {
url = '/ysjl/updateYsjl'
method = 'put'
}
if (this.isRepeat) {
this.$message({ message: '记录编号重复,请先修改记录编号再保存', type: 'error' })
@ -644,13 +602,15 @@ export default {
if (valid) {
const jyxm = JSON.stringify(this.tableData)
this.api({
url: url,
method: 'post',
url: '/ysjl',
method: method,
data: {
ysjl: this.ysjl,
param: this.param,
cyJyxm: {
jyxm: jyxm,
bgjyxm: jyxm,
bgjyxm: jyxm
},
flag: operation
}
}).then(data => {
@ -660,17 +620,11 @@ export default {
this.$message({ message: '保存成功, 请前往待办记录中查看。', type: 'success' })
this.ysjl.id = data
this.param.ysjlId = data
// 16
this.common.updStateByNew(this.ysjl.renwuId, '2', false)
//
this.$store.dispatch('delCurrentViews', {
view: this.$route,
$router: this.$router
})
// this.$router.push({
// path: '/ysjl/1000/nb/gynb' + '/' + this.ysjl.id,
// query: { state: 'update', id: this.ysjl.id, departmentId: this.ysjl.departmentId, jianyanrenyuan: this.ysjl.jianyanrenyuan }
// })
} else if (operation === 'upd') {
this.$message({ message: '更新成功', type: 'success' })
//
@ -711,9 +665,9 @@ export default {
})
},
getXcjyrq() {
var dateTemp = this.ysjl.jianyanjieshuriqi.split('-')
const xcjyrq = new Date((Number(dateTemp[0]) + 2) + '-' + dateTemp[1] + '-' + dateTemp[2])
this.ysjl.xiacijianyanriqi = xcjyrq.setDate(xcjyrq.getDate() - 1)
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

643
src/views/ysjl/1000/dj/sy/2.0/sysy.vue

@ -1,643 +0,0 @@
<!--水耐压试验-->
<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')">
预览
</el-button>
<Ft v-if="state !== 'create'" :state="state" :ysjl="ysjl" :ysjl-id="Number(ysjlId ? ysjlId : 0)" :department-id="Number(departmentId ? departmentId : 0)" style="margin-left: 10px;" />
</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="130px">
<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:80px" disabled />-
<el-input v-model="jlbh4" style="width:85px" @blur="judgeRepeat(jlbh1 + jlbh2 + jlbh3 + '-' + jlbh4 , 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="shiyongdanwei">
<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="shishidanwei">
<el-input v-model="param.shishidanwei" :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="danweineibubianhao">
<el-input v-model="ysjl.danweineibubianhao" :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="zhucedaima">
<el-input v-model="ysjl.zhucedaima" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="使用登记证编号" prop="shiyongdengjibianhao">
<el-input v-model="ysjl.shiyongdengjibianhao" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>性能参数</legend>
<el-row :gutter="20">
<el-col :span="6">
<el-form-item label="额定出力" prop="edingchuli">
<el-input v-model="param.edingchuli" />
</el-form-item>
</el-col>
<el-col :span="3">
<el-select v-model="param.edinggonglv" :disabled="edit" type="text" placeholder="请选择">
<el-option label="t/h" value="t/h" />
<el-option label="MW" value="MW" />
</el-select>
</el-col>
<el-col :span="9">
<el-form-item label="额定压力" prop="edingyali">
<el-input v-model="param.edingyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="(锅筒、过热器、再热器、省煤器)工作压力/工作温度" prop="gongzuoyali" label-width="335px">
<el-input v-model="param.gongzuoyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="/" prop="yunxugongzuowendu" label-width="20px">
<el-input v-model="param.yunxugongzuowendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>压试验检验内容</legend>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="试验日期" prop="shiyanriqi">
<el-date-picker v-model="param.shiyanriqi" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%;" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="确定试验压力" prop="shiyanyali">
<el-input v-model="param.shiyanyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="试验设备型号" prop="shiyanshebeixinghao">
<el-input v-model="param.shiyanshebeixinghao" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="安全防护措施" prop="anquanfanghucuoshi">
<el-input v-model="param.anquanfanghucuoshi" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="试验条件(温度)" prop="shiyantiaojian">
<el-input v-model="param.shiyantiaojian" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="水(介)质情况" prop="shuizhiqingkuang">
<el-input v-model="param.shuizhiqingkuang" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" style="height: 80px;">
<el-col :span="18">
<el-form-item label="试验范围" prop="shiyanfanwei">
<el-input v-model="param.shiyanfanwei" :rows="3" :disabled="edit" type="textarea" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>压力测量装置</legend>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="数量" prop="shuliang">
<el-input v-model="param.shuliang" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="量程" prop="liangcheng">
<el-input v-model="param.liangcheng" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="精度" prop="jingdu">
<el-input v-model="param.jingdu" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="有效期" prop="youxiaoqi">
<el-input v-model="param.youxiaoqi" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>监督检验结论</legend>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="检验结论" prop="jianyanjielun">
<el-select v-model="ysjl.jianyanjielun" :disabled="edit" type="text" placeholder="请选择" style="width:232px">
<el-option label="合格" value="合格" />
<el-option label="不合格" value="不合格" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="检验日期" prop="jianyanjieshuriqi">
<el-date-picker v-model="ysjl.jianyanjieshuriqi" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="9">
<el-form-item label="检验人员" prop="jianyanrenyuan">
<el-input v-model="jianyanrenyuan" disabled />
<el-input v-show="false" v-model="ysjl.jianyanrenyuan" />
</el-form-item>
</el-col>
<el-col :span="9">
<sign-name :jianyanrenyuan="jianyanrenyuan" :ysjl="ysjl" @setSignValue="singNameValue" />
</el-col>
</el-row>
</fieldset>
</el-form>
</el-tab-pane>
<el-tab-pane label="检查项目" name="second">
<el-table :data="sybjSData" :span-method="tableJs.mergeColRows" border stripe style="width:90%">
<el-table-column align="center" width="50" label="试验步骤">
<el-table-column type="index" align="center" width="50" label="序号" />
<el-table-column align="center" prop="jianyanxiang" min-width="50" label="检查项目" />
<el-table-column align="left" prop="jianyanneirong" min-width="100" label="检验内容" />
<el-table-column align="center" prop="D1" label="检验结果">
<template slot-scope="scope">
<el-autocomplete v-model="scope.row.D1" class="inline-input" :fetch-suggestions="querySearch" />
</template>
</el-table-column>
</el-table-column>
</el-table>
<br>
</el-tab-pane>
<el-tab-pane v-if="state !== 'create'" label="检验收费情况" name="jysfqk">
<complex-bill v-if="complexShow" ref="bill" :ysjl="ysjl" />
</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 Ft from '@/views/ysjl/1000/common/glft'
import ComplexBill from '@/views/chargeBill/components/complex'
export default {
name: 'GlSysyYsjl2',
components: { SignName, Sticky, Ft, ComplexBill },
data() {
return {
jlbh1: 'GS(',
jlbh2: new Date().getFullYear(),
jlbh3: ')',
jlbh4: '',
ysjl: {
renwuId: 0
},
fileList: [],
users: [],
bianzhiren: '',
param: {},
state: this.$route.query.state,
jianyanrenyuan: '',
departmentId: this.$store.getters.departmentId,
isRepeat: false,
edit: false,
checkedTab: 'first',
//
//
cols: [
{
name: 'jianyanxiang', // el-table-column prop=''
getValue(row) { //
return row.jianyanxiang
}
}
],
sybjSData: [],
ysjlId: this.$route.query.id,
complexShow: false,
jyjgOptions: [{ value: '√' }, { value: '○' }, { value: '×' }, { value: '/' }]
}
},
computed: {
jilubianhao: function() {
let bianhao
if (this.ysjl.jilubianhao === null || this.ysjl.jilubianhao === undefined || this.ysjl.jilubianhao === '') {
return this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + this.jlbh4
} else {
bianhao = this.ysjl.jilubianhao
}
return this.judgeRepeat(bianhao, this.ysjl.id)
}
},
watch: {
jlbh4: function(val) {
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + 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.getMaxBh()
} else {
this.getYsjl(this.$route.query.id)
}
this.getJyxm(1)
this.getUserList()
},
beforeDestroy() {
window.removeEventListener('beforeunload', this.beforeunloadHandler, false)
},
methods: {
//
singNameValue(data) {
this.jianyanrenyuan = data.name
this.ysjl.jianyanrenyuan = data.id
if (this.state !== 'create') {
this.common.signName(this.ysjl.id, this.ysjl.jianyanrenyuan)
Utils.$emit('ysjl-list')
}
},
getUserList() {
this.api({
url: '/user/getAllUserList',
method: 'get'
}).then(data => {
this.users = data
})
},
//
getMaxBh() {
const aheadPart = this.jlbh1 + '' + this.jlbh2 + '' + this.jlbh3
this.api({
url: '/ysjl/gainCurrentBh',
method: 'get',
params: {
aheadPart: aheadPart + '-',
hinderPart: ''
}
}).then(data => {
this.jlbh4 = data
})
},
initYsjl() {
const tempTime = new Date()
this.api({
url: '/ysjl/initYsjl',
method: 'post',
data: {
modelId: this.$route.query.modelId,
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.jilubianhao = this.jilubianhao
this.ysjl.baogaobianhao = null //
this.ysjl.bianzhiriqi = tempTime.getFullYear() + '-' + (tempTime.getMonth() + 1) + '-' + tempTime.getDate()
this.ysjl.jianyanjielun = '合格'
this.ysjl.jigouhezhunzhenghao = process.env.VUE_APP_HZZBH
this.ysjl.beizhu = '/'
this.ysjl.jianyanyiju = '1. 《锅炉安全技术监察规程》\n' +
'2. 《锅炉定期检验规则》'
this.$set(this.param, 'edingchuli', (this.param.edingchuli !== null && this.param.edingchuli !== undefined && this.param.edingchuli !== '') ? parseFloat(this.param.edingchuli) : this.param.edingchuli)
this.$set(this.param, 'weihujianxiuqingkuangshuoming', '/')
this.$set(this.param, 'jianchajieguo', '')
this.$set(this.param, 'edinggonglv', 't/h')
this.$set(this.param, 'shiyanriqi', this.ysjl.bianzhiriqi)
})
},
getYsjl(id) {
this.api({
url: '/ysjl/getYsjlById',
method: 'get',
params: {
ysjlId: id
}
}).then(data => {
this.ysjl = data.ysjl
this.complexShow = true
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
this.fileList = data.imagePath === null || data.imagePath === undefined ? JSON.parse('[]') : JSON.parse(data.imagePath)
if (this.fileList.length > 0) {
for (let i = 0; i < this.fileList.length; i++) {
this.fileList[i].url = process.env.VUE_APP_IMG_URL + '1000/sysy/' + this.fileList[i].name
}
}
})
},
//
getJyxm(sort) {
let url = ''
let data = {}
if (this.state === 'create') {
url = '/jyxm/getCyJyxm'
data = {
templateId: this.$route.query.modelId,
order: sort
}
} else {
url = '/jyxm/getCyJyxmByYsjl'
data = {
ysjlId: this.ysjlId,
isReport: false,
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, undefined, this.sybjSData)
})
},
// id,
getProp: function(data) {
const retData = []
for (let i = 0; i < data.length; i++) {
const retRow = {}
retRow.id = data[i].id
if (data[i].beizhu !== '' && data[i].beizhu !== null && data[i].beizhu !== undefined) {
retRow.beizhu = data[i].beizhu
}
retData.push(retRow)
}
return retData
},
saveYsjl: function(operation) {
if (operation === 'add') {
if (this.jlbh4.trim() === '') {
this.$message({ message: '请先确认记录编号是否完整!', type: 'warning' })
return false
}
}
this.tableData = []
this.tableData.push(this.sybjSData.map(row => {
return {
id: row.id,
D1: row.D1
}
}))
let url = ''
this.ysjl.bglx = 1
this.ysjl.cjState = 'ysjl'
this.ysjl.zfState = '0'
this.ysjl.jianyanxiangmu = 'sysy'
this.ysjl.jlprintState = 0
if (operation === 'add') {
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + this.jlbh4
url = '/ysjl/saveYsjl'
} 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
}
url = '/ysjl/updateYsjl'
} else if (operation === 'upd') {
url = '/ysjl/updateYsjl'
}
if (this.isRepeat) {
this.$message({ message: '记录编号重复,请先修改记录编号再保存', type: 'error' })
return false
} else {
this.$refs['ysjl'].validate(valid => {
if (valid) {
const jyxm = JSON.stringify(this.tableData)
this.api({
url: url,
method: 'post',
data: {
ysjl: this.ysjl,
param: this.param,
jyxm: jyxm,
bgjyxm: jyxm,
flag: operation
}
}).then(data => {
Utils.$emit('task-list')
Utils.$emit('ysjl-list')
if (operation === 'add') {
this.$message({ message: '保存成功, 请前往待办记录中查看。', type: 'success' })
this.ysjl.id = data
this.param.ysjlId = data
// 16
this.common.updStateByNew(this.ysjl.renwuId, '2', false)
//
this.$store.dispatch('delCurrentViews', {
view: this.$route,
$router: this.$router
})
// this.$router.push({
// path: '/ysjl/1000/sy/sysy' + '/' + this.ysjl.id,
// query: merge({}, { state: 'update', id: this.ysjl.id, departmentId: this.ysjl.departmentId, jianyanrenyuan: this.ysjl.jianyanrenyuan })
// })
} 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
}
})
},
jcjgChange(val) {
const index = this.param.jianchajieguo.split(';').length + 1
this.param.jianchajieguo = this.param.jianchajieguo === '' ? '1、' + val : this.param.jianchajieguo.replace('。', ';') + '\n' + index + '、' + val
},
// F5
beforeunloadHandler(e) {
e.returnValue = ''
},
querySearch(queryString, cb) {
// callback
cb(this.jyjgOptions)
}
}
}
</script>

150
src/views/ysjl/1000/dj/sy/sysy.vue

@ -15,7 +15,6 @@
<el-button v-if="state !== 'create'" type="warning" icon="el-icon-view" size="medium" @click="common.viewYsjl(ysjl.id, 'YSJL')">
预览
</el-button>
<Ft v-if="state !== 'create'" :state="state" :ysjl="ysjl" :ysjl-id="Number(ysjlId ? ysjlId : 0)" :department-id="Number(departmentId ? departmentId : 0)" style="margin-left: 10px;" />
</div>
</sticky>
<el-tabs v-model="checkedTab" type="card">
@ -62,20 +61,20 @@
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="电话" prop="shiyongdanweiDianhua">
<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="guigexinghao">
<el-input v-model="ysjl.guigexinghao" :disabled="edit" />
<el-form-item label="锅炉使用编号" prop="danweineibubianhao">
<el-input v-model="ysjl.danweineibubianhao" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="锅炉使用编号" prop="danweineibubianhao">
<el-input v-model="ysjl.danweineibubianhao" :disabled="edit" />
<el-form-item label="锅炉型号" prop="guigexinghao">
<el-input v-model="ysjl.guigexinghao" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
@ -117,8 +116,8 @@
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="(锅筒、过热器、再热器、省煤器)工作压力" prop="gongzuoyali" label-width="335px">
<el-col :span="12">
<el-form-item label="(锅筒、过热器、再热器、省煤器)工作压力/工作温度" prop="gongzuoyali" label-width="335px">
<el-input v-model="param.gongzuoyali">
<template slot="append">
MPa
@ -126,10 +125,27 @@
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="/" prop="yunxugongzuowendu" label-width="20px">
<el-input v-model="param.yunxugongzuowendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>压试验检验内容</legend>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="试验压力" prop="shiyanyali">
<el-form-item label="试验日期" prop="shiyanriqi">
<el-date-picker v-model="param.shiyanriqi" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%;" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="确定试验压力" prop="shiyanyali">
<el-input v-model="param.shiyanyali">
<template slot="append">
MPa
@ -137,9 +153,28 @@
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="试验日期" prop="shiyanriqi">
<el-date-picker v-model="param.shiyanriqi" type="date" value-format="timestamp" placeholder="选择日期" style="width: 100%;" />
<el-form-item label="试验设备型号" prop="shiyanshebeixinghao">
<el-input v-model="param.shiyanshebeixinghao" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="安全防护措施" prop="anquanfanghucuoshi">
<el-input v-model="param.anquanfanghucuoshi" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="试验条件(温度)" prop="shiyantiaojian">
<el-input v-model="param.shiyantiaojian" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="水(介)质情况" prop="shuizhiqingkuang">
<el-input v-model="param.shuizhiqingkuang" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
@ -152,21 +187,34 @@
</el-row>
</fieldset>
<fieldset>
<legend>监督检验结论</legend>
<legend>压力测量装置</legend>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="检验依据" prop="jianyanyiju">
<el-input v-model="ysjl.jianyanyiju" />
<el-col :span="9">
<el-form-item label="数量" prop="shuliang">
<el-input v-model="param.shuliang" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="量程" prop="liangcheng">
<el-input v-model="param.liangcheng" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" style="height: 110px;">
<el-col :span="18">
<el-form-item label="说明:" prop="beizhu">
<el-input v-model="ysjl.beizhu" :rows="4" :disabled="edit" type="textarea" />
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="精度" prop="jingdu">
<el-input v-model="param.jingdu" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="有效期" prop="youxiaoqi">
<el-input v-model="param.youxiaoqi" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>监督检验结论</legend>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="检验结论" prop="jianyanjielun">
@ -202,23 +250,15 @@
<el-table-column type="index" align="center" width="50" label="序号" />
<el-table-column align="center" prop="jianyanxiang" min-width="50" label="检查项目" />
<el-table-column align="left" prop="jianyanneirong" min-width="100" label="检验内容" />
<el-table-column align="center" prop="beizhu" label="检验结果">
<el-table-column align="center" prop="D1" label="检验结果">
<template slot-scope="scope">
<el-select v-model="scope.row.beizhu" :disabled="edit" type="text" 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>
<el-autocomplete v-model="scope.row.D1" class="inline-input" :fetch-suggestions="querySearch" />
</template>
</el-table-column>
</el-table-column>
</el-table>
<br>
</el-tab-pane>
<el-tab-pane v-if="state !== 'create'" label="检验收费情况" name="jysfqk">
<complex-bill v-if="complexShow" ref="bill" :ysjl="ysjl" />
</el-tab-pane>
</el-tabs>
</div>
</template>
@ -227,11 +267,9 @@ import Sticky from '@/components/Sticky'
import SignName from '@/views/common/SignName'
import Utils from '@/utils/contact'
import merge from 'webpack-merge'
import Ft from '@/views/ysjl/1000/common/glft'
import ComplexBill from '@/views/chargeBill/components/complex'
export default {
name: 'GlSysyYsjl',
components: { SignName, Sticky, Ft, ComplexBill },
components: { SignName, Sticky },
data() {
return {
jlbh1: 'GS(',
@ -263,7 +301,7 @@ export default {
],
sybjSData: [],
ysjlId: this.$route.query.id,
complexShow: false
jyjgOptions: [{ value: '√' }, { value: '○' }, { value: '×' }, { value: '/' }]
}
},
computed: {
@ -341,7 +379,7 @@ export default {
url: '/ysjl/initYsjl',
method: 'post',
data: {
modelId: this.$route.query.modelId,
templateId: this.$route.query.templateId,
renwuId: this.$route.query.renwuId,
neibuleibie: this.$route.query.neibuleibie,
sblbdm: this.$route.query.sblbdm,
@ -355,7 +393,7 @@ export default {
this.ysjl.jilubianhao = this.jilubianhao
this.ysjl.baogaobianhao = null //
this.ysjl.bianzhiriqi = tempTime.getFullYear() + '-' + (tempTime.getMonth() + 1) + '-' + tempTime.getDate()
this.ysjl.baogaojielun = '合'
this.ysjl.jianyanjielun = '合'
this.ysjl.jigouhezhunzhenghao = process.env.VUE_APP_HZZBH
this.ysjl.beizhu = '/'
this.ysjl.jianyanyiju = '1. 《锅炉安全技术监察规程》\n' +
@ -364,7 +402,7 @@ export default {
this.$set(this.param, 'weihujianxiuqingkuangshuoming', '/')
this.$set(this.param, 'jianchajieguo', '')
this.$set(this.param, 'edinggonglv', 't/h')
this.$set(this.param, 'shiyanriqi', tempTime)
this.$set(this.param, 'shiyanriqi', this.ysjl.bianzhiriqi)
})
},
getYsjl(id) {
@ -376,7 +414,6 @@ export default {
}
}).then(data => {
this.ysjl = data.ysjl
this.complexShow = true
if (this.ysjl.jianyanrenyuan !== null && this.ysjl.jianyanrenyuan.length > 0) {
this.jianyanrenyuan = this.common.convertCnName(this.ysjl.jianyanrenyuan)
}
@ -413,7 +450,7 @@ export default {
if (this.state === 'create') {
url = '/jyxm/getCyJyxm'
data = {
templateId: this.$route.query.modelId,
templateId: this.$route.query.templateId,
order: sort
}
} else {
@ -430,17 +467,25 @@ export default {
params: data
}).then(data => {
if (this.state === 'create') {
for (let i = 0; i < data.length; i++) {
const sybjSRow = {}
this.$set(sybjSRow, 'id', data[i].id)
this.$set(sybjSRow, 'jianyanxiang', data[i].jianyanxiang)
this.$set(sybjSRow, 'jianyanneirong', data[i].jianyanneirong)
this.$set(sybjSRow, 'beizhu', '√')
this.sybjSData.push(sybjSRow)
}
data.forEach(row => {
this.sybjSData.push({
id: row.id,
jianyanxiang: row.jianyanxiang,
jianyanneirong: row.jianyanneirong,
D1: row.jianyanjieguo
})
})
} else {
this.sybjSData = data
data.forEach(row => {
this.sybjSData.push({
id: row.id,
jianyanxiang: row.jianyanxiang,
jianyanneirong: row.jianyanneirong,
D1: row.d1
})
})
}
this.tableJs.getData(this.cols, undefined, this.sybjSData)
})
},
// id,
@ -464,7 +509,12 @@ export default {
}
}
this.tableData = []
this.tableData.push(this.getProp(this.sybjSData))
this.tableData.push(this.sybjSData.map(row => {
return {
id: row.id,
D1: row.D1
}
}))
let url = ''
this.ysjl.bglx = 1
this.ysjl.cjState = 'ysjl'
@ -574,6 +624,10 @@ export default {
// F5
beforeunloadHandler(e) {
e.returnValue = ''
},
querySearch(queryString, cb) {
// callback
cb(this.jyjgOptions)
}
}
}

14
src/views/ysjl/1000/dj/sz/dzscl.vue

@ -1,14 +0,0 @@
<!--电站锅炉运行水处理监督检验原始记录-->
<template>
<gl-dzscl-ysjl />
</template>
<script>
import GlDzsclYsjl from '@/views/ysjl/1000/common/sz/dzscl'
export default {
name: 'GlDjDzsclYsjl',
components: { GlDzsclYsjl }
}
</script>
<style>
</style>

781
src/views/ysjl/1000/dj/wb/2.0/dzwb.vue

@ -1,781 +0,0 @@
<!--电站锅炉外部检验-->
<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>
<Ft v-if="state !== 'create'" :state="state" :ysjl="ysjl" :ysjl-id="Number(ysjlId ? ysjlId : 0)" :department-id="Number(departmentId ? departmentId : 0)" style="margin-left: 10px;" />
</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="130px">
<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:80px" disabled />-
<el-input v-model="jlbh4" style="width:85px" @blur="judgeRepeat(jlbh1 + jlbh2 + jlbh3 + '-' + jlbh4 , 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="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="9">
<el-form-item label="使用登记证编号" prop="shiyongdengjibianhao">
<el-input v-model="ysjl.shiyongdengjibianhao" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="设备(注册)代码" prop="zhucedaima">
<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="shiyongdanweiYoubian">
<el-input v-model="ysjl.shiyongdanweiYoubian" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="使用单位联系人" prop="shiyongdanweiLianxiren">
<el-input v-model="ysjl.shiyongdanweiLianxiren" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="联系电话" prop="shiyongdanweiDianhua">
<el-input v-model="ysjl.shiyongdanweiDianhua" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="使用编号" prop="danweineibubianhao">
<el-input v-model="ysjl.danweineibubianhao" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="锅炉型号" prop="guigexinghao">
<el-input v-model="ysjl.guigexinghao" :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="18">
<el-form-item label="制造单位" prop="zhizaodanwei">
<el-input v-model="ysjl.zhizaodanwei" :disabled="edit" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="投用日期" prop="touyongriqi">
<el-date-picker v-model="ysjl.touyongriqi" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%;" />
</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="18">
<el-form-item label="锅炉安装单位" prop="shigongdanwei">
<el-input v-model="ysjl.shigongdanwei" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="上次检验日期" prop="shangcijianyanriqi">
<el-date-picker v-model="param.shangcijianyanriqi" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%;" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>性能参数</legend>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="额定蒸发量" prop="edingzhengfaliang">
<el-input v-model="param.edingzhengfaliang">
<template slot="append">
t/h
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="锅筒工作压力" prop="guotonggongzuoyali">
<el-input v-model="param.guotonggongzuoyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="过热器出口压力" prop="guoreqichukouyali">
<el-input v-model="param.guoreqichukouyali" @change="grqckylChange">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="再热蒸汽流量" prop="zairezhengqiliuliang">
<el-input v-model="param.zairezhengqiliuliang">
<template slot="append">
t/h
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="锅筒工作温度" prop="guotonggongzuowendu">
<el-input v-model="param.guotonggongzuowendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="过热器出口温度" prop="guoreqichukouwendu">
<el-input v-model="param.guoreqichukouwendu" @change="grqckwdChange">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="再热器出口压力" prop="zaireqichukouyali">
<el-input v-model="param.zaireqichukouyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="再热器出口温度" prop="zaireqichukouwendu">
<el-input v-model="param.zaireqichukouwendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="给水压力" prop="geishuiyali">
<el-input v-model="param.geishuiyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="再热器进口压力" prop="zaireqijinkouyali">
<el-input v-model="param.zaireqijinkouyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="再热器进口温度" prop="zaireqijinkouwendu">
<el-input v-model="param.zaireqijinkouwendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="给水温度" prop="geishuiwendu">
<el-input v-model="param.geishuiwendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>允许使用参数</legend>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="压力" prop="yali">
<el-input v-model="param.yali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="温度" prop="wendu">
<el-input v-model="param.wendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="介质" prop="jiezhi">
<el-input v-model="param.jiezhi" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="其他" prop="qita">
<el-input v-model="param.qita" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>检查与校验</legend>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="检验依据" prop="jianyanyiju">
<el-input v-model="ysjl.jianyanyiju" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" style="height: 110px;">
<el-col :span="18">
<el-form-item label="缺陷及其处理:" prop="wentijizai">
<el-input v-model="param.wentijizai" :rows="4" :disabled="edit" type="textarea" palceholder="检验发现的缺陷位置、性质、程度及处理意见(必要时附图)" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="9">
<el-form-item label="检验人员" prop="jianyanrenyuan">
<el-input v-model="jianyanrenyuan" disabled />
<el-input v-show="false" v-model="ysjl.jianyanrenyuan" />
</el-form-item>
</el-col>
<el-col :span="9">
<sign-name :jianyanrenyuan="jianyanrenyuan" :ysjl="ysjl" @setSignValue="singNameValue" />
</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" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%;" @change="getXcjyrq" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="检验结论" prop="jianyanjielun">
<el-select v-model="ysjl.jianyanjielun" :disabled="edit" type="text" placeholder="请选择" style="width:232px">
<el-option label="符合要求" value="符合要求" />
<el-option label="基本符合要求" value="基本符合要求" />
<el-option label="不符合要求" value="不符合要求" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="下次检验日期" prop="xiacijianyanriqi">
<el-input v-if="ysjl.jianyanjielun === '不符合要求'" v-model="ysjl.xiacijianyanriqishuoming" type="text" disabled="true" />
<el-date-picker v-else v-model="ysjl.xiacijianyanriqi" type="date" placeholder="选择日期" editable style="width: 100%;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" style="height: 110px;">
<el-col :span="18">
<el-form-item label="说明:" prop="beizhu">
<el-input v-model="ysjl.beizhu" :rows="4" :disabled="edit" type="textarea" />
</el-form-item>
</el-col>
</el-row>
</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="100" />
<el-table-column align="center" prop="jianyanmu" width="100" />
<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-tab-pane v-if="state !== 'create'" label="检验收费情况" name="jysfqk">
<complex-bill v-if="complexShow" ref="bill" :ysjl="ysjl" />
</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 Ft from '@/views/ysjl/1000/common/glft'
import ComplexBill from '@/views/chargeBill/components/complex'
export default {
name: 'GlDzwbYsjl2',
components: { SignName, Sticky, Ft, ComplexBill },
data() {
return {
jlbh1: 'GDW(',
jlbh2: new Date().getFullYear(),
jlbh3: ')',
jlbh4: '',
ysjl: {},
param: {},
state: this.$route.query.state,
jianyanrenyuan: '',
departmentId: this.$store.getters.departmentId,
isRepeat: false,
edit: false,
sybjSData: [],
tableData: [],
users: [],
checkedTab: 'first',
//
//
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', // el-table-column prop=''
getValue(row) { //
return row.jianyanxiang
}
},
{
name: 'jianyanmu', // el-table-column prop=''
getValue(row) { //
return row.jianyanmu
}
}
],
ysjlId: this.$route.query.id,
complexShow: false
}
},
computed: {
jilubianhao: function() {
let bianhao
if (this.ysjl.jilubianhao === null || this.ysjl.jilubianhao === undefined || this.ysjl.jilubianhao === '') {
return this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + this.jlbh4
} else {
bianhao = this.ysjl.jilubianhao
}
return this.judgeRepeat(bianhao, this.ysjl.id)
}
},
watch: {
jlbh4: function(val) {
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + 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.getMaxBh()
this.getJyxm(1)
} else {
this.getYsjl(this.$route.query.id)
this.getJyxm(1)
}
this.getUserList()
if (this.param.yali === '' || this.param.yali === undefined) {
this.$set(this.param, 'yali', this.param.guoreqichukouyali)
}
},
beforeDestroy() {
window.removeEventListener('beforeunload', this.beforeunloadHandler, false)
},
methods: {
//
singNameValue(data) {
this.jianyanrenyuan = data.name
this.ysjl.jianyanrenyuan = data.id
if (this.state !== 'create') {
this.common.signName(this.ysjl.id, this.ysjl.jianyanrenyuan)
Utils.$emit('ysjl-list')
}
},
//
getMaxBh() {
const aheadPart = this.jlbh1 + '' + this.jlbh2 + '' + this.jlbh3
this.api({
url: '/ysjl/gainCurrentBh',
method: 'get',
params: {
aheadPart: aheadPart + '-',
hinderPart: ''
}
}).then(data => {
this.jlbh4 = data
})
},
initYsjl() {
this.api({
url: '/ysjl/initYsjl',
method: 'post',
data: {
modelId: this.$route.query.modelId,
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.getXcjyrq()
this.ysjl.jilubianhao = this.jilubianhao
this.ysjl.baogaobianhao = null //
this.ysjl.jianyanjielun = '符合要求'
this.ysjl.jigouhezhunzhenghao = process.env.VUE_APP_HZZBH
this.ysjl.jianyanyiju = '《锅炉安全技术监察规程》、《锅炉定期检验规则》'
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/getYsjlById',
method: 'get',
params: {
ysjlId: id
}
}).then(data => {
this.ysjl = data.ysjl
this.complexShow = true
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.modelId,
order: sort
}
} else {
url = '/jyxm/getCyJyxmByYsjl'
data = {
ysjlId: this.ysjlId,
isReport: false,
templateId: this.$route.query.modelId,
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,
jianyanmu: row.jianyanmu,
jianyanneirong: row.jianyanneirong,
D1: row.jianyanjieguo
})
})
} else {
data.forEach(row => {
this.sybjSData.push({
id: row.id,
jianyanxiang: row.jianyanxiang,
jianyanmu: row.jianyanmu,
jianyanneirong: row.jianyanneirong,
D1: row.d1
})
})
}
this.tableJs.getData(this.cols, this.rows, this.sybjSData)
})
},
// id,
getProp: function(data) {
const retData = []
for (let i = 0; i < data.length; i++) {
const retRow = {}
this.$set(retRow, 'id', data[i].id)
this.$set(retRow, 'beizhu', data[i].beizhu)
retData.push(retRow)
}
return retData
},
getUserList() {
this.api({
url: '/user/getAllUserList',
method: 'get'
}).then(data => {
this.users = data
})
},
saveYsjl: function(operation) {
if (operation === 'add') {
if (this.jlbh4.trim() === '') {
this.$message({ message: '请先确认记录编号是否完整!', type: 'warning' })
return false
}
}
//
this.tableData = []
this.tableData.push(this.sybjSData.map(row => {
return {
id: row.id,
D1: row.D1
}
}))
let url = ''
this.ysjl.bglx = 1
this.ysjl.cjState = 'ysjl'
this.ysjl.zfState = '0'
this.ysjl.jianyanxiangmu = 'dzwb'
this.ysjl.jlprintState = 0
if (this.ysjl.jianyanjielun === '不符合要求') {
this.ysjl.xiacijianyanriqi = null
}
if (operation === 'add') {
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + this.jlbh4
url = '/ysjl/saveYsjl'
} 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
}
url = '/ysjl/updateYsjl'
} else if (operation === 'upd') {
url = '/ysjl/updateYsjl'
}
if (this.isRepeat) {
this.$message({ message: '记录编号重复,请先修改记录编号再保存', type: 'error' })
return false
} else {
this.$refs['ysjl'].validate(valid => {
if (valid) {
const jyxm = JSON.stringify(this.tableData)
this.api({
url: url,
method: 'post',
data: {
ysjl: this.ysjl,
param: this.param,
jyxm: jyxm,
bgjyxm: jyxm,
flag: operation
}
}).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
// 16
this.common.updStateByNew(this.ysjl.renwuId, '2', false)
//
this.$store.dispatch('delCurrentViews', {
view: this.$route,
$router: this.$router
})
// this.$router.push({
// path: '/ysjl/1000/wb/dzwb' + '/' + this.ysjl.id,
// query: { state: 'update', id: this.ysjl.id, departmentId: this.ysjl.departmentId, jianyanrenyuan: this.ysjl.jianyanrenyuan }
// })
} else if (operation === 'upd') {
this.$message({ message: '更新成功', type: 'success' })
// this.$refs.bill.updateChargeBill()
//
this.$router.push({
query: merge(this.$route.query, { 'jianyanrenyuan': this.ysjl.jianyanrenyuan })
})
} 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() {
var dateTemp = this.ysjl.jianyanjieshuriqi.split('-')
const xcjyrq = new Date((Number(dateTemp[0]) + 1) + '-' + dateTemp[1] + '-' + dateTemp[2])
this.ysjl.xiacijianyanriqi = xcjyrq.setDate(xcjyrq.getDate() - 1)
},
grqckylChange(val) {
this.param.yali = val
},
grqckwdChange(val) {
this.param.wendu = val
},
// F5
beforeunloadHandler(e) {
e.returnValue = ''
}
}
}
</script>

708
src/views/ysjl/1000/dj/wb/2.0/gywb.vue

@ -1,708 +0,0 @@
<!--工业锅炉内部检验-->
<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>
<Ft v-if="state !== 'create'" :state="state" :ysjl="ysjl" :ysjl-id="Number(ysjlId ? ysjlId : 0)" :department-id="Number(departmentId ? departmentId : 0)" style="margin-left: 10px;" />
</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="130px">
<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:80px" disabled />-
<el-input v-model="jlbh4" style="width:85px" @blur="judgeRepeat(jlbh1 + jlbh2 + jlbh3 + '-' + jlbh4 , 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="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="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="zhucedaima">
<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="shiyongdengjibianhao">
<el-input v-model="ysjl.shiyongdengjibianhao" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="单位邮编" prop="shiyongdanweiYoubian">
<el-input v-model="ysjl.shiyongdanweiYoubian" :disabled="edit" />
</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="danweineibubianhao">
<el-input v-model="ysjl.danweineibubianhao" :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="18">
<el-form-item label="制造单位" prop="zhizaodanwei">
<el-input v-model="ysjl.zhizaodanwei" :disabled="edit" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<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-col :span="9">
<el-form-item label="投用日期" prop="touyongriqi">
<el-date-picker v-model="ysjl.touyongriqi" 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="chanpinbianhao">
<el-input v-model="ysjl.chanpinbianhao" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="上次检验日期" prop="shangcijianyanriqi">
<el-date-picker v-model="param.shangcijianyanriqi" 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="shigongdanwei">
<el-input v-model="ysjl.shigongdanwei" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>性能参数</legend>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="额定蒸发量(热功率)" prop="edingzhengfaliang">
<el-input v-model="param.edingzhengfaliang" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="额定压力" prop="edingyali">
<el-input v-model="param.edingyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="出口温度" prop="chukouwendu">
<el-input v-model="param.chukouwendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="使用压力" prop="gongzuoyali">
<el-input v-model="param.gongzuoyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="额定温度" prop="edingwendu">
<el-input v-model="param.edingwendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="回流温度" prop="huiliuwendu">
<el-input v-model="param.huiliuwendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>允许使用参数</legend>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="压力" prop="yali">
<el-input v-model="param.yali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="温度" prop="wendu">
<el-input v-model="param.wendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="介质" prop="jiezhi">
<el-select v-model="param.jiezhi" filterable allow-create default-first-option placeholder="请选择" style="width:232px">
<el-option label="水" value="水" />
<el-option label="有机热载体" value="有机热载体" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="其他" prop="qita">
<el-input v-model="param.qita" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>检查与校验</legend>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="检验依据" prop="jianyanyiju">
<el-input v-model="ysjl.jianyanyiju" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" style="height: 110px;">
<el-col :span="18">
<el-form-item label="缺陷及其处理:" prop="wentijizai">
<el-input v-model="param.wentijizai" :rows="4" :disabled="edit" type="textarea" palceholder="检验发现的缺陷位置、性质、程度及处理意见(必要时附图)" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="9">
<el-form-item label="检验人员" prop="jianyanrenyuan">
<el-input v-model="jianyanrenyuan" disabled />
<el-input v-show="false" v-model="ysjl.jianyanrenyuan" />
</el-form-item>
</el-col>
<el-col :span="9">
<sign-name :jianyanrenyuan="jianyanrenyuan" :ysjl="ysjl" @setSignValue="singNameValue" />
</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" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%;" @change="getXcjyrq" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="检验结论" prop="jianyanjielun">
<el-select v-model="ysjl.jianyanjielun" :disabled="edit" type="text" placeholder="请选择" style="width:232px">
<el-option label="符合要求" value="符合要求" />
<el-option label="基本符合要求" value="基本符合要求" />
<el-option label="不符合要求" value="不符合要求" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="下次检验日期" prop="xiacijianyanriqi">
<el-input v-if="ysjl.jianyanjielun === '不符合要求'" v-model="ysjl.xiacijianyanriqishuoming" type="text" disabled="true" />
<el-date-picker v-else v-model="ysjl.xiacijianyanriqi" type="date" placeholder="选择日期" editable style="width: 100%;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" style="height: 110px;">
<el-col :span="18">
<el-form-item label="其它缺陷情况或说明:" prop="beizhu">
<el-input v-model="ysjl.beizhu" :rows="4" :disabled="edit" type="textarea" />
</el-form-item>
</el-col>
</el-row>
</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="100" />
<el-table-column align="center" prop="jianyanmu" width="100" />
<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-tab-pane v-if="state !== 'create'" label="检验收费情况" name="jysfqk">
<complex-bill v-if="complexShow" ref="bill" :ysjl="ysjl" />
</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 Ft from '@/views/ysjl/1000/common/glft'
import ComplexBill from '@/views/chargeBill/components/complex'
export default {
name: 'GlGywbYsjl2',
components: { SignName, Sticky, Ft, ComplexBill },
data() {
return {
jlbh1: 'GW(',
jlbh2: new Date().getFullYear(),
jlbh3: ')',
jlbh4: '',
ysjl: (this.$route.query.ysjl === null || this.$route.query.ysjl === undefined) ? {} : this.$route.query.ysjl,
defaultParam: {},
param: (this.$route.query.param === null || this.$route.query.param === undefined) ? Object.assign({}, this.defaultParam) : this.$route.query.param,
state: this.$route.query.state,
jianyanrenyuan: '',
departmentId: this.$store.getters.departmentId,
isRepeat: false,
edit: false,
sybjSData: [],
tableData: [],
users: [],
checkedTab: 'first',
ysjlId: this.$route.query.id,
complexShow: false,
//
//
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', // el-table-column prop=''
getValue(row) { //
return row.jianyanxiang
}
},
{
name: 'jianyanmu', // el-table-column prop=''
getValue(row) { //
return row.jianyanmu
}
}
]
}
},
computed: {
jilubianhao: function() {
let bianhao
if (this.ysjl.jilubianhao === null || this.ysjl.jilubianhao === undefined || this.ysjl.jilubianhao === '') {
return this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + this.jlbh4
} else {
bianhao = this.ysjl.jilubianhao
}
return this.judgeRepeat(bianhao, this.ysjl.id)
}
},
watch: {
jlbh4: function(val) {
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + 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.getMaxBh()
this.getJyxm(1)
} else {
this.getYsjl(this.$route.query.id)
this.getJyxm(1)
}
this.getUserList()
},
beforeDestroy() {
window.removeEventListener('beforeunload', this.beforeunloadHandler, false)
},
methods: {
//
singNameValue(data) {
this.jianyanrenyuan = data.name
this.ysjl.jianyanrenyuan = data.id
if (this.state !== 'create') {
this.common.signName(this.ysjl.id, this.ysjl.jianyanrenyuan)
Utils.$emit('ysjl-list')
}
},
initYsjl() {
this.api({
url: '/ysjl/initYsjl',
method: 'post',
data: {
modelId: this.$route.query.modelId,
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.getXcjyrq()
this.ysjl.jilubianhao = this.jilubianhao
this.ysjl.baogaobianhao = null //
this.ysjl.jianyanjielun = '符合要求'
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', '/')
if (this.$route.query.sblbdm === '1100') {
this.$set(this.param, 'edinggonglv', 't/h')
} else {
this.$set(this.param, 'edinggonglv', 'MW')
}
//
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/getYsjlById',
method: 'get',
params: {
ysjlId: id
}
}).then(data => {
this.ysjl = data.ysjl
this.complexShow = true
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) {
this.api({
url: '/ysjl/getParamByYsjlId',
method: 'get',
params: {
ysjlId: ysjlId,
sbzldm: sbzldm
}
}).then(data => {
this.param = data
})
},
//
getMaxBh() {
const aheadPart = this.jlbh1 + '' + this.jlbh2 + '' + this.jlbh3
this.api({
url: '/ysjl/gainCurrentBh',
method: 'get',
params: {
aheadPart: aheadPart + '-',
hinderPart: ''
}
}).then(data => {
this.jlbh4 = data
})
},
//
getJyxm(sort) {
let url = ''
let data = {}
if (this.state === 'create') {
url = '/jyxm/getCyJyxm'
data = {
templateId: this.$route.query.modelId,
order: sort
}
} else {
url = '/jyxm/getCyJyxmByYsjl'
data = {
ysjlId: this.ysjlId,
isReport: false,
templateId: this.$route.query.modelId,
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,
jianyanmu: row.jianyanmu,
jianyanneirong: row.jianyanneirong,
D1: row.jianyanjieguo
})
})
} else {
data.forEach(row => {
this.sybjSData.push({
id: row.id,
jianyanxiang: row.jianyanxiang,
jianyanmu: row.jianyanmu,
jianyanneirong: row.jianyanneirong,
D1: row.d1
})
})
}
this.tableJs.getData(this.cols, this.rows, this.sybjSData)
})
},
getUserList() {
this.api({
url: '/user/getAllUserList',
method: 'get'
}).then(data => {
this.users = data
})
},
saveYsjl: function(operation) {
if (operation === 'add') {
if (this.jlbh4.trim() === '') {
this.$message({ message: '请先确认记录编号是否完整!', type: 'warning' })
return false
}
}
//
this.tableData = []
this.tableData.push(this.sybjSData.map(row => {
return {
id: row.id,
D1: row.D1
}
}))
let url = ''
this.ysjl.bglx = 1
this.ysjl.cjState = 'ysjl'
this.ysjl.zfState = '0'
this.ysjl.jianyanxiangmu = 'gywb'
this.ysjl.jlprintState = 0
if (this.ysjl.jianyanjielun === '不符合要求') {
this.ysjl.xiacijianyanriqi = null
}
if (operation === 'add') {
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + this.jlbh4
url = '/ysjl/saveYsjl'
} 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
}
url = '/ysjl/updateYsjl'
} else if (operation === 'upd') {
url = '/ysjl/updateYsjl'
}
if (this.isRepeat) {
this.$message({ message: '记录编号重复,请先修改记录编号再保存', type: 'error' })
return false
} else {
this.$refs['ysjl'].validate(valid => {
if (valid) {
const jyxm = JSON.stringify(this.tableData)
this.api({
url: url,
method: 'post',
data: {
ysjl: this.ysjl,
param: this.param,
jyxm: jyxm,
bgjyxm: jyxm,
flag: operation
}
}).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
// 16
this.common.updStateByNew(this.ysjl.renwuId, '2', false)
//
this.$store.dispatch('delCurrentViews', {
view: this.$route,
$router: this.$router
})
// this.$router.push({
// path: '/ysjl/1000/wb/gywb' + '/' + this.ysjl.id,
// query: { state: 'update', id: this.ysjl.id, departmentId: this.ysjl.departmentId, jianyanrenyuan: this.ysjl.jianyanrenyuan }
// })
} 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() {
var dateTemp = this.ysjl.jianyanjieshuriqi.split('-')
const xcjyrq = new Date((Number(dateTemp[0]) + 1) + '-' + dateTemp[1] + '-' + dateTemp[2])
this.ysjl.xiacijianyanriqi = xcjyrq.setDate(xcjyrq.getDate() - 1)
},
// F5
beforeunloadHandler(e) {
e.returnValue = ''
}
}
}
</script>

809
src/views/ysjl/1000/dj/wb/dzwb.vue

@ -1,809 +0,0 @@
<!--电站锅炉外部检验-->
<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>
<Ft v-if="state !== 'create'" :state="state" :ysjl="ysjl" :ysjl-id="Number(ysjlId ? ysjlId : 0)" :department-id="Number(departmentId ? departmentId : 0)" style="margin-left: 10px;" />
</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="130px">
<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:80px" disabled />-
<el-input v-model="jlbh4" style="width:85px" @blur="judgeRepeat(jlbh1 + jlbh2 + jlbh3 + '-' + jlbh4 , 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="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="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="zhucedaima">
<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="shiyongdengjibianhao">
<el-input v-model="ysjl.shiyongdengjibianhao" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="单位邮编" prop="shiyongdanweiYoubian">
<el-input v-model="ysjl.shiyongdanweiYoubian" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="累计运行小时" prop="leijiyunxingxiaoshi">
<el-input v-model="param.leijiyunxingxiaoshi" :disabled="edit">
<template slot="append">
h
</template>
</el-input>
</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="danweineibubianhao">
<el-input v-model="ysjl.danweineibubianhao" :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="18">
<el-form-item label="制造单位" prop="zhizaodanwei">
<el-input v-model="ysjl.zhizaodanwei" :disabled="edit" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<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-col :span="9">
<el-form-item label="投用日期" prop="touyongriqi">
<el-date-picker v-model="ysjl.touyongriqi" 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="shigongdanwei">
<el-input v-model="ysjl.shigongdanwei" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="出厂编号" prop="chanpinbianhao">
<el-input v-model="ysjl.chanpinbianhao" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="上次检验日期" prop="shangcijianyanriqi">
<el-date-picker v-model="param.shangcijianyanriqi" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%;" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>性能参数</legend>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="额定蒸发量" prop="edingzhengfaliang">
<el-input v-model="param.edingzhengfaliang">
<template slot="append">
t/h
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="再热蒸汽流量" prop="zairezhengqiliuliang">
<el-input v-model="param.zairezhengqiliuliang">
<template slot="append">
t/h
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="过热器出口压力" prop="guoreqichukouyali">
<el-input v-model="param.guoreqichukouyali" @change="grqckylChange">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="锅筒工作压力" prop="guotonggongzuoyali">
<el-input v-model="param.guotonggongzuoyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="锅筒工作温度" prop="guotonggongzuowendu">
<el-input v-model="param.guotonggongzuowendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="过热器出口温度" prop="guoreqichukouwendu">
<el-input v-model="param.guoreqichukouwendu" @change="grqckwdChange">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="再热器出口压力" prop="zaireqichukouyali">
<el-input v-model="param.zaireqichukouyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="再热器出口温度" prop="zaireqichukouwendu">
<el-input v-model="param.zaireqichukouwendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="给水压力" prop="geishuiyali">
<el-input v-model="param.geishuiyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="再热器进口压力" prop="zaireqijinkouyali">
<el-input v-model="param.zaireqijinkouyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="再热器进口温度" prop="zaireqijinkouwendu">
<el-input v-model="param.zaireqijinkouwendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="给水温度" prop="geishuiwendu">
<el-input v-model="param.geishuiwendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>允许使用参数</legend>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="压力" prop="yali">
<el-input v-model="param.yali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="温度" prop="wendu">
<el-input v-model="param.wendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="介质" prop="jiezhi">
<el-input v-model="param.jiezhi" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="其他" prop="qita">
<el-input v-model="param.qita" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>检查与校验</legend>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="检验依据" prop="jianyanyiju">
<el-input v-model="ysjl.jianyanyiju" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" style="height: 110px;">
<el-col :span="18">
<el-form-item label="缺陷及其处理:" prop="wentijizai">
<el-input v-model="param.wentijizai" :rows="4" :disabled="edit" type="textarea" palceholder="检验发现的缺陷位置、性质、程度及处理意见(必要时附图)" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="9">
<el-form-item label="检验人员" prop="jianyanrenyuan">
<el-input v-model="jianyanrenyuan" disabled />
<el-input v-show="false" v-model="ysjl.jianyanrenyuan" />
</el-form-item>
</el-col>
<el-col :span="9">
<sign-name :jianyanrenyuan="jianyanrenyuan" :ysjl="ysjl" @setSignValue="singNameValue" />
</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" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%;" @change="getXcjyrq" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="检验结论" prop="jianyanjielun">
<el-select v-model="ysjl.jianyanjielun" :disabled="edit" type="text" placeholder="请选择" style="width:232px">
<el-option label="符合要求" value="符合要求" />
<el-option label="基本符合要求" value="基本符合要求" />
<el-option label="不符合要求" value="不符合要求" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="下次检验日期" prop="xiacijianyanriqi">
<el-input v-if="ysjl.jianyanjielun === '不符合要求'" v-model="ysjl.xiacijianyanriqishuoming" type="text" disabled="true" />
<el-date-picker v-else v-model="ysjl.xiacijianyanriqi" type="date" placeholder="选择日期" editable style="width: 100%;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" style="height: 110px;">
<el-col :span="18">
<el-form-item label="说明:" prop="beizhu">
<el-input v-model="ysjl.beizhu" :rows="4" :disabled="edit" type="textarea" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
</el-form>
</el-tab-pane>
<el-tab-pane label="外部检验原始记录附页" name="second">
<el-table :data="sybjSData" :span-method="tableJs.mergeColRows" border stripe style="width:90%">
<el-table-column type="index" align="center" width="50" label="序号" />
<el-table-column align="center" prop="jianyanxiang" label="项目" />
<el-table-column align="left" prop="jianyanneirong" label="检验项目" />
<el-table-column align="center" prop="beizhu" label="检验结果">
<template slot-scope="scope">
<el-select v-model="scope.row.beizhu" :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-tab-pane label="外部检验原始记录附页" name="third">
<el-table :data="sybjTData" :span-method="tableJs.mergeColRows" border stripe style="width:90%">
<el-table-column type="index" align="center" width="50" label="序号" />
<el-table-column align="center" prop="jianyanxiang" label="项目" />
<el-table-column align="left" prop="jianyanneirong" label="检验项目" />
<el-table-column align="center" prop="beizhu" label="检验结果">
<template slot-scope="scope">
<el-select v-model="scope.row.beizhu" :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-tab-pane v-if="state !== 'create'" label="检验收费情况" name="jysfqk">
<complex-bill v-if="complexShow" ref="bill" :ysjl="ysjl" />
</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 Ft from '@/views/ysjl/1000/common/glft'
import ComplexBill from '@/views/chargeBill/components/complex'
import tableJs from '@/utils/table'
export default {
name: 'GlDzwbYsjl',
components: { SignName, Sticky, Ft, ComplexBill },
data() {
return {
jlbh1: 'GDW(',
jlbh2: new Date().getFullYear(),
jlbh3: ')',
jlbh4: '',
ysjl: {},
param: {},
state: this.$route.query.state,
jianyanrenyuan: '',
departmentId: this.$store.getters.departmentId,
isRepeat: false,
edit: false,
sybjSData: [],
sybjTData: [],
tableData: [],
users: [],
checkedTab: 'first',
cols: [
{
name: 'jianyanxiang', // el-table-column prop=''
getValue(row) { //
return row.jianyanxiang
}
}
],
ysjlId: this.$route.query.id,
complexShow: false
}
},
computed: {
jilubianhao: function() {
let bianhao
if (this.ysjl.jilubianhao === null || this.ysjl.jilubianhao === undefined || this.ysjl.jilubianhao === '') {
return this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + this.jlbh4
} else {
bianhao = this.ysjl.jilubianhao
}
return this.judgeRepeat(bianhao, this.ysjl.id)
}
},
watch: {
jlbh4: function(val) {
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + 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() {
const jyxmtable = [1, 2]
if (this.state === 'create') {
this.initYsjl()
this.getMaxBh()
for (let i = 0; i < jyxmtable.length; i++) {
this.getJyxm(jyxmtable[i])
}
} else {
this.getYsjl(this.$route.query.id)
for (let i = 0; i < jyxmtable.length; i++) {
this.getJyxmById(jyxmtable[i])
}
}
this.getUserList()
if (this.param.yali === '' || this.param.yali === undefined) {
this.$set(this.param, 'yali', this.param.guoreqichukouyali)
}
},
beforeDestroy() {
window.removeEventListener('beforeunload', this.beforeunloadHandler, false)
},
methods: {
//
singNameValue(data) {
this.jianyanrenyuan = data.name
this.ysjl.jianyanrenyuan = data.id
if (this.state !== 'create') {
this.common.signName(this.ysjl.id, this.ysjl.jianyanrenyuan)
Utils.$emit('ysjl-list')
}
},
//
getMaxBh() {
const aheadPart = this.jlbh1 + '' + this.jlbh2 + '' + this.jlbh3
this.api({
url: '/ysjl/gainCurrentBh',
method: 'get',
params: {
aheadPart: aheadPart + '-',
hinderPart: ''
}
}).then(data => {
this.jlbh4 = data
})
},
initYsjl() {
this.api({
url: '/ysjl/initYsjl',
method: 'post',
data: {
modelId: this.$route.query.modelId,
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.getXcjyrq()
this.ysjl.jilubianhao = this.jilubianhao
this.ysjl.baogaobianhao = null //
this.ysjl.jianyanjielun = '符合要求'
this.ysjl.jigouhezhunzhenghao = process.env.VUE_APP_HZZBH
this.ysjl.jianyanyiju = '《锅炉安全技术监察规程》、《锅炉定期检验规则》'
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/getYsjlById',
method: 'get',
params: {
ysjlId: id
}
}).then(data => {
this.ysjl = data.ysjl
this.complexShow = true
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 = {}
url = '/jyxm/getCyJyxm'
data = {
templateId: this.$route.query.modelId,
order: sort
}
this.api({
url: url,
method: 'get',
params: data
}).then(data => {
switch (sort) {
case 1:
for (let i = 0; i < data.length; i++) {
const sybjSRow = {}
this.$set(sybjSRow, 'id', data[i].id)
this.$set(sybjSRow, 'jianyanxiang', data[i].jianyanxiang)
this.$set(sybjSRow, 'jianyanneirong', data[i].jianyanneirong)
this.$set(sybjSRow, 'beizhu', '√')
this.sybjSData.push(sybjSRow)
}
break
case 2:
for (let i = 0; i < data.length; i++) {
const sybjTRow = {}
this.$set(sybjTRow, 'id', data[i].id)
this.$set(sybjTRow, 'jianyanxiang', data[i].jianyanxiang)
this.$set(sybjTRow, 'jianyanneirong', data[i].jianyanneirong)
this.$set(sybjTRow, 'beizhu', '√')
this.sybjTData.push(sybjTRow)
}
break
default:
break
}
tableJs.getData(this.cols, this.rows, data)
})
},
getJyxmById(sort) {
const url = '/jyxm/getCyJyxmByYsjl'
const data = {
ysjlId: this.ysjlId,
isReport: false,
order: sort
}
this.api({
url: url,
method: 'get',
params: data
}).then(data => {
switch (sort) {
case 1:
this.sybjSData = data
break
case 2:
this.sybjTData = data
break
default:
break
}
tableJs.getData(this.cols, this.rows, data)
})
},
// id,
getProp: function(data) {
const retData = []
for (let i = 0; i < data.length; i++) {
const retRow = {}
this.$set(retRow, 'id', data[i].id)
this.$set(retRow, 'beizhu', data[i].beizhu)
retData.push(retRow)
}
return retData
},
getUserList() {
this.api({
url: '/user/getAllUserList',
method: 'get'
}).then(data => {
this.users = data
})
},
saveYsjl: function(operation) {
if (operation === 'add') {
if (this.jlbh4.trim() === '') {
this.$message({ message: '请先确认记录编号是否完整!', type: 'warning' })
return false
}
}
//
this.tableData = []
this.tableData.push(this.getProp(this.sybjSData))
this.tableData.push(this.getProp(this.sybjTData))
let url = ''
this.ysjl.bglx = 1
this.ysjl.cjState = 'ysjl'
this.ysjl.zfState = '0'
this.ysjl.jianyanxiangmu = 'dzwb'
this.ysjl.jlprintState = 0
if (this.ysjl.jianyanjielun === '不符合要求') {
this.ysjl.xiacijianyanriqi = null
}
if (operation === 'add') {
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + this.jlbh4
url = '/ysjl/saveYsjl'
} 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
}
url = '/ysjl/updateYsjl'
} else if (operation === 'upd') {
url = '/ysjl/updateYsjl'
}
if (this.isRepeat) {
this.$message({ message: '记录编号重复,请先修改记录编号再保存', type: 'error' })
return false
} else {
this.$refs['ysjl'].validate(valid => {
if (valid) {
const jyxm = JSON.stringify(this.tableData)
this.api({
url: url,
method: 'post',
data: {
ysjl: this.ysjl,
param: this.param,
jyxm: jyxm,
bgjyxm: jyxm,
flag: operation
}
}).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
// 16
this.common.updStateByNew(this.ysjl.renwuId, '2', false)
//
this.$store.dispatch('delCurrentViews', {
view: this.$route,
$router: this.$router
})
// this.$router.push({
// path: '/ysjl/1000/wb/dzwb' + '/' + this.ysjl.id,
// query: { state: 'update', id: this.ysjl.id, departmentId: this.ysjl.departmentId, jianyanrenyuan: this.ysjl.jianyanrenyuan }
// })
} else if (operation === 'upd') {
this.$message({ message: '更新成功', type: 'success' })
// this.$refs.bill.updateChargeBill()
//
this.$router.push({
query: merge(this.$route.query, { 'jianyanrenyuan': this.ysjl.jianyanrenyuan })
})
} 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() {
var dateTemp = this.ysjl.jianyanjieshuriqi.split('-')
const xcjyrq = new Date((Number(dateTemp[0]) + 1) + '-' + dateTemp[1] + '-' + dateTemp[2])
this.ysjl.xiacijianyanriqi = xcjyrq.setDate(xcjyrq.getDate() - 1)
},
grqckylChange(val) {
this.param.yali = val
},
grqckwdChange(val) {
this.param.wendu = val
},
// F5
beforeunloadHandler(e) {
e.returnValue = ''
}
}
}
</script>

149
src/views/ysjl/1000/dj/wb/gywb.vue

@ -15,7 +15,6 @@
<el-button v-if="state !== 'create'" type="warning" icon="el-icon-view" size="medium" @click="common.viewYsjl(ysjl.id, 'YSJL', false)">
预览
</el-button>
<Ft v-if="state !== 'create'" :state="state" :ysjl="ysjl" :ysjl-id="Number(ysjlId ? ysjlId : 0)" :department-id="Number(departmentId ? departmentId : 0)" style="margin-left: 10px;" />
</div>
</sticky>
<el-tabs v-model="checkedTab" type="card">
@ -145,17 +144,11 @@
<fieldset>
<legend>性能参数</legend>
<el-row :gutter="20">
<el-col :span="6">
<el-form-item label="额定出力" prop="edingchuli">
<el-input v-model="param.edingchuli" />
<el-col :span="9">
<el-form-item label="额定蒸发量(热功率)" prop="edingzhengfaliang">
<el-input v-model="param.edingzhengfaliang" />
</el-form-item>
</el-col>
<el-col :span="3">
<el-select v-model="param.edinggonglv" :disabled="edit" type="text" placeholder="请选择">
<el-option label="t/h" value="t/h" />
<el-option label="MW" value="MW" />
</el-select>
</el-col>
<el-col :span="9">
<el-form-item label="额定压力" prop="edingyali">
<el-input v-model="param.edingyali">
@ -298,7 +291,7 @@
</el-row>
<el-row :gutter="20" style="height: 110px;">
<el-col :span="18">
<el-form-item label="说明:" prop="beizhu">
<el-form-item label="其它缺陷情况或说明:" prop="beizhu">
<el-input v-model="ysjl.beizhu" :rows="4" :disabled="edit" type="textarea" />
</el-form-item>
</el-col>
@ -307,33 +300,15 @@
</el-form>
</el-tab-pane>
<el-tab-pane label="检查项目" name="second">
<el-table :data="sybjSData" border stripe style="width:90%">
<el-table-column align="center" prop="C1" label="检查项目" />
<el-table-column align="center" prop="C2" label="检查结果">
<template slot-scope="scope">
<el-select v-model="scope.row.C2" :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-column align="center" prop="C3" label="检查项目" />
<el-table-column align="center" prop="C4" label="检查结果">
<template slot-scope="scope">
<el-select v-model="scope.row.C4" :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 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="100" />
<el-table-column align="center" prop="jianyanmu" width="100" />
<el-table-column align="left" prop="jianyanneirong" />
</el-table-column>
<el-table-column align="center" prop="C5" label="检查项目" />
<el-table-column align="center" prop="C6" label="检查结果">
<el-table-column align="center" prop="D1" label="检验结果">
<template slot-scope="scope">
<el-select v-model="scope.row.C6" :disabled="edit" type="text" placeholder="请选择" style="width: 100%;" filterable allow-create default-first-option>
<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="×" />
@ -344,9 +319,6 @@
</el-table>
<br>
</el-tab-pane>
<el-tab-pane v-if="state !== 'create'" label="检验收费情况" name="jysfqk">
<complex-bill v-if="complexShow" ref="bill" :ysjl="ysjl" />
</el-tab-pane>
</el-tabs>
</div>
</template>
@ -355,11 +327,9 @@ import Sticky from '@/components/Sticky'
import SignName from '@/views/common/SignName'
import Utils from '@/utils/contact'
import merge from 'webpack-merge'
import Ft from '@/views/ysjl/1000/common/glft'
import ComplexBill from '@/views/chargeBill/components/complex'
export default {
name: 'GlGywbYsjl',
components: { SignName, Sticky, Ft, ComplexBill },
components: { SignName, Sticky },
data() {
return {
jlbh1: 'GW(',
@ -379,7 +349,36 @@ export default {
users: [],
checkedTab: 'first',
ysjlId: this.$route.query.id,
complexShow: false
//
//
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', // el-table-column prop=''
getValue(row) { //
return row.jianyanxiang
}
},
{
name: 'jianyanmu', // el-table-column prop=''
getValue(row) { //
return row.jianyanmu
}
}
]
}
},
computed: {
@ -413,7 +412,7 @@ export default {
this.getJyxm(1)
} else {
this.getYsjl(this.$route.query.id)
this.getJyxmById()
this.getJyxm(1)
}
this.getUserList()
},
@ -435,7 +434,7 @@ export default {
url: '/ysjl/initYsjl',
method: 'post',
data: {
modelId: this.$route.query.modelId,
templateId: this.$route.query.templateId,
renwuId: this.$route.query.renwuId,
neibuleibie: this.$route.query.neibuleibie,
sblbdm: this.$route.query.sblbdm,
@ -451,7 +450,6 @@ export default {
this.ysjl.baogaobianhao = null //
this.ysjl.jianyanjielun = '符合要求'
this.ysjl.jigouhezhunzhenghao = process.env.VUE_APP_HZZBH
this.ysjl.jianyanyiju = '《锅炉安全技术监察规程》、《锅炉定期检验规则》'
this.ysjl.beizhu = '/'
this.ysjl.xiacijianyanriqishuoming = '/'
this.ysjl.anzhuangdidian = this.ysjl.shiyongdanweiDizhi
@ -476,7 +474,6 @@ export default {
}
}).then(data => {
this.ysjl = data.ysjl
this.complexShow = true
if (this.ysjl.jianyanrenyuan !== null && this.ysjl.jianyanrenyuan.length > 0) {
this.jianyanrenyuan = this.common.convertCnName(this.ysjl.jianyanrenyuan)
}
@ -520,7 +517,15 @@ export default {
if (this.state === 'create') {
url = '/jyxm/getCyJyxm'
data = {
templateId: this.$route.query.modelId,
templateId: this.$route.query.templateId,
order: sort
}
} else {
url = '/jyxm/getCyJyxmByYsjl'
data = {
ysjlId: this.ysjlId,
isReport: false,
templateId: this.$route.query.templateId,
order: sort
}
}
@ -529,29 +534,28 @@ export default {
method: 'get',
params: data
}).then(data => {
for (let i = 0; i < data.length; i++) {
const sybjSRow = {}
this.$set(sybjSRow, 'C1', data[i].jianyanxiang)
this.$set(sybjSRow, 'C2', '√')
this.$set(sybjSRow, 'C3', data[i].jianyanneirong)
this.$set(sybjSRow, 'C4', '√')
this.$set(sybjSRow, 'C5', data[i].xiangmuleibie)
this.$set(sybjSRow, 'C6', '√')
this.sybjSData.push(sybjSRow)
}
if (this.state === 'create') {
data.forEach(row => {
this.sybjSData.push({
id: row.id,
jianyanxiang: row.jianyanxiang,
jianyanmu: row.jianyanmu,
jianyanneirong: row.jianyanneirong,
D1: row.jianyanjieguo
})
})
} else {
data.forEach(row => {
this.sybjSData.push({
id: row.id,
jianyanxiang: row.jianyanxiang,
jianyanmu: row.jianyanmu,
jianyanneirong: row.jianyanneirong,
D1: row.d1
})
})
},
getJyxmById() {
this.api({
url: '/jyxm/getJyxmInfoByYsjl',
method: 'get',
params: {
ysjlId: this.ysjlId,
type: 'jyxm'
}
}).then(data => {
data = JSON.parse(data)
this.sybjSData = data[0]
this.tableJs.getData(this.cols, this.rows, this.sybjSData)
})
},
getUserList() {
@ -571,7 +575,12 @@ export default {
}
//
this.tableData = []
this.tableData.push(this.sybjSData)
this.tableData.push(this.sybjSData.map(row => {
return {
id: row.id,
D1: row.D1
}
}))
let url = ''
this.ysjl.bglx = 1
this.ysjl.cjState = 'ysjl'

172
src/views/ysjl/1000/fenxiang/dxt.vue

@ -1,172 +0,0 @@
<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">
保存
</el-button>
<el-button v-if="state === 'update'" type="success" icon="el-icon-edit" size="medium" @click="saveYsjl">
更新
</el-button>
</div>
</sticky>
<el-form ref="ysjl" :model="ysjl" class="el-form" label-position="right" label-width="130px">
<fieldset>
<legend>附图</legend>
<span v-if="state === 'create'" style="color: red;font-size: 26px;">请先保存再上传图片</span>
<el-upload
v-if="state !== 'create'"
ref="upload"
:on-preview="handlePictureCardPreview"
:file-list="fileList"
:before-upload="beforeUpload"
:before-remove="beforeRemove"
:on-remove="handleRemove"
action="123"
accept="image/png,image/gif,image/jpg,image/jpeg"
list-type="picture-card"
>
<i class="el-icon-plus" />
</el-upload>
<el-dialog :visible.sync="dialogVisible">
<img :src="dialogImageUrl" width="100%" alt="">
</el-dialog>
</fieldset>
</el-form>
</div>
</template>
<script>
import Sticky from '@/components/Sticky'
export default {
name: 'GlDxtYsjl',
components: { Sticky },
data() {
return {
ysjl: {},
param: {},
fileList: [],
state: '',
dialogVisible: false,
dialogImageUrl: '',
sort: 1
}
},
created() {
this.getInfo()
},
methods: {
getInfo() {
this.api({
url: '/fx/getFxByYsjlId',
method: 'get',
params: {
ysjlId: this.$route.query.id,
jyxm: this.$route.query.jyxm
}
}).then(data => {
this.ysjl = data.ysjl
this.state = 'create'
if (data.param !== null && data.param !== undefined) {
//
this.state = 'update'
this.param = data.param
this.fileList = (data.param.imagePath === null || data.param.imagePath === '') ? JSON.parse('[]') : JSON.parse(data.param.imagePath)
if (this.fileList.length > 0) {
for (let i = 0; i < this.fileList.length; i++) {
this.fileList[i].url = process.env.VUE_APP_IMG_URL + '1000/dxt/' + this.fileList[i].name
}
}
}
})
},
beforeRemove(file, fileList) {
if (file.status === 'success') {
return this.$confirm('图片删除后将不能恢复,是否确定删除该图片?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(data => {
return null
}).catch(e => {
e()
})
}
},
handleRemove(file, fileList) {
if (fileList.length > 0) {
const imgList = []
for (let i = 0; i < fileList.length; i++) {
const img = {}
this.$set(img, 'name', fileList[i].name)
imgList.push(img)
}
fileList = imgList
} else {
fileList = ''
}
const imgPath = fileList === '' ? '' : JSON.stringify(fileList)
if (file.status === 'success') {
this.preview({
url: '/upload/delImg',
method: 'post',
data: {
ysjlId: this.ysjl.id,
delFileName: file.name,
imgPath: imgPath,
sort: this.sort
}
})
}
this.param.imagePath = fileList
},
beforeUpload(file) {
const isJPG = file.type === 'image/jpeg' || file.type === 'image/png'
if (!isJPG) {
this.$message.error('只能上传jpg/png格式的图片')
return false
}
const fd = new FormData()
fd.append('file', file)
fd.append('ysjlId', this.ysjl.id)
fd.append('sort', this.sort)
this.preview({
url: '/upload/uploadImg',
method: 'post',
data: fd
}).then(data => {
this.fileList = JSON.parse(data)
this.param.imagePath = data
for (let i = 0; i < this.fileList.length; i++) {
this.fileList[i].url = process.env.VUE_APP_IMG_URL + '1000/dxt/' + this.fileList[i].name
}
})
},
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url
this.dialogVisible = true
},
saveYsjl() {
if (this.fileList.length <= 0) {
this.ysjl.flowstatus = null
//
} else {
this.ysjl.flowstatus = 4
}
this.ysjl.bglx = 3
this.param.ysjlId = this.ysjl.id
this.api({
url: '/fx/saveFx',
method: 'post',
data: {
ysjl: this.ysjl,
jyxm: this.ysjl.jianyanxiangmu,
fxObj: this.param
}
}).then(data => {
this.$message({ message: '操作成功', type: 'success' })
this.state = 'update'
})
}
}
}
</script>

167
src/views/ysjl/1000/jj/2.0/fenxiang/aqfj.vue

@ -1,167 +0,0 @@
<template>
<div class="app-container">
<sticky style="margin-bottom: 10px;">
<btn ref="btn" />
</sticky>
<el-form ref="ysjl" :model="ysjl" class="el-form" label-position="right" label-width="130px">
<fieldset>
<legend>基本信息</legend>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="记录编号" prop="jilubianhao">
<el-input v-model="ysjl.jilubianhao" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="报检单位" prop="baojiandanwei">
<el-input v-model="param.baojiandanwei" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
<!--<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="产品名称" prop="shebeimingcheng">
<el-input v-model="ysjl.shebeimingcheng" :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="18" style="height: 130px;">
<el-form-item label="备注" prop="beizhu">
<el-input v-model="ysjl.beizhu" :disabled="edit" :rows="5" type="textarea" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<el-table ref="tableData" :data="tableData" :span-method="tableJs.mergeColRows" border style="margin-top: 10px;width:90%">
<el-table-column type="index" align="center" width="60" label="序号" />
<el-table-column align="center" label="审查内容">
<el-table-column align="center" prop="jianyanxiang" />
<el-table-column align="center" prop="jianyanmu" />
</el-table-column>
<el-table-column align="center" prop="C1" label="安全阀">
<template slot-scope="scope">
<el-input v-model="scope.row.C1" :disabled="edit" />
</template>
</el-table-column>
<el-table-column align="center" prop="C2" label="压力表">
<template slot-scope="scope">
<el-input v-model="scope.row.C2" :disabled="edit" />
</template>
</el-table-column>
<el-table-column align="center" prop="C3" label="温度计">
<template slot-scope="scope">
<el-input v-model="scope.row.C3" :disabled="edit" />
</template>
</el-table-column>
<el-table-column align="center" prop="C4" label="液位计">
<template slot-scope="scope">
<el-input v-model="scope.row.C4" :disabled="edit" />
</template>
</el-table-column>
<el-table-column align="center" prop="C5" label="超压保护装置">
<template slot-scope="scope">
<el-input v-model="scope.row.C5" :disabled="edit" />
</template>
</el-table-column>
<el-table-column align="center" prop="C6" label="熄火保护装置">
<template slot-scope="scope">
<el-input v-model="scope.row.C6" :disabled="edit" />
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</template>
<script>
import Sticky from '@/components/Sticky'
import btn from '@/views/common/FxButton'
export default {
name: 'RqZbgTbl',
components: { Sticky, btn },
data() {
return {
ysjl: {},
param: {},
tableData: [],
edit: false,
state: '',
cols: [
{
name: 'jianyanxiang', // el-table-column prop=''
getValue(row) { //
return row.jianyanxiang
}
}
]
}
},
created() {
this.getInfo()
},
methods: {
getInfo() {
this.api({
url: '/fx/getFxByYsjlId',
method: 'get',
params: {
ysjlId: this.$route.query.id,
jyxm: this.$route.query.jyxm
}
}).then(data => {
this.ysjl = data.ysjl
this.state = 'create'
if (data.param !== null && data.param !== undefined) {
//
this.state = 'update'
this.param = data.param
this.tableData = JSON.parse(data.param.fubiao) ? JSON.parse(data.param.fubiao) : JSON.parse('[]')
} else {
// TODO
}
if (this.ysjl.flowstatus === 4) {
this.state = 'finish'
this.edit = true
}
this.$refs.btn.getParentInfo(this.ysjl, this.param, null, this.tableData, this.state, this.$route.query.jyxm, true, false)
if (this.state === 'create') {
this.getJyxm(1)
}
})
},
//
getJyxm(sort) {
this.api({
url: '/jyxm/getCyJyxm',
method: 'get',
params: {
templateId: this.ysjl.modelId,
order: sort
}
}).then(data => {
this.tableData = []
data.forEach(row => {
this.tableData.push({
jianyanxiang: row.jianyanxiang,
jianyanmu: row.jianyanmu,
C7: undefined,
C8: undefined
})
})
this.tableJs.getData(this.cols, undefined, this.tableData)
this.$refs.btn.getParentInfo(this.ysjl, this.param, null, this.tableData, this.state, this.$route.query.jyxm, true, false)
})
},
beforeSaveBuildData() {
// TODO
}
}
}
</script>

254
src/views/ysjl/1000/jj/2.0/fenxiang/bhcd.vue

@ -1,254 +0,0 @@
<!--壁厚测定-->
<template>
<div class="app-container">
<sticky style="margin-bottom: 10px;">
<btn ref="btn" />
</sticky>
<el-form ref="ysjl" :model="ysjl" class="el-form" label-position="right" label-width="130px">
<fieldset>
<legend>基本信息</legend>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="记录编号" prop="jilubianhao">
<el-input v-model="ysjl.jilubianhao" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="报检单位" prop="baojiandanwei">
<el-input v-model="param.baojiandanwei" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
<!--<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="部件名称" prop="shebeimingcheng">
<el-input v-model="ysjl.shebeimingcheng" :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="celiangyiqixinghao">
<el-input v-model="param.celiangyiqixinghao" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="试块厚度" prop="shikuaihoudu">
<el-input v-model="param.shikuaihoudu" :disabled="edit">
<template slot="append">
mm
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="结论" prop="jianyanjielun">
<el-input v-model="ysjl.jianyanjielun" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>测点部位示意图</legend>
<span v-if="state === 'create'" style="color: red;font-size: 26px;">请在原始记录保存后上传示意图</span>
<pictureUpload v-else ref="picture" :info="sytInfo" @changed="changed" />
</fieldset>
<fieldset>
<legend>测厚记录</legend>
<el-button type="success" icon="el-icon-download" size="mini" style="margin-right: 10px;" @click="common.downloadTemplate('xxx.xlsx')">
下载导入模板
</el-button>
<el-upload
:show-file-list="false"
:before-upload="uploadTableData"
style="float: left; margin-right: 10px;"
action=""
>
<el-button type="primary" size="mini" icon="el-icon-upload" :disabled="edit">
导入数据
</el-button>
</el-upload>
<el-button v-if="state !== 'bgView'" type="success" size="mini" icon="el-icon-circle-plus-outline" :disabled="edit" @click="addChRow()">
添加
</el-button>
<el-button v-if="state !== 'bgView'" type="danger" size="mini" icon="el-icon-remove-outline" :disabled="edit" @click="delChRow()">
删除
</el-button>
<el-table id="myTable" ref="tableData" :data="tableData" border style="width:100%;margin-top: 5px;">
<el-table-column type="selection" width="40px" />
<el-table-column type="index" width="60px" label="序号" align="center" />
<el-table-column align="center" prop="C1" width="100px" label="测点编号">
<template slot-scope="scope">
<el-input v-model="scope.row.C1" :disabled="edit" size="mini" />
</template>
</el-table-column>
<el-table-column align="center" prop="C2" width="200px" label="测点设计厚度(mm)">
<template slot-scope="scope">
<el-input v-model="scope.row.C2" :disabled="edit" size="mini" />
</template>
</el-table-column>
<el-table-column align="center" prop="C3" width="200px" label="测点实测厚度(mm)">
<template slot-scope="scope">
<el-input v-model="scope.row.C3" :disabled="edit" size="mini" />
</template>
</el-table-column>
<el-table-column align="center" prop="C4" width="100px" label="测点编号">
<template slot-scope="scope">
<el-input v-model="scope.row.C4" :disabled="edit" size="mini" />
</template>
</el-table-column>
<el-table-column align="center" prop="C5" width="200px" label="测点设计厚度(mm)">
<template slot-scope="scope">
<el-input v-model="scope.row.C5" :disabled="edit" size="mini" />
</template>
</el-table-column>
<el-table-column align="center" prop="C6" width="200px" label="测点实测厚度(mm)">
<template slot-scope="scope">
<el-input v-model="scope.row.C6" :disabled="edit" size="mini" />
</template>
</el-table-column>
</el-table>
</fieldset>
</el-form>
</div>
</template>
<script>
import Sticky from '@/components/Sticky'
import btn from '@/views/common/FxButton'
import pictureUpload from '@/components/Upload'
export default {
name: 'RqZbgBhcd2100',
components: { Sticky, btn, pictureUpload },
data() {
return {
ysjl: {},
param: {},
tableData: [],
delRowIndex: [],
state: '',
edit: false,
info: {
ysjlId: this.$route.query.id,
jyxm: this.$route.query.jyxm,
limit: 1
},
fileList: [],
sytInfo: {
ysjlId: this.$route.query.id,
jyxm: 'bhcd',
flowstatus: 4
}
}
},
created() {
this.getInfo()
},
methods: {
getInfo() {
this.api({
url: '/fx/getFxByYsjlId',
method: 'get',
params: {
ysjlId: this.$route.query.id,
jyxm: this.$route.query.jyxm
}
}).then(data => {
this.ysjl = data.ysjl
this.state = 'create'
if (data.param !== null && data.param !== undefined) {
//
this.state = 'update'
this.param = data.param
this.tableData = JSON.parse(data.param.fubiao) === null ? JSON.parse('[]') : JSON.parse(data.param.fubiao)
this.fileList = JSON.parse(data.param.imagePath) === null ? JSON.parse('[]') : JSON.parse(data.param.imagePath)
} else {
this.param = {}
}
if (this.ysjl.flowstatus === 4) {
this.state = 'finish'
this.edit = true
}
this.$refs.btn.getParentInfo(this.ysjl, this.param, null, this.tableData, this.state, this.$route.query.jyxm, true, false)
this.fileList.forEach(row => {
row.url = process.env.VUE_APP_IMG_URL + '1000/bhcd/' + row.name
})
this.$refs.picture.getChange(this.ysjl.shebeizhongleidaima, this.state, this.fileList, 1, this.ysjl.id)
})
},
addChRow: function() {
const d = { C1: '', C2: '', C3: '', C4: '', C5: '', C6: '' }
this.tableData.push(d)
setTimeout(() => {
this.$refs.tableData.setCurrentRow(d)
}, 10) //
},
delChRow: function() {
if (this.delRowIndex.length === 0) {
this.$message({
type: 'error',
message: '请选中需要删除的数据!'
})
return false
} else {
// delRowIndexindex
this.delRowIndex.sort(function(x, y) {
if (x < y) {
return 1
}
if (x > y) {
return -1
}
return 0
})
for (let i = 0; i < this.delRowIndex.length; i++) {
this.tableData.splice(this.delRowIndex[i], 1)
}
this.$refs.tableData.clearSelection()
this.delRowIndex = []
}
},
//
onRowClick(row) {
this.$refs.tableData.toggleRowSelection(row)
},
tableRowClassName({ row, rowIndex }) {
row.index = rowIndex
},
handleSelectionChange(val) {
this.delRowIndex = []
for (let i = 0; i < val.length; i++) {
this.delRowIndex.push(val[i].index)
}
},
//
uploadTableData(file) {
this.common.uploadTableData(file, this.tableData)
},
changed(item) {
this.fileList = item
},
/**
* 数据构建
*/
beforeSaveBuildData() {
// TODO
}
}
}
</script>
<style>
#myTable .el-input__inner{
padding: 0px 5px;
text-align: center;
}
</style>

120
src/views/ysjl/1000/jj/2.0/fenxiang/sjwjsc.vue

@ -1,120 +0,0 @@
<template>
<div class="app-container">
<sticky style="margin-bottom: 10px;">
<btn ref="btn" />
</sticky>
<el-form ref="ysjl" :model="ysjl" class="el-form" label-position="right" label-width="130px">
<fieldset>
<legend>基本信息</legend>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="记录编号" prop="jilubianhao">
<el-input v-model="ysjl.jilubianhao" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="报检单位" prop="baojiandanwei">
<el-input v-model="param.baojiandanwei" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
<!--<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="产品名称" prop="shebeimingcheng">
<el-input v-model="ysjl.shebeimingcheng" :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>-->
</fieldset>
<el-table ref="tableData" :data="tableData" border style="margin-top: 10px;width:90%">
<el-table-column align="center" prop="C1" label="审查内容" />
<el-table-column align="center" prop="C2" label="审查情况">
<template slot-scope="scope">
<el-input v-model="scope.row.C2" :disabled="edit" placeholder="请输入内容" />
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</template>
<script>
import Sticky from '@/components/Sticky'
import btn from '@/views/common/FxButton'
export default {
name: 'RqZbgTbl',
components: { Sticky, btn },
data() {
return {
ysjl: {},
param: {},
tableData: [],
edit: false,
state: ''
}
},
created() {
this.getInfo()
},
methods: {
getInfo() {
this.api({
url: '/fx/getFxByYsjlId',
method: 'get',
params: {
ysjlId: this.$route.query.id,
jyxm: this.$route.query.jyxm
}
}).then(data => {
this.ysjl = data.ysjl
this.state = 'create'
if (data.param !== null && data.param !== undefined) {
//
this.state = 'update'
this.param = data.param
this.tableData = this.param.fubiao ? JSON.parse(this.param.fubiao) : []
} else {
// TODO
}
if (this.ysjl.flowstatus === 4) {
this.state = 'finish'
this.edit = true
}
this.$refs.btn.getParentInfo(this.ysjl, this.param, null, this.tableData, this.state, this.$route.query.jyxm, true, false)
if (this.state === 'create') {
this.getJyxm(1)
}
})
},
//
getJyxm(sort) {
this.api({
url: '/jyxm/getCyJyxm',
method: 'get',
params: {
templateId: this.ysjl.modelId,
order: sort
}
}).then(data => {
this.tableData = []
data.forEach(row => {
this.tableData.push({
C1: row.jianyanxiang,
C2: row.jianyanjieguo
})
})
this.$refs.btn.getParentInfo(this.ysjl, this.param, null, this.tableData, this.state, this.$route.query.jyxm, true, false)
})
},
beforeSaveBuildData() {
// TODO
}
}
}
</script>

133
src/views/ysjl/1000/jj/2.0/fenxiang/wgjh.vue

@ -1,133 +0,0 @@
<template>
<div class="app-container">
<sticky style="margin-bottom: 10px;">
<btn ref="btn" />
</sticky>
<el-form ref="ysjl" :model="ysjl" class="el-form" label-position="right" label-width="130px">
<fieldset>
<legend>基本信息</legend>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="记录编号" prop="jilubianhao">
<el-input v-model="ysjl.jilubianhao" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="报检单位" prop="baojiandanwei">
<el-input v-model="param.baojiandanwei" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
<!--<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="产品名称" prop="shebeimingcheng">
<el-input v-model="ysjl.shebeimingcheng" :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="18">
<el-form-item label="结论" prop="jianyanjielun">
<el-input v-model="ysjl.jianyanjielun" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<el-table ref="tableData" :data="tableData" border style="margin-top: 10px;width:90%">
<el-table-column align="center" prop="C1" label="检查项目" />
<el-table-column align="center" prop="C2" label="检验内容">
<template slot-scope="scope">
<el-input v-model="scope.row.C2" :disabled="edit" placeholder="请输入内容" />
</template>
</el-table-column>
<el-table-column align="center" prop="C3" label="检查结果">
<template slot-scope="scope">
<el-input v-model="scope.row.C3" :disabled="edit" placeholder="请输入内容" />
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</template>
<script>
import Sticky from '@/components/Sticky'
import btn from '@/views/common/FxButton'
export default {
name: 'RqZbgTbl',
components: { Sticky, btn },
data() {
return {
ysjl: {},
param: {},
tableData: [],
edit: false,
state: ''
}
},
created() {
this.getInfo()
},
methods: {
getInfo() {
this.api({
url: '/fx/getFxByYsjlId',
method: 'get',
params: {
ysjlId: this.$route.query.id,
jyxm: this.$route.query.jyxm
}
}).then(data => {
this.ysjl = data.ysjl
this.state = 'create'
if (data.param !== null && data.param !== undefined) {
//
this.state = 'update'
this.param = data.param
this.tableData = JSON.parse(data.param.fubiao) ? JSON.parse(data.param.fubiao) : JSON.parse('[]')
} else {
// TODO
}
if (this.ysjl.flowstatus === 4) {
this.state = 'finish'
this.edit = true
}
this.$refs.btn.getParentInfo(this.ysjl, this.param, null, this.tableData, this.state, this.$route.query.jyxm, true, false)
if (this.state === 'create') {
this.getJyxm(1)
}
})
},
//
getJyxm(sort) {
this.api({
url: '/jyxm/getCyJyxm',
method: 'get',
params: {
templateId: this.ysjl.modelId,
order: sort
}
}).then(data => {
this.tableData = []
data.forEach(row => {
this.tableData.push({
C1: row.jianyanxiang,
C2: row.jianyanneirong,
C3: row.jianyanjieguo
})
})
this.$refs.btn.getParentInfo(this.ysjl, this.param, null, this.tableData, this.state, this.$route.query.jyxm, true, false)
})
},
beforeSaveBuildData() {
// TODO
}
}
}
</script>

697
src/views/ysjl/1000/jj/2.0/gzwx.vue

@ -1,697 +0,0 @@
<!--锅炉改造和重大修理-->
<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')">
预览
</el-button>
<Ft v-if="state !== 'create'" :state="state" :ysjl="ysjl" :ysjl-id="Number(ysjlId ? ysjlId : 0)" :department-id="Number(departmentId ? departmentId : 0)" style="margin-left: 10px;" />
</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="130px">
<fieldset>
<legend>基本信息</legend>
<el-row :gutter="25">
<el-col v-if="state === 'create'" :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:80px" disabled />-
<el-input v-model="jlbh4" style="width:85px" @blur="judgeRepeat(jlbh1 + jlbh2 + jlbh3 + '-' + jlbh4 , 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="shiyongdengjibianhao">
<el-input v-model="ysjl.shiyongdengjibianhao" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="设备代码" prop="zhucedaima">
<el-input v-model="ysjl.zhucedaima" type="text" />
</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" 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" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="联系电话" prop="shiyongdanweiDianhua">
<el-input v-model="ysjl.shiyongdanweiDianhua" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="单位邮编" prop="shiyongdanweiYoubian">
<el-input v-model="ysjl.shiyongdanweiYoubian" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="锅炉型号" prop="guigexinghao">
<el-input v-model="ysjl.guigexinghao" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="制造单位" prop="zhizaodanwei">
<el-input v-model="ysjl.zhizaodanwei" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<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-col :span="9">
<el-form-item label="额定蒸发量(热功率)" prop="edingzhengfaliang" label-width="170px">
<el-input v-model="param.edingzhengfaliang" type="text">
<template slot="append">
t/h(MW)
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="产品编号" prop="chanpinbianhao">
<el-input v-model="ysjl.chanpinbianhao" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="额定压力" prop="edingyali">
<el-input v-model="param.edingyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="额定温度" prop="edingwendu">
<el-input v-model="param.edingwendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="设备类别" prop="shebeileibiedaima">
<el-select v-model="ysjl.shebeileibiedaima" placeholder="设备类别" style="width: 100%" @change="getSbpzList">
<el-option v-for="item in sblbList" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="允许工作压力" prop="gongzuoyali">
<el-input v-model="param.gongzuoyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="允许工作温度" prop="yunxugongzuowendu">
<el-input v-model="param.yunxugongzuowendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="设备品种(名称)" prop="shebeipinzhongdaima">
<el-select v-model="ysjl.shebeipinzhongdaima" placeholder="设备品种" style="width: 100%" @change="setSbpz">
<el-option v-for="item in sbpzList" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="水(耐)压试验压力" prop="shuiyashiyanyali" label-width="150px">
<el-input v-model="param.shuiyashiyanyali" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="使用压力" prop="shiyongyali">
<el-input v-model="param.shiyongyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="内部编号" prop="danweineibubianhao">
<el-input v-model="ysjl.danweineibubianhao" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="施工单位" prop="shigongdanwei">
<el-input v-model="ysjl.shigongdanwei" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="告知书编号" prop="gaozhibianhao">
<el-input v-model="param.gaozhibianhao" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="许可证编号" prop="shigongxukezheng">
<el-input v-model="ysjl.shigongxukezheng" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="许可级别" prop="shigongxukezhengjibie">
<el-input v-model="ysjl.shigongxukezhengjibie" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="施工单位联系人" prop="shigongdanweiLianxiren">
<el-input v-model="ysjl.shigongdanweiLianxiren" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="施工单位联系电话" prop="shigongdanweiDianhua">
<el-input v-model="ysjl.shigongdanweiDianhua" type="text" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>检查与校验</legend>
<el-row :gutter="20" style="text-align:left;margin-left: 50px;font-size: 18px;color: #606266;line-height: 40px;font-weight: bolder;">
根据中华人民共和国特种设备安全法特种设备安全监察条例的规定该锅炉
<el-select v-model="ysjl.shigongleibie" placeholder="请选择" style="width: 120px;">
<el-option v-for="item in sglbList" :key="item" :label="item" :value="item" />
</el-select>
</el-row>
<el-row :gutter="20" style="margin-top: 20px;">
<el-col :span="9">
<el-form-item label="检验日期" prop="jianyanjieshuriqi">
<el-date-picker v-model="ysjl.jianyanjieshuriqi" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="9">
<el-form-item label="检验人员" prop="jianyanrenyuan">
<el-input v-model="jianyanrenyuan" disabled />
<el-input v-show="false" v-model="ysjl.jianyanrenyuan" />
</el-form-item>
</el-col>
<el-col :span="9">
<sign-name :jianyanrenyuan="jianyanrenyuan" :ysjl="ysjl" @setSignValue="signNameValue" />
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18" style="height: 130px;">
<el-form-item label="锅炉修理、改造的主要内容及范围:" prop="weihujianxiuqingkuangshuoming" label-width="230px">
<el-input v-model="param.wentijizai" :rows="5" :disabled="edit" type="textarea" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
</el-form>
</el-tab-pane>
<el-tab-pane label="锅炉改造和重大修理监督检验项目表" name="second">
<el-table ref="bgfyData" :data="bgfyData" :span-method="tableJs.mergeColRows" border stripe @row-click="onRowClick">
<el-table-column type="selection" width="55" />
<el-table-column type="index" align="center" width="50" label="序号" />
<el-table-column align="center" prop="jianyanxiang" width="200" label="检验项目" />
<el-table-column align="center" prop="jianyanjieguo" label="检查结果">
<template slot-scope="scope">
<span v-if="scope.$index === 4">
保压时间<el-input v-model="param.baoyashijian" style="width: 25%;" />min,
()压试验压力<el-input v-model="param.shuiyashiyanyali" style="width: 25%;" />MPa
</span>
<el-autocomplete v-else v-model="scope.row.jianyanjieguo" :fetch-suggestions="querySearch" :disabled="edit" style="width: 100%;" />
</template>
</el-table-column>
<el-table-column align="center" prop="beizhu" label="备注">
<template slot-scope="scope">
<el-input v-model="scope.row.beizhu" :disabled="edit" placeholder="请输入内容" />
</template>
</el-table-column>
</el-table>
<el-form class="el-form" style="margin-top: 10px;">
<el-row :gutter="20">
<el-col :span="18" style="height: 170px;">
<el-form-item label="其它记录内容:" prop="beizhu">
<el-input v-model="ysjl.beizhu" :rows="5" :disabled="edit" type="textarea" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-tab-pane>
<el-tab-pane v-if="state !== 'create'" label="检验收费情况" name="jysfqk">
<complex-bill v-if="complexShow" ref="bill" :ysjl="ysjl" />
</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 Ft from '@/views/ysjl/1000/common/glft'
import ComplexBill from '@/views/chargeBill/components/complex'
export default {
name: 'GlGzwxYsjl',
components: { SignName, Sticky, Ft, ComplexBill },
data() {
return {
jlbh1: 'GX(',
jlbh2: new Date().getFullYear(),
jlbh3: ')',
ysjl: {},
param: {},
state: this.$route.query.state,
jianyanrenyuan: '',
departmentId: this.$route.query.departmentId,
isRepeat: false,
edit: false,
bgfyData: [],
tableData: [],
checkedTab: 'first',
sblbList: [],
sbpzList: [],
ysjlId: this.$route.query.id,
jyjgOption: [{ value: '符合要求' }, { value: '不符合要求' }, { value: '无此项' }],
sglbList: ['改造', '重大修理'],
complexShow: false
}
},
computed: {
jilubianhao: function() {
let bianhao
if (this.ysjl.jilubianhao === null || this.ysjl.jilubianhao === undefined || this.ysjl.jilubianhao === '') {
return this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + this.jlbh4
} else {
bianhao = this.ysjl.jilubianhao
}
return this.judgeRepeat(bianhao, this.ysjl.id)
}
},
watch: {
jlbh4: function(val) {
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + val
this.judgeRepeat(this.ysjl.jilubianhao, this.ysjl.id)
},
jilubianhao: function(newValue) {
this.judgeRepeat(newValue, this.ysjl.id)
}
},
created() {
if (this.state === 'create') {
this.api({
url: '/ysjl/initYsjl',
method: 'post',
data: {
modelId: this.$route.query.modelId,
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.ysjl.jianyanjielun = '符合要求'
this.ysjl.baogaojielun = '符合'
this.ysjl.jigouhezhunzhenghao = process.env.VUE_APP_HZZBH
this.ysjl.beizhu = '/'
this.changeEdgl()
this.getSbList('1000', this.ysjl.shebeileibiedaima, 3)
const sglb = this.sglbList.filter(item => {
return item === this.ysjl.shigongleibie
})
if (sglb.length) {
this.$set(this.ysjl, 'shigongleibie', sglb[0])
} else {
this.$set(this.ysjl, 'shigongleibie', '改造')
}
})
this.$set(this.param, 'weihujianxiuqingkuangshuoming', '/')
this.getSbList('1000', undefined, 2)
} else {
this.getYsjl(this.$route.query.id)
this.getSbList('1000', undefined, 2)
}
//
if (!this.ysjl.jilubianhao) {
this.getMaxBh()
}
this.getJyxm(1)
},
methods: {
//
signNameValue(data) {
this.ysjl.jianyanrenyuan = data.id
this.jianyanrenyuan = data.name
if (this.state !== 'create') {
this.common.signName(this.ysjl.id, this.ysjl.jianyanrenyuan)
Utils.$emit('ysjl-list')
}
},
//
getMaxBh() {
const aheadPart = this.jlbh1 + '' + this.jlbh2 + '' + this.jlbh3
this.api({
url: '/ysjl/gainCurrentBh',
method: 'get',
params: {
aheadPart: aheadPart + '-',
hinderPart: ''
}
}).then(data => {
this.jlbh4 = data
})
},
getSbpzList(val) {
this.changeEdgl()
let obj = {}
obj = this.sblbList.find((item) => { // sblbList
return item.value === val //
})
if (obj) {
this.ysjl.shebeileibie = obj.label
}
this.ysjl.shebeipinzhongdaima = ''
this.ysjl.shebeipinzhong = ''
if (val) {
this.getSbList('1000', val, 3)
}
},
setSbpz(val) {
let obj = {}
obj = this.sbpzList.find((item) => { // userList
return item.value === val //
})
this.ysjl.shebeipinzhong = obj.label
},
getSbList(sbzl, sblb, level) {
this.api({
url: '/sedirectory/getList',
method: 'get',
params: {
sbzl: sbzl,
sblb: sblb,
level: level
}
}).then(data => {
switch (level) {
case 2:
this.sblbList = data
return ''
case 3:
this.sbpzList = data
return ''
default:
this.sbzlList = data
return ''
}
})
},
getYsjl(id) {
this.api({
url: '/ysjl/getYsjlById',
method: 'get',
params: {
ysjlId: id
}
}).then(data => {
this.ysjl = data.ysjl
this.complexShow = true
if (this.ysjl.jianyanrenyuan !== null && this.ysjl.jianyanrenyuan.length > 0) {
this.jianyanrenyuan = this.common.convertCnName(this.ysjl.jianyanrenyuan)
}
this.getParam(this.ysjl.id, this.ysjl.shebeizhongleidaima)
if (this.ysjl.shebeileibiedaima) {
this.changeEdgl()
this.getSbList('1000', this.ysjl.shebeileibiedaima, 3)
}
})
},
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.modelId,
order: sort
}
} else {
url = '/jyxm/getCyJyxmByYsjl'
data = {
ysjlId: this.ysjlId,
isReport: false,
order: sort
}
}
this.api({
url: url,
method: 'get',
params: data
}).then(data => {
switch (sort) {
case 1:
this.bgfyData = data
break
}
})
},
onRowClick(row) {
this.$refs.bgfyData.toggleRowSelection(row)
},
/**
* 获取表格中的id, 不为空的检验结果和备注
*/
getProp: function(data) {
const retData = []
for (let i = 0; i < data.length; i++) {
const retRow = {}
retRow.id = data[i].id
if (data[i].jianyanjieguo) {
if (i === 4) {
retRow.jianyanjieguo = '保压时间:' + (this.param.baoyashijian || '') + 'min,水(耐)压试验压力:' + (this.param.shuiyashiyanyali || '') + 'MPa'
} else {
retRow.jianyanjieguo = data[i].jianyanjieguo
}
}
if (data[i].beizhu) {
retRow.beizhu = data[i].beizhu
}
retData.push(retRow)
}
return retData
},
saveYsjl: function(operation) {
if (operation === 'add') {
if (!this.jlbh4.trim()) {
this.$message({ message: '请先确认记录编号是否完整!', type: 'warning' })
return false
}
}
this.tableData = []
this.tableData.push(this.getProp(this.bgfyData))
let url = ''
this.ysjl.bglx = 1
this.ysjl.cjState = 'ysjl'
this.ysjl.zfState = '0'
this.ysjl.jlprintState = 0
if (operation === 'add') {
url = '/ysjl/saveYsjl'
this.ysjl.jilubianhao = this.jlbh1 + '' + this.jlbh2 + '' + this.jlbh3 + '-' + this.jlbh4
this.ysjl.jianyanxiangmu = 'gzwx'
} else if (operation === 'build') {
if (!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
}
url = '/ysjl/updateYsjl'
} else if (operation === 'upd') {
url = '/ysjl/updateYsjl'
}
if (this.isRepeat) {
this.$message({ message: '记录编号重复,请先修改记录编号再保存', type: 'error' })
return false
} else {
this.$refs['ysjl'].validate(valid => {
if (valid) {
const jyxm = JSON.stringify(this.tableData)
this.api({
url: url,
method: 'post',
data: {
ysjl: this.ysjl,
param: this.param,
jyxm: jyxm,
flag: operation
}
}).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
})
// this.$router.push({
// path: '/ysjl/1000/gz/gzwx/' + this.ysjl.id,
// query: { state: 'update', id: this.ysjl.id, departmentId: this.ysjl.departmentId, jianyanrenyuan: this.ysjl.jianyanrenyuan }
// })
} 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-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
}
})
},
querySearch(queryString, cb) {
cb(this.jyjgOption)
},
changeBgjl(val) {
if (val === '符合要求') {
this.ysjl.baogaojielun = '符合'
} else {
this.ysjl.baogaojielun = '不符合'
}
},
/**
* 改变额定功率蒸汽锅炉是t/h其他的是MW
*/
changeEdgl() {
if (this.ysjl.shebeileibiedaima === '1100') {
this.param.edinggonglv = 't/h'
} else {
this.param.edinggonglv = 'MW'
}
}
}
}
</script>

716
src/views/ysjl/1000/jj/2.0/jkjd.vue

@ -1,716 +0,0 @@
<!--锅炉改造和重大修理-->
<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 === 'update'" type="primary" icon="el-icon-circle-check-outline" size="medium" @click="toAddJyfa">
添加检验方案
</el-button>
<el-button v-if="state !== 'create'" type="warning" icon="el-icon-view" size="medium" @click="common.viewYsjl(ysjl.id, 'YSJL')">
预览
</el-button>
<Ft v-if="state !== 'create'" :state="state" :ysjl="ysjl" :ysjl-id="Number(ysjlId ? ysjlId : 0)" :department-id="Number(departmentId ? departmentId : 0)" style="margin-left: 10px;" />
</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="130px">
<fieldset>
<legend>基本信息</legend>
<el-row :gutter="25">
<el-col v-if="state === 'create'" :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:80px" disabled />-
<el-input v-model="jlbh4" style="width:85px" @blur="judgeRepeat(jlbh1 + jlbh2 + jlbh3 + '-' + jlbh4 , 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="shiyongdanwei" label-width="160px">
<el-input v-model="ysjl.shiyongdanwei" :disabled="edit" />
</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" />
</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" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="联系电话" prop="shiyongdanweiDianhua">
<el-input v-model="ysjl.shiyongdanweiDianhua" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="单位邮编" prop="shiyongdanweiYoubian">
<el-input v-model="ysjl.shiyongdanweiYoubian" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="锅炉型号" prop="guigexinghao">
<el-input v-model="ysjl.guigexinghao" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="产品编号" prop="chanpinbianhao">
<el-input v-model="ysjl.chanpinbianhao" />
</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="18">
<el-form-item label="制造单位" prop="zhizaodanwei">
<el-input v-model="ysjl.zhizaodanwei" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="额定蒸发量(热功率)" prop="edingzhengfaliang" label-width="160px">
<el-input v-model="param.edingzhengfaliang">
<template slot="append">
t/hMW
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="额定压力" prop="edingyali">
<el-input v-model="param.edingyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="额定温度" prop="edingwendu">
<el-input v-model="param.edingwendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="制造许可证编号" prop="zhizaoxukezhengbianhao">
<el-input v-model="ysjl.zhizaoxukezhengbianhao" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="制造单位地址" prop="zhizaodanweiDizhi">
<el-input v-model="ysjl.zhizaodanweiDizhi" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="制造许可证级别" prop="zhizaoxukezhengjibie">
<el-input v-model="ysjl.zhizaoxukezhengjibie" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="产品图号" prop="chanpintuhao">
<el-input v-model="param.chanpintuhao" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="设备类别" prop="shebeileibiedaima">
<el-select v-model="ysjl.shebeileibiedaima" placeholder="设备类别" style="width: 100%" @change="getSbpzList">
<el-option v-for="item in sblbList" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="设备品种(名称)" prop="shebeipinzhongdaima">
<el-select v-model="ysjl.shebeipinzhongdaima" placeholder="设备品种" style="width: 100%" @change="setSbpz">
<el-option v-for="item in sbpzList" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="监督检验地点" prop="jiandujianyandizhi">
<el-input v-model="param.jiandujianyandizhi" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>检查与校验</legend>
<el-row :gutter="20" style="text-align:left;margin-left: 50px;font-size: 18px;color: #606266;line-height: 40px;font-weight: bolder;">
按照中华人民共和国特种设备安全法特种设备安全监察条例的规定
<el-select v-model="ysjl.shigongleibie" placeholder="请选择" style="width: 120px;">
<el-option v-for="item in sglbList" :key="item" :label="item" :value="item" />
</el-select> <br>
产品经我机构监督检验安全性能
<el-select v-model="ysjl.baogaojielun" placeholder="请选择" style="width: 100px;" @change="changeJyjl">
<el-option label="符合" value="符合" />
<el-option label="不符合" value="不符合" />
</el-select>
</el-row>
<el-row :gutter="20" style="margin-top: 20px;">
<el-col :span="9">
<el-form-item label="检验日期" prop="jianyanjieshuriqi">
<el-date-picker v-model="ysjl.jianyanjieshuriqi" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="9">
<el-form-item label="检验人员" prop="jianyanrenyuan">
<el-input v-model="jianyanrenyuan" disabled />
<el-input v-show="false" v-model="ysjl.jianyanrenyuan" />
</el-form-item>
</el-col>
<el-col :span="9">
<sign-name :jianyanrenyuan="jianyanrenyuan" :ysjl="ysjl" @setSignValue="signNameValue" />
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18" style="height: 150px;">
<el-form-item label="监督检验范围说明:" prop="beizhu" label-width="230px">
<el-input v-model="ysjl.beizhu" :rows="5" :disabled="edit" type="textarea" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
</el-form>
</el-tab-pane>
<el-tab-pane label="安全性能监督检验项目表" name="second">
<el-form ref="ysjl2" :model="ysjl" class="el-form" label-position="right" label-width="130px">
<fieldset>
<legend>基本信息</legend>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="报检号" prop="baojianbianhao">
<el-input v-model="param.baojianbianhao" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="合约号" prop="heyuebianhao">
<el-input v-model="param.heyuebianhao" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="设备品种(名称)" prop="shebeipinzhongdaima">
<el-select v-model="ysjl.shebeipinzhongdaima" placeholder="设备品种" style="width: 100%" disabled @change="setSbpz">
<el-option v-for="item in sbpzList" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="产品编号" prop="chanpinbianhao">
<el-input v-model="ysjl.chanpinbianhao" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="制造国名" prop="zhizaoguojia">
<el-input v-model="param.zhizaoguojia" />
</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%;" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="制造单位" prop="zhizaodanwei">
<el-input v-model="ysjl.zhizaodanwei" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="制造、检验规范标准(指和约签定的规范标准)" prop="jianyanyiju" label-width="320px">
<el-input v-model="ysjl.jianyanyiju" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="设计压力" prop="yali">
<el-input v-model="param.yali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="设计温度" prop="wendu">
<el-input v-model="param.wendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="介质" prop="jiezhi">
<el-input v-model="param.jiezhi" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<el-table ref="jyxmData" :data="jyxmData" :span-method="tableJs.mergeColRows" border stripe style="width:90%;margin-top: 10px;">
<el-table-column type="index" align="center" label="序号" width="60px" />
<el-table-column align="center" label="检验项" prop="jianyanxiang" />
<el-table-column align="center" label="检验目" prop="jianyanmu" />
<el-table-column align="center" label="检验结果" prop="jianyanjieguo">
<template slot-scope="scope">
<el-input v-model="scope.row.jianyanjieguo" />
</template>
</el-table-column>
<el-table-column align="center" label="备注" prop="beizhu">
<template slot-scope="scope">
<el-input v-model="scope.row.beizhu" />
</template>
</el-table-column>
</el-table>
</el-form>
</el-tab-pane>
<el-tab-pane v-if="state !== 'create'" label="检验收费情况" name="jysfqk">
<complex-bill v-if="complexShow" ref="bill" :ysjl="ysjl" />
</el-tab-pane>
</el-tabs>
<el-dialog :visible.sync="jyfaDialogVisible" title="添加检验方案" width="600px" @close="closeJyfaDialog">
<jyfa ref="jyfa" :info="info" />
</el-dialog>
</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 Ft from '@/views/ysjl/1000/common/glft'
import ComplexBill from '@/views/chargeBill/components/complex'
import jyfa from '@/views/bggl/addJyfa'
export default {
name: 'GlJkjdYsjl',
components: { SignName, Sticky, Ft, ComplexBill, jyfa },
data() {
return {
jlbh1: 'GJK(',
jlbh2: new Date().getFullYear(),
jlbh3: ')',
jlbh4: '',
ysjl: {},
param: {},
state: this.$route.query.state,
jianyanrenyuan: '',
departmentId: this.$route.query.departmentId,
isRepeat: false,
edit: false,
checkedTab: 'first',
sblbList: [],
sbpzList: [],
ysjlId: this.$route.query.id,
sglbList: ['锅炉', '部件', '组件'],
complexShow: false,
jyxmData: [],
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', // el-table-column prop=''
getValue(row) {
return row.jianyanxiang
}
},
{
name: 'jianyanmu', // el-table-column prop=''
getValue(row) {
return row.jianyanmu
}
}
],
//
jyfaDialogVisible: false,
info: {
modelId: this.$route.query.modelId,
sbzldm: this.$route.query.sbzldm,
sblbdm: this.$route.query.sblbdm,
ysjlId: this.$route.query.id,
departmentId: this.$route.query.departmentId,
jylb: this.$route.query.jylb,
nblb: this.$route.query.neibuleibie,
type: 'YSJL'
}
}
},
computed: {
jilubianhao: function() {
let bianhao
if (!this.ysjl.jilubianhao) {
return this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + this.jlbh4
} else {
bianhao = this.ysjl.jilubianhao
}
return this.judgeRepeat(bianhao, this.ysjl.id)
}
},
watch: {
jlbh4: function(val) {
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + val
this.judgeRepeat(this.ysjl.jilubianhao, this.ysjl.id)
},
jilubianhao: function(newValue) {
this.judgeRepeat(newValue, this.ysjl.id)
}
},
created() {
if (this.state === 'create') {
this.api({
url: '/ysjl/initYsjl',
method: 'post',
data: {
modelId: this.$route.query.modelId,
renwuId: this.$route.query.renwuId,
neibuleibie: this.$route.query.neibuleibie
}
}).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.ysjl.jianyanjielun = '合格'
this.ysjl.baogaojielun = '符合'
this.ysjl.jigouhezhunzhenghao = process.env.VUE_APP_HZZBH
this.ysjl.beizhu = '/'
this.getSbpzList(this.ysjl.shebeileibiedaima)
const sglb = this.sglbList.filter(item => {
return item === this.ysjl.shigongleibie
})
if (sglb.length) {
this.$set(this.ysjl, 'shigongleibie', sglb[0])
} else {
this.$set(this.ysjl, 'shigongleibie', '锅炉')
}
//
this.getMaxBh()
})
this.$set(this.param, 'weihujianxiuqingkuangshuoming', '/')
this.getSblbList()
} else {
this.getYsjl(this.$route.query.id)
this.getSbList('1000', undefined, 2)
}
this.getJyxm(1)
},
methods: {
toAddJyfa() {
this.jyfaDialogVisible = true
},
closeJyfaDialog() {
this.jyfaDialogVisible = false
},
//
signNameValue(data) {
this.ysjl.jianyanrenyuan = data.id
this.jianyanrenyuan = data.name
if (this.state !== 'create') {
this.common.signName(this.ysjl.id, this.ysjl.jianyanrenyuan)
Utils.$emit('ysjl-list')
}
},
//
getMaxBh() {
const aheadPart = this.jlbh1 + '' + this.jlbh2 + '' + this.jlbh3
this.api({
url: '/ysjl/gainCurrentBh',
method: 'get',
params: {
aheadPart: aheadPart + '-',
hinderPart: ''
}
}).then(data => {
this.jlbh4 = data
})
},
getSblbList(val) {
this.ysjl.shebeileibiedaima = ''
this.sbpzList = []
this.ysjl.shebeipinzhongdaima = ''
this.getSbList('1000', undefined, 2)
},
getSbpzList(val) {
let obj = {}
obj = this.sblbList.find((item) => { // sblbList
return item.value === val //
})
if (obj) {
this.ysjl.shebeileibie = obj.label
}
this.ysjl.shebeipinzhongdaima = ''
this.ysjl.shebeipinzhong = ''
if (val) {
this.getSbList('1000', val, 3)
}
},
setSbpz(val) {
let obj = {}
obj = this.sbpzList.find((item) => { // userList
return item.value === val //
})
this.ysjl.shebeipinzhong = obj.label
},
getSbList(sbzl, sblb, level) {
this.api({
url: '/sedirectory/getList',
method: 'get',
params: {
sbzl: sbzl,
sblb: sblb,
level: level
}
}).then(data => {
switch (level) {
case 2:
this.sblbList = data
return ''
case 3:
this.sbpzList = data
return ''
default:
this.sbzlList = data
return ''
}
})
},
getYsjl(id) {
this.api({
url: '/ysjl/getYsjlById',
method: 'get',
params: {
ysjlId: id
}
}).then(data => {
this.ysjl = data.ysjl
this.complexShow = true
if (this.ysjl.jianyanrenyuan !== null && this.ysjl.jianyanrenyuan.length > 0) {
this.jianyanrenyuan = this.common.convertCnName(this.ysjl.jianyanrenyuan)
}
this.getParam(this.ysjl.id, this.ysjl.shebeizhongleidaima)
if (this.ysjl.shebeileibiedaima) {
this.getSbList('1000', this.ysjl.shebeileibiedaima, 3)
}
//
if (!this.ysjl.jilubianhao) {
this.getMaxBh()
}
})
},
getParam(ysjlId, sbzldm) {
// id
this.api({
url: '/ysjl/getParamByYsjlId',
method: 'get',
params: {
ysjlId: ysjlId,
sbzldm: sbzldm
}
}).then(data => {
this.param = data
})
},
//
getJyxm(sort) {
this.jyxmController.getJyxm(this.$route.query.modelId, this.$route.query.id, sort, this.state, false).then(data => {
switch (sort) {
case 1:
this.jyxmData = data
this.jyxmController.initJjyJyxm(this.state, this.jyxmData)
this.tableJs.getData(this.cols, this.rows, this.jyxmData)
break
}
})
},
saveYsjl: function(operation) {
if (operation === 'add') {
if (!this.jlbh4.trim()) {
this.$message({ message: '请先确认记录编号是否完整!', type: 'warning' })
return false
}
}
this.tableData = []
this.tableData.push(this.jyxmData.map(row => {
return {
id: row.id,
jianyanjieguo: row.jianyanjieguo,
beizhu: row.beizhu
}
}))
let url = ''
this.ysjl.bglx = 1
this.ysjl.cjState = 'ysjl'
this.ysjl.zfState = '0'
this.ysjl.jlprintState = 0
if (operation === 'add') {
url = '/ysjl/saveYsjl'
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + this.jlbh4
this.ysjl.jianyanxiangmu = 'jkjd'
} else if (operation === 'build') {
if (!this.ysjl.jianyanrenyuan) {
this.$message({
type: 'error',
message: '请先签名再生成报告!'
})
if (this.ysjl.sfdId === null || this.ysjl.sfdId === '') {
this.$message({
type: 'error',
message: '请先追加或者创建收费单后在尝试!'
})
return false
}
return false
}
url = '/ysjl/updateYsjl'
} else if (operation === 'upd') {
url = '/ysjl/updateYsjl'
}
if (this.isRepeat) {
this.$message({ message: '记录编号重复,请先修改记录编号再保存', type: 'error' })
return false
} else {
this.$refs['ysjl'].validate(valid => {
if (valid) {
this.api({
url: url,
method: 'post',
data: {
ysjl: this.ysjl,
param: this.param,
jyxm: JSON.stringify(this.tableData),
flag: operation
}
}).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
})
// this.$router.push({
// path: '/ysjl/1000/jj/jkjd/' + this.ysjl.id,
// query: { state: 'update', id: this.ysjl.id, departmentId: this.ysjl.departmentId, jianyanrenyuan: this.ysjl.jianyanrenyuan }
// })
} 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-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
}
})
},
changeJyjl(val) {
if (val === '符合') {
this.ysjl.jianyanjielun = '合格'
} else {
this.ysjl.jianyanjielun = '合格'
}
}
}
}
</script>

915
src/views/ysjl/1000/jj/2.0/sg.vue

@ -1,915 +0,0 @@
<!--散装锅炉安装监督检验-->
<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 type="primary" size="medium" @click="Signjyxm">
<svg-icon icon-class="sign" />
检验项目批量签名
</el-button>
<el-button type="danger" icon="el-icon-delete" size="medium" @click="signClear">
批量清除签名
</el-button>
<el-button type="success" size="medium" icon="el-icon-edit" @click="batchUpdDate">
批量修改日期
</el-button>
<el-button v-if="state !== 'create'" type="warning" icon="el-icon-view" size="medium" @click="common.viewYsjl(ysjl.id, 'YSJL')">
预览
</el-button>
<Ft v-if="state !== 'create'" :state="state" :ysjl="ysjl" :ysjl-id="Number(ysjlId ? ysjlId : 0)" :department-id="Number(departmentId ? departmentId : 0)" style="margin-left: 10px;" />
</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="130px">
<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" disabled />-
<el-input v-model="jlbh4" style="width:85px" @blur="judgeRepeat(jlbh1 + jlbh2 + jlbh3 + '-' + jlbh4 , 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="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" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="邮政编码" prop="shiyongdanweiYoubian">
<el-input v-model="ysjl.shiyongdanweiYoubian" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="使用单位联系人" prop="shiyongdanweiLianxiren">
<el-input v-model="ysjl.shiyongdanweiLianxiren" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="联系电话" prop="shiyongdanweiDianhua">
<el-input v-model="ysjl.shiyongdanweiDianhua" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="锅炉型号" prop="guigexinghao">
<el-input v-model="ysjl.guigexinghao" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="制造单位" prop="zhizaodanwei">
<el-input v-model="ysjl.zhizaodanwei" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<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-col :span="9">
<el-form-item label="额定蒸发量(热功率)" prop="edingzhengfaliang" label-width="160px">
<el-input v-model="param.edingzhengfaliang">
<template slot="append">
t/hMW
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="产品编号" prop="chanpinbianhao">
<el-input v-model="ysjl.chanpinbianhao" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="设备代码" prop="shebeidaima">
<el-input v-model="ysjl.shebeidaima" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="额定压力" prop="edingyali">
<el-input v-model="param.edingyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="额定温度" prop="edingwendu">
<el-input v-model="param.edingwendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="设备类别" prop="shebeileibiedaima">
<el-select v-model="ysjl.shebeileibiedaima" filterable allow-create default-first-option style="width: 100%" @change="getSbpzList">
<el-option v-for="item in sblbList" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="允许工作压力" prop="gongzuoyali">
<el-input v-model="param.gongzuoyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="允许工作温度" prop="yunxugongzuowendu">
<el-input v-model="param.yunxugongzuowendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="设备品种" prop="shebeipinzhongdaima">
<el-select v-model="ysjl.shebeipinzhongdaima" filterable allow-create default-first-option style="width: 100%" @change="setSbpz">
<el-option v-for="item in sbpzList" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="水(耐)压试验压力" prop="shuiyashiyanyali" label-width="150px">
<el-input v-model="param.shuiyashiyanyali" type="text">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="使用压力" prop="shiyongyali">
<el-input v-model="param.shiyongyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="内部编号" prop="danweineibubianhao">
<el-input v-model="ysjl.danweineibubianhao" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="告知书编号" prop="gaozhibianhao">
<el-input v-model="param.gaozhibianhao" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="施工单位" prop="shigongdanwei">
<el-input v-model="ysjl.shigongdanwei" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="许可级别" prop="shigongxukezhengjibie">
<el-input v-model="ysjl.shigongxukezhengjibie" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="许可证编号" prop="shigongxukezheng">
<el-input v-model="ysjl.shigongxukezheng" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="施工单位联系人" prop="shigongdanweiLianxiren">
<el-input v-model="ysjl.shigongdanweiLianxiren" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="施工单位联系电话" prop="shigongdanweiDianhua">
<el-input v-model="ysjl.shigongdanweiDianhua" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="建设项目环境影响评价批复文件" prop="huanjingbiaozhun" label-width="220px">
<el-input v-model="param.huanjingbiaozhun" type="text" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>检验信息</legend>
<el-row :gutter="20" style="text-align:left;margin-left: 50px;font-size: 18px;color: #606266;line-height: 40px;font-weight: bolder;">
根据中华人民共和国特种设备安全法特种设备安全监察条例的规定该锅炉 安装改造重大修理经我机构监督检验符合锅炉安全技术规程规定的基本安 全要求特发此证书
</el-row>
<el-row :gutter="20" style="margin-top: 20px;">
<el-col :span="9">
<!-- 开始安装日期就是开工告知日期 -->
<el-form-item label="开始安装日期" prop="gaozhiriqi">
<el-date-picker v-model="param.gaozhiriqi" type="date" value-format="yyyy年MM月dd日" placeholder="选择日期" style="width: 100%;" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="水压试验日期" prop="shiyanriqi">
<el-date-picker v-model="param.shiyanriqi" type="date" placeholder="选择日期" style="width: 75%;" />
<el-button type="primary" title="同步检验项中第1大项到第9大项的监检日期" icon="el-icon-refresh" size="mini" @click="syncRq(0, 38, param.shiyanriqi)" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="试运行完毕日期" prop="shiyunxingriqi">
<el-date-picker v-model="param.shiyunxingriqi" type="date" value-format="yyyy年MM月dd日" placeholder="选择日期" style="width: 75%;" />
<el-button type="primary" title="同步检验项中第10大项到第12大项的监检日期" icon="el-icon-refresh" size="mini" @click="syncRq(44, bgfyData.length, param.shiyunxingriqi)" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="安装资料送审日期" prop="anzhuangziliaosongshenriqi">
<el-date-picker v-model="param.anzhuangziliaosongshenriqi" 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="jianyanjieshuriqi">
<el-date-picker v-model="ysjl.jianyanjieshuriqi" type="date" 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" type="date" placeholder="选择日期" style="width: 100%;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="9">
<el-form-item label="检验人员" prop="jianyanrenyuan">
<el-input v-model="jianyanrenyuan" disabled />
<el-input v-show="false" v-model="ysjl.jianyanrenyuan" />
</el-form-item>
</el-col>
<el-col :span="9">
<sign-name :jianyanrenyuan="jianyanrenyuan" :ysjl="ysjl" @setSignValue="signNameValue" />
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18" style="height: 130px;">
<el-form-item label="其他情况说明:" prop="beizhu">
<el-input v-model="ysjl.beizhu" :rows="5" :disabled="edit" type="textarea" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
</el-form>
</el-tab-pane>
<el-tab-pane label="散装锅炉安装监督检验项目表" name="second">
<el-form class="el-form" label-width="150px">
<el-row :gutter="20">
<el-col :span="18" style="height: 170px;">
<el-form-item label="其它记录的内容" prop="shuoming">
<el-input v-model="param.shuoming" :rows="5" :disabled="edit" type="textarea" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18" style="height: 200px;">
<el-form-item label="附件" prop="fujian">
<el-checkbox v-model="checkAll" :indeterminate="isIndeterminate" @change="handleCheckAllChange">
全选
</el-checkbox>
<br>
<el-checkbox
v-for="(item, index) in param.fujian"
:key="item"
v-model="param.fujian[index]"
:true-label="'☑' + getFujianOption(item)"
:false-label="'□' + getFujianOption(item)"
@change="handleCheckedChange"
>
{{ getFujianOption(item) }}
</el-checkbox>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table ref="bgfyData" :data="bgfyData" :span-method="tableJs.mergeColRows" border stripe style="width:90%" @row-click="onRowClick">
<el-table-column type="selection" width="55" prop="checkbox" />
<el-table-column type="index" align="center" width="50" label="序号" />
<el-table-column align="center" label="监检项目">
<el-table-column align="center" prop="jianyanxiang" width="90" label="检验项" />
<el-table-column align="center" prop="jianyanmu" width="90" label="检验目" />
<el-table-column align="left" prop="jianyanneirong" label="检验内容" />
</el-table-column>
<el-table-column align="center" prop="xiangmuleibie" width="100" label="类别" />
<el-table-column align="center" label="检验检测情况或结果">
<el-table-column align="center" prop="jyjg1" width="90" label="合格">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.jyjg1" label="√" true-label="" border @change="changeJyjg(scope.$index, 'jyjg1')" />
</template>
</el-table-column>
<el-table-column align="center" prop="jyjg2" width="90" label="不合格">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.jyjg2" label="√" true-label="" border @change="changeJyjg(scope.$index, 'jyjg2')" />
</template>
</el-table-column>
<el-table-column align="center" prop="jianyanjieguo" width="90" label="无此项">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.jianyanjieguo" label="√" true-label="" border @change="changeJyjg(scope.$index, 'jianyanjieguo')" />
</template>
</el-table-column>
</el-table-column>
<el-table-column :formatter="formatterJianjianyuan" align="center" prop="jianjianyuan" width="150" label="监检员" />
<el-table-column align="center" prop="querenriqi" width="160" label="日期">
<template slot-scope="scope">
<el-date-picker v-model="scope.row.querenriqi" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%;" />
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane v-if="state !== 'create'" label="检验收费情况" name="jysfqk">
<complex-bill v-if="complexShow" ref="bill" :ysjl="ysjl" />
</el-tab-pane>
</el-tabs>
<el-dialog :visible.sync="jyxmrqShow" title="批量修改日期" width="500px" @close="closeDialog">
<template>
<el-date-picker v-model="querenriqi" type="date" value-format="yyyy-MM-dd" 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>
<sign-name v-show="signShow" ref="qmButton" :ysjl="ysjl" :jianyanrenyuan="xmjianyanrenyuan" field-name="xmqianming" @setSignValue="signNameValue" />
</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 Ft from '@/views/ysjl/1000/common/glft'
import ComplexBill from '@/views/chargeBill/components/complex'
export default {
name: 'GlSgjdYsjl2',
components: { SignName, Sticky, Ft, ComplexBill },
data() {
return {
jlbh1: 'GSA(',
jlbh2: new Date().getFullYear(),
jlbh3: ')',
jlbh4: '',
ysjl: {},
param: {},
jyxm: 'sgjd',
path: '/ysjl/1000/sg/sgjd/',
state: this.$route.query.state,
jianyanrenyuan: '',
departmentId: this.$route.query.departmentId,
isRepeat: false,
edit: false,
bgfyData: [],
tableData: [],
checkedTab: 'first',
xmjianyanrenyuan: '',
//
//
cols: [
{
name: 'checkbox', // el-table-column prop=''
getValue(row) {
return row.jianyanmu
}
},
{
name: 'jianyanxiang', // el-table-column prop=''
getValue(row) { //
return row.jianyanxiang
}
},
{
name: 'jianyanmu',
getValue(row) {
return row.jianyanmu
}
},
{
name: 'jianjianyuan',
getValue(row) {
return row.jianyanmu
}
},
{
name: 'querenriqi',
getValue(row) {
return row.jianyanmu
}
}
],
//
rows: [
{
name: 'jianyanxiang',
getValue(row) {
return row.jianyanxiang
}
},
{
name: 'jianyanmu',
getValue(row) {
return row.jianyanmu
}
}
],
signShow: false,
jyxmrqShow: false,
querenriqi: new Date(),
sblbList: [],
sbpzList: [],
ysjlId: this.$route.query.id,
fieldArr: ['jyjg1', 'jyjg2', 'jianyanjieguo'],
xmlbList: ['B', 'C'],
showXmlbIndexListSg: [2, 26, 28, 38, 39, 40, 41, 46, 47, 56, 73],
complexShow: false,
fujianOptions: ['□安装告知书', '□安装许可证', '□环评批复', '□锅炉房设计平面图', '□锅炉出厂合格证', '□产品监检证书', '□锅炉定型测试报告', '□燃烧机定型测试报告',
'□管道探伤抽查报告', '□调试人员培训合格证书和授权委托书', '□燃烧机调试合格报告', '□污染物排放报告', '□监督检验工作联络单或监督检验工作意见通知书', '□其它见证材料'],
isIndeterminate: false,
checkAll: []
}
},
computed: {
jilubianhao: function() {
let bianhao
if (!this.ysjl.jilubianhao) {
return this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + this.jlbh4
} else {
bianhao = this.ysjl.jilubianhao
}
return this.judgeRepeat(bianhao, this.ysjl.id)
}
},
watch: {
jlbh4: function(val) {
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + val
this.judgeRepeat(this.ysjl.jilubianhao, this.ysjl.id)
},
jilubianhao: function(newValue) {
this.judgeRepeat(newValue, this.ysjl.id)
}
},
created() {
if (this.state === 'create') {
this.api({
url: '/ysjl/initYsjl',
method: 'post',
data: {
modelId: this.$route.query.modelId,
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')
const currentDate = new Date()
const xcjyrq = new Date((currentDate.getFullYear() + 1) + '-' + (currentDate.getMonth() + 1) + '-' + currentDate.getDate())
this.ysjl.xiacijianyanriqi = xcjyrq.setDate(xcjyrq.getDate() - 1)
this.ysjl.jianyanjielun = '合格'
this.ysjl.baogaojielun = '符合'
this.ysjl.jigouhezhunzhenghao = process.env.VUE_APP_HZZBH
this.ysjl.beizhu = '/'
this.ysjl.zhizaoriqi = ''
this.changeEdgl()
this.getSbList('1000', this.ysjl.shebeileibiedaima, 3)
this.$set(this.param, 'hasYijiantongzhishu', '无。')
this.$set(this.param, 'fujian', this.fujianOptions)
this.$set(this.param, 'shiyunxingriqi', this.formatter.dateFormat('YYYY年MM月dd日'))
})
this.getMaxBh()
} else {
this.getYsjl(this.$route.query.id)
}
this.getSbList('1000', undefined, 2)
this.getJyxm(1)
},
methods: {
getFujianOption(val) {
return val.replace('□', '').replace('☑', '')
},
handleCheckAllChange(val) {
this.param.fujian = val ? this.fujianOptions.map(row => row.replace('□', '☑')) : this.fujianOptions
this.isIndeterminate = false
},
handleCheckedChange() {
const checkedCount = this.param.fujian.filter(row => row.indexOf('☑') === 0).length
const totalCount = this.param.fujian.length
this.checkAll = checkedCount === totalCount
this.isIndeterminate = checkedCount > 0 && checkedCount < totalCount
},
/**
* 格式化监检员
*/
formatterJianjianyuan(row) {
if (row.jianjianyuan) {
if (typeof (row.jianjianyuan) === 'number') {
row.jianjianyuan = row.jianjianyuan.toString()
}
return this.common.convertCnName(row.jianjianyuan)
}
},
//
signNameValue(data) {
if (data.fieldName === 'xmqianming') {
this.jyxmController.findFirstJyxAndSignName(this.$refs.bgfyData.selection, this.bgfyData, data)
this.signShow = false
} else {
this.ysjl.jianyanrenyuan = data.id
this.jianyanrenyuan = data.name
if (this.state !== 'create') {
this.common.signName(this.ysjl.id, this.ysjl.jianyanrenyuan)
Utils.$emit('ysjl-list')
}
}
},
//
getMaxBh() {
const aheadPart = this.jlbh1 + '' + this.jlbh2 + '' + this.jlbh3
this.api({
url: '/ysjl/gainCurrentBh',
method: 'get',
params: {
aheadPart: aheadPart + '-',
hinderPart: ''
}
}).then(data => {
this.jlbh4 = data
})
},
getSbpzList(val) {
this.changeEdgl()
let obj = {}
obj = this.sblbList.find((item) => { // sblbList
return item.value === val //
})
this.ysjl.shebeileibie = obj.label
this.ysjl.shebeipinzhongdaima = ''
this.ysjl.shebeipinzhong = ''
if (val) {
this.getSbList('1000', val, 3)
}
},
setSbpz(val) {
let obj = {}
obj = this.sbpzList.find((item) => { // userList
return item.value === val //
})
this.ysjl.shebeipinzhong = obj.label
},
getSbList(sbzl, sblb, level) {
this.api({
url: '/sedirectory/getList',
method: 'get',
params: {
sbzl: sbzl,
sblb: sblb,
level: level
}
}).then(data => {
switch (level) {
case 2:
this.sblbList = data
return ''
case 3:
this.sbpzList = data
return ''
default:
this.sbzlList = data
return ''
}
})
},
getYsjl(id) {
this.api({
url: '/ysjl/getYsjlById',
method: 'get',
params: {
ysjlId: id
}
}).then(data => {
this.ysjl = data.ysjl
this.complexShow = true
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)
this.changeEdgl()
this.getSbList('1000', this.ysjl.shebeileibiedaima, 3)
})
},
getParam(ysjlId, sbzldm) {
// id
this.api({
url: '/ysjl/getParamByYsjlId',
method: 'get',
params: {
ysjlId: ysjlId,
sbzldm: sbzldm
}
}).then(data => {
this.param = data
this.$set(this.param, 'fujian', JSON.parse(this.param.fujian))
this.handleCheckedChange()
})
},
//
getJyxm(sort) {
this.jyxmController.getJyxm(this.$route.query.modelId, this.$route.query.id, sort, this.state, false).then(data => {
switch (sort) {
case 1:
this.bgfyData = data
this.jyxmController.initJjyJyxm(this.state, this.bgfyData)
this.tableJs.getData(this.cols, this.rows, this.bgfyData)
break
}
})
},
/**
* 获取表格中的id, 不为空的检验结果和备注
*/
getProp: function(data) {
const retData = []
const fields = ['xiangmuleibie', 'jyjg1', 'jyjg2', 'jianyanjieguo', 'jianjianyuan', 'querenriqi']
for (let i = 0; i < data.length; i++) {
const retRow = {}
retRow.id = data[i].id
fields.forEach(field => {
if (data[i][field]) {
retRow[field] = data[i][field]
}
})
retData.push(retRow)
}
return retData
},
/**
* 检验项目批量签名
*/
Signjyxm() {
if (this.$refs.bgfyData.selection.length === 0) {
this.$message('请在列表选择要签名的数据。')
return
}
this.signShow = true
this.$refs.qmButton.dialogFormVisible = true
},
/**
* 检验项目清除签名
*/
signClear: function() {
if (this.$refs.bgfyData.selection.length === 0) {
this.$message('请在列表选择要清除签名的数据。')
return
}
this.$refs.qmButton.clearSign()
},
closeDialog() {
this.jyxmrqShow = false
},
onRowClick(row) {
this.$refs.bgfyData.toggleRowSelection(row)
},
batchUpdDate() {
if (this.$refs.bgfyData.selection.length === 0) {
this.$message('请在列表选择要修改日期的数据。')
return false
}
this.jyxmrqShow = true
},
batchUpd() {
for (let i = 0; i < this.$refs.bgfyData.selection.length; i++) {
this.$refs.bgfyData.selection[i].querenriqi = this.querenriqi
for (let j = 0; j < this.bgfyData.length; j++) {
if (this.bgfyData[j].id === this.$refs.bgfyData.selection[i].id) {
this.$set(this.bgfyData[j], this.$refs.bgfyData.selection[i])
}
}
}
this.jyxmrqShow = false
},
saveYsjl: function(operation) {
if (operation === 'add') {
if (!this.jlbh4.trim()) {
this.$message({ message: '请先确认记录编号是否完整!', type: 'warning' })
return false
}
}
this.tableData = []
this.tableData.push(this.getProp(this.bgfyData))
let url = ''
this.ysjl.bglx = 1
this.ysjl.cjState = 'ysjl'
this.ysjl.zfState = '0'
this.ysjl.jlprintState = 0
if (operation === 'add') {
url = '/ysjl/saveYsjl'
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + this.jlbh4
this.ysjl.jianyanxiangmu = this.jyxm
} else if (operation === 'build') {
if (!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
}
url = '/ysjl/updateYsjl'
} else if (operation === 'upd') {
url = '/ysjl/updateYsjl'
}
if (this.isRepeat) {
this.$message({ message: '记录编号重复,请先修改记录编号再保存', type: 'error' })
return false
} else {
this.$refs['ysjl'].validate(valid => {
if (valid) {
this.api({
url: url,
method: 'post',
data: {
ysjl: this.ysjl,
param: this.param,
jyxm: JSON.stringify(this.tableData),
flag: operation
}
}).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
})
// this.$router.push({
// path: this.path + this.ysjl.id,
// query: { state: 'update', id: this.ysjl.id, departmentId: this.ysjl.departmentId, jianyanrenyuan: this.ysjl.jianyanrenyuan }
// })
} 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-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
}
})
},
changeJyjl(val) {
if (val === '符合') {
//
this.ysjl.jianyanjielun = '合格'
const xcjyrq = new Date(this.ysjl.jianyanjieshuriqi)
xcjyrq.setFullYear(xcjyrq.getFullYear() + 1)
this.ysjl.xiacijianyanriqi = xcjyrq.setDate(xcjyrq.getDate() - 1)
} else {
//
this.ysjl.jianyanjielun = '不合格'
const xcjyrq = new Date(this.ysjl.jianyanjieshuriqi)
xcjyrq.setMonth(xcjyrq.getMonth() + 1 + 2)
this.ysjl.xiacijianyanriqi = xcjyrq.setDate(xcjyrq.getDate() - 1)
}
},
/**
* 改变额定功率蒸汽锅炉是t/h其他的是MW
*/
changeEdgl() {
if (this.ysjl.shebeileibiedaima === '1100') {
this.param.edinggonglv = 't/h'
} else {
this.param.edinggonglv = 'MW'
}
},
/**
*
* @param $index
* @param field
*/
changeJyjg($index, field) {
this.fieldArr.forEach(currentField => {
if (field !== currentField) {
this.bgfyData[$index][currentField] = ''
}
})
},
/**
* 是否可编辑
* @param $index
* @returns {number}
*/
showXmlb($index) {
return this.showXmlbIndexListSg.filter(xl => {
return xl === $index
}).length
}
}
}
</script>

949
src/views/ysjl/1000/jj/2.0/zg.vue

@ -1,949 +0,0 @@
<!--整装锅炉安装监督检验-->
<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 type="primary" size="medium" @click="Signjyxm">
<svg-icon icon-class="sign" />
检验项目批量签名
</el-button>
<el-button type="danger" icon="el-icon-delete" size="medium" @click="signClear">
批量清除签名
</el-button>
<el-button type="success" size="medium" icon="el-icon-edit" @click="batchUpdDate">
批量修改日期
</el-button>
<el-button v-if="state !== 'create'" type="warning" icon="el-icon-view" size="medium" @click="common.viewYsjl(ysjl.id, 'YSJL')">
预览
</el-button>
<Ft v-if="state !== 'create'" :state="state" :ysjl="ysjl" :ysjl-id="Number(ysjlId ? ysjlId : 0)" :department-id="Number(departmentId ? departmentId : 0)" style="margin-left: 10px;" />
</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="130px">
<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:80px" disabled />-
<el-input v-model="jlbh4" style="width:85px" @blur="judgeRepeat(jlbh1 + jlbh2 + jlbh3 + '-' + jlbh4 , 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="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" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="邮政编码" prop="shiyongdanweiYoubian">
<el-input v-model="ysjl.shiyongdanweiYoubian" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="使用单位联系人" prop="shiyongdanweiLianxiren">
<el-input v-model="ysjl.shiyongdanweiLianxiren" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="联系电话" prop="shiyongdanweiDianhua">
<el-input v-model="ysjl.shiyongdanweiDianhua" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="锅炉型号" prop="guigexinghao">
<el-input v-model="ysjl.guigexinghao" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<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-col :span="9">
<el-form-item label="额定蒸发量(热功率)" label-width="140px" prop="edingzhengfaliang">
<el-input v-model="param.edingzhengfaliang" type="text">
<template slot="append">
t/h(MW)
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="制造单位" prop="zhizaodanwei">
<el-input v-model="ysjl.zhizaodanwei" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="产品编号" prop="chanpinbianhao">
<el-input v-model="ysjl.chanpinbianhao" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="设备代码" prop="shebeidaima">
<el-input v-model="ysjl.shebeidaima" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="额定压力" prop="edingyali">
<el-input v-model="param.edingyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="额定温度" prop="edingwendu">
<el-input v-model="param.edingwendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="设备类别" prop="shebeileibiedaima">
<el-select v-model="ysjl.shebeileibiedaima" filterable allow-create default-first-option style="width: 100%" @change="getSbpzList">
<el-option v-for="item in sblbList" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="允许工作压力" prop="gongzuoyali">
<el-input v-model="param.gongzuoyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="允许工作温度" prop="yunxugongzuowendu">
<el-input v-model="param.yunxugongzuowendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="设备品种(名称)" prop="shebeipinzhongdaima">
<el-select v-model="ysjl.shebeipinzhongdaima" filterable allow-create default-first-option style="width: 100%" @change="setSbpz">
<el-option v-for="item in sbpzList" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="水(耐)压试验压力" prop="shuiyashiyanyali" label-width="150px">
<el-input v-model="param.shuiyashiyanyali" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="使用压力" prop="shiyongyali">
<el-input v-model="param.shiyongyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="内部编号" prop="danweineibubianhao">
<el-input v-model="ysjl.danweineibubianhao" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="告知书编号" prop="gaozhibianhao">
<el-input v-model="param.gaozhibianhao" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="施工单位" prop="shigongdanwei">
<el-input v-model="ysjl.shigongdanwei" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="许可级别" prop="shigongxukezhengjibie">
<el-input v-model="ysjl.shigongxukezhengjibie" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="许可证编号" prop="shigongxukezheng">
<el-input v-model="ysjl.shigongxukezheng" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="施工单位联系人" prop="shigongdanweiLianxiren">
<el-input v-model="ysjl.shigongdanweiLianxiren" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="施工单位联系电话" prop="shigongdanweiDianhua">
<el-input v-model="ysjl.shigongdanweiDianhua" type="text" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>检验信息</legend>
<el-row :gutter="20" style="text-align:left;margin-left: 50px;font-size: 18px;color: #606266;line-height: 40px;font-weight: bolder;">
根据中华人民共和国特种设备安全法特种设备安全监察条例的规定该锅炉 安装经我机构监督检验符合锅炉安全技术规程规定的基本安 全要求特发此证书
</el-row>
<el-row :gutter="20" style="margin-top: 20px;">
<el-col :span="9">
<!-- 开始安装日期就是开工告知日期 -->
<el-form-item label="开始安装日期" prop="gaozhiriqi">
<el-date-picker v-model="param.gaozhiriqi" type="date" value-format="yyyy年MM月dd日" placeholder="选择日期" style="width: 100%;" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="水压试验日期" prop="shiyanriqi">
<el-date-picker v-model="param.shiyanriqi" type="date" placeholder="选择日期" style="width: 75%;" />
<el-button type="primary" title="同步检验项中第1大项到第9大项的监检日期" icon="el-icon-refresh" size="mini" @click="syncRq(0, 38, param.shiyanriqi)" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="试运行完毕日期" prop="shiyunxingriqi">
<el-date-picker v-model="param.shiyunxingriqi" type="date" value-format="yyyy年MM月dd日" placeholder="选择日期" style="width: 75%;" />
<el-button type="primary" title="同步检验项中第10大项到第12大项的监检日期" icon="el-icon-refresh" size="mini" @click="syncRq(44, bgfyData.length, param.shiyunxingriqi)" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="安装资料送审日期" prop="anzhuangziliaosongshenriqi">
<el-date-picker v-model="param.anzhuangziliaosongshenriqi" 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="jianyanjieshuriqi">
<el-date-picker v-model="ysjl.jianyanjieshuriqi" type="date" 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" type="date" placeholder="选择日期" style="width: 100%;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="9">
<el-form-item label="检验人员" prop="jianyanrenyuan">
<el-input v-model="jianyanrenyuan" disabled />
<el-input v-show="false" v-model="ysjl.jianyanrenyuan" />
</el-form-item>
</el-col>
<el-col :span="9">
<sign-name :jianyanrenyuan="jianyanrenyuan" :ysjl="ysjl" @setSignValue="signNameValue" />
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18" style="height: 130px;">
<el-form-item label="其他情况说明:" prop="beizhu">
<el-input v-model="ysjl.beizhu" :rows="5" :disabled="edit" type="textarea" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
</el-form>
</el-tab-pane>
<el-tab-pane label="整装锅炉安装监督检验项目表" name="second">
<el-form class="el-form" label-width="150px">
<el-row :gutter="20">
<el-col :span="18" style="height: 170px;">
<el-form-item label="其他记录的内容:" prop="shuoming">
<el-input v-model="param.shuoming" :rows="5" :disabled="edit" type="textarea" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18" style="height: 200px;">
<el-form-item label="附件" prop="fujian">
<el-checkbox v-model="checkAll" :indeterminate="isIndeterminate" @change="handleCheckAllChange">
全选
</el-checkbox>
<br>
<el-checkbox
v-for="(item, index) in param.fujian"
:key="item"
v-model="param.fujian[index]"
:true-label="'☑' + getFujianOption(item)"
:false-label="'□' + getFujianOption(item)"
@change="handleCheckedChange"
>
{{ getFujianOption(item) }}
</el-checkbox>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table ref="bgfyData" :data="bgfyData" :span-method="tableJs.mergeColRows" border stripe style="width:90%" @row-click="onRowClick">
<el-table-column type="selection" width="55" prop="checkbox" />
<el-table-column type="index" align="center" width="50" label="序号" />
<el-table-column align="center" label="监检项目">
<el-table-column align="center" prop="jianyanxiang" width="70" label="检验项" />
<el-table-column align="left" prop="jianyanneirong" label="检验内容" />
</el-table-column>
<el-table-column align="center" prop="xiangmuleibie" width="100" label="类别" />
<el-table-column align="center" label="检验检测情况或结果">
<el-table-column align="center" prop="jyjg1" width="90" label="合格">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.jyjg1" label="√" true-label="" border @change="changeJyjg(scope.$index, 'jyjg1')" />
</template>
</el-table-column>
<el-table-column align="center" prop="jyjg2" width="90" label="不合格">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.jyjg2" label="√" true-label="" border @change="changeJyjg(scope.$index, 'jyjg2')" />
</template>
</el-table-column>
<el-table-column align="center" prop="jianyanjieguo" width="90" label="无此项">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.jianyanjieguo" label="√" true-label="" border @change="changeJyjg(scope.$index, 'jianyanjieguo')" />
</template>
</el-table-column>
</el-table-column>
<el-table-column :formatter="formatterJianjianyuan" align="center" prop="jianjianyuan" width="100" label="监检员" />
<el-table-column align="center" prop="querenriqi" width="160" label="日期">
<template slot-scope="scope">
<el-date-picker v-model="scope.row.querenriqi" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%;" />
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane v-if="state !== 'create'" label="检验收费情况" name="jysfqk">
<complex-bill v-if="complexShow" ref="bill" :ysjl="ysjl" />
</el-tab-pane>
</el-tabs>
<el-dialog :visible.sync="jyxmrqShow" title="批量修改日期" width="500px" @close="closeDialog">
<template>
<el-date-picker v-model="querenriqi" type="date" value-format="yyyy-MM-dd" 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>
<sign-name v-show="signShow" ref="qmButton" :ysjl="ysjl" :jianyanrenyuan="xmjianyanrenyuan" field-name="xmqianming" @setSignValue="signNameValue" />
</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 Ft from '@/views/ysjl/1000/common/glft'
import ComplexBill from '@/views/chargeBill/components/complex'
export default {
name: 'GlZgjdYsjl2',
components: { SignName, Sticky, Ft, ComplexBill },
data() {
return {
jlbh1: 'GZA(',
jlbh2: new Date().getFullYear(),
jlbh3: ')',
jlbh4: '',
ysjl: {},
param: {},
jyxm: 'zgjd',
path: '/ysjl/1000/zg/zgjd/',
state: this.$route.query.state,
jianyanrenyuan: '',
departmentId: this.$route.query.departmentId,
isRepeat: false,
edit: false,
bgfyData: [],
tableData: [],
checkedTab: 'first',
xmjianyanrenyuan: '',
//
//
cols: [
{
name: 'checkbox', // el-table-column prop=''
getValue(row) {
return row.jianyanxiang
}
},
{
name: 'jianyanxiang', // el-table-column prop=''
getValue(row) { //
return row.jianyanxiang
}
},
{
name: 'jianyanneirong',
getValue(row) {
return row.jianyanneirong
}
},
{
name: 'jianjianyuan',
getValue(row) {
return row.jianyanxiang
}
},
{
name: 'querenriqi',
getValue(row) {
return row.jianyanxiang
}
}
],
//
rows: [
{
name: 'jianyanxiang',
getValue(row) {
return row.jianyanxiang
}
},
{
name: 'jianyanneirong',
getValue(row) {
return row.jianyanneirong
}
},
{
name: 'jianjianyuan',
getValue(row) {
return row.jianyanxiang
}
}
],
signShow: false,
jyxmrqShow: false,
querenriqi: new Date(),
sblbList: [],
sbpzList: [],
ysjlId: this.$route.query.id,
fieldArr: ['jyjg1', 'jyjg2', 'jianyanjieguo'],
xmlbList: ['B', 'C'],
showXmlbIndexListZg: [1, 16, 22, 45, 46, 47, 48, 49, 50, 51, 52],
disabledEdit: [46, 47, 48, 49, 50, 51, 52],
complexShow: false,
fujianOptions: ['□安装告知书', '□安装许可证', '□环评批复', '□锅炉房设计平面图', '□锅炉出厂合格证', '□产品监检证书', '□锅炉定型测试报告', '□燃烧机定型测试报告',
'□管道探伤抽查报告', '□调试人员培训合格证书和授权委托书', '□燃烧机调试合格报告', '□污染物排放报告', '□监督检验工作联络单或监督检验工作意见通知书', '□其它见证材料'],
isIndeterminate: false,
checkAll: []
}
},
computed: {
jilubianhao: function() {
let bianhao
if (!this.ysjl.jilubianhao) {
return this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + this.jlbh4
} else {
bianhao = this.ysjl.jilubianhao
}
return this.judgeRepeat(bianhao, this.ysjl.id)
}
},
watch: {
jlbh4: function(val) {
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + val
this.judgeRepeat(this.ysjl.jilubianhao, this.ysjl.id)
},
jilubianhao: function(newValue) {
this.judgeRepeat(newValue, this.ysjl.id)
}
},
created() {
if (this.state === 'create') {
this.api({
url: '/ysjl/initYsjl',
method: 'post',
data: {
modelId: this.$route.query.modelId,
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')
const currentDate = new Date()
const xcjyrq = new Date((currentDate.getFullYear() + 1) + '-' + (currentDate.getMonth() + 1) + '-' + currentDate.getDate())
this.ysjl.xiacijianyanriqi = xcjyrq.setDate(xcjyrq.getDate() - 1)
this.ysjl.jianyanjielun = '合格'
this.ysjl.baogaojielun = '符合'
this.ysjl.jigouhezhunzhenghao = process.env.VUE_APP_HZZBH
this.$set(this.param, 'shiyunxingriqi', this.formatter.dateFormat('YYYY年MM月dd日'))
this.ysjl.beizhu = '/'
this.ysjl.zhizaoriqi = ''
this.changeEdgl()
this.getSbList('1000', this.ysjl.shebeileibiedaima, 3)
this.$set(this.param, 'hasYijiantongzhishu', '无。')
this.$set(this.param, 'fujian', this.fujianOptions)
})
this.getMaxBh()
} else {
this.getYsjl(this.$route.query.id)
}
this.getSbList('1000', undefined, 2)
this.getJyxm(1)
},
methods: {
getFujianOption(val) {
return val.replace('□', '').replace('☑', '')
},
handleCheckAllChange(val) {
this.param.fujian = val ? this.fujianOptions.map(row => row.replace('□', '☑')) : this.fujianOptions
this.isIndeterminate = false
},
handleCheckedChange() {
const checkedCount = this.param.fujian.filter(row => row.indexOf('☑') === 0).length
const totalCount = this.param.fujian.length
this.checkAll = checkedCount === totalCount
this.isIndeterminate = checkedCount > 0 && checkedCount < totalCount
},
/**
* 格式化监检员
*/
formatterJianjianyuan(row) {
if (row.jianjianyuan) {
if (typeof (row.jianjianyuan) === 'number') {
row.jianjianyuan = row.jianjianyuan.toString()
}
return this.common.convertCnName(row.jianjianyuan)
}
},
//
signNameValue(data) {
if (data.fieldName === 'xmqianming') {
this.jyxmController.findFirstJyxAndSignName(this.$refs.bgfyData.selection, this.bgfyData, data)
this.signShow = false
} else {
this.ysjl.jianyanrenyuan = data.id
this.jianyanrenyuan = data.name
if (this.state !== 'create') {
this.common.signName(this.ysjl.id, this.ysjl.jianyanrenyuan)
Utils.$emit('ysjl-list')
}
}
},
//
getMaxBh() {
const aheadPart = this.jlbh1 + '' + this.jlbh2 + '' + this.jlbh3
this.api({
url: '/ysjl/gainCurrentBh',
method: 'get',
params: {
aheadPart: aheadPart + '-',
hinderPart: ''
}
}).then(data => {
this.jlbh4 = data
})
},
getSbpzList(val) {
this.changeEdgl()
let obj = {}
obj = this.sblbList.find((item) => { // sblbList
return item.value === val //
})
this.ysjl.shebeileibie = obj.label
this.ysjl.shebeipinzhongdaima = ''
this.ysjl.shebeipinzhong = ''
if (val) {
this.getSbList('1000', val, 3)
}
},
setSbpz(val) {
let obj = {}
obj = this.sbpzList.find((item) => { // userList
return item.value === val //
})
this.ysjl.shebeipinzhong = obj.label
},
getSbList(sbzl, sblb, level) {
this.api({
url: '/sedirectory/getList',
method: 'get',
params: {
sbzl: sbzl,
sblb: sblb,
level: level
}
}).then(data => {
switch (level) {
case 2:
this.sblbList = data
return ''
case 3:
this.sbpzList = data
return ''
default:
this.sbzlList = data
return ''
}
})
},
getYsjl(id) {
this.api({
url: '/ysjl/getYsjlById',
method: 'get',
params: {
ysjlId: id
}
}).then(data => {
this.ysjl = data.ysjl
this.complexShow = true
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)
this.changeEdgl()
this.getSbList('1000', this.ysjl.shebeileibiedaima, 3)
})
},
getParam(ysjlId, sbzldm) {
// id
this.api({
url: '/ysjl/getParamByYsjlId',
method: 'get',
params: {
ysjlId: ysjlId,
sbzldm: sbzldm
}
}).then(data => {
this.param = data
this.$set(this.param, 'fujian', JSON.parse(this.param.fujian))
this.handleCheckedChange()
})
},
//
getJyxm(sort) {
this.jyxmController.getJyxm(this.$route.query.modelId, this.$route.query.id, sort, this.state, false).then(data => {
switch (sort) {
case 1:
this.bgfyData = data
this.jyxmController.initJjyJyxm(this.state, this.bgfyData)
this.tableJs.getData(this.cols, this.rows, this.bgfyData)
break
}
})
},
/**
* 获取表格中的id, 不为空的检验结果和备注
*/
getProp: function(data) {
const retData = []
const fields = ['xiangmuleibie', 'jyjg1', 'jyjg2', 'jianyanjieguo', 'jianjianyuan', 'querenriqi']
for (let i = 0; i < data.length; i++) {
const retRow = {}
retRow.id = data[i].id
fields.forEach(field => {
if (data[i][field]) {
retRow[field] = data[i][field]
}
})
retData.push(retRow)
}
return retData
},
/**
* 检验项目批量签名
*/
Signjyxm() {
if (this.$refs.bgfyData.selection.length === 0) {
this.$message('请在列表选择要签名的数据。')
return
}
this.signShow = true
this.$refs.qmButton.dialogFormVisible = true
},
/**
* 检验项目清除签名
*/
signClear: function() {
if (this.$refs.bgfyData.selection.length === 0) {
this.$message('请在列表选择要清除签名的数据。')
return
}
this.$refs.qmButton.clearSign()
},
closeDialog() {
this.jyxmrqShow = false
},
onRowClick(row) {
this.$refs.bgfyData.toggleRowSelection(row)
},
batchUpdDate() {
if (this.$refs.bgfyData.selection.length === 0) {
this.$message('请在列表选择要修改日期的数据。')
return false
}
this.jyxmrqShow = true
},
batchUpd() {
for (let i = 0; i < this.$refs.bgfyData.selection.length; i++) {
this.$refs.bgfyData.selection[i].querenriqi = this.querenriqi
for (let j = 0; j < this.bgfyData.length; j++) {
if (this.bgfyData[j].id === this.$refs.bgfyData.selection[i].id) {
this.$set(this.bgfyData[j], this.$refs.bgfyData.selection[i])
}
}
}
this.jyxmrqShow = false
},
saveYsjl: function(operation) {
if (operation === 'add') {
if (!this.jlbh4.trim()) {
this.$message({ message: '请先确认记录编号是否完整!', type: 'warning' })
return false
}
}
this.tableData = []
this.tableData.push(this.getProp(this.bgfyData))
let url = ''
this.ysjl.bglx = 1
this.ysjl.cjState = 'ysjl'
this.ysjl.zfState = '0'
this.ysjl.jlprintState = 0
if (operation === 'add') {
url = '/ysjl/saveYsjl'
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + this.jlbh4
this.ysjl.jianyanxiangmu = this.jyxm
} else if (operation === 'build') {
if (!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
}
url = '/ysjl/updateYsjl'
} else if (operation === 'upd') {
url = '/ysjl/updateYsjl'
}
if (this.isRepeat) {
this.$message({ message: '记录编号重复,请先修改记录编号再保存', type: 'error' })
return false
} else {
this.$refs['ysjl'].validate(valid => {
if (valid) {
this.api({
url: url,
method: 'post',
data: {
ysjl: this.ysjl,
param: this.param,
jyxm: JSON.stringify(this.tableData),
flag: operation
}
}).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
})
// this.$router.push({
// path: this.path + this.ysjl.id,
// query: { state: 'update', id: this.ysjl.id, departmentId: this.ysjl.departmentId, jianyanrenyuan: this.ysjl.jianyanrenyuan }
// })
} 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-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
}
})
},
changeJyjl(val) {
if (val === '符合') {
//
this.ysjl.jianyanjielun = '合格'
const xcjyrq = new Date(this.ysjl.jianyanjieshuriqi)
xcjyrq.setFullYear(xcjyrq.getFullYear() + 1)
this.ysjl.xiacijianyanriqi = xcjyrq.setDate(xcjyrq.getDate() - 1)
} else {
//
this.ysjl.jianyanjielun = '不合格'
const xcjyrq = new Date(this.ysjl.jianyanjieshuriqi)
xcjyrq.setMonth(xcjyrq.getMonth() + 1 + 2)
this.ysjl.xiacijianyanriqi = xcjyrq.setDate(xcjyrq.getDate() - 1)
}
},
/**
* 改变额定功率蒸汽锅炉是t/h其他的是MW
*/
changeEdgl() {
if (this.ysjl.shebeileibiedaima === '1100') {
this.param.edinggonglv = 't/h'
} else {
this.param.edinggonglv = 'MW'
}
},
/**
*
* @param $index
* @param field
*/
changeJyjg($index, field) {
this.fieldArr.forEach(currentField => {
if (field !== currentField) {
this.bgfyData[$index][currentField] = ''
}
})
},
/**
* 同步检验项目中的日期
* 水压试验日期同步1-9大项
* 试运行日期同步10-12大项
* @param startIndex 索引
* @param count 最大索引
* @param riqi 同步的日期
*/
syncRq(startIndex, count, riqi) {
for (let i = startIndex; i < count; i++) {
if (i === 0) {
this.bgfyData[i].querenriqi = this.param.shiyanriqi
} else if (i + 1 < this.bgfyData.length && this.bgfyData[i].jianyanxiang !== this.bgfyData[i + 1].jianyanxiang) {
this.bgfyData[i + 1].querenriqi = riqi.replace('年', '-').replace('月', '-').replace('日', '')
}
}
},
/**
* 是否展示项目类别
* @param $index
* @returns {number}
*/
showXmlb($index) {
return this.showXmlbIndexListZg.filter(index => {
return index === $index
}).length
},
/**
* 是否可编辑
* @param $index
* @returns {boolean}
*/
editStatus($index) {
return this.disabledEdit.filter(index => {
return index === $index
}).length > 0
},
/**
* 改变部分项目类别
* @param $index
*/
changeXmlb($index) {
if ($index === 45) {
this.disabledEdit.forEach(index => {
this.bgfyData[index].xiangmuleibie = this.bgfyData[$index].xiangmuleibie
})
}
}
}
}
</script>

714
src/views/ysjl/1000/jj/gzwx.vue

@ -1,714 +0,0 @@
<!--锅炉改造和重大修理-->
<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')">
预览
</el-button>
<Ft v-if="state !== 'create'" :state="state" :ysjl="ysjl" :ysjl-id="Number(ysjlId ? ysjlId : 0)" :department-id="Number(departmentId ? departmentId : 0)" style="margin-left: 10px;" />
</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="130px">
<fieldset>
<legend>基本信息</legend>
<el-row :gutter="25">
<el-col v-if="state === 'create'" :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:80px" disabled />-
<el-input v-model="jlbh4" style="width:85px" @blur="judgeRepeat(jlbh1 + jlbh2 + jlbh3 + '-' + jlbh4 , 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="shiyongdengjibianhao">
<el-input v-model="ysjl.shiyongdengjibianhao" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="注册代码" prop="zhucedaima">
<el-input v-model="ysjl.zhucedaima" type="text" />
</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" 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" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="电话" prop="shiyongdanweiDianhua">
<el-input v-model="ysjl.shiyongdanweiDianhua" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="单位邮编" prop="shiyongdanweiYoubian">
<el-input v-model="ysjl.shiyongdanweiYoubian" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="锅炉型号" prop="guigexinghao">
<el-input v-model="ysjl.guigexinghao" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="制造单位" prop="zhizaodanwei">
<el-input v-model="ysjl.zhizaodanwei" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<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-col :span="9">
<el-form-item label="投用日期" prop="touyongriqi">
<el-date-picker v-model="ysjl.touyongriqi" 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="chanpinbianhao">
<el-input v-model="ysjl.chanpinbianhao" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="使用编号" prop="danweineibubianhao">
<el-input v-model="ysjl.danweineibubianhao" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="6">
<el-form-item label="额定出力" prop="edingchuli">
<el-input v-model="param.edingchuli" />
</el-form-item>
</el-col>
<el-col :span="3">
<el-select v-model="param.edinggonglv" :disabled="true" type="text" placeholder="请选择">
<el-option label="t/h" value="t/h" />
<el-option label="MW" value="MW" />
</el-select>
</el-col>
<el-col :span="9">
<el-form-item label="额定压力" prop="edingyali">
<el-input v-model="param.edingyali">
<template slot="append">
MPa
</template>
</el-input>
</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" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="使用压力" prop="shiyongyali">
<el-input v-model="param.shiyongyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="额定温度" prop="edingwendu">
<el-input v-model="param.edingwendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="设备类别" prop="shebeileibiedaima">
<el-select v-model="ysjl.shebeileibiedaima" placeholder="设备类别" style="width: 100%" @change="getSbpzList">
<el-option v-for="item in sblbList" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="设备品种(名称)" prop="shebeipinzhongdaima">
<el-select v-model="ysjl.shebeipinzhongdaima" placeholder="设备品种" style="width: 100%" @change="setSbpz">
<el-option v-for="item in sbpzList" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="允许工作压力" prop="gongzuoyali">
<el-input v-model="param.gongzuoyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="允许工作温度" prop="yunxugongzuowendu">
<el-input v-model="param.yunxugongzuowendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="许可级别" prop="shigongxukezhengjibie">
<el-input v-model="ysjl.shigongxukezhengjibie" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="施工单位" prop="shigongdanwei">
<el-input v-model="ysjl.shigongdanwei" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="许可证编号" prop="shigongxukezheng">
<el-input v-model="ysjl.shigongxukezheng" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="告知书编号" prop="gaozhibianhao">
<el-input v-model="param.gaozhibianhao" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="施工单位联系人" prop="shigongdanweiLianxiren">
<el-input v-model="ysjl.shigongdanweiLianxiren" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="施工单位联系电话" prop="shigongdanweiDianhua">
<el-input v-model="ysjl.shigongdanweiDianhua" type="text" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>检查与校验</legend>
<el-row :gutter="20" style="text-align:left;margin-left: 50px;font-size: 18px;color: #606266;line-height: 40px;font-weight: bolder;">
按照中华人民共和国特种设备安全法特种设备安全监察条例的规定该锅炉的
<el-select v-model="ysjl.shigongleibie" placeholder="请选择" style="width: 120px;">
<el-option v-for="item in sglbList" :key="item" :label="item" :value="item" />
</el-select> <br>
经我机构实施监督检验安全性能{{ ysjl.baogaojielun }}锅炉安全技术规程的要求特发此证书
</el-row>
<el-row :gutter="20" style="margin-top: 20px;">
<el-col :span="9">
<el-form-item label="检验日期" prop="jianyanjieshuriqi">
<el-date-picker v-model="ysjl.jianyanjieshuriqi" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%;" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="修理(改造)检验结果" prop="jianyanjielun">
<el-select v-model="ysjl.jianyanjielun" :disabled="edit" placeholder="请选择" style="width: 100%;" @change="changeBgjl">
<el-option label="符合要求" value="符合要求" />
<el-option label="不符合要求" value="不符合要求" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="9">
<el-form-item label="检验人员" prop="jianyanrenyuan">
<el-input v-model="jianyanrenyuan" disabled />
<el-input v-show="false" v-model="ysjl.jianyanrenyuan" />
</el-form-item>
</el-col>
<el-col :span="9">
<sign-name :jianyanrenyuan="jianyanrenyuan" :ysjl="ysjl" @setSignValue="signNameValue" />
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18" style="height: 130px;">
<el-form-item label="锅炉修理、改造的主要内容及范围:" prop="weihujianxiuqingkuangshuoming" label-width="230px">
<el-input v-model="param.wentijizai" :rows="5" :disabled="edit" type="textarea" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
</el-form>
</el-tab-pane>
<el-tab-pane label="锅炉改造和重大修理监督检验项目表" name="second">
<el-table ref="bgfyData" :data="bgfyData" :span-method="tableJs.mergeColRows" border stripe style="width:70%" @row-click="onRowClick">
<el-table-column type="selection" width="55" />
<el-table-column type="index" align="center" width="50" label="序号" />
<el-table-column align="center" prop="jianyanxiang" width="200" label="检验项目" />
<el-table-column align="center" prop="jianyanjieguo" label="检查结果">
<template slot-scope="scope">
<span v-if="scope.$index === 4">
保压时间<el-input v-model="param.baoyashijian" style="width: 25%;" />min,
试验压力<el-input v-model="param.shiyanyali" style="width: 25%;" />MPa
</span>
<el-autocomplete v-else v-model="scope.row.jianyanjieguo" :fetch-suggestions="querySearch" :disabled="edit" style="width: 100%;" />
</template>
</el-table-column>
<el-table-column align="center" prop="beizhu" label="备注">
<template slot-scope="scope">
<el-input v-model="scope.row.beizhu" :disabled="edit" placeholder="请输入内容" />
</template>
</el-table-column>
</el-table>
<el-form class="el-form" style="margin-top: 10px;">
<el-row :gutter="20">
<el-col :span="18" style="height: 170px;">
<el-form-item label="其它记录内容:" prop="beizhu">
<el-input v-model="ysjl.beizhu" :rows="5" :disabled="edit" type="textarea" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-tab-pane>
<el-tab-pane v-if="state !== 'create'" label="检验收费情况" name="jysfqk">
<complex-bill v-if="complexShow" ref="bill" :ysjl="ysjl" />
</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 Ft from '@/views/ysjl/1000/common/glft'
import ComplexBill from '@/views/chargeBill/components/complex'
export default {
name: 'GlGzwxYsjl',
components: { SignName, Sticky, Ft, ComplexBill },
data() {
return {
jlbh1: 'GX(',
jlbh2: new Date().getFullYear(),
jlbh3: ')',
ysjl: {},
param: {},
state: this.$route.query.state,
jianyanrenyuan: '',
departmentId: this.$route.query.departmentId,
isRepeat: false,
edit: false,
bgfyData: [],
tableData: [],
checkedTab: 'first',
sblbList: [],
sbpzList: [],
ysjlId: this.$route.query.id,
jyjgOption: [{ value: '符合要求' }, { value: '不符合要求' }, { value: '无此项' }],
sglbList: ['改造', '重大修理'],
complexShow: false
}
},
computed: {
jilubianhao: function() {
let bianhao
if (this.ysjl.jilubianhao === null || this.ysjl.jilubianhao === undefined || this.ysjl.jilubianhao === '') {
return this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + this.jlbh4
} else {
bianhao = this.ysjl.jilubianhao
}
return this.judgeRepeat(bianhao, this.ysjl.id)
}
},
watch: {
jlbh4: function(val) {
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + val
this.judgeRepeat(this.ysjl.jilubianhao, this.ysjl.id)
},
jilubianhao: function(newValue) {
this.judgeRepeat(newValue, this.ysjl.id)
}
},
created() {
if (this.state === 'create') {
this.api({
url: '/ysjl/initYsjl',
method: 'post',
data: {
modelId: this.$route.query.modelId,
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.ysjl.jianyanjielun = '符合要求'
this.ysjl.baogaojielun = '符合'
this.ysjl.jigouhezhunzhenghao = process.env.VUE_APP_HZZBH
this.ysjl.beizhu = '/'
this.changeEdgl()
this.getSbList('1000', this.ysjl.shebeileibiedaima, 3)
const sglb = this.sglbList.filter(item => {
return item === this.ysjl.shigongleibie
})
if (sglb.length) {
this.$set(this.ysjl, 'shigongleibie', sglb[0])
} else {
this.$set(this.ysjl, 'shigongleibie', '改造')
}
})
this.$set(this.param, 'weihujianxiuqingkuangshuoming', '/')
this.getSbList('1000', undefined, 2)
} else {
this.getYsjl(this.$route.query.id)
this.getSbList('1000', undefined, 2)
}
//
if (!this.ysjl.jilubianhao) {
this.getMaxBh()
}
this.getJyxm(1)
},
methods: {
//
signNameValue(data) {
this.ysjl.jianyanrenyuan = data.id
this.jianyanrenyuan = data.name
if (this.state !== 'create') {
this.common.signName(this.ysjl.id, this.ysjl.jianyanrenyuan)
Utils.$emit('ysjl-list')
}
},
//
getMaxBh() {
const aheadPart = this.jlbh1 + '' + this.jlbh2 + '' + this.jlbh3
this.api({
url: '/ysjl/gainCurrentBh',
method: 'get',
params: {
aheadPart: aheadPart + '-',
hinderPart: ''
}
}).then(data => {
this.jlbh4 = data
})
},
getSbpzList(val) {
this.changeEdgl()
let obj = {}
obj = this.sblbList.find((item) => { // sblbList
return item.value === val //
})
if (obj) {
this.ysjl.shebeileibie = obj.label
}
this.ysjl.shebeipinzhongdaima = ''
this.ysjl.shebeipinzhong = ''
if (val) {
this.getSbList('1000', val, 3)
}
},
setSbpz(val) {
let obj = {}
obj = this.sbpzList.find((item) => { // userList
return item.value === val //
})
this.ysjl.shebeipinzhong = obj.label
},
getSbList(sbzl, sblb, level) {
this.api({
url: '/sedirectory/getList',
method: 'get',
params: {
sbzl: sbzl,
sblb: sblb,
level: level
}
}).then(data => {
switch (level) {
case 2:
this.sblbList = data
return ''
case 3:
this.sbpzList = data
return ''
default:
this.sbzlList = data
return ''
}
})
},
getYsjl(id) {
this.api({
url: '/ysjl/getYsjlById',
method: 'get',
params: {
ysjlId: id
}
}).then(data => {
this.ysjl = data.ysjl
this.complexShow = true
if (this.ysjl.jianyanrenyuan !== null && this.ysjl.jianyanrenyuan.length > 0) {
this.jianyanrenyuan = this.common.convertCnName(this.ysjl.jianyanrenyuan)
}
this.getParam(this.ysjl.id, this.ysjl.shebeizhongleidaima)
if (this.ysjl.shebeileibiedaima) {
this.changeEdgl()
this.getSbList('1000', this.ysjl.shebeileibiedaima, 3)
}
})
},
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.modelId,
order: sort
}
} else {
url = '/jyxm/getCyJyxmByYsjl'
data = {
ysjlId: this.ysjlId,
isReport: false,
order: sort
}
}
this.api({
url: url,
method: 'get',
params: data
}).then(data => {
switch (sort) {
case 1:
this.bgfyData = data
break
}
})
},
onRowClick(row) {
this.$refs.bgfyData.toggleRowSelection(row)
},
/**
* 获取表格中的id, 不为空的检验结果和备注
*/
getProp: function(data) {
const retData = []
for (let i = 0; i < data.length; i++) {
const retRow = {}
retRow.id = data[i].id
if (data[i].jianyanjieguo) {
if (i === 4) {
retRow.jianyanjieguo = '保压时间:' + (this.param.baoyashijian ? this.param.baoyashijian : '') + 'min,试验压力:' + (this.param.shiyanyali ? this.param.shiyanyali : '') + 'MPa'
} else {
retRow.jianyanjieguo = data[i].jianyanjieguo
}
}
if (data[i].beizhu) {
retRow.beizhu = data[i].beizhu
}
retData.push(retRow)
}
return retData
},
saveYsjl: function(operation) {
if (operation === 'add') {
if (!this.jlbh4.trim()) {
this.$message({ message: '请先确认记录编号是否完整!', type: 'warning' })
return false
}
}
this.tableData = []
this.tableData.push(this.getProp(this.bgfyData))
let url = ''
this.ysjl.bglx = 1
this.ysjl.cjState = 'ysjl'
this.ysjl.zfState = '0'
this.ysjl.jlprintState = 0
if (operation === 'add') {
url = '/ysjl/saveYsjl'
this.ysjl.jilubianhao = this.jlbh1 + '' + this.jlbh2 + '' + this.jlbh3 + '-' + this.jlbh4
this.ysjl.jianyanxiangmu = 'gzwx'
} else if (operation === 'build') {
if (!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
}
url = '/ysjl/updateYsjl'
} else if (operation === 'upd') {
url = '/ysjl/updateYsjl'
}
if (this.isRepeat) {
this.$message({ message: '记录编号重复,请先修改记录编号再保存', type: 'error' })
return false
} else {
this.$refs['ysjl'].validate(valid => {
if (valid) {
const jyxm = JSON.stringify(this.tableData)
this.api({
url: url,
method: 'post',
data: {
ysjl: this.ysjl,
param: this.param,
jyxm: jyxm,
bgjyxm: jyxm,
flag: operation
}
}).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
})
// this.$router.push({
// path: '/ysjl/1000/gz/gzwx/' + this.ysjl.id,
// query: { state: 'update', id: this.ysjl.id, departmentId: this.ysjl.departmentId, jianyanrenyuan: this.ysjl.jianyanrenyuan }
// })
} 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-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
}
})
},
querySearch(queryString, cb) {
cb(this.jyjgOption)
},
changeBgjl(val) {
if (val === '符合要求') {
this.ysjl.baogaojielun = '符合'
} else {
this.ysjl.baogaojielun = '不符合'
}
},
/**
* 改变额定功率蒸汽锅炉是t/h其他的是MW
*/
changeEdgl() {
if (this.ysjl.shebeileibiedaima === '1100') {
this.param.edinggonglv = 't/h'
} else {
this.param.edinggonglv = 'MW'
}
}
}
}
</script>

551
src/views/ysjl/1000/jj/jkjd.vue

@ -1,551 +0,0 @@
<!--锅炉改造和重大修理-->
<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')">
预览
</el-button>
<Ft v-if="state !== 'create'" :state="state" :ysjl="ysjl" :ysjl-id="Number(ysjlId ? ysjlId : 0)" :department-id="Number(departmentId ? departmentId : 0)" style="margin-left: 10px;" />
</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="130px">
<fieldset>
<legend>基本信息</legend>
<el-row :gutter="25">
<el-col v-if="state === 'create'" :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:80px" disabled />-
<el-input v-model="jlbh4" style="width:85px" @blur="judgeRepeat(jlbh1 + jlbh2 + jlbh3 + '-' + jlbh4 , 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="shiyongdengjibianhao">
<el-input v-model="ysjl.shiyongdengjibianhao" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="注册代码" prop="zhucedaima">
<el-input v-model="ysjl.zhucedaima" type="text" />
</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" />
</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" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="单位邮编" prop="shiyongdanweiYoubian">
<el-input v-model="ysjl.shiyongdanweiYoubian" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="联系人" prop="shiyongdanweiLianxiren">
<el-input v-model="ysjl.shiyongdanweiLianxiren" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="电话" prop="shiyongdanweiDianhua">
<el-input v-model="ysjl.shiyongdanweiDianhua" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="产品编号" prop="chanpinbianhao">
<el-input v-model="ysjl.chanpinbianhao" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="锅炉型号" prop="guigexinghao">
<el-input v-model="ysjl.guigexinghao" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="额定出力" prop="edingchuli">
<el-input v-model="param.edingchuli" />
</el-form-item>
</el-col>
<el-col :span="3">
<el-select v-model="param.edinggonglv" :disabled="edit" placeholder="请选择">
<el-option label="t/h" value="t/h" />
<el-option label="MW" value="MW" />
</el-select>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="制造单位" prop="zhizaodanwei">
<el-input v-model="ysjl.zhizaodanwei" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="额定压力" prop="edingyali">
<el-input v-model="param.edingyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="额定温度" prop="edingwendu">
<el-input v-model="param.edingwendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<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-col :span="9">
<el-form-item label="制造许可证编号" prop="zhizaoxukezhengbianhao">
<el-input v-model="ysjl.zhizaoxukezhengbianhao" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="制造单位地址" prop="zhizaodanweiDizhi">
<el-input v-model="ysjl.zhizaodanweiDizhi" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="制造许可证级别" prop="zhizaoxukezhengjibie">
<el-input v-model="ysjl.zhizaoxukezhengjibie" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="设备类别" prop="shebeileibiedaima">
<el-select v-model="ysjl.shebeileibiedaima" placeholder="设备类别" style="width: 100%" @change="getSbpzList">
<el-option v-for="item in sblbList" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="设备品种(名称)" prop="shebeipinzhongdaima">
<el-select v-model="ysjl.shebeipinzhongdaima" placeholder="设备品种" style="width: 100%" @change="setSbpz">
<el-option v-for="item in sbpzList" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="产品图号" prop="chanpintuhao">
<el-input v-model="param.chanpintuhao" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="监督检验地点" prop="jiandujianyandizhi">
<el-input v-model="param.jiandujianyandizhi" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>检查与校验</legend>
<el-row :gutter="20" style="text-align:left;margin-left: 50px;font-size: 18px;color: #606266;line-height: 40px;font-weight: bolder;">
按照中华人民共和国特种设备安全法特种设备安全监察条例的规定
<el-select v-model="ysjl.shigongleibie" placeholder="请选择" style="width: 120px;">
<el-option v-for="item in sglbList" :key="item" :label="item" :value="item" />
</el-select> <br>
产品经我机构监督检验安全性能
<el-select v-model="ysjl.baogaojielun" placeholder="请选择" style="width: 100px;" @change="changeJyjl">
<el-option label="符合" value="符合" />
<el-option label="不符合" value="不符合" />
</el-select>
</el-row>
<el-row :gutter="20" style="margin-top: 20px;">
<el-col :span="9">
<el-form-item label="检验日期" prop="jianyanjieshuriqi">
<el-date-picker v-model="ysjl.jianyanjieshuriqi" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="9">
<el-form-item label="监督检验人员" prop="jianyanrenyuan">
<el-input v-model="jianyanrenyuan" disabled />
<el-input v-show="false" v-model="ysjl.jianyanrenyuan" />
</el-form-item>
</el-col>
<el-col :span="9">
<sign-name :jianyanrenyuan="jianyanrenyuan" :ysjl="ysjl" @setSignValue="signNameValue" />
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18" style="height: 150px;">
<el-form-item label="监督检验范围说明:" prop="beizhu" label-width="230px">
<el-input v-model="ysjl.beizhu" :rows="5" :disabled="edit" type="textarea" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
</el-form>
</el-tab-pane>
<el-tab-pane v-if="state !== 'create'" label="检验收费情况" name="jysfqk">
<complex-bill v-if="complexShow" ref="bill" :ysjl="ysjl" />
</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 Ft from '@/views/ysjl/1000/common/glft'
import ComplexBill from '@/views/chargeBill/components/complex'
export default {
name: 'GlJkjdYsjl',
components: { SignName, Sticky, Ft, ComplexBill },
data() {
return {
jlbh1: 'GJK(',
jlbh2: new Date().getFullYear(),
jlbh3: ')',
jlbh4: '',
ysjl: {},
param: {},
state: this.$route.query.state,
jianyanrenyuan: '',
departmentId: this.$route.query.departmentId,
isRepeat: false,
edit: false,
checkedTab: 'first',
sblbList: [],
sbpzList: [],
ysjlId: this.$route.query.id,
sglbList: ['锅炉', '部件', '组件'],
complexShow: false
}
},
computed: {
jilubianhao: function() {
let bianhao
if (!this.ysjl.jilubianhao) {
return this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + this.jlbh4
} else {
bianhao = this.ysjl.jilubianhao
}
return this.judgeRepeat(bianhao, this.ysjl.id)
}
},
watch: {
jlbh4: function(val) {
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + val
this.judgeRepeat(this.ysjl.jilubianhao, this.ysjl.id)
},
jilubianhao: function(newValue) {
this.judgeRepeat(newValue, this.ysjl.id)
}
},
created() {
if (this.state === 'create') {
this.api({
url: '/ysjl/initYsjl',
method: 'post',
data: {
modelId: this.$route.query.modelId,
renwuId: this.$route.query.renwuId,
neibuleibie: this.$route.query.neibuleibie
}
}).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.ysjl.jianyanjielun = '合格'
this.ysjl.baogaojielun = '符合'
this.ysjl.jigouhezhunzhenghao = process.env.VUE_APP_HZZBH
this.ysjl.beizhu = '/'
this.getSbpzList(this.ysjl.shebeileibiedaima)
const sglb = this.sglbList.filter(item => {
return item === this.ysjl.shigongleibie
})
if (sglb.length) {
this.$set(this.ysjl, 'shigongleibie', sglb[0])
} else {
this.$set(this.ysjl, 'shigongleibie', '锅炉')
}
})
this.$set(this.param, 'weihujianxiuqingkuangshuoming', '/')
this.getSblbList()
} else {
this.getYsjl(this.$route.query.id)
this.getSbList('1000', undefined, 2)
}
//
if (!this.ysjl.jilubianhao) {
this.getMaxBh()
}
},
methods: {
//
signNameValue(data) {
this.ysjl.jianyanrenyuan = data.id
this.jianyanrenyuan = data.name
if (this.state !== 'create') {
this.common.signName(this.ysjl.id, this.ysjl.jianyanrenyuan)
Utils.$emit('ysjl-list')
}
},
//
getMaxBh() {
const aheadPart = this.jlbh1 + '' + this.jlbh2 + '' + this.jlbh3
this.api({
url: '/ysjl/gainCurrentBh',
method: 'get',
params: {
aheadPart: aheadPart + '-',
hinderPart: ''
}
}).then(data => {
this.jlbh4 = data
})
},
getSblbList(val) {
this.ysjl.shebeileibiedaima = ''
this.sbpzList = []
this.ysjl.shebeipinzhongdaima = ''
this.getSbList('1000', undefined, 2)
},
getSbpzList(val) {
let obj = {}
obj = this.sblbList.find((item) => { // sblbList
return item.value === val //
})
if (obj) {
this.ysjl.shebeileibie = obj.label
}
this.ysjl.shebeipinzhongdaima = ''
this.ysjl.shebeipinzhong = ''
if (val) {
this.getSbList('1000', val, 3)
}
},
setSbpz(val) {
let obj = {}
obj = this.sbpzList.find((item) => { // userList
return item.value === val //
})
this.ysjl.shebeipinzhong = obj.label
},
getSbList(sbzl, sblb, level) {
this.api({
url: '/sedirectory/getList',
method: 'get',
params: {
sbzl: sbzl,
sblb: sblb,
level: level
}
}).then(data => {
switch (level) {
case 2:
this.sblbList = data
return ''
case 3:
this.sbpzList = data
return ''
default:
this.sbzlList = data
return ''
}
})
},
getYsjl(id) {
this.api({
url: '/ysjl/getYsjlById',
method: 'get',
params: {
ysjlId: id
}
}).then(data => {
this.ysjl = data.ysjl
this.complexShow = true
if (this.ysjl.jianyanrenyuan !== null && this.ysjl.jianyanrenyuan.length > 0) {
this.jianyanrenyuan = this.common.convertCnName(this.ysjl.jianyanrenyuan)
}
this.getParam(this.ysjl.id, this.ysjl.shebeizhongleidaima)
if (this.ysjl.shebeileibiedaima) {
this.getSbList('1000', this.ysjl.shebeileibiedaima, 3)
}
})
},
getParam(ysjlId, sbzldm) {
// id
this.api({
url: '/ysjl/getParamByYsjlId',
method: 'get',
params: {
ysjlId: ysjlId,
sbzldm: sbzldm
}
}).then(data => {
this.param = data
})
},
saveYsjl: function(operation) {
if (operation === 'add') {
if (!this.jlbh4.trim()) {
this.$message({ message: '请先确认记录编号是否完整!', type: 'warning' })
return false
}
}
let url = ''
this.ysjl.bglx = 1
this.ysjl.cjState = 'ysjl'
this.ysjl.zfState = '0'
this.ysjl.jlprintState = 0
if (operation === 'add') {
url = '/ysjl/saveYsjl'
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + this.jlbh4
this.ysjl.jianyanxiangmu = 'jkjd'
} else if (operation === 'build') {
if (!this.ysjl.jianyanrenyuan) {
this.$message({
type: 'error',
message: '请先签名再生成报告!'
})
if (this.ysjl.sfdId === null || this.ysjl.sfdId === '') {
this.$message({
type: 'error',
message: '请先追加或者创建收费单后在尝试!'
})
return false
}
return false
}
url = '/ysjl/updateYsjl'
} else if (operation === 'upd') {
url = '/ysjl/updateYsjl'
}
if (this.isRepeat) {
this.$message({ message: '记录编号重复,请先修改记录编号再保存', type: 'error' })
return false
} else {
this.$refs['ysjl'].validate(valid => {
if (valid) {
this.api({
url: url,
method: 'post',
data: {
ysjl: this.ysjl,
param: this.param,
jyxm: JSON.stringify(this.tableData),
flag: operation
}
}).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
})
// this.$router.push({
// path: '/ysjl/1000/jj/jkjd/' + this.ysjl.id,
// query: { state: 'update', id: this.ysjl.id, departmentId: this.ysjl.departmentId, jianyanrenyuan: this.ysjl.jianyanrenyuan }
// })
} 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-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
}
})
},
changeJyjl(val) {
if (val === '符合') {
this.ysjl.jianyanjielun = '合格'
} else {
this.ysjl.jianyanjielun = '合格'
}
}
}
}
</script>

859
src/views/ysjl/1000/jj/sg.vue

@ -1,859 +0,0 @@
<!--散装锅炉安装监督检验-->
<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 type="primary" size="medium" @click="Signjyxm">
<svg-icon icon-class="sign" />
检验项目批量签名
</el-button>
<el-button type="danger" icon="el-icon-delete" size="medium" @click="signClear">
批量清除签名
</el-button>
<el-button type="success" size="medium" icon="el-icon-edit" @click="batchUpdDate">
批量修改日期
</el-button>
<el-button v-if="state !== 'create'" type="warning" icon="el-icon-view" size="medium" @click="common.viewYsjl(ysjl.id, 'YSJL')">
预览
</el-button>
<Ft v-if="state !== 'create'" :state="state" :ysjl="ysjl" :ysjl-id="Number(ysjlId ? ysjlId : 0)" :department-id="Number(departmentId ? departmentId : 0)" style="margin-left: 10px;" />
</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="130px">
<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" disabled />-
<el-input v-model="jlbh4" style="width:85px" @blur="judgeRepeat(jlbh1 + jlbh2 + jlbh3 + '-' + jlbh4 , 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="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" 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" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="电话" prop="shiyongdanweiDianhua">
<el-input v-model="ysjl.shiyongdanweiDianhua" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="单位邮编" prop="shiyongdanweiYoubian">
<el-input v-model="ysjl.shiyongdanweiYoubian" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="锅炉型号" prop="guigexinghao">
<el-input v-model="ysjl.guigexinghao" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="制造单位" prop="zhizaodanwei">
<el-input v-model="ysjl.zhizaodanwei" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<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-col :span="9">
<el-form-item label="产品编号" prop="chanpinbianhao">
<el-input v-model="ysjl.chanpinbianhao" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="使用编号" prop="danweineibubianhao">
<el-input v-model="ysjl.danweineibubianhao" type="text" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="额定出力" prop="edingchuli">
<el-input v-model="param.edingchuli" />
</el-form-item>
</el-col>
<el-col :span="3">
<el-select v-model="param.edinggonglv" :disabled="true" type="text" placeholder="请选择">
<el-option label="t/h" value="t/h" />
<el-option label="MW" value="MW" />
</el-select>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="额定压力" prop="edingyali">
<el-input v-model="param.edingyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="设备代码" prop="shebeidaima">
<el-input v-model="ysjl.shebeidaima" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="使用压力" prop="shiyongyali">
<el-input v-model="param.shiyongyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="额定温度" prop="edingwendu">
<el-input v-model="param.edingwendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="设备类别" prop="shebeileibiedaima">
<el-select v-model="ysjl.shebeileibiedaima" filterable allow-create default-first-option style="width: 100%" @change="getSbpzList">
<el-option v-for="item in sblbList" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="设备品种(名称)" prop="shebeipinzhongdaima">
<el-select v-model="ysjl.shebeipinzhongdaima" filterable allow-create default-first-option style="width: 100%" @change="setSbpz">
<el-option v-for="item in sbpzList" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="允许工作压力" prop="gongzuoyali">
<el-input v-model="param.gongzuoyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="允许工作温度" prop="yunxugongzuowendu">
<el-input v-model="param.yunxugongzuowendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="施工单位" prop="shigongdanwei">
<el-input v-model="ysjl.shigongdanwei" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="许可级别" prop="shigongxukezhengjibie">
<el-input v-model="ysjl.shigongxukezhengjibie" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="许可证编号" prop="shigongxukezheng">
<el-input v-model="ysjl.shigongxukezheng" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="告知书编号" prop="gaozhibianhao">
<el-input v-model="param.gaozhibianhao" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="施工单位联系人" prop="shigongdanweiLianxiren">
<el-input v-model="ysjl.shigongdanweiLianxiren" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="施工单位联系电话" prop="shigongdanweiDianhua">
<el-input v-model="ysjl.shigongdanweiDianhua" type="text" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>检验信息</legend>
<el-row :gutter="20" style="text-align:left;margin-left: 50px;font-size: 18px;color: #606266;line-height: 40px;font-weight: bolder;">
按照中华人民共和国特种设备安全法特种设备安全监察条例的规定该锅炉的<u>安装</u><br>
经我机构实施监督检验安全性能
<el-select v-model="ysjl.baogaojielun" placeholder="请选择" style="width: 100px;" @change="changeJyjl">
<el-option label="符合" value="符合" />
<el-option label="不符合" value="不符合" />
</el-select>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="检验日期" prop="jianyanjieshuriqi">
<el-date-picker v-model="ysjl.jianyanjieshuriqi" type="date" 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" type="date" placeholder="选择日期" style="width: 100%;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="9">
<el-form-item label="检验人员" prop="jianyanrenyuan">
<el-input v-model="jianyanrenyuan" disabled />
<el-input v-show="false" v-model="ysjl.jianyanrenyuan" />
</el-form-item>
</el-col>
<el-col :span="9">
<sign-name :jianyanrenyuan="jianyanrenyuan" :ysjl="ysjl" @setSignValue="signNameValue" />
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18" style="height: 130px;">
<el-form-item label="说明:" prop="beizhu">
<el-input v-model="ysjl.beizhu" :rows="5" :disabled="edit" type="textarea" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
</el-form>
</el-tab-pane>
<el-tab-pane label="散装锅炉安装监督检验项目表" name="second">
<el-form class="el-form">
<el-row :gutter="20">
<el-col :span="18" style="height: 170px;">
<el-form-item label="记事" prop="shuoming" label-width="150px">
<el-input v-model="param.shuoming" :rows="5" :disabled="edit" type="textarea" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table ref="bgfyData" :data="bgfyData" :span-method="tableJs.mergeColRows" border stripe style="width:90%" @row-click="onRowClick">
<el-table-column type="selection" width="55" prop="checkbox" />
<el-table-column type="index" align="center" width="50" label="序号" />
<el-table-column align="center" label="监检项目">
<el-table-column align="center" prop="jianyanxiang" width="90" label="检验项" />
<el-table-column align="left" prop="jianyanneirong" label="检验内容" />
</el-table-column>
<el-table-column align="center" prop="xiangmuleibie" width="100" label="类别">
<template slot-scope="scope">
<!--el-checkbox-group-- v-if="showXmlb(scope.$index)" v-model="scope.row.xiangmuleibie">
<el-checkbox label="B" true-label="B" false-label="C" :disabled="edit" border />
<el-checkbox label="C" true-label="C" false-label="B" :disabled="edit" border />
</el-checkbox-group-->
<el-select v-if="showXmlb(scope.$index)" v-model="scope.row.xiangmuleibie" style="width:60px;">
<el-option value="B">
B
</el-option>
<el-option value="C">
C
</el-option>
</el-select>
<span v-else>{{ scope.row.xiangmuleibie }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="检验检测情况或结果">
<el-table-column align="center" prop="jyjg1" width="90" label="合格">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.jyjg1" label="√" true-label="" border @change="changeJyjg(scope.$index, 'jyjg1')" />
</template>
</el-table-column>
<el-table-column align="center" prop="jyjg2" width="90" label="不合格">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.jyjg2" label="√" true-label="" border @change="changeJyjg(scope.$index, 'jyjg2')" />
</template>
</el-table-column>
<el-table-column align="center" prop="jianyanjieguo" width="90" label="无此项">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.jianyanjieguo" label="√" true-label="" border @change="changeJyjg(scope.$index, 'jianyanjieguo')" />
</template>
</el-table-column>
</el-table-column>
<el-table-column :formatter="formatterJianjianyuan" align="center" prop="jianjianyuan" width="150" label="监检员" />
<el-table-column align="center" prop="querenriqi" width="160" label="日期">
<template slot-scope="scope">
<el-date-picker v-model="scope.row.querenriqi" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%;" />
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane v-if="state !== 'create'" label="检验收费情况" name="jysfqk">
<complex-bill v-if="complexShow" ref="bill" :ysjl="ysjl" />
</el-tab-pane>
</el-tabs>
<el-dialog :visible.sync="jyxmrqShow" title="批量修改日期" width="500px" @close="closeDialog">
<template>
<el-date-picker v-model="querenriqi" type="date" value-format="yyyy-MM-dd" 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>
<sign-name v-show="signShow" ref="qmButton" :ysjl="ysjl" :jianyanrenyuan="xmjianyanrenyuan" field-name="xmqianming" @setSignValue="signNameValue" />
</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 Ft from '@/views/ysjl/1000/common/glft'
import ComplexBill from '@/views/chargeBill/components/complex'
export default {
name: 'GlSgjdYsjl',
components: { SignName, Sticky, Ft, ComplexBill },
data() {
return {
jlbh1: 'GSA(',
jlbh2: new Date().getFullYear(),
jlbh3: ')',
jlbh4: '',
ysjl: {},
param: {},
jyxm: 'sgjd',
path: '/ysjl/1000/sg/sgjd/',
state: this.$route.query.state,
jianyanrenyuan: '',
departmentId: this.$route.query.departmentId,
isRepeat: false,
edit: false,
bgfyData: [],
tableData: [],
checkedTab: 'first',
xmjianyanrenyuan: '',
//
//
cols: [
{
name: 'checkbox', // el-table-column prop=''
getValue(row) {
return row.jianyanxiang
}
},
{
name: 'jianyanxiang', // el-table-column prop=''
getValue(row) { //
return row.jianyanxiang
}
},
{
name: 'jianyanneirong',
getValue(row) {
return row.jianyanneirong
}
},
{
name: 'jianjianyuan',
getValue(row) {
return row.jianyanxiang
}
},
{
name: 'querenriqi',
getValue(row) {
return row.jianyanxiang
}
}
],
//
rows: [
{
name: 'jianyanxiang',
getValue(row) {
return row.jianyanxiang
}
},
{
name: 'jianyanneirong',
getValue(row) {
return row.jianyanneirong
}
},
{
name: 'jianjianyuan',
getValue(row) {
return row.jianyanxiang
}
}
],
signShow: false,
jyxmrqShow: false,
querenriqi: new Date(),
sblbList: [],
sbpzList: [],
ysjlId: this.$route.query.id,
fieldArr: ['jyjg1', 'jyjg2', 'jianyanjieguo'],
xmlbList: ['B', 'C'],
showXmlbIndexListSg: [2, 26, 28, 38, 39, 40, 41, 46, 47, 56, 73],
complexShow: false
}
},
computed: {
jilubianhao: function() {
let bianhao
if (!this.ysjl.jilubianhao) {
return this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + this.jlbh4
} else {
bianhao = this.ysjl.jilubianhao
}
return this.judgeRepeat(bianhao, this.ysjl.id)
}
},
watch: {
jlbh4: function(val) {
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + val
this.judgeRepeat(this.ysjl.jilubianhao, this.ysjl.id)
},
jilubianhao: function(newValue) {
this.judgeRepeat(newValue, this.ysjl.id)
}
},
created() {
if (this.state === 'create') {
this.api({
url: '/ysjl/initYsjl',
method: 'post',
data: {
modelId: this.$route.query.modelId,
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')
const currentDate = new Date()
const xcjyrq = new Date((currentDate.getFullYear() + 1) + '-' + (currentDate.getMonth() + 1) + '-' + currentDate.getDate())
this.ysjl.xiacijianyanriqi = xcjyrq.setDate(xcjyrq.getDate() - 1)
this.ysjl.jianyanjielun = '合格'
this.ysjl.baogaojielun = '符合'
this.ysjl.jigouhezhunzhenghao = process.env.VUE_APP_HZZBH
this.ysjl.beizhu = '/'
this.ysjl.zhizaoriqi = ''
this.changeEdgl()
this.getSbList('1000', this.ysjl.shebeileibiedaima, 3)
})
this.getMaxBh()
this.$set(this.param, 'hasYijiantongzhishu', '无。')
} else {
this.getYsjl(this.$route.query.id)
}
this.getSbList('1000', undefined, 2)
this.getJyxm(1)
},
methods: {
/**
* 格式化监检员
*/
formatterJianjianyuan(row) {
if (row.jianjianyuan) {
if (typeof (row.jianjianyuan) === 'number') {
row.jianjianyuan = row.jianjianyuan.toString()
}
return this.common.convertCnName(row.jianjianyuan)
}
},
//
signNameValue(data) {
if (data.fieldName === 'xmqianming') {
this.jyxmController.findFirstJyxAndSignName(this.$refs.bgfyData.selection, this.bgfyData, data)
this.signShow = false
} else {
this.ysjl.jianyanrenyuan = data.id
this.jianyanrenyuan = data.name
if (this.state !== 'create') {
this.common.signName(this.ysjl.id, this.ysjl.jianyanrenyuan)
Utils.$emit('ysjl-list')
}
}
},
//
getMaxBh() {
const aheadPart = this.jlbh1 + '' + this.jlbh2 + '' + this.jlbh3
this.api({
url: '/ysjl/gainCurrentBh',
method: 'get',
params: {
aheadPart: aheadPart + '-',
hinderPart: ''
}
}).then(data => {
this.jlbh4 = data
})
},
getSbpzList(val) {
this.changeEdgl()
let obj = {}
obj = this.sblbList.find((item) => { // sblbList
return item.value === val //
})
this.ysjl.shebeileibie = obj.label
this.ysjl.shebeipinzhongdaima = ''
this.ysjl.shebeipinzhong = ''
if (val) {
this.getSbList('1000', val, 3)
}
},
setSbpz(val) {
let obj = {}
obj = this.sbpzList.find((item) => { // userList
return item.value === val //
})
this.ysjl.shebeipinzhong = obj.label
},
getSbList(sbzl, sblb, level) {
this.api({
url: '/sedirectory/getList',
method: 'get',
params: {
sbzl: sbzl,
sblb: sblb,
level: level
}
}).then(data => {
switch (level) {
case 2:
this.sblbList = data
return ''
case 3:
this.sbpzList = data
return ''
default:
this.sbzlList = data
return ''
}
})
},
getYsjl(id) {
this.api({
url: '/ysjl/getYsjlById',
method: 'get',
params: {
ysjlId: id
}
}).then(data => {
this.ysjl = data.ysjl
this.complexShow = true
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)
this.changeEdgl()
this.getSbList('1000', this.ysjl.shebeileibiedaima, 3)
})
},
getParam(ysjlId, sbzldm) {
// id
this.api({
url: '/ysjl/getParamByYsjlId',
method: 'get',
params: {
ysjlId: ysjlId,
sbzldm: sbzldm
}
}).then(data => {
this.param = data
})
},
//
getJyxm(sort) {
this.jyxmController.getJyxm(this.$route.query.modelId, this.$route.query.id, sort, this.state, false).then(data => {
switch (sort) {
case 1:
this.bgfyData = data
this.jyxmController.initJjyJyxm(this.state, this.bgfyData)
this.tableJs.getData(this.cols, this.rows, this.bgfyData)
break
}
})
},
/**
* 获取表格中的id, 不为空的检验结果和备注
*/
getProp: function(data) {
const retData = []
const fields = ['xiangmuleibie', 'jyjg1', 'jyjg2', 'jianyanjieguo', 'jianjianyuan', 'querenriqi']
for (let i = 0; i < data.length; i++) {
const retRow = {}
retRow.id = data[i].id
fields.forEach(field => {
if (data[i][field]) {
retRow[field] = data[i][field]
}
})
retData.push(retRow)
}
return retData
},
/**
* 检验项目批量签名
*/
Signjyxm() {
if (this.$refs.bgfyData.selection.length === 0) {
this.$message('请在列表选择要签名的数据。')
return
}
this.signShow = true
this.$refs.qmButton.dialogFormVisible = true
},
/**
* 检验项目清除签名
*/
signClear: function() {
if (this.$refs.bgfyData.selection.length === 0) {
this.$message('请在列表选择要清除签名的数据。')
return
}
this.$refs.qmButton.clearSign()
},
closeDialog() {
this.jyxmrqShow = false
},
onRowClick(row) {
this.$refs.bgfyData.toggleRowSelection(row)
},
batchUpdDate() {
if (this.$refs.bgfyData.selection.length === 0) {
this.$message('请在列表选择要修改日期的数据。')
return false
}
this.jyxmrqShow = true
},
batchUpd() {
for (let i = 0; i < this.$refs.bgfyData.selection.length; i++) {
this.$refs.bgfyData.selection[i].querenriqi = this.querenriqi
for (let j = 0; j < this.bgfyData.length; j++) {
if (this.bgfyData[j].id === this.$refs.bgfyData.selection[i].id) {
this.$set(this.bgfyData[j], this.$refs.bgfyData.selection[i])
}
}
}
this.jyxmrqShow = false
},
saveYsjl: function(operation) {
if (operation === 'add') {
if (!this.jlbh4.trim()) {
this.$message({ message: '请先确认记录编号是否完整!', type: 'warning' })
return false
}
}
this.tableData = []
this.tableData.push(this.getProp(this.bgfyData))
let url = ''
this.ysjl.bglx = 1
this.ysjl.cjState = 'ysjl'
this.ysjl.zfState = '0'
this.ysjl.jlprintState = 0
if (operation === 'add') {
url = '/ysjl/saveYsjl'
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + this.jlbh4
this.ysjl.jianyanxiangmu = this.jyxm
} else if (operation === 'build') {
if (!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
}
url = '/ysjl/updateYsjl'
} else if (operation === 'upd') {
url = '/ysjl/updateYsjl'
}
if (this.isRepeat) {
this.$message({ message: '记录编号重复,请先修改记录编号再保存', type: 'error' })
return false
} else {
this.$refs['ysjl'].validate(valid => {
if (valid) {
this.api({
url: url,
method: 'post',
data: {
ysjl: this.ysjl,
param: this.param,
jyxm: JSON.stringify(this.tableData),
flag: operation
}
}).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
})
// this.$router.push({
// path: this.path + this.ysjl.id,
// query: { state: 'update', id: this.ysjl.id, departmentId: this.ysjl.departmentId, jianyanrenyuan: this.ysjl.jianyanrenyuan }
// })
} 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-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
}
})
},
changeJyjl(val) {
if (val === '符合') {
//
this.ysjl.jianyanjielun = '合格'
const xcjyrq = new Date(this.ysjl.jianyanjieshuriqi)
xcjyrq.setFullYear(xcjyrq.getFullYear() + 1)
this.ysjl.xiacijianyanriqi = xcjyrq.setDate(xcjyrq.getDate() - 1)
} else {
//
this.ysjl.jianyanjielun = '不合格'
const xcjyrq = new Date(this.ysjl.jianyanjieshuriqi)
xcjyrq.setMonth(xcjyrq.getMonth() + 1 + 2)
this.ysjl.xiacijianyanriqi = xcjyrq.setDate(xcjyrq.getDate() - 1)
}
},
/**
* 改变额定功率蒸汽锅炉是t/h其他的是MW
*/
changeEdgl() {
if (this.ysjl.shebeileibiedaima === '1100') {
this.param.edinggonglv = 't/h'
} else {
this.param.edinggonglv = 'MW'
}
},
/**
*
* @param $index
* @param field
*/
changeJyjg($index, field) {
this.fieldArr.forEach(currentField => {
if (field !== currentField) {
this.bgfyData[$index][currentField] = ''
}
})
},
/**
* 是否可编辑
* @param $index
* @returns {number}
*/
showXmlb($index) {
return this.showXmlbIndexListSg.filter(xl => {
return xl === $index
}).length
}
}
}
</script>

14
src/views/ysjl/1000/jj/sz/dzscl.vue

@ -1,14 +0,0 @@
<!--电站锅炉运行水处理监督检验原始记录-->
<template>
<gl-dzscl-ysjl />
</template>
<script>
import GlDzsclYsjl from '@/views/ysjl/1000/common/sz/dzscl'
export default {
name: 'GlJjDzsclYsjl',
components: { GlDzsclYsjl }
}
</script>
<style>
</style>

14
src/views/ysjl/1000/jj/sz/gyscl.vue

@ -1,14 +0,0 @@
<!--工业锅炉运行水处理监督检验原始记录-->
<template>
<gl-gyscl-ysjl />
</template>
<script>
import GlGysclYsjl from '@/views/ysjl/1000/common/sz/gyscl'
export default {
name: 'GlJjGysclYsjl',
components: { GlGysclYsjl }
}
</script>
<style>
</style>

941
src/views/ysjl/1000/jj/zg.vue

@ -1,941 +0,0 @@
<!--整装锅炉安装监督检验-->
<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 type="primary" size="medium" @click="Signjyxm">
<svg-icon icon-class="sign" />
检验项目批量签名
</el-button>
<el-button type="danger" icon="el-icon-delete" size="medium" @click="signClear">
批量清除签名
</el-button>
<el-button type="success" size="medium" icon="el-icon-edit" @click="batchUpdDate">
批量修改日期
</el-button>
<el-button v-if="state !== 'create'" type="warning" icon="el-icon-view" size="medium" @click="common.viewYsjl(ysjl.id, 'YSJL')">
预览
</el-button>
<Ft v-if="state !== 'create'" :state="state" :ysjl="ysjl" :ysjl-id="Number(ysjlId ? ysjlId : 0)" :department-id="Number(departmentId ? departmentId : 0)" style="margin-left: 10px;" />
</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="130px">
<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:80px" disabled />-
<el-input v-model="jlbh4" style="width:85px" @blur="judgeRepeat(jlbh1 + jlbh2 + jlbh3 + '-' + jlbh4 , 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="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" 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" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="电话" prop="shiyongdanweiDianhua">
<el-input v-model="ysjl.shiyongdanweiDianhua" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="单位邮编" prop="shiyongdanweiYoubian">
<el-input v-model="ysjl.shiyongdanweiYoubian" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="锅炉型号" prop="guigexinghao">
<el-input v-model="ysjl.guigexinghao" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="制造单位" prop="zhizaodanwei">
<el-input v-model="ysjl.zhizaodanwei" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<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-col :span="9">
<el-form-item label="产品编号" prop="chanpinbianhao">
<el-input v-model="ysjl.chanpinbianhao" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="使用编号" prop="danweineibubianhao">
<el-input v-model="ysjl.danweineibubianhao" type="text" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="额定出力" prop="edingchuli">
<el-input v-model="param.edingchuli" />
</el-form-item>
</el-col>
<el-col :span="3">
<el-select v-model="param.edinggonglv" :disabled="true" type="text" placeholder="请选择">
<el-option label="t/h" value="t/h" />
<el-option label="MW" value="MW" />
</el-select>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="额定压力" prop="edingyali">
<el-input v-model="param.edingyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="设备代码" prop="shebeidaima">
<el-input v-model="ysjl.shebeidaima" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="使用压力" prop="shiyongyali">
<el-input v-model="param.shiyongyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="额定温度" prop="edingwendu">
<el-input v-model="param.edingwendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="设备类别" prop="shebeileibiedaima">
<el-select v-model="ysjl.shebeileibiedaima" filterable allow-create default-first-option style="width: 100%" @change="getSbpzList">
<el-option v-for="item in sblbList" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="设备品种(名称)" prop="shebeipinzhongdaima">
<el-select v-model="ysjl.shebeipinzhongdaima" filterable allow-create default-first-option style="width: 100%" @change="setSbpz">
<el-option v-for="item in sbpzList" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="允许工作压力" prop="gongzuoyali">
<el-input v-model="param.gongzuoyali">
<template slot="append">
MPa
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="允许工作温度" prop="yunxugongzuowendu">
<el-input v-model="param.yunxugongzuowendu">
<template slot="append">
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="施工单位" prop="shigongdanwei">
<el-input v-model="ysjl.shigongdanwei" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="许可级别" prop="shigongxukezhengjibie">
<el-input v-model="ysjl.shigongxukezhengjibie" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="许可证编号" prop="shigongxukezheng">
<el-input v-model="ysjl.shigongxukezheng" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="告知书编号" prop="gaozhibianhao">
<el-input v-model="param.gaozhibianhao" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="施工单位联系人" prop="shigongdanweiLianxiren">
<el-input v-model="ysjl.shigongdanweiLianxiren" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="施工单位联系电话" prop="shigongdanweiDianhua">
<el-input v-model="ysjl.shigongdanweiDianhua" type="text" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>检验信息</legend>
<el-row :gutter="20" style="text-align:left;margin-left: 50px;font-size: 18px;color: #606266;line-height: 40px;font-weight: bolder;">
按照中华人民共和国特种设备安全法特种设备安全监察条例的规定该锅炉的<u>安装</u><br>
经我机构实施监督检验安全性能
<el-select v-model="ysjl.baogaojielun" placeholder="请选择" style="width: 100px;" @change="changeJyjl">
<el-option label="符合" value="符合" />
<el-option label="不符合" value="不符合" />
</el-select>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="是否有监督检验工作联络单或监督检验工作意见通知书" prop="hasYijiantongzhishu" label-width="350px">
<el-input v-model="param.hasYijiantongzhishu" :disabled="edit" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18" style="height: 70px;">
<el-form-item label="处理情况" prop="quexianjiqichuli">
<el-input v-model="param.quexianjiqichuli" :rows="3" type="textarea" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" style="margin-top: 20px;">
<el-col :span="9">
<!-- 开始安装日期就是开工告知日期 -->
<el-form-item label="开始安装日期" prop="gaozhiriqi">
<el-date-picker v-model="param.gaozhiriqi" type="date" value-format="yyyy年MM月dd日" placeholder="选择日期" style="width: 100%;" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="水压试验日期" prop="shiyanriqi">
<el-date-picker v-model="param.shiyanriqi" type="date" placeholder="选择日期" style="width: 75%;" />
<el-button type="primary" title="同步检验项中第1大项到第9大项的监检日期" icon="el-icon-refresh" size="mini" @click="syncRq(0, 38, param.shiyanriqi)" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="试运行完毕日期" prop="shiyunxingriqi">
<el-date-picker v-model="param.shiyunxingriqi" type="date" value-format="yyyy年MM月dd日" placeholder="选择日期" style="width: 75%;" />
<el-button type="primary" title="同步检验项中第10大项到第12大项的监检日期" icon="el-icon-refresh" size="mini" @click="syncRq(44, bgfyData.length, param.shiyunxingriqi)" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="安装资料送审日期" prop="anzhuangziliaosongshenriqi">
<el-date-picker v-model="param.anzhuangziliaosongshenriqi" 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="jianyanjieshuriqi">
<el-date-picker v-model="ysjl.jianyanjieshuriqi" type="date" 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" type="date" placeholder="选择日期" style="width: 100%;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="9">
<el-form-item label="检验人员" prop="jianyanrenyuan">
<el-input v-model="jianyanrenyuan" disabled />
<el-input v-show="false" v-model="ysjl.jianyanrenyuan" />
</el-form-item>
</el-col>
<el-col :span="9">
<sign-name :jianyanrenyuan="jianyanrenyuan" :ysjl="ysjl" @setSignValue="signNameValue" />
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18" style="height: 130px;">
<el-form-item label="说明:" prop="beizhu">
<el-input v-model="ysjl.beizhu" :rows="5" :disabled="edit" type="textarea" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
</el-form>
</el-tab-pane>
<el-tab-pane label="整装锅炉安装监督检验项目表" name="second">
<el-form class="el-form">
<el-row :gutter="20">
<el-col :span="18" style="height: 170px;">
<el-form-item label="其他记录的内容:" prop="shuoming" label-width="150px">
<el-input v-model="param.shuoming" :rows="5" :disabled="edit" type="textarea" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table ref="bgfyData" :data="bgfyData" :span-method="tableJs.mergeColRows" border stripe style="width:90%" @row-click="onRowClick">
<el-table-column type="selection" width="55" prop="checkbox" />
<el-table-column type="index" align="center" width="50" label="序号" />
<el-table-column align="center" label="监检项目">
<el-table-column align="center" prop="jianyanxiang" width="70" label="检验项" />
<el-table-column align="left" prop="jianyanneirong" label="检验内容" />
</el-table-column>
<el-table-column align="center" prop="xiangmuleibie" width="100" label="类别">
<template slot-scope="scope">
<!-- <el-checkbox-group v-if="showXmlb(scope.$index)" v-model="scope.row.xiangmuleibie" @change="changeXmlb(scope.$index)">-->
<!-- <el-checkbox label="B" true-label="B" false-label="C" :disabled="edit || editStatus(scope.$index)" border />-->
<!-- <el-checkbox label="C" true-label="C" false-label="B" :disabled="edit || editStatus(scope.$index)" border />-->
<!-- </el-checkbox-group>-->
<el-select v-if="showXmlb(scope.$index)" v-model="scope.row.xiangmuleibie" style="width:60px;" :disabled="edit || editStatus(scope.$index)" @change="changeXmlb(scope.$index)">
<el-option value="B">
B
</el-option>
<el-option value="C">
C
</el-option>
</el-select>
<span v-else>{{ scope.row.xiangmuleibie }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="检验检测情况或结果">
<el-table-column align="center" prop="jyjg1" width="90" label="合格">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.jyjg1" label="√" true-label="" border @change="changeJyjg(scope.$index, 'jyjg1')" />
</template>
</el-table-column>
<el-table-column align="center" prop="jyjg2" width="90" label="不合格">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.jyjg2" label="√" true-label="" border @change="changeJyjg(scope.$index, 'jyjg2')" />
</template>
</el-table-column>
<el-table-column align="center" prop="jianyanjieguo" width="90" label="无此项">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.jianyanjieguo" label="√" true-label="" border @change="changeJyjg(scope.$index, 'jianyanjieguo')" />
</template>
</el-table-column>
</el-table-column>
<el-table-column :formatter="formatterJianjianyuan" align="center" prop="jianjianyuan" width="100" label="监检员" />
<el-table-column align="center" prop="querenriqi" width="160" label="日期">
<template slot-scope="scope">
<el-date-picker v-model="scope.row.querenriqi" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%;" />
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane v-if="state !== 'create'" label="检验收费情况" name="jysfqk">
<complex-bill v-if="complexShow" ref="bill" :ysjl="ysjl" />
</el-tab-pane>
</el-tabs>
<el-dialog :visible.sync="jyxmrqShow" title="批量修改日期" width="500px" @close="closeDialog">
<template>
<el-date-picker v-model="querenriqi" type="date" value-format="yyyy-MM-dd" 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>
<sign-name v-show="signShow" ref="qmButton" :ysjl="ysjl" :jianyanrenyuan="xmjianyanrenyuan" field-name="xmqianming" @setSignValue="signNameValue" />
</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 Ft from '@/views/ysjl/1000/common/glft'
import ComplexBill from '@/views/chargeBill/components/complex'
export default {
name: 'GlZgjdYsjl',
components: { SignName, Sticky, Ft, ComplexBill },
data() {
return {
jlbh1: 'GZA(',
jlbh2: new Date().getFullYear(),
jlbh3: ')',
jlbh4: '',
ysjl: {},
param: {},
jyxm: 'zgjd',
path: '/ysjl/1000/zg/zgjd/',
state: this.$route.query.state,
jianyanrenyuan: '',
departmentId: this.$route.query.departmentId,
isRepeat: false,
edit: false,
bgfyData: [],
tableData: [],
checkedTab: 'first',
xmjianyanrenyuan: '',
//
//
cols: [
{
name: 'checkbox', // el-table-column prop=''
getValue(row) {
return row.jianyanxiang
}
},
{
name: 'jianyanxiang', // el-table-column prop=''
getValue(row) { //
return row.jianyanxiang
}
},
{
name: 'jianyanneirong',
getValue(row) {
return row.jianyanneirong
}
},
{
name: 'jianjianyuan',
getValue(row) {
return row.jianyanxiang
}
},
{
name: 'querenriqi',
getValue(row) {
return row.jianyanxiang
}
}
],
//
rows: [
{
name: 'jianyanxiang',
getValue(row) {
return row.jianyanxiang
}
},
{
name: 'jianyanneirong',
getValue(row) {
return row.jianyanneirong
}
},
{
name: 'jianjianyuan',
getValue(row) {
return row.jianyanxiang
}
}
],
signShow: false,
jyxmrqShow: false,
querenriqi: new Date(),
sblbList: [],
sbpzList: [],
ysjlId: this.$route.query.id,
fieldArr: ['jyjg1', 'jyjg2', 'jianyanjieguo'],
xmlbList: ['B', 'C'],
showXmlbIndexListZg: [1, 16, 22, 45, 46, 47, 48, 49, 50, 51, 52],
disabledEdit: [46, 47, 48, 49, 50, 51, 52],
complexShow: false
}
},
computed: {
jilubianhao: function() {
let bianhao
if (!this.ysjl.jilubianhao) {
return this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + this.jlbh4
} else {
bianhao = this.ysjl.jilubianhao
}
return this.judgeRepeat(bianhao, this.ysjl.id)
}
},
watch: {
jlbh4: function(val) {
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + val
this.judgeRepeat(this.ysjl.jilubianhao, this.ysjl.id)
},
jilubianhao: function(newValue) {
this.judgeRepeat(newValue, this.ysjl.id)
}
},
created() {
if (this.state === 'create') {
this.api({
url: '/ysjl/initYsjl',
method: 'post',
data: {
modelId: this.$route.query.modelId,
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')
const currentDate = new Date()
const xcjyrq = new Date((currentDate.getFullYear() + 1) + '-' + (currentDate.getMonth() + 1) + '-' + currentDate.getDate())
this.ysjl.xiacijianyanriqi = xcjyrq.setDate(xcjyrq.getDate() - 1)
this.ysjl.jianyanjielun = '合格'
this.ysjl.baogaojielun = '符合'
this.ysjl.jigouhezhunzhenghao = process.env.VUE_APP_HZZBH
this.$set(this.param, 'shiyunxingriqi', this.formatter.dateFormat('YYYY年MM月dd日'))
this.ysjl.beizhu = '/'
this.ysjl.zhizaoriqi = ''
this.changeEdgl()
this.getSbList('1000', this.ysjl.shebeileibiedaima, 3)
})
this.getMaxBh()
this.$set(this.param, 'hasYijiantongzhishu', '无。')
} else {
this.getYsjl(this.$route.query.id)
}
this.getSbList('1000', undefined, 2)
this.getJyxm(1)
},
methods: {
/**
* 格式化监检员
*/
formatterJianjianyuan(row) {
if (row.jianjianyuan) {
if (typeof (row.jianjianyuan) === 'number') {
row.jianjianyuan = row.jianjianyuan.toString()
}
return this.common.convertCnName(row.jianjianyuan)
}
},
//
signNameValue(data) {
if (data.fieldName === 'xmqianming') {
this.jyxmController.findFirstJyxAndSignName(this.$refs.bgfyData.selection, this.bgfyData, data)
this.signShow = false
} else {
this.ysjl.jianyanrenyuan = data.id
this.jianyanrenyuan = data.name
if (this.state !== 'create') {
this.common.signName(this.ysjl.id, this.ysjl.jianyanrenyuan)
Utils.$emit('ysjl-list')
}
}
},
//
getMaxBh() {
const aheadPart = this.jlbh1 + '' + this.jlbh2 + '' + this.jlbh3
this.api({
url: '/ysjl/gainCurrentBh',
method: 'get',
params: {
aheadPart: aheadPart + '-',
hinderPart: ''
}
}).then(data => {
this.jlbh4 = data
})
},
getSbpzList(val) {
this.changeEdgl()
let obj = {}
obj = this.sblbList.find((item) => { // sblbList
return item.value === val //
})
this.ysjl.shebeileibie = obj.label
this.ysjl.shebeipinzhongdaima = ''
this.ysjl.shebeipinzhong = ''
if (val) {
this.getSbList('1000', val, 3)
}
},
setSbpz(val) {
let obj = {}
obj = this.sbpzList.find((item) => { // userList
return item.value === val //
})
this.ysjl.shebeipinzhong = obj.label
},
getSbList(sbzl, sblb, level) {
this.api({
url: '/sedirectory/getList',
method: 'get',
params: {
sbzl: sbzl,
sblb: sblb,
level: level
}
}).then(data => {
switch (level) {
case 2:
this.sblbList = data
return ''
case 3:
this.sbpzList = data
return ''
default:
this.sbzlList = data
return ''
}
})
},
getYsjl(id) {
this.api({
url: '/ysjl/getYsjlById',
method: 'get',
params: {
ysjlId: id
}
}).then(data => {
this.ysjl = data.ysjl
this.complexShow = true
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)
this.changeEdgl()
this.getSbList('1000', this.ysjl.shebeileibiedaima, 3)
})
},
getParam(ysjlId, sbzldm) {
// id
this.api({
url: '/ysjl/getParamByYsjlId',
method: 'get',
params: {
ysjlId: ysjlId,
sbzldm: sbzldm
}
}).then(data => {
this.param = data
})
},
//
getJyxm(sort) {
this.jyxmController.getJyxm(this.$route.query.modelId, this.$route.query.id, sort, this.state, false).then(data => {
switch (sort) {
case 1:
this.bgfyData = data
this.jyxmController.initJjyJyxm(this.state, this.bgfyData)
this.tableJs.getData(this.cols, this.rows, this.bgfyData)
break
}
})
},
/**
* 获取表格中的id, 不为空的检验结果和备注
*/
getProp: function(data) {
const retData = []
const fields = ['xiangmuleibie', 'jyjg1', 'jyjg2', 'jianyanjieguo', 'jianjianyuan', 'querenriqi']
for (let i = 0; i < data.length; i++) {
const retRow = {}
retRow.id = data[i].id
fields.forEach(field => {
if (data[i][field]) {
retRow[field] = data[i][field]
}
})
retData.push(retRow)
}
return retData
},
/**
* 检验项目批量签名
*/
Signjyxm() {
if (this.$refs.bgfyData.selection.length === 0) {
this.$message('请在列表选择要签名的数据。')
return
}
this.signShow = true
this.$refs.qmButton.dialogFormVisible = true
},
/**
* 检验项目清除签名
*/
signClear: function() {
if (this.$refs.bgfyData.selection.length === 0) {
this.$message('请在列表选择要清除签名的数据。')
return
}
this.$refs.qmButton.clearSign()
},
closeDialog() {
this.jyxmrqShow = false
},
onRowClick(row) {
this.$refs.bgfyData.toggleRowSelection(row)
},
batchUpdDate() {
if (this.$refs.bgfyData.selection.length === 0) {
this.$message('请在列表选择要修改日期的数据。')
return false
}
this.jyxmrqShow = true
},
batchUpd() {
for (let i = 0; i < this.$refs.bgfyData.selection.length; i++) {
this.$refs.bgfyData.selection[i].querenriqi = this.querenriqi
for (let j = 0; j < this.bgfyData.length; j++) {
if (this.bgfyData[j].id === this.$refs.bgfyData.selection[i].id) {
this.$set(this.bgfyData[j], this.$refs.bgfyData.selection[i])
}
}
}
this.jyxmrqShow = false
},
saveYsjl: function(operation) {
if (operation === 'add') {
if (!this.jlbh4.trim()) {
this.$message({ message: '请先确认记录编号是否完整!', type: 'warning' })
return false
}
}
this.tableData = []
this.tableData.push(this.getProp(this.bgfyData))
let url = ''
this.ysjl.bglx = 1
this.ysjl.cjState = 'ysjl'
this.ysjl.zfState = '0'
this.ysjl.jlprintState = 0
if (operation === 'add') {
url = '/ysjl/saveYsjl'
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + this.jlbh4
this.ysjl.jianyanxiangmu = this.jyxm
} else if (operation === 'build') {
if (!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
}
url = '/ysjl/updateYsjl'
} else if (operation === 'upd') {
url = '/ysjl/updateYsjl'
}
if (this.isRepeat) {
this.$message({ message: '记录编号重复,请先修改记录编号再保存', type: 'error' })
return false
} else {
this.$refs['ysjl'].validate(valid => {
if (valid) {
this.api({
url: url,
method: 'post',
data: {
ysjl: this.ysjl,
param: this.param,
jyxm: JSON.stringify(this.tableData),
flag: operation
}
}).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
})
// this.$router.push({
// path: this.path + this.ysjl.id,
// query: { state: 'update', id: this.ysjl.id, departmentId: this.ysjl.departmentId, jianyanrenyuan: this.ysjl.jianyanrenyuan }
// })
} 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-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
}
})
},
changeJyjl(val) {
if (val === '符合') {
//
this.ysjl.jianyanjielun = '合格'
const xcjyrq = new Date(this.ysjl.jianyanjieshuriqi)
xcjyrq.setFullYear(xcjyrq.getFullYear() + 1)
this.ysjl.xiacijianyanriqi = xcjyrq.setDate(xcjyrq.getDate() - 1)
} else {
//
this.ysjl.jianyanjielun = '不合格'
const xcjyrq = new Date(this.ysjl.jianyanjieshuriqi)
xcjyrq.setMonth(xcjyrq.getMonth() + 1 + 2)
this.ysjl.xiacijianyanriqi = xcjyrq.setDate(xcjyrq.getDate() - 1)
}
},
/**
* 改变额定功率蒸汽锅炉是t/h其他的是MW
*/
changeEdgl() {
if (this.ysjl.shebeileibiedaima === '1100') {
this.param.edinggonglv = 't/h'
} else {
this.param.edinggonglv = 'MW'
}
},
/**
*
* @param $index
* @param field
*/
changeJyjg($index, field) {
this.fieldArr.forEach(currentField => {
if (field !== currentField) {
this.bgfyData[$index][currentField] = ''
}
})
},
/**
* 同步检验项目中的日期
* 水压试验日期同步1-9大项
* 试运行日期同步10-12大项
* @param startIndex 索引
* @param count 最大索引
* @param riqi 同步的日期
*/
syncRq(startIndex, count, riqi) {
for (let i = startIndex; i < count; i++) {
if (i === 0) {
this.bgfyData[i].querenriqi = this.param.shiyanriqi
} else if (i + 1 < this.bgfyData.length && this.bgfyData[i].jianyanxiang !== this.bgfyData[i + 1].jianyanxiang) {
this.bgfyData[i + 1].querenriqi = riqi.replace('年', '-').replace('月', '-').replace('日', '')
}
}
},
/**
* 是否展示项目类别
* @param $index
* @returns {number}
*/
showXmlb($index) {
return this.showXmlbIndexListZg.filter(index => {
return index === $index
}).length
},
/**
* 是否可编辑
* @param $index
* @returns {boolean}
*/
editStatus($index) {
return this.disabledEdit.filter(index => {
return index === $index
}).length > 0
},
/**
* 改变部分项目类别
* @param $index
*/
changeXmlb($index) {
if ($index === 45) {
this.disabledEdit.forEach(index => {
this.bgfyData[index].xiangmuleibie = this.bgfyData[$index].xiangmuleibie
})
}
}
}
}
</script>

855
src/views/ysjl/1000/zj/common/index.vue

@ -1,855 +0,0 @@
<!--锅炉改造和重大修理-->
<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>
<template v-else>
<el-button type="primary" icon="el-icon-edit" size="medium" @click="saveYsjl('upd')">
更新
</el-button>
<el-button v-if="isSysUser" type="success" icon="el-icon-upload2" size="medium" @click="saveYsjl('build')">
生成报告
</el-button>
<el-button type="warning" icon="el-icon-view" size="medium" @click="common.viewYsjl(ysjl.id, 'YSJL')">
预览
</el-button>
</template>
<template v-if="isSysUser">
<el-button type="primary" size="medium" @click="Signjyxm">
<svg-icon icon-class="sign" />
检验项目批量签名
</el-button>
<el-button type="danger" icon="el-icon-delete" size="medium" @click="signClear">
批量清除签名
</el-button>
<el-button type="success" size="medium" icon="el-icon-edit" @click="batchUpdDate">
批量修改日期
</el-button>
<el-button type="primary" size="medium" icon="el-icon-info" @click="showDialogRoleVisible">
编辑权限
</el-button>
</template>
<el-button type="info" size="medium" icon="el-icon-info" @click="dialogEnclosureVisible = true">
相关鉴证
</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="130px">
<fieldset>
<legend>基本信息</legend>
<el-row :gutter="20">
<el-col v-if="state === 'create' || !ysjl.jilubianhao" :span="13">
<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:80px" @blur="ysjlController.judgeRepeat(jlbh1 + jlbh2 + '-' + jlbh3, ysjl.id).then(data => { isRepeat = data })" />
</el-form-item>
</el-col>
<el-col v-else :span="9">
<el-form-item label="监检编号" prop="jilubianhao">
<el-input v-model="ysjl.jilubianhao" :disabled="edit" @blur="ysjlController.judgeRepeat(ysjl.jilubianhao, ysjl.id).then(data => { isRepeat = data })" />
</el-form-item>
</el-col>
<el-col v-show="isRepeat" :span="2">
<span style="color:red">编号重复</span>
</el-col>
</el-row>
<el-row :gutter="20" style="height: 110px;">
<el-col :span="18">
<el-form-item label="产品名称" prop="shebeimingcheng">
<el-input v-model="ysjl.shebeimingcheng" type="textarea" :rows="4" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" style="height: 110px;">
<el-col :span="18">
<el-form-item label="产品图号" prop="chanpintuhao">
<el-input v-model="param.chanpintuhao" type="textarea" :rows="4" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="产品型号" prop="guigexinghao">
<el-select v-model="ysjl.guigexinghao" filterable allow-create default-first-option style="width: 100%;" @change="changXh">
<el-option v-for="item in xinghaoList" :key="item.id" :label="item.xinghao" :value="item.xinghao" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="鉴定报告编号" prop="jiandingbaogaobianhao">
<el-input v-model="param.jiandingbaogaobianhao" type="text" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="产品编号" prop="chanpinbianhao">
<el-input v-model="ysjl.chanpinbianhao" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="设备代码" prop="shebeidaima">
<el-input v-model="ysjl.shebeidaima" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="制造日期" prop="zhizaoriqi">
<el-date-picker v-model="ysjl.zhizaoriqi" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%;" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>收费信息</legend>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="合同编号" prop="hetongbianhao">
<el-input v-model="param.hetongbianhao" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="合同金额" prop="zaojia">
<el-input v-model="param.zaojia" type="text" disabled @input="beforeHejia" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="比例" prop="bili">
<el-select v-model="param.bili" allow-create clearable filterable default-first-option style="width: 100%;" disabled @change="beforeHejia">
<el-option v-for="item in biliOptions" :key="item" :label="item" :value="item" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="检验费用" prop="jianyanheding">
<el-input v-model="ysjl.jianyanheding" type="text" disabled />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>校验信息</legend>
<el-row :gutter="20">
<el-col :span="20" style="margin-left: 100px;height: 90px;font-size: 16px;">
根据<el-input v-model="ysjl.jianyanyiju" style="width: 450px;" />的规定该产品的制造经我机构监督检验符合
<el-select v-model="param.xiangguanguicheng" style="width: 300px;">
<el-option v-for="item in xggcList" :key="item.id" :label="item.name" :value="item.name" />
</el-select>
</el-col>
</el-row>
<template v-show="type !== 'glbj' && type !== 'fqg'">
<el-row style="margin-left: 80px;margin-bottom: 10px;">
<el-col :span="18">
<el-alert title="此”说明“在原始记录与监检证书上均体现。" type="info" />
</el-col>
</el-row>
<el-row :gutter="20" style="margin-bottom: 20px;height: 90px;">
<el-col :span="18">
<el-form-item label="说明" prop="beizhu">
<el-input v-model="ysjl.beizhu" type="textarea" :rows="4" />
</el-form-item>
</el-col>
</el-row>
</template>
<template v-if="isSysUser">
<el-row :gutter="20" style="margin-top: 20px;">
<el-col :span="9">
<el-form-item label="检验日期" prop="jianyanjieshuriqi">
<el-date-picker v-model="ysjl.jianyanjieshuriqi" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="9">
<el-form-item label="检验人员" prop="jianyanrenyuan">
<el-input v-model="jianyanrenyuan" disabled />
<el-input v-show="false" v-model="ysjl.jianyanrenyuan" />
</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-form class="el-form" label-position="right" label-width="130px">
<el-row :gutter="20">
<el-col :span="18" :offset="6">
<el-button size="small" type="primary" @click="changeJsl(' 由 外协生产,监检证号: 产品编号: 。锅炉范围内管道提供部分锅炉主蒸汽管道、锅炉主给水管道和管件,符合《市场监管总局办公厅关于电站锅炉范围内管道有关问题意见》(市监特设函(2019) -849号) 等文件的相关要求。')">
外协
</el-button>
<el-button size="small" type="warning" @click="changeJsl('无此项.')">
无此项
</el-button>
<el-button size="small" type="primary" @click="changeJsl('部件调台,详见该厂的调台计划.')">
调台
</el-button>
<el-button size="small" type="primary" @click="changeJsl('该锅炉为设计文件鉴定后制造的前三台锅炉。')">
前三台
</el-button>
<el-button size="small" type="danger" @click="changeJsl(undefined)">
清空
</el-button>
</el-col>
</el-row>
<el-row style="margin-left: 80px;margin-bottom: 10px;">
<el-col :span="18">
<el-alert title="此”记事栏“只在原始记录上体现。" type="info" />
</el-col>
</el-row>
<el-row :gutter="20" style="height: 100px;">
<el-col :span="18">
<el-form-item label="记事栏" prop="qita">
<el-input v-model="param.qita" type="textarea" :rows="4" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table ref="bgfyData" :data="bgfyData" :span-method="tableJs.mergeColRows" border stripe style="margin-top: 10px;" @row-click="onRowClick">
<el-table-column type="selection" width="55" prop="checkbox" />
<el-table-column type="index" align="center" width="50" label="序号" />
<el-table-column align="center" label="监检项目">
<el-table-column align="center" prop="jianyanxiang" label="检验项" width="100" />
<el-table-column align="center" prop="jianyanneirong" label="检验内容" width="300" />
</el-table-column>
<el-table-column align="center" prop="xiangmuleibie" width="100" label="类别">
<template slot-scope="scope">
<el-select v-if="showXmlb(scope.$index)" v-model="scope.row.xiangmuleibie" style="width:60px;">
<el-option v-for="xmlb in getXmlbList(scope.$index)" :key="xmlb" :label="xmlb" :value="xmlb" />
</el-select>
<span v-else>{{ scope.row.xiangmuleibie }}</span>
</template>
</el-table-column>
<el-table-column align="center" prop="jianyanjieguo" width="120" label="检查结果">
<template slot-scope="scope">
<el-select v-model="scope.row.jianyanjieguo" @change="changeJyjg(scope.$index)">
<el-option v-for="item in jyjgList" :key="item" :label="item" :value="item" />
</el-select>
</template>
</el-table-column>
<el-table-column align="center" prop="gongzuojianzheng" min-width="200" label="工作见证">
<template slot-scope="scope">
<el-autocomplete v-model="scope.row.gongzuojianzheng" class="inline-input" style="width: 100%;" :fetch-suggestions="((queryString, cb) => { querySearchGzjz(queryString, cb, scope.$index) })" />
</template>
</el-table-column>
<el-table-column align="center" prop="jianjianyuan" width="200" label="监检员" />
<el-table-column align="center" prop="querenriqi" width="160" label="日期">
<template slot-scope="scope">
<el-date-picker v-model="scope.row.querenriqi" type="date" format="yyyy.MM.dd" value-format="yyyy-MM-dd" :picker-options="pickerOptions" placeholder="选择日期" style="width: 100%;" @change="changeQrrq(scope.$index)" />
</template>
</el-table-column>
</el-table>
</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" />
</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 Enclosure from '@/views/common/Enclosure'
export default {
name: 'GlZjYsjl',
components: { SignName, Sticky, Enclosure },
props: {
type: {
required: true,
type: String
},
showXmlbIndexListSg: {
required: true,
type: Array
},
/**
* 格式为 [{ index: 0, relationIds: [1, 2] }]
*/
jyxmRelations: {
required: true,
type: Array
}
},
data() {
return {
ysjl: {},
param: {},
jlbh1: 'GJ',
jlbh2: '(' + new Date().getFullYear() + ')',
jlbh3: '',
isRepeat: false,
jianyanrenyuan: '',
departmentId: this.$route.query.departmentId,
edit: false,
state: this.$route.query.state,
bgfyData: [],
ysjlId: this.$route.query.id,
checkedTab: 'first',
xmlbListAB: ['A', 'B'],
xmlbListAC: ['A', 'C'],
xmlbListBC: ['B', 'C'],
cols: [
{
name: 'jianyanxiang', // el-table-column prop=''
getValue(row) { //
return row.jianyanxiang
}
}
],
rows: [
{
name: 'jianyanxiang',
getValue(row) {
return row.jianyanxiang
}
},
{
name: 'jianyanneirong',
getValue(row) {
return row.jianyanneirong
}
}
],
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: [],
defaultRlr: [],
renlingren: [],
xinghaoList: [],
jyjgList: ['符合', '无此项', '外协'],
dicGzjz: [],
isSysUser: this.$store.getters.clientType === 'System',
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now()
}
}
}
},
created() {
if (this.state === 'create') {
this.initYsjl()
} else {
this.getYsjl()
this.getParam()
}
this.getDicJyxm(1)
this.getJyxm(1)
this.getDicData()
this.userList = this.$store.getters.allUser.filter(user => user.departmentId === 74 && user.clientType === 'System')
},
methods: {
initYsjl() {
this.ysjlController.init(this.$route.query).then(data => {
this.ysjl = data.ysjl
this.param = data.param ? data.param : {}
this.ysjl.jianyanjieshuriqi = this.formatter.dateFormat('YYYY-MM-dd')
this.ysjl.jianyanjielun = '符合'
this.ysjl.baogaojielun = '符合'
this.ysjl.bglx = 1
this.ysjl.cjState = 'ysjl'
this.ysjl.jlprintState = 0
this.ysjl.jigouhezhunzhenghao = process.env.VUE_APP_HZZBH
this.ysjl.jianyanyiju = '《中华人民共和国特种设备安全法》《特种设备安全监察条例》'
this.$set(this.param, 'xiangguanguicheng', '《锅炉安全技术规程》')
this.beforeHejia()
this.getZzdw()
this.getXinghao()
})
},
getYsjl() {
this.ysjlController.getYsjl(this.ysjlId).then(data => {
this.ysjl = data.ysjl
this.ysjl.jianyanjielun = '符合'
if (this.ysjl.jianyanrenyuan !== null && this.ysjl.jianyanrenyuan.length > 0) {
this.jianyanrenyuan = this.common.convertCnName(this.ysjl.jianyanrenyuan)
}
this.ysjlController.judgeRepeat(this.ysjl.jilubianhao, this.ysjl.id).then(data => {
this.isRepeat = data
})
this.getXinghao()
})
},
getParam() {
this.ysjlController.getParam(this.ysjlId, '1000').then(data => {
this.param = data
})
},
getJyxm(sort) {
this.jyxmController.getJyxm(this.$route.query.modelId, this.ysjlId, sort, this.state).then(data => {
this.bgfyData = data
this.tableJs.getData(this.cols, this.rows, data)
})
},
getDicJyxm(sort) {
this.jyxmController.getCyJyxm(this.$route.query.modelId, sort).then(data => {
this.dicGzjz = data.map(row => {
return { value: row.gongzuojianzheng }
})
})
},
getXinghao() {
this.api({
url: 'dicXinghao/getAll',
method: 'get',
params: {
zzdwId: this.zzdwId
}
}).then(data => {
this.xinghaoList = data
if (this.state === 'create') {
this.changXh(this.ysjl.guigexinghao)
}
})
},
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({
url: '/ysjl/gainCurrentBh',
method: 'get',
params: {
aheadPart: aheadPart,
hinderPart: ''
}
}).then(data => {
this.jlbh3 = data
this.ysjlController.judgeRepeat(this.ysjl.jilubianhao, this.ysjl.id).then(data => {
this.isRepeat = data
})
})
},
/**
* 签名方法
* @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 && 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)
}
},
saveYsjl(operation) {
const tableData = [[]]
this.bgfyData.forEach(row => {
tableData[0].push({
id: row.id,
xiangmuleibie: row.xiangmuleibie ? row.xiangmuleibie : '',
jianyanjieguo: row.jianyanjieguo ? row.jianyanjieguo : '',
gongzuojianzheng: row.gongzuojianzheng ? row.gongzuojianzheng : '',
jianjianyuan: row.jianjianyuan ? row.jianjianyuan : '',
querenriqi: row.querenriqi ? row.querenriqi : ''
})
})
if (operation === 'add') {
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + '-' + this.jlbh3
this.save(operation, '/ysjl/saveYsjl', tableData)
} else if (operation === 'build') {
this.ysjl.baogaobianhao = this.ysjl.jilubianhao
if (this.ysjl.jilubianhao && this.ysjl.jilubianhao.indexOf('COPY') > -1) {
this.$message({
type: 'error',
message: '请先修改报告编号,不允许携带COPY标志生成报告!'
})
return false
}
if (this.ysjl.jianyanrenyuan === null || this.ysjl.jianyanrenyuan === '') {
this.$message({
type: 'error',
message: '请先签名再生成报告!'
})
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, '/ysjl/updateYsjl', tableData)
} else if (operation === 'upd') {
this.save(operation, '/ysjl/updateYsjl', tableData)
}
},
save(operation, url, jyxm) {
//
if (this.isRepeat) {
this.$message({ message: '记录编号重复,请先修改记录编号再保存', type: 'error' })
return false
} else {
this.$refs['ysjl'].validate(valid => {
if (valid) {
this.api({
url: url,
method: 'post',
data: {
ysjl: this.ysjl,
param: this.param,
jyxm: JSON.stringify(jyxm),
flag: operation
}
}).then(data => {
Utils.$emit('ysjl-db-list')
//
if (operation === 'add') {
Utils.$emit('task-list')
this.ysjl.id = data
this.param.ysjlId = data
this.$message({ message: '保存成功', type: 'success' })
//
this.common.reloadViewToUpdateYsjl(this.ysjl)
} else if (operation === 'upd') {
this.dialogRoleVisible = false
this.$message({ message: '更新成功', type: 'success' })
//
this.$router.push({
query: merge(this.$route.query, { 'jianyanrenyuan': this.ysjl.jianyanrenyuan })
})
} else {
// pdf
this.common.viewYsjlNoOpen(this.ysjl.id, 'YSJL')
Utils.$emit('ysjl-list')
Utils.$emit('ysjl-yb-list')
Utils.$emit('bggl-daiban-list')
this.$message({ message: '生成报告成功', type: 'success' })
this.common.delCurrentViews()
}
this.state = 'update'
})
}
})
}
},
onRowClick(row) {
this.$refs.bgfyData.toggleRowSelection(row)
},
/**
* 格式化监检员
*/
formatterJianjianyuan(row) {
if (row.jianjianyuan) {
if (typeof (row.jianjianyuan) === 'number') {
row.jianjianyuan = row.jianjianyuan.toString()
return this.common.convertCnName(row.jianjianyuan)
}
return row.jianjianyuan
}
},
/**
* 是否可编辑
* @param $index
* @returns {number}
*/
showXmlb($index) {
return this.showXmlbIndexListSg.filter(xl => {
return xl.index === $index
}).length
},
/**
* 根据索引找到对应的项目类别选项列表
* @param $index
*/
getXmlbList($index) {
for (let i = 0; i < this.showXmlbIndexListSg.length; i++) {
const xl = this.showXmlbIndexListSg[i]
if (xl.index === $index) {
return xl.xmlb === 'AB' ? this.xmlbListAB : xl.xmlb === 'AC' ? this.xmlbListAC : this.xmlbListBC
}
}
},
/**
* 检验项目批量签名
*/
Signjyxm() {
if (this.$refs.bgfyData.selection.length === 0) {
this.$message('请在列表选择要签名的数据。')
return
}
this.signShow = true
this.$refs.qmButton.dialogFormVisible = true
},
/**
* 检验项目清除签名
*/
signClear: function() {
if (this.$refs.bgfyData.selection.length === 0) {
this.$message('请在列表选择要清除签名的数据。')
return
}
this.$refs.bgfyData.selection.forEach(row => {
row.jianjianyuan = null
})
},
batchUpdDate() {
if (this.$refs.bgfyData.selection.length === 0) {
this.$message('请在列表选择要修改日期的数据。')
return false
}
this.jyxmrqShow = true
},
batchUpd() {
for (let i = 0; i < this.$refs.bgfyData.selection.length; i++) {
this.$refs.bgfyData.selection[i].querenriqi = this.querenriqi
}
this.jyxmrqShow = false
},
changeJsl(val) {
if (val === '无此项.') {
this.$set(this.param, 'qita', val)
} else {
this.$set(this.param, 'qita', val ? (this.param.qita ? this.param.qita + '\n' : '') + val : '')
}
},
/**
* 核价
*/
beforeHejia: function() {
//
this.ysjl.jianyanheding = Math.round((!this.param.zaojia || !this.param.bili) ? 0 : this.common.accMul(this.param.zaojia, this.param.bili / 100))
},
showDialogRoleVisible: function() {
//
this.renlingren.length = 0
this.defaultRlr = this.ysjl.renlingren.split(',')
//
this.defaultRlr.forEach(userId => {
for (let i = 0; i < this.userList.length; i++) {
if (String(this.userList[i].id) === userId) {
this.userList.splice(i, 1)
break
}
}
})
this.dialogRoleVisible = true
},
/**
* 追加认领人
* 将默认认领人拼接新加的认领人
*/
updateRenlingren: function() {
const rlr = this.defaultRlr.concat(this.renlingren)
this.ysjl.renlingren = rlr.join(',')
this.saveYsjl('upd')
},
changXh: function(val) {
const xinghao = this.xinghaoList.filter(xh => xh.xinghao === val)[0]
this.$set(this.param, 'jiandingbaogaobianhao', (xinghao && xinghao.jiandingbaogaobianhao) || '')
},
/**
* 修改检验项目关联的检验结果及确认日期为监检日期
* @param $index 检验项目索引
*/
changeJyjg($index) {
//
const isWcx = this.bgfyData[$index].jianyanjieguo === '无此项'
const isWx = this.bgfyData[$index].jianyanjieguo === '外协'
if (isWcx) {
this.bgfyData[$index].gongzuojianzheng = '—'
}
if (isWx) {
this.bgfyData[$index].gongzuojianzheng = '外协部件监检证书'
}
if (isWcx || isWx) {
this.bgfyData[$index].querenriqi = this.formatter.dateFormat('YYYY-MM-dd')
} else {
this.bgfyData[$index].gongzuojianzheng = this.dicGzjz[$index].value
this.bgfyData[$index].querenriqi = this.ysjl.jianyanjieshuriqi
}
//
const jyxm = this.jyxmRelations.filter(jyxm => jyxm.index === $index)[0]
//
if (!jyxm) {
return
}
//
//
jyxm.relationIds.forEach(index => {
this.bgfyData[index].jianyanjieguo = this.bgfyData[$index].jianyanjieguo
if (isWcx || isWx) {
this.bgfyData[index].gongzuojianzheng = this.bgfyData[$index].gongzuojianzheng
this.bgfyData[index].querenriqi = this.bgfyData[$index].querenriqi
} else {
this.bgfyData[index].gongzuojianzheng = this.dicGzjz[index].value
this.bgfyData[index].querenriqi = this.ysjl.jianyanjieshuriqi
}
})
},
/**
* 修改检验项目关联的确认日期
* @param $index 检验项目索引
*/
changeQrrq: function($index) {
//
if (!this.bgfyData[$index].querenriqi) {
return
}
//
const jyxm = this.jyxmRelations.filter(jyxm => jyxm.index === $index)[0]
//
if (!jyxm) {
return
}
//
jyxm.relationIds.forEach(index => {
//
if (!this.bgfyData[index].querenriqi) {
this.bgfyData[index].querenriqi = this.bgfyData[$index].querenriqi
}
})
},
querySearchGzjz: function(queryString, cb, $index) {
cb([this.dicGzjz[$index]])
}
}
}
</script>
<style scoped>
.el-tag {
margin: auto 5px;
}
/* 表格边框样式 */
>>> .el-table td, >>> .el-table th.is-leaf, .el-table--border, .el-table--group {
border-color: black;
}
/* 多级表头样式 */
>>> .el-table--border th,>>> .el-table--border th.gutter:last-of-type {
border-bottom: 1px solid black;
border-right: 1px solid black;
}
/* 表格字体增亮色 */
>>>.el-table--border::after, >>>.el-table--group::after, >>>.el-table::before {
background-color: black;
}
>>> .el-table thead,.el-table {
color: black;
}
</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>

49
src/views/ysjl/1000/zj/fqg.vue

@ -1,49 +0,0 @@
<!--制造监检锅炉部件-->
<template>
<index type="fqg" :show-xmlb-index-list-sg.sync="showXmlbIndexListSg" :jyxm-relations.sync="jyxmRelations" />
</template>
<script>
import Index from '@/views/ysjl/1000/zj/common'
export default {
name: 'FqgYsjl',
components: { Index },
data() {
return {
showXmlbIndexListSg: [],
jyxmRelations: [
/* // 1
{ index: 0, relationIds: [1, 2, 3, 4, 6, 7] },
// 2
{ index: 5, relationIds: [] },
// 3
{ index: 8, relationIds: [9] },
// 4
{ index: 10, relationIds: [] },
// 5
{ index: 11, relationIds: [] },
// 6
{ index: 12, relationIds: [13, 15] },
// 7
{ index: 14, relationIds: [16] },
// 8
{ index: 17, relationIds: [] },
// 9
{ index: 18, relationIds: [] },
// 10
{ index: 19, relationIds: [20, 21, 22, 23, 24, 25, 26, 27] },
// 11
{ index: 28, relationIds: [29, 30, 31, 32, 33, 34] },
// 12
{ index: 35, relationIds: [36, 37, 38, 39] },
// 13
{ index: 40, relationIds: [41, 42, 43, 44, 45] },
// 14
{ index: 46, relationIds: [47, 48] },
// 15
{ index: 49, relationIds: [50] }*/
]
}
}
}
</script>

52
src/views/ysjl/1000/zj/gks.vue

@ -1,52 +0,0 @@
<!--制造监检锅壳式锅炉-->
<template>
<index type="gks" :show-xmlb-index-list-sg.sync="showXmlbIndexListSg" :jyxm-relations.sync="jyxmRelations" />
</template>
<script>
import Index from '@/views/ysjl/1000/zj/common'
export default {
name: 'GlGksYsjl',
components: { Index },
data() {
return {
showXmlbIndexListSg: [],
/**
* 格式为 [{ index: 0, relationIds: [1, 2] }]
*/
jyxmRelations: [
// 1
{ index: 0, relationIds: [1, 2, 3, 4, 6, 7] },
// 2
{ index: 5, relationIds: [] },
// 3
{ index: 8, relationIds: [9] },
// 4
{ index: 10, relationIds: [] },
// 5
{ index: 11, relationIds: [] },
// 6
{ index: 12, relationIds: [15, 37] },
// 7
{ index: 13, relationIds: [] },
// 8
{ index: 14, relationIds: [16] },
// 9
{ index: 17, relationIds: [] },
// 10
{ index: 18, relationIds: [] },
// 11
{ index: 19, relationIds: [20, 21, 22, 23, 24, 25, 26] },
// 12
{ index: 27, relationIds: [28, 29, 30, 31] },
// 13
{ index: 32, relationIds: [33, 34] },
// 14
{ index: 35, relationIds: [36] },
// 15
{ index: 38, relationIds: [39, 40, 41, 42] }
]
}
}
}
</script>

49
src/views/ysjl/1000/zj/glbj.vue

@ -1,49 +0,0 @@
<!--制造监检锅炉部件-->
<template>
<index type="glbj" :show-xmlb-index-list-sg.sync="showXmlbIndexListSg" :jyxm-relations.sync="jyxmRelations" />
</template>
<script>
import Index from '@/views/ysjl/1000/zj/common'
export default {
name: 'GlbjYsjl',
components: { Index },
data() {
return {
showXmlbIndexListSg: [],
jyxmRelations: [
// 1
{ index: 0, relationIds: [1, 2, 3, 4, 6, 7] },
// 2
{ index: 5, relationIds: [] },
// 3
{ index: 8, relationIds: [9] },
// 4
{ index: 10, relationIds: [] },
// 5
{ index: 11, relationIds: [] },
// 6
{ index: 12, relationIds: [13, 15] },
// 7
{ index: 14, relationIds: [16] },
// 8
{ index: 17, relationIds: [] },
// 9
{ index: 18, relationIds: [] },
// 10
{ index: 19, relationIds: [20, 21, 22, 23, 24, 25, 26, 27] },
// 11
{ index: 28, relationIds: [29, 30, 31, 32, 33, 34] },
// 12
{ index: 35, relationIds: [36, 37, 38, 39] },
// 13
{ index: 40, relationIds: [41, 42, 43, 44, 45] },
// 14
{ index: 46, relationIds: [47, 48] },
// 15
{ index: 49, relationIds: [50] }
]
}
}
}
</script>

698
src/views/ysjl/1000/zj/lxcpg.vue

@ -1,698 +0,0 @@
<!--螺旋翅片管-->
<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>
<template v-else>
<el-button type="primary" icon="el-icon-edit" size="medium" @click="saveYsjl('upd')">
更新
</el-button>
<el-button v-if="isSysUser" type="success" icon="el-icon-upload2" size="medium" @click="saveYsjl('build')">
生成报告
</el-button>
<el-button type="warning" icon="el-icon-view" size="medium" @click="common.viewYsjl(ysjl.id, 'YSJL')">
预览
</el-button>
</template>
<template v-if="isSysUser">
<el-button type="primary" size="medium" @click="Signjyxm">
<svg-icon icon-class="sign" />
检验项目批量签名
</el-button>
<el-button type="danger" icon="el-icon-delete" size="medium" @click="signClear">
批量清除签名
</el-button>
<el-button type="success" size="medium" icon="el-icon-edit" @click="batchUpdDate">
批量修改日期
</el-button>
<el-button v-if="notHasRole('GLQYD')" type="info" size="medium" icon="el-icon-info" @click="dialogEnclosureVisible = true">
相关鉴证
</el-button>
<el-button type="primary" size="medium" icon="el-icon-info" @click="showDialogRoleVisible">
编辑权限
</el-button>
</template>
</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="130px">
<fieldset>
<legend>基本信息</legend>
<el-row :gutter="20">
<el-col v-if="state === 'create' || !ysjl.jilubianhao" :span="13">
<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:80px" @blur="ysjlController.judgeRepeat(jlbh1 + jlbh2 + '-' + jlbh3, ysjl.id).then(data => { isRepeat = data })" />
<el-input v-model="jlbh4" style="width:80px" disabled />
</el-form-item>
</el-col>
<el-col v-else :span="9">
<el-form-item label="监检编号" prop="jilubianhao">
<el-input v-model="ysjl.jilubianhao" :disabled="edit" @blur="ysjlController.judgeRepeat(ysjl.jilubianhao, ysjl.id).then(data => { isRepeat = data })" />
</el-form-item>
</el-col>
<el-col v-show="isRepeat" :span="2">
<span style="color:red">编号重复</span>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="产品编号" prop="chanpinbianhao">
<el-input v-model="ysjl.chanpinbianhao" type="text" disabled />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="产品名称" prop="shebeimingcheng">
<el-input v-model="ysjl.shebeimingcheng" type="text" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="产品规格" prop="guigexinghao">
<el-input v-model="ysjl.guigexinghao" type="text" disabled />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="制造日期" prop="zhizaoriqi">
<el-date-picker v-model="ysjl.zhizaoriqi" 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="zhizaodanwei">
<el-input v-model="ysjl.zhizaodanwei" type="text" disabled />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>收费信息</legend>
<!-- 收费相关信息禁止在原始记录编辑 合同编号除外 -->
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="合同编号" prop="hetongbianhao">
<el-input v-model="param.hetongbianhao" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="合同金额" prop="zaojia">
<el-input v-model="param.zaojia" type="text" disabled @input="beforeHejia" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="比例" prop="bili">
<el-select v-model="param.bili" allow-create clearable filterable default-first-option style="width: 100%;" disabled @change="beforeHejia">
<el-option v-for="item in biliOptions" :key="item" :label="item" :value="item" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="检验费用" prop="jianyanheding">
<el-input v-model="ysjl.jianyanheding" type="text" disabled />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>校验信息</legend>
<el-row :gutter="20">
<el-col :span="20" style="margin-left: 100px;height: 90px;font-size: 16px;">
根据制造单位委托,该批产品经我单位检验,质量符合<el-input v-model="ysjl.jianyanyiju" style="width: 500px;" />的规定
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18" style="height: 120px;">
<el-form-item label="所抽查的产品编号" prop="beizhu">
<el-input v-model="ysjl.beizhu" type="textarea" :rows="4" />
</el-form-item>
</el-col>
</el-row>
<template v-if="isSysUser">
<el-row :gutter="20" style="margin-top: 20px;">
<el-col :span="9">
<el-form-item label="检验日期" prop="jianyanjieshuriqi">
<el-date-picker v-model="ysjl.jianyanjieshuriqi" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="9">
<el-form-item label="检验人员" prop="jianyanrenyuan">
<el-input v-model="jianyanrenyuan" disabled />
<el-input v-show="false" v-model="ysjl.jianyanrenyuan" />
</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-form class="el-form" label-position="right" label-width="130px" style="margin-top: 10px;">
<el-row :gutter="20">
<el-col :span="18" :offset="6">
<el-button size="small" type="primary" @click="changeJsl(' 由 外协生产,监检证号: 产品编号: 。锅炉范围内管道提供部分锅炉主蒸汽管道、锅炉主给水管道和管件,符合《市场监管总局办公厅关于电站锅炉范围内管道有关问题意见》(市监特设函(2019) -849号) 等文件的相关要求。')">
外协
</el-button>
<el-button size="small" type="warning" @click="changeJsl('无此项.')">
无此项
</el-button>
<el-button size="small" type="primary" @click="changeJsl('部件调台,详见该厂的调台计划.')">
调台
</el-button>
<el-button size="small" type="primary" @click="changeJsl('该锅炉为设计文件鉴定后制造的前三台锅炉。')">
前三台
</el-button>
<el-button size="small" type="danger" @click="changeJsl(undefined)">
清空
</el-button>
</el-col>
</el-row>
<el-row :gutter="20" style="height: 100px;">
<el-col :span="18">
<el-form-item label="记事栏" prop="qita">
<el-input v-model="param.qita" type="textarea" :rows="4" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="检验结论" prop="qita">
<el-input v-model="ysjl.jianyanjielun" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table ref="bgfyData" :data="bgfyData" :span-method="tableJs.mergeColRows" border stripe style="margin-top: 10px;width:90%" @row-click="onRowClick">
<el-table-column type="selection" width="55" prop="checkbox" />
<el-table-column type="index" align="center" width="50" label="序号" />
<el-table-column align="center" label="监检项目">
<el-table-column align="center" prop="jianyanxiang" label="检验项" />
<el-table-column align="center" prop="jianyanmu" label="检验目" />
</el-table-column>
<el-table-column align="center" prop="jianyanjieguo" label="检查结果">
<template slot-scope="scope">
<el-select v-model="scope.row.jianyanjieguo">
<el-option v-for="item in jyjgList" :key="item" :label="item" :value="item" @change="changeJyjg(scope.$index)" />
</el-select>
</template>
</el-table-column>
<el-table-column align="center" prop="gongzuojianzheng" label="工作见证">
<template slot-scope="scope">
<el-input v-model="scope.row.gongzuojianzheng" />
</template>
</el-table-column>
<el-table-column align="center" prop="jianjianyuan" width="150" label="监检员" />
<el-table-column align="center" prop="querenriqi" width="160" label="日期">
<template slot-scope="scope">
<el-date-picker v-model="scope.row.querenriqi" type="date" format="yyyy.MM.dd" value-format="yyyy-MM-dd" :picker-options="pickerOptions" placeholder="选择日期" style="width: 100%;" />
</template>
</el-table-column>
</el-table>
</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>
<el-select v-model="renlingren" multiple collapse-tags>
<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" />
</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 Enclosure from '@/views/common/Enclosure'
export default {
name: 'GlZjYsjl',
components: { SignName, Sticky, Enclosure },
data() {
return {
ysjl: {},
param: {},
jlbh1: 'GJ',
jlbh2: '(' + new Date().getFullYear() + ')',
jlbh3: '',
jlbh4: '(X)',
isRepeat: false,
jianyanrenyuan: '',
departmentId: this.$route.query.departmentId,
edit: false,
state: this.$route.query.state,
bgfyData: [],
ysjlId: this.$route.query.id,
checkedTab: 'first',
xmlbListAB: ['A', 'B'],
xmlbListAC: ['A', 'C'],
xmlbListBC: ['B', 'C'],
cols: [
{
name: 'jianyanxiang', // el-table-column prop=''
getValue(row) { //
return row.jianyanxiang
}
}
],
rows: [
{
name: 'jianyanxiang',
getValue(row) {
return row.jianyanxiang
}
},
{
name: 'jianyanmu',
getValue(row) {
return row.jianyanmu
}
},
{
name: 'jianyanneirong',
getValue(row) {
return row.jianyanneirong
}
}
],
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: [],
defaultRlr: [],
renlingren: [],
jyjgList: ['符合', '无此项', '外协'],
isSysUser: this.$store.getters.clientType === 'System',
jyxmRelations: [],
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now()
}
}
}
},
created() {
if (this.state === 'create') {
this.initYsjl()
} else {
this.getYsjl()
this.getParam()
}
this.getJyxm(1)
this.getDicData()
this.userList = this.$store.getters.allUser.filter(user => user.departmentId === 74 && user.clientType === 'System')
},
methods: {
initYsjl() {
this.ysjlController.init(this.$route.query).then(data => {
this.ysjl = data.ysjl
this.param = data.param ? data.param : {}
this.ysjl.jianyanjieshuriqi = this.formatter.dateFormat('YYYY-MM-dd')
this.ysjl.jianyanjielun = '合格'
this.ysjl.baogaojielun = '符合'
this.ysjl.bglx = 1
this.ysjl.cjState = 'ysjl'
this.ysjl.jlprintState = 0
this.ysjl.jigouhezhunzhenghao = process.env.VUE_APP_HZZBH
this.ysjl.jianyanyiju = '设计图样和NB/T47030-2013 《锅炉用高频电阻焊螺旋翅片管技术条件》'
this.beforeHejia()
this.getZzdw()
})
},
getYsjl() {
this.ysjlController.getYsjl(this.ysjlId).then(data => {
this.ysjl = data.ysjl
this.ysjl.jianyanjielun = '符合'
if (this.ysjl.jianyanrenyuan !== null && this.ysjl.jianyanrenyuan.length > 0) {
this.jianyanrenyuan = this.common.convertCnName(this.ysjl.jianyanrenyuan)
}
this.ysjlController.judgeRepeat(this.ysjl.jilubianhao, this.ysjl.id).then(data => {
this.isRepeat = data
})
})
},
getParam() {
this.ysjlController.getParam(this.ysjlId, '1000').then(data => {
this.param = data
})
},
getJyxm(sort) {
this.jyxmController.getJyxm(this.$route.query.modelId, this.ysjlId, sort, this.state).then(data => {
this.bgfyData = data
this.tableJs.getData(this.cols, this.rows, data)
})
},
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({
url: '/ysjl/gainCurrentBh',
method: 'get',
params: {
aheadPart: aheadPart,
hinderPart: this.jlbh4
}
}).then(data => {
this.jlbh3 = data
this.ysjlController.judgeRepeat(this.ysjl.jilubianhao, this.ysjl.id).then(data => {
this.isRepeat = data
})
})
},
/**
* 签名方法
* @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 = 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.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 && 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)
}
},
saveYsjl(operation) {
const tableData = [[]]
this.bgfyData.forEach(row => {
tableData[0].push({
id: row.id,
xiangmuleibie: row.xiangmuleibie ? row.xiangmuleibie : '',
jianyanjieguo: row.jianyanjieguo ? row.jianyanjieguo : '',
gongzuojianzheng: row.gongzuojianzheng ? row.gongzuojianzheng : '',
jianjianyuan: row.jianjianyuan ? row.jianjianyuan : '',
querenriqi: row.querenriqi ? row.querenriqi : ''
})
})
if (operation === 'add') {
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + '-' + this.jlbh3 + this.jlbh4
this.save(operation, '/ysjl/saveYsjl', tableData)
} else if (operation === 'build') {
this.ysjl.baogaobianhao = this.ysjl.jilubianhao
if (this.ysjl.jilubianhao && this.ysjl.jilubianhao.indexOf('COPY') > -1) {
this.$message({
type: 'error',
message: '请先修改报告编号,不允许携带COPY标志生成报告!'
})
return false
}
if (this.ysjl.jianyanrenyuan === null || this.ysjl.jianyanrenyuan === '') {
this.$message({
type: 'error',
message: '请先签名再生成报告!'
})
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, '/ysjl/updateYsjl', tableData)
} else if (operation === 'upd') {
this.save(operation, '/ysjl/updateYsjl', tableData)
}
},
save(operation, url, jyxm) {
//
if (this.isRepeat) {
this.$message({ message: '记录编号重复,请先修改记录编号再保存', type: 'error' })
return false
} else {
this.$refs['ysjl'].validate(valid => {
if (valid) {
this.api({
url: url,
method: 'post',
data: {
ysjl: this.ysjl,
param: this.param,
jyxm: JSON.stringify(jyxm),
flag: operation
}
}).then(data => {
Utils.$emit('ysjl-db-list')
//
if (operation === 'add') {
Utils.$emit('task-list')
this.ysjl.id = data
this.param.ysjlId = data
this.$message({ message: '保存成功', type: 'success' })
//
this.common.reloadViewToUpdateYsjl(this.ysjl)
} else if (operation === 'upd') {
this.$message({ message: '更新成功', type: 'success' })
//
this.$router.push({
query: merge(this.$route.query, { 'jianyanrenyuan': this.ysjl.jianyanrenyuan })
})
} else {
// pdf
this.common.viewYsjlNoOpen(this.ysjl.id, 'YSJL')
Utils.$emit('ysjl-list')
Utils.$emit('ysjl-yb-list')
Utils.$emit('bggl-daiban-list')
this.$message({ message: '生成报告成功', type: 'success' })
this.common.delCurrentViews()
}
this.state = 'update'
})
}
})
}
},
onRowClick(row) {
this.$refs.bgfyData.toggleRowSelection(row)
},
/**
* 格式化监检员
*/
formatterJianjianyuan(row) {
if (row.jianjianyuan) {
if (typeof (row.jianjianyuan) === 'number') {
row.jianjianyuan = row.jianjianyuan.toString()
}
return this.common.convertCnName(row.jianjianyuan)
}
},
/**
* 检验项目批量签名
*/
Signjyxm() {
if (this.$refs.bgfyData.selection.length === 0) {
this.$message('请在列表选择要签名的数据。')
return
}
this.signShow = true
this.$refs.qmButton.dialogFormVisible = true
},
/**
* 检验项目清除签名
*/
signClear: function() {
if (this.$refs.bgfyData.selection.length === 0) {
this.$message('请在列表选择要清除签名的数据。')
return
}
this.$refs.qmButton.clearSign()
},
batchUpdDate() {
if (this.$refs.bgfyData.selection.length === 0) {
this.$message('请在列表选择要修改日期的数据。')
return false
}
this.jyxmrqShow = true
},
batchUpd() {
for (let i = 0; i < this.$refs.bgfyData.selection.length; i++) {
this.$refs.bgfyData.selection[i].querenriqi = this.querenriqi
}
this.jyxmrqShow = false
},
changeJsl(val) {
if (val === '无此项.') {
this.$set(this.param, 'qita', val)
} else {
this.$set(this.param, 'qita', val ? (this.param.qita ? this.param.qita + '\n' : '') + val : '')
}
},
/**
* 核价
*/
beforeHejia: function() {
//
this.ysjl.jianyanheding = Math.round((!this.param.zaojia || !this.param.bili) ? 0 : this.common.accMul(this.param.zaojia, this.param.bili / 100))
},
showDialogRoleVisible: function() {
//
this.renlingren.length = 0
this.defaultRlr = this.ysjl.renlingren.split(',')
//
this.defaultRlr.forEach(userId => {
for (let i = 0; i < this.userList.length; i++) {
if (String(this.userList[i].id) === userId) {
this.userList.splice(i, 1)
break
}
}
})
this.dialogRoleVisible = true
},
/**
* 追加认领人
* 最终认领人数据为将默认认领人拼接新加的认领人
*/
updateRenlingren: function() {
const rlr = this.defaultRlr.concat(this.renlingren)
this.ysjl.renlingren = rlr.join(',')
this.saveYsjl('upd')
},
/**
* 修改检验结果为无此项时确认日期默认为监检日期
* @param $index 检验项目索引
*/
changeJyjg($index) {
if (this.bgfyData[$index].jianyanjieguo === '无此项') {
this.bgfyData[$index].querenriqi = this.ysjl.jianyanjieshuriqi
}
}
}
}
</script>
<style scoped>
.el-tag {
margin: auto 5px;
}
/* 表格边框样式 */
>>> .el-table td, >>> .el-table th.is-leaf, .el-table--border, .el-table--group {
border-color: black;
}
/* 多级表头样式 */
>>> .el-table--border th,>>> .el-table--border th.gutter:last-of-type {
border-bottom: 1px solid black;
border-right: 1px solid black;
}
/* 表格字体增亮色 */
>>>.el-table--border::after, >>>.el-table--group::after, >>>.el-table::before {
background-color: black;
}
>>> .el-table thead,.el-table {
color: black;
}
</style>
<style lang="scss" scoped>
.el-table {
/deep/tbody tr:hover>td {
background-color: oldlace;
}
}
</style>

51
src/views/ysjl/1000/zj/sgs.vue

@ -1,51 +0,0 @@
<!--制造监检水管式锅炉-->
<template>
<index type="sgs" :show-xmlb-index-list-sg.sync="showXmlbIndexListSg" :jyxm-relations.sync="jyxmRelations" />
</template>
<script>
import Index from '@/views/ysjl/1000/zj/common'
export default {
name: 'GlSgsYsjl',
components: { Index },
data() {
return {
showXmlbIndexListSg: [],
jyxmRelations: [
// 1
{ index: 0, relationIds: [1, 2, 3, 4, 6, 7] },
// 2
{ index: 5, relationIds: [] },
// 3
{ index: 8, relationIds: [9] },
// 4
{ index: 10, relationIds: [] },
// 5
{ index: 11, relationIds: [] },
// 6
{ index: 12, relationIds: [15, 42] },
// 7
{ index: 13, relationIds: [] },
// 8
{ index: 14, relationIds: [16] },
// 9
{ index: 17, relationIds: [] },
// 10
{ index: 18, relationIds: [] },
// 11
{ index: 19, relationIds: [20, 21, 22, 23, 24, 25, 26] },
// 12
{ index: 27, relationIds: [28, 29, 30, 31] },
// 13
{ index: 32, relationIds: [33, 34] },
// 14
{ index: 35, relationIds: [36, 37, 38, 39] },
// 15
{ index: 40, relationIds: [41] },
// 16
{ index: 43, relationIds: [44, 45, 46, 47] }
]
}
}
}
</script>

51
src/views/ysjl/1000/zj/sz.vue

@ -1,51 +0,0 @@
<!--制造监检散装锅炉-->
<template>
<index type="sz" :show-xmlb-index-list-sg.sync="showXmlbIndexListSg" :jyxm-relations.sync="jyxmRelations" />
</template>
<script>
import Index from '@/views/ysjl/1000/zj/common'
export default {
name: 'GlSzYsjl',
components: { Index },
data() {
return {
showXmlbIndexListSg: [],
jyxmRelations: [
// 1
{ index: 0, relationIds: [1, 2, 3, 4, 6, 7] },
// 2
{ index: 5, relationIds: [] },
// 3
{ index: 8, relationIds: [9] },
// 4
{ index: 10, relationIds: [] },
// 5
{ index: 11, relationIds: [] },
// 6
{ index: 12, relationIds: [15] },
// 7
{ index: 13, relationIds: [] },
// 8
{ index: 14, relationIds: [16] },
// 9
{ index: 17, relationIds: [] },
// 10
{ index: 18, relationIds: [] },
// 11
{ index: 19, relationIds: [20, 21, 22, 23, 24, 25, 26, 27] },
// 12
{ index: 28, relationIds: [29, 30, 31, 32, 33, 34] },
// 13
{ index: 35, relationIds: [36, 37, 38, 39, 40] },
// 14
{ index: 41, relationIds: [42, 43, 44, 45, 46] },
// 15
{ index: 47, relationIds: [48, 49] },
// 16
{ index: 50, relationIds: [51, 52, 53, 54] }
]
}
}
}
</script>

49
src/views/ysjl/1000/zj/yjrzt.vue

@ -1,49 +0,0 @@
<!--制造监检有机热载体锅炉-->
<template>
<index type="yjrzt" :show-xmlb-index-list-sg.sync="showXmlbIndexListSg" :jyxm-relations.sync="jyxmRelations" />
</template>
<script>
import Index from '@/views/ysjl/1000/zj/common'
export default {
name: 'GlYjrztYsjl',
components: { Index },
data() {
return {
showXmlbIndexListSg: [],
jyxmRelations: [
// 1
{ index: 0, relationIds: [1, 2, 3, 4, 6, 7] },
// 2
{ index: 5, relationIds: [] },
// 3
{ index: 8, relationIds: [9] },
// 4
{ index: 10, relationIds: [] },
// 5
{ index: 11, relationIds: [] },
// 6
{ index: 12, relationIds: [15, 42] },
// 7
{ index: 13, relationIds: [] },
// 8
{ index: 14, relationIds: [16] },
// 9
{ index: 17, relationIds: [] },
// 10
{ index: 18, relationIds: [] },
// 11
{ index: 19, relationIds: [20, 21, 22, 23, 24, 25, 26] },
// 12
{ index: 27, relationIds: [28, 29, 30, 31] },
// 13
{ index: 32, relationIds: [33, 34] },
// 14
{ index: 35, relationIds: [36] },
// 15
{ index: 38, relationIds: [39, 40, 41, 42] }
]
}
}
}
</script>

2
src/views/ysjl/2000/2100/fenxiang/ydjc.vue

@ -212,7 +212,7 @@ export default {
})
},
getJyxm() {
this.jyxmController.getJyxm(this.ysjl.ysjlTemplateId, this.ysjl.id, 1, this.state).then(data => {
this.jyxmController.getJyxm(this.ysjl.templateId, this.ysjl.id, 1, this.state).then(data => {
this.tableData = data || []
this.$refs.btn.getParentInfo(this.ysjl, this.param, null, this.tableData, this.state, this.$route.query.jyxm, true, false)
})

8
src/views/ysjl/2000/2100/zbg/dj/edit.vue

@ -1097,7 +1097,7 @@ export default {
}
],
info: {
modelId: this.$route.query.modelId,
modelId: this.$route.query.templateId,
sbzldm: this.$route.query.sbzldm,
sblbdm: this.$route.query.sblbdm,
ysjlId: this.$route.query.id,
@ -1166,7 +1166,7 @@ export default {
url: '/ysjl/initYsjl',
method: 'post',
data: {
modelId: this.$route.query.modelId,
templateId: this.$route.query.templateId,
renwuId: this.$route.query.renwuId,
neibuleibie: this.$route.query.neibuleibie,
sblbdm: this.$route.query.sblbdm,
@ -1410,14 +1410,14 @@ export default {
if (this.state === 'create') {
url = '/jyxm/getCyJyxm'
data = {
templateId: this.$route.query.modelId,
templateId: this.$route.query.templateId,
order: sort
}
} else {
url = '/jyxm/getCyJyxmByYsjl'
data = {
ysjlId: this.ysjl.id,
templateId: this.$route.query.modelId,
templateId: this.$route.query.templateId,
isReport: false,
order: sort
}

4
src/views/ysjl/2000/2100/zbg/jj/dxgz.vue

@ -324,7 +324,7 @@ export default {
url: '/ysjl/initYsjl',
method: 'post',
data: {
modelId: this.$route.query.modelId,
templateId: this.$route.query.templateId,
renwuId: this.$route.query.renwuId,
neibuleibie: this.$route.query.neibuleibie,
sblbdm: this.$route.query.sblbdm,
@ -491,7 +491,7 @@ export default {
if (this.state === 'create') {
url = '/jyxm/getCyJyxm'
data = {
templateId: this.$route.query.modelId,
templateId: this.$route.query.templateId,
order: sort
}
} else {

4
src/views/ysjl/2000/2100/zbg/nd/edit.vue

@ -347,7 +347,7 @@ export default {
url: '/ysjl/initYsjl',
method: 'post',
data: {
modelId: this.$route.query.modelId,
templateId: this.$route.query.templateId,
renwuId: this.$route.query.renwuId,
neibuleibie: this.$route.query.neibuleibie,
sblbdm: this.$route.query.sblbdm,
@ -427,7 +427,7 @@ export default {
if (this.state === 'create') {
url = '/jyxm/getCyJyxm'
data = {
templateId: this.$route.query.modelId,
templateId: this.$route.query.templateId,
order: sort
}
} else {

6
src/views/ysjl/2000/2200/zbg/dj/edit.vue

@ -843,7 +843,7 @@ export default {
//
jyfaDialogVisible: false,
info: {
modelId: this.$route.query.modelId,
modelId: this.$route.query.templateId,
sbzldm: this.$route.query.sbzldm,
sblbdm: this.$route.query.sblbdm,
ysjlId: this.$route.query.id,
@ -915,7 +915,7 @@ export default {
url: '/ysjl/initYsjl',
method: 'post',
data: {
modelId: this.$route.query.modelId,
templateId: this.$route.query.templateId,
renwuId: this.$route.query.renwuId,
neibuleibie: this.$route.query.neibuleibie,
sblbdm: this.$route.query.sblbdm,
@ -1032,7 +1032,7 @@ export default {
if (this.state === 'create') {
url = '/jyxm/getCyJyxm'
data = {
templateId: this.$route.query.modelId,
templateId: this.$route.query.templateId,
order: sort
}
} else {

6
src/views/ysjl/2000/2200/zbg/nd/tuoche.vue

@ -315,7 +315,7 @@ export default {
edit: false,
qmjyData: [],
info: {
modelId: this.$route.query.modelId,
modelId: this.$route.query.templateId,
sbzldm: this.$route.query.sbzldm,
sblbdm: this.$route.query.sblbdm,
ysjlId: this.$route.query.id,
@ -379,7 +379,7 @@ export default {
url: '/ysjl/initYsjl',
method: 'post',
data: {
modelId: this.$route.query.modelId,
templateId: this.$route.query.templateId,
renwuId: this.$route.query.renwuId,
neibuleibie: this.$route.query.neibuleibie,
sblbdm: this.$route.query.sblbdm,
@ -488,7 +488,7 @@ export default {
url: '/jyxm/getCyJyxm',
method: 'get',
params: {
templateId: this.$route.query.modelId,
templateId: this.$route.query.templateId,
order: sort
}
}).then(data => {

4
src/views/ysjl/2000/2300/zbg/jj/cyqp.vue

@ -320,7 +320,7 @@ export default {
url: '/ysjl/initYsjl',
method: 'post',
data: {
modelId: this.$route.query.modelId,
templateId: this.$route.query.templateId,
renwuId: this.$route.query.renwuId,
neibuleibie: this.$route.query.neibuleibie,
sblbdm: this.$route.query.sblbdm,
@ -408,7 +408,7 @@ export default {
if (this.state === 'create') {
url = '/jyxm/getCyJyxm'
data = {
templateId: this.$route.query.modelId,
templateId: this.$route.query.templateId,
order: sort
}
} else {

6
src/views/ysjl/2000/2400/common/ycjl.vue

@ -614,7 +614,7 @@ export default {
}
],
info: {
modelId: this.$route.query.modelId,
modelId: this.$route.query.templateId,
sbzldm: this.$route.query.sbzldm,
ysjlId: this.$route.query.id,
departmentId: this.$route.query.departmentId,
@ -681,7 +681,7 @@ export default {
url: '/ysjl/initYsjl',
method: 'post',
data: {
modelId: this.$route.query.modelId,
templateId: this.$route.query.templateId,
renwuId: this.$route.query.renwuId,
neibuleibie: this.$route.query.neibuleibie,
sblbdm: this.$route.query.sblbdm,
@ -800,7 +800,7 @@ export default {
if (this.state === 'create') {
url = '/jyxm/getCyJyxm'
data = {
templateId: this.$route.query.modelId,
templateId: this.$route.query.templateId,
order: sort
}
} else {

6
src/views/ysjl/2000/2400/zbg/jj/edit.vue

@ -511,7 +511,7 @@ export default {
}
],
info: {
modelId: this.$route.query.modelId,
modelId: this.$route.query.templateId,
sbzldm: this.$route.query.sbzldm,
ysjlId: this.$route.query.id,
departmentId: this.$route.query.departmentId,
@ -572,7 +572,7 @@ export default {
url: '/ysjl/initYsjl',
method: 'post',
data: {
modelId: this.$route.query.modelId,
templateId: this.$route.query.templateId,
renwuId: this.$route.query.renwuId,
neibuleibie: this.$route.query.neibuleibie,
sblbdm: this.$route.query.sblbdm,
@ -747,7 +747,7 @@ export default {
url: '/jyxm/getCyJyxm',
method: 'get',
params: {
templateId: this.$route.query.modelId,
templateId: this.$route.query.templateId,
order: 1
}
})

4
src/views/ysjl/7000/jj/edit.vue

@ -329,7 +329,7 @@ export default {
url: '/ysjl/initYsjl',
method: 'post',
data: {
modelId: this.$route.query.modelId,
modelId: this.$route.query.templateId,
renwuId: this.$route.query.renwuId,
neibuleibie: this.$route.query.neibuleibie,
sblbdm: this.$route.query.sblbdm,
@ -467,7 +467,7 @@ export default {
if (this.state === 'create') {
url = '/jyxm/getCyJyxm'
data = {
templateId: this.$route.query.modelId,
templateId: this.$route.query.templateId,
order: sort
}
} else {

6
src/views/ysjl/8000/jj/edit.vue

@ -506,7 +506,7 @@ export default {
}
],
info: {
modelId: this.$route.query.modelId,
modelId: this.$route.query.templateId,
sbzldm: this.$route.query.sbzldm,
sblbdm: this.$route.query.sblbdm,
ysjlId: this.$route.query.id,
@ -552,7 +552,7 @@ export default {
url: '/ysjl/initYsjl',
method: 'post',
data: {
modelId: this.$route.query.modelId,
templateId: this.$route.query.templateId,
renwuId: this.$route.query.renwuId,
neibuleibie: this.$route.query.neibuleibie,
sblbdm: this.$route.query.sblbdm,
@ -654,7 +654,7 @@ export default {
if (this.state === 'create') {
url = '/jyxm/getCyJyxm'
data = {
templateId: this.$route.query.modelId,
templateId: this.$route.query.templateId,
order: sort
}
} else {

4
src/views/ysjl/8000/jj/edit2.vue

@ -431,7 +431,7 @@ export default {
}
],
info: {
modelId: this.$route.query.modelId,
modelId: this.$route.query.templateId,
sbzldm: this.$route.query.sbzldm,
sblbdm: this.$route.query.sblbdm,
ysjlId: this.$route.query.id,
@ -531,7 +531,7 @@ export default {
},
//
getJyxm(sort) {
this.jyxmController.getJyxm(this.$route.query.modelId, this.$route.query.id, sort, this.state, false).then(data => {
this.jyxmController.getJyxm(this.$route.query.templateId, this.$route.query.id, sort, this.state, false).then(data => {
switch (sort) {
case 1:
this.jdjyxmData = data

2
src/views/ysjl/F000/dj/edit.vue

@ -470,7 +470,7 @@ export default {
url: '/ysjl/initYsjl',
method: 'post',
data: {
modelId: this.$route.query.modelId,
templateId: this.$route.query.templateId,
renwuId: this.$route.query.renwuId,
neibuleibie: this.$route.query.neibuleibie,
sblbdm: this.$route.query.sblbdm,

45
src/views/ysjl/components/original_db_list.vue

@ -16,15 +16,15 @@
</sticky>
<el-form>
<el-form-item>
<el-select v-model="listQuery.searchYsjl.shebeizhongleidaima" placeholder="请选择设备种类" style="width: 165px" clearable>
<el-select v-model="listQuery.shebeizhongleidaima" placeholder="请选择设备种类" style="width: 165px" clearable>
<el-option v-for="item in sbzlList" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
<el-input v-model="listQuery.searchYsjl.jilubianhao" placeholder="记录编号" clearable style="width: 200px" @keyup.enter.native="handleFilter" />
<el-input v-model="listQuery.searchYsjl.zhucedaima" placeholder="注册代码" clearable style="width: 240px" @keyup.enter.native="handleFilter" />
<el-input v-model="listQuery.searchYsjl.shiyongdanwei" placeholder="使用单位" clearable style="width: 400px" @keyup.enter.native="handleFilter" />
<el-input v-model="listQuery.jilubianhao" placeholder="记录编号" clearable style="width: 200px" @keyup.enter.native="handleFilter" />
<el-input v-model="listQuery.zhucedaima" placeholder="注册代码" clearable style="width: 240px" @keyup.enter.native="handleFilter" />
<el-input v-model="listQuery.shiyongdanwei" placeholder="使用单位" clearable style="width: 400px" @keyup.enter.native="handleFilter" />
<br>
<span class="radio-group-label">编辑类型</span>
<el-radio-group v-model="listQuery.searchYsjl.createBy" @change="handleFilter">
<el-radio-group v-model="listQuery.createBy" @change="handleFilter">
<el-radio :label="$store.getters.userId">
只看创建人
</el-radio>
@ -175,9 +175,7 @@ export default {
pageRow: 20, //
order: undefined, //
sort: undefined, //
searchYsjl: {
createBy: this.$store.getters.departmentId === 70 ? this.$store.getters.userId : undefined
},
createBy: this.$store.getters.departmentId === 70 ? this.$store.getters.userId : undefined,
hasChild: true
},
multipleSelection: [],
@ -211,10 +209,10 @@ export default {
},
methods: {
getList() {
this.listQuery.searchYsjl.cjState = 'ysjl'
this.listQuery.cjState = 'ysjl'
getNeedRecordList(this.listQuery).then(data => {
this.list = data.list
this.totalCount = data.totalCount
this.totalCount = data.total
this.common.switchInspection(this.list)
const messagePush = this.$store.getters.messageCount
for (let i = 0; i < messagePush.length; i++) {
@ -267,21 +265,21 @@ export default {
return false
}
}
this.ysjlId = ''
const ids = []
for (let i = 0; i < this.multipleSelection.length; i++) {
this.ysjlId = this.multipleSelection[i].id + ',' + this.ysjlId
if (i + 1 === this.multipleSelection.length) {
this.ysjlId = this.ysjlId.substring(0, this.ysjlId.length - 1)
}
ids.push(this.multipleSelection[i].id)
}
//
this.api({
url: '/ysjl/judgeState',
method: 'get',
params: {
ysjlIds: this.ysjlId,
ysjlIds: ids,
bglx: '2',
isDel: true
},
paramsSerializer: function(data) {
return require('qs').stringify(data, { indices: false })
}
}).then(data => {
if (data === 0) {
@ -290,7 +288,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.del(this.ysjlId)
this.del(ids)
}).catch(() => {
this.$message({
type: 'info',
@ -303,7 +301,7 @@ export default {
confirmButtonText: '确定',
type: 'warning'
}).then(() => {
this.del(this.ysjlId)
this.del(ids)
}).catch(() => {
this.$message({
type: 'info',
@ -316,10 +314,13 @@ export default {
},
del(ids) {
this.api({
url: '/ysjl/delYsjl',
method: 'post',
url: '/ysjl',
method: 'delete',
params: {
ids: ids
},
paramsSerializer: function(data) {
return require('qs').stringify(data, { indices: false })
}
}).then(() => {
this.$message({
@ -336,10 +337,10 @@ export default {
editYsjl($index) {
const ysjl = this.list[$index]
this.api({
url: '/template/getById',
url: '/template',
method: 'get',
params: {
id: ysjl.ysjlTemplateId
id: ysjl.templateId
}
}).then(data => {
const queryParam = this.common.buildEditYsjlRouterParam(ysjl)

4
src/views/ysjl/elevator/common/index.vue

@ -425,13 +425,13 @@ export default {
})
},
getJyxm(sort) {
this.jyxmController.getJyxm(this.$route.query.modelId, this.ysjlId, sort, this.state).then(data => {
this.jyxmController.getJyxm(this.$route.query.templateId, this.ysjlId, sort, this.state).then(data => {
this.bgfyData = data
this.tableJs.getData(this.cols, this.rows, data)
})
},
getDicJyxm(sort) {
this.jyxmController.getCyJyxm(this.$route.query.modelId, sort).then(data => {
this.jyxmController.getCyJyxm(this.$route.query.templateId, sort).then(data => {
this.dicGzjz = data.map(row => {
return { value: row.gongzuojianzheng }
})

Loading…
Cancel
Save