|
|
@ -59,7 +59,7 @@ |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
import { getDetailed } from "@/api/wms-api" |
|
|
|
import { getDetailed,postAbort } from "@/api/wms-api" |
|
|
|
import { tableMixins } from "@/mixins/TableMixins" |
|
|
|
import { LoadingMixins } from "@/mixins/LoadingMixins" |
|
|
|
import { drawerMixins } from "@/mixins/drawerMixins" |
|
|
@ -77,15 +77,21 @@ export default { |
|
|
|
computed: { |
|
|
|
//按钮显示 |
|
|
|
hideButton: function () { |
|
|
|
return function () { |
|
|
|
return this.propsData.status |
|
|
|
return function (val) { |
|
|
|
let data = true |
|
|
|
val.forEach(key => { |
|
|
|
if (this.propsData.requestStatus == key) { |
|
|
|
data = false |
|
|
|
} |
|
|
|
}) |
|
|
|
return data |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
data () { |
|
|
|
let _this = this; |
|
|
|
return { |
|
|
|
URL: 'wms/store/injection-request', |
|
|
|
URL: 'wms/store/injection-issue-request', |
|
|
|
//常用按钮数据 |
|
|
|
currenButtonData: [ |
|
|
|
// this.defaultImportBtn(),//导入 |
|
|
@ -98,8 +104,7 @@ export default { |
|
|
|
{ |
|
|
|
type: 'danger', |
|
|
|
label: '中止', |
|
|
|
// todo:状态确定 |
|
|
|
hide: () => { return this.hideButton([2,6])}, |
|
|
|
hide: () => { return this.hideButton([1,4,9])}, |
|
|
|
name: "break", |
|
|
|
size: 'mini' |
|
|
|
}, |
|
|
@ -122,7 +127,25 @@ export default { |
|
|
|
drawerbuttonHandle (val) { |
|
|
|
// 中止 |
|
|
|
if(val == 'break'){ |
|
|
|
|
|
|
|
this.$confirm('是否确定中止请求?', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
distinguishCancelAndClose: true, |
|
|
|
closeOnClickModal: false, |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.Loading.appMainLoading = true |
|
|
|
postAbort(this.propsData.id, this.URL).then(res => { |
|
|
|
this.$successMsg('已中止请求') |
|
|
|
this.Loading.appMainLoading = false |
|
|
|
getDetailed(this.propsData.id, this.URL).then(res => { |
|
|
|
this.propsData = res |
|
|
|
}) |
|
|
|
this.paging(); |
|
|
|
}).catch(err => { |
|
|
|
this.Loading.appMainLoading = false |
|
|
|
}) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.drawerbutton(val, this) |
|
|
|
} |
|
|
|