Merge remote-tracking branch 'origin/0.8.X' into 0.8.X
This commit is contained in:
@@ -947,7 +947,8 @@ body {
|
|||||||
.el-dialog.is-fullscreen {
|
.el-dialog.is-fullscreen {
|
||||||
.el-dialog__body {
|
.el-dialog__body {
|
||||||
padding: $--spacing-lg;
|
padding: $--spacing-lg;
|
||||||
max-height: calc(100vh - 100px);
|
height: calc(100vh - 100px);
|
||||||
|
max-height: 100vh;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
export const defaultColumns = [
|
export const defaultColumns = [{
|
||||||
{
|
|
||||||
label: '入场卷号',
|
label: '入场卷号',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
prop: 'enterCoilNo',
|
prop: 'enterCoilNo',
|
||||||
@@ -30,6 +29,12 @@ export const defaultColumns = [
|
|||||||
prop: 'specification',
|
prop: 'specification',
|
||||||
width: '100'
|
width: '100'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '重量(t)',
|
||||||
|
align: 'center',
|
||||||
|
prop: 'netWeight',
|
||||||
|
width: '100'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '材质',
|
label: '材质',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
@@ -42,12 +47,6 @@ export const defaultColumns = [
|
|||||||
prop: 'manufacturer',
|
prop: 'manufacturer',
|
||||||
width: '100'
|
width: '100'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: '重量(t)',
|
|
||||||
align: 'center',
|
|
||||||
prop: 'netWeight',
|
|
||||||
width: '100'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: '库区',
|
label: '库区',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
@@ -62,10 +61,10 @@ export const defaultColumns = [
|
|||||||
width: '100',
|
width: '100',
|
||||||
showOverflowTooltip: true
|
showOverflowTooltip: true
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
label: '备注',
|
// label: '备注',
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
prop: 'remark',
|
// prop: 'remark',
|
||||||
showOverflowTooltip: true
|
// showOverflowTooltip: true
|
||||||
}
|
// }
|
||||||
]
|
]
|
||||||
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
<el-dialog title="选择钢卷" :visible.sync="dialogVisible" :width="dialogWidth" :close-on-click-modal="false"
|
<el-dialog title="选择钢卷" :visible.sync="dialogVisible" :width="dialogWidth" :close-on-click-modal="false"
|
||||||
@close="handleClose" append-to-body :fullscreen="orderBy">
|
@close="handleClose" append-to-body :fullscreen="orderBy">
|
||||||
|
<div style="height: 100%; overflow-y: scroll; overflow-x: hidden; display: flex; flex-direction: column; padding: 10px;">
|
||||||
<!-- 搜索区域 -->
|
<!-- 搜索区域 -->
|
||||||
<el-form v-if="!rangeMode" inline :model="queryParams" class="search-form">
|
<el-form v-if="!rangeMode" inline :model="queryParams" class="search-form">
|
||||||
<el-form-item label="入场卷号">
|
<el-form-item label="入场卷号">
|
||||||
@@ -48,8 +49,8 @@
|
|||||||
clearable />
|
clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="厂家" v-if="queryParams.itemType">
|
<el-form-item label="厂家" v-if="queryParams.itemType">
|
||||||
<muti-select v-model="queryParams.itemManufacturer" :options="dict.type.coil_manufacturer" placeholder="请选择厂家"
|
<muti-select v-model="queryParams.itemManufacturer" :options="dict.type.coil_manufacturer"
|
||||||
clearable />
|
placeholder="请选择厂家" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="表面处理" v-if="queryParams.itemType">
|
<el-form-item label="表面处理" v-if="queryParams.itemType">
|
||||||
<el-input v-model="queryParams.itemSurfaceTreatmentDesc" placeholder="请输入表面处理" clearable size="small" />
|
<el-input v-model="queryParams.itemSurfaceTreatmentDesc" placeholder="请输入表面处理" clearable size="small" />
|
||||||
@@ -79,7 +80,10 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
|
<el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
|
||||||
<el-checkbox v-if="orderBy" style="margin-left: 10px;" v-model="showCoilMap" size="small">显示钢卷地图</el-checkbox>
|
<el-button v-if="multiple" type="primary" size="small" icon="el-icon-check"
|
||||||
|
@click="handleSelectAllCurrentPage">全选当前卷</el-button>
|
||||||
|
<el-checkbox v-if="orderBy" style="margin-left: 10px;" v-model="showCoilMap"
|
||||||
|
size="small">显示钢卷地图</el-checkbox>
|
||||||
<el-checkbox v-if="orderBy && orderId" style="margin-left: 10px;" v-model="showOrderInfo"
|
<el-checkbox v-if="orderBy && orderId" style="margin-left: 10px;" v-model="showOrderInfo"
|
||||||
size="small">显示订单详情</el-checkbox>
|
size="small">显示订单详情</el-checkbox>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -90,13 +94,14 @@
|
|||||||
<template slot="panelA">
|
<template slot="panelA">
|
||||||
<div style="height: 100%; overflow-y: scroll; overflow-x: hidden;">
|
<div style="height: 100%; overflow-y: scroll; overflow-x: hidden;">
|
||||||
<!-- 数据表格 -->
|
<!-- 数据表格 -->
|
||||||
<el-table v-loading="loading" :data="coilList" @row-click="handleRowClick"
|
<el-table v-loading="loading" :data="coilList" @row-click="handleRowClick" style="width: 100%"
|
||||||
style="width: 100%" :row-class-name="getRowClassName">
|
:row-class-name="getRowClassName">
|
||||||
<!-- 自定义列 -->
|
<!-- 自定义列 -->
|
||||||
<el-table-column v-for="column in renderColumns" :label="column.label" :align="column.align"
|
<el-table-column v-for="column in renderColumns" :label="column.label" :align="column.align"
|
||||||
:prop="column.prop" :width="column.width" :show-overflow-tooltip="column.showOverflowTooltip" />
|
:prop="column.prop" :width="column.width" :show-overflow-tooltip="column.showOverflowTooltip" />
|
||||||
<el-table-column v-if="orderBy" label="表面处理" prop="surfaceTreatmentDesc"></el-table-column>
|
|
||||||
<el-table-column v-if="orderBy" label="品质" prop="qualityStatus"></el-table-column>
|
<el-table-column v-if="orderBy" label="品质" prop="qualityStatus"></el-table-column>
|
||||||
|
<el-table-column v-if="orderBy" label="表面处理" prop="surfaceTreatmentDesc"></el-table-column>
|
||||||
|
<el-table-column label="备注" prop="remark"></el-table-column>
|
||||||
<el-table-column v-if="orderBy" label="切边" prop="trimmingRequirement"></el-table-column>
|
<el-table-column v-if="orderBy" label="切边" prop="trimmingRequirement"></el-table-column>
|
||||||
<el-table-column v-if="orderBy" label="包装" prop="packagingRequirement"></el-table-column>
|
<el-table-column v-if="orderBy" label="包装" prop="packagingRequirement"></el-table-column>
|
||||||
<el-table-column v-if="orderBy" label="镀层质量" prop="zincLayer"></el-table-column>
|
<el-table-column v-if="orderBy" label="镀层质量" prop="zincLayer"></el-table-column>
|
||||||
@@ -128,14 +133,17 @@
|
|||||||
<span class="stat-value">{{ totalNetWeight }}t</span>
|
<span class="stat-value">{{ totalNetWeight }}t</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<el-button type="danger" size="small" icon="el-icon-delete"
|
||||||
|
@click="handleClearAllSelected">全部清除</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="selected-table-wrapper">
|
<div class="selected-table-wrapper">
|
||||||
<el-table :data="selectedCoils" height="100%">
|
<el-table :data="selectedCoils" height="100%">
|
||||||
<el-table-column v-for="column in renderColumns" :label="column.label" :align="column.align"
|
<el-table-column v-for="column in renderColumns" :label="column.label" :align="column.align"
|
||||||
:prop="column.prop" :width="column.width" :show-overflow-tooltip="column.showOverflowTooltip" />
|
:prop="column.prop" :width="column.width" :show-overflow-tooltip="column.showOverflowTooltip" />
|
||||||
<el-table-column v-if="orderBy" label="表面处理" prop="surfaceTreatmentDesc"></el-table-column>
|
|
||||||
<el-table-column v-if="orderBy" label="品质" prop="qualityStatus"></el-table-column>
|
<el-table-column v-if="orderBy" label="品质" prop="qualityStatus"></el-table-column>
|
||||||
|
<el-table-column v-if="orderBy" label="表面处理" prop="surfaceTreatmentDesc"></el-table-column>
|
||||||
|
<el-table-column label="备注" prop="remark"></el-table-column>
|
||||||
<el-table-column v-if="orderBy" label="切边" prop="trimmingRequirement"></el-table-column>
|
<el-table-column v-if="orderBy" label="切边" prop="trimmingRequirement"></el-table-column>
|
||||||
<el-table-column v-if="orderBy" label="包装" prop="packagingRequirement"></el-table-column>
|
<el-table-column v-if="orderBy" label="包装" prop="packagingRequirement"></el-table-column>
|
||||||
<el-table-column v-if="orderBy" label="镀层质量" prop="zincLayer"></el-table-column>
|
<el-table-column v-if="orderBy" label="镀层质量" prop="zincLayer"></el-table-column>
|
||||||
@@ -166,7 +174,7 @@
|
|||||||
</DragResizePanel>
|
</DragResizePanel>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 非多选模式的原始布局 -->
|
<!-- 单选模式 -->
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<!-- 数据表格 -->
|
<!-- 数据表格 -->
|
||||||
<el-table v-loading="loading" :data="coilList" @row-click="handleRowClick" height="400px" style="width: 100%"
|
<el-table v-loading="loading" :data="coilList" @row-click="handleRowClick" height="400px" style="width: 100%"
|
||||||
@@ -174,8 +182,9 @@
|
|||||||
<!-- 自定义列 -->
|
<!-- 自定义列 -->
|
||||||
<el-table-column v-for="column in renderColumns" :label="column.label" :align="column.align"
|
<el-table-column v-for="column in renderColumns" :label="column.label" :align="column.align"
|
||||||
:prop="column.prop" :width="column.width" :show-overflow-tooltip="column.showOverflowTooltip" />
|
:prop="column.prop" :width="column.width" :show-overflow-tooltip="column.showOverflowTooltip" />
|
||||||
<el-table-column v-if="orderBy" label="表面处理" prop="surfaceTreatmentDesc"></el-table-column>
|
|
||||||
<el-table-column v-if="orderBy" label="品质" prop="qualityStatus"></el-table-column>
|
<el-table-column v-if="orderBy" label="品质" prop="qualityStatus"></el-table-column>
|
||||||
|
<el-table-column v-if="orderBy" label="表面处理" prop="surfaceTreatmentDesc"></el-table-column>
|
||||||
|
<el-table-column label="备注" prop="remark"></el-table-column>
|
||||||
<el-table-column v-if="orderBy" label="切边" prop="trimmingRequirement"></el-table-column>
|
<el-table-column v-if="orderBy" label="切边" prop="trimmingRequirement"></el-table-column>
|
||||||
<el-table-column v-if="orderBy" label="包装" prop="packagingRequirement"></el-table-column>
|
<el-table-column v-if="orderBy" label="包装" prop="packagingRequirement"></el-table-column>
|
||||||
<el-table-column v-if="orderBy" label="镀层质量" prop="zincLayer"></el-table-column>
|
<el-table-column v-if="orderBy" label="镀层质量" prop="zincLayer"></el-table-column>
|
||||||
@@ -191,6 +200,8 @@
|
|||||||
:limit.sync="queryParams.pageSize" @pagination="getList" />
|
:limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="handleConfirm">确认选择</el-button>
|
<el-button type="primary" @click="handleConfirm">确认选择</el-button>
|
||||||
@@ -503,6 +514,42 @@ export default {
|
|||||||
this.selectedCoils = this.selectedCoils.filter(item => item.coilId !== row.coilId);
|
this.selectedCoils = this.selectedCoils.filter(item => item.coilId !== row.coilId);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 全选当前页
|
||||||
|
handleSelectAllCurrentPage() {
|
||||||
|
if (!this.multiple) return;
|
||||||
|
|
||||||
|
const warehouseIds = ['1988150210872930306', '1988150380649967617', '1988150800092950529', '1988151027466170370'];
|
||||||
|
const disabledOList = ['O', 'C+', 'C', 'C-', 'D+', 'D', 'D-'];
|
||||||
|
|
||||||
|
// 遍历当前页的所有钢卷
|
||||||
|
this.coilList.forEach(row => {
|
||||||
|
// 检查是否已选中
|
||||||
|
if (this.selectedCoils.some(item => item.coilId === row.coilId)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 禁用O卷检查逻辑
|
||||||
|
if (this.disableO) {
|
||||||
|
// 如果没有判级且不在指定库区,不能选择
|
||||||
|
if (!row.qualityStatus && !warehouseIds.includes(row.warehouseId)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 如果是禁用等级,不能选择
|
||||||
|
if (disabledOList.includes(row.qualityStatus)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 添加到已选列表
|
||||||
|
this.selectedCoils.push(row);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
// 全部清除已选
|
||||||
|
handleClearAllSelected() {
|
||||||
|
this.selectedCoils = [];
|
||||||
|
},
|
||||||
|
|
||||||
handleConfirm() {
|
handleConfirm() {
|
||||||
this.$emit('confirm', this.selectedCoils);
|
this.$emit('confirm', this.selectedCoils);
|
||||||
this.selectedCoils = [];
|
this.selectedCoils = [];
|
||||||
@@ -526,7 +573,7 @@ export default {
|
|||||||
};
|
};
|
||||||
queryPayload.selectType = queryPayload.itemType;
|
queryPayload.selectType = queryPayload.itemType;
|
||||||
const response = await listMaterialCoil(queryPayload);
|
const response = await listMaterialCoil(queryPayload);
|
||||||
const { pageNum, pageSize, excludeBound, orderBy, ...noPager } = queryPayload;
|
const { pageNum, pageSize, orderBy, ...noPager } = queryPayload;
|
||||||
getCoilStatisticsList(noPager).then((res) => {
|
getCoilStatisticsList(noPager).then((res) => {
|
||||||
console.log('钢卷统计数据:', res);
|
console.log('钢卷统计数据:', res);
|
||||||
this.coilTrimStatistics = res.data || {};
|
this.coilTrimStatistics = res.data || {};
|
||||||
@@ -665,6 +712,13 @@ export default {
|
|||||||
gap: 8px;
|
gap: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.coil-selector-drag-panel {
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
// 未选择状态样式
|
// 未选择状态样式
|
||||||
.no-selection {
|
.no-selection {
|
||||||
padding: 8px 12px;
|
padding: 8px 12px;
|
||||||
@@ -727,15 +781,11 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-dialog__body {
|
::v-deep .el-dialog__body {
|
||||||
padding: 20px;
|
padding: 0 !important;
|
||||||
max-height: calc(100vh - 200px);
|
max-height: calc(100vh - 200px);
|
||||||
overflow-y: auto;
|
min-height: 500px;
|
||||||
}
|
overflow-y: hidden !important;
|
||||||
|
box-sizing: border-box;
|
||||||
// 多选模式拖拽面板容器样式
|
|
||||||
.coil-selector-drag-panel {
|
|
||||||
height: 70vh;
|
|
||||||
max-height: 700px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// panelA容器样式
|
// panelA容器样式
|
||||||
@@ -768,12 +818,19 @@ export default {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
min-height: 0;
|
||||||
|
max-height: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 已选表格容器样式
|
// 已选表格容器样式
|
||||||
.selected-table-wrapper {
|
.selected-table-wrapper {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow: hidden;
|
overflow-y: hidden;
|
||||||
|
overflow-x: hidden;
|
||||||
|
min-height: 0;
|
||||||
|
max-height: calc(100% - 30px);
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 空面板样式
|
// 空面板样式
|
||||||
@@ -815,6 +872,10 @@ export default {
|
|||||||
|
|
||||||
// 已选钢卷统计信息样式
|
// 已选钢卷统计信息样式
|
||||||
.selected-stats {
|
.selected-stats {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
.stats-content {
|
.stats-content {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 24px;
|
gap: 24px;
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
<h3>{{ currentPlanSheetInfo.planSheetName || '排产单详情' }}</h3>
|
<h3>{{ currentPlanSheetInfo.planSheetName || '排产单详情' }}</h3>
|
||||||
<div>
|
<div>
|
||||||
<el-button type="primary" plain @click="handleAdd">新增明细</el-button>
|
<el-button type="primary" plain @click="handleAdd">新增明细</el-button>
|
||||||
|
<el-button type="success" plain @click="handleBatchAdd">批量新增</el-button>
|
||||||
<el-button type="info" plain @click="getList">刷新</el-button>
|
<el-button type="info" plain @click="getList">刷新</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -287,6 +288,75 @@
|
|||||||
<el-table-column label="备注" align="center" prop="remark" />
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 批量新增对话框 -->
|
||||||
|
<el-dialog title="批量新增" :visible.sync="batchAddDialogVisible" width="80%" append-to-body>
|
||||||
|
<div class="batch-add-content">
|
||||||
|
<!-- 合同选择 -->
|
||||||
|
<div class="contract-section">
|
||||||
|
<div class="section-title">选择合同</div>
|
||||||
|
<el-form :model="batchQueryParams" ref="batchQueryForm" size="small" :inline="true" label-width="80px">
|
||||||
|
<el-form-item label="合同号" prop="contractCode">
|
||||||
|
<el-input v-model="batchQueryParams.contractCode" placeholder="请输入合同号" style="width: 180px" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户">
|
||||||
|
<el-input v-model="batchQueryParams.customerName" placeholder="请输入客户名称" style="width: 180px" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="业务员">
|
||||||
|
<el-input v-model="batchQueryParams.salesman" placeholder="请输入业务员" style="width: 120px" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" @click="getBatchOrderList">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" @click="resetBatchQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-table v-loading="batchOrderLoading" :data="batchOrderList" style="width: 100%" border @row-click="selectBatchContract"
|
||||||
|
highlight-current-row>
|
||||||
|
<el-table-column prop="contractCode" label="合同号" />
|
||||||
|
<el-table-column prop="signTime" label="签订时间" width="150" />
|
||||||
|
<el-table-column prop="signLocation" label="签订地点" />
|
||||||
|
<el-table-column prop="companyName" label="客户公司" />
|
||||||
|
<el-table-column prop="salesman" label="业务员" width="100" />
|
||||||
|
<el-table-column prop="deliveryDate" label="交货日期" width="150" />
|
||||||
|
<el-table-column label="操作" width="80" fixed="right">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button type="text" size="small" @click.stop="selectBatchContract(scope.row)">选择</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div class="pagination-container">
|
||||||
|
<el-pagination background layout="prev, pager, next, jumper" :total="batchOrderTotal"
|
||||||
|
:page-size="batchQueryParams.pageSize" :current-page.sync="batchQueryParams.pageNum"
|
||||||
|
@current-change="getBatchOrderList" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 明细选择 -->
|
||||||
|
<div class="item-section" v-if="selectedContract">
|
||||||
|
<div class="section-title">选择明细(多选)</div>
|
||||||
|
<el-table v-loading="batchItemLoading" :data="batchItemList" style="width: 100%" border
|
||||||
|
@selection-change="handleBatchItemSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" />
|
||||||
|
<el-table-column label="产品类型" align="center" prop="productType" />
|
||||||
|
<el-table-column label="成品宽度" align="center" prop="width" />
|
||||||
|
<el-table-column label="成品厚度" align="center" prop="thickness" />
|
||||||
|
<el-table-column label="成品规格" align="center" prop="finishedProductSpec" />
|
||||||
|
<el-table-column label="材质" align="center" prop="material" />
|
||||||
|
<el-table-column label="重量" align="center" prop="weight" />
|
||||||
|
<el-table-column label="卷数" align="center" prop="productNum" />
|
||||||
|
<el-table-column label="表面处理" align="center" prop="surfaceTreatment" />
|
||||||
|
<el-table-column label="包装要求" align="center" prop="packagingReq" />
|
||||||
|
<el-table-column label="切边要求" align="center" prop="edgeCuttingReq" />
|
||||||
|
<el-table-column label="用途" align="center" prop="purpose" />
|
||||||
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="batchAddDialogVisible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="confirmBatchAdd" :disabled="selectedBatchItems.length === 0">确认新增</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -351,7 +421,31 @@ export default {
|
|||||||
// 订单明细加载状态
|
// 订单明细加载状态
|
||||||
orderItemLoading: false,
|
orderItemLoading: false,
|
||||||
// 当前编辑的行
|
// 当前编辑的行
|
||||||
currentEditingRow: null
|
currentEditingRow: null,
|
||||||
|
// 批量新增对话框
|
||||||
|
batchAddDialogVisible: false,
|
||||||
|
// 批量查询参数
|
||||||
|
batchQueryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
contractCode: undefined,
|
||||||
|
customerName: undefined,
|
||||||
|
salesman: undefined
|
||||||
|
},
|
||||||
|
// 批量订单列表
|
||||||
|
batchOrderList: [],
|
||||||
|
// 批量订单总数
|
||||||
|
batchOrderTotal: 0,
|
||||||
|
// 批量订单加载状态
|
||||||
|
batchOrderLoading: false,
|
||||||
|
// 批量明细列表
|
||||||
|
batchItemList: [],
|
||||||
|
// 批量明细加载状态
|
||||||
|
batchItemLoading: false,
|
||||||
|
// 选中的合同
|
||||||
|
selectedContract: null,
|
||||||
|
// 选中的明细
|
||||||
|
selectedBatchItems: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -582,6 +676,98 @@ export default {
|
|||||||
// 处理订单行点击
|
// 处理订单行点击
|
||||||
handleOrderSelect(row) {
|
handleOrderSelect(row) {
|
||||||
this.selectOrder(row);
|
this.selectOrder(row);
|
||||||
|
},
|
||||||
|
// 打开批量新增对话框
|
||||||
|
handleBatchAdd() {
|
||||||
|
this.batchAddDialogVisible = true;
|
||||||
|
this.selectedContract = null;
|
||||||
|
this.selectedBatchItems = [];
|
||||||
|
this.getBatchOrderList();
|
||||||
|
},
|
||||||
|
// 获取批量订单列表
|
||||||
|
getBatchOrderList() {
|
||||||
|
this.batchOrderLoading = true;
|
||||||
|
listOrder(this.batchQueryParams).then(response => {
|
||||||
|
this.batchOrderList = response.rows;
|
||||||
|
this.batchOrderTotal = response.total;
|
||||||
|
this.batchOrderLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 重置批量查询参数
|
||||||
|
resetBatchQuery() {
|
||||||
|
this.batchQueryParams = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
contractCode: undefined,
|
||||||
|
customerName: undefined,
|
||||||
|
salesman: undefined
|
||||||
|
};
|
||||||
|
this.getBatchOrderList();
|
||||||
|
},
|
||||||
|
// 选择批量合同
|
||||||
|
selectBatchContract(row) {
|
||||||
|
this.selectedContract = row;
|
||||||
|
this.selectedBatchItems = [];
|
||||||
|
this.batchItemLoading = true;
|
||||||
|
listOrderItem({ orderId: row.orderId }).then(res => {
|
||||||
|
this.batchItemList = res.rows;
|
||||||
|
this.batchItemLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 处理批量明细选择变更
|
||||||
|
handleBatchItemSelectionChange(selection) {
|
||||||
|
this.selectedBatchItems = selection;
|
||||||
|
},
|
||||||
|
// 确认批量新增
|
||||||
|
confirmBatchAdd() {
|
||||||
|
if (this.selectedBatchItems.length === 0) {
|
||||||
|
this.$message.warning('请至少选择一条明细');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$confirm(`确认新增 ${this.selectedBatchItems.length} 条明细?`, '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
const currentMaxSeqNo = this.planDetailList.length > 0
|
||||||
|
? Math.max(...this.planDetailList.map(item => parseInt(item.bizSeqNo) || 0))
|
||||||
|
: 0;
|
||||||
|
|
||||||
|
const addPromises = this.selectedBatchItems.map((item, index) => {
|
||||||
|
const newRow = {
|
||||||
|
planSheetId: this.currentPlanSheetId,
|
||||||
|
bizSeqNo: currentMaxSeqNo + index + 1,
|
||||||
|
orderCode: this.selectedContract.orderCode,
|
||||||
|
contractCode: this.selectedContract.contractCode,
|
||||||
|
customerName: this.selectedContract.companyName,
|
||||||
|
salesman: this.selectedContract.salesman,
|
||||||
|
orderId: this.selectedContract.orderId,
|
||||||
|
productName: item.productType,
|
||||||
|
productMaterial: item.material,
|
||||||
|
productWidth: item.width,
|
||||||
|
rollingThick: item.thickness,
|
||||||
|
markCoatThick: item.thickness,
|
||||||
|
tonSteelLengthRange: 0,
|
||||||
|
planQty: item.productNum,
|
||||||
|
planWeight: item.weight,
|
||||||
|
surfaceTreatment: item.surfaceTreatment,
|
||||||
|
productPackaging: item.packagingReq,
|
||||||
|
widthReq: item.edgeCuttingReq,
|
||||||
|
productEdgeReq: item.widthTolerance,
|
||||||
|
usageReq: item.purpose
|
||||||
|
};
|
||||||
|
return addPlanDetail(newRow);
|
||||||
|
});
|
||||||
|
|
||||||
|
Promise.all(addPromises).then(() => {
|
||||||
|
this.$message.success('批量新增成功');
|
||||||
|
this.batchAddDialogVisible = false;
|
||||||
|
this.getList();
|
||||||
|
}).catch(error => {
|
||||||
|
this.$message.error('批量新增失败');
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -654,4 +840,25 @@ export default {
|
|||||||
/* ::v-deep .el-input__inner {
|
/* ::v-deep .el-input__inner {
|
||||||
padding: 0 1px;
|
padding: 0 1px;
|
||||||
} */
|
} */
|
||||||
|
|
||||||
|
.batch-add-content {
|
||||||
|
padding: 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contract-section {
|
||||||
|
margin-bottom: 30px;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-section {
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-title {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 600;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
color: #303133;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user