Merge remote-tracking branch 'origin/0.8.X' into 0.8.X
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
export const defaultColumns = [{
|
||||
export const defaultColumns = [
|
||||
{
|
||||
label: '入场卷号',
|
||||
align: 'center',
|
||||
prop: 'enterCoilNo',
|
||||
@@ -61,10 +62,149 @@ export const defaultColumns = [{
|
||||
width: '100',
|
||||
showOverflowTooltip: true
|
||||
},
|
||||
// {
|
||||
// label: '备注',
|
||||
// align: 'center',
|
||||
// prop: 'remark',
|
||||
// showOverflowTooltip: true
|
||||
// }
|
||||
{
|
||||
label: '备注',
|
||||
align: 'center',
|
||||
prop: 'remark',
|
||||
showOverflowTooltip: true
|
||||
},
|
||||
]
|
||||
|
||||
export const fullPageDefaultColumns = [
|
||||
{
|
||||
label: '入场卷号',
|
||||
align: 'center',
|
||||
prop: 'enterCoilNo',
|
||||
showOverflowTooltip: true
|
||||
},
|
||||
{
|
||||
label: '当前卷号',
|
||||
align: 'center',
|
||||
prop: 'currentCoilNo',
|
||||
showOverflowTooltip: true
|
||||
},
|
||||
{
|
||||
label: '存储位置',
|
||||
align: 'center',
|
||||
prop: 'actualWarehouseName',
|
||||
width: '120',
|
||||
showOverflowTooltip: true
|
||||
},
|
||||
{
|
||||
label: '物料',
|
||||
align: 'center',
|
||||
prop: 'itemName',
|
||||
width: '100'
|
||||
},
|
||||
{
|
||||
label: '规格',
|
||||
align: 'center',
|
||||
prop: 'specification',
|
||||
width: '100'
|
||||
},
|
||||
{
|
||||
label: '重量(t)',
|
||||
align: 'center',
|
||||
prop: 'netWeight',
|
||||
width: '100'
|
||||
},
|
||||
{
|
||||
label: '材质',
|
||||
align: 'center',
|
||||
prop: 'material',
|
||||
width: '100'
|
||||
},
|
||||
{
|
||||
label: '厂家',
|
||||
align: 'center',
|
||||
prop: 'manufacturer',
|
||||
width: '100'
|
||||
},
|
||||
{
|
||||
label: '库区',
|
||||
align: 'center',
|
||||
prop: 'warehouseName',
|
||||
width: '120',
|
||||
showOverflowTooltip: true
|
||||
},
|
||||
{
|
||||
label: '创建时间',
|
||||
align: 'center',
|
||||
prop: 'createTime',
|
||||
width: '100',
|
||||
showOverflowTooltip: true
|
||||
},
|
||||
{
|
||||
label: '品质',
|
||||
align: 'center',
|
||||
prop: 'qualityStatus',
|
||||
},
|
||||
{
|
||||
label: '表面处理',
|
||||
align: 'center',
|
||||
prop: 'surfaceTreatmentDesc',
|
||||
},
|
||||
{
|
||||
label: '备注',
|
||||
align: 'center',
|
||||
prop: 'remark',
|
||||
width: '100',
|
||||
showOverflowTooltip: true
|
||||
},
|
||||
{
|
||||
label: '切边',
|
||||
align: 'center',
|
||||
prop: 'trimmingRequirement',
|
||||
},
|
||||
{
|
||||
label: '包装',
|
||||
align: 'center',
|
||||
prop: 'packagingRequirement',
|
||||
},
|
||||
{
|
||||
label: '镀层质量',
|
||||
align: 'center',
|
||||
prop: 'zincLayer',
|
||||
},
|
||||
]
|
||||
|
||||
export const optionalColumns = [
|
||||
{ label: '入场卷号', value: 'enterCoilNo' },
|
||||
{ label: '当前卷号', value: 'currentCoilNo' },
|
||||
{ label: '厂家钢卷号', value: 'supplierCoilNo' },
|
||||
{ label: '逻辑库区', value: 'warehouseName' },
|
||||
{ label: '实际库区', value: 'actualWarehouseName' },
|
||||
{ label: '质量状态', value: 'qualityStatus' },
|
||||
{ label: '切边要求', value: 'trimmingRequirement' },
|
||||
{ label: '原料材质', value: 'packingStatus' },
|
||||
{ label: '包装要求', value: 'packagingRequirement' },
|
||||
{ label: '产品类型', value: 'itemId' },
|
||||
{ label: '品名', value: 'itemName' },
|
||||
{ label: '宽度', value: 'computedWidth' },
|
||||
{ label: '厚度', value: 'computedThickness' },
|
||||
{ label: '规格', value: 'specification' },
|
||||
{ label: '材质', value: 'material' },
|
||||
{ label: '厂家', value: 'manufacturer' },
|
||||
{ label: '表面处理', value: 'surfaceTreatmentDesc' },
|
||||
{ label: '镀层质量', value: 'zincLayer' },
|
||||
{ label: '长度', value: 'length' },
|
||||
{ label: '毛重', value: 'grossWeight' },
|
||||
{ label: '净重', value: 'netWeight' },
|
||||
{ label: '创建时间', value: 'createTime' },
|
||||
{ label: '创建人', value: 'createBy' },
|
||||
{ label: '更新时间', value: 'updateTime' },
|
||||
{ label: '更新人', value: 'updateByName' },
|
||||
{ label: '备注', value: 'remark' },
|
||||
{ label: '生产开始时间', value: 'productionStartTime' },
|
||||
{ label: '生产结束时间', value: 'productionEndTime' },
|
||||
{ label: '生产耗时', value: 'productionDuration' },
|
||||
{ label: '出库状态', value: 'status' },
|
||||
{ label: '操作完成时间', value: 'actionCompleteTime' },
|
||||
{ label: '生产线速度', value: 'productionSpeed' },
|
||||
{ label: '发货绑定车牌号', value: 'bindLicensePlate' },
|
||||
{ label: '发货绑定目标客户', value: 'bindConsigneeUnit' },
|
||||
{ label: '发货绑定单位', value: 'bindSenderUnit' },
|
||||
{ label: '发货绑定负责人', value: 'bindPrincipal' },
|
||||
{ label: '发货配卷时间', value: 'bindDeliveryTime' },
|
||||
{ label: '发货时间', value: 'exportTime' },
|
||||
]
|
||||
|
||||
@@ -19,75 +19,85 @@
|
||||
|
||||
<el-dialog title="选择钢卷" :visible.sync="dialogVisible" :width="dialogWidth" :close-on-click-modal="false"
|
||||
@close="handleClose" append-to-body :fullscreen="orderBy">
|
||||
<div style="height: 100%; overflow-y: scroll; overflow-x: hidden; display: flex; flex-direction: column; padding: 10px;">
|
||||
<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-item label="入场卷号">
|
||||
<el-input v-model="queryParams.enterCoilNo" placeholder="请输入入场卷号" clearable size="small"
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="当前卷号">
|
||||
<el-input v-model="queryParams.currentCoilNo" placeholder="请输入当前卷号" clearable size="small"
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料类型">
|
||||
<el-select v-model="queryParams.itemType" placeholder="请选择物料类型" size="small" clearable>
|
||||
<el-option label="成品" value="product" />
|
||||
<el-option label="原料" value="raw_material" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料名称" v-if="queryParams.itemType">
|
||||
<muti-select v-model="queryParams.itemName" :options="dict.type.coil_itemname" placeholder="请选择物料名称"
|
||||
clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="规格" v-if="queryParams.itemType">
|
||||
<memo-input storageKey="coilSpec" v-model="queryParams.itemSpecification" placeholder="请输入规格" clearable
|
||||
size="small" @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="材质" v-if="queryParams.itemType">
|
||||
<muti-select v-model="queryParams.itemMaterial" :options="dict.type.coil_material" placeholder="请选择材质"
|
||||
clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="厂家" v-if="queryParams.itemType">
|
||||
<muti-select v-model="queryParams.itemManufacturer" :options="dict.type.coil_manufacturer"
|
||||
placeholder="请选择厂家" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="表面处理" v-if="queryParams.itemType">
|
||||
<el-input v-model="queryParams.itemSurfaceTreatmentDesc" placeholder="请输入表面处理" clearable size="small" />
|
||||
</el-form-item>
|
||||
<el-form-item label="切边" prop="trimmingRequirement" v-if="orderBy">
|
||||
<el-select v-model="queryParams.trimmingRequirement" placeholder="请选择切边" clearable style="width: 100%">
|
||||
<el-option label="净边" value="净边" />
|
||||
<el-option label="毛边" value="毛边" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="包装" prop="packagingRequirement" v-if="orderBy">
|
||||
<el-select v-model="queryParams.packagingRequirement" placeholder="请选择包装" clearable style="width: 100%">
|
||||
<el-option label="裸包" value="裸包" />
|
||||
<el-option label="普包" value="普包" />
|
||||
<el-option label="简包" value="简包" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="品质">
|
||||
<muti-select v-model="queryParams.qualityStatusCsv" :options="dict.type.coil_quality_status"
|
||||
placeholder="请选择品质" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="实际库区" v-if="orderBy">
|
||||
<actual-warehouse-select v-model="queryParams.actualWarehouseId" placeholder="请选择实际库区" canSelectLevel2
|
||||
canSelectDisabled :clearInput="false" clearable />
|
||||
</el-form-item>
|
||||
<div v-if="!rangeMode" style="margin-bottom: 10px; display: flex;">
|
||||
<el-form inline :model="queryParams" class="search-form">
|
||||
<el-form-item label="入场卷号">
|
||||
<el-input v-model="queryParams.enterCoilNo" placeholder="请输入入场卷号" clearable size="small"
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="当前卷号">
|
||||
<el-input v-model="queryParams.currentCoilNo" placeholder="请输入当前卷号" clearable size="small"
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料类型">
|
||||
<el-select v-model="queryParams.itemType" placeholder="请选择物料类型" size="small" clearable>
|
||||
<el-option label="成品" value="product" />
|
||||
<el-option label="原料" value="raw_material" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料名称" v-if="queryParams.itemType">
|
||||
<muti-select v-model="queryParams.itemName" :options="dict.type.coil_itemname" placeholder="请选择物料名称"
|
||||
clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="规格" v-if="queryParams.itemType">
|
||||
<memo-input storageKey="coilSpec" v-model="queryParams.itemSpecification" placeholder="请输入规格" clearable
|
||||
size="small" @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="材质" v-if="queryParams.itemType">
|
||||
<muti-select v-model="queryParams.itemMaterial" :options="dict.type.coil_material" placeholder="请选择材质"
|
||||
clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="厂家" v-if="queryParams.itemType">
|
||||
<muti-select v-model="queryParams.itemManufacturer" :options="dict.type.coil_manufacturer"
|
||||
placeholder="请选择厂家" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="表面处理" v-if="queryParams.itemType">
|
||||
<el-input v-model="queryParams.itemSurfaceTreatmentDesc" placeholder="请输入表面处理" clearable size="small" />
|
||||
</el-form-item>
|
||||
<el-form-item label="切边" prop="trimmingRequirement" v-if="orderBy">
|
||||
<el-select v-model="queryParams.trimmingRequirement" placeholder="请选择切边" clearable style="width: 100%">
|
||||
<el-option label="净边" value="净边" />
|
||||
<el-option label="毛边" value="毛边" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="包装" prop="packagingRequirement" v-if="orderBy">
|
||||
<el-select v-model="queryParams.packagingRequirement" placeholder="请选择包装" clearable style="width: 100%">
|
||||
<el-option label="裸包" value="裸包" />
|
||||
<el-option label="普包" value="普包" />
|
||||
<el-option label="简包" value="简包" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="品质">
|
||||
<muti-select v-model="queryParams.qualityStatusCsv" :options="dict.type.coil_quality_status"
|
||||
placeholder="请选择品质" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="实际库区" v-if="orderBy">
|
||||
<actual-warehouse-select v-model="queryParams.actualWarehouseId" placeholder="请选择实际库区" canSelectLevel2
|
||||
canSelectDisabled :clearInput="false" clearable />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-form-item>
|
||||
|
||||
<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"
|
||||
size="small">显示订单详情</el-checkbox>
|
||||
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div style="display: flex; flex-direction: column; justify-content: flex-start; align-items: center; gap: 2px;">
|
||||
<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 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"
|
||||
size="small">显示订单详情</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-button type="warning" size="small" icon="el-icon-setting"
|
||||
@click="showColumnSetting = true">列配置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="multiple" class="coil-selector-drag-panel">
|
||||
<DragResizePanel direction="vertical" :initialSize="450" :minSize="200">
|
||||
@@ -99,12 +109,6 @@
|
||||
<!-- 自定义列 -->
|
||||
<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" />
|
||||
<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="packagingRequirement"></el-table-column>
|
||||
<el-table-column v-if="orderBy" label="镀层质量" prop="zincLayer"></el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
@@ -138,17 +142,11 @@
|
||||
</div>
|
||||
|
||||
<div class="selected-table-wrapper">
|
||||
<el-table :data="selectedCoils" height="100%">
|
||||
<el-table :data="selectedCoils" :height="orderBy ? '100%' : '200px'">
|
||||
<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" />
|
||||
<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="packagingRequirement"></el-table-column>
|
||||
<el-table-column v-if="orderBy" label="镀层质量" prop="zincLayer"></el-table-column>
|
||||
|
||||
<el-table-column label="操作" width="50">
|
||||
<el-table-column label="操作" width="50" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" @click="handleRemove(scope.row)">删除</el-button>
|
||||
</template>
|
||||
@@ -182,12 +180,6 @@
|
||||
<!-- 自定义列 -->
|
||||
<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" />
|
||||
<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="packagingRequirement"></el-table-column>
|
||||
<el-table-column v-if="orderBy" label="镀层质量" prop="zincLayer"></el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
@@ -226,6 +218,52 @@
|
||||
<order-detail v-if="orderBy && orderId && showOrderInfo" :orderId="orderId" :editable="false" />
|
||||
</div>
|
||||
</DragResizeBox>
|
||||
|
||||
<el-dialog title="列配置" :visible.sync="showColumnSetting" width="800px" append-to-body>
|
||||
<el-table :data="displayColumns" style="width: 100%" border row-key="prop" height="400">
|
||||
<el-table-column label="操作" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" @click="moveColumnUp(scope.$index)"
|
||||
:disabled="scope.$index === 0 || scope.row._isEmpty">上移</el-button>
|
||||
<el-button size="mini" @click="moveColumnDown(scope.$index)"
|
||||
:disabled="scope.$index === displayColumns.length - 1 || scope.row._isEmpty">下移</el-button>
|
||||
<el-button size="mini" type="danger" @click="removeColumn(scope.$index)"
|
||||
:disabled="scope.row._isEmpty">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="prop" label="字段名称">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.prop" filterable @change="(value) => columnPropChange(value, scope.row)"
|
||||
size="small">
|
||||
<el-option v-for="item in optionalColumns" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="label" label="表头名称">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.label" @blur="saveColumnConfig" size="small" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="width" label="宽度(不填则均分剩余宽度)">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.width" @blur="saveColumnConfig" size="small" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="align" label="对齐方式">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.align" @change="saveColumnConfig" size="small">
|
||||
<el-option label="左对齐" value="left" />
|
||||
<el-option label="居中" value="center" />
|
||||
<el-option label="右对齐" value="right" />
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="resetColumnConfig">恢复默认</el-button>
|
||||
<el-button type="primary" @click="confirmColumnConfig">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
@@ -236,7 +274,7 @@ import { listActualWarehouse } from "@/api/wms/actualWarehouse";
|
||||
import { treeActualWarehouseTwoLevel } from "@/api/wms/actualWarehouse";
|
||||
import MemoInput from '@/components/MemoInput/index.vue';
|
||||
import MutiSelect from '@/components/MutiSelect/index.vue';
|
||||
import { defaultColumns } from './data';
|
||||
import { defaultColumns, fullPageDefaultColumns, optionalColumns } from './data';
|
||||
import ActualWarehouseSelect from '@/components/KLPService/ActualWarehouseSelect/index.vue';
|
||||
import WarehouseBirdMini from '@/views/wms/warehouse/components/WarehouseBirdMini.vue';
|
||||
import DragResizeBox from '@/components/DragResizeBox/index.vue';
|
||||
@@ -323,7 +361,7 @@ export default {
|
||||
defaultType: {
|
||||
type: String,
|
||||
default: 'product'
|
||||
}
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -346,10 +384,10 @@ export default {
|
||||
actualWarehouseId: null,
|
||||
itemType: this.defaultType,
|
||||
selectType: this.defaultType,
|
||||
status: 0, // 不包含已发货的钢卷
|
||||
dataType: 1 // 只查询当前数据,不查询历史数据
|
||||
status: 0,
|
||||
dataType: 1
|
||||
},
|
||||
columns: defaultColumns,
|
||||
optionalColumns,
|
||||
selectedCoils: [],
|
||||
warehouseList: [],
|
||||
selectedNodeId: null,
|
||||
@@ -359,6 +397,9 @@ export default {
|
||||
treeLoading: false,
|
||||
showOrderInfo: false,
|
||||
coilTrimStatistics: {},
|
||||
showColumnSetting: false,
|
||||
columnsConfig: [],
|
||||
columnsConfigVersion: 0,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -383,8 +424,37 @@ export default {
|
||||
}
|
||||
},
|
||||
renderColumns() {
|
||||
// 如果有自定义列配置,使用它;否则使用默认列
|
||||
return this.coilColumn.length > 0 ? this.coilColumn : this.columns;
|
||||
const _ = this.columnsConfigVersion;
|
||||
if (this.coilColumn.length > 0) {
|
||||
return this.coilColumn;
|
||||
}
|
||||
const storageKey = this.columnStorageKey;
|
||||
const savedConfig = localStorage.getItem(storageKey);
|
||||
if (savedConfig) {
|
||||
try {
|
||||
const config = JSON.parse(savedConfig);
|
||||
if (config.length > 0) {
|
||||
return config;
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('解析列配置失败', e);
|
||||
}
|
||||
}
|
||||
return this.orderBy ? fullPageDefaultColumns : defaultColumns;
|
||||
},
|
||||
columnStorageKey() {
|
||||
return `coil-selector-columns-${this.orderBy ? 'full' : 'default'}`;
|
||||
},
|
||||
displayColumns() {
|
||||
const displayData = [...this.columnsConfig];
|
||||
displayData.push({
|
||||
label: "",
|
||||
prop: "",
|
||||
width: "100",
|
||||
align: "center",
|
||||
_isEmpty: true
|
||||
});
|
||||
return displayData;
|
||||
},
|
||||
// 已选钢卷ID集合(用于快速判断)
|
||||
selectedCoilIds() {
|
||||
@@ -411,7 +481,7 @@ export default {
|
||||
dialogVisible(val) {
|
||||
if (val) {
|
||||
this.resetQuery();
|
||||
this.getList();
|
||||
// this.getList();
|
||||
}
|
||||
},
|
||||
// 非触发器模式下,监听外部visible属性变化
|
||||
@@ -438,9 +508,13 @@ export default {
|
||||
return;
|
||||
}
|
||||
if (val && !this.selectedCoil?.coilId) {
|
||||
// 如果传入了coilId但还没有选中数据,尝试通过id匹配(可选功能)
|
||||
this.matchCoilById(val);
|
||||
}
|
||||
},
|
||||
showColumnSetting(val) {
|
||||
if (val) {
|
||||
this.loadColumnConfig();
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -694,8 +768,78 @@ export default {
|
||||
// 关闭对话框
|
||||
handleClose() {
|
||||
this.dialogVisible = false;
|
||||
// 触发关闭事件,通知父组件
|
||||
this.$emit('close');
|
||||
},
|
||||
confirmColumnConfig() {
|
||||
this.saveColumnConfig();
|
||||
this.loadColumnConfig();
|
||||
this.showColumnSetting = false;
|
||||
},
|
||||
loadColumnConfig() {
|
||||
const storageKey = this.columnStorageKey;
|
||||
const savedConfig = localStorage.getItem(storageKey);
|
||||
if (savedConfig) {
|
||||
try {
|
||||
this.columnsConfig = JSON.parse(savedConfig);
|
||||
} catch (e) {
|
||||
console.error('解析列配置失败', e);
|
||||
this.columnsConfig = this.orderBy ? [...fullPageDefaultColumns] : [...defaultColumns];
|
||||
}
|
||||
} else {
|
||||
this.columnsConfig = this.orderBy ? [...fullPageDefaultColumns] : [...defaultColumns];
|
||||
}
|
||||
},
|
||||
saveColumnConfig() {
|
||||
const nonEmptyColumns = this.columnsConfig.filter(col => col.prop && col.label);
|
||||
localStorage.setItem(this.columnStorageKey, JSON.stringify(nonEmptyColumns));
|
||||
this.columnsConfigVersion++;
|
||||
},
|
||||
moveColumnUp(index) {
|
||||
if (index > 0 && !this.displayColumns[index]._isEmpty) {
|
||||
const temp = this.columnsConfig[index];
|
||||
this.columnsConfig.splice(index, 1);
|
||||
this.columnsConfig.splice(index - 1, 0, temp);
|
||||
this.saveColumnConfig();
|
||||
}
|
||||
},
|
||||
moveColumnDown(index) {
|
||||
if (index < this.columnsConfig.length - 1 && !this.displayColumns[index]._isEmpty) {
|
||||
const temp = this.columnsConfig[index];
|
||||
this.columnsConfig.splice(index, 1);
|
||||
this.columnsConfig.splice(index + 1, 0, temp);
|
||||
this.saveColumnConfig();
|
||||
}
|
||||
},
|
||||
removeColumn(index) {
|
||||
if (!this.displayColumns[index]._isEmpty) {
|
||||
this.columnsConfig.splice(index, 1);
|
||||
this.saveColumnConfig();
|
||||
}
|
||||
},
|
||||
columnPropChange(propValue, row) {
|
||||
const item = optionalColumns.find(item => item.value === propValue);
|
||||
if (item) {
|
||||
row.label = item.label;
|
||||
} else {
|
||||
row.label = propValue;
|
||||
}
|
||||
if (row._isEmpty && propValue) {
|
||||
const newColumn = {
|
||||
label: row.label,
|
||||
prop: row.prop,
|
||||
width: row.width,
|
||||
align: row.align,
|
||||
showOverflowTooltip: true
|
||||
};
|
||||
this.columnsConfig.push(newColumn);
|
||||
this.saveColumnConfig();
|
||||
} else {
|
||||
this.saveColumnConfig();
|
||||
}
|
||||
},
|
||||
resetColumnConfig() {
|
||||
this.columnsConfig = this.orderBy ? [...fullPageDefaultColumns] : [...defaultColumns];
|
||||
this.saveColumnConfig();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -2,6 +2,12 @@
|
||||
<div class="app-container">
|
||||
<!-- 搜索表单 -->
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="60px">
|
||||
<el-form-item label="名称" prop="poolName">
|
||||
<el-input v-model="queryParams.poolName" placeholder="请输入奖金池名称" clearable />
|
||||
<!-- <el-select v-model="queryParams.poolName" placeholder="请选择奖金池名称" clearable>
|
||||
<el-option v-for="item in bonusPoolList" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="产线" prop="productionLine">
|
||||
<el-select v-model="queryParams.productionLine" placeholder="请选择产线" clearable>
|
||||
<el-option v-for="item in productionLineList" :key="item.value" :label="item.label" :value="item.value" />
|
||||
@@ -32,6 +38,7 @@
|
||||
<!-- 奖金池列表 -->
|
||||
<el-table v-loading="loading" :data="bonusPoolList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="名称" align="center" prop="poolName" width="150" />
|
||||
<el-table-column label="产线" align="center" prop="productionLine" width="150" />
|
||||
<!-- <el-table-column label="奖金时间" align="center" prop="bonusTime" width="120">
|
||||
<template slot-scope="scope">
|
||||
@@ -75,6 +82,9 @@
|
||||
<!-- 新增/修改奖金池对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form-item label="名称" prop="poolName">
|
||||
<el-input v-model="form.poolName" placeholder="请输入奖金池名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="产线" prop="productionLine">
|
||||
<muti-select v-model="form.productionLine" placeholder="请选择产线" clearable filterable
|
||||
:options="productionLineList">
|
||||
|
||||
422
klp-ui/src/views/wms/bonus/pool.vue
Normal file
422
klp-ui/src/views/wms/bonus/pool.vue
Normal file
@@ -0,0 +1,422 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 搜索表单 -->
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="60px">
|
||||
<el-form-item label="名称" prop="poolName">
|
||||
<el-input v-model="queryParams.poolName" placeholder="请输入奖金池名称" clearable />
|
||||
<!-- <el-select v-model="queryParams.poolName" placeholder="请选择奖金池名称" clearable>
|
||||
<el-option v-for="item in bonusPoolList" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="产线" prop="productionLine">
|
||||
<el-select v-model="queryParams.productionLine" placeholder="请选择产线" clearable>
|
||||
<el-option v-for="item in productionLineList" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="createBy">
|
||||
<el-input v-model="queryParams.createBy" placeholder="请输入创建人" clearable />
|
||||
<!-- <el-select v-model="queryParams.poolName" placeholder="请选择奖金池名称" clearable>
|
||||
<el-option v-for="item in bonusPoolList" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select> -->
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<!-- <el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-setting" size="mini"
|
||||
@click="handlePostCoeffConfig">岗位系数配置</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-document" size="mini"
|
||||
@click="handleTemplateManagement">模板管理</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row> -->
|
||||
|
||||
<!-- 奖金池列表 -->
|
||||
<el-table v-loading="loading" :data="bonusPoolList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="名称" align="center" prop="poolName" width="150" />
|
||||
<el-table-column label="产线" align="center" prop="productionLine" width="150" />
|
||||
<el-table-column label="开始时间" align="center" prop="bonusStartTime" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.bonusStartTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结束时间" align="center" prop="bonusEndTime" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.bonusEndTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总金额(元)" align="center" prop="totalBonus" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ Number(scope.row.totalBonus).toFixed(2) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip />
|
||||
<el-table-column label="创建人" align="center" prop="createBy" width="150" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-view" @click="handleDetail(scope.row)">详情</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
|
||||
<!-- 新增/修改奖金池对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form-item label="名称" prop="poolName">
|
||||
<el-input v-model="form.poolName" placeholder="请输入奖金池名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="产线" prop="productionLine">
|
||||
<muti-select v-model="form.productionLine" placeholder="请选择产线" clearable filterable
|
||||
:options="productionLineList">
|
||||
<el-option v-for="item in productionLineList" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</muti-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="开始时间" prop="bonusStartTime">
|
||||
<el-date-picker v-model="form.bonusStartTime" type="date" placeholder="选择开始时间" value-format="yyyy-MM-dd"
|
||||
style="width: 100%" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="结束时间" prop="bonusEndTime">
|
||||
<el-date-picker v-model="form.bonusEndTime" type="date" placeholder="选择结束时间" value-format="yyyy-MM-dd"
|
||||
style="width: 100%" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="查询重量">
|
||||
<el-button type="primary" @click="queryCoilWeight"
|
||||
:disabled="!form.bonusStartTime || !form.bonusEndTime || !form.productionLine"
|
||||
:loading="queryLoading">查询钢卷总重量</el-button>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="总重量(吨)">
|
||||
<el-input v-model="totalWeight" disabled placeholder="请先查询钢卷重量" style="width: 100%" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="系数" prop="coeff">
|
||||
<el-input-number v-model="form.coeff" :precision="4" :step="0.0001" :min="0" placeholder="请输入系数"
|
||||
style="width: 100%" @change="calculateTotalBonus" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="总金额" prop="totalBonus">
|
||||
<el-input-number v-model="form.totalBonus" :precision="2" :step="0.01" :min="0" placeholder="自动计算或手动输入"
|
||||
style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" :rows="4" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 详情对话框 -->
|
||||
<el-dialog title="奖金池详情" :visible.sync="detailOpen" width="1000px" append-to-body>
|
||||
<el-descriptions :column="2" border style="margin-bottom: 20px">
|
||||
<el-descriptions-item label="产线">{{ bonusPoolDetail.productionLine }}</el-descriptions-item>
|
||||
<el-descriptions-item label="开始时间">{{ parseTime(bonusPoolDetail.bonusStartTime, '{y}-{m}-{d}')
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="结束时间">{{ parseTime(bonusPoolDetail.bonusEndTime, '{y}-{m}-{d}')
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="总金额(元)">{{ Number(bonusPoolDetail.totalBonus).toFixed(2) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="备注" :span="2">{{ bonusPoolDetail.remark || '无' }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-divider>奖金分配明细</el-divider>
|
||||
<BonusConfig ref="bonusConfigRef" :pool-id="currentPoolId" :total-bonus="bonusPoolDetail.totalBonus"
|
||||
:max-adjust-coeff="maxAdjustCoeff" />
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="detailOpen = false">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 岗位系数配置对话框 -->
|
||||
<el-dialog title="岗位系数配置" :visible.sync="postCoeffConfigOpen" width="900px" append-to-body>
|
||||
<PostCoeffConfig ref="postCoeffConfigRef" :show="postCoeffConfigOpen" @refresh="getList" />
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="postCoeffConfigOpen = false">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 模板管理对话框 -->
|
||||
<el-dialog title="模板管理" :visible.sync="templateManagementOpen" width="1200px" append-to-body>
|
||||
<BonusTemplateManagement :show="templateManagementOpen" />
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="templateManagementOpen = false">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listBonusPool, getBonusPool, delBonusPool, addBonusPool, updateBonusPool } from "@/api/wms/bonusPool";
|
||||
import BonusConfig from "./components/BonusConfig.vue";
|
||||
import PostCoeffConfig from "./components/PostCoeffConfig.vue";
|
||||
import BonusTemplateManagement from "./components/BonusTemplateManagement.vue";
|
||||
import { getConfigKey } from '@/api/system/config'
|
||||
import { listPendingAction } from '@/api/wms/pendingAction'
|
||||
import { getCoilStatisticsList } from "@/api/wms/coil";
|
||||
|
||||
export default {
|
||||
name: "Bonus",
|
||||
components: {
|
||||
BonusConfig,
|
||||
PostCoeffConfig,
|
||||
BonusTemplateManagement
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
detailLoading: false,
|
||||
buttonLoading: false,
|
||||
ids: [],
|
||||
showSearch: true,
|
||||
total: 0,
|
||||
bonusPoolList: [],
|
||||
title: "",
|
||||
open: false,
|
||||
detailOpen: false,
|
||||
currentPoolId: null,
|
||||
totalWeight: null,
|
||||
queryLoading: false,
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
productionLine: null,
|
||||
bonusTime: null,
|
||||
// createBy: this.$store.getters.name,
|
||||
},
|
||||
maxAdjustCoeff: 10.0,
|
||||
form: {},
|
||||
bonusPoolDetail: {},
|
||||
rules: {
|
||||
productionLine: [
|
||||
{ required: true, message: "产线不能为空", trigger: "blur" }
|
||||
],
|
||||
bonusTime: [
|
||||
{ required: true, message: "奖金时间不能为空", trigger: "change" }
|
||||
],
|
||||
bonusStartTime: [
|
||||
{ required: true, message: "开始时间不能为空", trigger: "change" }
|
||||
],
|
||||
bonusEndTime: [
|
||||
{ required: true, message: "结束时间不能为空", trigger: "change" }
|
||||
],
|
||||
totalBonus: [
|
||||
{ required: true, message: "总金额不能为空", trigger: "blur" }
|
||||
]
|
||||
},
|
||||
postCoeffConfigOpen: false,
|
||||
productionLineList: [
|
||||
{
|
||||
label: '酸轧线',
|
||||
value: '酸轧线',
|
||||
actions: '11,200,520'
|
||||
},
|
||||
{
|
||||
label: '镀锌线',
|
||||
value: '镀锌线',
|
||||
actions: '206,501,521'
|
||||
},
|
||||
{
|
||||
label: '拉矫线',
|
||||
value: '拉矫线',
|
||||
actions: '204,503,523'
|
||||
},
|
||||
{
|
||||
label: '双机架',
|
||||
value: '双机架',
|
||||
actions: '205,504,524'
|
||||
},
|
||||
{
|
||||
label: '镀铬线',
|
||||
value: '镀铬线',
|
||||
actions: '206,505,525'
|
||||
},
|
||||
{
|
||||
label: '脱脂线',
|
||||
value: '脱脂线',
|
||||
actions: '203,502,522'
|
||||
},
|
||||
],
|
||||
templateManagementOpen: false,
|
||||
};
|
||||
},
|
||||
// computed: {
|
||||
// currentUserName() {
|
||||
// console.log(this.$store.getters.name, '计算属性');
|
||||
// return this.$store.getters.name;
|
||||
// }
|
||||
// },
|
||||
created() {
|
||||
this.getList();
|
||||
this.getMaxAdjustCoeff();
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listBonusPool(this.queryParams).then(response => {
|
||||
this.bonusPoolList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
|
||||
getMaxAdjustCoeff() {
|
||||
getConfigKey('hrm.bonus.maxAdjust').then(res => {
|
||||
this.maxAdjustCoeff = Number(res.msg);
|
||||
})
|
||||
},
|
||||
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
reset() {
|
||||
this.totalWeight = null;
|
||||
this.form = {
|
||||
poolId: null,
|
||||
productionLine: null,
|
||||
bonusTime: null,
|
||||
totalBonus: 0,
|
||||
remark: null,
|
||||
// createBy: this.$store.getters.name,
|
||||
createTime: null,
|
||||
updateTime: null,
|
||||
delFlag: null,
|
||||
coeff: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
async queryCoilWeight() {
|
||||
this.queryLoading = true;
|
||||
try {
|
||||
const productionLines = this.form.productionLine.split(',');
|
||||
|
||||
// 从productionLineList中获取productionLines对应的actions
|
||||
const productionLineActions = productionLines.map(line => this.productionLineList.find(item => item.value === line).actions);
|
||||
const pendingActions = await listPendingAction({
|
||||
startTime: this.form.bonusStartTime + ' 00:00:00',
|
||||
endTime: this.form.bonusEndTime + ' 23:59:59',
|
||||
actionTypes: productionLineActions.join(','),
|
||||
pageNum: 1,
|
||||
pageSize: 1000000,
|
||||
})
|
||||
const coilIds = pendingActions.rows.map(item => item.processedCoilIds);
|
||||
const coilStatistics = await getCoilStatisticsList({
|
||||
coilIds: coilIds.join(','),
|
||||
})
|
||||
this.totalWeight = coilStatistics.data.total_net_weight;
|
||||
this.calculateTotalBonus();
|
||||
this.queryLoading = false;
|
||||
} catch (error) {
|
||||
this.$modal.msgError(error.message);
|
||||
this.queryLoading = false;
|
||||
}
|
||||
},
|
||||
calculateTotalBonus() {
|
||||
if (this.totalWeight && this.form.coeff) {
|
||||
this.form.totalBonus = (this.totalWeight * this.form.coeff).toFixed(2);
|
||||
}
|
||||
},
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.poolId);
|
||||
},
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加奖金池";
|
||||
},
|
||||
handleUpdate(row) {
|
||||
this.loading = true;
|
||||
this.reset();
|
||||
getBonusPool(row.poolId).then(response => {
|
||||
this.loading = false;
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改奖金池";
|
||||
});
|
||||
},
|
||||
handleDetail(row) {
|
||||
this.bonusPoolDetail = row;
|
||||
this.currentPoolId = row.poolId;
|
||||
this.detailOpen = true;
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.bonusConfigRef) {
|
||||
this.$refs.bonusConfigRef.refresh();
|
||||
}
|
||||
});
|
||||
},
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.buttonLoading = true;
|
||||
if (this.form.poolId != null) {
|
||||
updateBonusPool(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
} else {
|
||||
addBonusPool(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$modal.confirm('是否确认删除奖金池编号为"' + row.poolId + '"的数据项?').then(() => {
|
||||
return delBonusPool(row.poolId);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => { });
|
||||
},
|
||||
handlePostCoeffConfig() {
|
||||
this.postCoeffConfigOpen = true;
|
||||
},
|
||||
handleTemplateManagement() {
|
||||
this.templateManagementOpen = true;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -832,7 +832,10 @@ export default {
|
||||
this.buttonLoading = true;
|
||||
if (this.form.coilId) {
|
||||
// 更新
|
||||
updateMaterialCoilSimple(this.form).then(_ => {
|
||||
const { status, exclusiveStatus, dataType, ...payload} = {
|
||||
...this.form,
|
||||
}
|
||||
updateMaterialCoilSimple(payload).then(_ => {
|
||||
this.$modal.msgSuccess("修正成功");
|
||||
this.correctVisible = false;
|
||||
this.getMaterialCoil();
|
||||
|
||||
@@ -812,7 +812,10 @@ export default {
|
||||
}
|
||||
this.buttonLoading = true;
|
||||
// 更新钢卷信息
|
||||
updateMaterialCoilSimple(this.form).then(_ => {
|
||||
const { status, exclusiveStatus, dataType, ...payload} = {
|
||||
...this.form,
|
||||
}
|
||||
updateMaterialCoilSimple(payload).then(_ => {
|
||||
this.$modal.msgSuccess("修正成功");
|
||||
this.correctVisible = false;
|
||||
this.getMaterialCoil();
|
||||
|
||||
@@ -2061,7 +2061,10 @@ export default {
|
||||
if (valid) {
|
||||
this.buttonLoading = true;
|
||||
if (this.form.coilId != null) {
|
||||
updateMaterialCoilSimple(this.form).then(_ => {
|
||||
const { status, exclusiveStatus, dataType, ...payload} = {
|
||||
...this.form,
|
||||
}
|
||||
updateMaterialCoilSimple(payload).then(_ => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
|
||||
Reference in New Issue
Block a user