feat(crm): 新增配卷相关API并重构合同、销售员页面的配卷管理
1. 新增crm/coil.js封装配卷相关接口,包括列表查询和统计汇总 2. 重构合同页面:移除冗余的coilList状态,改用分页API加载生产成果和发货配卷数据,新增分页和统计展示 3. 重构销售员页面:改用独立分页API获取生产成果和计划发货数据,新增分页、加载状态和全局统计 4. 升级CoilTable组件:支持分页功能和双维度统计(本页/全部)
This commit is contained in:
@@ -26,9 +26,9 @@
|
||||
|
||||
<!-- 右侧下方:Tab标签页 -->
|
||||
<div class="tab-panel" ref="tabPanel" style="flex: 1; overflow-y: auto;">
|
||||
<ContractTabs :orderId="form.orderId" :deliveryWaybillList="wmsDeliveryWaybills" :coilList="coilList" :contract-attachment="form.businessAnnex" :technical-agreement="form.techAnnex"
|
||||
:other-attachment="form.productionSchedule" :currentOrder="form" :productList="form.coilList"
|
||||
@refresh-product="handleRefreshProduct" />
|
||||
<ContractTabs :orderId="form.orderId" :deliveryWaybillList="wmsDeliveryWaybills"
|
||||
:contract-attachment="form.businessAnnex" :technical-agreement="form.techAnnex"
|
||||
:other-attachment="form.productionSchedule" :currentOrder="form" />
|
||||
</div>
|
||||
</div>
|
||||
<div v-else style="flex: 1; display: flex; flex-direction: column;">
|
||||
@@ -229,7 +229,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { delOrder, listOrderPackaging, updateOrder, getOrder, addOrder } from "@/api/crm/order";
|
||||
import { delOrder, updateOrder, getOrder, addOrder } from "@/api/crm/order";
|
||||
import { addCustomer } from "@/api/crm/customer";
|
||||
import { listDeliveryWaybill } from "@/api/wms/deliveryWaybill";
|
||||
import dayjs from "dayjs";
|
||||
@@ -261,7 +261,6 @@ export default {
|
||||
financeList: [],
|
||||
objectionList: [],
|
||||
wmsDeliveryWaybills: [],
|
||||
coilList: [],
|
||||
loading: false,
|
||||
tabLoading: false,
|
||||
// 按钮loading
|
||||
@@ -497,28 +496,10 @@ export default {
|
||||
/** 行点击事件 */
|
||||
handleRowClick(row) {
|
||||
this.form = row;
|
||||
this.getCoilList();
|
||||
listDeliveryWaybill({ orderId: row.orderId, pageNum: 1, pageSize: 50 }).then(res => {
|
||||
this.wmsDeliveryWaybills = res.rows || [];
|
||||
})
|
||||
},
|
||||
/** 查询合同配卷列表 */
|
||||
getCoilList() {
|
||||
listOrderPackaging(this.form.orderId, { pageNum: 1, pageSize: 10000 }).then(response => {
|
||||
this.coilList = response.rows || [];
|
||||
})
|
||||
},
|
||||
/** 刷新生产成果列表(批量转单后调用) */
|
||||
handleRefreshProduct() {
|
||||
if (!this.form.orderId) return;
|
||||
getOrder(this.form.orderId).then(res => {
|
||||
if (res.data) {
|
||||
this.form.coilList = res.data.coilList || [];
|
||||
}
|
||||
}).catch(err => {
|
||||
console.error('刷新生产成果失败:', err);
|
||||
});
|
||||
},
|
||||
/** 表单重置 */
|
||||
reset() {
|
||||
this.form = {
|
||||
|
||||
Reference in New Issue
Block a user