refactor(crm): 统一配卷查询接口并增加筛选功能
- 将所有配卷查询接口统一为POST + Body BO方式 - 为配卷查询添加钢卷号、材料类型、质量状态、发货状态筛选条件 - 在合同详情页面为生产成果和发货配卷添加筛选表单 - 在订单页面为发货配卷添加筛选功能 - 在销售员页面为生产成果和计划发货添加筛选功能 - 更新异议管理页面的配卷查询参数结构 - 增加订单ID参数用于合同ID相关查询的兼容性处理
This commit is contained in:
@@ -132,6 +132,35 @@
|
||||
</div>
|
||||
<div class="detail-card-body" style="padding: 12px;">
|
||||
<div v-loading="productCoilLoading">
|
||||
<el-form :inline="true" size="small" class="coil-filter-bar" style="margin-bottom: 8px;">
|
||||
<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" @page-change="handleProductPageChange">
|
||||
@@ -221,6 +250,7 @@ export default {
|
||||
productCoilStatistics: {},
|
||||
productPagination: { total: 0, currentPage: 1, pageSize: 20 },
|
||||
productCoilLoading: false,
|
||||
productCoilBo: {},
|
||||
batchTransferDialogVisible: false,
|
||||
batchTargetContractId: '',
|
||||
batchTransferCoilIds: [],
|
||||
@@ -387,9 +417,11 @@ export default {
|
||||
fetchProductCoils() {
|
||||
if (!this.currentOrder || !this.currentOrder.orderId) return
|
||||
this.productCoilLoading = true
|
||||
listProductCoilsByContract(this.currentOrder.orderId, {
|
||||
listProductCoilsByContract({
|
||||
contractId: this.currentOrder.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
|
||||
@@ -399,10 +431,19 @@ export default {
|
||||
},
|
||||
fetchProductCoilStatistics() {
|
||||
if (!this.currentOrder || !this.currentOrder.orderId) return
|
||||
getProductCoilsStatisticsByContract(this.currentOrder.orderId).then(res => {
|
||||
getProductCoilsStatisticsByContract({ contractId: this.currentOrder.orderId, coilBo: this.productCoilBo }).then(res => {
|
||||
this.productCoilStatistics = res.data || {}
|
||||
})
|
||||
},
|
||||
handleProductFilter() {
|
||||
this.productPagination.currentPage = 1
|
||||
this.fetchProductCoils()
|
||||
this.fetchProductCoilStatistics()
|
||||
},
|
||||
resetProductFilter() {
|
||||
this.productCoilBo = {}
|
||||
this.handleProductFilter()
|
||||
},
|
||||
handleProductSelectionChange(selection) {
|
||||
this.selectedProductRows = selection
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user