Compare commits
2 Commits
ee6c8516f4
...
15136ab8f5
Author | SHA1 | Date |
---|---|---|
李磊 | 15136ab8f5 | 3 years ago |
李磊 | d6bc5a34a7 | 3 years ago |
107 changed files with 542 additions and 3655 deletions
File diff suppressed because it is too large
@ -1,17 +1,11 @@ |
|||
<template> |
|||
<boiler-db-list v-if="ifBoiler" /> |
|||
<original-db-list v-else /> |
|||
<original-db-list /> |
|||
</template> |
|||
<script> |
|||
import originalDbList from './components/original_db_list' |
|||
import boilerDbList from './components/boiler_db_list' |
|||
|
|||
export default { |
|||
name: 'TODOReport', |
|||
components: { originalDbList, boilerDbList }, |
|||
data() { |
|||
return { |
|||
ifBoiler: this.$store.getters.departmentId === 75 |
|||
} |
|||
} |
|||
components: { originalDbList } |
|||
} |
|||
</script> |
|||
|
@ -1,368 +0,0 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div class="filter-container"> |
|||
<sticky style="margin-bottom: 10px;"> |
|||
<div class="sub-navbar"> |
|||
<el-button type="danger" icon="el-icon-delete" @click="delYsjl"> |
|||
删除记录 |
|||
</el-button> |
|||
</div> |
|||
</sticky> |
|||
<el-form> |
|||
<el-form-item> |
|||
<el-input v-model="listQuery.searchYsjl.jilubianhao" placeholder="记录编号" clearable style="width: 200px" @keyup.enter.native="handleFilter" /> |
|||
<el-input v-model="listQuery.searchYsjl.shigongdanwei" placeholder="安装单位" clearable style="width: 400px" @keyup.enter.native="handleFilter" /> |
|||
<el-button size="small" type="primary" icon="el-icon-search" @click="handleFilter"> |
|||
查询 |
|||
</el-button> |
|||
<el-button size="small" type="info" icon="el-icon-close" @click="clearQuery"> |
|||
清空条件 |
|||
</el-button> |
|||
<br> |
|||
<el-input v-model="listQuery.searchYsjl.zhizaodanwei" placeholder="制造单位" clearable style="width: 400px" @keyup.enter.native="handleFilter" /> |
|||
<el-input v-model="listQuery.searchYsjl.chanpinbianhao" placeholder="出厂编号" clearable style="width: 240px" @keyup.enter.native="handleFilter" /> |
|||
<span class="radio-group-label">编辑类型:</span> |
|||
<el-radio-group v-model="listQuery.searchYsjl.createBy" @change="handleFilter"> |
|||
<el-radio :label="$store.getters.userId"> |
|||
只看创建人 |
|||
</el-radio> |
|||
<el-radio :label="undefined"> |
|||
全部 |
|||
</el-radio> |
|||
</el-radio-group> |
|||
</el-form-item> |
|||
</el-form> |
|||
</div> |
|||
<el-table |
|||
ref="list" |
|||
v-adaptive="{bottomOffset: 50}" |
|||
height="0" |
|||
:data="list" |
|||
:default-sort="{prop:'jilubianhao', order:'descending'}" |
|||
:row-class-name="tableRowClassName" |
|||
element-loading-text="拼命加载中" |
|||
border |
|||
fit |
|||
highlight-current-row |
|||
stripe |
|||
width="100%" |
|||
size="small" |
|||
@row-click="onRowClick" |
|||
@selection-change="handleSelectionChange" |
|||
@sort-change="sortChange" |
|||
> |
|||
<el-table-column type="selection" width="40" /> |
|||
<el-table-column fixed="left" align="center" label="序号" width="60"> |
|||
<template slot-scope="scope"> |
|||
<span v-text="getIndex(scope.$index)" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column align="center" label="记录编号" prop="jilubianhao" width="180" sortable="custom" /> |
|||
<el-table-column :formatter="formatter.formatterCategory" align="center" label="检验类别" prop="neibuleibie" width="100" /> |
|||
<el-table-column align="center" label="安装单位" prop="shigongdanwei" width="240" /> |
|||
<el-table-column align="center" label="产品编号/出厂编号" prop="chanpinbianhao" width="220" /> |
|||
<el-table-column align="center" label="制造单位" prop="zhizaodanwei" width="240" /> |
|||
<el-table-column :formatter="formatter.getChineseName" align="center" label="检验人员" prop="jianyanrenyuan" width="140" /> |
|||
<el-table-column align="center" label="设备代码" prop="shebeidaima" width="140" /> |
|||
<el-table-column fixed="right" align="center" label="操作" prop="" width="200"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="primary" size="mini" circle icon="el-icon-edit" title="编辑" @click="editYsjl(scope.$index)" /> |
|||
<el-button type="success" size="mini" circle icon="el-icon-view" title="预览" @click="common.viewYsjl(scope.row.id, 'JYBG')" /> |
|||
<el-button size="mini" type="info" icon="el-icon-message" title="查看驳回意见" circle @click="viewAllRejection(list[scope.$index].id)" /> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<pagination v-show="totalCount>0" :total="totalCount" :page-num.sync="listQuery.pageNum" :page-row.sync="listQuery.pageRow" style="float: left;" @pagination="getList" /> |
|||
<div style="float: right;margin-top:8px;"> |
|||
<div style="width: 80px;float:left;margin-left: 50px;"> |
|||
重启流程: |
|||
</div> |
|||
<div class="identification" style="background-color:red;" /> |
|||
<div style="width: 50px;float:left;margin-left: 20px;"> |
|||
驳回: |
|||
</div> |
|||
<div class="identification" style="background-color: orange;" /> |
|||
<div style="width: 50px;float:left;margin-left: 20px;"> |
|||
复制: |
|||
</div> |
|||
<div class="identification" style="background-color:#690cff;" /> |
|||
</div> |
|||
|
|||
<!-- 驳回意见 --> |
|||
<el-dialog :visible.sync="dialogBohuiyijianVisible" title="驳回意见" width="50%"> |
|||
<el-table :data="infoNotes"> |
|||
<el-table-column align="center" label="驳回人" prop="infoSend" /> |
|||
<el-table-column align="center" label="驳回意见" prop="infoNotes" /> |
|||
<el-table-column align="center" label="驳回时间" prop="createTime" /> |
|||
</el-table> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import Sticky from '@/components/Sticky' |
|||
import Pagination from '@/components/Pagination' |
|||
import { getNeedRecordList } from '@/api/ysjl' |
|||
import Utils from '@/utils/contact' |
|||
export default { |
|||
components: { Sticky, Pagination }, |
|||
data() { |
|||
return { |
|||
totalCount: 0, |
|||
list: [], |
|||
listQuery: { |
|||
pageNum: 1, // 页码 |
|||
pageRow: 20, // 每页条数 |
|||
order: undefined, // 排序字段 |
|||
sort: undefined, // 排序方式 |
|||
searchYsjl: { |
|||
createBy: this.$store.getters.userId |
|||
}, |
|||
hasChild: true |
|||
}, |
|||
multipleSelection: [], |
|||
ysjlId: '', |
|||
sbzlList: [], |
|||
sblbList: [], |
|||
sbpzList: [], |
|||
modelList: [], |
|||
sbzldm: '', |
|||
sblbdm: '', |
|||
sbpzdm: '', |
|||
modelId: '', |
|||
isQm: true, |
|||
infoNotes: '', |
|||
dialogBohuiyijianVisible: false |
|||
} |
|||
}, |
|||
created() { |
|||
this.getList() |
|||
}, |
|||
mounted() { |
|||
const that = this |
|||
this.common.$on('ysjl-list', function() { |
|||
that.handleFilter() |
|||
}) |
|||
}, |
|||
methods: { |
|||
getList() { |
|||
this.listQuery.searchYsjl.cjState = 'ysjl' |
|||
getNeedRecordList(this.listQuery).then(data => { |
|||
this.list = data.list |
|||
this.totalCount = data.totalCount |
|||
this.common.switchInspection(this.list) |
|||
}) |
|||
}, |
|||
sortChange(column) { |
|||
this.listQuery.order = column.prop |
|||
this.listQuery.sort = column.order.replace('ending', '') |
|||
this.getList() |
|||
}, |
|||
getIndex($index) { |
|||
// 表格序号 |
|||
return (this.listQuery.pageNum - 1) * this.listQuery.pageRow + $index + 1 |
|||
}, |
|||
handleFilter() { |
|||
// 查询事件 |
|||
this.listQuery.pageNum = 1 |
|||
this.getList() |
|||
}, |
|||
onRowClick(row) { |
|||
this.$refs.list.toggleRowSelection(row) |
|||
}, |
|||
handleSelectionChange: function(val) { |
|||
this.multipleSelection = val |
|||
}, |
|||
delYsjl() { |
|||
for (let i = 0; i < this.multipleSelection.length; i++) { |
|||
if (this.multipleSelection[i].bglx !== 1) { |
|||
this.$message({ |
|||
message: '请选择主原始记录进行删除!', |
|||
type: 'warning' |
|||
}) |
|||
return false |
|||
} |
|||
} |
|||
this.ysjlId = '' |
|||
let oldRwIds = '' // 16版任务主键 |
|||
let newRwIds = '' // 18版任务主键 |
|||
for (let i = 0; i < this.multipleSelection.length; i++) { |
|||
this.ysjlId = this.multipleSelection[i].id + ',' + this.ysjlId |
|||
// 锅炉需要修改16版任务状态 |
|||
if (this.multipleSelection[i].shebeizhongleidaima === '1000') { |
|||
if (this.multipleSelection[i].source === 'pad') { |
|||
oldRwIds += this.multipleSelection[i].renwuId + ',' |
|||
} else { |
|||
newRwIds += this.multipleSelection[i].renwuId + ',' |
|||
} |
|||
} |
|||
if (i + 1 === this.multipleSelection.length) { |
|||
this.ysjlId = this.ysjlId.substring(0, this.ysjlId.length - 1) |
|||
} |
|||
} |
|||
// 查询是否有无损原始记录生成报告 |
|||
this.api({ |
|||
url: '/ysjl/judgeState', |
|||
method: 'get', |
|||
params: { |
|||
ysjlIds: this.ysjlId, |
|||
bglx: '2', |
|||
isDel: true |
|||
} |
|||
}).then(data => { |
|||
if (data === 0) { |
|||
this.$confirm('已有无损原始记录生成报告, 是否继续?', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
this.del(this.ysjlId, oldRwIds, newRwIds) |
|||
}).catch(() => { |
|||
this.$message({ |
|||
type: 'info', |
|||
message: '已取消删除' |
|||
}) |
|||
return false |
|||
}) |
|||
} else { |
|||
this.$confirm('确定删除当前选中记录?', '提示', { |
|||
confirmButtonText: '确定', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
this.del(this.ysjlId, oldRwIds, newRwIds) |
|||
}).catch(() => { |
|||
this.$message({ |
|||
type: 'info', |
|||
message: '已取消删除' |
|||
}) |
|||
return false |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
del(ids, oldRwIds, newRwIds) { |
|||
this.api({ |
|||
url: '/ysjl', |
|||
method: 'delete', |
|||
params: { |
|||
ids: ids |
|||
} |
|||
}).then(() => { |
|||
this.$message({ |
|||
message: '删除成功', |
|||
type: 'success', |
|||
duration: 1000, |
|||
onClose: () => { |
|||
this.getList() |
|||
Utils.$emit('task-list') |
|||
} |
|||
}) |
|||
}) |
|||
}, |
|||
editYsjl($index) { |
|||
const ysjl = this.list[$index] |
|||
this.api({ |
|||
url: '/template/getById', |
|||
method: 'get', |
|||
params: { |
|||
id: ysjl.modelId |
|||
} |
|||
}).then(data => { |
|||
const queryParam = this.common.buildEditYsjlRouterParam(ysjl) |
|||
if (ysjl.bglx === 1) { |
|||
this.$router.push({ path: data.tempPath + '/' + ysjl.id, query: queryParam }) |
|||
} else { |
|||
this.$router.push({ path: data.tempPath, query: queryParam }) |
|||
} |
|||
}) |
|||
}, |
|||
clearQuery() { |
|||
this.$set(this.listQuery, 'searchYsjl', { |
|||
bglx: 1, |
|||
createBy: this.$store.getters.userId |
|||
}) |
|||
this.getList() |
|||
}, |
|||
tableRowClassName({ row, rowIndex }) { |
|||
if (row.retreatState === 1) { |
|||
return 'reject-row' |
|||
} else if (row.retreatState === 2) { |
|||
return 'restart-row' |
|||
} else if (row.copyState === true) { |
|||
return 'copy-row' |
|||
} |
|||
return '' |
|||
}, |
|||
closeDialog() { |
|||
this.isQm = true |
|||
}, |
|||
getModelList(val) { |
|||
let tempJylb = '' |
|||
let category = '' |
|||
let nbleibie = '' |
|||
if (val === '7310') { |
|||
tempJylb = 'DJ' |
|||
category = 'YSJL' |
|||
nbleibie = 'DQ' |
|||
} |
|||
this.api({ |
|||
url: '/template/getTemplateBySbpz', |
|||
method: 'get', |
|||
params: { |
|||
sbpz: val, |
|||
jianyanleibie: tempJylb, |
|||
category: category, |
|||
neibuleibie: nbleibie |
|||
} |
|||
}).then(data => { |
|||
this.modelList = data |
|||
this.modelId = data[0].value |
|||
}) |
|||
}, |
|||
/** |
|||
* 根据报告ID查看驳回原因 |
|||
* @param ysjlId |
|||
*/ |
|||
viewAllRejection(ysjlId) { |
|||
this.api({ |
|||
url: '/taskinfo/viewAllRejection', |
|||
method: 'get', |
|||
params: { |
|||
ysjlId: ysjlId |
|||
} |
|||
}).then(data => { |
|||
this.infoNotes = data |
|||
if (!this.infoNotes.length) { |
|||
this.$alert('暂无驳回意见!', '驳回意见', { |
|||
confirmButtonText: '关闭' |
|||
}) |
|||
} else { |
|||
this.dialogBohuiyijianVisible = true |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style> |
|||
.el-table .reject-row { |
|||
color: orange; |
|||
} |
|||
.el-table .restart-row { |
|||
color: red; |
|||
} |
|||
.el-table .copy-row { |
|||
color: #690cff; |
|||
} |
|||
.identification{ |
|||
width: 30px; |
|||
height:15px; |
|||
display: inline-block; |
|||
border:gray 1px solid; |
|||
border-radius:15px; |
|||
float: left; |
|||
} |
|||
button.el-button.el-button--mini.is-circle{ |
|||
margin: 1px; |
|||
} |
|||
</style> |
@ -1,149 +0,0 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div class="filter-container"> |
|||
<el-form> |
|||
<el-form-item> |
|||
<el-input v-model="listQuery.jilubianhao" placeholder="记录编号" clearable style="width: 200px" @keyup.enter.native="handleFilter" /> |
|||
<el-input v-model="listQuery.shigongdanwei" placeholder="安装单位" clearable style="width: 400px" @keyup.enter.native="handleFilter" /> |
|||
<el-button size="small" type="primary" icon="el-icon-search" @click="handleFilter"> |
|||
查询 |
|||
</el-button> |
|||
<el-button size="small" type="info" icon="el-icon-close" @click="clearQuery"> |
|||
清空条件 |
|||
</el-button> |
|||
<br> |
|||
<el-input v-model="listQuery.zhizaodanwei" placeholder="制造单位" clearable style="width: 400px" @keyup.enter.native="handleFilter" /> |
|||
<el-input v-model="listQuery.chanpinbianhao" placeholder="出厂编号" clearable style="width: 200px" @keyup.enter.native="handleFilter" /> |
|||
<span class="radio-group-label">编辑类型:</span> |
|||
<el-radio-group v-model="listQuery.createBy" @change="handleFilter"> |
|||
<el-radio :label="$store.getters.userId"> |
|||
只看创建人 |
|||
</el-radio> |
|||
<el-radio :label="undefined"> |
|||
全部 |
|||
</el-radio> |
|||
</el-radio-group> |
|||
</el-form-item> |
|||
</el-form> |
|||
</div> |
|||
<el-table |
|||
ref="list" |
|||
v-adaptive="{bottomOffset: 50}" |
|||
height="0" |
|||
:data="list" |
|||
:default-sort="{prop:'jilubianhao', order:'descending'}" |
|||
element-loading-text="拼命加载中" |
|||
border |
|||
fit |
|||
highlight-current-row |
|||
stripe |
|||
width="100%" |
|||
size="small" |
|||
@row-click="onRowClick" |
|||
@selection-change="handleSelectionChange" |
|||
@sort-change="sortChange" |
|||
> |
|||
<el-table-column type="selection" width="40" /> |
|||
<el-table-column fixed="left" align="center" label="序号" width="60"> |
|||
<template slot-scope="scope"> |
|||
<span v-text="getIndex(scope.$index)" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column align="center" label="记录编号" prop="jilubianhao" width="180" sortable="custom" /> |
|||
<el-table-column :formatter="formatter.formatterCategory" align="center" label="检验类别" prop="neibuleibie" width="100" /> |
|||
<el-table-column align="center" label="安装单位" prop="shigongdanwei" width="240" /> |
|||
<el-table-column align="center" label="产品编号/出厂编号" prop="chanpinbianhao" width="220" /> |
|||
<el-table-column align="center" label="制造单位" prop="zhizaodanwei" width="240" /> |
|||
<el-table-column :formatter="formatter.getChineseName" align="center" label="检验人员" prop="jianyanrenyuan" width="140" /> |
|||
<el-table-column align="center" label="设备代码" prop="shebeidaima" width="140" /> |
|||
<el-table-column align="center" label="操作" prop="" width="120"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="primary" size="mini" circle icon="el-icon-view" title="预览 原始记录" @click="common.viewYsjl(scope.row.id, 'JYBG')" /> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<pagination v-show="totalCount>0" :total="totalCount" :page-num.sync="listQuery.pageNum" :page-row.sync="listQuery.pageRow" style="float: left;" @pagination="getList" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import Pagination from '@/components/Pagination' |
|||
export default { |
|||
components: { Pagination }, |
|||
data() { |
|||
return { |
|||
totalCount: 0, |
|||
list: [], |
|||
listQuery: { |
|||
pageNum: 1, // 页码 |
|||
pageRow: 20, // 每页条数 |
|||
order: undefined, // 排序字段 |
|||
sort: undefined, // 排序方式 |
|||
createBy: this.$store.getters.userId, |
|||
hasChild: true, |
|||
link: 2 |
|||
}, |
|||
multipleSelection: [], |
|||
bglxOptions: [{ |
|||
value: '1', |
|||
label: '主报告' |
|||
}, { |
|||
value: '2', |
|||
label: '无损报告' |
|||
}] |
|||
} |
|||
}, |
|||
created() { |
|||
this.getList() |
|||
}, |
|||
mounted() { |
|||
const that = this |
|||
this.common.$on('ysjl-yb-list', function() { |
|||
that.handleFilter() |
|||
}) |
|||
}, |
|||
methods: { |
|||
getList() { |
|||
this.listQuery.cjState = 'bggl' |
|||
this.api({ |
|||
url: '/ysjl/getList', |
|||
method: 'get', |
|||
params: this.listQuery |
|||
}).then(data => { |
|||
this.list = data.list |
|||
this.totalCount = data.totalCount |
|||
this.common.switchInspection(this.list) |
|||
}) |
|||
}, |
|||
sortChange(column) { |
|||
this.listQuery.order = column.prop |
|||
this.listQuery.sort = column.order.replace('ending', '') |
|||
this.getList() |
|||
}, |
|||
getIndex($index) { |
|||
// 表格序号 |
|||
return (this.listQuery.pageNum - 1) * this.listQuery.pageRow + $index + 1 |
|||
}, |
|||
handleFilter() { |
|||
// 查询事件 |
|||
this.listQuery.pageNum = 1 |
|||
this.getList() |
|||
}, |
|||
onRowClick(row) { |
|||
this.$refs.list.toggleRowSelection(row) |
|||
}, |
|||
handleSelectionChange: function(val) { |
|||
this.multipleSelection = val |
|||
}, |
|||
clearQuery() { |
|||
this.listQuery = { |
|||
order: undefined, // 排序字段 |
|||
sort: undefined, // 排序方式 |
|||
createBy: this.$store.getters.userId, |
|||
hasChild: true |
|||
} |
|||
this.getList() |
|||
} |
|||
} |
|||
} |
|||
</script> |
File diff suppressed because it is too large
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue