Compare commits

...

4 Commits

  1. 575
      src/views/allot/components/chengya_list.vue
  2. 291
      src/views/allot/hasAllot.vue
  3. 88
      src/views/allot/rwd_list.vue
  4. 14
      src/views/allot/team_list.vue
  5. 28
      src/views/allot/tuihui_list.vue
  6. 2
      src/views/archive/archive_info.vue
  7. 365
      src/views/bjd/department_list.vue
  8. 3
      src/views/bjd/dj_create.vue
  9. 28
      src/views/bjd/dj_input.vue
  10. 357
      src/views/bjd/dj_list.vue
  11. 123
      src/views/bjd/dt_list.vue
  12. 51
      src/views/bjd/jj_input.vue
  13. 96
      src/views/bjd/jj_list.vue
  14. 90
      src/views/bjd/qy_list.vue
  15. 8
      src/views/flow/definition.vue
  16. 22
      src/views/task/list.vue
  17. 90
      src/views/user/department.vue
  18. 3
      src/views/ysjl/1000/dj/sy/sysy.vue
  19. 34
      src/views/ysjl/2000/2100/zbg/dj/edit.vue
  20. 12
      src/views/ysjl/2000/2100/zbg/nd/edit.vue
  21. 40
      src/views/ysjl/2000/2200/zbg/dj/edit.vue
  22. 5
      src/views/ysjl/2000/2200/zbg/nd/tuoche.vue
  23. 610
      src/views/ysjl/2000/2300/zbg/jj/cyqp.vue
  24. 21
      src/views/ysjl/2000/2400/common/ycjl.vue
  25. 16
      src/views/ysjl/2000/2400/zbg/jj/edit.vue
  26. 2
      src/views/ysjl/4000/dj/common/index.vue
  27. 2
      src/views/ysjl/4000/jj/common/index.vue

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

@ -1,7 +1,7 @@
<template>
<div class="app-container">
<div class="filter-container">
<sticky style="margin-bottom: 10px;">
<sticky style="margin-bottom: 10px">
<div class="sub-navbar">
<el-button type="primary" icon="el-icon-sold-out" @click="renwuFp">
批量分配
@ -16,11 +16,33 @@
</sticky>
<el-form>
<el-form-item>
<el-input v-model="listQuery.serialNumber" placeholder="报检单号" clearable style="width: 160px" @keyup.enter.native="handleFilter" />
<el-select v-model="listQuery.shebeizhongleidaima" placeholder="请选择设备种类" clearable @change="handleFilter">
<el-option v-for="item in sbzlList" :key="item.value" :label="item.label" :value="item.value" />
<el-input
v-model="listQuery.serialNumber"
placeholder="报检单号"
clearable
style="width: 160px"
@keyup.enter.native="handleFilter"
/>
<el-select
v-model="listQuery.shebeizhongleidaima"
placeholder="请选择设备种类"
clearable
@change="handleFilter"
>
<el-option
v-for="item in sbzlList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<el-select v-model="listQuery.quhuadaima" placeholder="请选择所属区划" clearable value="" @change="handleFilter">
<el-select
v-model="listQuery.quhuadaima"
placeholder="请选择所属区划"
clearable
value=""
@change="handleFilter"
>
<el-option
v-for="item in areas"
:key="item.value"
@ -28,7 +50,13 @@
:value="item.value"
/>
</el-select>
<el-input v-model="listQuery.shiyongdanwei" placeholder="使用单位名称" clearable style="width: 400px" @keyup.enter.native="handleFilter" />
<el-input
v-model="listQuery.shiyongdanwei"
placeholder="使用单位名称"
clearable
style="width: 400px"
@keyup.enter.native="handleFilter"
/>
<el-button type="primary" icon="el-icon-search" @click="handleFilter">
查询
</el-button>
@ -36,20 +64,68 @@
清除
</el-button>
<br>
<el-select v-model="listQuery.jianyanleibie" placeholder="检验类别" clearable style="width:100px" value="" @change="handleFilter">
<el-select
v-model="listQuery.jianyanleibie"
placeholder="检验类别"
clearable
style="width: 100px"
value=""
@change="handleFilter"
>
<el-option value="DJ" label="定期检验" />
<el-option value="JJ" label="监督检验" />
<el-option value="ZJ" label="制造检验" />
</el-select>
<el-date-picker v-model="listQuery.shouliriqi" type="date" value-format="yyyy-MM-dd" placeholder="选择报检日期" style="width: 150px" @change="handleFilter" />
<el-input v-model="listQuery.shigongdanwei" placeholder="施工单位名称" clearable style="width: 300px" @keyup.enter.native="handleFilter" />
<el-date-picker v-model="listQuery.xianchangjianyanStart" type="date" value-format="yyyy-MM-dd" placeholder="现场检验日期(起)" style="width: 180px;" />
<el-date-picker v-model="listQuery.xianchangjianyanEnd" type="date" value-format="yyyy-MM-dd" placeholder="现场检验日期(止)" style="width: 180px;" />
<el-select v-model="listQuery.shouliren" filterable allow-create default-first-option clearable placeholder="请选择受理人员" style="width: 110px;">
<el-option v-for="user in users" :key="user.id" :label="user.nickname" :value="user.nickname" />
<el-date-picker
v-model="listQuery.shouliriqi"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择报检日期"
style="width: 150px"
@change="handleFilter"
/>
<el-input
v-model="listQuery.shigongdanwei"
placeholder="施工单位名称"
clearable
style="width: 300px"
@keyup.enter.native="handleFilter"
/>
<el-date-picker
v-model="listQuery.xianchangjianyanStart"
type="date"
value-format="yyyy-MM-dd"
placeholder="现场检验日期(起)"
style="width: 180px"
/>
<el-date-picker
v-model="listQuery.xianchangjianyanEnd"
type="date"
value-format="yyyy-MM-dd"
placeholder="现场检验日期(止)"
style="width: 180px"
/>
<el-select
v-model="listQuery.shouliren"
filterable
allow-create
default-first-option
clearable
placeholder="请选择受理人员"
style="width: 110px"
>
<el-option
v-for="user in users"
:key="user.id"
:label="user.nickname"
:value="user.nickname"
/>
</el-select>
<span class="radio-group-label">申请现场检验</span>
<el-radio-group v-model="listQuery.zhongjianState" @change="handleFilter">
<el-radio-group
v-model="listQuery.zhongjianState"
@change="handleFilter"
>
<el-radio :label="0">
</el-radio>
@ -83,26 +159,86 @@
<span v-text="getIndex(scope.$index)" />
</template>
</el-table-column>
<el-table-column align="center" label="检验类别" prop="jianyanleibie" width="80">
<el-table-column
align="center"
label="检验类别"
prop="jianyanleibie"
width="80"
>
<template slot-scope="scope">
<span v-if="scope.row.jianyanleibie === 'DJ'">定期检验</span>
<span v-else-if="scope.row.jianyanleibie === 'JJ'">监督检验</span>
<span v-else-if="scope.row.jianyanleibie === 'JJ' && scope.row.neibuleibie === 'SC'">首次检验</span>
<span
v-else-if="
scope.row.jianyanleibie === 'JJ' && scope.row.neibuleibie === 'SC'
"
>首次检验</span>
<span v-else-if="scope.row.jianyanleibie === 'ZJ'">制造检验</span>
</template>
</el-table-column>
<el-table-column align="center" label="报检单号" prop="serialNumber" width="140" sortable="custom" />
<el-table-column
align="center"
label="报检单号"
prop="serialNumber"
width="140"
sortable="custom"
/>
<el-table-column align="center" label="使用单位" prop="shiyongdanwei" />
<el-table-column align="center" label="使用单位地址" prop="shiyongdanweiDizhi" />
<el-table-column align="center" label="区划名称" prop="quhuamingcheng" width="110" sortable />
<el-table-column align="center" label="报检日期" prop="shouliriqi" width="110" sortable />
<el-table-column align="center" label="受理人" prop="shouliren" width="100" />
<el-table-column v-if="departmentId !== 75" align="center" label="备注" prop="bjdBeizhu" width="80" />
<el-table-column
align="center"
label="使用单位地址"
prop="shiyongdanweiDizhi"
/>
<el-table-column
align="center"
label="区划名称"
prop="quhuamingcheng"
width="110"
sortable
/>
<el-table-column
align="center"
label="报检日期"
prop="shouliriqi"
width="110"
sortable
/>
<el-table-column
align="center"
label="受理人"
prop="shouliren"
width="100"
/>
<el-table-column
v-if="departmentId !== 75"
align="center"
label="备注"
prop="bjdBeizhu"
width="80"
/>
<el-table-column align="left" label="设备台数(待/总)" width="140">
<template slot-scope="scope">
<el-button type="success" size="small" circle icon="el-icon-view" title="预览报检单" @click="viewBjd(scope.row)" />
<el-button style="margin-left:1px" size="small" circle @click="viewBjdRenwu(scope.row.bjdId)">
<span style="color: #67C23A;font-weight: bold">{{ scope.row.allotNum }}</span> / <span style="color: #F56C6C;font-weight: bold">{{ scope.row.totalNum }}</span>
<el-button
type="success"
size="small"
circle
icon="el-icon-view"
title="预览报检单"
@click="viewBjd(scope.row)"
/>
<el-button
style="margin-left: 1px"
size="small"
circle
@click="viewBjdRenwu(scope.row.bjdId)"
>
<span style="color: #67c23a; font-weight: bold">{{
scope.row.allotNum
}}</span>
/
<span style="color: #f56c6c; font-weight: bold">{{
scope.row.totalNum
}}</span>
</el-button>
</template>
</el-table-column>
@ -117,55 +253,189 @@
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
<el-dialog :visible.sync="dialogVisible" :title="title" width="70%" @close="closeDialog">
<el-dialog
:visible.sync="dialogVisible"
:title="title"
width="70%"
@close="closeDialog"
>
<el-container>
<el-form>
<el-form-item>
<el-select v-model="departmentId" placeholder="请选择科室" style="width: 150px;" @change="selectDepartmentUser">
<el-option v-for="dept in depts" :key="dept.id" :label="dept.name" :value="dept.id" />
<el-select
v-model="departmentId"
placeholder="请选择科室"
style="width: 150px"
@change="selectDepartmentUser"
>
<el-option
v-for="dept in depts"
:key="dept.id"
:label="dept.name"
:value="dept.id"
/>
</el-select>
<el-select v-model="renwudan.teamId" placeholder="请选择检验小组" style="width: 150px;" @change="selectTeamUser">
<el-option v-for="team in teams" :key="team.id" :label="team.name" :value="team.id" />
<el-select
v-model="renwudan.teamId"
placeholder="请选择检验小组"
style="width: 150px"
@change="selectTeamUser"
>
<el-option
v-for="team in teams"
:key="team.id"
:label="team.teamName"
:value="team.id"
/>
</el-select>
<el-select v-model="renlingren" :collapse-tags="true" placeholder="请选择人员" multiple style="width: 160px;">
<el-option v-for="user in users" :key="user.id" :label="user.nickname" :value="user.id" />
<el-select
v-model="renlingren"
:collapse-tags="true"
placeholder="请选择人员"
multiple
style="width: 160px"
>
<el-option
v-for="user in users"
:key="user.id"
:label="user.name"
:value="user.id"
/>
</el-select>
<el-button type="primary" @disabled="btnClick" @click="allotRenwu">
执行分配
</el-button>
</el-form-item>
<el-form-item>
<el-date-picker v-model="renwudan.xiadariqi" type="date" value-format="yyyy-MM-dd" placeholder="选择下达日期" style="width: 150px;" />
<el-date-picker v-model="renwudan.yuejianriqi" type="date" value-format="yyyy-MM-dd" placeholder="选择约检日期" style="width: 150px;" @blur="setWanchengqixian()" />
<el-date-picker v-model="renwudan.wanchengqixian" type="date" value-format="yyyy-MM-dd" placeholder="选择完成期限" style="width: 150px;" />
<el-select v-model="renwudan.jianyanleixing" :collapse-tags="true" placeholder="请选择检验类型" style="width: 130px;">
<el-date-picker
v-model="renwudan.xiadariqi"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择下达日期"
style="width: 150px"
/>
<el-date-picker
v-model="renwudan.yuejianriqi"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择约检日期"
style="width: 150px"
@blur="setWanchengqixian()"
/>
<el-date-picker
v-model="renwudan.wanchengqixian"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择完成期限"
style="width: 150px"
/>
<el-select
v-model="renwudan.jianyanleixing"
:collapse-tags="true"
placeholder="请选择检验类型"
style="width: 130px"
>
<el-option key="初检" label="初检" value="初检" />
<el-option key="复检" label="复检" value="复检" />
</el-select>
<el-input v-model="renwudan.beizhu" type="text" style="width: 240px;" placeholder="请填写备注信息" />
<el-input
v-model="renwudan.beizhu"
type="text"
style="width: 240px"
placeholder="请填写备注信息"
/>
</el-form-item>
</el-form>
</el-container>
<el-table ref="allotList" :data="allotList" size="small" style="width: 150%" border fit highlight-current-row :row-class-name="tableRowBfZhongjian" @row-click="onDialogRowClick" @selection-change="handleDialogSelectionChange">
<el-table
ref="allotList"
:data="allotList"
size="small"
style="width: 150%"
border
fit
highlight-current-row
:row-class-name="tableRowBfZhongjian"
@row-click="onDialogRowClick"
@selection-change="handleDialogSelectionChange"
>
<el-table-column type="selection" width="45" />
<el-table-column align="center" label="序号" width="50" fixed="left">
<template slot-scope="scope">
<span v-text="getIndex(scope.$index)" />
</template>
</el-table-column>
<el-table-column v-if="allotSbzl === '2000'" align="center" label="设备名称" prop="shebeimingcheng" width="150" />
<el-table-column align="center" :formatter="formatter.formatterCategory" label="检验项目" prop="neibuleibie" width="100" />
<el-table-column align="center" label="下次检验日期" prop="xiacijianyanriqi" width="100" />
<el-table-column align="center" label="使用单位" prop="shiyongdanwei" width="240px;" />
<el-table-column v-if="allotSbzl !== '8000'" align="center" label="产品编号/出厂编号" prop="chanpinbianhao" width="140" />
<el-table-column align="center" label="区划名称" prop="quhuamingcheng" width="80" />
<el-table-column align="center" label="注册代码" prop="zhucedaima" width="160" />
<el-table-column align="center" label="使用登记编号" prop="shiyongdengjibianhao" width="160" />
<el-table-column
v-if="allotSbzl === '2000'"
align="center"
label="设备名称"
prop="shebeimingcheng"
width="150"
/>
<el-table-column
align="center"
:formatter="formatter.formatterCategory"
label="检验项目"
prop="neibuleibie"
width="100"
/>
<el-table-column
align="center"
label="下次检验日期"
prop="xiacijianyanriqi"
width="100"
/>
<el-table-column
align="center"
label="使用单位"
prop="shiyongdanwei"
width="240px;"
/>
<el-table-column
v-if="allotSbzl !== '8000'"
align="center"
label="产品编号/出厂编号"
prop="chanpinbianhao"
width="140"
/>
<el-table-column
align="center"
label="区划名称"
prop="quhuamingcheng"
width="80"
/>
<el-table-column
align="center"
label="注册代码"
prop="zhucedaima"
width="160"
/>
<el-table-column
align="center"
label="使用登记编号"
prop="shiyongdengjibianhao"
width="160"
/>
<template v-if="allotSbzl === '8000'">
<el-table-column align="center" label="管道长度(m)/数量(条)" prop="s32" width="140" />
<el-table-column align="center" label="管道级别" prop="s7" width="140" />
<el-table-column
align="center"
label="管道长度(m)/数量(条)"
prop="s32"
width="140"
/>
<el-table-column
align="center"
label="管道级别"
prop="s7"
width="140"
/>
</template>
<el-table-column align="center" label="申请现场检验日期" prop="shenqingxianchangriqi" width="160" />
<el-table-column
align="center"
label="申请现场检验日期"
prop="shenqingxianchangriqi"
width="160"
/>
</el-table>
</el-dialog>
</div>
@ -247,7 +517,7 @@ export default {
url: '/renwu/list',
method: 'get',
params: this.listQuery
}).then(data => {
}).then((data) => {
this.list = data.list
this.total = data.total
this.showLoading = false
@ -261,7 +531,7 @@ export default {
sbzl: undefined,
level: '1'
}
}).then(data => {
}).then((data) => {
this.sbzlList = data
})
},
@ -282,31 +552,50 @@ export default {
},
getIndex($index) {
//
return (this.listQuery.pageNum - 1) * this.listQuery.pageSize + $index + 1
return (
(this.listQuery.pageNum - 1) * this.listQuery.pageSize + $index + 1
)
},
//
renwuFp() {
this.allotList = []
if (this.multipleSelection.length === 0) {
this.$message({ message: '请在列表选择要操作的数据。', type: 'warning' })
this.$message({
message: '请在列表选择要操作的数据。',
type: 'warning'
})
return false
} else {
if (this.multipleSelection.length > 1 && !this.arrFn(this.multipleSelection)) {
return this.$message('所选报检单相同使用单位和相同施工单位才能批量分配')
}
this.bjdIds.length = 0
this.bjdIds = this.$refs.list.selection.map(rw => rw.bjdId)
this.bjdIds = this.$refs.list.selection.map((rw) => rw.bjdId)
this.apibjd({
url: '/renwu/getAllotBaseList',
method: 'post',
data: {
bjdIds: this.bjdIds
}
}).then(data => {
}).then((data) => {
this.allotList = data
this.allotSbzl = this.allotList[0].shebeizhongleidaima
this.renwudan = {
shiyongdanwei: this.multipleSelection[0].shiyongdanwei,
shiyongdanweiLianxiren: this.multipleSelection[0].shiyongdanweiLianxiren,
shiyongdanweiDianhua: this.multipleSelection[0].shiyongdanweiDianhua,
shiyongdanweiDizhi: this.multipleSelection[0].shiyongdanweiDizhi,
shigongdanwei: this.multipleSelection[0].shigongdanwei,
shigongdanweiLianxiren: this.multipleSelection[0].shigongdanweiLianxiren,
shigongdanweiDianhua: this.multipleSelection[0].shigongdanweiDianhua,
xiadariqi: this.formatter.dateFormat('YYYY-MM-dd')
}
if (this.multipleSelection[0].shebeileixing !== undefined && this.multipleSelection[0].shebeileixing !== null) {
this.title = '任务分配(' + this.multipleSelection[0].shebeileixing + ')'
if (
this.multipleSelection[0].shebeileixing !== undefined &&
this.multipleSelection[0].shebeileixing !== null
) {
this.title =
'任务分配(' + this.multipleSelection[0].shebeileixing + ')'
}
this.dialogVisible = true
this.$nextTick(() => {
@ -314,26 +603,37 @@ export default {
this.selection = data.list
})
})
}
},
// 退
returnToBjd() {
if (this.multipleSelection.length === 0) {
this.$message({ message: '请在列表选择要退回的数据。', type: 'warning' })
this.$message({
message: '请在列表选择要退回的数据。',
type: 'warning'
})
return false
}
this.bjdIds.length = 0
this.bjdIds = this.$refs.list.selection.map(rw => rw.bjdId)
this.bjdIds = this.$refs.list.selection.map((rw) => rw.bjdId)
//
for (let i = 0; i < this.multipleSelection.length; i++) {
if (this.multipleSelection[i].allotNum !== this.multipleSelection[i].totalNum) {
this.$message({ message: '有任务已经分配,请重新选择。', type: 'warning' })
if (
this.multipleSelection[i].allotNum !==
this.multipleSelection[i].totalNum
) {
this.$message({
message: '有任务已经分配,请重新选择。',
type: 'warning'
})
return false
} else {
this.$prompt('请输入退回原因', '提示', {
inputType: 'textarea',
confirmButtonText: '确定',
cancelButtonText: '取消'
}).then(({ value }) => {
})
.then(({ value }) => {
this.apibjd({
url: '/bjd/returnToBjd',
method: 'get',
@ -341,11 +641,12 @@ export default {
bjdIds: this.bjdIds,
reason: value
}
}).then(data => {
}).then((data) => {
this.getList()
this.$message({ message: '任务异常退回成功', type: 'success' })
})
}).catch(() => {
})
.catch(() => {
this.$message({
type: 'info',
message: '取消输入'
@ -357,18 +658,25 @@ export default {
//
renwuZf() {
if (this.multipleSelection.length === 0) {
this.$message({ message: '请在列表选择要作废的数据。', type: 'warning' })
this.$message({
message: '请在列表选择要作废的数据。',
type: 'warning'
})
return false
}
if (this.multipleSelection.length > 1) {
this.$message({ message: '请选择单条报检单进行作废。', type: 'warning' })
this.$message({
message: '请选择单条报检单进行作废。',
type: 'warning'
})
return false
}
this.$prompt('请输入作废原因!', '提示', {
inputType: 'textarea',
confirmButtonText: '确定',
cancelButtonText: '取消'
}).then(({ value }) => {
})
.then(({ value }) => {
if (value === null) {
this.$message({ message: '请填写作废原因!', type: 'warning' })
return false
@ -380,7 +688,7 @@ export default {
bjdIds: this.$refs.list.selection[0].bjdId,
reason: value
}
}).then(data => {
}).then((data) => {
this.getList()
if (data.count > 0) {
this.$alert(data.count + '条任务作废成功!', '确认信息', {
@ -390,7 +698,8 @@ export default {
this.$message({ message: '任务作废失败!', type: 'warning' })
}
})
}).catch(() => {
})
.catch(() => {
this.$message({
type: 'info',
message: '取消作废'
@ -400,9 +709,27 @@ export default {
viewBjd(bjd) {
const type = '/finish'
if (bjd.jianyanleibie === 'DJ') {
this.$router.push({ path: '/bjd/bjd-dj-input/' + bjd.bjdId + '/' + bjd.shebeizhongleidaima + '/' + bjd.shebeizhongleidaima + type })
this.$router.push({
path:
'/bjd/bjd-dj-input/' +
bjd.bjdId +
'/' +
bjd.shebeizhongleidaima +
'/' +
bjd.shebeizhongleidaima +
type
})
} else {
this.$router.push({ path: '/bjd/bjd-jj-input/' + bjd.bjdId + '/' + bjd.shebeizhongleidaima + '/' + bjd.shebeizhongleidaima + type })
this.$router.push({
path:
'/bjd/bjd-jj-input/' +
bjd.bjdId +
'/' +
bjd.shebeizhongleidaima +
'/' +
bjd.shebeizhongleidaima +
type
})
}
},
viewBjdRenwu(bjdid) {
@ -417,7 +744,7 @@ export default {
data: {
bjdIds: this.bjdIds
}
}).then(data => {
}).then((data) => {
this.allotList = data.list
this.allotSbzl = this.allotList[0].shebeizhongleidaima
this.dialogVisible = true
@ -450,24 +777,25 @@ export default {
this.api({
url: '/department/all',
method: 'get'
}).then(data => {
}).then((data) => {
this.depts = data
})
},
getArea() { //
getArea() {
//
this.api({
url: '/area/getShiArea',
method: 'get',
params: {
shidaima: '370100'
}
}).then(data => {
}).then((data) => {
this.areas = data
})
},
selectDepartmentUser(val) {
this.renlingren = []
this.getUserList(val)
this.getTeamList(val)
},
getUserList(val) {
this.api({
@ -476,26 +804,34 @@ export default {
params: {
departmentId: val
}
}).then(data => {
}).then((data) => {
this.users = data
})
},
openZhongjian() {
if (this.multipleSelection.length !== 1) {
this.$message({ message: '请在列表选择要进行现场检验的设备,只允许单台操作。', type: 'warning' })
this.$message({
message: '请在列表选择要进行现场检验的设备,只允许单台操作。',
type: 'warning'
})
return false
}
if (this.multipleSelection[0].zhongjianriqi) {
this.bjdZhongjian.xianchangriqi = this.multipleSelection[0].zhongjianriqi
this.bjdZhongjian.xianchangriqi =
this.multipleSelection[0].zhongjianriqi
} else {
this.bjdZhongjian.xianchangriqi = new Date()
}
this.bjdZhongjian.xianchangbeizhu = this.multipleSelection[0].zhongjianBeizhu
this.bjdZhongjian.xianchangbeizhu =
this.multipleSelection[0].zhongjianBeizhu
this.dialogXianchangVisible = true
},
openBaseZhongjian() {
if (this.multipleSelection.length !== 1) {
this.$message({ message: '请在列表选择要操作的数据,只能选择单台设备。', type: 'warning' })
this.$message({
message: '请在列表选择要操作的数据,只能选择单台设备。',
type: 'warning'
})
return false
}
this.apibjd({
@ -504,14 +840,17 @@ export default {
data: {
bjdIds: [this.multipleSelection[0].bjdId]
}
}).then(data => {
}).then((data) => {
this.allotList = data.list
this.dialogXcjyVisible = true
})
},
clearBaseZhongjian() {
if (this.multipleSelection.length !== 1) {
this.$message({ message: '请在列表选择要操作的数据,只能选择单台设备。', type: 'warning' })
this.$message({
message: '请在列表选择要操作的数据,只能选择单台设备。',
type: 'warning'
})
return false
}
this.apibjd({
@ -520,7 +859,7 @@ export default {
params: {
bjdId: this.multipleSelection[0].bjdId
}
}).then(data => {
}).then((data) => {
if (data === '清除成功!') {
this.getList()
}
@ -533,7 +872,7 @@ export default {
params: {
renwuId: this.allotList[index].id
}
}).then(data => {
}).then((data) => {
if (data === '清除成功!') {
this.allotList[index].shenqingxianchangriqi = null
}
@ -544,12 +883,27 @@ export default {
this.departmentId = this.$store.getters.departmentId
this.users = this.getUserList(this.departmentId)
},
arrFn(arr) {
const ary = new Array(arr)
const nary = arr
if (arr.length > 1) {
for (let i = 0; i < ary.length; i++) {
if (
nary[i].shiyongdanwei === nary[i + 1].shiyongdanwei &&
nary[i].shigongdanwei === nary[i + 1].shigongdanwei
) {
return true
}
}
}
},
allotRenwu() {
this.btnClick = true
if (this.selection.length === 0) {
this.$message({ message: '请选择要分配的数据。', type: 'warning' })
return false
}
if (this.renlingren.length > 0) {
for (let i = 0; i < this.teams.length; i++) {
if (this.renwudan.teamId === this.teams[i].id) {
@ -596,7 +950,7 @@ export default {
url: '/bjd/updBjdEndState',
method: 'post',
data: this.bjdZhongjian
}).then(data => {
}).then((data) => {
this.$message.success('添加成功。')
this.getList()
this.dialogXianchangVisible = false
@ -604,44 +958,63 @@ export default {
},
tijiaoJianyanBf() {
if (this.selection.length === 0) {
this.$message({ message: '请在列表选择要操作的数据。', type: 'warning' })
this.$message({
message: '请在列表选择要操作的数据。',
type: 'warning'
})
return false
}
this.bjdZhongjian.bjdid = this.multipleSelection[0].bjdId
this.bjdZhongjian.renwuIds = this.$refs.allotList.selection.map(rw => {
this.bjdZhongjian.renwuIds = this.$refs.allotList.selection
.map((rw) => {
return rw.id
}).join(',')
})
.join(',')
this.apibjd({
url: '/renwu/updBjdEndState',
method: 'post',
data: this.bjdZhongjian
}).then(data => {
}).then((data) => {
this.$message.success('添加成功。')
this.getList()
this.dialogXcjyVisible = false
})
},
getTeamList(departmentId) { //
getTeamList(departmentId) {
//
this.apibjd({
url: '/team/getTeamList',
method: 'get',
params: { departmentId }
}).then(data => {
}).then((data) => {
this.teams = data
})
},
selectTeamUser(val) {
console.log(this.teams)
const _this = this
for (let i = 0; i < this.teams.length; i++) {
if (this.teams[i].id === val) {
this.renlingren = JSON.parse(this.teams[i].renyuans)
this.users = this.teams[i].teamPerson.split(',')
break
}
}
this.users = this.users.map((item) => {
const obj = {}
obj.id = item
obj.name = _this.formatter.getChineseName(null, null, item)
return obj
})
console.log(this.users)
},
setWanchengqixian() {
var date = new Date(this.renwudan.yuejianriqi)
date.setMonth(date.getMonth() + 1)
this.$set(this.renwudan, 'wanchengqixian', this.formatter.dateFormat('YYYY-MM-dd', date))
this.$set(
this.renwudan,
'wanchengqixian',
this.formatter.dateFormat('YYYY-MM-dd', date)
)
},
tableRowZhongjian({ row, rowIndex }) {
if (row.zhongjianState === 1) {
@ -671,14 +1044,14 @@ export default {
</script>
<style>
/** 允许终检 */
.el-table .qiyezhongjian-row {
/** 允许终检 */
.el-table .qiyezhongjian-row {
color: #0831e4;
}
.el-table .keshizhongjian-row {
}
.el-table .keshizhongjian-row {
color: #da6b83;
}
.el-table .xianchangriqi-row {
}
.el-table .xianchangriqi-row {
color: #66e41e;
}
}
</style>

291
src/views/allot/hasAllot.vue

@ -1,7 +1,7 @@
<template>
<div class="app-container">
<div class="filter-container">
<sticky style="margin-bottom: 10px;">
<sticky style="margin-bottom: 10px">
<div class="sub-navbar">
<el-button type="primary" icon="el-icon-sold-out" @click="renwuCh">
任务撤回
@ -10,12 +10,39 @@
</sticky>
<el-form>
<el-form-item>
<el-cascader :options="options" :show-all-levels="false" placeholder="请选择检验类别" @change="getOptions" />
<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-cascader
v-model="listQuery.neibuleibie"
:options="options"
:show-all-levels="false"
placeholder="请选择检验类别"
@change="getOptions"
/>
<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.serialNumber" placeholder="报检单号" clearable style="width: 160px" @keyup.enter.native="handleFilter" />
<el-input v-model="listQuery.shiyongdanwei" placeholder="使用单位名称" clearable style="width: 300px" @keyup.enter.native="handleFilter" />
<el-input
v-model="listQuery.serialNumber"
placeholder="报检单号"
clearable
style="width: 160px"
@keyup.enter.native="handleFilter"
/>
<el-input
v-model="listQuery.shiyongdanwei"
placeholder="使用单位名称"
clearable
style="width: 300px"
@keyup.enter.native="handleFilter"
/>
<el-button type="primary" icon="el-icon-search" @click="handleFilter">
查询
</el-button>
@ -23,12 +50,46 @@
清除
</el-button>
<br>
<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-date-picker v-model="listQuery.yuejiankaishi" type="date" value-format="yyyy-MM-dd" placeholder="约定检验日期(起)" style="width: 180px;" />
<el-date-picker v-model="listQuery.yuejianjieshu" type="date" value-format="yyyy-MM-dd" placeholder="约定检验日期(止)" style="width: 180px;" />
<el-select v-model="listQuery.teamId" placeholder="请选择检验小组" style="width: 150px;" @change="handleFilter">
<el-option v-for="team in teams" :key="team.id" :label="team.name" :value="team.id" />
<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-date-picker
v-model="listQuery.yuejiankaishi"
type="date"
value-format="yyyy-MM-dd"
placeholder="约定检验日期(起)"
style="width: 180px"
/>
<el-date-picker
v-model="listQuery.yuejianjieshu"
type="date"
value-format="yyyy-MM-dd"
placeholder="约定检验日期(止)"
style="width: 180px"
/>
<el-select
v-model="listQuery.teamId"
placeholder="请选择检验小组"
style="width: 150px"
@change="handleFilter"
>
<el-option
v-for="team in teams"
:key="team.id"
:label="team.name"
:value="team.id"
/>
</el-select>
<br>
<span class="radio-group-label">任务状态</span>
@ -73,15 +134,36 @@
@sort-change="sortChange"
>
<el-table-column type="selection" width="40" />
<el-table-column align="center" label="序号" width="60">
<template slot-scope="scope">
<el-table-column align="center" label="序号" width="60" type="index">
<!-- <template slot-scope="scope">
<span v-text="getIndex(scope.$index)" />
</template>
</template> -->
</el-table-column>
<el-table-column align="center" label="报检单号" prop="serialNumber" width="150" />
<el-table-column align="center" label="设备种类" prop="shebeizhonglei" width="120" />
<el-table-column :formatter="formatter.formatterCategory" align="center" label="检验类别" prop="neibuleibie" width="80" />
<el-table-column align="center" label="使用单位/制造单位" prop="shiyongdanwei" width="250">
<el-table-column
align="center"
label="报检单号"
prop="serialNumber"
width="150"
/>
<el-table-column
align="center"
label="设备种类"
prop="shebeizhonglei"
width="120"
/>
<el-table-column
:formatter="formatter.formatterCategory"
align="center"
label="检验类别"
prop="neibuleibie"
width="80"
/>
<el-table-column
align="center"
label="使用单位/制造单位"
prop="shiyongdanwei"
width="250"
>
<template slot-scope="scope">
<el-tag v-if="scope.row.jianyanleibie === 'ZJ'" type="info">
{{ scope.row.zhizaodanwei }}
@ -91,14 +173,58 @@
</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="注册代码" prop="zhucedaima" width="180" />
<el-table-column align="center" label="使用登记编号" prop="shiyongdengjibianhao" width="140" />
<el-table-column align="center" label="出厂编号" prop="chanpinbianhao" width="140" />
<el-table-column align="center" label="报检日期" prop="shouliriqi" width="100" />
<el-table-column align="center" label="区划名称" prop="quhuamingcheng" width="90" />
<el-table-column :formatter="formatter.getChineseName" align="center" label="认领人" prop="renlingren" width="180" />
<el-table-column align="center" label="约检日期" prop="yuejianriqi" width="100" fixed="right" sortable="custom" />
<el-table-column align="center" label="任务状态" prop="rwState" width="90" fixed="right">
<el-table-column
align="center"
label="注册代码"
prop="zhucedaima"
width="180"
/>
<el-table-column
align="center"
label="使用登记编号"
prop="shiyongdengjibianhao"
width="140"
/>
<el-table-column
align="center"
label="出厂编号"
prop="chanpinbianhao"
width="140"
/>
<el-table-column
align="center"
label="报检日期"
prop="shouliriqi"
width="100"
/>
<el-table-column
align="center"
label="区划名称"
prop="quhuamingcheng"
width="90"
/>
<el-table-column
:formatter="formatter.getChineseName"
align="center"
label="认领人"
prop="renlingren"
width="180"
/>
<el-table-column
align="center"
label="约检日期"
prop="yuejianriqi"
width="100"
fixed="right"
sortable="custom"
/>
<el-table-column
align="center"
label="任务状态"
prop="rwState"
width="90"
fixed="right"
>
<template slot-scope="scope">
<el-tag v-if="scope.row.rwState === 0" type="brand">
待办
@ -117,7 +243,13 @@
</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="交费状态" prop="jfState" width="90" fixed="right">
<el-table-column
align="center"
label="交费状态"
prop="jfState"
width="90"
fixed="right"
>
<template slot-scope="scope">
<el-tag v-if="scope.row.jfState" type="success">
已交费
@ -135,6 +267,7 @@
<script>
import Sticky from '@/components/Sticky'
import Pagination from '@/components/Pagination'
import qs from 'qs'
export default {
name: 'HasAllot',
components: { Pagination, Sticky },
@ -157,63 +290,84 @@ export default {
selection: [],
departmentId: this.$store.getters.departmentId,
showLoading: true,
options: [{
options: [
{
value: 'DJ',
label: '定期检验',
children: [{
children: [
{
value: 'DQ',
label: '定期检验'
}, {
},
{
value: 'NB',
label: '内部检验'
}, {
},
{
value: 'WB',
label: '外部检验'
}, {
},
{
value: 'SZ',
label: '水(介)质检验'
}, {
},
{
value: 'SY',
label: '水压检验'
}, {
},
{
value: 'QM',
label: '全面检验'
}, {
},
{
value: 'SCDQ',
label: '首次定期检验'
}, {
},
{
value: 'SC',
label: '首次检验'
}, {
},
{
value: 'ND',
label: '年度检查'
}, {
},
{
value: 'NJ',
label: '年度检验'
}]
}, {
}
]
},
{
value: 'JJ',
label: '监督检验',
children: [{
children: [
{
value: 'JD',
label: '监督检验'
}, {
},
{
value: 'SJ',
label: '首次检验'
}, {
},
{
value: 'DX',
label: '大修改造'
}, {
},
{
value: 'GZ',
label: '改造维修'
}, {
},
{
value: 'ZG',
label: '整装锅炉'
}, {
},
{
value: 'SG',
label: '散装锅炉'
}]
}]
}
]
}
]
}
},
created() {
@ -227,7 +381,7 @@ export default {
url: '/renwu/hasAllotList',
method: 'get',
params: this.listQuery
}).then(data => {
}).then((data) => {
this.list = data.list
this.total = data.total
this.showLoading = false
@ -241,24 +395,39 @@ export default {
sbzl: undefined,
level: '1'
}
}).then(data => {
}).then((data) => {
this.sbzlList = data
})
},
renwuCh() { //
renwuCh() {
//
if (this.$refs.list.selection.length === 0) {
return this.$message.warning('请选择需要撤回的报检单')
} else {
this.$refs.list.selection.map((item) => {
if (item.rwState !== 0 && item.rwState !== 1) {
return this.$message.warning('只能选择未办理的报检单进行撤回')
} else {
this.apibjd({
url: '/renwu/chehui',
method: 'get',
params: {
rwId: this.$refs.list.selection.map(rw => {
renwuIds: this.$refs.list.selection.map((rw) => {
return rw.id
}).join(',')
})
},
paramsSerializer: function(params) {
return qs.stringify(params, { indices: false })
}
}).then(data => {
}).then((data) => {
if (data !== '') {
this.$message({ message: '撤回成功!', type: 'success' })
}
this.getList()
})
}
})
}
},
getOptions(aaaa) {
this.listQuery.neibuleibie = aaaa[1]
@ -270,8 +439,7 @@ export default {
this.getList()
},
clearSearch() {
this.listQuery = {
}
this.listQuery = {}
this.getList()
},
handleDialogSelectionChange(val) {
@ -282,7 +450,9 @@ export default {
},
getIndex($index) {
//
return (this.listQuery.pageNum - 1) * this.listQuery.pageSize + $index + 1
return (
(this.listQuery.pageNum - 1) * this.listQuery.pageSize + $index + 1
)
},
onRowClick(row) {
this.$refs.list.toggleRowSelection(row)
@ -296,12 +466,13 @@ export default {
}
this.getList()
},
getTeamList(departmentId) { //
getTeamList(departmentId) {
//
this.apibjd({
url: '/team/getTeamList',
method: 'get',
params: { departmentId }
}).then(data => {
}).then((data) => {
this.teams = data
})
}

88
src/views/allot/rwd_list.vue

@ -60,10 +60,10 @@
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="40" />
<el-table-column align="center" label="序号" width="50" fixed="left">
<template slot-scope="scope">
<el-table-column align="center" label="序号" width="50" fixed="left" type="index">
<!-- <template slot-scope="scope">
<span v-text="getIndex(scope.$index)" />
</template>
</template> -->
</el-table-column>
<el-table-column align="center" label="报检单号" prop="serialNumber" width="140" />
<el-table-column align="center" label="设备种类" prop="shebeizhongleidaima" width="80" />
@ -95,10 +95,10 @@
<el-table-column :formatter="formatter.getChineseName" align="center" label="组成员" prop="jianyanrenyuan" />
<el-table-column align="center" label="约检日期" prop="yuejianriqi" width="100" />
<el-table-column align="center" label="创建日期" prop="createTime" width="100" />
<el-table-column align="center" label="查看报检" width="60">
<el-table-column align="center" label="操作" width="60">
<template slot-scope="scope">
<el-button type="success" size="small" circle icon="el-icon-view" title="预览报检单" @click="editBjd(scope.$index)" />
<el-button type="info" size="small" circle icon="el-icon-edit" title="修改报检单" @click="modifyBjd(scope.$index)" />
<el-button type="info" size="small" circle icon="el-icon-edit" title="修改报检单" @click="modifyBjd(scope.row)" />
</template>
</el-table-column>
</el-table>
@ -113,6 +113,39 @@
@current-change="handleCurrentChange"
/>
<iframe :src="printbutton" frameborder="0" scrolling="no" height="0px" aria-disabled="true" />
<el-dialog title="修改任务单信息" :visible.sync="dialogFormVisible" width="40%" @close="closeDialog">
<el-form ref="tempDepartment" :model="tempDepartment" class="small-space" label-width="150px">
<el-form-item label="使用单位" required>
<el-input v-model="tempDepartment.shiyongdanwei" type="text" size="small" style="width: 240px" placeholder="请输入使用单位" />
</el-form-item>
<el-form-item label="使用单位联系人" required>
<el-input v-model="tempDepartment.shiyongdanweiLianxiren" placeholder="请输入使用单位联系人" type="text" size="small" style="width: 240px" />
</el-form-item>
<el-form-item label="使用单位联系电话" required>
<el-input v-model="tempDepartment.shiyongdanweiDianhua" placeholder="请输入使用单位联系电话" style="width:240px" />
</el-form-item>
<el-form-item label="使用单位地址" required>
<el-input v-model="tempDepartment.shiyongdanweiDizhi" placeholder="请输入使用单位地址" style="width:240px" />
</el-form-item>
<el-form-item label="施工单位">
<el-input v-model="tempDepartment.shigongdanwei" placeholder="请输入施工单位" style="width:240px" />
</el-form-item>
<el-form-item label="施工单位联系人">
<el-input v-model="tempDepartment.shigongdanweiLianxiren" placeholder="请输入施工单位" style="width:240px" />
</el-form-item>
<el-form-item label="施工单位联系人">
<el-input v-model="tempDepartment.shigongdanweiDianhua" placeholder="请输入施工单位电话" style="width:240px" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">
</el-button>
<el-button type="primary" @click="saveFn">
</el-button>
</div>
</el-dialog>
</div>
</template>
@ -140,7 +173,19 @@ export default {
selection: [],
showLoading: true,
departmentId: this.$store.getters.departmentId,
printbutton: ''
printbutton: '',
tempDepartment: {
id: '',
shiyongdanwei: '',
shiyongdanweiLianxiren: '',
shiyongdanweiDianhua: '',
shiyongdanweiDizhi: '',
shigongdanwei: '',
shigongdanweiLianxiren: '',
shigongdanweiDianhua: ''
},
dialogFormVisible: false,
users: []
}
},
created() {
@ -222,14 +267,29 @@ export default {
this.$router.push({ path: '/bjd/bjd-jj-input/' + bjd.bjdId + '/' + bjd.shebeizhongleidaima + '/' + bjd.shebeizhongleidaima + type })
}
},
modifyBjd($index) {
const bjd = this.list[$index]
const type = '/finish'
if (bjd.jianyanleibie === 'DJ') {
this.$router.push({ path: '/bjd/bjd-dj-input/' + bjd.bjdId + '/' + bjd.shebeizhongleidaima + '/' + bjd.shebeizhongleidaima + type, params: { form: 1 }})
} else {
this.$router.push({ path: '/bjd/bjd-jj-input/' + bjd.bjdId + '/' + bjd.shebeizhongleidaima + '/' + bjd.shebeizhongleidaima + type, params: { form: 1 }})
}
modifyBjd(row) {
this.dialogFormVisible = true
console.log(row)
// this.tempDepartment =
Object.keys(this.tempDepartment).forEach(key => {
console.log(key)
this.tempDepartment[key] = row[key]
})
},
closeDialog() {
this.dialogFormVisible = false
},
saveFn() {
const form = Object.assign({}, this.tempDepartment)
this.apibjd({
url: '/renwu/updateRwd',
method: 'put',
data: form
}).then(data => {
this.$message.success('修改成功')
this.dialogFormVisible = false
this.getList()
})
},
printRwd() {
if (this.multipleSelection.length && this.multipleSelection.length > 1) {

14
src/views/allot/team_list.vue

@ -74,8 +74,8 @@
<el-dialog title="科室小组管理" :visible.sync="dialogFormVisible" width="30%" @close="closeDialog">
<el-form ref="tempDepartment" :model="tempDepartment" class="small-space" label-width="80px">
<el-form-item label="小组名称" required>
<el-input v-if="dialogStatus === 'update'" v-model="tempDepartment.teamName" type="text" size="small" style="width: 200px" disabled />
<el-input v-if="dialogStatus === 'create'" v-model="tempDepartment.teamName" type="text" size="small" style="width: 200px" />
<el-input v-if="dialogStatus === 'update'" v-model="tempDepartment.teamName" type="text" size="small" style="width: 240px" disabled />
<el-input v-if="dialogStatus === 'create'" v-model="tempDepartment.teamName" type="text" size="small" style="width: 240px" />
</el-form-item>
<el-form-item label="所属部门" required>
<el-select v-model="tempDepartment.departmentId" placeholder="请选择科室" style="width: 240px;" @change="selectDepartmentUser">
@ -206,7 +206,8 @@ export default {
})
},
saveTeam() {
this.tempDepartment.teamPerson = this.tempDepartment.teamPerson.toString()
this.tempDepartment.teamPerson = this.renyuans.toString()
console.log(this.tempDepartment)
// a
this.$refs['tempDepartment'].validate(valid => {
if (valid) {
@ -223,19 +224,16 @@ export default {
}
if (this.dialogStatus === 'update') {
const data = Object.assign({}, this.tempDepartment)
console.log(data)
updateTeamFn(data).then(data => {
this.getList()
this.$message({ type: 'success', message: '修改成功!' })
this.dialogFormVisible = false
})
} else {
addTeamFn({
renwuTeam: this.tempDepartment,
renyuans: this.renyuans
}).then(data => {
addTeamFn(this.tempDepartment).then(data => {
this.getList()
this.$message({ type: 'success', message: '添加成功!' })
this.dialogFormVisible = false
})
}
} else {

28
src/views/allot/tuihui_list.vue

@ -53,10 +53,10 @@
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="40" />
<el-table-column align="center" label="序号" width="60">
<template slot-scope="scope">
<el-table-column align="center" label="序号" width="60" type="index">
<!-- <template slot-scope="scope">
<span v-text="getIndex(scope.$index)" />
</template>
</template> -->
</el-table-column>
<el-table-column align="center" label="报检单号" prop="serialNumber" width="170" />
<el-table-column align="center" label="设备种类" prop="shebeizhonglei" width="120" />
@ -145,6 +145,7 @@
import Sticky from '@/components/Sticky'
import Pagination from '@/components/Pagination'
import Utils from '../../utils/contact.js'
import qs from 'qs'
export default {
name: 'BackRenwu',
components: { Sticky, Pagination },
@ -188,7 +189,7 @@ export default {
}
},
created() {
// this.getList()
this.getList()
this.getSbzlList()
this.getDepartment()
this.getUserList(this.departmentId)
@ -235,7 +236,10 @@ export default {
params: {
renwuids: this.$refs.list.selection.map(rw => {
return rw.id
}).join(',')
})
},
paramsSerializer: function(params) {
return qs.stringify(params, { indices: false })
}
}).then(data => {
this.allotList = data.list
@ -291,6 +295,9 @@ export default {
})
},
batchUpdateBohui(type) {
if (this.$refs.list.selection.length === 0) {
return this.$message.warning('请选择至少一条数据')
}
this.apibjd({
url: '/renwu/updateRwState',
method: 'get',
@ -401,21 +408,20 @@ export default {
return false
}
this.apibjd({
url: '/renwu/deleteRenwu',
url: '/renwu/zfRenwu',
method: 'delete',
params: {
renwuIds: this.$refs.list.selection.map(rw => {
return rw.id
}).join(','),
}),
reason: value
},
paramsSerializer: function(params) {
return qs.stringify(params, { indices: false })
}
}).then(data => {
this.getList()
if (data === 1) {
this.$message.success('作废成功!')
} else {
this.$message.error('作废失败!')
}
})
}).catch(() => {
this.$message({

2
src/views/archive/archive_info.vue

@ -76,7 +76,7 @@ export default {
})
},
getList() {
this.server({
this.api({
url: '/archive',
method: 'get',
params: {

365
src/views/bjd/department_list.vue

@ -1,365 +0,0 @@
<template>
<div class="app-container">
<div class="filter-container">
<el-form>
<el-form-item>
<el-select v-model="listQuery.shebeizhonglei" multiple placeholder="请选择设备种类" @select="handleFilter">
<el-option
v-for="item in sbzlList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<el-input v-model="listQuery.name" placeholder="请输入类别名称" clearable style="width: 200px" @keyup.enter.native="handleFilter" />
<el-select v-model="listQuery.departmentId" placeholder="请选择所属部门" @select="handleFilter">
<el-option
v-for="item in depts"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
<el-button type="primary" icon="el-icon-search" @click="handleFilter">
查询
</el-button>
<el-button type="primary" icon="el-icon-edit" @click="showCreate">
添加
</el-button>
<el-button type="danger" icon="el-icon-delete" @click="deleteDepartment">
删除
</el-button>
</el-form-item>
</el-form>
</div>
<el-table
ref="list"
v-adaptive="{bottomOffset: 50}"
height="0"
:data="list"
:row-class-name="tableRowClassName"
border
fit
highlight-current-row
@row-click="onRowClick"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="40" />
<el-table-column type="index" align="center" label="序号" width="80" />
<el-table-column :formatter="formatDepartment" align="center" label="所属部门" prop="departmentId" min-width="40" />
<el-table-column :formatter="formatJianyan" align="center" label="检验类别" prop="jianyanleibie" min-width="25" />
<el-table-column :formatter="formatSpecies" align="center" label="设备种类" prop="shebeizhonglei" min-width="40" />
<el-table-column align="center" label="设备类别" prop="shebeileibie" min-width="40" />
<el-table-column :formatter="formatQuhua" align="center" label="所属区划" prop="quhuamingcheng" />
<el-table-column align="center" label="操作" prop="" min-width="20">
<template slot-scope="scope">
<el-button type="primary" size="medium" title="修改" @click="showUpdate(scope.$index)">
修改
</el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="total>0" :total="total" :page-num.sync="listQuery.pageNum" :page-row.sync="listQuery.pageSize" @pagination="getList" />
<el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" @close="closeDialog">
<el-form ref="tempDepartment" :model="tempDepartment" class="small-space" label-position="left" label-width="120px" style="width: 300px; margin-left:50px;">
<el-form-item label="所属科室" prop="departmentId">
<el-select v-model="department" placeholder="请选择所属科室">
<el-option
v-for="item in depts"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item label="检验类别" prop="jianyanleibie">
<el-select v-model="jianyanleibie" multiple placeholder="请选择检验类别">
<el-option value="DJ" label="定期检验" />
<el-option value="JJ" label="监督检验" />
<el-option value="ZZ" label="制造监检" />
</el-select>
</el-form-item>
<el-form-item label="设备种类" prop="shebeizhonglei">
<el-select v-model="shebeizhonglei" multiple placeholder="请选择设备种类">
<el-option
v-for="item in sbzlList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="所属区划" prop="quhuamingcheng">
<el-select v-model="quhuamingcheng" multiple placeholder="请选择所属区划">
<el-option
v-for="item in areas"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">
</el-button>
<el-button v-if="dialogStatus==='create'" type="success" @click="createDepartment">
</el-button>
<el-button v-else type="primary" @click="updateDepartment">
</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import Pagination from '@/components/Pagination'
import { deleteDepartmentFn } from '@/api/common'
export default {
name: 'BjdDepartment',
components: { Pagination },
data() {
return {
total: 0, // --
list: [], //
listQuery: {
pageNum: 1, //
pageSize: 20,
orderBy: 'id asc'
},
dialogStatus: 'create',
dialogFormVisible: false,
textMap: {
update: '编辑',
create: '新建报检科室关联'
},
tempDepartment: {},
multipleSelection: [],
sbzlList: [],
parentList: [],
depts: [],
areas: [],
shebeizhonglei: '',
quhuamingcheng: '',
jianyanleibie: '',
department: ''
}
},
created() {
this.getList()
this.getSbzlList()
this.getDepartment()
this.getArea()
},
methods: {
getList() {
this.apibjd({
url: '/bjdDepartment/list',
method: 'get',
params: this.listQuery
}).then(data => {
this.list = data.list
this.total = data.total
})
},
handleFilter() {
//
this.listQuery.pageNum = 1
this.getList()
},
onRowClick(row) {
this.$refs.list.toggleRowSelection(row)
},
handleSelectionChange: function(val) {
this.multipleSelection = val
},
showCreate() {
this.tempDepartment = {}
this.dialogStatus = 'create'
this.dialogFormVisible = true
},
createDepartment() {
this.$refs['tempDepartment'].validate(valid => {
if (valid) {
this.tempDepartment.shebeizhonglei = JSON.stringify(this.shebeizhonglei)
this.tempDepartment.quhuamingcheng = JSON.stringify(this.quhuamingcheng)
this.tempDepartment.jianyanleibie = JSON.stringify(this.jianyanleibie)
this.tempDepartment.departmentId = this.department
this.apibjd({
url: '/bjdDepartment/save',
method: 'post',
data: this.tempDepartment
}).then(() => {
this.$message({ message: '添加成功。', type: 'success' })
this.getList()
this.dialogFormVisible = false
})
} else {
return false
}
})
},
showUpdate($index) {
this.tempDepartment = this.list[$index]
this.jianyanleibie = JSON.parse(this.tempDepartment.jianyanleibie)
this.shebeizhonglei = JSON.parse(this.tempDepartment.shebeizhonglei)
this.quhuamingcheng = JSON.parse(this.tempDepartment.quhuamingcheng)
this.department = this.tempDepartment.departmentId
this.dialogStatus = 'update'
this.dialogFormVisible = true
},
updateDepartment() {
this.$refs['tempDepartment'].validate(valid => {
if (valid) {
this.tempDepartment.shebeizhonglei = JSON.stringify(this.shebeizhonglei)
this.tempDepartment.quhuamingcheng = JSON.stringify(this.quhuamingcheng)
this.tempDepartment.jianyanleibie = JSON.stringify(this.jianyanleibie)
this.tempDepartment.departmentId = this.department
this.apibjd({
url: '/bjdDepartment/update',
method: 'post',
data: this.tempDepartment
}).then(() => {
this.$message({ message: '数据更新成功。', type: 'success' })
this.getList()
this.dialogFormVisible = false
})
} else {
return false
}
})
},
deleteDepartment() {
if (this.multipleSelection.length === 0) {
this.$message({
type: 'error',
message: '请选中需要删除的数据!'
})
return false
} else {
this.$confirm('确定删除当前选中记录?', '提示', {
confirmButtonText: '确定',
showCancelButton: true,
type: 'warning'
}).then(() => {
const pks = []
this.multipleSelection.forEach(category => {
pks.push(category.id)
})
deleteDepartmentFn({ pks: pks }).then(() => {
this.$message({ message: '删除成功。', type: 'success' })
this.getList()
})
})
}
},
getSbzlList() {
this.api({
url: '/sedirectory/getList',
method: 'get',
params: {
sbzl: undefined,
level: '1'
}
}).then(data => {
this.sbzlList = data
})
},
//
getDepartment() {
this.api({
url: '/department/all',
method: 'get'
}).then(data => {
this.depts = data
})
},
getArea() { //
this.api({
url: '/area/getShiArea',
method: 'get',
params: {
shidaima: '370100'
}
}).then(data => {
this.areas = data
})
},
closeDialog() {
this.species = []
},
formatDepartment(row, column, cellValue) {
let lable = ''
for (let i = 0; i < this.depts.length; i++) {
if (cellValue === this.depts[i].id) {
lable = this.depts[i].name
break
}
}
return lable
},
formatSpecies(row, column, cellValue) {
const value = JSON.parse(cellValue)
if (value == null) {
return '全部'
}
let lable = ''
for (let i = 0; i < value.length; i++) {
for (let j = 0; j < this.sbzlList.length; j++) {
if (value[i] === this.sbzlList[j].value) {
lable = this.sbzlList[j].label + ',' + lable
break
}
}
}
return lable.substring(0, lable.length - 1)
},
formatJianyan(row, column, cellValue) {
const value = JSON.parse(cellValue)
if (value == null) {
return '全部'
}
let lable = ''
for (let i = 0; i < value.length; i++) {
if (value[i] === 'DJ') {
lable = '定期检验' + ',' + lable
} else if (value[i] === 'JJ') {
lable = '监督检验' + ',' + lable
}
}
return lable.substring(0, lable.length - 1)
},
formatQuhua(row, column, cellValue) {
const value = JSON.parse(cellValue)
if (value == null) {
return '全部'
}
let lable = ''
for (let i = 0; i < value.length; i++) {
for (let j = 0; j < this.areas.length; j++) {
if (value[i] === this.areas[j].value) {
lable = this.areas[j].label + ',' + lable
break
}
}
}
return lable.substring(0, lable.length - 1)
},
tableRowClassName({ row }) {
if (row.parentId === null) {
return 'main-row'
} else {
return ''
}
}
}
}
</script>
<style>
.el-table .main-row {
background: #f0f9eb;
}
</style>

3
src/views/bjd/dj_create.vue

@ -745,13 +745,10 @@ export default {
})
},
tableRowClassName({ row, rowIndex }) {
console.log(row, rowIndex)
// row.index = rowIndex
const nextTime = new Date(row.xiacijianyanriqi).getTime()
const currentTime = new Date().getTime()
console.log(nextTime, currentTime, nextTime - currentTime)
if (nextTime - currentTime < 7776000000) {
console.log('<3')
return 'restart-row'
} else if (nextTime - currentTime >= 7776000000) {
return 'reject-row'

28
src/views/bjd/dj_input.vue

@ -1512,6 +1512,8 @@ import Sticky from '@/components/Sticky'
import Utils from '../../utils/contact.js'
import Pagination from '@/components/Pagination'
import { deleteRenwuFn } from '@/api/common'
import qs from 'qs'
// import XLSX from 'xlsx'
export default {
name: 'AddProjectDJ',
@ -2548,20 +2550,26 @@ export default {
})
},
viewHzd() {
this.apibjd({
url: '/bjd/printHzd',
const arr = [this.bjd.id]
this.preview({
url: '/print/batchGeneratePdfHzd',
method: 'get',
params: {
bjdIds: this.bjd.id
bjdIds: arr
},
paramsSerializer: function(params) {
return qs.stringify(params, { indices: false })
}
}).then((data) => {
this.preview({
url: '/print/generatePdfListing',
url: '/print/createXmlOther',
method: 'post',
data: {
info: data.bjd,
paramList: data.renwu,
viewType: 'HZD'
params: {
ids: arr,
type: 'HZD'
},
paramsSerializer: function(params) {
return qs.stringify(params, { indices: false })
}
}).then((data) => {
data = data.replace(/\\/g, '/')
@ -2571,6 +2579,7 @@ export default {
},
editFixedHidden() {
const els = document.getElementsByClassName('el-table__fixed-right')
if (els.length > 0) {
if (!this.fixedFlag) {
this.fixedWidth = els[0].style.width
}
@ -2579,6 +2588,9 @@ export default {
} else {
els[0].style.width = '180px'
}
} else {
this.$message.warning('暂无相同数据')
}
},
// finish=>
modifyFn() {

357
src/views/bjd/dj_list.vue

@ -1,23 +1,43 @@
<template>
<div class="app-container">
<div class="filter-container">
<sticky style="margin-bottom: 10px;">
<sticky style="margin-bottom: 10px">
<div class="sub-navbar">
<router-link v-if="departmentId !== 69" to="/bjd/bjd-dj-create/定期检验">
<router-link
v-if="departmentId !== 69"
to="/bjd/bjd-dj-create/定期检验"
>
<el-button type="primary" icon="el-icon-circle-plus-outline">
起草报检单
</el-button>
</router-link>
<el-button v-if="departmentId === 69" type="primary" icon="el-icon-circle-plus-outline" @click="handleCommand">
<el-button
v-if="departmentId === 69"
type="primary"
icon="el-icon-circle-plus-outline"
@click="handleCommand"
>
新建报检单
</el-button>
<el-button type="success" icon="el-icon-printer" @click="batchPrintHzd">
<el-button
type="success"
icon="el-icon-printer"
@click="batchPrintHzd"
>
打印回执单
</el-button>
<el-button type="warning" icon="el-icon-circle-close" @click="errorBjd">
<el-button
type="warning"
icon="el-icon-circle-close"
@click="errorBjd"
>
异常收回
</el-button>
<el-button type="danger" icon="el-icon-circle-close" @click="invalidBjd">
<el-button
type="danger"
icon="el-icon-circle-close"
@click="invalidBjd"
>
作废
</el-button>
<el-button type="info" icon="el-icon-delete" @click="delBjd">
@ -27,12 +47,39 @@
</sticky>
<el-form>
<el-form-item>
<el-input v-model="listQuery.serialNumber" placeholder="报检单号/流水号" clearable style="width: 200px" @keyup.enter.native="handleFilter" />
<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-input
v-model="listQuery.serialNumber"
placeholder="报检单号/流水号"
clearable
style="width: 200px"
@keyup.enter.native="handleFilter"
/>
<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.shiyongdanwei" placeholder="使用单位名称" clearable style="width: 300px" @keyup.enter.native="handleFilter" />
<el-date-picker v-model="listQuery.shouliriqi" type="date" value-format="yyyy-MM-dd" placeholder="选择报检日期" style="width: 180px" />
<el-input
v-model="listQuery.shiyongdanwei"
placeholder="使用单位名称"
clearable
style="width: 300px"
@keyup.enter.native="handleFilter"
/>
<el-date-picker
v-model="listQuery.shouliriqi"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择报检日期"
style="width: 180px"
/>
<el-button type="primary" icon="el-icon-search" @click="handleFilter">
查询
</el-button>
@ -85,7 +132,10 @@
</el-radio-group>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span class="radio-group-label">受理科室</span>
<el-radio-group v-model="listQuery.shoulikeshi" @change="handleFilter">
<el-radio-group
v-model="listQuery.shoulikeshi"
@change="handleFilter"
>
<el-radio :label="$store.getters.departmentId">
本科室
</el-radio>
@ -108,7 +158,7 @@
</div>
<el-table
ref="bjdList"
v-adaptive="{bottomOffset: 50}"
v-adaptive="{ bottomOffset: 50 }"
height="0"
:data="list"
element-loading-text="拼命加载中"
@ -126,57 +176,117 @@
<span v-text="getIndex(scope.$index)" />
</template>
</el-table-column>
<el-table-column align="center" label="报检单号/流水号" prop="serialNumber" min-width="80" />
<el-table-column align="center" label="设备种类" prop="shebeizhonglei" min-width="50" />
<el-table-column align="center" label="使用单位" prop="shiyongdanwei" min-width="150" />
<el-table-column align="center" label="报检日期" prop="shouliriqi" min-width="60" />
<el-table-column align="center" label="报检状态" prop="bjState" min-width="50">
<el-table-column
align="center"
label="报检单号/流水号"
prop="serialNumber"
min-width="80"
/>
<el-table-column
align="center"
label="设备种类"
prop="shebeizhonglei"
min-width="50"
/>
<el-table-column
align="center"
label="使用单位"
prop="shiyongdanwei"
min-width="150"
/>
<el-table-column
align="center"
label="报检日期"
prop="shouliriqi"
min-width="60"
/>
<el-table-column
align="center"
label="报检状态"
prop="bjState"
min-width="50"
>
<template slot-scope="scope">
<el-tag v-if="scope.row.bjState===0" type="success">
<el-tag v-if="scope.row.bjState === 0" type="success">
新建/预审
</el-tag>
<el-tag v-else-if="scope.row.bjState===1" type="primary">
<el-tag v-else-if="scope.row.bjState === 1" type="primary">
待审核
</el-tag>
<el-tag v-else-if="scope.row.bjState===2" type="info">
<el-tag v-else-if="scope.row.bjState === 2" type="info">
已审核
</el-tag>
<el-tag v-else-if="scope.row.bjState===3" type="warning">
<el-tag v-else-if="scope.row.bjState === 3" type="warning">
不予受理
</el-tag>
<el-tag v-else-if="scope.row.bjState===4" type="warning">
<el-tag v-else-if="scope.row.bjState === 4" type="warning">
补正通知
</el-tag>
<el-tag v-else-if="scope.row.bjState===5" type="danger">
<el-tag v-else-if="scope.row.bjState === 5" type="danger">
异常收回
</el-tag>
<el-tag v-else-if="scope.row.bjState===6" type="danger">
<el-tag v-else-if="scope.row.bjState === 6" type="danger">
异常退回
</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="设备台数" prop="totalNum" min-width="50" />
<el-table-column :formatter="formatter.getChineseName" align="center" label="受理人员" prop="shouliren" min-width="50" />
<el-table-column align="center" label="报检渠道" prop="dataSource" min-width="50">
<el-table-column
align="center"
label="设备台数"
prop="totalNum"
min-width="50"
/>
<el-table-column
:formatter="formatter.getChineseName"
align="center"
label="受理人员"
prop="shouliren"
min-width="50"
/>
<el-table-column
align="center"
label="报检渠道"
prop="dataSource"
min-width="50"
>
<template slot-scope="scope">
<el-tag v-if="scope.row.dataSource===0" type="info">
<el-tag v-if="scope.row.dataSource === 0" type="info">
大厅报检
</el-tag>
<el-tag v-else-if="scope.row.dataSource===1" type="info">
<el-tag v-else-if="scope.row.dataSource === 1" type="info">
企业报检
</el-tag>
<el-tag v-else-if="scope.row.dataSource===2" type="info">
<el-tag v-else-if="scope.row.dataSource === 2" type="info">
微信报检
</el-tag>
<el-tag v-else-if="scope.row.dataSource===3" type="info">
<el-tag v-else-if="scope.row.dataSource === 3" type="info">
网页报检
</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="操作" min-width="60">
<template slot-scope="scope">
<el-button type="primary" size="mini" circle icon="el-icon-edit" title="编辑" @click="editBjd(scope.$index)" />
<el-button v-show="scope.row.bjState === 2 || scope.row.bjState === 5 || scope.row.bjState === 6" type="success" size="mini" circle icon="el-icon-view" title="预览回执单" @click="viewHzd(scope.row.id)" />
<el-button
type="primary"
size="mini"
circle
icon="el-icon-edit"
title="编辑"
@click="editBjd(scope.$index)"
/>
<el-button
v-show="
scope.row.bjState === 2 ||
scope.row.bjState === 5 ||
scope.row.bjState === 6
"
type="success"
size="mini"
circle
icon="el-icon-view"
title="预览回执单"
@click="viewHzd(scope.row.id)"
/>
</template>
</el-table-column>
</el-table>
@ -188,8 +298,8 @@
<script>
import Sticky from '@/components/Sticky'
import Pagination from '@/components/Pagination'
import router from '@/router'
import Vue from 'vue'
import qs from 'qs'
// import router from '../../router'
export default {
name: 'ProjectDJList',
@ -204,8 +314,12 @@ export default {
orderBy: 'id desc',
zfState: false,
jianyanleibie: 'DJ',
shoulikeshi: this.hasRole('ADMIN') ? undefined : this.$store.getters.departmentId,
shouliren: this.hasRole('ADMIN') ? undefined : this.$store.getters.userId,
shoulikeshi: this.hasRole('ADMIN')
? undefined
: this.$store.getters.departmentId,
shouliren: this.hasRole('ADMIN')
? undefined
: this.$store.getters.userId,
bjState: undefined
},
sbzlList: [],
@ -232,7 +346,7 @@ export default {
url: '/bjd/list',
method: 'get',
params: this.listQuery
}).then(data => {
}).then((data) => {
this.list = data.list
this.$nextTick(() => {
this.$refs.bjdList.doLayout()
@ -248,13 +362,15 @@ export default {
sbzl: undefined,
level: '1'
}
}).then(data => {
}).then((data) => {
this.sbzlList = data
})
},
getIndex($index) {
//
return (this.listQuery.pageNum - 1) * this.listQuery.pageSize + $index + 1
return (
(this.listQuery.pageNum - 1) * this.listQuery.pageSize + $index + 1
)
},
handleFilter() {
//
@ -284,27 +400,44 @@ export default {
return false
} else {
for (let i = 0; i < this.multipleSelection.length; i++) {
this.$prompt('请输入作废原因', '共' + this.multipleSelection.length + '条报检项目将作废,是否继续?', {
this.$prompt(
'请输入作废原因',
'共' +
this.multipleSelection.length +
'条报检项目将作废,是否继续?',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
inputPattern: /\S/,
inputErrorMessage: '作废原因不能为空'
}).then(({ value }) => {
}
)
.then(({ value }) => {
for (let i = 0; i < this.multipleSelection.length; i++) {
this.ids.push(this.multipleSelection[i].id)
}
this.apibjd({
url: '/bjd/updBjdToZf',
method: 'get',
params: { reason: value, bjdIds: this.ids.join(',') }
}).then(data => {
params: { reason: value, bjdId: this.ids },
paramsSerializer: function(params) {
return qs.stringify(params, { indices: false })
}
}).then((data) => {
this.$message({
message: (data.bianhao !== null && data.bianhao !== undefined ? '流水号为' + data.bianhao + '的项目关联的任务已经分配不能作废!' : '') + (data.count === 0 ? '' : data.count + '条项目作废成功'),
message:
(data.bianhao !== null && data.bianhao !== undefined
? '流水号为' +
data.bianhao +
'的项目关联的任务已经分配不能作废!'
: '') +
(data.count === 0 ? '' : data.count + '条项目作废成功'),
type: 'info'
})
this.getList()
})
}).catch(() => {
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消作废'
@ -330,7 +463,10 @@ export default {
message: '选择的数据中有办结的项目,请重新选择!'
})
return false
} else if (this.multipleSelection[i].bjState === 5 || this.multipleSelection[i].bjState === 6) {
} else if (
this.multipleSelection[i].bjState === 5 ||
this.multipleSelection[i].bjState === 6
) {
this.$message({
type: 'error',
message: '异常收回跟异常退回的数据,请通过作废按钮进行处理!'
@ -347,23 +483,32 @@ export default {
this.ids.push(this.multipleSelection[i].id)
}
}
this.$confirm('共' + this.multipleSelection.length + '条报检项目将删除,是否继续?', '提示', {
this.$confirm(
'共' + this.multipleSelection.length + '条报检项目将删除,是否继续?',
'提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
}
)
.then(() => {
this.apibjd({
url: '/bjd',
method: 'delete',
params: { bjdIds: this.ids.join(',') }
}).then(data => {
params: { bjdIds: this.ids },
paramsSerializer: function(params) {
return qs.stringify(params, { indices: false })
}
}).then((data) => {
this.$message({
message: data + '条项目删除成功',
type: 'success'
})
this.getList()
})
}).catch(() => {
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
@ -377,48 +522,53 @@ export default {
if (bjd.bjState === 2) {
type = '/finish'
}
this.$router.push({ path: '/bjd/bjd-dj-input/' + bjd.id + '/' + bjd.shebeizhongleidaima + '/' + bjd.shebeizhonglei + type })
this.$router.push({
path:
'/bjd/bjd-dj-input/' +
bjd.id +
'/' +
bjd.shebeizhongleidaima +
'/' +
bjd.shebeizhonglei +
type
})
},
//
batchPrintHzd() {
if (this.multipleSelection.length === 0) {
this.$message({ message: '请选择至少一条数据进行打印!', type: 'error' })
this.$message({
message: '请选择至少一条数据进行打印!',
type: 'error'
})
return false
}
this.apibjd({
url: '/bjd/printHzdBatch',
method: 'get',
params: {
bjdIds: this.$refs.bjdList.selection.map(bjd => {
const arr = this.$refs.bjdList.selection.map((bjd) => {
return bjd.id
}).join(',')
}
}).then(data => {
})
console.log(arr)
this.preview({
url: '/print/generatePdfListingBatch',
method: 'post',
data: {
list: data,
viewType: 'HZD'
url: '/print/batchGeneratePdfHzd',
method: 'get',
params: {
bjdIds: arr
},
paramsSerializer: function(params) {
return qs.stringify(params, { indices: false })
}
}).then(data => {
if (data === 'success') {
}).then((data) => {
this.preview({
url: '/print/createXmlOther',
method: 'post',
params: {
ids: this.$refs.bjdList.selection.map(bjd => {
return bjd.id
}).join(','),
ids: arr,
type: 'HZD'
},
paramsSerializer: function(params) {
return qs.stringify(params, { indices: false })
}
}).then(data => {
}).then((data) => {
this.printbutton = 'ReportPrintApp://' + data
})
} else {
this.$message({ message: '未能成功调用打印程序!', type: 'error' })
}
})
})
},
//
@ -433,7 +583,7 @@ export default {
params: {
bjdIds: this.multipleSelection[0].id
}
}).then(data => {
}).then((data) => {
this.preview({
url: '/print/generatePdfListing',
method: 'post',
@ -442,7 +592,7 @@ export default {
paramList: data.renwu,
viewType: 'HZD'
}
}).then(data => {
}).then((data) => {
data = data.replace(/\\/g, '/')
// router.push({ path: '/preview/1/1/urlPath?src=' + this.$store.getters.prodName + '/static/web/viewer.html?file=' + encodeURIComponent(data) + '&v=' + Math.random() })
window.open(data)
@ -456,12 +606,18 @@ export default {
params: {
bjdId: bjdId
}
}).then(data => {
}).then((data) => {
data = data.replace(/\\/g, '/')
if (data) {
router.push({ path: '/preview/hzd?src=' + this.$store.getters.prodName + '/static/web/viewer.html?file=' + encodeURIComponent(data) })
this.$router.push({
path:
'/preview/hzd?src=' +
this.$store.getters.prodName +
'/static/web/viewer.html?file=' +
encodeURIComponent(data)
})
} else {
Vue.prototype.$message({
this.$message({
message: 'PDF预览错误!',
type: 'error',
duration: 3 * 1000
@ -475,13 +631,17 @@ export default {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
})
.then(() => {
if (this.multipleSelection.length !== 1) {
this.$message({ message: '只允许单台报检单收回', type: 'error' })
return false
}
if (this.multipleSelection[0].bjState !== '2') {
this.$message({ message: '非审核通过数据不允许异常收回!', type: 'error' })
if (this.multipleSelection[0].bjState !== 2) {
this.$message({
message: '非审核通过数据不允许异常收回!',
type: 'error'
})
return false
}
//
@ -489,21 +649,12 @@ export default {
url: '/bjd/updBjdToYcsh',
method: 'get',
params: { bjdId: this.multipleSelection[0].id }
}).then(data => {
if (data.success === 'ok') {
this.$message({
message: '异常收回成功!!请修改后重新审核通过!',
type: 'success'
})
}).then((data) => {
this.$message.success('异常收回成功!!请修改后重新审核通过!')
this.getList()
} else {
this.$message({
message: '异常收回失败,存在已分配数据,请联系科室“异常退回”!',
type: 'warning'
})
}
})
}).catch(() => {
.catch(() => {
this.$message({
type: 'info',
message: '已取消收回'
@ -511,15 +662,17 @@ export default {
})
},
handleCommand() {
this.$router.push({ path: '/bjd/bjd-dj-input/null/F000/安全附件/newBuild' })
this.$router.push({
path: '/bjd/bjd-dj-input/null/F000/安全附件/newBuild'
})
}
}
}
</script>
<style>
/**刘瑶说莱芜审核后容易遗漏 需要增加高亮*/
.el-table .laiwurongqi-row {
/**刘瑶说莱芜审核后容易遗漏 需要增加高亮*/
.el-table .laiwurongqi-row {
color: #e103e4;
}
}
</style>

123
src/views/bjd/dt_list.vue

@ -155,6 +155,7 @@
import Sticky from '@/components/Sticky'
import Pagination from '@/components/Pagination'
import store from '../../store'
import qs from 'qs'
// import router from '../../router'
export default {
name: 'ProjectDtList',
@ -252,27 +253,46 @@ export default {
return false
} else {
for (let i = 0; i < this.multipleSelection.length; i++) {
this.$confirm('共' + this.multipleSelection.length + '条报检项目将作废,是否继续?', '提示', {
this.$prompt(
'请输入作废原因',
'共' +
this.multipleSelection.length +
'条报检项目将作废,是否继续?',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
inputPattern: /\S/,
inputErrorMessage: '作废原因不能为空'
}
)
.then(({ value }) => {
for (let i = 0; i < this.multipleSelection.length; i++) {
this.ids.push(this.multipleSelection[i].id)
}
this.apibjd({
url: '/bjd/updBjdToZf',
method: 'get',
params: {
bjdIds: this.multipleSelection.map(rw => {
params: { reason: value, bjdId: this.multipleSelection.map(rw => {
return rw.id
}).join(',')
}) },
paramsSerializer: function(params) {
return qs.stringify(params, { indices: false })
}
}).then(data => {
}).then((data) => {
this.$message({
message: (data.bianhao !== null && data.bianhao !== undefined ? '流水号为' + data.bianhao + '的项目关联的任务已经分配不能作废!' : '') + (data.count === 0 ? '' : data.count + '条项目作废成功'),
message:
(data.bianhao !== null && data.bianhao !== undefined
? '流水号为' +
data.bianhao +
'的项目关联的任务已经分配不能作废!'
: '') +
(data.count === 0 ? '' : data.count + '条项目作废成功'),
type: 'info'
})
this.getList()
})
}).catch(() => {
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消作废'
@ -281,6 +301,7 @@ export default {
}
}
},
// ---
delBjd: function() {
this.ids = ''
@ -358,40 +379,33 @@ export default {
this.$message({ message: '请选择至少一条数据进行打印!', type: 'error' })
return false
}
this.apibjd({
url: '/bjd/printHzdBatch',
method: 'get',
params: {
bjdIds: this.$refs.bjdList.selection.map(bjd => {
const arr = this.$refs.bjdList.selection.map((bjd) => {
return bjd.id
}).join(',')
}
}).then(data => {
})
console.log(arr)
this.preview({
url: '/print/generatePdfListingBatch',
method: 'post',
data: {
list: data,
viewType: 'HZD'
url: '/print/batchGeneratePdfHzd',
method: 'get',
params: {
bjdIds: arr
},
paramsSerializer: function(params) {
return qs.stringify(params, { indices: false })
}
}).then(data => {
if (data === 'success') {
}).then((data) => {
this.preview({
url: '/print/createXmlOther',
method: 'post',
params: {
ids: this.$refs.bjdList.selection.map(bjd => {
return bjd.id
}).join(','),
ids: arr,
type: 'HZD'
},
paramsSerializer: function(params) {
return qs.stringify(params, { indices: false })
}
}).then(data => {
}).then((data) => {
this.printbutton = 'ReportPrintApp://' + data
})
} else {
this.$message({ message: '未能成功调用打印程序!', type: 'error' })
}
})
})
},
//
@ -423,26 +437,29 @@ export default {
})
},
viewHzd(bjdid) {
this.apibjd({
url: '/bjd/printHzd',
this.preview({
url: '/print/generatePdfHzd',
method: 'get',
params: {
bjdIds: bjdid
bjdId: bjdid
}
}).then(data => {
this.preview({
url: '/print/generatePdfListing',
method: 'post',
data: {
info: data.bjd,
paramList: data.renwu,
viewType: 'HZD'
}
}).then(data => {
}).then((data) => {
data = data.replace(/\\/g, '/')
// router.push({ path: '/preview/1/1/urlPath?src=' + store.getters.prodName + '/static/web/viewer.html?file=' + encodeURIComponent(data) + '&v=' + Math.random() })
window.open(data)
if (data) {
this.$router.push({
path:
'/preview/hzd?src=' +
this.$store.getters.prodName +
'/static/web/viewer.html?file=' +
encodeURIComponent(data)
})
} else {
this.$message({
message: 'PDF预览错误!',
type: 'error',
duration: 3 * 1000
})
}
})
},
errorBjd() {
@ -466,18 +483,8 @@ export default {
method: 'get',
params: { bjdId: this.multipleSelection[0].id }
}).then(data => {
if (data.success === 'ok') {
this.$message({
message: '异常收回成功!!请修改后重新审核通过!',
type: 'success'
})
this.$message.success('异常收回成功!!请修改后重新审核通过!')
this.getList()
} else {
this.$message({
message: '异常收回失败,存在已分配数据,请联系科室“异常退回”!',
type: 'warning'
})
}
})
}).catch(() => {
this.$message({

51
src/views/bjd/jj_input.vue

@ -583,7 +583,7 @@
</div>
</el-dialog>
<el-dialog title="设备列表" width="70%" :visible.sync="baseListVisible" @close="baseListVisible = false">
<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" @click="batchAddToBjBase">
<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-bottom:20px" @click="batchAddToBjBase">
添加
</el-button>
<el-table
@ -676,7 +676,7 @@ import Utils from '../../utils/contact.js'
import Pagination from '@/components/Pagination'
import axios from 'axios'
import { deleteRenwuFn } from '@/api/common'
import qs from 'qs'
export default {
name: 'AddProjectJJ',
components: { Sticky, Pagination },
@ -760,7 +760,8 @@ export default {
templateName: '',
fixedFlag: true,
fixedWidth: '',
filterLabel: ''
filterLabel: '',
addRowIndex: []
}
},
watch: {
@ -1065,13 +1066,15 @@ export default {
}
},
batchAddToBjBase() {
if (this.addRowIndex !== null && this.addRowIndex.length > 0) {
if (this.addRowIndex.length === 0) {
return this.$message.error('请选择要报检的数据!')
}
for (let i = 0; i < this.addRowIndex.length; i++) {
if (this.judgeContact(this.tableData, this.baseList[this.addRowIndex[i]])) {
/* this.$message({
this.$message({
type: 'info',
message: '选中的设备中有已经报检的数据,已自动筛选!'
}) */
})
} else {
// ----
this.setDefaultValue(this.baseList[this.addRowIndex[i]])
@ -1085,12 +1088,6 @@ export default {
message: '已添加!'
})
}
} else {
this.$message({
type: 'warning',
message: '请选择要报检的数据!'
})
}
},
addToBjBase(index) {
this.setDefaultValue(this.baseList[index])
@ -1617,22 +1614,28 @@ export default {
})
},
viewHzd() {
this.apibjd({
url: '/bjd/printHzd',
const arr = [this.bjd.id]
this.preview({
url: '/print/batchGeneratePdfHzd',
method: 'get',
params: {
bjdIds: this.bjd.id
bjdIds: arr
},
paramsSerializer: function(params) {
return qs.stringify(params, { indices: false })
}
}).then(data => {
}).then((data) => {
this.preview({
url: '/print/generatePdfListing',
url: '/print/createXmlOther',
method: 'post',
data: {
info: data.bjd,
paramList: data.renwu,
viewType: 'HZD'
params: {
ids: arr,
type: 'HZD'
},
paramsSerializer: function(params) {
return qs.stringify(params, { indices: false })
}
}).then(data => {
}).then((data) => {
data = data.replace(/\\/g, '/')
window.open(data)
})
@ -1640,6 +1643,7 @@ export default {
},
editFixedHidden() {
const els = document.getElementsByClassName('el-table__fixed-right')
if (els.length > 0) {
if (!this.fixedFlag) {
this.fixedWidth = els[0].style.width
}
@ -1648,6 +1652,9 @@ export default {
} else {
els[0].style.width = '270px'
}
} else {
this.$message.warning('暂无相同数据')
}
}
}
}

96
src/views/bjd/jj_list.vue

@ -202,6 +202,7 @@ import Pagination from '@/components/Pagination'
import store from '../../store'
// import router from '../../router'
import { validatorPhone } from '@/utils/validate'
import qs from 'qs'
export default {
name: 'ProjectJJList',
components: { Sticky, Pagination },
@ -309,27 +310,46 @@ export default {
return false
} else {
for (let i = 0; i < this.multipleSelection.length; i++) {
this.$confirm('共' + this.multipleSelection.length + '条报检项目将作废,是否继续?', '提示', {
this.$prompt(
'请输入作废原因',
'共' +
this.multipleSelection.length +
'条报检项目将作废,是否继续?',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
inputPattern: /\S/,
inputErrorMessage: '作废原因不能为空'
}
)
.then(({ value }) => {
for (let i = 0; i < this.multipleSelection.length; i++) {
this.ids.push(this.multipleSelection[i].id)
}
this.apibjd({
url: '/bjd/updBjdToZf',
method: 'get',
params: {
bjdIds: this.multipleSelection.map(rw => {
params: { reason: value, bjdId: this.multipleSelection.map(rw => {
return rw.id
}).join(',')
}) },
paramsSerializer: function(params) {
return qs.stringify(params, { indices: false })
}
}).then(data => {
}).then((data) => {
this.$message({
message: (data.bianhao !== null && data.bianhao !== undefined ? '流水号为' + data.bianhao + '的项目关联的任务已经分配不能作废!' : '') + (data.count === 0 ? '' : data.count + '条项目作废成功'),
message:
(data.bianhao !== null && data.bianhao !== undefined
? '流水号为' +
data.bianhao +
'的项目关联的任务已经分配不能作废!'
: '') +
(data.count === 0 ? '' : data.count + '条项目作废成功'),
type: 'info'
})
this.getList()
})
}).catch(() => {
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消作废'
@ -374,7 +394,10 @@ export default {
params: {
bjdIds: this.multipleSelection.map(rw => {
return rw.id
}).join(',')
})
},
paramsSerializer: function(params) {
return qs.stringify(params, { indices: false })
}
}).then(data => {
this.$message({
@ -405,40 +428,33 @@ export default {
this.$message({ message: '请选择至少一条数据进行打印!', type: 'error' })
return false
}
this.apibjd({
url: '/bjd/printHzdBatch',
method: 'get',
params: {
bjdIds: this.$refs.bjdList.selection.map(bjd => {
const arr = this.$refs.bjdList.selection.map((bjd) => {
return bjd.id
}).join(',')
}
}).then(data => {
})
console.log(arr)
this.preview({
url: '/print/generatePdfListingBatch',
method: 'post',
data: {
list: data,
viewType: 'HZD'
url: '/print/batchGeneratePdfHzd',
method: 'get',
params: {
bjdIds: arr
},
paramsSerializer: function(params) {
return qs.stringify(params, { indices: false })
}
}).then(data => {
if (data === 'success') {
}).then((data) => {
this.preview({
url: '/print/createXmlOther',
method: 'post',
params: {
ids: this.$refs.bjdList.selection.map(bjd => {
return bjd.id
}).join(','),
ids: arr,
type: 'HZD'
},
paramsSerializer: function(params) {
return qs.stringify(params, { indices: false })
}
}).then(data => {
}).then((data) => {
this.printbutton = 'ReportPrintApp://' + data
})
} else {
this.$message({ message: '未能成功调用打印程序!', type: 'error' })
}
})
})
},
//
@ -506,7 +522,7 @@ export default {
this.$message({ message: '只允许单台报检单收回', type: 'error' })
return false
}
if (this.multipleSelection[0].bjState !== '2') {
if (this.multipleSelection[0].bjState !== 2) {
this.$message({ message: '非审核通过数据不允许异常收回!', type: 'error' })
return false
}
@ -516,18 +532,8 @@ export default {
method: 'get',
params: { bjdId: this.multipleSelection[0].id }
}).then(data => {
if (data.success === 'ok') {
this.$message({
message: '异常收回成功!!请修改后重新审核通过!',
type: 'success'
})
this.$message.success('异常收回成功!!请修改后重新审核通过!')
this.getList()
} else {
this.$message({
message: '异常收回失败,存在已分配数据,请联系科室“异常退回”!',
type: 'warning'
})
}
})
}).catch(() => {
this.$message({

90
src/views/bjd/qy_list.vue

@ -139,6 +139,7 @@ import Sticky from '@/components/Sticky'
import Pagination from '@/components/Pagination'
// import store from '../../store'
// import router from '../../router'
import qs from 'qs'
export default {
name: 'ProjectQyList',
components: { Sticky, Pagination },
@ -223,6 +224,7 @@ export default {
},
//
invalidBjd: function() {
this.ids = []
if (this.multipleSelection.length === 0) {
this.$message({
type: 'error',
@ -231,27 +233,44 @@ export default {
return false
} else {
for (let i = 0; i < this.multipleSelection.length; i++) {
this.$confirm('共' + this.multipleSelection.length + '条报检项目将作废,是否继续?', '提示', {
this.$prompt(
'请输入作废原因',
'共' +
this.multipleSelection.length +
'条报检项目将作废,是否继续?',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
inputPattern: /\S/,
inputErrorMessage: '作废原因不能为空'
}
)
.then(({ value }) => {
for (let i = 0; i < this.multipleSelection.length; i++) {
this.ids.push(this.multipleSelection[i].id)
}
this.apibjd({
url: '/bjd/updBjdToZf',
method: 'get',
params: {
bjdIds: this.multipleSelection.map(rw => {
return rw.id
}).join(',')
params: { reason: value, bjdId: this.ids },
paramsSerializer: function(params) {
return qs.stringify(params, { indices: false })
}
}).then(data => {
}).then((data) => {
this.$message({
message: (data.bianhao !== null && data.bianhao !== undefined ? '流水号为' + data.bianhao + '的项目关联的任务已经分配不能作废!' : '') + (data.count === 0 ? '' : data.count + '条项目作废成功'),
message:
(data.bianhao !== null && data.bianhao !== undefined
? '流水号为' +
data.bianhao +
'的项目关联的任务已经分配不能作废!'
: '') +
(data.count === 0 ? '' : data.count + '条项目作废成功'),
type: 'info'
})
this.getList()
})
}).catch(() => {
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消作废'
@ -278,40 +297,33 @@ export default {
this.$message({ message: '请选择至少一条数据进行打印!', type: 'error' })
return false
}
this.apibjd({
url: '/bjd/printHzdBatch',
method: 'get',
params: {
bjdIds: this.$refs.bjdList.selection.map(bjd => {
const arr = this.$refs.bjdList.selection.map((bjd) => {
return bjd.id
}).join(',')
}
}).then(data => {
})
console.log(arr)
this.preview({
url: '/print/generatePdfListingBatch',
method: 'post',
data: {
list: data,
viewType: 'HZD'
url: '/print/batchGeneratePdfHzd',
method: 'get',
params: {
bjdIds: arr
},
paramsSerializer: function(params) {
return qs.stringify(params, { indices: false })
}
}).then(data => {
if (data === 'success') {
}).then((data) => {
this.preview({
url: '/print/createXmlOther',
method: 'post',
params: {
ids: this.$refs.bjdList.selection.map(bjd => {
return bjd.id
}).join(','),
ids: arr,
type: 'HZD'
},
paramsSerializer: function(params) {
return qs.stringify(params, { indices: false })
}
}).then(data => {
}).then((data) => {
this.printbutton = 'ReportPrintApp://' + data
})
} else {
this.$message({ message: '未能成功调用打印程序!', type: 'error' })
}
})
})
},
//
@ -389,18 +401,8 @@ export default {
method: 'get',
params: { bjdId: this.multipleSelection[0].id }
}).then(data => {
if (data.success === 'ok') {
this.$message({
message: '异常收回成功!!请修改后重新审核通过!',
type: 'success'
})
this.$message.success('异常收回成功!!请修改后重新审核通过!')
this.getList()
} else {
this.$message({
message: '异常收回失败,存在已分配数据,请联系科室“异常退回”!',
type: 'warning'
})
}
})
}).catch(() => {
this.$message({

8
src/views/flow/definition.vue

@ -255,7 +255,7 @@
<el-table-column type="index" label="序号" width="50" />
<el-table-column prop="userId" label="环节人员" width="180">
<template slot-scope="scope">
<el-select v-model="scope.row.nickname" placeholder="请选择" multiple>
<el-select v-model="scope.row.nickname" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.id"
@ -555,8 +555,6 @@ export default {
})
},
updateLink() {
this.$refs['formMember'].validate((valid) => {
if (valid) {
this.formMember.userIds = this.listMemberUser
const _vue = this
this.api({
@ -574,10 +572,6 @@ export default {
}
})
})
} else {
return false
}
})
},
delDefinition() {
if (this.multipleSelection.length > 0) {

22
src/views/task/list.vue

@ -61,10 +61,10 @@
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="40" />
<el-table-column align="center" label="序号" width="60" fixed="left">
<template slot-scope="scope">
<el-table-column align="center" label="序号" width="60" fixed="left" type="index">
<!-- <template slot-scope="scope">
<span v-text="getIndex(scope.$index)" />
</template>
</template> -->
</el-table-column>
<el-table-column v-if="$store.getters.departmentId !== 75" align="center" label="设备种类" prop="shebeizhonglei" width="100" />
<el-table-column :formatter="formatter.formatterCategory" align="center" label="检验类别" prop="neibuleibie" width="100" />
@ -187,10 +187,10 @@
@selection-change="handleDialogSelectionChange"
>
<el-table-column type="selectionCopy" width="45" />
<el-table-column align="center" label="序号" width="50">
<template slot-scope="scope">
<el-table-column align="center" label="序号" width="50" type="index">
<!-- <template slot-scope="scope">
<span v-text="getIndex(scope.$index)" />
</template>
</template> -->
</el-table-column>
<el-table-column align="center" label="报告编号" prop="baogaobianhao" width="180px;" />
<el-table-column align="center" label="记录编号" prop="jilubianhao" width="180" sortable="custom" />
@ -219,7 +219,7 @@ import Utils from '../../utils/contact.js'
import { getOwnList, terminateRenwu, completeRenwuFn } from '@/api/renwu'
import { cancelRenwuFn } from '@/api/common'
import { mapGetters } from 'vuex'
import qs from 'qs'
export default {
name: 'MyTask',
components: { Sticky, Pagination },
@ -603,9 +603,12 @@ export default {
url: 'renwu/backToLeader',
method: 'get',
params: {
ids: this.$refs.list.selection.map(rw => {
renwuIds: this.$refs.list.selection.map(rw => {
return rw.id
}).join(',')
})
},
paramsSerializer: function(params) {
return qs.stringify(params, { indices: false })
}
}).then(data => {
this.$message({
@ -616,6 +619,7 @@ export default {
})
},
clearQuery() {
this.listQuery = {}
this.getList()
},
clearCopyQuery() {

90
src/views/user/department.vue

@ -37,7 +37,7 @@
<el-table-column align="center" label="最近修改时间" prop="updateTime" style="width: 60px;" />
<el-table-column align="center" label="管理" width="150">
<template slot-scope="scope">
<el-button type="primary" icon="edit" @click="showUpdate(scope.$index)">
<el-button type="primary" icon="edit" @click="showUpdate(scope.row,scope.$index)">
修改
</el-button>
</template>
@ -47,13 +47,40 @@
<el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" @close="closeDialog">
<el-form ref="tempDepartment" :model="tempDepartment" class="small-space" label-width="80px">
<el-form-item label="部门名称" required>
<el-input v-model="tempDepartment.name" type="text" size="small" />
<el-input v-model="tempDepartment.name" type="text" size="small" style="width:200px" />
</el-form-item>
<el-form-item label="负责人" size="small" required>
<el-select v-model="tempDepartment.leader" filterable placeholder="请选择" clearable>
<el-option v-for="item in leaders" :key="item.id" :label="item.nickname" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="检验类别" prop="jianyanleibie">
<el-select v-model="tempDepartment.jianyanleibie" multiple placeholder="请选择检验类别">
<el-option value="DJ" label="定期检验" />
<el-option value="JJ" label="监督检验" />
<el-option value="ZZ" label="制造监检" />
</el-select>
</el-form-item>
<el-form-item label="设备种类" prop="shebeizhongleidaima">
<el-select v-model="tempDepartment.shebeizhongleidaima" multiple placeholder="请选择设备种类">
<el-option
v-for="item in sbzlList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="所属区划" prop="quhuadaima">
<el-select v-model="tempDepartment.quhuadaima" multiple placeholder="请选择所属区划">
<el-option
v-for="item in areas"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="部门代码(选填)">
<el-input v-model="tempDepartment.code" type="text" size="small" style="width: 200px" />
</el-form-item>
@ -105,13 +132,40 @@ export default {
departmentUserList: [],
leaders: [],
multipleSelection: [],
isIndeterminate: true
isIndeterminate: true,
sbzlList: [],
areas: []
}
},
created() {
this.getList()
this.getSbzlList()
this.getArea()
},
methods: {
getSbzlList() {
this.api({
url: '/sedirectory/getList',
method: 'get',
params: {
sbzl: undefined,
level: '1'
}
}).then(data => {
this.sbzlList = data
})
},
getArea() { //
this.api({
url: '/area/getShiArea',
method: 'get',
params: {
shidaima: '370100'
}
}).then(data => {
this.areas = data
})
},
getList() {
//
this.api({
@ -132,12 +186,14 @@ export default {
this.dialogStatus = 'create'
this.dialogFormVisible = true
},
showUpdate($index) {
showUpdate(item) {
this.leaders = this.$store.getters.allUser
const department = this.list[$index]
this.tempDepartment = department
this.getUserListByDepartmentIdOrNull(department.id)
this.getUserListByDepartmentId(department.id)
this.tempDepartment = item
this.tempDepartment.quhuadaima = item.quhuadaima.split(',')
this.tempDepartment.shebeizhongleidaima = item.shebeizhongleidaima.split(',')
this.tempDepartment.jianyanleibie = item.jianyanleibie.split(',')
this.getUserListByDepartmentIdOrNull(item.id)
this.getUserListByDepartmentId(item.id)
this.dialogStatus = 'update'
this.dialogFormVisible = true
},
@ -168,11 +224,15 @@ export default {
})
},
createDepartment() {
//
const form = {}
form.department = this.tempDepartment
form.userIds = this.departmentUserList
form.department.quhuadaima = form.department.quhuadaima.toString()
form.department.shebeizhongleidaima = form.department.shebeizhongleidaima.toString()
form.department.jianyanleibie = form.department.jianyanleibie.toString()
this.$refs['tempDepartment'].validate(valid => {
if (valid) {
this.tempDepartment.userList = this.departmentUserList
addDepartmentFn(this.tempDepartment).then(() => {
addDepartmentFn(form).then(() => {
this.$message.success('添加成功。')
this.getList()
this.dialogFormVisible = false
@ -183,11 +243,17 @@ export default {
})
},
updateDepartment() {
const form = {}
form.department = this.tempDepartment
form.userIds = this.departmentUserList
form.department.quhuadaima = form.department.quhuadaima.toString()
form.department.shebeizhongleidaima = form.department.shebeizhongleidaima.toString()
form.department.jianyanleibie = form.department.jianyanleibie.toString()
//
this.$refs['tempDepartment'].validate(valid => {
if (valid) {
this.tempDepartment.userList = this.departmentUserList
updateDepartmentFn(this.tempDepartment).then(() => {
updateDepartmentFn(form).then(() => {
this.$message.success('修改成功。')
this.getList()
this.dialogFormVisible = false

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

@ -483,7 +483,8 @@ export default {
data = {
ysjlId: this.ysjlId,
isReport: false,
order: sort
order: sort,
templateId: this.$route.query.templateId
}
}
this.api({

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

@ -24,10 +24,10 @@
<el-button v-show="state !== 'create'" type="warning" icon="el-icon-view" size="medium" @click="common.viewYsjl(ysjl.id, 'YSJL')">
预览
</el-button>
<el-button v-show="state !== 'create'" type="info" icon="el-icon-message" size="medium" @click="common.viewRejection(ysjl.id)">
<!-- <el-button v-show="state !== 'create'" type="info" icon="el-icon-message" size="medium" @click="common.viewRejection(ysjl.id)">
查看驳回意见
</el-button>
<Symbols />
<Symbols /> -->
</div>
</sticky>
<el-tabs v-model="checkedTab" type="card">
@ -327,12 +327,12 @@
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="检验开始日期" prop="jianyankaishiriqi">
<el-date-picker v-model="ysjl.jianyankaishiriqi" type="date" placeholder="选择日期" style="width: 100%;" />
<el-date-picker v-model="ysjl.jianyankaishiriqi" type="date" placeholder="选择日期" style="width: 100%;" value-format="yyyy-MM-dd" />
</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%;" />
<el-date-picker v-model="ysjl.jianyanjieshuriqi" type="date" placeholder="选择日期" style="width: 100%;" value-format="yyyy-MM-dd" />
</el-form-item>
</el-col>
</el-row>
@ -340,7 +340,7 @@
<el-col :span="9">
<el-form-item label="下次定期检验日期" label-width="150px" 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="选择日期" style="width: 100%;" />
<el-date-picker v-else v-model="ysjl.xiacijianyanriqi" type="date" placeholder="选择日期" style="width: 100%;" value-format="yyyy-MM-dd" />
</el-form-item>
</el-col>
<el-col :span="9">
@ -1006,9 +1006,9 @@
</fieldset>
</el-form>
</el-tab-pane>
<el-tab-pane label="压力容器原始资料" name="sixth">
<!-- <el-tab-pane label="压力容器原始资料" name="sixth">
<SliceUpload :renwu-id="ysjl.renwuId ? Number(ysjl.renwuId) : Number($route.query.renwuId)" :drag="true" />
</el-tab-pane>
</el-tab-pane> -->
</el-tabs>
<el-dialog :visible.sync="jyfaDialogVisible" title="添加检验方案" width="600px">
<jyfa ref="jyfa" :info="info" @childMethod="getJyxm" />
@ -1052,13 +1052,13 @@ import jyfa from '../../../../addJyfa'
import SignName from '@/views/common/SignName'
import Utils from '@/utils/contact'
import pictureUpload from '@/components/Upload'
import SliceUpload from '@/components/SliceUpload'
import Symbols from '@/views/common/Symbols'
// import SliceUpload from '@/components/SliceUpload'
// import Symbols from '@/views/common/Symbols'
import { getDepartmentTreeList } from '@/api/common'
export default {
name: 'RqDjYsjl',
components: { SignName, Sticky, jyfa, pictureUpload, SliceUpload, Symbols },
components: { SignName, Sticky, jyfa, pictureUpload },
data() {
return {
//
@ -1201,13 +1201,13 @@ export default {
this.ysjl = data.ysjl
this.departmentId = this.ysjl.departmentId
this.param = data.param ? data.param : {}
//
const tempTime = new Date()
this.ysjl.jianyankaishiriqi = tempTime
this.ysjl.jianyanjieshuriqi = tempTime
let xcjyrq = (tempTime.getFullYear() + 2) + '-' + (tempTime.getMonth() + 1) + '-' + tempTime.getDate()
xcjyrq = new Date(xcjyrq)
this.ysjl.xiacijianyanriqi = xcjyrq.setDate(xcjyrq.getDate() - 1)
// //
// const tempTime = new Date()
// this.ysjl.jianyankaishiriqi = tempTime
// this.ysjl.jianyanjieshuriqi = tempTime
// let xcjyrq = (tempTime.getFullYear() + 2) + '-' + (tempTime.getMonth() + 1) + '-' + tempTime.getDate()
// xcjyrq = new Date(xcjyrq)
// this.ysjl.xiacijianyanriqi = xcjyrq.setDate(xcjyrq.getDate() - 1)
this.ysjl.xiacijianyanriqishuoming = '/'
this.$set(this.ysjl, 'shebeipinzhong', '储存')
this.$set(this.ysjl, 'jianyanjielun', '符合要求')

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

@ -17,7 +17,7 @@
<el-button v-if="state !== 'create'" type="warning" icon="el-icon-view" size="medium" @click="common.viewYsjl(ysjl.id, 'YSJL')">
预览
</el-button>
<Symbols />
<!-- <Symbols /> -->
</div>
</sticky>
<el-tabs v-model="checkedTab" type="card">
@ -117,7 +117,7 @@
</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-date-picker v-model="ysjl.xiacijianyanriqi" type="date" placeholder="选择日期" style="width: 100%;" value-format="yyyy-MM-dd" />
</el-form-item>
</el-col>
</el-row>
@ -190,7 +190,7 @@
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="下次年度检查日期" prop="xiaciniandujianchariqi">
<el-date-picker v-model="param.xiaciniandujianchariqi" type="date" placeholder="选择日期" style="width: 100%;" />
<el-date-picker v-model="param.xiaciniandujianchariqi" type="date" placeholder="选择日期" style="width: 100%;" value-format="yyyy-MM-dd" />
</el-form-item>
</el-col>
</el-row>
@ -281,11 +281,11 @@
import Utils from '@/utils/contact.js' //
import Sticky from '@/components/Sticky'
import SignName from '@/views/common/SignName'
import Symbols from '@/views/common/Symbols'
// import Symbols from '@/views/common/Symbols'
import { getDepartmentTreeList } from '@/api/common'
export default {
name: 'RqNdYsjl',
components: { SignName, Sticky, Symbols },
components: { SignName, Sticky },
data() {
return {
edit: false, //
@ -381,8 +381,6 @@ export default {
this.ysjl = data.ysjl
this.departmentId = this.ysjl.departmentId
this.param = data.param ? data.param : {}
const tempTime = new Date()
this.ysjl.jianyanjieshuriqi = tempTime
this.ysjl.jianyanjielun = '符合要求'
this.param = {
wentijizai: '无',

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

@ -351,12 +351,12 @@
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="下次年度检验日期" prop="xiaciniandujianchariqi">
<el-date-picker v-model="param.xiaciniandujianchariqi" type="date" placeholder="选择日期" editable style="width: 100%;" />
<el-date-picker v-model="param.xiaciniandujianchariqi" type="date" placeholder="选择日期" editable style="width: 100%;" value-format="yyyy-MM-dd" />
</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="选择日期" editable style="width: 100%;" />
<el-date-picker v-model="ysjl.xiacijianyanriqi" type="date" placeholder="选择日期" editable style="width: 100%;" value-format="yyyy-MM-dd" />
</el-form-item>
</el-col>
</el-row>
@ -816,26 +816,7 @@ export default {
name: 'RqDjGcYsjl',
components: { SignName, Sticky, jyfa },
props: {
neibuleibiejielun: {
type: String,
default: '汽车罐车(罐式集装箱)定期检验结论记录'
},
neibuleibieshencha: {
type: String,
default: '汽车罐车(罐式集装箱)资料审查记录'
},
neibuleibieparam: {
type: String,
default: '汽车罐车(罐式集装箱)资料审查记录附页'
},
datashow: {
type: Boolean,
default: true
},
jyxm: {
type: String,
default: ''
}
},
data() {
return {
@ -890,7 +871,12 @@ export default {
similarVisible: false,
similarTableData: [],
djjgs: ['无'],
departmemtArr: []
departmemtArr: [],
neibuleibiejielun: '汽车罐车(罐式集装箱)定期检验结论记录',
neibuleibieshencha: '汽车罐车(罐式集装箱)资料审查记录',
neibuleibieparam: '汽车罐车(罐式集装箱)资料审查记录附页',
datashow: true,
jyxm: ''
}
},
computed: {
@ -951,12 +937,12 @@ export default {
this.ysjl = data.ysjl
this.templateId = this.ysjl.departmentId
this.param = data.param ? data.param : {}
const tempTime = new Date()
// const tempTime = new Date()
this.$set(this.ysjl, 'jianyankaishiriqi', this.dateFormat(new Date()))
this.$set(this.ysjl, 'jianyanjieshuriqi', this.dateFormat(new Date()))
let xcjyrq = (tempTime.getFullYear() + 1) + '-' + (tempTime.getMonth() + 1) + '-' + tempTime.getDate()
xcjyrq = new Date(xcjyrq)
this.ysjl.xiacijianyanriqi = xcjyrq.setDate(xcjyrq.getDate() - 1)
// let xcjyrq = (tempTime.getFullYear() + 1) + '-' + (tempTime.getMonth() + 1) + '-' + tempTime.getDate()
// xcjyrq = new Date(xcjyrq)
// this.ysjl.xiacijianyanriqi = xcjyrq.setDate(xcjyrq.getDate() - 1)
this.$set(this.ysjl, 'bianzhiriqi', this.dateFormat(new Date()))
this.$set(this.ysjl, 'jianyanyiju', '《移动式压力容器安全技术监察规程》(TSG R0005)\n' + '《压力容器定期检验规则》(TSG R7001)')
this.$set(this.ysjl, 'shebeipinzhong', '汽车罐车')

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

@ -629,9 +629,10 @@ export default {
data: {
ysjl: this.ysjl,
param: this.param,
cyJyxm: {
jyxm: JSON.stringify(this.tableData),
bgjyxm: JSON.stringify(this.tableDataBg),
flag: operation
bgjyxm: JSON.stringify(this.tableDataBg)
}
}
}).then(data => {
Utils.$emit('bggl-daiban-list')

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

@ -1,610 +0,0 @@
<!-- 车用气瓶安装监督检验报告 -->
<template>
<div class="app-container">
<sticky style="margin-bottom: 10px;">
<div class="sub-navbar">
<el-button v-show="state === 'create'" type="success" icon="el-icon-edit" size="medium" @click="saveYsjl('add')">
保存
</el-button>
<el-button v-show="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-show="state !== 'create'" type="warning" icon="el-icon-view" size="medium" @click="common.viewYsjl(ysjl.id, 'YSJL')">
预览
</el-button>
<el-button v-show="state !== 'create'" type="info" icon="el-icon-message" size="medium" @click="common.viewRejection(ysjl.id)">
查看驳回意见
</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 === null || ysjl.jilubianhao === ''" :span="13">
<el-form-item label="报告编号">
<el-input v-model="jlbh1" style="width:70px" disabled /> -
<el-input v-model="jlbh2" style="width:120px" disabled /> -
<el-input v-model="jlbh3" style="width:120px" />
</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" @blur="judgeRepeat(ysjl.jilubianhao, ysjl.id)" />
</el-form-item>
</el-col>
<el-col v-if="isRepeat" :span="2">
<span style="color:red">编号重复</span>
</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="shigongriqi">
<el-date-picker v-model="ysjl.shigongriqi" value-format="yyyy-MM-dd" type="date" 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" />
</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" 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="dengjijiguan">
<el-select v-model="ysjl.dengjijiguan" filterable style="width: 100%;">
<el-option v-for="(item, index) in djjgs" :key="index" :label="item" :value="item" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="检验金额(元)" prop="jianyanheding">
<el-input-number v-model="ysjl.jianyanheding" :disabled="ysjl.retreatState === 2 && ysjl.jfState !== null && ysjl.jfState" :controls="false" 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="yali">
<el-input v-model="param.yali" type="text" style="width: 120%;" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="工作介质" prop="jiezhi">
<el-input v-model="param.jiezhi" type="text" style="width: 120%;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="车辆牌号/车辆底盘号" label-width="150px" prop="rongqituhao">
<el-input v-model="param.rongqituhao" type="text" style="width: 120%;" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>检验信息</legend>
<el-row :gutter="20" style="text-align:left;margin-left: 35px;font-size: 18px;color: #606266;line-height: 60px;font-weight: bolder;">
根据中华人民共和国特种设备安全法特种设备安全监察条例车用气瓶安全技术监察规程的要求该车用气瓶安装经我机构监督检验其安装安全质量
<el-select v-model="ysjl.jianyanjielun" placeholder="请选择" style="width: 100px;">
<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="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" 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="departmentId">
<el-cascader
v-model="ysjl.departmentId"
:options="departmemtArr"
:props="{ value: 'id', label: 'name', checkStrictly: true }"
:show-all-levels="false"
@change="handleChange"
/>
</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="bgfyData"
:span-method="arraySpanMethod"
border
highlight-current-row
stripe
style="width:80%"
>
<el-table-column type="index" width="60" align="center" label="序号" />
<el-table-column align="center" label="检验项目">
<el-table-column align="left" prop="jianyanxiang" width="150" label="检验项" />
<el-table-column align="left" prop="jianyanmu" width="300" label="检验内容" />
</el-table-column>
<el-table-column align="center" prop="xiangmuleibie" label="类别" />
<el-table-column align="center" prop="jianyanjieguo" label="检验结果">
<template slot-scope="scope">
<el-select v-model="scope.row.jianyanjieguo" :disabled="edit" filterable allow-create default-first-option placeholder="请选择" style="width: 100%;">
<el-option label="资料齐全" value="资料齐全" />
<el-option label="未到首次检验日期" value="未到首次检验日期" />
<el-option label="无变更" value="无变更" />
<el-option label="未发现超标缺陷" value="未发现超标缺陷" />
<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="beizhu" label="工作见证">
<template slot-scope="scope">
<el-input v-model="scope.row.beizhu" :disabled="edit" name="fyGongzuojianzheng" placeholder="请输入内容" />
</template>
</el-table-column>
</el-table>
<br>
<el-form ref="param" :model="param" class="el_form" label-position="right" label-width="250px">
<el-row>
<el-col :span="11" style="height: 60px">
<el-form-item label="对安装单位质量体系运转情况的评价:" prop="aqglqkjcjg">
<el-input v-model="param.aqglqkjcjg" type="textarea" placeholder="请输入内容" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11" style="height: 80px">
<el-form-item label="记事栏:" prop="qita">
<el-input v-model="param.qita" type="textarea" placeholder="请输入内容" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import Sticky from '@/components/Sticky'
import SignName from '@/views/common/SignName'
import Utils from '@/utils/contact.js'
import { getDepartmentTreeList } from '@/api/common'
export default {
name: 'CyqpAjYsjl',
components: { SignName, Sticky },
data() {
return {
//
edit: false, //
bgfyData: [], //
jlbh1: 'PJ1',
jlbh2: 'ZZSYC' + new Date().getFullYear(),
jlbh3: '',
//
jianyanrenyuan: '',
//
// {create=> update=> }
state: this.$route.query.state,
ysjl: {},
departmentId: this.$route.query.departmentId,
param: {},
checkedTab: 'first',
//
//
cols: [
{
name: 'jianyanxiang', // el-table-column prop=''
getValue(row) { //
return row.jianyanxiang
}
},
{
name: 'jianyanmu',
getValue(row) {
return row.jianyanmu
}
}
],
//
rows: [
{
name: 'jianyanxiang',
getValue(row) {
return row.jianyanxiang
}
},
{
name: 'jianyanmu',
getValue(row) {
return row.jianyanmu
}
}
],
isRepeat: false,
users: [],
djjgs: ['无'],
departmemtArr: []
}
},
// 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.getParam(this.$route.query.id, this.$route.query.sbzldm)
// }
// this.getUserList()
// this.getJyxm(1)
// this.getArea()
},
mounted() {
if (!this.ysjl.jilubianhao) {
this.getMaxBh()
}
this.getDepartmentArr()
},
methods: {
getDepartmentArr() {
getDepartmentTreeList().then(res => {
this.departmemtArr = res
})
},
handleChange(v) {
this.ysjl.departmentId = v[1]
},
initYsjl() {
this.api({
url: '/ysjl/initYsjl',
method: 'post',
data: {
templateId: this.$route.query.templateId,
renwuId: this.$route.query.renwuId,
neibuleibie: this.$route.query.neibuleibie,
sblbdm: this.$route.query.sblbdm,
sblbmc: this.$route.query.sblbmc,
sbpzdm: this.$route.query.sbpzdm,
sbpzmc: this.$route.query.sbpzmc
}
}).then(data => {
this.ysjl = data.ysjl
this.departmentId = this.ysjl.departmentId
this.param = data.param ? data.param : {}
const tempTime = new Date()
this.$set(this.ysjl, 'jianyanjielun', '符合')
this.ysjl.jianyankaishiriqi = tempTime
this.ysjl.jianyanjieshuriqi = tempTime
this.ysjl.jiaoheriqi = tempTime
let xcjyrq = (tempTime.getFullYear() + 2) + '-' + (tempTime.getMonth() + 1) + '-' + tempTime.getDate()
xcjyrq = new Date(xcjyrq)
this.ysjl.xiacijianyanriqi = xcjyrq.setDate(xcjyrq.getDate() - 1)
this.ysjl.xiacijianyanriqishuoming = '/'
})
},
getYsjl() {
this.api({
url: '/ysjl',
method: 'get',
params: {
ysjlId: this.$route.query.id
}
}).then(data => {
this.ysjl = data
this.departmentId = this.ysjl.departmentId
if (this.ysjl.jianyanrenyuan) {
this.jianyanrenyuan = this.common.convertCnName(this.ysjl.jianyanrenyuan)
}
//
if (this.ysjl.jilubianhao === null || this.ysjl.jilubianhao === undefined || 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
})
},
//
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/all',
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.jlbh3 = data
})
},
//
getJyxm(sort) {
let url = ''
let data = {}
if (this.state === 'create') {
url = '/jyxm/getCyJyxm'
data = {
templateId: this.$route.query.templateId,
order: sort
}
} else {
url = '/jyxm/getCyJyxmByYsjl'
data = {
ysjlId: this.$route.query.id,
isReport: false,
order: sort
}
}
this.api({
url: url,
method: 'get',
params: data
}).then(data => {
console.log(data)
this.bgfyData = data
this.tableJs.getData(this.cols, this.rows, data)
})
},
saveYsjl: function(operation) {
this.tableData = []
const retData = []
for (let i = 0; i < this.bgfyData.length; i++) {
//
const retRow = {}
retRow.id = this.bgfyData[i].id
if (this.bgfyData[i].jianyanjieguo !== '' && this.bgfyData[i].jianyanjieguo !== null && this.bgfyData[i].jianyanjieguo !== undefined) {
retRow.jianyanjieguo = this.bgfyData[i].jianyanjieguo
}
if (this.bgfyData[i].beizhu !== '' && this.bgfyData[i].beizhu !== null && this.bgfyData[i].beizhu !== undefined) {
retRow.beizhu = this.bgfyData[i].beizhu
}
retData.push(retRow)
}
this.tableData.push(retData)
let type = ''
if (operation === 'add') {
type = 'post'
this.ysjl.bglx = 1
this.ysjl.cjState = 'ysjl'
this.ysjl.jigouhezhunzhenghao = process.env.VUE_APP_HZZBH
this.ysjl.jlprintState = 0
this.ysjl.jianyanxiangmu = 'cyqp'
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + '-' + this.jlbh3
this.save(operation, type)
} else if (operation === 'upd') {
type = 'put'
this.save(operation, type)
} else if (operation === 'build') {
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
}
this.tableData = null
type = 'put'
this.save(operation, type)
}
},
save(operation, type) {
//
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: '/ysjl',
method: type,
data: {
ysjl: this.ysjl,
param: this.param,
jyxm: jyxm,
bgjyxm: jyxm,
flag: operation
}
}).then(data => {
//
Utils.$emit('task-list')
Utils.$emit('bggl-daiban-list')
if (operation === 'add') {
this.ysjl.id = data
this.param.ysjlId = data
this.$message({ message: '保存成功', type: 'success' })
} else if (operation === 'upd') {
this.$message({ message: '更新成功', type: 'success' })
} else if (operation === 'build') {
Utils.$emit('ysjl-list')
Utils.$emit('ysjl-yb-list')
Utils.$emit('bggl-daiban-list')
// 16
this.common.updRenwuState(this.ysjl.id, 2, true)
// pdf
this.common.viewYsjlNoOpen(this.ysjl.id, 'YSJL')
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 => {
this.isRepeat = data > 0
})
},
arraySpanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 1) {
if (rowIndex === 0) {
return [2, 1]
} else if (rowIndex === 2 || rowIndex === 6) {
return [3, 1]
} else if (rowIndex === 5 || rowIndex === 9 || rowIndex === 10) {
return [1, 2]
} else {
return [0, 0]
}
} else if (columnIndex === 2) {
if (rowIndex === 5 || rowIndex === 9 || rowIndex === 10) {
return [0, 0]
}
} else if (columnIndex === 5) {
if (rowIndex === 0) {
return [11, 1]
} else {
return [0, 0]
}
}
},
/**
* 查询区划
*/
getArea() {
this.api({
url: '/area/getShiArea',
method: 'get',
params: {
shidaima: '370100'
}
}).then(data => {
data.forEach(area => {
this.djjgs.push(area.label + '市场监督管理局')
})
})
}
}
}
</script>

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

@ -24,10 +24,10 @@
<el-button v-show="state !== 'create'" type="warning" icon="el-icon-view" size="medium" @click="common.viewYsjl(ysjl.id, 'YSJL')">
预览
</el-button>
<el-button v-show="state !== 'create'" type="info" icon="el-icon-message" size="medium" @click="common.viewRejection(ysjl.id)">
<!-- <el-button v-show="state !== 'create'" type="info" icon="el-icon-message" size="medium" @click="common.viewRejection(ysjl.id)">
查看驳回意见
</el-button>
<Symbols />
<Symbols /> -->
</div>
</sticky>
<el-tabs v-model="checkedTab" type="card">
@ -547,10 +547,10 @@ import Sticky from '@/components/Sticky'
import jyfa from '@/views/ysjl/addJyfa'
import SignName from '@/views/common/SignName'
import Utils from '@/utils/contact.js'
import Symbols from '@/views/common/Symbols'
// import Symbols from '@/views/common/Symbols'
export default {
name: 'Ycjl',
components: { SignName, Sticky, jyfa, Symbols },
components: { SignName, Sticky, jyfa },
props: {
neibuleibieparam: {
type: String,
@ -692,10 +692,10 @@ export default {
this.ysjl = data.ysjl
this.param = (data.param !== null && data.param !== undefined) ? data.param : {}
//
const tempTime = new Date()
let xcjyrq = (tempTime.getFullYear() + 2) + '-' + (tempTime.getMonth() + 1) + '-' + tempTime.getDate()
xcjyrq = new Date(xcjyrq)
this.ysjl.xiacijianyanriqi = xcjyrq.setDate(xcjyrq.getDate() - 1)
// const tempTime = new Date()
// let xcjyrq = (tempTime.getFullYear() + 2) + '-' + (tempTime.getMonth() + 1) + '-' + tempTime.getDate()
// xcjyrq = new Date(xcjyrq)
// this.ysjl.xiacijianyanriqi = xcjyrq.setDate(xcjyrq.getDate() - 1)
this.dateFormat()
this.ysjl.xiacijianyanriqishuoming = '/'
this.ysjl.bianzhiren = this.$store.getters.userId + ''
@ -944,9 +944,10 @@ export default {
data: {
ysjl: this.ysjl,
param: this.param,
cyJyxm: {
jyxm: jyxm,
bgjyxm: jyxm,
flag: operation
bgjyxm: jyxm
}
}
}).then(data => {
//

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

@ -34,10 +34,10 @@
<el-button type="success" size="medium" icon="el-icon-edit" @click="batchUpdDate">
批量修改日期
</el-button>
<el-button v-show="state !== 'create'" type="info" icon="el-icon-message" size="medium" @click="common.viewRejection(ysjl.id)">
<!-- <el-button v-show="state !== 'create'" type="info" icon="el-icon-message" size="medium" @click="common.viewRejection(ysjl.id)">
查看驳回意见
</el-button>
<Symbols />
<Symbols /> -->
</div>
</sticky>
<el-tabs v-model="checkedTab" type="card">
@ -402,9 +402,9 @@
</el-row>
</el-form>
</el-tab-pane>
<el-tab-pane label="压力容器原始资料" name="third">
<SliceUpload :renwu-id="ysjl.renwuId ? Number(ysjl.renwuId) : Number($route.query.renwuId)" :drag="true" />
</el-tab-pane>
<!-- <el-tab-pane label="压力容器原始资料" name="third"> -->
<!-- <SliceUpload :renwu-id="ysjl.renwuId ? Number(ysjl.renwuId) : Number($route.query.renwuId)" :drag="true" />
</el-tab-pane> -->
</el-tabs>
<el-dialog :visible.sync="jyxmrqShow" title="批量修改日期" width="500px" @close="closeDialog">
<template>
@ -456,14 +456,14 @@
import Sticky from '@/components/Sticky'
import SignName from '@/views/common/SignName'
import Utils from '@/utils/contact.js'
import SliceUpload from '@/components/SliceUpload'
import Symbols from '@/views/common/Symbols'
// import SliceUpload from '@/components/SliceUpload'
// import Symbols from '@/views/common/Symbols'
import jyfa from '@/views/ysjl/addJyfa'
import { getDepartmentTreeList } from '@/api/common'
export default {
name: 'YcJdYsjl',
components: { SignName, Sticky, SliceUpload, Symbols, jyfa },
components: { SignName, Sticky, jyfa },
data() {
return {
//

2
src/views/ysjl/4000/dj/common/index.vue

@ -864,7 +864,7 @@ export default {
},
data() {
return {
jlbh1: 'QZ',
jlbh1: 'QD',
jlbh2: '(' + new Date().getFullYear() + ')',
jlbh3: '',
ysjl: {

2
src/views/ysjl/4000/jj/common/index.vue

@ -946,7 +946,7 @@ export default {
},
data() {
return {
jlbh1: 'GN',
jlbh1: 'QJ',
jlbh2: '(' + new Date().getFullYear() + ')',
jlbh3: '',
ysjl: {

Loading…
Cancel
Save