Browse Source

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/views/modules/srmPart/partApprovalList.vue
#	src/views/modules/srmPart/partInfoList.vue
master
qiankanghui 4 weeks ago
parent
commit
1bbece9e15
  1. 14
      src/views/modules/srmPart/com_part_Approval.vue
  2. 11
      src/views/modules/srmPart/partApprovalList.vue
  3. 95
      src/views/modules/srmPart/partInfoList.vue

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

@ -21,11 +21,11 @@
style="width: 100%;"> style="width: 100%;">
<!-- <el-table-column prop="nodeOrder" label="序号" width="60" header-align="center" align="center"></el-table-column> <!-- <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="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="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="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"> <el-table-column prop="approveType" label="审批类型" min-width="100" header-align="center" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
@ -40,21 +40,21 @@
<span :style="{ color: getNodeStatusColor(scope.row.status) }">{{ getNodeStatusText(scope.row.status) }}</span> <span :style="{ color: getNodeStatusColor(scope.row.status) }">{{ getNodeStatusText(scope.row.status) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="specialRelease" label="是否特别放行" min-width="80" header-align="center" align="center"></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"> <el-table-column prop="completeTime" label="审批时间" min-width="150" header-align="center" align="center">
<template slot-scope="scope">{{ scope.row.completeTime || '-' }}</template> <template slot-scope="scope">{{ scope.row.completeTime || '-' }}</template>
</el-table-column> </el-table-column>
<!-- <el-table-column prop="approveName" label="实际审批人" min-width="80" header-align="center" align="center"></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 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="操作"> <!-- <el-table-column fixed="right" header-align="center" align="center" width="100" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<a type="text" size="small" @click="openApproveDialog(scope.row)">审批</a> <a type="text" size="small" @click="openApproveDialog(scope.row)">审批</a>
</template> </template>
</el-table-column> --> </el-table-column> -->
</el-table> </el-table>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div> </div>
</template> </template>

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

@ -74,11 +74,7 @@
:min-width="item.columnWidth" :min-width="item.columnWidth"
:label="item.columnLabel"> :label="item.columnLabel">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="!item.columnHidden">{{
item.columnProp === 'status'
? (scope.row.status === 'Y' ? '在用' : scope.row.status === 'N' ? '禁用' : scope.row.status)
: scope.row[item.columnProp]
}}</span>
<span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 100px"/></span> style="width: 100px; height: 100px"/></span>
</template> </template>
@ -161,7 +157,7 @@
</el-col> </el-col>
</el-row> --> </el-row> -->
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="6">
<el-col :span="12">
<el-form-item label="是否特殊放行"> <el-form-item label="是否特殊放行">
<el-select v-model="approveData.specialRelease" style="width: 100%"> <el-select v-model="approveData.specialRelease" style="width: 100%">
<el-option label="否" value="N"></el-option> <el-option label="否" value="N"></el-option>
@ -401,7 +397,7 @@ export default {
columnProp: 'status', columnProp: 'status',
headerAlign: 'center', headerAlign: 'center',
align: 'center', align: 'center',
columnLabel: '是否在用',
columnLabel: '状态',
columnWidth: '80', columnWidth: '80',
columnHidden: false, columnHidden: false,
columnImage: false, columnImage: false,
@ -686,7 +682,6 @@ export default {
flowCode: row.flowCode, flowCode: row.flowCode,
flowVersion: row.flowVersion, flowVersion: row.flowVersion,
nodeCode: row.nodeCode, nodeCode: row.nodeCode,
specialRelease: 'N',
comment: '' comment: ''
} }

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

@ -43,8 +43,8 @@
:label="item.columnLabel"> :label="item.columnLabel">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="!item.columnHidden">{{ <span v-if="!item.columnHidden">{{
item.columnProp === 'status'
? (scope.row.status === 'Y' ? '在用' : scope.row.status === 'N' ? '禁用' : scope.row.status)
item.columnProp === 'partStage'
? formatPartStageDesc(scope.row.partStage)
: scope.row[item.columnProp] : scope.row[item.columnProp]
}}</span> }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
@ -141,7 +141,7 @@
<el-form-item label="产品规格" prop="partSpec"> <el-form-item label="产品规格" prop="partSpec">
<el-input v-model="currentpart.partSpec"></el-input> <el-input v-model="currentpart.partSpec"></el-input>
</el-form-item> </el-form-item>
</el-col>
</el-col>
</el-row> </el-row>
</div> </div>
@ -166,10 +166,10 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="是否在用">
<el-form-item label="状态">
<el-select v-model="currentpart.status" placeholder="请选择" > <el-select v-model="currentpart.status" placeholder="请选择" >
<el-option label="在用" value="Y"></el-option>
<el-option label="禁用" value="N"></el-option>
<el-option label="启用" value="N"></el-option>
<el-option label="停用" value="Y"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -461,6 +461,24 @@ export default {
status: true, status: true,
fixed: false 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, userId: this.$store.state.user.name,
functionId: this.functionId, functionId: this.functionId,
@ -470,7 +488,7 @@ export default {
columnProp: 'status', columnProp: 'status',
headerAlign: 'center', headerAlign: 'center',
align: 'center', align: 'center',
columnLabel: '是否在用',
columnLabel: '状态',
columnWidth: '80', columnWidth: '80',
columnHidden: false, columnHidden: false,
columnImage: false, columnImage: false,
@ -583,7 +601,7 @@ export default {
sourcingName: '', sourcingName: '',
category: '', category: '',
unit: '', unit: '',
status: 'Y',
status: 'N',
codeNo: '', codeNo: '',
createBy: '', createBy: '',
remark: '', remark: '',
@ -602,8 +620,8 @@ export default {
partSpec: [ partSpec: [
{ required: true, message: ' ', trigger: 'blur' } { required: true, message: ' ', trigger: 'blur' }
] ]
} }
} }
}, },
@ -626,9 +644,12 @@ export default {
this.height = (window.innerHeight - 280) / 2 this.height = (window.innerHeight - 280) / 2
}) })
}, },
methods: { methods: {
formatPartStageDesc (partStage) {
return partStage === 'Approved' ? '正式物料' : '新增物料'
},
getBaseList (val, type) { getBaseList (val, type) {
this.tagNo = val this.tagNo = val
this.$nextTick(() => { this.$nextTick(() => {
@ -649,7 +670,7 @@ export default {
if (val === 528) { if (val === 528) {
strVal = this.currentpart.sourcingName strVal = this.currentpart.sourcingName
} }
if (val === 527) { if (val === 527) {
strVal = this.currentpart.codeNo strVal = this.currentpart.codeNo
} }
@ -676,12 +697,12 @@ export default {
if (this.tagNo === 528) { if (this.tagNo === 528) {
this.currentpart.sourcingName = val.UserName this.currentpart.sourcingName = val.UserName
} }
if (this.tagNo === 527) { if (this.tagNo === 527) {
this.currentpart.codeNo = val.code_no this.currentpart.codeNo = val.code_no
} }
}, },
getMainData () { getMainData () {
this.searchData.limit = this.pageSize this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex this.searchData.page = this.pageIndex
@ -693,16 +714,16 @@ export default {
if (item.flowNodeInstanceData) { if (item.flowNodeInstanceData) {
item.departmentName = item.flowNodeInstanceData.departmentName; item.departmentName = item.flowNodeInstanceData.departmentName;
item.assigneeName = item.flowNodeInstanceData.assigneeName; item.assigneeName = item.flowNodeInstanceData.assigneeName;
} else { } else {
item.departmentName = ''; item.departmentName = '';
item.assigneeName = ''; item.assigneeName = '';
} }
return item; return item;
}); });
// this.mainDataList = data.page.list // this.mainDataList = data.page.list
this.pageIndex = data.page.currPage this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize this.pageSize = data.page.pageSize
@ -719,11 +740,11 @@ export default {
this.dataListLoading = false this.dataListLoading = false
}) })
}, },
tabClick (tab, event) { tabClick (tab, event) {
this.refreshCurrentTabTable() this.refreshCurrentTabTable()
}, },
// //
sizeChangeHandle (val) { sizeChangeHandle (val) {
this.pageSize = val this.pageSize = val
@ -736,12 +757,12 @@ export default {
this.pageIndex = val this.pageIndex = val
this.getMainData() this.getMainData()
}, },
changeData (row) { changeData (row) {
this.currentRow = JSON.parse(JSON.stringify(row)) this.currentRow = JSON.parse(JSON.stringify(row))
this.refreshCurrentTabTable() this.refreshCurrentTabTable()
}, },
refreshCurrentTabTable () { refreshCurrentTabTable () {
if (this.currentRow === '' || this.currentRow === null) { if (this.currentRow === '' || this.currentRow === null) {
this.currentRow = {site: '', partNo: ''} this.currentRow = {site: '', partNo: ''}
@ -762,7 +783,7 @@ export default {
this.refreshAttachments() this.refreshAttachments()
} }
}, },
async exportExcel () { async exportExcel () {
this.searchData.limit = -1 this.searchData.limit = -1
this.searchData.page = 1 this.searchData.page = 1
@ -773,11 +794,13 @@ export default {
params: this.searchData, params: this.searchData,
fileName: this.exportName + '.xlsx', fileName: this.exportName + '.xlsx',
rowFetcher: res => res.data, rowFetcher: res => res.data,
columnFormatter: [],
columnFormatter: [
{ columnProp: 'partStage', formatter: (val) => this.formatPartStageDesc(val) }
],
dropColumns: [] dropColumns: []
}) })
}, },
refreshBasicInfo () { refreshBasicInfo () {
let inData = { let inData = {
site: this.currentRow.site, site: this.currentRow.site,
@ -787,7 +810,7 @@ export default {
} }
this.$refs.basicInfo.init(inData) this.$refs.basicInfo.init(inData)
}, },
refreshSpecParams () { refreshSpecParams () {
let inData = { let inData = {
site: this.currentRow.site, site: this.currentRow.site,
@ -798,7 +821,7 @@ export default {
} }
this.$refs.specParams.init(inData) this.$refs.specParams.init(inData)
}, },
refreshSuppliers () { refreshSuppliers () {
let inData = { let inData = {
site: this.currentRow.site, site: this.currentRow.site,
@ -807,7 +830,7 @@ export default {
} }
this.$refs.suppliers.init(inData) this.$refs.suppliers.init(inData)
}, },
refreshApproval () { refreshApproval () {
let inData = { let inData = {
site: this.currentRow.site, site: this.currentRow.site,
@ -817,18 +840,18 @@ export default {
} }
this.$refs.approval.init(inData) this.$refs.approval.init(inData)
}, },
refreshAttachments () { refreshAttachments () {
let inData = { let inData = {
orderRef1: this.currentRow.site, orderRef1: this.currentRow.site,
orderRef2: this.currentRow.partNo, orderRef2: this.currentRow.partNo,
orderRef3: this.currentRow.partDesc, orderRef3: this.currentRow.partDesc,
orderReftype: 'part',
orderReftype: 'part',
height: Number(this.height) - 20 height: Number(this.height) - 20
} }
this.$refs.attachments.init(inData) this.$refs.attachments.init(inData)
}, },
// //
addPart() { addPart() {
this.isAdd = true this.isAdd = true
@ -841,7 +864,7 @@ export default {
sourcingName: '', sourcingName: '',
category: '', category: '',
unit: '', unit: '',
status: 'Y',
status: 'N',
codeNo: '', codeNo: '',
createBy: this.$store.state.user.name, createBy: this.$store.state.user.name,
remark: '', remark: '',
@ -849,7 +872,7 @@ export default {
} }
this.partDialogVisible = true this.partDialogVisible = true
}, },
// //
editPart(row) { editPart(row) {
if (!row) { if (!row) {
@ -860,7 +883,7 @@ export default {
this.currentpart = {...row} this.currentpart = {...row}
this.partDialogVisible = true this.partDialogVisible = true
}, },
// //
savePart() { savePart() {
this.$refs.partForm.validate((valid) => { this.$refs.partForm.validate((valid) => {
@ -913,7 +936,7 @@ export default {
// flowVersion: row.flowNodeInstanceData.flowVersion, // flowVersion: row.flowNodeInstanceData.flowVersion,
// nodeCode: row.flowNodeInstanceData.nodeCode, // nodeCode: row.flowNodeInstanceData.nodeCode,
// comment: '' // comment: ''
// } // }
// this.approveDialogVisible = true // this.approveDialogVisible = true
// }, // },
@ -967,7 +990,7 @@ export default {
// }) // })
// }).catch(() => {}) // }).catch(() => {})
// } // }
} }
} }
@ -1090,4 +1113,4 @@ export default {
height: 28px; height: 28px;
} }
} }
</style>
</style>
Loading…
Cancel
Save