feat(CoilSelector): 新增入场卷号字段并调整当前卷号显示
feat(customer): 新增客户相关配卷和财务信息查询接口 fix(base.vue): 修复发货单时间条件显示问题 refactor(CustomerEdit): 替换地址选择组件为普通输入框 feat(CoilSelector): 增加入场卷号查询条件并调整对话框宽度 style(OrderEdit): 调整客户名称和销售员选择框宽度 refactor(ChinaAreaSelect): 优化地址解析逻辑并支持空对象处理 feat(FileUpload/FileList): 新增文件预览功能组件 refactor(KLPService/CustomerSelect): 优化客户选择组件并支持自定义字段绑定 fix(AbnormalForm): 修复异常位置校验逻辑并保留当前卷号 feat(ContractTabs): 新增合同附件展示功能 refactor(warehouse/record): 重构操作记录统计展示方式 feat(contract): 集成客户选择组件并优化合同信息填充 refactor(order): 调整订单表单布局并集成合同信息 feat(FilePreview): 新增文件预览组件 feat(customer): 新增财务状态和发货配卷展示 refactor(CustomerOrder): 移除冗余代码并优化布局 feat(PlanDetailForm): 新增合同附件查看功能 feat(dict): 新增字典管理页面
This commit is contained in:
@@ -7,9 +7,14 @@
|
||||
<template slot="title">
|
||||
<!-- 在这里选择订单后快速填写相关信息 -->
|
||||
<span>订单信息</span>
|
||||
<el-button @click.stop="openOrderDialog" style="margin-left: 10px;" plain :type="formData.orderId ? 'success' : 'default'">
|
||||
{{ formData.orderId ? formData.orderCode : '选择订单' }}
|
||||
</el-button>
|
||||
<el-button @click.stop="openOrderDialog" style="margin-left: 10px;" plain
|
||||
:type="formData.orderId ? 'success' : 'default'">
|
||||
{{ formData.orderId ? formData.orderCode : '选择订单' }}
|
||||
</el-button>
|
||||
<div v-if="formData.orderId" @click.stop="openOrderAttachmentDialog" style="margin-left: 10px; cursor: pointer; color: #409eff;"
|
||||
type="primary">
|
||||
查看附件
|
||||
</div>
|
||||
</template>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
@@ -207,12 +212,8 @@
|
||||
<el-form :model="orderQueryParams" ref="orderQueryForm" size="small" :inline="true" label-width="80px">
|
||||
<el-form-item label="合同号">
|
||||
<el-select v-model="orderQueryParams.contractId" placeholder="请选择合同">
|
||||
<el-option
|
||||
v-for="contract in contractList"
|
||||
:key="contract.contractId"
|
||||
:label="contract.contractNo"
|
||||
:value="contract.contractId"
|
||||
/>
|
||||
<el-option v-for="contract in contractList" :key="contract.contractId" :label="contract.contractNo"
|
||||
:value="contract.contractId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单号">
|
||||
@@ -250,14 +251,26 @@
|
||||
|
||||
<!-- 分页 -->
|
||||
<div class="pagination-container">
|
||||
<el-pagination
|
||||
background
|
||||
layout="prev, pager, next, jumper"
|
||||
:total="orderTotal"
|
||||
:page-size="orderQueryParams.pageSize"
|
||||
:current-page.sync="orderQueryParams.pageNum"
|
||||
@current-change="getOrderList"
|
||||
/>
|
||||
<el-pagination background layout="prev, pager, next, jumper" :total="orderTotal"
|
||||
:page-size="orderQueryParams.pageSize" :current-page.sync="orderQueryParams.pageNum"
|
||||
@current-change="getOrderList" />
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="合同附件" :visible.sync="attachmentOpen" width="50%" append-to-body>
|
||||
<div class="attachment-section" v-loading="loading">
|
||||
<!-- <div class="attachment-item">
|
||||
<h4>商务附件</h4>
|
||||
<FileList :oss-ids="contractAttachment" />
|
||||
</div> -->
|
||||
<div class="attachment-item">
|
||||
<h4>技术附件</h4>
|
||||
<FileList :oss-ids="contract.techAnnex" />
|
||||
</div>
|
||||
<div class="attachment-item">
|
||||
<h4>排产函</h4>
|
||||
<FileList :oss-ids="contract.productionSchedule" />
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@@ -265,8 +278,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listOrder } from '@/api/crm/order';
|
||||
import { listContract } from '@/api/crm/contract';
|
||||
import { listOrder, getOrder } from '@/api/crm/order';
|
||||
import { listContract, getContract } from '@/api/crm/contract';
|
||||
import FileList from '@/components/FileList'
|
||||
|
||||
export default {
|
||||
name: "PlanDetailForm",
|
||||
@@ -284,6 +298,9 @@ export default {
|
||||
default: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
FileList
|
||||
},
|
||||
computed: {
|
||||
formData: {
|
||||
get() {
|
||||
@@ -330,7 +347,10 @@ export default {
|
||||
contractId: undefined,
|
||||
contractCode: undefined,
|
||||
customerName: undefined
|
||||
}
|
||||
},
|
||||
attachmentOpen: false,
|
||||
contract: {},
|
||||
loading: false,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
@@ -349,6 +369,29 @@ export default {
|
||||
// 加载订单列表
|
||||
this.getOrderList();
|
||||
},
|
||||
async openOrderAttachmentDialog() {
|
||||
this.loading = true;
|
||||
this.attachmentOpen = true;
|
||||
// 根据订单id获取订单详情,拿到合同id
|
||||
try {
|
||||
if (!this.formData.orderId) {
|
||||
this.$message.error('订单不存在')
|
||||
return;
|
||||
}
|
||||
const order = await getOrder(this.formData.orderId);
|
||||
if (!order.data.contractId) {
|
||||
this.$message.error('未找到合同')
|
||||
return;
|
||||
}
|
||||
// 根据合同id拿到合同详情
|
||||
const contract = await getContract(order.data.contractId);
|
||||
this.contract = contract.data;
|
||||
} catch {
|
||||
this.$message.error('获取合同附件失败')
|
||||
} finally {
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
/** 获取合同列表 */
|
||||
getContractList() {
|
||||
listContract().then(response => {
|
||||
@@ -388,6 +431,7 @@ export default {
|
||||
this.formData.contractCode = row.contractCode;
|
||||
this.formData.customerName = row.companyName;
|
||||
this.formData.salesman = row.salesman;
|
||||
this.formData.orderId = row.orderId;
|
||||
this.dialogVisible = false;
|
||||
},
|
||||
/** 处理订单行点击 */
|
||||
@@ -411,4 +455,24 @@ export default {
|
||||
margin-top: 20px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.attachment-section {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.attachment-item {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.attachment-item h4 {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
.attachment-item .file-list-container {
|
||||
border: 1px solid #ebeef5;
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user