refactor(crm): 统一配卷查询接口并增加筛选功能
- 将所有配卷查询接口统一为POST + Body BO方式 - 为配卷查询添加钢卷号、材料类型、质量状态、发货状态筛选条件 - 在合同详情页面为生产成果和发货配卷添加筛选表单 - 在订单页面为发货配卷添加筛选功能 - 在销售员页面为生产成果和计划发货添加筛选功能 - 更新异议管理页面的配卷查询参数结构 - 增加订单ID参数用于合同ID相关查询的兼容性处理
This commit is contained in:
@@ -59,6 +59,35 @@
|
||||
|
||||
<!-- 生产成果 -->
|
||||
<div v-show="activeTab === 'product'" v-loading="productCoilLoading">
|
||||
<el-form :inline="true" size="small" class="coil-filter-bar">
|
||||
<el-form-item label="钢卷号">
|
||||
<el-input v-model="productCoilBo.currentCoilNo" placeholder="当前钢卷号" clearable @keyup.enter.native="handleProductFilter" style="width: 160px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="材料类型">
|
||||
<el-select v-model="productCoilBo.materialType" placeholder="全部" clearable style="width: 100px;">
|
||||
<el-option label="成品" value="成品" />
|
||||
<el-option label="原料" value="原料" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="质量状态">
|
||||
<el-select v-model="productCoilBo.qualityStatus" placeholder="全部" clearable style="width: 100px;">
|
||||
<el-option label="正常" value="0" />
|
||||
<el-option label="待检" value="1" />
|
||||
<el-option label="不合格" value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="发货状态">
|
||||
<el-select v-model="productCoilBo.status" placeholder="全部" clearable style="width: 100px;">
|
||||
<el-option label="在库" :value="0" />
|
||||
<el-option label="在途" :value="1" />
|
||||
<el-option label="已发货" :value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" size="mini" @click="handleProductFilter">查询</el-button>
|
||||
<el-button size="mini" @click="resetProductFilter">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<CoilTable ref="productCoilTable" :data="productCoilList || []" :showSelection="true"
|
||||
:pagination="productPagination" :total-statistics="productTotalStatistics"
|
||||
@selection-change="handleProductSelectionChange"
|
||||
@@ -74,6 +103,35 @@
|
||||
|
||||
<!-- 发货配卷 -->
|
||||
<div v-show="activeTab === 'coil'" v-loading="deliveryCoilLoading">
|
||||
<el-form :inline="true" size="small" class="coil-filter-bar">
|
||||
<el-form-item label="钢卷号">
|
||||
<el-input v-model="deliveryCoilBo.currentCoilNo" placeholder="当前钢卷号" clearable @keyup.enter.native="handleDeliveryFilter" style="width: 160px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="材料类型">
|
||||
<el-select v-model="deliveryCoilBo.materialType" placeholder="全部" clearable style="width: 100px;">
|
||||
<el-option label="成品" value="成品" />
|
||||
<el-option label="原料" value="原料" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="质量状态">
|
||||
<el-select v-model="deliveryCoilBo.qualityStatus" placeholder="全部" clearable style="width: 100px;">
|
||||
<el-option label="正常" value="0" />
|
||||
<el-option label="待检" value="1" />
|
||||
<el-option label="不合格" value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="发货状态">
|
||||
<el-select v-model="deliveryCoilBo.status" placeholder="全部" clearable style="width: 100px;">
|
||||
<el-option label="在库" :value="0" />
|
||||
<el-option label="在途" :value="1" />
|
||||
<el-option label="已发货" :value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" size="mini" @click="handleDeliveryFilter">查询</el-button>
|
||||
<el-button size="mini" @click="resetDeliveryFilter">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<CoilTable :data="deliveryCoilList || []"
|
||||
:pagination="deliveryPagination" :total-statistics="deliveryTotalStatistics"
|
||||
@page-change="handleDeliveryPageChange" />
|
||||
@@ -205,10 +263,12 @@ export default {
|
||||
productCoilStatistics: {},
|
||||
productPagination: { total: 0, currentPage: 1, pageSize: 20 },
|
||||
productCoilLoading: false,
|
||||
productCoilBo: {},
|
||||
deliveryCoilList: [],
|
||||
deliveryCoilStatistics: {},
|
||||
deliveryPagination: { total: 0, currentPage: 1, pageSize: 20 },
|
||||
deliveryCoilLoading: false,
|
||||
deliveryCoilBo: {},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -302,9 +362,11 @@ export default {
|
||||
},
|
||||
fetchDeliveryCoils() {
|
||||
this.deliveryCoilLoading = true;
|
||||
listDeliveryCoilsByOrder(this.orderId, {
|
||||
listDeliveryCoilsByOrder({
|
||||
orderId: this.orderId,
|
||||
pageNum: this.deliveryPagination.currentPage,
|
||||
pageSize: this.deliveryPagination.pageSize
|
||||
pageSize: this.deliveryPagination.pageSize,
|
||||
coilBo: this.deliveryCoilBo
|
||||
}).then(res => {
|
||||
this.deliveryCoilList = res.rows || [];
|
||||
this.deliveryPagination.total = res.total || 0;
|
||||
@@ -314,9 +376,11 @@ export default {
|
||||
},
|
||||
fetchProductCoils() {
|
||||
this.productCoilLoading = true;
|
||||
listProductCoilsByContract(this.orderId, {
|
||||
listProductCoilsByContract({
|
||||
contractId: this.orderId,
|
||||
pageNum: this.productPagination.currentPage,
|
||||
pageSize: this.productPagination.pageSize
|
||||
pageSize: this.productPagination.pageSize,
|
||||
coilBo: this.productCoilBo
|
||||
}).then(res => {
|
||||
this.productCoilList = res.rows || [];
|
||||
this.productPagination.total = res.total || 0;
|
||||
@@ -325,15 +389,33 @@ export default {
|
||||
});
|
||||
},
|
||||
fetchDeliveryCoilStatistics() {
|
||||
getDeliveryCoilsStatisticsByOrder(this.orderId).then(res => {
|
||||
getDeliveryCoilsStatisticsByOrder({ orderId: this.orderId, coilBo: this.deliveryCoilBo }).then(res => {
|
||||
this.deliveryCoilStatistics = res.data || {};
|
||||
});
|
||||
},
|
||||
fetchProductCoilStatistics() {
|
||||
getProductCoilsStatisticsByContract(this.orderId).then(res => {
|
||||
getProductCoilsStatisticsByContract({ contractId: this.orderId, coilBo: this.productCoilBo }).then(res => {
|
||||
this.productCoilStatistics = res.data || {};
|
||||
});
|
||||
},
|
||||
handleProductFilter() {
|
||||
this.productPagination.currentPage = 1;
|
||||
this.fetchProductCoils();
|
||||
this.fetchProductCoilStatistics();
|
||||
},
|
||||
resetProductFilter() {
|
||||
this.productCoilBo = {};
|
||||
this.handleProductFilter();
|
||||
},
|
||||
handleDeliveryFilter() {
|
||||
this.deliveryPagination.currentPage = 1;
|
||||
this.fetchDeliveryCoils();
|
||||
this.fetchDeliveryCoilStatistics();
|
||||
},
|
||||
resetDeliveryFilter() {
|
||||
this.deliveryCoilBo = {};
|
||||
this.handleDeliveryFilter();
|
||||
},
|
||||
handleProductPageChange({ currentPage, pageSize }) {
|
||||
this.productPagination.currentPage = currentPage;
|
||||
this.productPagination.pageSize = pageSize;
|
||||
|
||||
Reference in New Issue
Block a user