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

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

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

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

@ -59,7 +59,7 @@
</div> </div>
</template> </template>
<script> <script>
import { getDetailed } from "@/api/wms-api" import { getDetailed,postAbort } from "@/api/wms-api"
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 +77,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.requestStatus == key) {
data = false
}
})
return data
} }
}, },
}, },
data () { data () {
let _this = this; let _this = this;
return { return {
URL: 'wms/store/injection-request', URL: 'wms/store/injection-issue-request',
// //
currenButtonData: [ currenButtonData: [
// this.defaultImportBtn(),// // this.defaultImportBtn(),//
@ -98,8 +104,7 @@ export default {
{ {
type: 'danger', type: 'danger',
label: '中止', label: '中止',
// todo: hide: () => { return this.hideButton([1,4,9])},
hide: () => { return this.hideButton([2,6])},
name: "break", name: "break",
size: 'mini' size: 'mini'
}, },
@ -122,7 +127,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
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 { } else {
this.drawerbutton(val, this) this.drawerbutton(val, this)
} }

Loading…
Cancel
Save