Browse Source

优化

master
常熟吴彦祖 4 weeks ago
parent
commit
8d6b329183
  1. 14
      src/views/modules/srmPart/com_part_Approval.vue
  2. 43
      src/views/modules/srmPart/partApprovalList.vue
  3. 31
      src/views/modules/srmPart/partInfoList.vue

14
src/views/modules/srmPart/com_part_Approval.vue

@ -21,11 +21,11 @@
style="width: 100%;">
<!-- <el-table-column prop="nodeOrder" label="序号" width="60" header-align="center" align="center"></el-table-column>
<el-table-column prop="nodeName" label="节点名称" min-width="100" header-align="center" align="center"></el-table-column> -->
<el-table-column prop="departmentName" label="审批部门" min-width="100" header-align="center" align="center">
<template slot-scope="scope">{{ scope.row.departmentName || '-' }}</template>
</el-table-column>
<!-- <el-table-column prop="departmentName" label="审批部门" min-width="100" header-align="center" align="center">-->
<!-- <template slot-scope="scope">{{ scope.row.departmentName || '-' }}</template>-->
<!-- </el-table-column>-->
<el-table-column prop="assigneeName" label="要求审批人" min-width="80" header-align="center" align="center"></el-table-column>
<!-- <el-table-column prop="attemptNo" label="次数" width="60" header-align="center" align="center"></el-table-column>
<el-table-column prop="approveType" label="审批类型" min-width="100" header-align="center" align="center">
<template slot-scope="scope">
@ -40,21 +40,21 @@
<span :style="{ color: getNodeStatusColor(scope.row.status) }">{{ getNodeStatusText(scope.row.status) }}</span>
</template>
</el-table-column>
<el-table-column prop="specialRelease" label="是否特别放行" min-width="80" header-align="center" align="center"></el-table-column>
<el-table-column prop="completeTime" label="审批时间" min-width="150" header-align="center" align="center">
<template slot-scope="scope">{{ scope.row.completeTime || '-' }}</template>
</el-table-column>
<!-- <el-table-column prop="approveName" label="实际审批人" min-width="80" header-align="center" align="center"></el-table-column> -->
<el-table-column prop="comment" label="备注" min-width="150" header-align="center" align="left" show-overflow-tooltip></el-table-column>
<!-- <el-table-column fixed="right" header-align="center" align="center" width="100" label="操作">
<template slot-scope="scope">
<a type="text" size="small" @click="openApproveDialog(scope.row)">审批</a>
</template>
</el-table-column> -->
</el-table>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
</template>

43
src/views/modules/srmPart/partApprovalList.vue

@ -89,7 +89,7 @@
<template slot-scope="scope">
<el-link style="cursor: pointer" v-if="scope.row.flowStatus === 'COMPLETED' || scope.row.flowStatus === 'TERMINATED'" @click="handleRestart(scope.row)">重新审批</el-link>
<el-link style="cursor: pointer" v-if="scope.row.flowStatus === 'RUNNING'" @click="openApproveDialog(scope.row)">审批</el-link>
</template>
</el-table-column>
</el-table>
@ -158,7 +158,7 @@
</el-row> -->
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="是否特放行">
<el-form-item label="是否特放行">
<el-select v-model="approveData.specialRelease" style="width: 100%">
<el-option label="否" value="N"></el-option>
<el-option label="是" value="Y"></el-option>
@ -498,7 +498,7 @@ export default {
// }
],
exportName: '产品信息' + this.dayjs().format('YYYYMMDDHHmmss')
}
},
/* 组件 */
@ -520,7 +520,7 @@ export default {
this.height = (window.innerHeight - 280) / 2
})
},
methods: {
getBaseList (val, type) {
@ -539,9 +539,9 @@ export default {
// if (this.tagNo === 1100) {
// this.searchData.partNo = val.part_no
// }
},
getMainData () {
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
@ -563,11 +563,11 @@ export default {
this.dataListLoading = false
})
},
tabClick (tab, event) {
this.refreshCurrentTabTable()
},
//
sizeChangeHandle (val) {
this.pageSize = val
@ -580,12 +580,12 @@ export default {
this.pageIndex = val
this.getMainData()
},
changeData (row) {
this.currentRow = JSON.parse(JSON.stringify(row))
this.refreshCurrentTabTable()
},
refreshCurrentTabTable () {
if (this.currentRow === '' || this.currentRow === null) {
this.currentRow = {site: '', partNo: ''}
@ -606,7 +606,7 @@ export default {
this.refreshAttachments()
}
},
async exportExcel () {
this.searchData.limit = -1
this.searchData.page = 1
@ -621,7 +621,7 @@ export default {
dropColumns: []
})
},
refreshBasicInfo () {
let inData = {
site: this.currentRow.site,
@ -631,7 +631,7 @@ export default {
}
this.$refs.basicInfo.init(inData)
},
refreshSpecParams () {
let inData = {
site: this.currentRow.site,
@ -642,7 +642,7 @@ export default {
}
this.$refs.specParams.init(inData)
},
refreshSuppliers () {
let inData = {
site: this.currentRow.site,
@ -651,7 +651,7 @@ export default {
}
this.$refs.suppliers.init(inData)
},
refreshApproval () {
let inData = {
site: this.currentRow.site,
@ -661,7 +661,7 @@ export default {
}
this.$refs.approval.init(inData)
},
refreshAttachments () {
let inData = {
orderRef1: this.currentRow.site,
@ -671,8 +671,8 @@ export default {
}
this.$refs.attachments.init(inData)
},
//
openApproveDialog(row) {
this.approveData = {
@ -682,8 +682,9 @@ export default {
flowCode: row.flowCode,
flowVersion: row.flowVersion,
nodeCode: row.nodeCode,
specialRelease :'N',
comment: ''
}
this.approveDialogVisible = true
},
@ -737,7 +738,7 @@ export default {
})
}).catch(() => {})
}
}
}
@ -860,4 +861,4 @@ export default {
height: 28px;
}
}
</style>
</style>

31
src/views/modules/srmPart/partInfoList.vue

@ -42,7 +42,11 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
<span v-if="!item.columnHidden">{{
item.columnProp === 'partStage'
? formatPartStageDesc(scope.row.partStage)
: scope.row[item.columnProp]
}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 100px"/></span>
</template>
@ -457,6 +461,24 @@ export default {
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: 'partTablePartStage',
tableId: 'partTable',
tableName: '产品信息',
columnProp: 'partStage',
headerAlign: 'center',
align: 'center',
columnLabel: '物料阶段',
columnWidth: '100',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: this.functionId,
@ -625,6 +647,9 @@ export default {
methods: {
formatPartStageDesc (partStage) {
return partStage === 'Approved' ? '正式物料' : '新增物料'
},
getBaseList (val, type) {
this.tagNo = val
this.$nextTick(() => {
@ -769,7 +794,9 @@ export default {
params: this.searchData,
fileName: this.exportName + '.xlsx',
rowFetcher: res => res.data,
columnFormatter: [],
columnFormatter: [
{ columnProp: 'partStage', formatter: (val) => this.formatPartStageDesc(val) }
],
dropColumns: []
})
},

Loading…
Cancel
Save