feat: 新增合同配置页面,优化多页面合同关联逻辑
1. 新增crm/contract/selectConfig页面,支持本地配置可选合同列表,区分手动/接口同步来源 2. 优化ContractSelect组件,新增上次选中合同置顶、本地存储选中记录功能 3. 为合卷、分条、退火计划、钢卷编辑页面添加合同必填校验与自动关联逻辑 4. 移除各业务页面冗余的合同关系手动调用代码,统一关联逻辑
This commit is contained in:
@@ -159,7 +159,7 @@
|
||||
</el-row>
|
||||
|
||||
<el-dialog title="完成退火" :visible.sync="completeOpen" width="720px" append-to-body>
|
||||
<div class="complete-tip">请为每条钢卷分配逻辑库区去向,未分配将无法完成。</div>
|
||||
<div class="complete-tip">请为每条钢卷分配逻辑库区去向和关联合同,未分配将无法完成。</div>
|
||||
<el-table :data="completeCoils" v-loading="completeLoading" height="360px">
|
||||
<el-table-column label="入场钢卷号" prop="enterCoilNo" align="center" />
|
||||
<el-table-column label="钢卷去向" align="center" width="240">
|
||||
@@ -170,6 +170,11 @@
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="关联合同" align="center" width="240">
|
||||
<template slot-scope="scope">
|
||||
<ContractSelect v-model="scope.row.contractId" placeholder="请选择合同" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitComplete">确 定</el-button>
|
||||
@@ -234,11 +239,13 @@ import { listMaterialCoil } from "@/api/wms/coil";
|
||||
import { listWarehouse } from '@/api/wms/warehouse'
|
||||
import WarehouseSelect from "@/components/KLPService/WarehouseSelect";
|
||||
import { addAnnealOperateEvent } from "@/api/wms/annealOperateEvent";
|
||||
import ContractSelect from "@/components/KLPService/ContractSelect";
|
||||
|
||||
export default {
|
||||
name: "AnnealPlan",
|
||||
components: {
|
||||
WarehouseSelect
|
||||
WarehouseSelect,
|
||||
ContractSelect
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -563,17 +570,18 @@ export default {
|
||||
submitComplete() {
|
||||
const locations = (this.completeCoils || []).map(item => ({
|
||||
coilId: item.coilId,
|
||||
warehouseId: item.warehouseId
|
||||
warehouseId: item.warehouseId,
|
||||
contractId: item.contractId,
|
||||
}));
|
||||
const missing = locations.filter(item => !item.warehouseId);
|
||||
const missing = locations.filter(item => !item.warehouseId || !item.contractId);
|
||||
if (missing.length > 0) {
|
||||
this.$message.warning('请先为所有钢卷分配实际库位');
|
||||
this.$message.warning('请先为所有钢卷分配实际库位和关联合同');
|
||||
return;
|
||||
}
|
||||
this.completeLoading = true;
|
||||
completeAnnealPlan({
|
||||
planId: this.completePlanId,
|
||||
locations: locations
|
||||
locations: locations,
|
||||
}).then(() => {
|
||||
// anneal-todo: 新增操作事件
|
||||
const targetFurnaceName = this.furnaceOptions.find(item => item.furnaceId === this.currentPlan.targetFurnaceId)?.furnaceName || '';
|
||||
|
||||
Reference in New Issue
Block a user