feat(crm): 订单项控制器添加分页功能并新增销售员和合同查询接口
- 将getCoilsByOrderId方法改为分页查询,返回TableDataInfo格式 - 新增getCoilsBySalesman接口,支持按销售员查询生产成果钢卷列表 - 新增getCoilsByContractIdPaginated接口,支持按合同ID分页查询生产成果 - 更新前端API调用适配分页参数传递 - 修改listOrderPackaging接口支持分页查询 - 更新相关Vue组件适配新的分页数据结构返回格式
This commit is contained in:
@@ -44,12 +44,13 @@ export function delOrder(orderId) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询该订单下的所有配卷
|
||||
* 查询该订单下的配卷(分页)
|
||||
*/
|
||||
export function listOrderPackaging(orderId) {
|
||||
export function listOrderPackaging(orderId, query) {
|
||||
return request({
|
||||
url: `/crm/orderItem/coils/order/${orderId}`,
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -69,13 +69,11 @@ export function getBoundCoilStatisticsList(query) {
|
||||
})
|
||||
}
|
||||
|
||||
// 按销售员查询订单明细的卷
|
||||
export function listDeliveryWaybillDetailBySaleman(principal) {
|
||||
// 按销售员查询订单明细的卷(分页)
|
||||
export function listDeliveryWaybillDetailBySaleman(query) {
|
||||
return request({
|
||||
url: '/wms/deliveryWaybillDetail/coilListByPrincipal',
|
||||
method: 'get',
|
||||
params: {
|
||||
principal: principal
|
||||
}
|
||||
params: query
|
||||
})
|
||||
}
|
||||
@@ -371,8 +371,8 @@ export default {
|
||||
// 获取订单已发货的钢卷
|
||||
getShippedCoils() {
|
||||
if (this.orderId) {
|
||||
listOrderPackaging(this.orderId).then(response => {
|
||||
this.shippedCoils = response.data || [];
|
||||
listOrderPackaging(this.orderId, { pageNum: 1, pageSize: 10000 }).then(response => {
|
||||
this.shippedCoils = response.rows || [];
|
||||
}).catch(() => {
|
||||
this.shippedCoils = [];
|
||||
});
|
||||
|
||||
@@ -504,8 +504,8 @@ export default {
|
||||
},
|
||||
/** 查询合同配卷列表 */
|
||||
getCoilList() {
|
||||
listOrderPackaging(this.form.orderId).then(response => {
|
||||
this.coilList = response.data || [];
|
||||
listOrderPackaging(this.form.orderId, { pageNum: 1, pageSize: 10000 }).then(response => {
|
||||
this.coilList = response.rows || [];
|
||||
})
|
||||
},
|
||||
/** 刷新生产成果列表(批量转单后调用) */
|
||||
|
||||
@@ -469,8 +469,8 @@ export default {
|
||||
// 获取订单已发货的钢卷
|
||||
getShippedCoils() {
|
||||
if (this.form.orderId) {
|
||||
listOrderPackaging(this.form.orderId).then(response => {
|
||||
this.shippedCoils = response.data || [];
|
||||
listOrderPackaging(this.form.orderId, { pageNum: 1, pageSize: 10000 }).then(response => {
|
||||
this.shippedCoils = response.rows || [];
|
||||
}).catch(() => {
|
||||
this.shippedCoils = [];
|
||||
});
|
||||
|
||||
@@ -259,8 +259,8 @@ export default {
|
||||
},
|
||||
/** 查询发货配卷列表 */
|
||||
getCoilList() {
|
||||
listOrderPackaging(this.currentOrder.orderId).then(response => {
|
||||
this.coilList = response.data || [];
|
||||
listOrderPackaging(this.currentOrder.orderId, { pageNum: 1, pageSize: 10000 }).then(response => {
|
||||
this.coilList = response.rows || [];
|
||||
});
|
||||
},
|
||||
/** 合同号改变事件 */
|
||||
|
||||
@@ -310,8 +310,8 @@ export default {
|
||||
});
|
||||
}
|
||||
case 'planDelivery':
|
||||
return listDeliveryWaybillDetailBySaleman(dictValue).then(response => {
|
||||
this.deliveryList = response;
|
||||
return listDeliveryWaybillDetailBySaleman({ principal: dictValue, pageNum: 1, pageSize: 10000 }).then(response => {
|
||||
this.deliveryList = response.rows || [];
|
||||
this.loadedTabs.planDelivery = true;
|
||||
this.rightLoading = false;
|
||||
}).catch(() => {
|
||||
|
||||
Reference in New Issue
Block a user