Browse Source

2026-06-01

优化
master
fengyuan_yang 2 weeks ago
parent
commit
47e16f5a82
  1. 1
      src/api/boxManage/boxManage.js
  2. 61
      src/views/modules/boxManage/saleBoxManage.vue
  3. 1
      src/views/modules/shopOrder/workOrderAlloc/searchWorkOrderAlloc.vue

1
src/api/boxManage/boxManage.js

@ -13,6 +13,7 @@ export const searchRollForOrderNo= data => createAPI('/boxForNotification/search
// 盒清单相关接口 // 盒清单相关接口
export const searchSoReceiveCasesData = data => createAPI('/boxForNotification/searchSoReceiveCasesData','post',data) export const searchSoReceiveCasesData = data => createAPI('/boxForNotification/searchSoReceiveCasesData','post',data)
export const searchSoReceiveCasesDataByPage = data => createAPI('/boxForNotification/searchSoReceiveCasesDataByPage','post',data)
export const deleteSoReceiveCasesData = data => createAPI('/boxForNotification/deleteSoReceiveCasesData','post',data) export const deleteSoReceiveCasesData = data => createAPI('/boxForNotification/deleteSoReceiveCasesData','post',data)
export const validateAndScanCaseRoll = data => createAPI('/boxForNotification/validateAndScanCaseRoll','post',data) export const validateAndScanCaseRoll = data => createAPI('/boxForNotification/validateAndScanCaseRoll','post',data)
export const saveCaseRollList = data => createAPI('/boxForNotification/saveCaseRollList','post',data) export const saveCaseRollList = data => createAPI('/boxForNotification/saveCaseRollList','post',data)

61
src/views/modules/boxManage/saleBoxManage.vue

@ -189,9 +189,10 @@
</el-form> </el-form>
<el-table <el-table
ref="caseTable" ref="caseTable"
:data="casesPagedList"
:data="casesPageData"
:height="height - 32" :height="height - 32"
border border
v-loading="casesDataLoading"
@selection-change="handleCaseSelectionChange" @selection-change="handleCaseSelectionChange"
style="width: 100%;"> style="width: 100%;">
<el-table-column <el-table-column
@ -256,7 +257,7 @@
:current-page="casesPageIndex" :current-page="casesPageIndex"
:page-sizes="[20, 50, 100, 200]" :page-sizes="[20, 50, 100, 200]"
:page-size="casesPageSize" :page-size="casesPageSize"
:total="casesList.length"
:total="casesTotal"
layout="total, sizes, prev, pager, next, jumper"> layout="total, sizes, prev, pager, next, jumper">
</el-pagination> </el-pagination>
</el-tab-pane> </el-tab-pane>
@ -463,6 +464,7 @@ import pallet from "./com_saleBoxManage_pallet.vue"
import { import {
searchRollForOrderNo, searchRollForOrderNo,
searchSoReceiveCasesData, searchSoReceiveCasesData,
searchSoReceiveCasesDataByPage,
deleteSoReceiveCasesData, deleteSoReceiveCasesData,
validateAndScanCaseRoll, validateAndScanCaseRoll,
saveCaseRollList, saveCaseRollList,
@ -512,7 +514,9 @@ export default {
dataListLoading: false, dataListLoading: false,
activeName: 'cases', activeName: 'cases',
// //
casesList: [],
casesPageData: [],
casesTotal: 0,
casesDataLoading: false,
casesStatistics: { casesStatistics: {
boxCountCases: 0, // boxCountCases: 0, //
boxCountRolls: 0, // boxCountRolls: 0, //
@ -884,12 +888,6 @@ export default {
exportName: '销售出库单'+this.dayjs().format('YYYYMMDDHHmmss'), exportName: '销售出库单'+this.dayjs().format('YYYYMMDDHHmmss'),
} }
}, },
computed: {
casesPagedList() {
const start = (this.casesPageIndex - 1) * this.casesPageSize
return this.casesList.slice(start, start + this.casesPageSize)
}
},
/*组件*/ /*组件*/
components: { components: {
@ -1059,25 +1057,54 @@ export default {
sizeChangeCasesHandle(val) { sizeChangeCasesHandle(val) {
this.casesPageSize = val this.casesPageSize = val
this.casesPageIndex = 1 this.casesPageIndex = 1
this.refreshCasesTable(false)
}, },
// - // -
currentChangeCasesHandle(val) { currentChangeCasesHandle(val) {
this.casesPageIndex = val this.casesPageIndex = val
this.refreshCasesTable(false)
}, },
// ===== ===== // ===== =====
refreshCasesTable(){
refreshCasesTable(resetPage = true){
if (resetPage) {
this.casesPageIndex = 1
}
//
if (!this.currentRow || !this.currentRow.orderNo) {
this.casesDataLoading = false
this.casesTotal = 0
this.casesPageIndex = 1
this.casesPageData = []
this.selectedCaseRecords = []
this.casesStatistics.boxCountCases = 0
this.casesStatistics.boxCountRolls = 0
this.casesStatistics.totalQty = 0
return
}
let templateData = { let templateData = {
site: this.currentRow.site, site: this.currentRow.site,
buNo: this.currentRow.buNo, buNo: this.currentRow.buNo,
notifyNo: this.currentRow.orderNo, notifyNo: this.currentRow.orderNo,
page: this.casesPageIndex,
limit: this.casesPageSize
} }
searchSoReceiveCasesData(templateData).then(({data}) => {
this.casesList = data.rows || []
this.casesPageIndex = 1
// -
if (data.rows && data.rows.length > 0) {
const firstRecord = data.rows[0]
this.casesDataLoading = true
searchSoReceiveCasesDataByPage(templateData).then(({data}) => {
const pageData = data.page || {}
const rows = pageData.list || []
this.casesPageData = rows
this.casesTotal = pageData.totalCount || 0
this.casesPageIndex = pageData.currPage || this.casesPageIndex
this.selectedCaseRecords = []
this.$nextTick(() => {
if (this.$refs.caseTable && typeof this.$refs.caseTable.clearSelection === 'function') {
this.$refs.caseTable.clearSelection()
}
})
// -
if (rows.length > 0) {
const firstRecord = rows[0]
this.casesStatistics.boxCountCases = firstRecord.boxCountCases || 0 this.casesStatistics.boxCountCases = firstRecord.boxCountCases || 0
this.casesStatistics.boxCountRolls = firstRecord.boxCountRolls || 0 this.casesStatistics.boxCountRolls = firstRecord.boxCountRolls || 0
this.casesStatistics.totalQty = firstRecord.totalQty || 0 this.casesStatistics.totalQty = firstRecord.totalQty || 0
@ -1086,6 +1113,8 @@ export default {
this.casesStatistics.boxCountRolls = 0 this.casesStatistics.boxCountRolls = 0
this.casesStatistics.totalQty = 0 this.casesStatistics.totalQty = 0
} }
}).finally(() => {
this.casesDataLoading = false
}) })
}, },

1
src/views/modules/shopOrder/workOrderAlloc/searchWorkOrderAlloc.vue

@ -71,6 +71,7 @@
<el-option label="已排产" value="已排产"></el-option> <el-option label="已排产" value="已排产"></el-option>
<el-option label="已开工" value="已开工"></el-option> <el-option label="已开工" value="已开工"></el-option>
<el-option label="已停工" value="已停工"></el-option> <el-option label="已停工" value="已停工"></el-option>
<el-option label="已完工" value="已完工"></el-option>
<el-option label="已关闭" value="已关闭"></el-option> <el-option label="已关闭" value="已关闭"></el-option>
<el-option label="已取消" value="已取消"></el-option> <el-option label="已取消" value="已取消"></el-option>
</el-select> </el-select>

Loading…
Cancel
Save