feat(钢卷管理): 添加长度字段支持及相关功能

refactor(订单管理): 重构订单状态显示及操作记录功能

fix(权限控制): 移除导出订单明细的权限校验

perf(钢卷操作): 使用策略模式重构钢卷操作逻辑
This commit is contained in:
砂糖
2025-12-29 16:22:18 +08:00
parent 9b8c5ab80b
commit 825a967f7b
13 changed files with 344 additions and 170 deletions

View File

@@ -1,116 +1,169 @@
import request from '@/utils/request' import { addOrder, updateOrder } from '@/api/crm/order'
import { addOrderItem, updateOrderItem } from '@/api/crm/orderItem'
import { addOrderOperationTrace } from '@/api/crm/orderOperationTrace'
/** // 需要被记录的操作
* 查询销售报表汇总数据 const ORDER_ACTIONS = {
*/ createPreOrder: 'createPreOrder',
export function getSummary(query) { updatePreOrder: 'updatePreOrder',
return request({ approvePreOrder: 'approvePreOrder',
url: '/crm/salesReport/summary', createOrder: 'createOrder',
method: 'get', updateOrder: 'updateOrder',
params: query createOrderdetail: 'createOrderdetail',
}) updateOrderdetail: 'updateOrderdetail',
} }
/** const actions = {
* 分页查询销售报表订单明细 // 创建预订单
*/ createPreOrder: {
export function getOrderDetails(query) { type: 'createPreOrder',
return request({ name: '创建预订单',
url: '/crm/salesReport/orderDetails', description: '创建一个预订单',
method: 'get', // 预订单的相关信息
params: query async handler(payload) {
}) const { data: order } = await addOrder({
...payload,
})
if (order.orderId) {
addOrderOperationTrace({
orderId: order.orderId,
operationType: ORDER_ACTIONS.createPreOrder,
newStatus: order.orderId,
operationContent: JSON.stringify(payload)
})
}
return order
}
},
// 修改预订单
updatePreOrder: {
type: 'updatePreOrder',
name: '修改预订单',
description: '修改预订单的相关信息',
// 预订单的相关信息
async handler(payload) {
await updateOrder({
...payload,
})
addOrderOperationTrace({
orderId: payload.orderId,
operationType: ORDER_ACTIONS.updatePreOrder,
newStatus: payload.orderId,
operationContent: JSON.stringify(payload)
})
return payload
}
},
// 创建订单明细
createOrderdetail: {
type: 'createOrderdetail',
name: '创建订单明细',
description: '创建订单明细的相关信息',
// 订单明细的相关信息
async handler(payload) {
const { data: orderItem } = await addOrderItem({
...payload,
})
if (orderItem.orderItemId) {
addOrderOperationTrace({
orderId: orderItem.orderId,
operationType: ORDER_ACTIONS.createOrderdetail,
newStatus: payload.orderItemId,
operationContent: JSON.stringify(payload)
})
}
return orderItem
}
},
// 修改订单明细
updateOrderdetail: {
type: 'updateOrderdetail',
name: '修改订单明细',
description: '修改订单明细的相关信息',
// 订单明细的相关信息
async handler(payload) {
await updateOrderItem({
...payload,
})
addOrderOperationTrace({
orderId: payload.orderId,
operationType: ORDER_ACTIONS.updateOrderdetail,
newStatus: payload.orderItemId,
operationContent: JSON.stringify(payload)
})
return payload
}
},
// 预订单审批为正式订单
approvePreOrder: {
type: 'approvePreOrder',
name: '审批预订单',
description: '审批预订单为正式订单',
// 预订单的相关信息
async handler(payload) {
await updateOrder({
...payload,
})
if (payload.orderId) {
addOrderOperationTrace({
orderId: payload.orderId,
operationType: ORDER_ACTIONS.approvePreOrder,
newStatus: payload.orderId,
operationContent: JSON.stringify(payload)
})
}
return payload
}
},
// 直接创建正式订单
createOrder: {
type: 'createOrder',
name: '创建正式订单',
description: '直接创建一个正式订单',
// 正式订单的相关信息
async handler(payload) {
const { data: order } = await addOrder({
...payload,
})
if (order.orderId) {
addOrderOperationTrace({
orderId: order.orderId,
operationType: ORDER_ACTIONS.createOrder,
newStatus: order.orderId,
operationContent: JSON.stringify(payload)
})
}
return order
}
},
// 正式订单修改
updateOrder: {
type: 'updateOrder',
name: '修改正式订单',
description: '修改正式订单的相关信息',
// 正式订单的相关信息
async handler(payload) {
await updateOrder({
...payload,
})
if (payload.orderId) {
addOrderOperationTrace({
orderId: payload.orderId,
operationType: ORDER_ACTIONS.updateOrder,
newStatus: payload.orderId,
operationContent: JSON.stringify(payload)
})
}
return payload
}
}
} }
/** export {
* 查询完整销售报表数据 ORDER_ACTIONS,
*/ actions,
export function getFullSalesReport(query) {
return request({
url: '/crm/salesReport/fullReport',
method: 'get',
params: query
})
}
/**
* 查询销售员统计数据
*/
export function getSalesmanStats(query) {
return request({
url: '/crm/salesReport/salesmanStats',
method: 'get',
params: query
})
}
/**
* 查询客户等级统计数据
*/
export function getCustomerLevelStats(query) {
return request({
url: '/crm/salesReport/customerLevelStats',
method: 'get',
params: query
})
}
/**
* 查询行业统计数据
*/
export function getIndustryStats(query) {
return request({
url: '/crm/salesReport/industryStats',
method: 'get',
params: query
})
}
/**
* 导出销售报表订单明细
*/
export function exportOrderDetails(query) {
return request({
url: '/crm/salesReport/exportOrderDetails',
method: 'post',
data: query,
// 导出文件需指定响应类型可选根据项目ExcelUtil配置调整
responseType: 'blob'
})
}
/**
* 导出销售员统计数据
*/
export function exportSalesmanStats(query) {
return request({
url: '/crm/salesReport/exportSalesmanStats',
method: 'post',
data: query,
responseType: 'blob'
})
}
/**
* 导出客户等级统计数据
*/
export function exportCustomerLevelStats(query) {
return request({
url: '/crm/salesReport/exportCustomerLevelStats',
method: 'post',
data: query,
responseType: 'blob'
})
}
/**
* 导出行业统计数据
*/
export function exportIndustryStats(query) {
return request({
url: '/crm/salesReport/exportIndustryStats',
method: 'post',
data: query,
responseType: 'blob'
})
} }

View File

@@ -76,14 +76,15 @@
<span>{{ parseTime(scope.row.deliveryDate, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.deliveryDate, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="状态" align="center" prop="preOrderStatus"> <el-table-column label="状态" align="center" prop="orderType">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.preOrderStatus === 0">审核</span> <span v-if="scope.row.orderType === 0" class="text-primary">审核</span>
<span v-else-if="scope.row.preOrderStatus === 1">已审核</span> <span v-else-if="scope.row.orderType === 1">已审核</span>
<span v-else-if="scope.row.preOrderStatus === 2">已取消</span>
<span v-else>未知状态</span> <span v-else>未知状态</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="销售员" align="center" prop="createBy" />
<el-table-column label="销售员" align="center" prop="createTime" />
<!-- <el-table-column label="审核人" align="center" prop="auditUser" /> <!-- <el-table-column label="审核人" align="center" prop="auditUser" />
<el-table-column label="审核时间" align="center" prop="auditTime" width="180"> <el-table-column label="审核时间" align="center" prop="auditTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
@@ -202,7 +203,7 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
orderCode: undefined, orderCode: undefined,
orderType: ORDER_TYPE['预订单'], // orderType: ORDER_TYPE['预订单'],
customerId: undefined, customerId: undefined,
orderAmount: undefined, orderAmount: undefined,
salesman: undefined, salesman: undefined,

View File

@@ -95,7 +95,6 @@
type="success" type="success"
icon="el-icon-download" icon="el-icon-download"
@click="exportOrderDetails" @click="exportOrderDetails"
v-hasPermi="['crm:salesReport:export']"
> >
导出订单明细 导出订单明细
</el-button> </el-button>

View File

@@ -110,6 +110,11 @@
<el-input v-model="form.netWeight" placeholder="请输入净重" /> <el-input v-model="form.netWeight" placeholder="请输入净重" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="长度" prop="length">
<el-input v-model="form.length" placeholder="请输入长度" />
</el-form-item>
</el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" /> <el-input v-model="form.remark" placeholder="请输入备注" />

View File

@@ -229,6 +229,7 @@ import ProductSelect from "@/components/KLPService/ProductSelect";
import RawMaterialSelect from "@/components/KLPService/RawMaterialSelect"; import RawMaterialSelect from "@/components/KLPService/RawMaterialSelect";
import { Pagination } from 'element-ui'; import { Pagination } from 'element-ui';
import { listDeliveryPlan } from '@/api/wms/deliveryPlan' import { listDeliveryPlan } from '@/api/wms/deliveryPlan'
import handleCoil, { COIL_ACTIONS } from '../js/coilActions'
// 键值为[400, 500), 不包含在字典中但后续可以加入的特殊操作这类操作录入后会立刻完成例如入库401和发货402 // 键值为[400, 500), 不包含在字典中但后续可以加入的特殊操作这类操作录入后会立刻完成例如入库401和发货402
@@ -354,26 +355,16 @@ export default {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
this.buttonLoading = true; this.buttonLoading = true;
addMaterialCoil(this.form).then(response => { handleCoil(COIL_ACTIONS.RECEIVE, this.form, this.form.planId)
addPendingAction({ .then(res => {
// 计划ID 对应 warehouseId warehouseId字段并不是仓库ID而是一个根据操作类型自适应的查询字段
warehouseId: this.form.planId,
actionType: 401,
currentCoilNo: this.form.currentCoilNo,
sourceType: 'manual',
coilId: response.data.coilId,
priority: 0,
remark: this.form.remark,
actionStatus: 0,
}).then(res => {
this.$modal.msgSuccess("入库成功"); this.$modal.msgSuccess("入库成功");
this.$refs.form.resetFields();
this.getList() this.getList()
}) }).finally(() => {
}).finally(() => { this.buttonLoading = false;
this.buttonLoading = false; });
});
} }
}); })
}, },
// 打开收货弹窗 // 打开收货弹窗
@@ -394,20 +385,13 @@ export default {
this.$modal.confirm("收货后刚钢卷会进入库存并占用所选的实际库区,是否继续?").then(() => { this.$modal.confirm("收货后刚钢卷会进入库存并占用所选的实际库区,是否继续?").then(() => {
this.buttonLoading = true; this.buttonLoading = true;
// 更新操作记录状态 actionStatus: 2 // 更新操作记录状态 actionStatus: 2
updatePendingAction({ handleCoil(COIL_ACTIONS.STORE, this.coilInfo, this.receiptForm)
...this.receiptForm, .then(_ => {
actionStatus: 2, this.$message.success("确认收货成功");
}).then(_ => { this.getList()
this.$message.success("确认收货成功"); }).finally(() => {
this.getList() this.buttonLoading = false;
}).finally(() => { });
this.buttonLoading = false;
});
// 更新钢卷状态为当前钢卷; dataType: 1
updateMaterialCoilSimple({
...this.coilInfo,
dataType: 1,
})
}) })
}, },
// 取消操作 // 取消操作

View File

@@ -0,0 +1,79 @@
import { addMaterialCoil, updateMaterialCoil, updateMaterialCoilSimple } from "@/api/wms/coil"
import { addPendingAction, updatePendingAction } from '@/api/wms/pendingAction';
export const COIL_ACTIONS = {
RECEIVE: 'RECEIVE', // 收货与入库的区别在于,收货相当于计划入库,不管是否已到货都执行这个操作,计划收货也是收获
STORE: 'STORE', // 入库相当于实际收货与入库
CORRECTION: 'CORRECTION',
PROCESSING: 'PROCESSING',
MERGE: 'MERGE',
SPLIT: 'SPLIT',
PACK: 'PACK',
DELIVER: 'DELIVER',
MOVE: 'MOVE',
EDIT: 'EDIT', // 对应“根据库位码编辑钢卷信息”
ALLOCATE: 'ALLOCATE'
}
export const actions = Object.values(COIL_ACTIONS)
export const actionStrategies = {
RECEIVE: {
type: COIL_ACTIONS.RECEIVE,
name: '计划钢卷收货',
description: '计划钢卷收货,不管是否已到货都执行这个操作,计划收货也是收货',
handler: async (coil, planId) => {
// 收货逻辑创建一个dataType为10的钢卷和一个待操作记录
const response = await addMaterialCoil({
...coil,
dataType: 10,
})
await addPendingAction({
// 计划ID 对应 warehouseId warehouseId字段并不是仓库ID而是一个根据操作类型自适应的查询字段
warehouseId: planId,
actionType: 401,
currentCoilNo: coil.currentCoilNo,
sourceType: 'manual',
coilId: response.data.coilId,
priority: 0,
remark: coil.remark,
actionStatus: 0,
})
return response.data.coilId
}
},
STORE: {
type: COIL_ACTIONS.STORE,
name: '实际钢卷入库',
description: '实际钢卷入库,只有在已到货的情况下才执行这个操作',
handler: async (coil, action) => {
// 更新操作记录状态 actionStatus: 2
// 并行执行更新操作记录和更新钢卷状态
await Promise.all([
updatePendingAction({
...action,
actionStatus: 2,
}),
updateMaterialCoilSimple({
...coil,
dataType: 1,
})
])
return true
}
},
}
const handleCoil = (action, ...args) => {
const strategy = actionStrategies[action]
if (strategy && strategy.handler) {
return strategy.handler(...args)
} else {
console.error(`No strategy found for action: ${action}`)
}
}
export default handleCoil

View File

@@ -182,6 +182,12 @@
<template slot="append"></template> <template slot="append"></template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="长度(m)">
<el-input v-model.number="targetCoil.length" placeholder="请输入长度" type="number" step="0.01"
:disabled="readonly">
<template slot="append"></template>
</el-input>
</el-form-item>
<el-form-item label="逻辑库区"> <el-form-item label="逻辑库区">
<WarehouseSelect <WarehouseSelect
v-model="targetCoil.warehouseId" v-model="targetCoil.warehouseId"
@@ -257,7 +263,8 @@ export default {
qualityStatus: '', qualityStatus: '',
packagingRequirement: '', packagingRequirement: '',
packingStatus: '', packingStatus: '',
trimmingRequirement: '' trimmingRequirement: '',
length: null,
}, },
buttonLoading: false, buttonLoading: false,
loading: false, loading: false,
@@ -359,6 +366,9 @@ export default {
materialName: '', materialName: '',
productName: '', productName: '',
specification: '', specification: '',
grossWeight: null,
netWeight: null,
length: null,
bomItems: [] bomItems: []
}, },
{ {
@@ -372,6 +382,9 @@ export default {
materialName: '', materialName: '',
productName: '', productName: '',
specification: '', specification: '',
grossWeight: null,
netWeight: null,
length: null,
bomItems: [] bomItems: []
} }
]; ];
@@ -400,6 +413,9 @@ export default {
productName: data.productName || (data.product ? data.product.productName : ''), productName: data.productName || (data.product ? data.product.productName : ''),
specification: data.rawMaterial?.specification || data.product?.specification || '', specification: data.rawMaterial?.specification || data.product?.specification || '',
bomItems: data.bomItemList || [], bomItems: data.bomItemList || [],
grossWeight: data.grossWeight || null,
netWeight: data.netWeight || null,
length: data.length || null,
}, },
{ {
coilId: null, coilId: null,
@@ -412,7 +428,10 @@ export default {
materialName: '', materialName: '',
productName: '', productName: '',
specification: '', specification: '',
bomItems: [] bomItems: [],
grossWeight: null,
netWeight: null,
length: null,
} }
]; ];
@@ -488,6 +507,9 @@ export default {
materialName: data.materialName || (data.rawMaterial ? data.rawMaterial.rawMaterialName : ''), materialName: data.materialName || (data.rawMaterial ? data.rawMaterial.rawMaterialName : ''),
productName: data.productName || (data.product ? data.product.productName : ''), productName: data.productName || (data.product ? data.product.productName : ''),
specification: data.rawMaterial?.specification || data.product?.specification || '', specification: data.rawMaterial?.specification || data.product?.specification || '',
grossWeight: data.grossWeight || null,
netWeight: data.netWeight || null,
length: data.length || null,
bomItems: data.bomItemList || [], bomItems: data.bomItemList || [],
actionId: pending.actionId // 保存待操作ID用于后续完成操作 actionId: pending.actionId // 保存待操作ID用于后续完成操作
}); });
@@ -662,6 +684,9 @@ export default {
materialName: coil.materialName || '', materialName: coil.materialName || '',
productName: coil.productName || '', productName: coil.productName || '',
specification: coil.rawMaterial?.specification || coil.product?.specification || '', specification: coil.rawMaterial?.specification || coil.product?.specification || '',
grossWeight: coil.grossWeight || null,
netWeight: coil.netWeight || null,
length: coil.length || null,
bomItems: coil.bomItemList || [] bomItems: coil.bomItemList || []
}); });

View File

@@ -82,7 +82,7 @@
</div> </div>
<div class="info-grid-item label-cell">参考长度</div> <div class="info-grid-item label-cell">参考长度</div>
<div class="info-grid-item value-cell"> <div class="info-grid-item value-cell">
<input type="text" class="nob" :value="content.referenceLength || ''" /> <input type="text" class="nob" :value="content.length || ''" />
</div> </div>
<!-- 第八行生产日期跨3列 --> <!-- 第八行生产日期跨3列 -->
@@ -137,6 +137,7 @@ export default {
grossWeight: '', grossWeight: '',
netWeight: '7080', netWeight: '7080',
referenceLength: '320', referenceLength: '320',
length: '320',
productionDate: '2025-03-19', productionDate: '2025-03-19',
// 底部信息字段 // 底部信息字段
address: '唐山市滦州市茨榆坨工业区', address: '唐山市滦州市茨榆坨工业区',

View File

@@ -90,6 +90,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="showAbnormal" label="异常数量" align="center" prop="abnormalCount"></el-table-column> <el-table-column v-if="showAbnormal" label="异常数量" align="center" prop="abnormalCount"></el-table-column>
<el-table-column label="长度 (米)" align="center" prop="length" v-if="showLength" />
<el-table-column label="更新时间" align="center" prop="updateTime" /> <el-table-column label="更新时间" align="center" prop="updateTime" />
<el-table-column label="发货时间" align="center" v-if="showExportTime" prop="exportTime" /> <el-table-column label="发货时间" align="center" v-if="showExportTime" prop="exportTime" />
<el-table-column label="更新人" align="center" prop="updateByName" /> <el-table-column label="更新人" align="center" prop="updateByName" />
@@ -206,6 +207,9 @@
<el-form-item label="净重" prop="netWeight"> <el-form-item label="净重" prop="netWeight">
<el-input v-model="form.netWeight" placeholder="请输入净重" /> <el-input v-model="form.netWeight" placeholder="请输入净重" />
</el-form-item> </el-form-item>
<el-form-item label="长度" prop="length" v-if="showLength">
<el-input v-model="form.length" placeholder="请输入长度" />
</el-form-item>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" /> <el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item> </el-form-item>
@@ -311,6 +315,10 @@ export default {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
showLength: {
type: Boolean,
default: false,
},
}, },
data() { data() {
return { return {

View File

@@ -1,5 +1,10 @@
<template> <template>
<BasePage :qrcode="qrcode" :querys="querys" :labelType="labelType" :showStatus="showStatus" :hideType="hideType" /> <BasePage :qrcode="qrcode"
:querys="querys"
:labelType="labelType"
:showStatus="showStatus"
:hideType="hideType"
:showLength="showLength" />
</template> </template>
<script> <script>
@@ -21,6 +26,7 @@ export default {
labelType: '3', labelType: '3',
showStatus: true, showStatus: true,
hideType: true, hideType: true,
showLength: true,
} }
} }
} }

View File

@@ -163,6 +163,12 @@
<template slot="append"></template> <template slot="append"></template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="长度(m)" required>
<el-input v-model.number="item.length" placeholder="请输入长度" type="number" step="0.01"
:disabled="readonly">
<template slot="append"></template>
</el-input>
</el-form-item>
<el-form-item label="逻辑库区" required> <el-form-item label="逻辑库区" required>
<WarehouseSelect <WarehouseSelect
v-model="item.warehouseId" v-model="item.warehouseId"
@@ -248,7 +254,8 @@ export default {
grossWeight: null, grossWeight: null,
netWeight: null, netWeight: null,
warehouseId: null, warehouseId: null,
actualWarehouseId: null actualWarehouseId: null,
length: null,
} }
], ],
loading: false, loading: false,
@@ -467,6 +474,7 @@ export default {
productName: coil.productName || '', productName: coil.productName || '',
grossWeight: coil.grossWeight, grossWeight: coil.grossWeight,
netWeight: coil.netWeight, netWeight: coil.netWeight,
length: coil.length,
bomItems: coil.bomItemList || coil.bomItems || [] bomItems: coil.bomItemList || coil.bomItems || []
}; };
this.$message.success('母卷选择成功'); this.$message.success('母卷选择成功');
@@ -492,6 +500,7 @@ export default {
productName: data.productName || (data.product ? data.product.productName : ''), productName: data.productName || (data.product ? data.product.productName : ''),
grossWeight: data.grossWeight, grossWeight: data.grossWeight,
netWeight: data.netWeight, netWeight: data.netWeight,
length: data.length,
bomItems: data.bomItemList || data.bomItems || [] bomItems: data.bomItemList || data.bomItems || []
}; };
} }
@@ -525,6 +534,7 @@ export default {
itemId: null, itemId: null,
grossWeight: null, grossWeight: null,
netWeight: null, netWeight: null,
length: null,
warehouseId: null, warehouseId: null,
actualWarehouseId: null, actualWarehouseId: null,
qualityStatus: '', qualityStatus: '',

View File

@@ -158,6 +158,13 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="长度(m)" prop="length">
<el-input v-model.number="updateForm.length" placeholder="请输入长度" type="number" step="0.01"
:disabled="readonly">
<template slot="append"></template>
</el-input>
</el-form-item>
<el-form-item label="逻辑库区" prop="warehouseId"> <el-form-item label="逻辑库区" prop="warehouseId">
<WarehouseSelect <WarehouseSelect
v-model="updateForm.warehouseId" v-model="updateForm.warehouseId"
@@ -264,7 +271,8 @@ export default {
warehouseId: null, warehouseId: null,
nextWarehouseName: '', nextWarehouseName: '',
status: 0, status: 0,
remark: '' remark: '',
length: null,
}, },
// 更新表单 // 更新表单
updateForm: { updateForm: {
@@ -281,7 +289,8 @@ export default {
qualityStatus: '', qualityStatus: '',
packagingRequirement: '', packagingRequirement: '',
packingStatus: '', packingStatus: '',
trimmingRequirement: '' trimmingRequirement: '',
length: null,
}, },
rules: { rules: {
currentCoilNo: [ currentCoilNo: [
@@ -597,6 +606,7 @@ export default {
grossWeight: parseFloat(this.currentInfo.grossWeight) || null, grossWeight: parseFloat(this.currentInfo.grossWeight) || null,
netWeight: parseFloat(this.currentInfo.netWeight) || null, netWeight: parseFloat(this.currentInfo.netWeight) || null,
warehouseId: this.currentInfo.warehouseId, warehouseId: this.currentInfo.warehouseId,
length: parseFloat(this.currentInfo.length) || null,
remark: this.currentInfo.remark remark: this.currentInfo.remark
}; };

View File

@@ -148,6 +148,7 @@ import ActualWarehouseSelect from "@/components/KLPService/ActualWarehouseSelect
import CoilNo from "@/components/KLPService/Renderer/CoilNo.vue"; import CoilNo from "@/components/KLPService/Renderer/CoilNo.vue";
import Printer from "../components/Printer.vue"; import Printer from "../components/Printer.vue";
import { getConfigKey } from '@/api/system/config' import { getConfigKey } from '@/api/system/config'
import handleCoil, { COIL_ACTIONS } from "@/views/wms/coil/js/coilActions.js";
export default { export default {
name: "DeliveryWaybill", name: "DeliveryWaybill",
@@ -440,22 +441,14 @@ export default {
// 二次确认 // 二次确认
this.$modal.confirm("收货后刚钢卷会进入库存并占用所选的实际库区,是否继续?").then(() => { this.$modal.confirm("收货后刚钢卷会进入库存并占用所选的实际库区,是否继续?").then(() => {
this.buttonLoading = true; this.buttonLoading = true;
// 更新操作记录状态 actionStatus: 2 handleCoil(COIL_ACTIONS.STORE, this.coilInfo, this.receiptForm)
updatePendingAction({ .then(_ => {
...this.receiptForm, this.$message.success("确认收货成功");
actionStatus: 2, this.getList()
}).then(_ => { this.receiptModalVisible = false;
this.$message.success("确认收货成功"); }).finally(() => {
this.getList() this.buttonLoading = false;
this.receiptModalVisible = false; });
}).finally(() => {
this.buttonLoading = false;
});
// 更新钢卷状态为当前钢卷; dataType: 1
updateMaterialCoilSimple({
...this.coilInfo,
dataType: 1,
})
}) })
}, },
// 取消操作 // 取消操作