Browse Source

【nev-pc】人工注塑申请任务-中止

ag_report_nev
安虹睿 1 year ago
parent
commit
b2e4879158
  1. 36
      fe/PC/src/views/materialIssueManage/ZS/IssueJobZS.vue
  2. 2
      fe/PC/src/views/materialIssueManage/ZS/IssueNoteZS.vue
  3. 37
      fe/PC/src/views/materialIssueManage/ZS/IssueRequestZS.vue

36
fe/PC/src/views/materialIssueManage/ZS/IssueJobZS.vue

@ -60,6 +60,7 @@
</template>
<script>
import { getDetailed } from "@/api/wms-api"
import { close } from "@/api/wms-job"
import { tableMixins } from "@/mixins/TableMixins"
import { LoadingMixins } from "@/mixins/LoadingMixins"
import { drawerMixins } from "@/mixins/drawerMixins"
@ -77,15 +78,21 @@ export default {
computed: {
//
hideButton: function () {
return function () {
return this.propsData.status
return function (val) {
let data = true
val.forEach(key => {
if (this.propsData.jobStatus == key) {
data = false
}
})
return data
}
},
},
data () {
let _this = this;
return {
URL: 'wms/store/injection-job',
URL: 'wms/store/injection-issue-job',
//
currenButtonData: [
// this.defaultImportBtn(),//
@ -98,8 +105,7 @@ export default {
{
type: 'danger',
label: '中止',
// todo:
hide: () => { return this.hideButton([2,6])},
hide: () => { return this.hideButton([1,2,4])},
name: "break",
size: 'mini'
},
@ -122,7 +128,25 @@ export default {
drawerbuttonHandle (val) {
//
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 {
this.drawerbutton(val, this)
}

2
fe/PC/src/views/materialIssueManage/ZS/IssueNoteZS.vue

@ -63,7 +63,7 @@ export default {
],
data () {
return {
URL: 'wms/store/injection-note',
URL: 'wms/store/injection-issue-note',
//
currenButtonData: [
this.defaultExportBtn(),//

37
fe/PC/src/views/materialIssueManage/ZS/IssueRequestZS.vue

@ -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)
}

Loading…
Cancel
Save