Compare commits

...

4 Commits

  1. 689
      src/views/allot/components/chengya_list.vue
  2. 383
      src/views/allot/hasAllot.vue
  3. 88
      src/views/allot/rwd_list.vue
  4. 14
      src/views/allot/team_list.vue
  5. 30
      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. 40
      src/views/bjd/dj_input.vue
  10. 455
      src/views/bjd/dj_list.vue
  11. 163
      src/views/bjd/dt_list.vue
  12. 85
      src/views/bjd/jj_input.vue
  13. 132
      src/views/bjd/jj_list.vue
  14. 124
      src/views/bjd/qy_list.vue
  15. 40
      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. 7
      src/views/ysjl/2000/2200/zbg/nd/tuoche.vue
  23. 610
      src/views/ysjl/2000/2300/zbg/jj/cyqp.vue
  24. 23
      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

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

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

383
src/views/allot/hasAllot.vue

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

88
src/views/allot/rwd_list.vue

@ -60,10 +60,10 @@
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column type="selection" width="40" /> <el-table-column type="selection" width="40" />
<el-table-column align="center" label="序号" width="50" fixed="left"> <el-table-column align="center" label="序号" width="50" fixed="left" type="index">
<template slot-scope="scope"> <!-- <template slot-scope="scope">
<span v-text="getIndex(scope.$index)" /> <span v-text="getIndex(scope.$index)" />
</template> </template> -->
</el-table-column> </el-table-column>
<el-table-column align="center" label="报检单号" prop="serialNumber" width="140" /> <el-table-column align="center" label="报检单号" prop="serialNumber" width="140" />
<el-table-column align="center" label="设备种类" prop="shebeizhongleidaima" width="80" /> <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 :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="yuejianriqi" width="100" />
<el-table-column align="center" label="创建日期" prop="createTime" 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"> <template slot-scope="scope">
<el-button type="success" size="small" circle icon="el-icon-view" title="预览报检单" @click="editBjd(scope.$index)" /> <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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -113,6 +113,39 @@
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
/> />
<iframe :src="printbutton" frameborder="0" scrolling="no" height="0px" aria-disabled="true" /> <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> </div>
</template> </template>
@ -140,7 +173,19 @@ export default {
selection: [], selection: [],
showLoading: true, showLoading: true,
departmentId: this.$store.getters.departmentId, departmentId: this.$store.getters.departmentId,
printbutton: '' printbutton: '',
tempDepartment: {
id: '',
shiyongdanwei: '',
shiyongdanweiLianxiren: '',
shiyongdanweiDianhua: '',
shiyongdanweiDizhi: '',
shigongdanwei: '',
shigongdanweiLianxiren: '',
shigongdanweiDianhua: ''
},
dialogFormVisible: false,
users: []
} }
}, },
created() { created() {
@ -222,14 +267,29 @@ export default {
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 })
} }
}, },
modifyBjd($index) { modifyBjd(row) {
const bjd = this.list[$index] this.dialogFormVisible = true
const type = '/finish' console.log(row)
if (bjd.jianyanleibie === 'DJ') { // this.tempDepartment =
this.$router.push({ path: '/bjd/bjd-dj-input/' + bjd.bjdId + '/' + bjd.shebeizhongleidaima + '/' + bjd.shebeizhongleidaima + type, params: { form: 1 }}) Object.keys(this.tempDepartment).forEach(key => {
} else { console.log(key)
this.$router.push({ path: '/bjd/bjd-jj-input/' + bjd.bjdId + '/' + bjd.shebeizhongleidaima + '/' + bjd.shebeizhongleidaima + type, params: { form: 1 }}) 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() { printRwd() {
if (this.multipleSelection.length && this.multipleSelection.length > 1) { 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-dialog title="科室小组管理" :visible.sync="dialogFormVisible" width="30%" @close="closeDialog">
<el-form ref="tempDepartment" :model="tempDepartment" class="small-space" label-width="80px"> <el-form ref="tempDepartment" :model="tempDepartment" class="small-space" label-width="80px">
<el-form-item label="小组名称" required> <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 === '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: 200px" /> <el-input v-if="dialogStatus === 'create'" v-model="tempDepartment.teamName" type="text" size="small" style="width: 240px" />
</el-form-item> </el-form-item>
<el-form-item label="所属部门" required> <el-form-item label="所属部门" required>
<el-select v-model="tempDepartment.departmentId" placeholder="请选择科室" style="width: 240px;" @change="selectDepartmentUser"> <el-select v-model="tempDepartment.departmentId" placeholder="请选择科室" style="width: 240px;" @change="selectDepartmentUser">
@ -206,7 +206,8 @@ export default {
}) })
}, },
saveTeam() { saveTeam() {
this.tempDepartment.teamPerson = this.tempDepartment.teamPerson.toString() this.tempDepartment.teamPerson = this.renyuans.toString()
console.log(this.tempDepartment)
// a // a
this.$refs['tempDepartment'].validate(valid => { this.$refs['tempDepartment'].validate(valid => {
if (valid) { if (valid) {
@ -223,19 +224,16 @@ export default {
} }
if (this.dialogStatus === 'update') { if (this.dialogStatus === 'update') {
const data = Object.assign({}, this.tempDepartment) const data = Object.assign({}, this.tempDepartment)
console.log(data)
updateTeamFn(data).then(data => { updateTeamFn(data).then(data => {
this.getList() this.getList()
this.$message({ type: 'success', message: '修改成功!' }) this.$message({ type: 'success', message: '修改成功!' })
this.dialogFormVisible = false this.dialogFormVisible = false
}) })
} else { } else {
addTeamFn({ addTeamFn(this.tempDepartment).then(data => {
renwuTeam: this.tempDepartment,
renyuans: this.renyuans
}).then(data => {
this.getList() this.getList()
this.$message({ type: 'success', message: '添加成功!' }) this.$message({ type: 'success', message: '添加成功!' })
this.dialogFormVisible = false
}) })
} }
} else { } else {

30
src/views/allot/tuihui_list.vue

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

2
src/views/archive/archive_info.vue

@ -76,7 +76,7 @@ export default {
}) })
}, },
getList() { getList() {
this.server({ this.api({
url: '/archive', url: '/archive',
method: 'get', method: 'get',
params: { 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 }) { tableRowClassName({ row, rowIndex }) {
console.log(row, rowIndex)
// row.index = rowIndex // row.index = rowIndex
const nextTime = new Date(row.xiacijianyanriqi).getTime() const nextTime = new Date(row.xiacijianyanriqi).getTime()
const currentTime = new Date().getTime() const currentTime = new Date().getTime()
console.log(nextTime, currentTime, nextTime - currentTime)
if (nextTime - currentTime < 7776000000) { if (nextTime - currentTime < 7776000000) {
console.log('<3')
return 'restart-row' return 'restart-row'
} else if (nextTime - currentTime >= 7776000000) { } else if (nextTime - currentTime >= 7776000000) {
return 'reject-row' return 'reject-row'

40
src/views/bjd/dj_input.vue

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

455
src/views/bjd/dj_list.vue

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

163
src/views/bjd/dt_list.vue

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

85
src/views/bjd/jj_input.vue

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

132
src/views/bjd/jj_list.vue

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

124
src/views/bjd/qy_list.vue

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

40
src/views/flow/definition.vue

@ -255,7 +255,7 @@
<el-table-column type="index" label="序号" width="50" /> <el-table-column type="index" label="序号" width="50" />
<el-table-column prop="userId" label="环节人员" width="180"> <el-table-column prop="userId" label="环节人员" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row.nickname" placeholder="请选择" multiple> <el-select v-model="scope.row.nickname" placeholder="请选择">
<el-option <el-option
v-for="item in options" v-for="item in options"
:key="item.id" :key="item.id"
@ -555,28 +555,22 @@ export default {
}) })
}, },
updateLink() { updateLink() {
this.$refs['formMember'].validate((valid) => { this.formMember.userIds = this.listMemberUser
if (valid) { const _vue = this
this.formMember.userIds = this.listMemberUser this.api({
const _vue = this url: '/definition/updateGroupMember',
this.api({ method: 'post',
url: '/definition/updateGroupMember', data: this.formMember
method: 'post', }).then(() => {
data: this.formMember this.dialogFormMemberVisible = false
}).then(() => { this.$message({
this.dialogFormMemberVisible = false message: '修改成功',
this.$message({ type: 'success',
message: '修改成功', duration: 300,
type: 'success', onClose: () => {
duration: 300, _vue.getList()
onClose: () => { }
_vue.getList() })
}
})
})
} else {
return false
}
}) })
}, },
delDefinition() { delDefinition() {

22
src/views/task/list.vue

@ -61,10 +61,10 @@
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column type="selection" width="40" /> <el-table-column type="selection" width="40" />
<el-table-column align="center" label="序号" width="60" fixed="left"> <el-table-column align="center" label="序号" width="60" fixed="left" type="index">
<template slot-scope="scope"> <!-- <template slot-scope="scope">
<span v-text="getIndex(scope.$index)" /> <span v-text="getIndex(scope.$index)" />
</template> </template> -->
</el-table-column> </el-table-column>
<el-table-column v-if="$store.getters.departmentId !== 75" align="center" label="设备种类" prop="shebeizhonglei" width="100" /> <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" /> <el-table-column :formatter="formatter.formatterCategory" align="center" label="检验类别" prop="neibuleibie" width="100" />
@ -187,10 +187,10 @@
@selection-change="handleDialogSelectionChange" @selection-change="handleDialogSelectionChange"
> >
<el-table-column type="selectionCopy" width="45" /> <el-table-column type="selectionCopy" width="45" />
<el-table-column align="center" label="序号" width="50"> <el-table-column align="center" label="序号" width="50" type="index">
<template slot-scope="scope"> <!-- <template slot-scope="scope">
<span v-text="getIndex(scope.$index)" /> <span v-text="getIndex(scope.$index)" />
</template> </template> -->
</el-table-column> </el-table-column>
<el-table-column align="center" label="报告编号" prop="baogaobianhao" width="180px;" /> <el-table-column align="center" label="报告编号" prop="baogaobianhao" width="180px;" />
<el-table-column align="center" label="记录编号" prop="jilubianhao" width="180" sortable="custom" /> <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 { getOwnList, terminateRenwu, completeRenwuFn } from '@/api/renwu'
import { cancelRenwuFn } from '@/api/common' import { cancelRenwuFn } from '@/api/common'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import qs from 'qs'
export default { export default {
name: 'MyTask', name: 'MyTask',
components: { Sticky, Pagination }, components: { Sticky, Pagination },
@ -603,9 +603,12 @@ export default {
url: 'renwu/backToLeader', url: 'renwu/backToLeader',
method: 'get', method: 'get',
params: { params: {
ids: this.$refs.list.selection.map(rw => { renwuIds: this.$refs.list.selection.map(rw => {
return rw.id return rw.id
}).join(',') })
},
paramsSerializer: function(params) {
return qs.stringify(params, { indices: false })
} }
}).then(data => { }).then(data => {
this.$message({ this.$message({
@ -616,6 +619,7 @@ export default {
}) })
}, },
clearQuery() { clearQuery() {
this.listQuery = {}
this.getList() this.getList()
}, },
clearCopyQuery() { 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="最近修改时间" prop="updateTime" style="width: 60px;" />
<el-table-column align="center" label="管理" width="150"> <el-table-column align="center" label="管理" width="150">
<template slot-scope="scope"> <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> </el-button>
</template> </template>
@ -47,13 +47,40 @@
<el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" @close="closeDialog"> <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" @close="closeDialog">
<el-form ref="tempDepartment" :model="tempDepartment" class="small-space" label-width="80px"> <el-form ref="tempDepartment" :model="tempDepartment" class="small-space" label-width="80px">
<el-form-item label="部门名称" required> <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>
<el-form-item label="负责人" size="small" required> <el-form-item label="负责人" size="small" required>
<el-select v-model="tempDepartment.leader" filterable placeholder="请选择" clearable> <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-option v-for="item in leaders" :key="item.id" :label="item.nickname" :value="item.id" />
</el-select> </el-select>
</el-form-item> </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-form-item label="部门代码(选填)">
<el-input v-model="tempDepartment.code" type="text" size="small" style="width: 200px" /> <el-input v-model="tempDepartment.code" type="text" size="small" style="width: 200px" />
</el-form-item> </el-form-item>
@ -105,13 +132,40 @@ export default {
departmentUserList: [], departmentUserList: [],
leaders: [], leaders: [],
multipleSelection: [], multipleSelection: [],
isIndeterminate: true isIndeterminate: true,
sbzlList: [],
areas: []
} }
}, },
created() { created() {
this.getList() this.getList()
this.getSbzlList()
this.getArea()
}, },
methods: { 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() { getList() {
// //
this.api({ this.api({
@ -132,12 +186,14 @@ export default {
this.dialogStatus = 'create' this.dialogStatus = 'create'
this.dialogFormVisible = true this.dialogFormVisible = true
}, },
showUpdate($index) { showUpdate(item) {
this.leaders = this.$store.getters.allUser this.leaders = this.$store.getters.allUser
const department = this.list[$index] this.tempDepartment = item
this.tempDepartment = department this.tempDepartment.quhuadaima = item.quhuadaima.split(',')
this.getUserListByDepartmentIdOrNull(department.id) this.tempDepartment.shebeizhongleidaima = item.shebeizhongleidaima.split(',')
this.getUserListByDepartmentId(department.id) this.tempDepartment.jianyanleibie = item.jianyanleibie.split(',')
this.getUserListByDepartmentIdOrNull(item.id)
this.getUserListByDepartmentId(item.id)
this.dialogStatus = 'update' this.dialogStatus = 'update'
this.dialogFormVisible = true this.dialogFormVisible = true
}, },
@ -168,11 +224,15 @@ export default {
}) })
}, },
createDepartment() { 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 => { this.$refs['tempDepartment'].validate(valid => {
if (valid) { if (valid) {
this.tempDepartment.userList = this.departmentUserList addDepartmentFn(form).then(() => {
addDepartmentFn(this.tempDepartment).then(() => {
this.$message.success('添加成功。') this.$message.success('添加成功。')
this.getList() this.getList()
this.dialogFormVisible = false this.dialogFormVisible = false
@ -183,11 +243,17 @@ export default {
}) })
}, },
updateDepartment() { 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 => { this.$refs['tempDepartment'].validate(valid => {
if (valid) { if (valid) {
this.tempDepartment.userList = this.departmentUserList this.tempDepartment.userList = this.departmentUserList
updateDepartmentFn(this.tempDepartment).then(() => { updateDepartmentFn(form).then(() => {
this.$message.success('修改成功。') this.$message.success('修改成功。')
this.getList() this.getList()
this.dialogFormVisible = false this.dialogFormVisible = false

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

@ -483,7 +483,8 @@ export default {
data = { data = {
ysjlId: this.ysjlId, ysjlId: this.ysjlId,
isReport: false, isReport: false,
order: sort order: sort,
templateId: this.$route.query.templateId
} }
} }
this.api({ 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 v-show="state !== 'create'" type="warning" icon="el-icon-view" size="medium" @click="common.viewYsjl(ysjl.id, 'YSJL')">
预览 预览
</el-button> </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> </el-button>
<Symbols /> <Symbols /> -->
</div> </div>
</sticky> </sticky>
<el-tabs v-model="checkedTab" type="card"> <el-tabs v-model="checkedTab" type="card">
@ -327,12 +327,12 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="9"> <el-col :span="9">
<el-form-item label="检验开始日期" prop="jianyankaishiriqi"> <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-form-item>
</el-col> </el-col>
<el-col :span="9"> <el-col :span="9">
<el-form-item label="检验结束日期" prop="jianyanjieshuriqi"> <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-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -340,7 +340,7 @@
<el-col :span="9"> <el-col :span="9">
<el-form-item label="下次定期检验日期" label-width="150px" prop="xiacijianyanriqi"> <el-form-item label="下次定期检验日期" label-width="150px" prop="xiacijianyanriqi">
<el-input v-if="ysjl.jianyanjielun === '不符合要求'" v-model="ysjl.xiacijianyanriqishuoming" type="text" disabled="true" /> <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-form-item>
</el-col> </el-col>
<el-col :span="9"> <el-col :span="9">
@ -1006,9 +1006,9 @@
</fieldset> </fieldset>
</el-form> </el-form>
</el-tab-pane> </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" /> <SliceUpload :renwu-id="ysjl.renwuId ? Number(ysjl.renwuId) : Number($route.query.renwuId)" :drag="true" />
</el-tab-pane> </el-tab-pane> -->
</el-tabs> </el-tabs>
<el-dialog :visible.sync="jyfaDialogVisible" title="添加检验方案" width="600px"> <el-dialog :visible.sync="jyfaDialogVisible" title="添加检验方案" width="600px">
<jyfa ref="jyfa" :info="info" @childMethod="getJyxm" /> <jyfa ref="jyfa" :info="info" @childMethod="getJyxm" />
@ -1052,13 +1052,13 @@ import jyfa from '../../../../addJyfa'
import SignName from '@/views/common/SignName' import SignName from '@/views/common/SignName'
import Utils from '@/utils/contact' import Utils from '@/utils/contact'
import pictureUpload from '@/components/Upload' import pictureUpload from '@/components/Upload'
import SliceUpload from '@/components/SliceUpload' // import SliceUpload from '@/components/SliceUpload'
import Symbols from '@/views/common/Symbols' // import Symbols from '@/views/common/Symbols'
import { getDepartmentTreeList } from '@/api/common' import { getDepartmentTreeList } from '@/api/common'
export default { export default {
name: 'RqDjYsjl', name: 'RqDjYsjl',
components: { SignName, Sticky, jyfa, pictureUpload, SliceUpload, Symbols }, components: { SignName, Sticky, jyfa, pictureUpload },
data() { data() {
return { return {
// //
@ -1201,13 +1201,13 @@ export default {
this.ysjl = data.ysjl this.ysjl = data.ysjl
this.departmentId = this.ysjl.departmentId this.departmentId = this.ysjl.departmentId
this.param = data.param ? data.param : {} this.param = data.param ? data.param : {}
// // //
const tempTime = new Date() // const tempTime = new Date()
this.ysjl.jianyankaishiriqi = tempTime // this.ysjl.jianyankaishiriqi = tempTime
this.ysjl.jianyanjieshuriqi = tempTime // this.ysjl.jianyanjieshuriqi = tempTime
let xcjyrq = (tempTime.getFullYear() + 2) + '-' + (tempTime.getMonth() + 1) + '-' + tempTime.getDate() // let xcjyrq = (tempTime.getFullYear() + 2) + '-' + (tempTime.getMonth() + 1) + '-' + tempTime.getDate()
xcjyrq = new Date(xcjyrq) // xcjyrq = new Date(xcjyrq)
this.ysjl.xiacijianyanriqi = xcjyrq.setDate(xcjyrq.getDate() - 1) // this.ysjl.xiacijianyanriqi = xcjyrq.setDate(xcjyrq.getDate() - 1)
this.ysjl.xiacijianyanriqishuoming = '/' this.ysjl.xiacijianyanriqishuoming = '/'
this.$set(this.ysjl, 'shebeipinzhong', '储存') this.$set(this.ysjl, 'shebeipinzhong', '储存')
this.$set(this.ysjl, 'jianyanjielun', '符合要求') 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 v-if="state !== 'create'" type="warning" icon="el-icon-view" size="medium" @click="common.viewYsjl(ysjl.id, 'YSJL')">
预览 预览
</el-button> </el-button>
<Symbols /> <!-- <Symbols /> -->
</div> </div>
</sticky> </sticky>
<el-tabs v-model="checkedTab" type="card"> <el-tabs v-model="checkedTab" type="card">
@ -117,7 +117,7 @@
</el-col> </el-col>
<el-col :span="9"> <el-col :span="9">
<el-form-item label="下次定期检验日期" prop="xiacijianyanriqi"> <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-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -190,7 +190,7 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="9"> <el-col :span="9">
<el-form-item label="下次年度检查日期" prop="xiaciniandujianchariqi"> <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-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -281,11 +281,11 @@
import Utils from '@/utils/contact.js' // import Utils from '@/utils/contact.js' //
import Sticky from '@/components/Sticky' import Sticky from '@/components/Sticky'
import SignName from '@/views/common/SignName' import SignName from '@/views/common/SignName'
import Symbols from '@/views/common/Symbols' // import Symbols from '@/views/common/Symbols'
import { getDepartmentTreeList } from '@/api/common' import { getDepartmentTreeList } from '@/api/common'
export default { export default {
name: 'RqNdYsjl', name: 'RqNdYsjl',
components: { SignName, Sticky, Symbols }, components: { SignName, Sticky },
data() { data() {
return { return {
edit: false, // edit: false, //
@ -381,8 +381,6 @@ export default {
this.ysjl = data.ysjl this.ysjl = data.ysjl
this.departmentId = this.ysjl.departmentId this.departmentId = this.ysjl.departmentId
this.param = data.param ? data.param : {} this.param = data.param ? data.param : {}
const tempTime = new Date()
this.ysjl.jianyanjieshuriqi = tempTime
this.ysjl.jianyanjielun = '符合要求' this.ysjl.jianyanjielun = '符合要求'
this.param = { this.param = {
wentijizai: '无', wentijizai: '无',

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

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

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

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

23
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 v-show="state !== 'create'" type="warning" icon="el-icon-view" size="medium" @click="common.viewYsjl(ysjl.id, 'YSJL')">
预览 预览
</el-button> </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> </el-button>
<Symbols /> <Symbols /> -->
</div> </div>
</sticky> </sticky>
<el-tabs v-model="checkedTab" type="card"> <el-tabs v-model="checkedTab" type="card">
@ -547,10 +547,10 @@ import Sticky from '@/components/Sticky'
import jyfa from '@/views/ysjl/addJyfa' import jyfa from '@/views/ysjl/addJyfa'
import SignName from '@/views/common/SignName' import SignName from '@/views/common/SignName'
import Utils from '@/utils/contact.js' import Utils from '@/utils/contact.js'
import Symbols from '@/views/common/Symbols' // import Symbols from '@/views/common/Symbols'
export default { export default {
name: 'Ycjl', name: 'Ycjl',
components: { SignName, Sticky, jyfa, Symbols }, components: { SignName, Sticky, jyfa },
props: { props: {
neibuleibieparam: { neibuleibieparam: {
type: String, type: String,
@ -692,10 +692,10 @@ export default {
this.ysjl = data.ysjl this.ysjl = data.ysjl
this.param = (data.param !== null && data.param !== undefined) ? data.param : {} this.param = (data.param !== null && data.param !== undefined) ? data.param : {}
// //
const tempTime = new Date() // const tempTime = new Date()
let xcjyrq = (tempTime.getFullYear() + 2) + '-' + (tempTime.getMonth() + 1) + '-' + tempTime.getDate() // let xcjyrq = (tempTime.getFullYear() + 2) + '-' + (tempTime.getMonth() + 1) + '-' + tempTime.getDate()
xcjyrq = new Date(xcjyrq) // xcjyrq = new Date(xcjyrq)
this.ysjl.xiacijianyanriqi = xcjyrq.setDate(xcjyrq.getDate() - 1) // this.ysjl.xiacijianyanriqi = xcjyrq.setDate(xcjyrq.getDate() - 1)
this.dateFormat() this.dateFormat()
this.ysjl.xiacijianyanriqishuoming = '/' this.ysjl.xiacijianyanriqishuoming = '/'
this.ysjl.bianzhiren = this.$store.getters.userId + '' this.ysjl.bianzhiren = this.$store.getters.userId + ''
@ -944,9 +944,10 @@ export default {
data: { data: {
ysjl: this.ysjl, ysjl: this.ysjl,
param: this.param, param: this.param,
jyxm: jyxm, cyJyxm: {
bgjyxm: jyxm, jyxm: jyxm,
flag: operation bgjyxm: jyxm
}
} }
}).then(data => { }).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 type="success" size="medium" icon="el-icon-edit" @click="batchUpdDate">
批量修改日期 批量修改日期
</el-button> </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> </el-button>
<Symbols /> <Symbols /> -->
</div> </div>
</sticky> </sticky>
<el-tabs v-model="checkedTab" type="card"> <el-tabs v-model="checkedTab" type="card">
@ -402,9 +402,9 @@
</el-row> </el-row>
</el-form> </el-form>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="压力容器原始资料" name="third"> <!-- <el-tab-pane label="压力容器原始资料" name="third"> -->
<SliceUpload :renwu-id="ysjl.renwuId ? Number(ysjl.renwuId) : Number($route.query.renwuId)" :drag="true" /> <!-- <SliceUpload :renwu-id="ysjl.renwuId ? Number(ysjl.renwuId) : Number($route.query.renwuId)" :drag="true" />
</el-tab-pane> </el-tab-pane> -->
</el-tabs> </el-tabs>
<el-dialog :visible.sync="jyxmrqShow" title="批量修改日期" width="500px" @close="closeDialog"> <el-dialog :visible.sync="jyxmrqShow" title="批量修改日期" width="500px" @close="closeDialog">
<template> <template>
@ -456,14 +456,14 @@
import Sticky from '@/components/Sticky' import Sticky from '@/components/Sticky'
import SignName from '@/views/common/SignName' import SignName from '@/views/common/SignName'
import Utils from '@/utils/contact.js' import Utils from '@/utils/contact.js'
import SliceUpload from '@/components/SliceUpload' // import SliceUpload from '@/components/SliceUpload'
import Symbols from '@/views/common/Symbols' // import Symbols from '@/views/common/Symbols'
import jyfa from '@/views/ysjl/addJyfa' import jyfa from '@/views/ysjl/addJyfa'
import { getDepartmentTreeList } from '@/api/common' import { getDepartmentTreeList } from '@/api/common'
export default { export default {
name: 'YcJdYsjl', name: 'YcJdYsjl',
components: { SignName, Sticky, SliceUpload, Symbols, jyfa }, components: { SignName, Sticky, jyfa },
data() { data() {
return { return {
// //

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

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

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

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

Loading…
Cancel
Save