feat(wms): 添加订单号显示并改进日期格式化功能
1. 在发货单组件中增加订单号显示,替换原有电话字段 2. 实现统一的日期格式化工具函数,修复参数冲突问题 3. 发货操作后自动添加待操作记录 4. 优化钢卷操作中的日期处理逻辑
This commit is contained in:
@@ -50,10 +50,16 @@ export const actionStrategies = {
|
||||
handler: async (coil, action) => {
|
||||
// 更新操作记录状态 actionStatus: 2
|
||||
// 并行执行更新操作记录和更新钢卷状态
|
||||
// 将日期格式化为yyyy-MM-dd HH:mm:ss
|
||||
const completeTime = new Date()
|
||||
function parseDate(date) {
|
||||
return date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + ' ' + date.getHours() + ':' + date.getMinutes() + ':' + date.getSeconds()
|
||||
}
|
||||
await Promise.all([
|
||||
updatePendingAction({
|
||||
...action,
|
||||
actionStatus: 2,
|
||||
completeTime: parseDate(completeTime),
|
||||
}),
|
||||
updateMaterialCoilSimple({
|
||||
...coil,
|
||||
|
||||
@@ -75,7 +75,8 @@
|
||||
@click="handleBatchPrintLabel">批量打印标签</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5" v-if="showOrderBy">
|
||||
<el-checkbox v-model="queryParams.orderBy" v-loading="loading" @change="getList" label="orderBy">按实际库区排序</el-checkbox>
|
||||
<el-checkbox v-model="queryParams.orderBy" v-loading="loading" @change="getList"
|
||||
label="orderBy">按实际库区排序</el-checkbox>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
@@ -412,6 +413,7 @@ import {
|
||||
returnCoil,
|
||||
} from "@/api/wms/coil";
|
||||
import { listBoundCoil } from "@/api/wms/deliveryWaybillDetail";
|
||||
import { addPendingAction } from "@/api/wms/pendingAction";
|
||||
import WarehouseSelect from "@/components/KLPService/WarehouseSelect";
|
||||
import QRCode from "../../print/components/QRCode.vue";
|
||||
import * as XLSX from 'xlsx'
|
||||
@@ -1046,6 +1048,20 @@ export default {
|
||||
handleExportCoil(row) {
|
||||
exportCoil(row.coilId).then(response => {
|
||||
this.$modal.msgSuccess("发货成功");
|
||||
// 2. 插入一条已完成的待操作记录
|
||||
addPendingAction({
|
||||
coilId: row.coilId,
|
||||
currentCoilNo: row.currentCoilNo,
|
||||
actionType: 402, // 402=发货
|
||||
actionStatus: 2, // 直接标记为完成状态
|
||||
scanTime: new Date(),
|
||||
// scanDevice: ,
|
||||
priority: 0, // 0=普通
|
||||
sourceType: 'scan',
|
||||
warehouseId: row.warehouseId,
|
||||
processTime: new Date(),
|
||||
completeTime: new Date()
|
||||
});
|
||||
this.getList();
|
||||
}).catch(error => {
|
||||
this.$modal.msgError("发货失败");
|
||||
|
||||
Reference in New Issue
Block a user