feat(wms/coil): 新增发货单状态筛选视图

1. 在ship.vue页面新增isShipView参数并默认开启
2. 在base面板新增货单状态筛选 radio 组
3. 根据isShipView切换查询逻辑和表格列展示
4. 新增对应统计计数逻辑
This commit is contained in:
2026-06-18 17:00:03 +08:00
parent 7374b810c1
commit d0afe5eaaf
3 changed files with 77 additions and 7 deletions

View File

@@ -299,6 +299,10 @@ export default {
// 添加产品行
addProduct() {
const newItem = { taxDivisor: 1.13 };
const material = this.productMaterialMap[this.productName];
if (material) {
newItem.material = material;
}
this.initProduct(newItem);
this.products.push(newItem);
},

View File

@@ -84,10 +84,14 @@
<el-radio-button label="0">未发货{{ unshippedCount }}</el-radio-button>
<el-radio-button label="1">已发货{{ shippedCount }}</el-radio-button>
</el-radio-group>
<!-- <el-select v-model="queryParams.status" placeholder="请选择发货状态" clearable>
<el-option :value="0" label="未发货">未发货</el-option>
<el-option :value="1" label="已发货">已发货</el-option>
</el-select> -->
</el-form-item>
<el-form-item v-if="isShipView" label="货单状态">
<el-radio-group v-model="shipViewModel.status" @change="handleQuery">
<el-radio-button label="all">全部</el-radio-button>
<el-radio-button label="has">有货单{{ shipViewModel.hasCount }}</el-radio-button>
<el-radio-button label="none">无货单{{ shipViewModel.noneCount }}</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item v-if="showWaybill" label="发货单时间">
@@ -251,13 +255,13 @@
</template>
</el-table-column>
<el-table-column label="发货计划" align="center" prop="nextWarehouseId" v-if="showWaybill" width="150">
<el-table-column label="发货计划" align="center" prop="nextWarehouseId" v-if="showWaybill || (isShipView && shipViewModel.status == 'has')" width="150">
<template slot-scope="scope">
{{ scope.row.bindPlanName || '-' }}
</template>
</el-table-column>
<el-table-column label="发货单据" align="center" prop="nextWarehouseId" v-if="showWaybill" width="150">
<el-table-column label="发货单据" align="center" prop="nextWarehouseId" v-if="showWaybill || (isShipView && shipViewModel.status == 'has')" width="150">
<template slot-scope="scope">
<el-popover placement="top" width="400" trigger="hover">
<div>
@@ -983,9 +987,19 @@ export default {
type: Boolean,
default: false,
},
isShipView: {
type: Boolean,
default: false,
},
},
data() {
return {
shipViewModel: {
status: 'all', // all, has, none
allCount: 0,
hasCount: 0,
noneCount: 0,
},
// 按钮loading
buttonLoading: false,
showProcessFlow: false,
@@ -1845,6 +1859,49 @@ export default {
return;
}
if (this.isShipView) {
// query.status = this.shipViewModel.status;
query.status = 1;
if (this.shipViewModel.status === 'all') {
listMaterialCoil(query).then(response => {
this.materialCoilList = response.rows
this.total = response.total;
this.loading = false;
});
getCoilStatisticsList(statisticQuery).then(res => {
this.statistics = res.data || [];
})
} else if (this.shipViewModel.status === 'has') {
listBoundCoil(query).then(res => {
this.materialCoilList = res.rows || [];
this.total = res.total;
this.loading = false;
})
getBoundCoilStatisticsList(query).then(res => {
this.statistics = res.data || [];
})
} else if (this.shipViewModel.status === 'none') {
query.excludeBound = true;
listMaterialCoil(query).then(response => {
this.materialCoilList = response.rows
this.total = response.total;
this.loading = false;
});
getCoilStatisticsList(statisticQuery).then(res => {
this.statistics = res.data || [];
})
}
listBoundCoil({ ...query, pageNum: 1, pageSize: 1 }).then(res => {
this.shipViewModel.hasCount = res.total;
})
listMaterialCoil({ ...query, pageNum: 1, pageSize: 1, excludeBound: true }).then(response => {
this.shipViewModel.noneCount = response.total;
});
return;
}
listMaterialCoil(query).then(response => {
this.materialCoilList = response.rows
this.total = response.total;

View File

@@ -1,5 +1,13 @@
<template>
<BasePage :qrcode="qrcode" :querys="querys" :labelType="labelType" :showStatus="showStatus" :hideType="hideType" :showControl="showControl" :showExportTime="showExportTime" />
<BasePage
:querys="querys"
:labelType="labelType"
:showStatus="showStatus"
:hideType="hideType"
:showControl="showControl"
:showExportTime="showExportTime"
:isShipView="isShipView"
/>
</template>
<script>
@@ -18,6 +26,7 @@ export default {
// materialType: '成品',
status: 1
},
isShipView: true,
showControl: false,
labelType: '3',
showStatus: false,