|
@ -60,6 +60,7 @@ |
|
|
</template> |
|
|
</template> |
|
|
<script> |
|
|
<script> |
|
|
import { getDetailed } from "@/api/wms-api" |
|
|
import { getDetailed } from "@/api/wms-api" |
|
|
|
|
|
import { close } from "@/api/wms-job" |
|
|
import { tableMixins } from "@/mixins/TableMixins" |
|
|
import { tableMixins } from "@/mixins/TableMixins" |
|
|
import { LoadingMixins } from "@/mixins/LoadingMixins" |
|
|
import { LoadingMixins } from "@/mixins/LoadingMixins" |
|
|
import { drawerMixins } from "@/mixins/drawerMixins" |
|
|
import { drawerMixins } from "@/mixins/drawerMixins" |
|
@ -77,15 +78,21 @@ export default { |
|
|
computed: { |
|
|
computed: { |
|
|
//按钮显示 |
|
|
//按钮显示 |
|
|
hideButton: function () { |
|
|
hideButton: function () { |
|
|
return function () { |
|
|
return function (val) { |
|
|
return this.propsData.status |
|
|
let data = true |
|
|
|
|
|
val.forEach(key => { |
|
|
|
|
|
if (this.propsData.jobStatus == key) { |
|
|
|
|
|
data = false |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
return data |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
data () { |
|
|
data () { |
|
|
let _this = this; |
|
|
let _this = this; |
|
|
return { |
|
|
return { |
|
|
URL: 'wms/store/injection-job', |
|
|
URL: 'wms/store/injection-issue-job', |
|
|
//常用按钮数据 |
|
|
//常用按钮数据 |
|
|
currenButtonData: [ |
|
|
currenButtonData: [ |
|
|
// this.defaultImportBtn(),//导入 |
|
|
// this.defaultImportBtn(),//导入 |
|
@ -98,8 +105,7 @@ export default { |
|
|
{ |
|
|
{ |
|
|
type: 'danger', |
|
|
type: 'danger', |
|
|
label: '中止', |
|
|
label: '中止', |
|
|
// todo:状态确定 |
|
|
hide: () => { return this.hideButton([1,2,4])}, |
|
|
hide: () => { return this.hideButton([2,6])}, |
|
|
|
|
|
name: "break", |
|
|
name: "break", |
|
|
size: 'mini' |
|
|
size: 'mini' |
|
|
}, |
|
|
}, |
|
@ -122,7 +128,25 @@ export default { |
|
|
drawerbuttonHandle (val) { |
|
|
drawerbuttonHandle (val) { |
|
|
// 中止 |
|
|
// 中止 |
|
|
if(val == 'break'){ |
|
|
if(val == 'break'){ |
|
|
|
|
|
this.$confirm('是否确定中止任务?', '提示', { |
|
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
|
distinguishCancelAndClose: true, |
|
|
|
|
|
closeOnClickModal: false, |
|
|
|
|
|
type: 'warning' |
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
this.Loading.appMainLoading = true |
|
|
|
|
|
close(this.URL,this.propsData).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 { |
|
|
} else { |
|
|
this.drawerbutton(val, this) |
|
|
this.drawerbutton(val, this) |
|
|
} |
|
|
} |
|
|