|
@@ -270,7 +270,7 @@ export default {
|
|
|
// 批量提交
|
|
|
handleBatchSubmit(){
|
|
|
|
|
|
- let inconformity = this.checkedList.filter(row => !(row.status == '0' || row.status == '3'));
|
|
|
+ let inconformity = this.checkedList.filter(row => !((row.status == '0' || row.status == '3') && row.isEnd === 'N'));
|
|
|
|
|
|
if(!inconformity.length && this.checkedList.length){
|
|
|
|
|
@@ -318,7 +318,10 @@ export default {
|
|
|
if (this.checkedList.length == 1) {
|
|
|
|
|
|
// 非手工、状态:自由/驳回
|
|
|
- if (this.checkedList[0].source != 3 && (this.checkedList[0].status == 0 || this.checkedList[0].status == 3)) {
|
|
|
+ if (this.judgeIsOption('return',this.checkedList[0])) {
|
|
|
+ // if (this.checkedList[0].source != 3 &&
|
|
|
+ // (this.checkedList[0].status == 0 || this.checkedList[0].status == 3)
|
|
|
+ // ) {
|
|
|
|
|
|
return false
|
|
|
}
|
|
@@ -337,8 +340,9 @@ export default {
|
|
|
if (this.checkedTabList.length == 1) {
|
|
|
|
|
|
// 主信息:非手工、状态:自由/驳回
|
|
|
- if(this.primaryResource.source != 3 &&
|
|
|
- (this.primaryResource.status == 0 || this.primaryResource.status == 3) ){
|
|
|
+ if(this.judgeIsOption('return',this.primaryResource)){
|
|
|
+ // if(this.primaryResource.source != 3 &&
|
|
|
+ // (this.primaryResource.status == 0 || this.primaryResource.status == 3) ){
|
|
|
|
|
|
return false
|
|
|
}
|
|
@@ -397,7 +401,8 @@ export default {
|
|
|
|
|
|
if (this.checkedList.length == 1) {
|
|
|
|
|
|
- if (this.checkedList[0].status == 0) {
|
|
|
+ // if (this.checkedList[0].status == 0) {
|
|
|
+ if (this.judgeIsOption('allClose',this.checkedList[0])) {
|
|
|
// 未审批状态下整单关闭
|
|
|
return false
|
|
|
}
|
|
@@ -502,6 +507,25 @@ export default {
|
|
|
return '';
|
|
|
|
|
|
}
|
|
|
+ },
|
|
|
+ judgeIsOption(type,source){
|
|
|
+ switch(type){
|
|
|
+ case 'edit':
|
|
|
+ return (source.status == '0' || source.status == '3') && source.isEnd === 'N';
|
|
|
+ case 'revise':
|
|
|
+ return source.status == '2' && source.isEnd === 'N';
|
|
|
+ case 'del':
|
|
|
+ return (source.status == '0' || source.status == '3') && source.source == '3' && source.isEnd === 'N';
|
|
|
+ case 'submit':
|
|
|
+ return (source.status == '0' || source.status == '3') && source.isEnd === 'N';
|
|
|
+ case 'allClose':
|
|
|
+ return source.status == 0 && source.isEnd === 'N';
|
|
|
+ case 'return':
|
|
|
+ return source.source != 3 && source.isEnd === 'N' &&
|
|
|
+ (source.status == 0 || source.status == 3);
|
|
|
+ default:
|
|
|
+ return false;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
};
|
|
@@ -510,7 +534,7 @@ export default {
|
|
|
<template>
|
|
|
<el-card
|
|
|
v-loading="loading"
|
|
|
- style="width: calc(100% - 24px); height: 100%; margin: 10px"
|
|
|
+ style="width: calc(100% - 24px); height: 100%; margin: 10px;padding: 10px;"
|
|
|
:body-style="{ padding: 0 }"
|
|
|
>
|
|
|
<SeeDrawer ref="seeDrawerRef"></SeeDrawer>
|
|
@@ -575,7 +599,7 @@ export default {
|
|
|
<template slot-scope="scope">
|
|
|
<!-- <template #operation="{scope}"> -->
|
|
|
<el-button
|
|
|
- v-if="scope.row.status == '2'"
|
|
|
+ v-if="judgeIsOption('revise',scope.row)"
|
|
|
type="text"
|
|
|
size="small"
|
|
|
@click.stop="handleOpenEditDrawer(scope.row)"
|
|
@@ -583,7 +607,7 @@ export default {
|
|
|
修订
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
- v-if="scope.row.status == '0' || scope.row.status == '3'"
|
|
|
+ v-if="judgeIsOption('edit',scope.row)"
|
|
|
type="text"
|
|
|
size="small"
|
|
|
@click.stop="handleOpenEditDrawer(scope.row)"
|
|
@@ -592,14 +616,14 @@ export default {
|
|
|
</el-button>
|
|
|
<!-- 0=自由态,1=审批中,2=已审核,3=已驳回 4=提交中-->
|
|
|
<el-button
|
|
|
- v-if="(scope.row.status == '0' || scope.row.status == '3') && scope.row.source == '3'"
|
|
|
+ v-if="judgeIsOption('del',scope.row)"
|
|
|
type="text"
|
|
|
size="small"
|
|
|
@click.stop="handleDeleteList(scope.row)"
|
|
|
v-hasPermi="['material:order:remove']"
|
|
|
>删除</el-button>
|
|
|
<el-button
|
|
|
- v-if="scope.row.status == '0' || scope.row.status == '3'"
|
|
|
+ v-if="judgeIsOption('submit',scope.row)"
|
|
|
type="text"
|
|
|
size="mini"
|
|
|
v-hasPermi="['material:order:toOa']"
|