feat: 添加开始时间列并优化发货单打印功能
- 在coil面板的do.vue中添加开始时间列 - 新增widthEdit.vue组件用于宽度编辑 - 修改MaterialTag.vue中的标签显示为厂家名称 - 合并发货单打印功能,添加吨数统计显示
This commit is contained in:
@@ -54,12 +54,12 @@
|
|||||||
<div
|
<div
|
||||||
style="flex: 1; height: 100%; display: flex; align-items: center; justify-content: center; border: 1px solid #333; box-sizing: border-box; padding: 3px; word-break: break-all; overflow-wrap: break-word;"
|
style="flex: 1; height: 100%; display: flex; align-items: center; justify-content: center; border: 1px solid #333; box-sizing: border-box; padding: 3px; word-break: break-all; overflow-wrap: break-word;"
|
||||||
class="label-cell">
|
class="label-cell">
|
||||||
实际库区
|
厂家名称
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
style="flex: 1; height: 100%; display: flex; align-items: center; justify-content: center; border: 1px solid #333; box-sizing: border-box; padding: 3px; word-break: break-all; overflow-wrap: break-word;"
|
style="flex: 1; height: 100%; display: flex; align-items: center; justify-content: center; border: 1px solid #333; box-sizing: border-box; padding: 3px; word-break: break-all; overflow-wrap: break-word;"
|
||||||
class="value-cell">
|
class="value-cell">
|
||||||
<input type="text" class="nob" :value="content.actualWarehouseName || ''" />
|
{{ content.manufacturer || '' }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div style="display: flex; flex: 1; align-items: center;">
|
<!-- <div style="display: flex; flex: 1; align-items: center;">
|
||||||
|
|||||||
@@ -422,6 +422,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="创建人" prop="createBy"></el-table-column>
|
<el-table-column label="创建人" prop="createBy"></el-table-column>
|
||||||
<el-table-column label="操作人" prop="operatorName"></el-table-column>
|
<el-table-column label="操作人" prop="operatorName"></el-table-column>
|
||||||
|
<el-table-column label="开始时间" prop="createTime"></el-table-column>
|
||||||
<el-table-column label="操作">
|
<el-table-column label="操作">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button v-if="scope.row.actionStatus === 2" :loading="buttonLoading" icon="el-icon-delete"
|
<el-button v-if="scope.row.actionStatus === 2" :loading="buttonLoading" icon="el-icon-delete"
|
||||||
|
|||||||
27
klp-ui/src/views/wms/coil/views/base/widthEdit.vue
Normal file
27
klp-ui/src/views/wms/coil/views/base/widthEdit.vue
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<template>
|
||||||
|
<BasePage :qrcode="qrcode" :querys="querys" :labelType="labelType" :hideWarehouseQuery="hideWarehouseQuery"
|
||||||
|
:hideType="hideType" :showControl="showControl" :showWidthEdit="showWidthEdit" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import BasePage from '../../panels/base.vue';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
BasePage
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
qrcode: false,
|
||||||
|
querys: {
|
||||||
|
// dataType: 1,
|
||||||
|
},
|
||||||
|
hideWarehouseQuery: true,
|
||||||
|
showWidthEdit: true,
|
||||||
|
showControl: false,
|
||||||
|
labelType: '2',
|
||||||
|
hideType: false,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -71,9 +71,9 @@
|
|||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="mini" type="text" icon="el-icon-view"
|
<el-button size="mini" type="text" icon="el-icon-view"
|
||||||
@click.stop="handlePrint(scope.row)">打印发货单</el-button>
|
@click.stop="handlePrint(scope.row, 0)">打印发货单</el-button>
|
||||||
<el-button size="mini" type="text" icon="el-icon-view"
|
<el-button size="mini" type="text" icon="el-icon-view"
|
||||||
@click.stop="handlePrintSimple(scope.row)">简单打印</el-button>
|
@click.stop="handlePrint(scope.row, 1)">简单打印</el-button>
|
||||||
<el-button size="mini" type="text" icon="el-icon-copy"
|
<el-button size="mini" type="text" icon="el-icon-copy"
|
||||||
@click.stop="handleCopy(scope.row)">复制新增</el-button>
|
@click.stop="handleCopy(scope.row)">复制新增</el-button>
|
||||||
<el-button size="mini" type="text" icon="el-icon-edit" :disabled="scope.row.status === 1"
|
<el-button size="mini" type="text" icon="el-icon-edit" :disabled="scope.row.status === 1"
|
||||||
@@ -446,9 +446,9 @@ export default {
|
|||||||
}, `deliveryWaybill_${new Date().getTime()}.xlsx`)
|
}, `deliveryWaybill_${new Date().getTime()}.xlsx`)
|
||||||
},
|
},
|
||||||
/** 打印发货单 */
|
/** 打印发货单 */
|
||||||
handlePrint(row) {
|
handlePrint(row, printType) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.printType = 0;
|
this.printType = printType || 0;
|
||||||
// 获取发货单明细
|
// 获取发货单明细
|
||||||
listDeliveryWaybillDetail({
|
listDeliveryWaybillDetail({
|
||||||
waybillId: row.waybillId,
|
waybillId: row.waybillId,
|
||||||
@@ -480,7 +480,7 @@ export default {
|
|||||||
const actualWahouseNames = [...new Set(response.rows.filter(item => Boolean(item.actualWarehouseName)).map(item => item.actualWarehouseName.slice(0, 3)))].join(';');
|
const actualWahouseNames = [...new Set(response.rows.filter(item => Boolean(item.actualWarehouseName)).map(item => item.actualWarehouseName.slice(0, 3)))].join(';');
|
||||||
this.currentWaybill = {
|
this.currentWaybill = {
|
||||||
...row,
|
...row,
|
||||||
pickupLocation: actualWahouseNames || '',
|
pickupLocation: (actualWahouseNames || '') + ';共' + this.currentWaybillDetails.length + '卷,合计' + this.currentWaybillDetails.reduce((acc, item) => acc + parseFloat(item.weight), 0).toFixed(3) + '吨',
|
||||||
};
|
};
|
||||||
this.currentWaybillDetails = this.currentWaybillDetails.map(item => {
|
this.currentWaybillDetails = this.currentWaybillDetails.map(item => {
|
||||||
const actualWarehouseName = response.rows.find(detail => detail.coilId === item.coilId)?.actualWarehouseName || '';
|
const actualWarehouseName = response.rows.find(detail => detail.coilId === item.coilId)?.actualWarehouseName || '';
|
||||||
@@ -503,64 +503,6 @@ export default {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 打印发货单 */
|
|
||||||
handlePrintSimple(row) {
|
|
||||||
this.loading = true;
|
|
||||||
this.printType = 1;
|
|
||||||
// 获取发货单明细
|
|
||||||
listDeliveryWaybillDetail({
|
|
||||||
waybillId: row.waybillId,
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 1000 // 获取所有明细
|
|
||||||
}).then(response => {
|
|
||||||
// 处理字段映射,确保与wayBill组件使用的字段名一致
|
|
||||||
this.currentWaybillDetails = response.rows.map(item => ({
|
|
||||||
coilId: item.coilId,
|
|
||||||
productName: item.productName,
|
|
||||||
edgeType: item.edgeType,
|
|
||||||
packageType: item.packaging, // 映射packaging到packageType
|
|
||||||
settlementType: item.settlementType,
|
|
||||||
rawMaterialFactory: item.rawMaterialFactory,
|
|
||||||
coilNumber: item.coilNo, // 映射coilNo到coilNumber
|
|
||||||
specification: item.specification,
|
|
||||||
material: item.material,
|
|
||||||
quantity: item.quantity,
|
|
||||||
weight: item.weight,
|
|
||||||
unitPrice: item.unitPrice || '',
|
|
||||||
// 单价为空时,显示为空字符串
|
|
||||||
remark: item.remark
|
|
||||||
}));
|
|
||||||
const coils = this.currentWaybillDetails.map(item => item.coilId).join(',');
|
|
||||||
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('获取发货单明细失败');
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user