feat(wms): 优化发货单和钢卷管理功能
- 修改重量单位从kg为T - 发货单增加仓库位置列和禁用已发货单操作 - 优化钢卷卡片UI样式 - 改进打印功能使用PDF格式 - 增加发货单状态判断和编辑控制
This commit is contained in:
@@ -67,10 +67,10 @@
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-view"
|
||||
@click.stop="handlePrint(scope.row)">打印发货单</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-edit"
|
||||
@click.stop="handleUpdate(scope.row)">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete"
|
||||
@click.stop="handleDelete(scope.row)">删除</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" :disabled="scope.row.status === 1"
|
||||
title="已发货的发货单不能修改" @click.stop="handleUpdate(scope.row)">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" :disabled="scope.row.status === 1"
|
||||
title="已发货的发货单不能删除" @click.stop="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -80,13 +80,13 @@
|
||||
|
||||
<el-divider style="margin: 20px 0;" />
|
||||
|
||||
<DeliveryWaybillDetail ref="detailTable" :waybillId="waybillId" :coilList="coilList" @add="refreshCoilList" @update="refreshCoilList" @delete="refreshCoilList" />
|
||||
<DeliveryWaybillDetail v-if="canEdit" ref="detailTable" :waybillId="waybillId" :coilList="coilList"
|
||||
@add="refreshCoilList" @update="refreshCoilList" @delete="refreshCoilList" />
|
||||
<el-empty v-else description="已发货,不可修改,点击打印查看详情" />
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
|
||||
<!-- 添加或修改发货单对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
@@ -107,12 +107,6 @@
|
||||
placeholder="请选择发货时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="磅房" prop="weighbridge">
|
||||
<el-input v-model="form.weighbridge" placeholder="请输入磅房" />
|
||||
</el-form-item>
|
||||
<el-form-item label="销售" prop="salesPerson">
|
||||
<el-input v-model="form.salesPerson" placeholder="请输入销售" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="负责人" prop="principal">
|
||||
<el-input v-model="form.principal" placeholder="请输入负责人" />
|
||||
</el-form-item>
|
||||
@@ -130,7 +124,7 @@
|
||||
</el-dialog>
|
||||
|
||||
<!-- 打印发货单对话框 -->
|
||||
<el-dialog title="打印发货单" :visible.sync="printDialogVisible" width="900px" append-to-body center>
|
||||
<el-dialog title="打印发货单" :visible.sync="printDialogVisible" width="1000px" append-to-body center>
|
||||
<WayBill :waybill="currentWaybill" :waybillDetails="currentWaybillDetails" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
@@ -217,7 +211,8 @@ export default {
|
||||
planType: 0,
|
||||
// auditStatus: 1,
|
||||
},
|
||||
coilList: []
|
||||
coilList: [],
|
||||
canEdit: true,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@@ -330,6 +325,13 @@ export default {
|
||||
this.getList();
|
||||
},
|
||||
handleRowClick(row) {
|
||||
if (row.status === 1) {
|
||||
this.canEdit = false;
|
||||
this.waybillId = row.waybillId;
|
||||
// this.$modal.msgWarning("已发货的发货单不能操作");
|
||||
return;
|
||||
}
|
||||
this.canEdit = true;
|
||||
this.waybillId = row.waybillId;
|
||||
},
|
||||
|
||||
@@ -431,19 +433,30 @@ export default {
|
||||
remark: item.remark
|
||||
}));
|
||||
const coils = this.currentWaybillDetails.map(item => item.coilId).join(',');
|
||||
listCoilByIds(coils).then(response => {
|
||||
// 取前三位, 然后去抽后用;连接
|
||||
// 设置当前发货单
|
||||
const actualWahouseNames = [...new Set(response.rows.filter(item => Boolean(item.actualWarehouseName)).map(item => item.actualWarehouseName.slice(0, 3)))].join(';');
|
||||
this.currentWaybill = {
|
||||
...row,
|
||||
pickupLocation: actualWahouseNames || '',
|
||||
};
|
||||
});
|
||||
|
||||
// 打开打印对话框
|
||||
if (coils) {
|
||||
listCoilByIds(coils).then(response => {
|
||||
// 取前三位, 然后去抽后用;连接
|
||||
// 设置当前发货单
|
||||
const actualWahouseNames = [...new Set(response.rows.filter(item => Boolean(item.actualWarehouseName)).map(item => item.actualWarehouseName.slice(0, 3)))].join(';');
|
||||
this.currentWaybill = {
|
||||
...row,
|
||||
pickupLocation: actualWahouseNames || '',
|
||||
};
|
||||
this.currentWaybillDetails = this.currentWaybillDetails.map(item => {
|
||||
const actualWarehouseName = response.rows.find(detail => detail.coilId === item.coilId)?.actualWarehouseName || '';
|
||||
return {
|
||||
...item,
|
||||
actualWarehouseName: actualWarehouseName,
|
||||
};
|
||||
});
|
||||
});
|
||||
}
|
||||
this.currentWaybill = {
|
||||
...row,
|
||||
};
|
||||
this.printDialogVisible = true;
|
||||
this.loading = false;
|
||||
|
||||
}).catch(error => {
|
||||
console.error('获取发货单明细失败:', error);
|
||||
this.$modal.msgError('获取发货单明细失败');
|
||||
|
||||
Reference in New Issue
Block a user