|
|
@ -60,7 +60,7 @@ |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
import { materialRequestByType } from "@/api/wms-api" |
|
|
|
import { materialRequestByType,processRequest } from "@/api/wms-api" |
|
|
|
import { tableMixins } from "@/mixins/TableMixins" |
|
|
|
import { LoadingMixins } from "@/mixins/LoadingMixins" |
|
|
|
import { drawerMixins } from "@/mixins/drawerMixins" |
|
|
@ -97,7 +97,31 @@ export default { |
|
|
|
this.defaultFilterBtn(),//筛选 |
|
|
|
], |
|
|
|
DrawerButtonData: [ |
|
|
|
...requestData(this), |
|
|
|
...requestData(this), |
|
|
|
{ |
|
|
|
type: 'primary', |
|
|
|
icon: 'el-icon-circle-check', |
|
|
|
label: '完成', |
|
|
|
hide: () => { return this.completeRequestInit([2,6])}, |
|
|
|
name: "completeRequest", |
|
|
|
size: 'mini' |
|
|
|
}, |
|
|
|
// { |
|
|
|
// type: 'primary', |
|
|
|
// icon: 'el-icon-circle-check', |
|
|
|
// label: '执行', |
|
|
|
// name: "IssueRequest-zx", |
|
|
|
// hide: () => { return this.againHandleRequestInit([9])}, |
|
|
|
// size: 'mini' |
|
|
|
// }, |
|
|
|
// ...requestData(this,false, |
|
|
|
// false, |
|
|
|
// { |
|
|
|
// againHandleRequest:() => {return this.againHandleRequestInit([9])}, |
|
|
|
// // abortRequest:() => {return this.abortRequestRequestInit([2,6])}, |
|
|
|
// }, |
|
|
|
// ['againHandleRequest'] |
|
|
|
// ), |
|
|
|
//使用 initHide 函数处理是否隐藏 |
|
|
|
// ...requestData(this,false,{ |
|
|
|
// againHandleRequest:() => {return this.againHandleRequestInit([9])} |
|
|
@ -134,7 +158,17 @@ export default { |
|
|
|
this.Loading.tableLoading = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 重新定义【执行按钮】显示判断 |
|
|
|
// 重新定义【中止按钮】显示判断 除了2(待审批) 和 6(完成状态)都显示(abortRequestRequestInit) |
|
|
|
completeRequestInit(val){ |
|
|
|
let data = false |
|
|
|
val.forEach(key => { |
|
|
|
if (this.propsData.requestStatus == key) { |
|
|
|
data = true |
|
|
|
} |
|
|
|
}) |
|
|
|
return data |
|
|
|
}, |
|
|
|
// 重新定义【执行按钮】显示判断 ==9时候显示 |
|
|
|
againHandleRequestInit(val){ |
|
|
|
let data = true |
|
|
|
val.forEach(key => { |
|
|
@ -146,11 +180,23 @@ export default { |
|
|
|
}, |
|
|
|
//抽屉常用按钮 |
|
|
|
// drawerbutton (val) { |
|
|
|
// // 完成 |
|
|
|
// // if(val == 'IssueRequest-over'){ |
|
|
|
// // } else { |
|
|
|
// // drawerMixins.methods.drawerbutton(val, this) |
|
|
|
// // } |
|
|
|
// // 执行(todo:后期本页特殊) |
|
|
|
// if(val == 'IssueRequest-zx'){ |
|
|
|
// this.Loading.appMainLoading = true |
|
|
|
// processRequest(this.propsData.id, this.URL + '/handle/').then(res => { |
|
|
|
// this.$successMsg('处理完成') |
|
|
|
// getDetailed(this.propsData.id, this.URL).then(res => { |
|
|
|
// this.propsData = res |
|
|
|
// }) |
|
|
|
// this.paging() |
|
|
|
// this.Loading.appMainLoading = false |
|
|
|
// }).catch(err => { |
|
|
|
// console.log(err) |
|
|
|
// this.Loading.appMainLoading = false |
|
|
|
// }) |
|
|
|
// } else { |
|
|
|
// drawerMixins.methods.drawerbutton(val, this) |
|
|
|
// } |
|
|
|
// }, |
|
|
|
} |
|
|
|
}; |
|
|
|