feat(wms/coil): 新增发货单状态筛选视图
1. 在ship.vue页面新增isShipView参数并默认开启 2. 在base面板新增货单状态筛选 radio 组 3. 根据isShipView切换查询逻辑和表格列展示 4. 新增对应统计计数逻辑
This commit is contained in:
@@ -299,6 +299,10 @@ export default {
|
|||||||
// 添加产品行
|
// 添加产品行
|
||||||
addProduct() {
|
addProduct() {
|
||||||
const newItem = { taxDivisor: 1.13 };
|
const newItem = { taxDivisor: 1.13 };
|
||||||
|
const material = this.productMaterialMap[this.productName];
|
||||||
|
if (material) {
|
||||||
|
newItem.material = material;
|
||||||
|
}
|
||||||
this.initProduct(newItem);
|
this.initProduct(newItem);
|
||||||
this.products.push(newItem);
|
this.products.push(newItem);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -84,10 +84,14 @@
|
|||||||
<el-radio-button label="0">未发货【{{ unshippedCount }}】</el-radio-button>
|
<el-radio-button label="0">未发货【{{ unshippedCount }}】</el-radio-button>
|
||||||
<el-radio-button label="1">已发货【{{ shippedCount }}】</el-radio-button>
|
<el-radio-button label="1">已发货【{{ shippedCount }}】</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<!-- <el-select v-model="queryParams.status" placeholder="请选择发货状态" clearable>
|
</el-form-item>
|
||||||
<el-option :value="0" label="未发货">未发货</el-option>
|
|
||||||
<el-option :value="1" label="已发货">已发货</el-option>
|
<el-form-item v-if="isShipView" label="货单状态">
|
||||||
</el-select> -->
|
<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>
|
||||||
|
|
||||||
<el-form-item v-if="showWaybill" label="发货单时间">
|
<el-form-item v-if="showWaybill" label="发货单时间">
|
||||||
@@ -251,13 +255,13 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.bindPlanName || '-' }}
|
{{ scope.row.bindPlanName || '-' }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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">
|
<template slot-scope="scope">
|
||||||
<el-popover placement="top" width="400" trigger="hover">
|
<el-popover placement="top" width="400" trigger="hover">
|
||||||
<div>
|
<div>
|
||||||
@@ -983,9 +987,19 @@ export default {
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
isShipView: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
shipViewModel: {
|
||||||
|
status: 'all', // all, has, none
|
||||||
|
allCount: 0,
|
||||||
|
hasCount: 0,
|
||||||
|
noneCount: 0,
|
||||||
|
},
|
||||||
// 按钮loading
|
// 按钮loading
|
||||||
buttonLoading: false,
|
buttonLoading: false,
|
||||||
showProcessFlow: false,
|
showProcessFlow: false,
|
||||||
@@ -1845,6 +1859,49 @@ export default {
|
|||||||
return;
|
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 => {
|
listMaterialCoil(query).then(response => {
|
||||||
this.materialCoilList = response.rows
|
this.materialCoilList = response.rows
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
<template>
|
<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>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -18,6 +26,7 @@ export default {
|
|||||||
// materialType: '成品',
|
// materialType: '成品',
|
||||||
status: 1
|
status: 1
|
||||||
},
|
},
|
||||||
|
isShipView: true,
|
||||||
showControl: false,
|
showControl: false,
|
||||||
labelType: '3',
|
labelType: '3',
|
||||||
showStatus: false,
|
showStatus: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user