4 changed files with 658 additions and 0 deletions
-
2src/api/part/partInformation.js
-
129src/views/modules/project/projectInfo/com_project_info_part.vue
-
2src/views/modules/sampleManagement/technicalSpecificationList.vue
-
525src/views/modules/todo/todoList.vue
@ -0,0 +1,525 @@ |
|||
<template> |
|||
<div class="mod-config"> |
|||
<el-form :inline="true" label-position="top" :model="searchData"> |
|||
<el-form-item :label="'单据号'"> |
|||
<el-input v-model="searchData.documentNo" clearable style="width: 110px"></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="'流程ID'"> |
|||
<el-input v-model="searchData.workflowId" clearable style="width: 60px"></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="'流程名称'"> |
|||
<el-input v-model="searchData.workflowName" clearable style="width: 150px"></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="'当前节点ID'"> |
|||
<el-input v-model="searchData.nodeId" clearable style="width: 60px"></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="'当前节点名称'"> |
|||
<el-input v-model="searchData.nodeName" clearable style="width: 150px"></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="'流程创建人'"> |
|||
<el-input v-model="searchData.createBy" clearable style="width: 80px"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="单据类型"> |
|||
<el-select v-model="searchData.documentType" clearable style="width: 100px"> |
|||
<el-option label="技术参数卡" value="BM"></el-option> |
|||
<el-option label="ECN" value="ECN"></el-option> |
|||
<el-option label="打样申请" value="PROOFING"></el-option> |
|||
<el-option label="询价申请" value="QUOTATION"></el-option> |
|||
<el-option label="测试申请" value="TEST"></el-option> |
|||
<el-option label="刀具申请" value="TOOL"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item :label="' '"> |
|||
<el-button type="primary" @click="getDataList()">查询</el-button> |
|||
<download-excel |
|||
:fields="fields()" |
|||
:data="exportData" |
|||
type="xls" |
|||
:name="exportName" |
|||
:header="exportHeader" |
|||
:footer="exportFooter" |
|||
:fetch="createExportData" |
|||
:before-generate="startDownload" |
|||
:before-finish="finishDownload" |
|||
worksheet="导出信息" |
|||
class="el-button el-button--primary el-button--medium"> |
|||
{{ "导出" }} |
|||
</download-excel> |
|||
</el-form-item> |
|||
</el-form> |
|||
|
|||
<el-table |
|||
:height="height" |
|||
:data="dataList" |
|||
border |
|||
ref="processTable" |
|||
:row-style="rowStyle" |
|||
@row-click="processClickRow" |
|||
@selection-change="selectionProcess" |
|||
style="width: 100%;"> |
|||
<el-table-column |
|||
type="selection" |
|||
header-align="center" |
|||
align="center" |
|||
width="50"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
v-for="(item,index) in columnList" :key="index" |
|||
:sortable="item.columnSortable" |
|||
:prop="item.columnProp" |
|||
:header-align="item.headerAlign" |
|||
:show-overflow-tooltip="item.showOverflowTooltip" |
|||
:align="item.align" |
|||
:fixed="item.fixed==''?false:item.fixed" |
|||
:min-width="item.columnWidth" |
|||
:label="item.columnLabel"> |
|||
<template slot-scope="scope"> |
|||
<div v-if="item.columnProp === 'displayNo'"> |
|||
<el-link style="cursor:pointer;" v-if="!item.columnHidden" @click="handleClick(scope.row)"> {{ scope.row[item.columnProp] }}</el-link> |
|||
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> |
|||
</div> |
|||
<div v-else> |
|||
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span> |
|||
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
<selectDiv ref="selectDiv"></selectDiv> |
|||
|
|||
<!-- 分页栏 --> |
|||
<el-pagination style="margin-top: 0px" |
|||
@size-change="sizeChangeHandle" |
|||
@current-change="currentChangeHandle" |
|||
:current-page="pageIndex" |
|||
:page-sizes="[20, 50, 100, 200, 500]" |
|||
:page-size="pageSize" |
|||
:total="totalPage" |
|||
layout="total, sizes, prev, pager, next, jumper"> |
|||
</el-pagination> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
|
|||
<script> |
|||
import { |
|||
getProcessFlowInformation, // 流程流转信息 |
|||
processIntervention, // 流程干预 |
|||
} from '@/api/processManagement/processManagement.js' |
|||
import Chooselist from '@/views/modules/common/Chooselist' |
|||
export default { |
|||
components: { |
|||
Chooselist |
|||
}, |
|||
data () { |
|||
return { |
|||
// 导出 |
|||
exportData: [], |
|||
exportName: '制造商' + this.dayjs().format('YYYYMMDDHHmmss'), |
|||
exportHeader: ['制造商'], |
|||
exportFooter: [], |
|||
resultList: [], |
|||
// ======== 行高 ======== |
|||
height: 200, |
|||
// ======== 分页 ======== |
|||
pageIndex: 1, |
|||
pageSize: 50, |
|||
totalPage: 0, |
|||
// 条件查询 |
|||
searchData: { |
|||
site: this.$store.state.user.site, |
|||
workflowId: '', |
|||
workflowName: '', |
|||
nodeId: '', |
|||
nodeName: '', |
|||
documentNo: '', |
|||
documentStatus: '审批中', |
|||
page: 1, |
|||
limit: 10, |
|||
documentType: '', |
|||
updateBy: this.$store.state.user.name, |
|||
userId: this.$store.state.user.id.toString() |
|||
}, |
|||
// ======== 复选数据集 ======== |
|||
processSelections: [], |
|||
// ======== 选中的当前行数据 ======== |
|||
processCurrentRow: {}, |
|||
// ======== 数据列表 ======== |
|||
dataList: [], |
|||
// 展示列集 |
|||
columnList: [ |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 109002, |
|||
serialNumber: '109002Table1DocumentTypeDesc', |
|||
tableId: "109002Table1", |
|||
tableName: "流程流转信息表", |
|||
columnProp: 'documentTypeDesc', |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: '单据类型', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 109002, |
|||
serialNumber: '109002Table1DisplayNo', |
|||
tableId: "109002Table1", |
|||
tableName: "流程流转信息表", |
|||
columnProp: 'displayNo', |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: '单据号', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 120 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 109002, |
|||
serialNumber: '109002Table1RevisionNo', |
|||
tableId: "109002Table1", |
|||
tableName: "流程流转信息表", |
|||
columnProp: 'revisionNo', |
|||
headerAlign: "center", |
|||
align: "right", |
|||
columnLabel: '版本号', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 80 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 109002, |
|||
serialNumber: '109002Table1DocumentStatus', |
|||
tableId: "109002Table1", |
|||
tableName: "流程流转信息表", |
|||
columnProp: 'documentStatus', |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: '单据状态', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 90 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 109002, |
|||
serialNumber: '109002Table1WorkflowId', |
|||
tableId: "109002Table1", |
|||
tableName: "流程流转信息表", |
|||
columnProp: 'workflowId', |
|||
headerAlign: "center", |
|||
align: "right", |
|||
columnLabel: '流程ID', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 80 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 109002, |
|||
serialNumber: '109002Table1WorkflowName', |
|||
tableId: "109002Table1", |
|||
tableName: "流程流转信息表", |
|||
columnProp: 'workflowName', |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: '流程名称', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 200 |
|||
}, |
|||
{ |
|||
functionId: 109002, |
|||
serialNumber: '109002Table1NodeId', |
|||
tableId: '109002Table1', |
|||
tableName: '流程流转信息表', |
|||
columnProp: 'nodeId', |
|||
headerAlign: 'center', |
|||
align: 'right', |
|||
columnLabel: '当前节点ID', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 80 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 109002, |
|||
serialNumber: '109002Table1NodeName', |
|||
tableId: '109002Table1', |
|||
tableName: '流程流转信息表', |
|||
columnProp: 'nodeName', |
|||
headerAlign: 'center', |
|||
align: 'left', |
|||
columnLabel: '当前节点名称', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 200 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 109002, |
|||
serialNumber: '109002Table1RejectFlagDesc', |
|||
tableId: "109002Table1", |
|||
tableName: "流程流转信息表", |
|||
columnProp: 'rejectFlagDesc', |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: '是否被驳回', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 80 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 109002, |
|||
serialNumber: '109002Table1RejectOpinion', |
|||
tableId: "109002Table1", |
|||
tableName: "流程流转信息表", |
|||
columnProp: 'rejectOpinion', |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: '驳回意见', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 200 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 109002, |
|||
serialNumber: '109002Table1CreateBy', |
|||
tableId: "109002Table1", |
|||
tableName: "流程流转信息表", |
|||
columnProp: 'createBy', |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: '流程创建人', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 109002, |
|||
serialNumber: '109002Table1CreateDate', |
|||
tableId: "109002Table1", |
|||
tableName: "流程流转信息表", |
|||
columnProp: 'createDate', |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: '流程创建时间', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 170 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 109002, |
|||
serialNumber: '109002Table1UpdateBy', |
|||
tableId: "109002Table1", |
|||
tableName: "流程流转信息表", |
|||
columnProp: 'updateBy', |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: '当前节点审批人', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
], |
|||
processLoading: false |
|||
} |
|||
}, |
|||
|
|||
mounted () { |
|||
this.$nextTick(() => { |
|||
this.height = window.innerHeight - 170 |
|||
}) |
|||
}, |
|||
|
|||
created () { |
|||
this.getDataList() |
|||
}, |
|||
|
|||
methods: { |
|||
rowStyle ({row}) { |
|||
if (this.processCurrentRow.id === row.id) { |
|||
return { 'background-color': '#E8F7F6', cursor: 'pointer' } |
|||
} |
|||
}, |
|||
|
|||
// 单机选中物料信息 |
|||
processClickRow (row,column) { |
|||
this.processCurrentRow = JSON.parse(JSON.stringify(row)) |
|||
}, |
|||
|
|||
// 复选物料信息 |
|||
selectionProcess (val) { |
|||
this.processSelections = val |
|||
this.$refs.selectDiv.setLengthselected(this.processSelections.length) |
|||
}, |
|||
|
|||
// 每页数 |
|||
sizeChangeHandle (val) { |
|||
this.pageSize = val |
|||
this.pageIndex = 1 |
|||
this.getDataList() |
|||
}, |
|||
|
|||
// 当前页 |
|||
currentChangeHandle (val) { |
|||
this.pageIndex = val |
|||
this.getDataList() |
|||
}, |
|||
|
|||
// 获取数据列表 |
|||
getDataList () { |
|||
this.searchData.limit = this.pageSize |
|||
this.searchData.page = this.pageIndex |
|||
getProcessFlowInformation(this.searchData).then(({data}) => { |
|||
if (data.code === 0) { |
|||
this.dataList = data.page.list |
|||
this.totalPage = data.page.totalCount |
|||
this.$refs.selectDiv.setLengthAll( this.dataList.length) |
|||
// 判断是否全部存在数据 |
|||
if (this.dataList.length > 0) { |
|||
// 设置选中行 |
|||
this.$refs.processTable.setCurrentRow(this.dataList[0]) |
|||
this.processClickRow(this.dataList[0]) |
|||
} else { |
|||
this.processCurrentRow = {} |
|||
} |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
//导出excel |
|||
async createExportData() { |
|||
this.searchData.limit = -1 |
|||
this.searchData.page = 1 |
|||
await getProcessFlowInformation(this.searchData).then(({data}) => { |
|||
this.exportList= data.page.list |
|||
}) |
|||
return this.exportList |
|||
}, |
|||
startDownload() {}, |
|||
finishDownload() {}, |
|||
fields() { |
|||
let json = "{" |
|||
this.columnList.forEach((item, index) => { |
|||
if (index == this.columnList.length - 1) { |
|||
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" |
|||
} else { |
|||
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + "," |
|||
} |
|||
}) |
|||
json += "}" |
|||
let s = eval("(" + json + ")") |
|||
return s |
|||
}, |
|||
handleClick(row){ |
|||
if (row.documentType==='BM') { |
|||
if (this.$router.resolve(`/sampleManagement-technicalSpecificationList`).resolved.name === '404'){ |
|||
this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',}); |
|||
}else { |
|||
this.$router.push({name:`sampleManagement-technicalSpecificationList`,params:{codeNo:row.displayNo?row.displayNo:' '},}) |
|||
} |
|||
} else if (row.documentType==='ECN') { |
|||
if (this.$router.resolve(`/changeManagement-changeRecord`).resolved.name === '404'){ |
|||
this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',}); |
|||
}else { |
|||
this.$router.push({name:`changeManagement-changeRecord`,params:{changeNo:row.displayNo?row.displayNo:' '},}) |
|||
} |
|||
} else if (row.documentType==='PROOFING') { |
|||
if (this.$router.resolve(`/proofing-requestForProofing`).resolved.name === '404'){ |
|||
this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',}); |
|||
}else { |
|||
this.$router.push({name:`proofing-requestForProofing`,params:{proofingNo:row.displayNo?row.displayNo:' '},}) |
|||
} |
|||
} else if (row.documentType==='QUOTATION') { |
|||
if (this.$router.resolve(`/quotation-requestForQuote`).resolved.name === '404'){ |
|||
this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',}); |
|||
}else { |
|||
this.$router.push({name:`quotation-requestForQuote`,params:{quotationBatchNo:row.displayNo?row.displayNo:' '},}) |
|||
} |
|||
} else if (row.documentType==='TEST') { |
|||
if (this.$router.resolve(`/test-requestForTest`).resolved.name === '404'){ |
|||
this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',}); |
|||
}else { |
|||
this.$router.push({name:`test-requestForTest`,params:{testNo:row.displayNo?row.displayNo:' '},}) |
|||
} |
|||
} else if (row.documentType==='TOOL') { |
|||
if (this.$router.resolve(`/tooling-toolingInfo`).resolved.name === '404'){ |
|||
this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',}); |
|||
}else { |
|||
this.$router.push({name:`tooling-toolingInfo`,params:{toolNo:row.displayNo?row.displayNo:' '},}) |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped lang="scss"> |
|||
/deep/ .customer-tab .el-tabs__content { |
|||
padding: 0px !important; |
|||
height: 459px; |
|||
} |
|||
</style> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue