refactor(crm): 统一配卷查询接口并增加筛选功能
- 将所有配卷查询接口统一为POST + Body BO方式 - 为配卷查询添加钢卷号、材料类型、质量状态、发货状态筛选条件 - 在合同详情页面为生产成果和发货配卷添加筛选表单 - 在订单页面为发货配卷添加筛选功能 - 在销售员页面为生产成果和计划发货添加筛选功能 - 更新异议管理页面的配卷查询参数结构 - 增加订单ID参数用于合同ID相关查询的兼容性处理
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// ==================== 配卷列表查询 ====================
|
||||
// ==================== 配卷列表查询(统一 POST + Body BO) ====================
|
||||
|
||||
// 指定客户的发货配卷列表
|
||||
export function listDeliveryCoilsByCustomer(customerId) {
|
||||
@@ -10,74 +10,76 @@ export function listDeliveryCoilsByCustomer(customerId) {
|
||||
})
|
||||
}
|
||||
|
||||
// 指定合同的发货配卷列表(分页)
|
||||
export function listDeliveryCoilsByOrder(orderId, query) {
|
||||
// 根据订单ID分页查询发货配卷
|
||||
export function listDeliveryCoilsByOrder(queryBo) {
|
||||
return request({
|
||||
url: `/crm/orderItem/coils/order/${orderId}`,
|
||||
method: 'get',
|
||||
params: query
|
||||
url: '/crm/orderItem/coils/order/query',
|
||||
method: 'post',
|
||||
data: queryBo
|
||||
})
|
||||
}
|
||||
|
||||
// 指定销售员的发货配卷列表(分页)
|
||||
export function listDeliveryCoilsByPrincipal(query) {
|
||||
// 根据销售员分页查询生产成果
|
||||
export function listProductCoilsBySalesman(queryBo) {
|
||||
return request({
|
||||
url: '/crm/orderItem/coils/salesman/query',
|
||||
method: 'post',
|
||||
data: queryBo
|
||||
})
|
||||
}
|
||||
|
||||
// 根据合同ID分页查询生产成果
|
||||
export function listProductCoilsByContract(queryBo) {
|
||||
return request({
|
||||
url: '/crm/orderItem/coils/contract/query',
|
||||
method: 'post',
|
||||
data: queryBo
|
||||
})
|
||||
}
|
||||
|
||||
// 指定负责人的计划发货配卷列表(分页)
|
||||
export function listDeliveryCoilsByPrincipal(queryBo) {
|
||||
return request({
|
||||
url: '/wms/deliveryWaybillDetail/coilListByPrincipal',
|
||||
method: 'get',
|
||||
params: query
|
||||
method: 'post',
|
||||
data: queryBo
|
||||
})
|
||||
}
|
||||
|
||||
// 指定销售员的生产成果列表(分页)
|
||||
export function listProductCoilsBySalesman(query) {
|
||||
return request({
|
||||
url: '/crm/orderItem/coils/bySalesman',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 指定合同的生产成果列表(分页)
|
||||
export function listProductCoilsByContract(contractId, query) {
|
||||
return request({
|
||||
url: `/crm/orderItem/coils/byContract/${contractId}`,
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// ==================== 配卷统计汇总 ====================
|
||||
// ==================== 配卷统计汇总(统一 POST + Body BO) ====================
|
||||
|
||||
// 根据订单ID统计发货配卷汇总
|
||||
export function getDeliveryCoilsStatisticsByOrder(orderId) {
|
||||
export function getDeliveryCoilsStatisticsByOrder(queryBo) {
|
||||
return request({
|
||||
url: `/crm/orderItem/coils/order/${orderId}/statistics`,
|
||||
method: 'get'
|
||||
url: '/crm/orderItem/coils/order/statistics',
|
||||
method: 'post',
|
||||
data: queryBo
|
||||
})
|
||||
}
|
||||
|
||||
// 根据销售员统计生产成果汇总
|
||||
export function getProductCoilsStatisticsBySalesman(salesman) {
|
||||
export function getProductCoilsStatisticsBySalesman(queryBo) {
|
||||
return request({
|
||||
url: '/crm/orderItem/coils/bySalesman/statistics',
|
||||
method: 'get',
|
||||
params: { salesman }
|
||||
url: '/crm/orderItem/coils/salesman/statistics',
|
||||
method: 'post',
|
||||
data: queryBo
|
||||
})
|
||||
}
|
||||
|
||||
// 根据合同ID统计生产成果汇总
|
||||
export function getProductCoilsStatisticsByContract(contractId) {
|
||||
export function getProductCoilsStatisticsByContract(queryBo) {
|
||||
return request({
|
||||
url: `/crm/orderItem/coils/byContract/${contractId}/statistics`,
|
||||
method: 'get'
|
||||
url: '/crm/orderItem/coils/contract/statistics',
|
||||
method: 'post',
|
||||
data: queryBo
|
||||
})
|
||||
}
|
||||
|
||||
// 根据负责人统计发货配卷汇总
|
||||
export function getDeliveryCoilsStatisticsByPrincipal(principal) {
|
||||
export function getDeliveryCoilsStatisticsByPrincipal(queryBo) {
|
||||
return request({
|
||||
url: '/wms/deliveryWaybillDetail/coilListByPrincipal/statistics',
|
||||
method: 'get',
|
||||
params: { principal }
|
||||
method: 'post',
|
||||
data: queryBo
|
||||
})
|
||||
}
|
||||
|
||||
@@ -44,13 +44,14 @@ export function delOrder(orderId) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询该订单下的配卷(分页)
|
||||
* 查询该订单下的配卷(分页),支持钢卷信息筛选
|
||||
* @param {object} queryBo - { orderId, pageNum, pageSize, ...钢卷筛选条件 }
|
||||
*/
|
||||
export function listOrderPackaging(orderId, query) {
|
||||
export function listOrderPackaging(queryBo) {
|
||||
return request({
|
||||
url: `/crm/orderItem/coils/order/${orderId}`,
|
||||
method: 'get',
|
||||
params: query
|
||||
url: '/crm/orderItem/coils/order/query',
|
||||
method: 'post',
|
||||
data: queryBo
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -70,10 +70,10 @@ export function getBoundCoilStatisticsList(query) {
|
||||
}
|
||||
|
||||
// 按销售员查询订单明细的卷(分页)
|
||||
export function listDeliveryWaybillDetailBySaleman(query) {
|
||||
export function listDeliveryWaybillDetailBySaleman(queryBo) {
|
||||
return request({
|
||||
url: '/wms/deliveryWaybillDetail/coilListByPrincipal',
|
||||
method: 'get',
|
||||
params: query
|
||||
method: 'post',
|
||||
data: queryBo
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -371,7 +371,7 @@ export default {
|
||||
// 获取订单已发货的钢卷
|
||||
getShippedCoils() {
|
||||
if (this.orderId) {
|
||||
listOrderPackaging(this.orderId, { pageNum: 1, pageSize: 10000 }).then(response => {
|
||||
listOrderPackaging({ orderId: this.orderId, pageNum: 1, pageSize: 10000 }).then(response => {
|
||||
this.shippedCoils = response.rows || [];
|
||||
}).catch(() => {
|
||||
this.shippedCoils = [];
|
||||
@@ -458,7 +458,7 @@ export default {
|
||||
...this.form,
|
||||
coilIds: this.coilListToCsv(this.formCoilList)
|
||||
};
|
||||
|
||||
|
||||
if (this.form.objectionId != null) {
|
||||
updateSalesObjection(formData).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -398,7 +398,7 @@ export default {
|
||||
...this.form,
|
||||
coilIds: this.coilListToCsv(this.formCoilList)
|
||||
};
|
||||
|
||||
|
||||
if (this.form.objectionId != null) {
|
||||
updateSalesObjection(formData).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
@@ -465,11 +465,11 @@ export default {
|
||||
path: '/wms/coil/' + coil.coilId,
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 获取订单已发货的钢卷
|
||||
getShippedCoils() {
|
||||
if (this.form.orderId) {
|
||||
listOrderPackaging(this.form.orderId, { pageNum: 1, pageSize: 10000 }).then(response => {
|
||||
listOrderPackaging({ orderId: this.form.orderId, pageNum: 1, pageSize: 10000 }).then(response => {
|
||||
this.shippedCoils = response.rows || [];
|
||||
}).catch(() => {
|
||||
this.shippedCoils = [];
|
||||
|
||||
@@ -86,6 +86,28 @@
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="发货配卷" name="coil">
|
||||
<div class="order-record" v-if="activeTab === 'coil'">
|
||||
<el-form :inline="true" size="small" class="coil-filter-bar" style="margin-bottom: 8px;">
|
||||
<el-form-item label="钢卷号">
|
||||
<el-input v-model="coilBo.currentCoilNo" placeholder="当前钢卷号" clearable @keyup.enter.native="handleCoilFilter" style="width: 160px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="材料类型">
|
||||
<el-select v-model="coilBo.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="coilBo.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="handleCoilFilter">查询</el-button>
|
||||
<el-button size="mini" @click="resetCoilFilter">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- 发货配卷内容 -->
|
||||
<CoilTable :data="coilList" />
|
||||
</div>
|
||||
@@ -227,6 +249,7 @@ export default {
|
||||
customerList: [],
|
||||
contractList: [],
|
||||
coilList: [],
|
||||
coilBo: {},
|
||||
deliveryWaybillList: [],
|
||||
}
|
||||
},
|
||||
@@ -259,10 +282,22 @@ export default {
|
||||
},
|
||||
/** 查询发货配卷列表 */
|
||||
getCoilList() {
|
||||
listOrderPackaging(this.currentOrder.orderId, { pageNum: 1, pageSize: 10000 }).then(response => {
|
||||
listOrderPackaging({
|
||||
orderId: this.currentOrder.orderId,
|
||||
pageNum: 1,
|
||||
pageSize: 10000,
|
||||
coilBo: this.coilBo
|
||||
}).then(response => {
|
||||
this.coilList = response.rows || [];
|
||||
});
|
||||
},
|
||||
handleCoilFilter() {
|
||||
this.getCoilList();
|
||||
},
|
||||
resetCoilFilter() {
|
||||
this.coilBo = {};
|
||||
this.getCoilList();
|
||||
},
|
||||
/** 合同号改变事件 */
|
||||
handleContractChange(contractId) {
|
||||
const contract = this.contractList.find(item => item.contractId === contractId)
|
||||
@@ -398,4 +433,4 @@ export default {
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -77,14 +77,65 @@
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="生产成果" name="production">
|
||||
<div v-loading="productCoilLoading">
|
||||
<CoilTable :data="productList || []" table-height="calc(100vh - 240px)"
|
||||
<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 :data="productList || []" table-height="calc(100vh - 290px)"
|
||||
:pagination="productPagination" :total-statistics="productTotalStatistics"
|
||||
@page-change="handleProductPageChange" />
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="计划发货" name="planDelivery">
|
||||
<div v-loading="deliveryCoilLoading">
|
||||
<CoilTable :data="deliveryList || []" table-height="calc(100vh - 240px)"
|
||||
<el-form :inline="true" size="small" class="coil-filter-bar" style="margin-bottom: 8px;">
|
||||
<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>
|
||||
<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="deliveryList || []" table-height="calc(100vh - 290px)"
|
||||
:pagination="deliveryPagination" :total-statistics="deliveryTotalStatistics"
|
||||
@page-change="handleDeliveryPageChange" />
|
||||
</div>
|
||||
@@ -181,6 +232,8 @@ export default {
|
||||
productPagination: { total: 0, currentPage: 1, pageSize: 20 },
|
||||
// 生产成果统计
|
||||
productCoilStatistics: {},
|
||||
// 生产成果筛选
|
||||
productCoilBo: {},
|
||||
// 生产成果加载
|
||||
productCoilLoading: false,
|
||||
// 计划发货列表
|
||||
@@ -189,6 +242,8 @@ export default {
|
||||
deliveryPagination: { total: 0, currentPage: 1, pageSize: 20 },
|
||||
// 计划发货统计
|
||||
deliveryCoilStatistics: {},
|
||||
// 计划发货筛选
|
||||
deliveryCoilBo: {},
|
||||
// 计划发货加载
|
||||
deliveryCoilLoading: false,
|
||||
// 发货单据列表
|
||||
@@ -292,7 +347,7 @@ export default {
|
||||
return Promise.resolve();
|
||||
}
|
||||
this.rightLoading = true;
|
||||
|
||||
|
||||
switch (tabName) {
|
||||
case 'customer':
|
||||
return listCustomer({
|
||||
@@ -349,9 +404,10 @@ export default {
|
||||
fetchProductCoils(salesman) {
|
||||
this.productCoilLoading = true;
|
||||
return listProductCoilsBySalesman({
|
||||
salesman: salesman,
|
||||
salesman,
|
||||
pageNum: this.productPagination.currentPage,
|
||||
pageSize: this.productPagination.pageSize
|
||||
pageSize: this.productPagination.pageSize,
|
||||
coilBo: this.productCoilBo
|
||||
}).then(res => {
|
||||
this.productList = res.rows || [];
|
||||
this.productPagination.total = res.total || 0;
|
||||
@@ -364,16 +420,28 @@ export default {
|
||||
});
|
||||
},
|
||||
fetchProductCoilStatistics(salesman) {
|
||||
getProductCoilsStatisticsBySalesman(salesman).then(res => {
|
||||
getProductCoilsStatisticsBySalesman({ salesman, coilBo: this.productCoilBo }).then(res => {
|
||||
this.productCoilStatistics = res.data || {};
|
||||
});
|
||||
},
|
||||
handleProductFilter() {
|
||||
this.productPagination.currentPage = 1;
|
||||
if (this.selectedItem) {
|
||||
this.fetchProductCoils(this.selectedItem.dictValue);
|
||||
this.fetchProductCoilStatistics(this.selectedItem.dictValue);
|
||||
}
|
||||
},
|
||||
resetProductFilter() {
|
||||
this.productCoilBo = {};
|
||||
this.handleProductFilter();
|
||||
},
|
||||
fetchDeliveryCoils(principal) {
|
||||
this.deliveryCoilLoading = true;
|
||||
return listDeliveryCoilsByPrincipal({
|
||||
principal: principal,
|
||||
principal,
|
||||
pageNum: this.deliveryPagination.currentPage,
|
||||
pageSize: this.deliveryPagination.pageSize
|
||||
pageSize: this.deliveryPagination.pageSize,
|
||||
coilBo: this.deliveryCoilBo
|
||||
}).then(res => {
|
||||
this.deliveryList = res.rows || [];
|
||||
this.deliveryPagination.total = res.total || 0;
|
||||
@@ -386,10 +454,21 @@ export default {
|
||||
});
|
||||
},
|
||||
fetchDeliveryCoilStatistics(principal) {
|
||||
getDeliveryCoilsStatisticsByPrincipal(principal).then(res => {
|
||||
getDeliveryCoilsStatisticsByPrincipal({ principal, coilBo: this.deliveryCoilBo }).then(res => {
|
||||
this.deliveryCoilStatistics = res.data || {};
|
||||
});
|
||||
},
|
||||
handleDeliveryFilter() {
|
||||
this.deliveryPagination.currentPage = 1;
|
||||
if (this.selectedItem) {
|
||||
this.fetchDeliveryCoils(this.selectedItem.dictValue);
|
||||
this.fetchDeliveryCoilStatistics(this.selectedItem.dictValue);
|
||||
}
|
||||
},
|
||||
resetDeliveryFilter() {
|
||||
this.deliveryCoilBo = {};
|
||||
this.handleDeliveryFilter();
|
||||
},
|
||||
handleProductPageChange({ currentPage, pageSize }) {
|
||||
this.productPagination.currentPage = currentPage;
|
||||
this.productPagination.pageSize = pageSize;
|
||||
|
||||
@@ -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