2 changed files with 841 additions and 0 deletions
@ -0,0 +1,16 @@ |
|||
import { createAPI } from "@/utils/httpRequest.js"; |
|||
|
|||
// ================== 标签特殊信息修改 - rqrq ==================
|
|||
|
|||
// 分页查询标签列表 - rqrq
|
|||
export const searchHandlingUnitList = data => createAPI('/warehouse/handlingunit/list', 'POST', data) |
|||
|
|||
// 获取标签详细信息 - rqrq
|
|||
export const getHandlingUnitDetail = data => createAPI('/warehouse/handlingunit/detail', 'POST', data) |
|||
|
|||
// 修改标签特殊信息 - rqrq
|
|||
export const updateHandlingUnitSpecial = data => createAPI('/warehouse/handlingunit/updateSpecial', 'POST', data) |
|||
|
|||
// 批量修改标签特殊信息 - rqrq
|
|||
export const batchUpdateHandlingUnitSpecial = data => createAPI('/warehouse/handlingunit/batchUpdateSpecial', 'POST', data) |
|||
|
|||
@ -0,0 +1,825 @@ |
|||
<template> |
|||
<div class="mod-config"> |
|||
<!-- 查询表单 - rqrq --> |
|||
<el-form :inline="true" label-position="top"> |
|||
<el-form-item label="单元ID"> |
|||
<el-input style="width: 120px;" v-model="queryHeaderData.unitId" placeholder="请输入单元ID" @keyup.enter.native="getDataList()"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="物料编号"> |
|||
<el-input style="width: 120px;" v-model="queryHeaderData.partNo" placeholder="请输入物料编号" @keyup.enter.native="getDataList()"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="批次号"> |
|||
<el-input style="width: 120px;" v-model="queryHeaderData.batchNo" placeholder="请输入批次号" @keyup.enter.native="getDataList()"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="库位"> |
|||
<el-input style="width: 120px;" v-model="queryHeaderData.locationId" placeholder="请输入库位" @keyup.enter.native="getDataList()"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="仓库"> |
|||
<el-input style="width: 120px;" v-model="queryHeaderData.warehouseId" placeholder="请输入仓库" @keyup.enter.native="getDataList()"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="入库状态"> |
|||
<el-select v-model="queryHeaderData.inStockFlag" placeholder="请选择" style="width: 120px;"> |
|||
<el-option label="全部" value=""></el-option> |
|||
<el-option label="未入库" value="X"></el-option> |
|||
<el-option label="已出库" value="N"></el-option> |
|||
<el-option label="在库" value="Y"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item style="margin-top: 20px;"> |
|||
<el-button @click="getDataList()" type="primary">查询</el-button> |
|||
<el-button @click="resetQuery()" type="default">重置</el-button> |
|||
<el-button @click="batchUpdateDialog()" type="success" :disabled="dataListSelections.length === 0">批量修改</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
|
|||
<!-- 主表格 - rqrq --> |
|||
<el-table |
|||
:height="height" |
|||
:data="dataList" |
|||
border |
|||
v-loading="dataListLoading" |
|||
@selection-change="selectionChangeHandle" |
|||
style="width: 100%; margin-bottom: 15px;"> |
|||
|
|||
<!-- 选择列 - rqrq --> |
|||
<el-table-column |
|||
type="selection" |
|||
header-align="center" |
|||
align="center" |
|||
width="50"> |
|||
</el-table-column> |
|||
|
|||
<!-- 动态列配置 - rqrq --> |
|||
<el-table-column |
|||
v-for="(item,index) in columnList" :key="index" |
|||
:sortable="item.columnSortable" |
|||
:prop="item.columnProp" |
|||
:header-align="item.headerAlign" |
|||
:show-overflow-tooltip="item.showOverflowTooltip" |
|||
:align="item.align" |
|||
:fixed="item.fixed==''?false:item.fixed" |
|||
:min-width="item.columnWidth" |
|||
:label="item.columnLabel"> |
|||
<template slot-scope="scope"> |
|||
<span v-if="item.columnProp === 'inStockFlag'"> |
|||
<span v-if="scope.row.inStockFlag === 'Y'">在库</span> |
|||
<span v-else-if="scope.row.inStockFlag === 'N'">已出库</span> |
|||
<span v-else-if="scope.row.inStockFlag === 'X'">未入库</span> |
|||
<span v-else>{{ scope.row.inStockFlag }}</span> |
|||
</span> |
|||
<span v-else-if="item.columnProp === 'reserveFlag'"> |
|||
{{ scope.row.reserveFlag === 'Y' ? '是' : '否' }} |
|||
</span> |
|||
<span v-else-if="item.columnProp === 'freezeFlag'"> |
|||
{{ scope.row.freezeFlag === 'Y' ? '是' : '否' }} |
|||
</span> |
|||
<span v-else-if="item.columnProp === 'mergedFlag'"> |
|||
{{ scope.row.mergedFlag === 'Y' ? '是' : '否' }} |
|||
</span> |
|||
<span v-else-if="item.columnProp === 'manufactureDate' || item.columnProp === 'expiredDate' || item.columnProp === 'receiveDate' || item.columnProp === 'createdDate' || item.columnProp === 'modifiedDate' || item.columnProp === 'lastPrintDate'"> |
|||
{{ formatDate(scope.row[item.columnProp]) }} |
|||
</span> |
|||
<span v-else>{{ scope.row[item.columnProp] }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
<!-- 操作列 - rqrq --> |
|||
<el-table-column label="操作" min-width="120" fixed="right" header-align="center" align="center"> |
|||
<template slot-scope="scope"> |
|||
<a @click="updateSpecialInfo(scope.row)" type="primary">修改</a> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
<!-- 分页 - rqrq --> |
|||
<el-pagination |
|||
@size-change="sizeChangeHandle" |
|||
@current-change="currentChangeHandle" |
|||
:current-page="pageIndex" |
|||
:page-sizes="[20, 50, 100]" |
|||
:page-size="pageSize" |
|||
:total="totalPage" |
|||
layout="total, sizes, prev, pager, next, jumper"> |
|||
</el-pagination> |
|||
|
|||
<!-- 修改特殊信息弹窗 - rqrq --> |
|||
<el-dialog |
|||
:title="dialogTitle" |
|||
:visible.sync="dialogVisible" |
|||
:close-on-click-modal="false" |
|||
v-drag |
|||
width="900px"> |
|||
|
|||
<el-form :model="formData" ref="dataForm" label-position="top" style="margin-top: 1px; margin-left: 0px;"> |
|||
<!-- 基本信息(只读)- rqrq --> |
|||
<el-row :gutter="20"> |
|||
<el-col :span="6"> |
|||
<el-form-item label="单元ID"> |
|||
<el-input v-model="formData.unitId" readonly></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<el-form-item label="物料编号"> |
|||
<el-input v-model="formData.partNo" readonly></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<el-form-item label="批次号"> |
|||
<el-input v-model="formData.batchNo" readonly></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<el-form-item label="数量"> |
|||
<el-input v-model="formData.qty" readonly></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<!-- 订单参考信息 - rqrq --> |
|||
<el-row :gutter="20"> |
|||
<el-col :span="8"> |
|||
<el-form-item label="订单参考1"> |
|||
<el-input v-model="formData.orderRef1" placeholder="请输入订单参考1" :disabled="isBatchUpdate"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item label="订单参考2"> |
|||
<el-input v-model="formData.orderRef2" placeholder="请输入订单参考2" :disabled="isBatchUpdate"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item label="订单参考3"> |
|||
<el-input v-model="formData.orderRef3" placeholder="请输入订单参考3" :disabled="isBatchUpdate"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<!-- 供应商/客户信息 - rqrq --> |
|||
<el-row :gutter="20"> |
|||
<el-col :span="12"> |
|||
<el-form-item label="供应商ID"> |
|||
<el-input v-model="formData.supplierId" placeholder="请输入供应商ID" :disabled="isBatchUpdate"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="客户ID"> |
|||
<el-input v-model="formData.customerId" placeholder="请输入客户ID" :disabled="isBatchUpdate"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<!-- 日期信息 - rqrq --> |
|||
<el-row :gutter="20"> |
|||
<el-col :span="12"> |
|||
<el-form-item label="生产日期"> |
|||
<el-date-picker |
|||
v-model="formData.manufactureDate" |
|||
type="date" |
|||
placeholder="请选择生产日期" |
|||
style="width: 100%" |
|||
format="yyyy-MM-dd" |
|||
value-format="yyyy-MM-dd" |
|||
:disabled="isBatchUpdate"> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="失效日期"> |
|||
<el-date-picker |
|||
v-model="formData.expiredDate" |
|||
type="date" |
|||
placeholder="请选择失效日期" |
|||
style="width: 100%" |
|||
format="yyyy-MM-dd" |
|||
value-format="yyyy-MM-dd" |
|||
:disabled="isBatchUpdate"> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<!-- 来源信息 - rqrq --> |
|||
<el-row :gutter="20"> |
|||
<el-col :span="12"> |
|||
<el-form-item label="来源类型"> |
|||
<el-input v-model="formData.sourceType" placeholder="请输入来源类型" :disabled="isBatchUpdate"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="来源参考"> |
|||
<el-input v-model="formData.sourceRef" placeholder="请输入来源参考" :disabled="isBatchUpdate"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<!-- 重量/体积信息 - rqrq --> |
|||
<el-row :gutter="20"> |
|||
<el-col :span="6"> |
|||
<el-form-item label="毛重"> |
|||
<el-input v-model="formData.grossWeight" placeholder="请输入毛重" :disabled="isBatchUpdate"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<el-form-item label="净重"> |
|||
<el-input v-model="formData.netWeight" placeholder="请输入净重" :disabled="isBatchUpdate"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<el-form-item label="重量单位"> |
|||
<el-input v-model="formData.weightUnit" placeholder="请输入重量单位" :disabled="isBatchUpdate"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<el-form-item label="工程变更等级"> |
|||
<el-input v-model="formData.engChgLevel" placeholder="请输入工程变更等级" :disabled="isBatchUpdate"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<el-row :gutter="20"> |
|||
<el-col :span="12"> |
|||
<el-form-item label="体积"> |
|||
<el-input v-model="formData.volume" placeholder="请输入体积" :disabled="isBatchUpdate"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="体积单位"> |
|||
<el-input v-model="formData.volumeUnit" placeholder="请输入体积单位" :disabled="isBatchUpdate"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<!-- 预留信息 - rqrq --> |
|||
<el-row :gutter="20"> |
|||
<el-col :span="8"> |
|||
<el-form-item label="预留订单参考1"> |
|||
<el-input v-model="formData.reserveOrderRef1" placeholder="请输入预留订单参考1" :disabled="isBatchUpdate"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item label="预留订单参考2"> |
|||
<el-input v-model="formData.reserveOrderRef2" placeholder="请输入预留订单参考2" :disabled="isBatchUpdate"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item label="预留订单参考3"> |
|||
<el-input v-model="formData.reserveOrderRef3" placeholder="请输入预留订单参考3" :disabled="isBatchUpdate"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<!-- 备注 - rqrq --> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<el-form-item label="备注"> |
|||
<el-input v-model="formData.remark" type="textarea" :rows="3" resize='none' placeholder="请输入备注" :disabled="isBatchUpdate"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
|
|||
<div slot="footer" class="dialog-footer" style="margin-top: 52px"> |
|||
<el-button type="primary" @click="saveData" :disabled="saveLoading"> |
|||
{{ saveLoading ? '保存中...' : '确定' }} |
|||
</el-button> |
|||
<el-button @click="dialogVisible = false" :disabled="saveLoading">取消</el-button> |
|||
</div> |
|||
</el-dialog> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { searchHandlingUnitList, updateHandlingUnitSpecial, batchUpdateHandlingUnitSpecial } from '@/api/warehouse/changeHUSpecialItem' |
|||
|
|||
export default { |
|||
data() { |
|||
return { |
|||
// 页面状态 - rqrq |
|||
height: 500, |
|||
dataListLoading: false, |
|||
saveLoading: false, |
|||
|
|||
// 弹窗状态 - rqrq |
|||
dialogVisible: false, |
|||
dialogTitle: '修改特殊信息', |
|||
isBatchUpdate: false, |
|||
|
|||
// 数据列表 - rqrq |
|||
dataList: [], |
|||
dataListSelections: [], |
|||
|
|||
// 查询条件 - rqrq |
|||
queryHeaderData: { |
|||
site: this.$store.state.user.site, |
|||
unitId: '', |
|||
partNo: '', |
|||
batchNo: '', |
|||
locationId: '', |
|||
warehouseId: '', |
|||
inStockFlag: '' |
|||
}, |
|||
|
|||
// 表单数据 - rqrq |
|||
formData: {}, |
|||
|
|||
// 分页信息 - rqrq |
|||
pageIndex: 1, |
|||
pageSize: 20, |
|||
totalPage: 0, |
|||
|
|||
// 表格列配置 - rqrq |
|||
columnList: [ |
|||
{ |
|||
columnProp: "unitId", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "单元ID", |
|||
columnWidth: 150, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "partNo", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "物料编号", |
|||
columnWidth: 120, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "partDesc", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "物料描述", |
|||
columnWidth: 150, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "batchNo", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "批次号", |
|||
columnWidth: 120, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "qty", |
|||
headerAlign: "center", |
|||
align: "right", |
|||
columnLabel: "数量", |
|||
columnWidth: 100, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "locationId", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "库位", |
|||
columnWidth: 100, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "warehouseId", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "仓库", |
|||
columnWidth: 100, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "wdr", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "WDR", |
|||
columnWidth: 100, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "inStockFlag", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "入库状态", |
|||
columnWidth: 80, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "orderRef1", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "订单参考1", |
|||
columnWidth: 120, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "orderRef2", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "订单参考2", |
|||
columnWidth: 120, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "orderRef3", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "订单参考3", |
|||
columnWidth: 120, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "supplierId", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "供应商ID", |
|||
columnWidth: 120, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "customerId", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "客户ID", |
|||
columnWidth: 120, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "manufactureDate", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "生产日期", |
|||
columnWidth: 120, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "expiredDate", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "失效日期", |
|||
columnWidth: 120, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "sourceType", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "来源类型", |
|||
columnWidth: 100, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "sourceRef", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "来源参考", |
|||
columnWidth: 120, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "grossWeight", |
|||
headerAlign: "center", |
|||
align: "right", |
|||
columnLabel: "毛重", |
|||
columnWidth: 100, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "netWeight", |
|||
headerAlign: "center", |
|||
align: "right", |
|||
columnLabel: "净重", |
|||
columnWidth: 100, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "weightUnit", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "重量单位", |
|||
columnWidth: 80, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "volume", |
|||
headerAlign: "center", |
|||
align: "right", |
|||
columnLabel: "体积", |
|||
columnWidth: 100, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "volumeUnit", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "体积单位", |
|||
columnWidth: 80, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "engChgLevel", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "工程变更等级", |
|||
columnWidth: 120, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "reserveFlag", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "预留标志", |
|||
columnWidth: 80, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "reserveOrderRef1", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "预留订单参考1", |
|||
columnWidth: 120, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "reserveOrderRef2", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "预留订单参考2", |
|||
columnWidth: 120, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "reserveOrderRef3", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "预留订单参考3", |
|||
columnWidth: 120, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "freezeFlag", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "冻结标志", |
|||
columnWidth: 80, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "mergedFlag", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "合并标志", |
|||
columnWidth: 80, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "status", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "状态", |
|||
columnWidth: 80, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "createdDate", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "创建时间", |
|||
columnWidth: 150, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "createdBy", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "创建人", |
|||
columnWidth: 100, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "remark", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "备注", |
|||
columnWidth: 200, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
} |
|||
] |
|||
} |
|||
}, |
|||
mounted() { |
|||
// 计算表格高度 - rqrq |
|||
this.height = window.innerHeight - 280 |
|||
|
|||
// 加载初始数据 - rqrq |
|||
this.getDataList() |
|||
}, |
|||
methods: { |
|||
// 查询列表数据 - rqrq |
|||
getDataList() { |
|||
this.dataListLoading = true |
|||
|
|||
const params = { |
|||
...this.queryHeaderData, |
|||
page: this.pageIndex, |
|||
limit: this.pageSize |
|||
} |
|||
|
|||
searchHandlingUnitList(params).then(({data}) => { |
|||
this.dataListLoading = false |
|||
if (data && data.code == 0) { |
|||
this.dataList = data.page.list || [] |
|||
this.pageIndex = data.page.currPage |
|||
this.totalPage = data.page.totalCount |
|||
} else { |
|||
this.dataList = [] |
|||
this.totalPage = 0 |
|||
this.$message.error(data.msg || '查询失败') |
|||
} |
|||
}).catch(() => { |
|||
this.dataListLoading = false |
|||
this.$message.error('查询失败') |
|||
}) |
|||
}, |
|||
|
|||
// 重置查询条件 - rqrq |
|||
resetQuery() { |
|||
this.queryHeaderData = { |
|||
site: this.$store.state.user.site, |
|||
unitId: '', |
|||
partNo: '', |
|||
batchNo: '', |
|||
locationId: '', |
|||
warehouseId: '', |
|||
inStockFlag: '' |
|||
} |
|||
this.pageIndex = 1 |
|||
this.getDataList() |
|||
}, |
|||
|
|||
// 每页数变化 - rqrq |
|||
sizeChangeHandle(val) { |
|||
this.pageSize = val |
|||
this.pageIndex = 1 |
|||
this.getDataList() |
|||
}, |
|||
|
|||
// 当前页变化 - rqrq |
|||
currentChangeHandle(val) { |
|||
this.pageIndex = val |
|||
this.getDataList() |
|||
}, |
|||
|
|||
// 选择变化 - rqrq |
|||
selectionChangeHandle(val) { |
|||
this.dataListSelections = val |
|||
}, |
|||
|
|||
// 打开修改单条记录弹窗 - rqrq |
|||
updateSpecialInfo(row) { |
|||
this.isBatchUpdate = false |
|||
this.dialogTitle = '修改特殊信息' |
|||
this.formData = JSON.parse(JSON.stringify(row)) |
|||
this.dialogVisible = true |
|||
}, |
|||
|
|||
// 打开批量修改弹窗 - rqrq |
|||
batchUpdateDialog() { |
|||
if (this.dataListSelections.length === 0) { |
|||
this.$message.warning('请先选择要修改的数据') |
|||
return |
|||
} |
|||
|
|||
this.isBatchUpdate = true |
|||
this.dialogTitle = `批量修改特殊信息 (已选择${this.dataListSelections.length}条)` |
|||
this.formData = { |
|||
unitIds: this.dataListSelections.map(item => item.unitId), |
|||
site: this.$store.state.user.site |
|||
} |
|||
this.dialogVisible = true |
|||
}, |
|||
|
|||
// 保存数据 - rqrq |
|||
saveData() { |
|||
// 参数校验 - rqrq |
|||
if (!this.formData.site) { |
|||
this.$message.warning('站点不能为空') |
|||
return |
|||
} |
|||
|
|||
// 设置loading,禁用按钮 - rqrq |
|||
this.saveLoading = true |
|||
|
|||
// 调用API - rqrq |
|||
const apiMethod = this.isBatchUpdate ? batchUpdateHandlingUnitSpecial : updateHandlingUnitSpecial |
|||
|
|||
apiMethod(this.formData).then(({data}) => { |
|||
if (data && data.code === 0) { |
|||
this.$message.success('保存成功') |
|||
this.dialogVisible = false |
|||
this.getDataList() |
|||
} else { |
|||
this.$message.error(data.msg || '保存失败') |
|||
} |
|||
}).catch(() => { |
|||
this.$message.error('保存失败') |
|||
}).finally(() => { |
|||
// 恢复按钮状态 - rqrq |
|||
this.saveLoading = false |
|||
}) |
|||
}, |
|||
|
|||
// 格式化日期 - rqrq |
|||
formatDate(dateStr) { |
|||
if (!dateStr) return '' |
|||
const date = new Date(dateStr) |
|||
const year = date.getFullYear() |
|||
const month = String(date.getMonth() + 1).padStart(2, '0') |
|||
const day = String(date.getDate()).padStart(2, '0') |
|||
const hours = String(date.getHours()).padStart(2, '0') |
|||
const minutes = String(date.getMinutes()).padStart(2, '0') |
|||
const seconds = String(date.getSeconds()).padStart(2, '0') |
|||
|
|||
if (hours === '00' && minutes === '00' && seconds === '00') { |
|||
return `${year}-${month}-${day}` |
|||
} |
|||
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}` |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
/* 按钮禁用样式 - rqrq */ |
|||
.el-button:disabled { |
|||
opacity: 0.6; |
|||
cursor: not-allowed; |
|||
} |
|||
</style> |
|||
|
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue