|
|
@ -79,7 +79,8 @@ import { |
|
|
|
processRequest, |
|
|
|
getDetailed, |
|
|
|
getPageListWip, |
|
|
|
deliverRequestHandleList |
|
|
|
deliverRequestHandleList, |
|
|
|
deliverRequestDelete |
|
|
|
} from "@/api/wms-api"; |
|
|
|
import { tableMixins } from "@/mixins/TableMixins" |
|
|
|
import { LoadingMixins } from "@/mixins/LoadingMixins" |
|
|
@ -111,15 +112,9 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
// 按钮显示 |
|
|
|
hideButton: function () { |
|
|
|
return function (val) { |
|
|
|
let data = true |
|
|
|
val.forEach(key => { |
|
|
|
if (this.propsData.requestStatus == key) { |
|
|
|
data = false |
|
|
|
} |
|
|
|
}) |
|
|
|
return data |
|
|
|
hideDelButton: function () { |
|
|
|
return function () { |
|
|
|
return this.propsData.deliverRequestType != 1 |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
@ -170,6 +165,13 @@ export default { |
|
|
|
this.defaultFilterBtn(),//筛选 |
|
|
|
], |
|
|
|
DrawerButtonData: [ |
|
|
|
{ |
|
|
|
type: "danger", |
|
|
|
label: "删除", |
|
|
|
name: "delete", |
|
|
|
size: "mini", |
|
|
|
hide: () => { return this.hideDelButton() }, |
|
|
|
}, |
|
|
|
// ...requestData(this) |
|
|
|
], |
|
|
|
showFilterSta_normal:false,//查看普通发货 |
|
|
@ -284,28 +286,48 @@ export default { |
|
|
|
}, |
|
|
|
drawerbuttonHandle(val){ |
|
|
|
// 审批 |
|
|
|
if (val == 'agreeRequest') { |
|
|
|
this.Loading.appMainLoading = true |
|
|
|
processRequest(this.propsData.id, this.URL + '/agree/').then(res => { |
|
|
|
getDetailed(this.propsData.id, this.URL).then(res => { |
|
|
|
this.propsData = res |
|
|
|
}) |
|
|
|
this.paging() |
|
|
|
this.$confirm('审批成功,是否需要打印发货单', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
// 打印发货单 |
|
|
|
this.printHandle() |
|
|
|
}).catch(() => { |
|
|
|
// if (val == 'agreeRequest') { |
|
|
|
// this.Loading.appMainLoading = true |
|
|
|
// processRequest(this.propsData.id, this.URL + '/agree/').then(res => { |
|
|
|
// getDetailed(this.propsData.id, this.URL).then(res => { |
|
|
|
// this.propsData = res |
|
|
|
// }) |
|
|
|
// this.paging() |
|
|
|
// this.$confirm('审批成功,是否需要打印发货单', '提示', { |
|
|
|
// confirmButtonText: '确定', |
|
|
|
// cancelButtonText: '取消', |
|
|
|
// type: 'warning' |
|
|
|
// }).then(() => { |
|
|
|
// // 打印发货单 |
|
|
|
// this.printHandle() |
|
|
|
// }).catch(() => { |
|
|
|
|
|
|
|
}); |
|
|
|
this.Loading.appMainLoading = false |
|
|
|
}).catch(err => { |
|
|
|
this.Loading.appMainLoading = false |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
// }); |
|
|
|
// this.Loading.appMainLoading = false |
|
|
|
// }).catch(err => { |
|
|
|
// this.Loading.appMainLoading = false |
|
|
|
// }) |
|
|
|
// } |
|
|
|
if(val == 'delete'){ |
|
|
|
this.$confirm('您确定删除吗, 是否继续?', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.Loading.appMainLoading = true; |
|
|
|
deliverRequestDelete(this.propsData.id) |
|
|
|
.then(res=>{ |
|
|
|
this.$successMsg("删除成功!") |
|
|
|
this.paging() |
|
|
|
this.displayDialog.detailsDialog = false |
|
|
|
}).catch(() => { |
|
|
|
this.Loading.appMainLoading = true; |
|
|
|
}); |
|
|
|
}).catch(() => { |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
else{ |
|
|
|
this.drawerbutton(val) |
|
|
|
} |
|
|
|
}, |
|
|
|