Browse Source

2026-07-22

优化
master
fengyuan_yang 1 week ago
parent
commit
e91c36d832
  1. 28
      src/views/modules/shopOrder/workOrderAlloc/searchWorkOrderDetailsAlloc.vue

28
src/views/modules/shopOrder/workOrderAlloc/searchWorkOrderDetailsAlloc.vue

@ -400,7 +400,6 @@ export default {
this.getButtonAuthData()
this.setDefaultDateRange()
this.getSiteList()
this.getData()
},
methods: {
//
@ -414,6 +413,15 @@ export default {
getSiteList().then(({ data }) => {
if (data && data.code === 0) {
this.siteList = data.siteList || []
if (this.siteList.length > 0) {
//
if (!this.searchData.site || !this.siteList.includes(this.searchData.site)) {
this.searchData.site = this.siteList[0]
}
this.getData()
} else {
this.searchData.site = ''
}
}
})
},
@ -447,7 +455,7 @@ export default {
},
resetSearch () {
this.searchData = {
site: '',
site: this.siteList.length > 0 ? this.siteList[0] : '',
orderNo: '',
orderStatus: '',
partNo: '',
@ -464,6 +472,13 @@ export default {
this.allocList = []
this.setDefaultDateRange()
},
ensureSiteSelected (actionName) {
if (!this.searchData.site) {
this.$message.warning(`请选择工厂编码后再${actionName}`)
return false
}
return true
},
buildAllocQueryParams () {
return {
site: this.searchData.site || '',
@ -482,6 +497,9 @@ export default {
}
},
getData () {
if (!this.ensureSiteSelected('查询')) {
return
}
this.searchLoading = true
this.orderListLoading = true
const queryData = {
@ -568,6 +586,9 @@ export default {
this.getAllocData()
},
executeAlloc () {
if (!this.ensureSiteSelected('执行工单明细数据汇总')) {
return
}
this.$confirm('将按当前查询条件执行工单明细数据汇总,是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@ -579,6 +600,9 @@ export default {
})
},
doExecuteAlloc () {
if (!this.ensureSiteSelected('执行工单明细数据汇总')) {
return
}
this.allocLoading = true
const requestData = {
...this.buildAllocQueryParams(),

Loading…
Cancel
Save