|
|
@ -2,7 +2,7 @@ |
|
|
<div class="customer-css"> |
|
|
<div class="customer-css"> |
|
|
<!-- 查询条件 --> |
|
|
<!-- 查询条件 --> |
|
|
<el-form :inline="true" label-position="top" class="pi-search-form"> |
|
|
<el-form :inline="true" label-position="top" class="pi-search-form"> |
|
|
<el-form-item label="请求编号"> |
|
|
|
|
|
|
|
|
<el-form-item label="任务单号"> |
|
|
<el-input v-model="searchData.requestNo" style="width:140px" @keyup.enter.native="getList" /> |
|
|
<el-input v-model="searchData.requestNo" style="width:140px" @keyup.enter.native="getList" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item> |
|
|
<el-form-item> |
|
|
@ -35,11 +35,11 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="状态"> |
|
|
<el-form-item label="状态"> |
|
|
<el-select v-model="searchData.statusList" multiple collapse-tags clearable style="width:150px" placeholder="All"> |
|
|
<el-select v-model="searchData.statusList" multiple collapse-tags clearable style="width:150px" placeholder="All"> |
|
|
<el-option label="已完成" value="已完成" /> |
|
|
|
|
|
<el-option label="已审核" value="已审核" /> |
|
|
|
|
|
<el-option label="待审批" value="待审批" /> |
|
|
|
|
|
<el-option label="审批通过" value="审批通过" /> |
|
|
|
|
|
<el-option label="审批拒绝" value="审批拒绝" /> |
|
|
|
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for="item in reviewStatusOptions" |
|
|
|
|
|
:key="item.value" |
|
|
|
|
|
:label="item.label" |
|
|
|
|
|
:value="item.value" /> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label=" "> |
|
|
<el-form-item label=" "> |
|
|
@ -50,16 +50,12 @@ |
|
|
<!-- 列表 --> |
|
|
<!-- 列表 --> |
|
|
<el-table :data="dataList" :height="requestTableHeight - 100" border highlight-current-row v-loading="loading" |
|
|
<el-table :data="dataList" :height="requestTableHeight - 100" border highlight-current-row v-loading="loading" |
|
|
@row-click="rowClick" @current-change="handleMainCurrentChange" ref="mainTable" style="width:100%;margin-bottom:8px"> |
|
|
@row-click="rowClick" @current-change="handleMainCurrentChange" ref="mainTable" style="width:100%;margin-bottom:8px"> |
|
|
<el-table-column fixed="right" label="操作" width="175" header-align="center" align="center"> |
|
|
|
|
|
|
|
|
<el-table-column fixed="right" label="操作" width="80" header-align="center" align="center"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<template v-if="canOperate(scope.row)"> |
|
|
|
|
|
<a class="customer-a" @click.stop="openReviewDialog(scope.row)">审核</a> |
|
|
|
|
|
<span style="color:#dcdfe6;margin:0 4px">|</span> |
|
|
|
|
|
<a class="customer-a" @click.stop="submitForApprove(scope.row)">提交上级审批</a> |
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
<a v-if="canOperate(scope.row)" class="customer-a" @click.stop="openReviewDialog(scope.row)">审核</a> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column prop="requestNo" label="请求编号" min-width="120" header-align="center" align="left" /> |
|
|
|
|
|
|
|
|
<el-table-column prop="requestNo" label="任务单号" min-width="120" header-align="center" align="left" /> |
|
|
<el-table-column prop="supplierNo" label="供应商编码" width="120" header-align="center" align="left" /> |
|
|
<el-table-column prop="supplierNo" label="供应商编码" width="120" header-align="center" align="left" /> |
|
|
<el-table-column prop="supplierName" label="供应商名称" min-width="200" header-align="center" align="left" show-overflow-tooltip /> |
|
|
<el-table-column prop="supplierName" label="供应商名称" min-width="200" header-align="center" align="left" show-overflow-tooltip /> |
|
|
<el-table-column prop="wantedCompleteDate" label="预计完成时间" width="160" header-align="center" align="center" /> |
|
|
<el-table-column prop="wantedCompleteDate" label="预计完成时间" width="160" header-align="center" align="center" /> |
|
|
@ -81,7 +77,7 @@ |
|
|
<el-row :gutter="10" style="margin-top:12px"> |
|
|
<el-row :gutter="10" style="margin-top:12px"> |
|
|
<el-col :span="16"> |
|
|
<el-col :span="16"> |
|
|
<div class="sub-panel-header"> |
|
|
<div class="sub-panel-header"> |
|
|
<span style="font-size:16px">请求</span> |
|
|
|
|
|
|
|
|
<span style="font-size:16px">考核单</span> |
|
|
</div> |
|
|
</div> |
|
|
<el-table :data="indicatorList" size="mini" border :height="indicatorTableHeight" highlight-current-row |
|
|
<el-table :data="indicatorList" size="mini" border :height="indicatorTableHeight" highlight-current-row |
|
|
ref="indicatorTable" v-loading="indicatorLoading" @row-click="selectIndicatorRow"> |
|
|
ref="indicatorTable" v-loading="indicatorLoading" @row-click="selectIndicatorRow"> |
|
|
@ -115,7 +111,7 @@ |
|
|
v-drag> |
|
|
v-drag> |
|
|
<el-form :inline="true" label-position="top" class="create-top-form"> |
|
|
<el-form :inline="true" label-position="top" class="create-top-form"> |
|
|
<el-form-item |
|
|
<el-form-item |
|
|
label="请求编号"><el-input v-model="reviewForm.requestNo" disabled style="width: 120px"/></el-form-item> |
|
|
|
|
|
|
|
|
label="任务单号"><el-input v-model="reviewForm.requestNo" disabled style="width: 120px"/></el-form-item> |
|
|
<el-form-item label="审核人"><el-input v-model="reviewForm.createBy" disabled style="width: 120px"/></el-form-item> |
|
|
<el-form-item label="审核人"><el-input v-model="reviewForm.createBy" disabled style="width: 120px"/></el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<el-form :inline="true" label-position="top" size="mini" class="create-top-form"> |
|
|
<el-form :inline="true" label-position="top" size="mini" class="create-top-form"> |
|
|
@ -130,6 +126,7 @@ |
|
|
</el-form> |
|
|
</el-form> |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
<el-button type="primary" :loading="reviewSaving" @click="saveReview">审核</el-button> |
|
|
<el-button type="primary" :loading="reviewSaving" @click="saveReview">审核</el-button> |
|
|
|
|
|
<el-button type="danger" :loading="voidSaving" @click="voidReview">作废</el-button> |
|
|
<el-button @click="reviewDialogVisible=false">取消</el-button> |
|
|
<el-button @click="reviewDialogVisible=false">取消</el-button> |
|
|
</span> |
|
|
</span> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
@ -139,7 +136,11 @@ |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import { searchEvaluateRequestList, getEvaluateRequestIndicators, getEvaluateRequestIndicatorProgress } from '@/api/supplierPerformance/myPerformanceEvaluateRequest.js' |
|
|
import { searchEvaluateRequestList, getEvaluateRequestIndicators, getEvaluateRequestIndicatorProgress } from '@/api/supplierPerformance/myPerformanceEvaluateRequest.js' |
|
|
import {updateEvaluateRequestReviewOrApprove} from "../../../api/supplierPerformance/myPerformanceEvaluateRequest"; |
|
|
|
|
|
|
|
|
import { updateEvaluateRequestReviewOrApprove } from '@/api/supplierPerformance/myPerformanceEvaluateRequest' |
|
|
|
|
|
import { |
|
|
|
|
|
PERF_REVIEW_STATUS_OPTIONS, |
|
|
|
|
|
PERF_REVIEW_STATUS_DEFAULT |
|
|
|
|
|
} from './supplierPerformanceStatusOptions.js' |
|
|
import Chooselist from '@/views/modules/common/Chooselist_eam' |
|
|
import Chooselist from '@/views/modules/common/Chooselist_eam' |
|
|
export default { |
|
|
export default { |
|
|
components: { |
|
|
components: { |
|
|
@ -154,6 +155,7 @@ export default { |
|
|
pageIndex: 1, |
|
|
pageIndex: 1, |
|
|
pageSize: 20, |
|
|
pageSize: 20, |
|
|
totalPage: 0, |
|
|
totalPage: 0, |
|
|
|
|
|
reviewStatusOptions: PERF_REVIEW_STATUS_OPTIONS, |
|
|
searchData: { |
|
|
searchData: { |
|
|
site: this.$store.state.user.site, |
|
|
site: this.$store.state.user.site, |
|
|
username: this.$store.state.user.name, |
|
|
username: this.$store.state.user.name, |
|
|
@ -172,6 +174,7 @@ export default { |
|
|
indicatorLoading: false, |
|
|
indicatorLoading: false, |
|
|
reviewDialogVisible: false, |
|
|
reviewDialogVisible: false, |
|
|
reviewSaving: false, |
|
|
reviewSaving: false, |
|
|
|
|
|
voidSaving: false, |
|
|
reviewForm: { id:'', requestNo:'', supplierNo:'', supplierName:'', createBy:'', comments:'' }, |
|
|
reviewForm: { id:'', requestNo:'', supplierNo:'', supplierName:'', createBy:'', comments:'' }, |
|
|
viewIndicatorCode: '', |
|
|
viewIndicatorCode: '', |
|
|
progressList: [], |
|
|
progressList: [], |
|
|
@ -186,7 +189,6 @@ export default { |
|
|
mounted() { this.calcHeight(); window.addEventListener('resize', this.calcHeight); this.getList() }, |
|
|
mounted() { this.calcHeight(); window.addEventListener('resize', this.calcHeight); this.getList() }, |
|
|
beforeDestroy() { window.removeEventListener('resize', this.calcHeight) }, |
|
|
beforeDestroy() { window.removeEventListener('resize', this.calcHeight) }, |
|
|
methods: { |
|
|
methods: { |
|
|
// 获取基础数据列表 |
|
|
|
|
|
getBaseList (val) { |
|
|
getBaseList (val) { |
|
|
this.tagNo = val |
|
|
this.tagNo = val |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
@ -199,14 +201,10 @@ export default { |
|
|
this.$refs.baseList.init(val, strVal, conSql) |
|
|
this.$refs.baseList.init(val, strVal, conSql) |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
/* 列表方法的回调 */ |
|
|
|
|
|
getBaseData (val) { |
|
|
getBaseData (val) { |
|
|
console.log('Chooselist返回的数据:', val, 'tagNo:', this.tagNo) |
|
|
|
|
|
if (this.tagNo === 501) { |
|
|
if (this.tagNo === 501) { |
|
|
// 供应商编码字段 - SQL返回: SupplierID, SupplierName |
|
|
|
|
|
const supplierNoVal = val.SupplierID || val.supplierID || val.supplierId || '' |
|
|
const supplierNoVal = val.SupplierID || val.supplierID || val.supplierId || '' |
|
|
this.searchData.supplierNo = supplierNoVal |
|
|
this.searchData.supplierNo = supplierNoVal |
|
|
console.log('供应商编码赋值:', supplierNoVal) |
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
calcHeight() { this.$nextTick(()=> { this.height = window.innerHeight - 40 }) }, |
|
|
calcHeight() { this.$nextTick(()=> { this.height = window.innerHeight - 40 }) }, |
|
|
@ -223,7 +221,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
getList() { |
|
|
getList() { |
|
|
this.loading = true |
|
|
this.loading = true |
|
|
if (this.searchData.statusList.length === 0) this.searchData.statusList = ['已完成','已审核','待审批','审批通过','审批拒绝'] |
|
|
|
|
|
|
|
|
if (this.searchData.statusList.length === 0) this.searchData.statusList = [...PERF_REVIEW_STATUS_DEFAULT] |
|
|
const params = { ...this.searchData, statusList: this.searchData.statusList , page: this.pageIndex, limit: this.pageSize, selectType: 1 } |
|
|
const params = { ...this.searchData, statusList: this.searchData.statusList , page: this.pageIndex, limit: this.pageSize, selectType: 1 } |
|
|
searchEvaluateRequestList(params).then(({data})=> { |
|
|
searchEvaluateRequestList(params).then(({data})=> { |
|
|
if (data && (data.code===0||data.code==='0')) { |
|
|
if (data && (data.code===0||data.code==='0')) { |
|
|
@ -349,24 +347,37 @@ export default { |
|
|
this.reviewDialogVisible = true |
|
|
this.reviewDialogVisible = true |
|
|
}, |
|
|
}, |
|
|
saveReview(){ |
|
|
saveReview(){ |
|
|
if (this.reviewSaving) return |
|
|
|
|
|
|
|
|
if (this.reviewSaving || this.voidSaving) return |
|
|
const c = (this.reviewForm.comments||'').trim() |
|
|
const c = (this.reviewForm.comments||'').trim() |
|
|
if(!c){ this.$message.warning('Comments不能为空'); return } |
|
|
if(!c){ this.$message.warning('Comments不能为空'); return } |
|
|
this.reviewSaving = true |
|
|
this.reviewSaving = true |
|
|
const payload = { site:this.$store.state.user.site, id:this.reviewForm.id, requestNo:this.reviewForm.requestNo, |
|
|
const payload = { site:this.$store.state.user.site, id:this.reviewForm.id, requestNo:this.reviewForm.requestNo, |
|
|
comments:c, updateBy:this.$store.state.user.name, updateType: 1 } |
|
|
comments:c, updateBy:this.$store.state.user.name, updateType: 1 } |
|
|
updateEvaluateRequestReviewOrApprove(payload).then(({data})=> { |
|
|
updateEvaluateRequestReviewOrApprove(payload).then(({data})=> { |
|
|
if (data && (data.code===0||data.code==='0')) { this.$message.success('Saved'); this.reviewDialogVisible=false; this.getList() } else { this.$message.error((data&&data.msg)||'Save failed') } |
|
|
|
|
|
}).catch(e=> this.$message.error('Save failed: '+ e.message)).finally(()=> { this.reviewSaving=false }) |
|
|
|
|
|
|
|
|
if (data && (data.code===0||data.code==='0')) { this.$message.success('审核成功'); this.reviewDialogVisible=false; this.getList() } else { this.$message.error((data&&data.msg)||'审核失败') } |
|
|
|
|
|
}).catch(e=> this.$message.error('审核失败: '+ e.message)).finally(()=> { this.reviewSaving=false }) |
|
|
}, |
|
|
}, |
|
|
submitForApprove(row){ |
|
|
|
|
|
this.$confirm('确认提交到审批?','提示',{type:'warning'}).then(()=> { |
|
|
|
|
|
const payload = { site:this.$store.state.user.site, id:row.id, requestNo:row.requestNo, status:'待审批', |
|
|
|
|
|
updateBy:this.$store.state.user.name, updateType: 2 } |
|
|
|
|
|
updateEvaluateRequestReviewOrApprove(payload).then(({data})=> { |
|
|
|
|
|
if (data && (data.code===0||data.code==='0')) { this.$message.success('已提交'); this.getList() } else { this.$message.error((data&&data.msg)||'提交失败') } |
|
|
|
|
|
}).catch(e=> this.$message.error('提交失败: '+ e.message)) |
|
|
|
|
|
}).catch(()=>{}) |
|
|
|
|
|
|
|
|
voidReview() { |
|
|
|
|
|
if (this.reviewSaving || this.voidSaving) return |
|
|
|
|
|
this.$confirm('是否作废该绩效审核单?', '提示', { type: 'warning' }).then(() => { |
|
|
|
|
|
this.voidSaving = true |
|
|
|
|
|
const payload = { |
|
|
|
|
|
site: this.$store.state.user.site, |
|
|
|
|
|
id: this.reviewForm.id, |
|
|
|
|
|
requestNo: this.reviewForm.requestNo, |
|
|
|
|
|
updateBy: this.$store.state.user.name, |
|
|
|
|
|
updateType: 4 |
|
|
|
|
|
} |
|
|
|
|
|
updateEvaluateRequestReviewOrApprove(payload).then(({ data }) => { |
|
|
|
|
|
if (data && (data.code === 0 || data.code === '0')) { |
|
|
|
|
|
this.$message.success('作废成功') |
|
|
|
|
|
this.reviewDialogVisible = false |
|
|
|
|
|
this.getList() |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message.error((data && data.msg) || '作废失败') |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(e => this.$message.error('作废失败: ' + e.message)).finally(() => { this.voidSaving = false }) |
|
|
|
|
|
}).catch(() => {}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -376,3 +387,4 @@ export default { |
|
|
.pi-search-form { margin-top:0; } |
|
|
.pi-search-form { margin-top:0; } |
|
|
.sub-panel-header { display:flex; align-items:center; justify-content:space-between; font-weight:600; padding:4px 6px; background:#f5f7fa; border:1px solid #ebeef5; border-bottom:none; } |
|
|
.sub-panel-header { display:flex; align-items:center; justify-content:space-between; font-weight:600; padding:4px 6px; background:#f5f7fa; border:1px solid #ebeef5; border-bottom:none; } |
|
|
</style> |
|
|
</style> |
|
|
|
|
|
|