feat(crm): 传递合同ID至订单页面并完善标签逻辑

在合同页面将合同ID传递给订单页面,确保订单与合同关联
优化标签渲染逻辑,根据仓库类型显示不同标签
移除无用注释和代码
This commit is contained in:
砂糖
2026-03-31 11:32:16 +08:00
parent aca10bcd45
commit a253d1ccea
3 changed files with 21 additions and 10 deletions

View File

@@ -197,7 +197,7 @@
合同信息
</el-tab-pane>
<el-tab-pane label="下发订单" name="second">
<OrderPage v-if="activeTab === 'second'" />
<OrderPage v-if="activeTab === 'second'" :contractId="form.contractId" />
</el-tab-pane>
<el-tab-pane label="收款记录" name="third">
<KLPTable v-loading="loading" :data="financeList">

View File

@@ -123,9 +123,6 @@
:value="item.contractId" />
</el-select>
</el-form-item>
<!-- <el-form-item label="合同号" prop="contractCode">
<el-input v-model="form.contractCode" placeholder="请输入合同号" disabled />
</el-form-item> -->
<el-form-item label="交货日期" prop="deliveryDate">
<el-date-picker clearable v-model="form.deliveryDate" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择交货日期">
@@ -172,6 +169,12 @@ export default {
FileList
},
dicts: ['customer_level', 'customer_industry', 'wip_pack_saleman'],
props: {
contractId: {
type: String,
default: ''
}
},
data() {
return {
ORDER_STATUS,
@@ -182,6 +185,7 @@ export default {
customerId: '',
salesman: '',
orderStatus: '',
contractId: this.contractId,
orderType: ORDER_TYPE['正式订单'],
financeStatus: '',
pageNum: 1,
@@ -258,6 +262,12 @@ export default {
// 表单重置
reset() {
// 如果有合同号,重置合同号
let contractCode = ''
if (this.contractId) {
contractCode = this.contractList.find(item => item.contractId === this.contractId).contractNo
}
// 重置表单数据
this.form = {
orderId: undefined,
orderCode: undefined,
@@ -266,6 +276,8 @@ export default {
orderAmount: undefined,
salesman: undefined,
deliveryDate: undefined,
contractId: this.contractId,
contractCode: contractCode,
preOrderStatus: undefined,
auditUser: undefined,
auditTime: undefined,

View File

@@ -84,9 +84,6 @@ export default {
DuGeTag,
TuoZhiTag,
SplitTag,
// SampleTagPreview,
// ForgeTagPreview,
// SaltSprayTagPreview,
},
data() {
return {
@@ -153,14 +150,16 @@ export default {
content: {
handler(newVal) {
const { itemName, itemType, warehouseId } = newVal;
// 在镀锌料库的卷使用镀锌原料标签
// 在镀锌原料库或者在镀锌分条原料库的卷使用镀锌原料标签
if (itemType == 'raw_material' && (warehouseId == '1988150263284953089' || warehouseId == '1988150487185289217')) {
this.labelType = '5';
}
// 脱脂原料库
// 脱脂原料库的卷使用脱脂原料标签
else if (itemType == 'raw_material' && (warehouseId == '1988150545175736322')) {
this.labelType = '6';
} else if (itemType == 'raw_material') {
}
// 否则使用普通的原料标签
else if (itemType == 'raw_material') {
this.labelType = '2';
}
// 分条成品