更新装配、精工车间、技术中心、仓储模块,新增工序工价、生产审核、三楼仓库可视化等功能及文档SQL
This commit is contained in:
@@ -63,7 +63,7 @@
|
||||
<el-button type="text" icon="el-icon-picture-outline" size="mini" @click="ContractPhoto(scope.row)"/>
|
||||
</el-tooltip>
|
||||
<el-button type="text" icon="el-icon-download" size="mini" @click="assembly(scope.row)">接收任务</el-button>
|
||||
<el-button :disabled="Number(scope.row.订单类型) !== 1" type="text" icon="el-icon-right" size="mini" @click="goBack(scope.row)">打回</el-button>
|
||||
<el-button type="text" icon="el-icon-right" size="mini" @click="goBack(scope.row)">打回</el-button>
|
||||
<el-button type="text" icon="el-icon-search" size="mini" @click="historicalOrders(scope.row)">历史订单</el-button>
|
||||
<el-button type="text" size="mini" @click="viewOrder(scope.row)">查看订单</el-button>
|
||||
</template>
|
||||
|
||||
774
src/views/SeikoWorkshop/ProcessPrice/index.vue
Normal file
774
src/views/SeikoWorkshop/ProcessPrice/index.vue
Normal file
@@ -0,0 +1,774 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="height: 850px;padding: 0">
|
||||
<!-- 修改人:Ld 修改时间:2026-07-06 08:36:02 -->
|
||||
<!-- 参考制定工艺组件的订单、产品、零件查询入口 -->
|
||||
<div class="toolbar">
|
||||
<el-select v-model="queryForm.订单流水号" clearable filterable size="small" style="width: 170px" placeholder="订单号" @change="handleOrderChange">
|
||||
<el-option v-for="item in orderNumberType" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
<el-select v-model="queryForm.组件流水号" clearable filterable size="small" style="width: 190px" placeholder="产品名称" @change="handleProductChange">
|
||||
<el-option v-for="item in productName" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
<el-select v-model="queryForm.工艺计划流水号" clearable filterable size="small" style="width: 220px" placeholder="零件名称" @change="pageCurrent = 1;searchTable()">
|
||||
<el-option v-for="item in partName" :key="item.value" :label="item.label" :value="item.value">
|
||||
<span style="float: left">{{ item.label }}</span>
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-select v-model="queryForm.是否启用" clearable filterable size="small" style="width: 120px" placeholder="启用状态" @change="pageCurrent = 1;searchTable()">
|
||||
<el-option v-for="item in statusOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
<el-input v-model="queryForm.工序名称" clearable size="small" style="width: 150px" placeholder="工序名称" @keyup.enter.native="pageCurrent = 1;searchTable()" />
|
||||
<el-button icon="el-icon-search" type="primary" plain size="small" style="margin-left: 10px" @click="pageCurrent = 1;searchTable()">查询</el-button>
|
||||
<el-button :disabled="!queryForm.工艺计划流水号" icon="el-icon-document-copy" type="warning" plain size="small" @click="openCopyDialog()">拷贝</el-button>
|
||||
</div>
|
||||
|
||||
<!-- 修改人:Ld 修改时间:2026-07-02 15:33:23 -->
|
||||
<!-- 工序工价列表 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
highlight-current-row
|
||||
stripe
|
||||
size="mini"
|
||||
height="720"
|
||||
style="width: 100%;">
|
||||
<el-table-column type="index" label="序号" align="center" width="60" />
|
||||
<el-table-column label="订单号" align="center" show-overflow-tooltip width="140">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.订单号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="产品名称" align="center" show-overflow-tooltip width="140">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.产品名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工序名称" align="center" show-overflow-tooltip width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工序名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" show-overflow-tooltip width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="图号" align="center" show-overflow-tooltip width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工序顺序" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工序顺序 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="定额工时" align="center" width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.定额工时 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="准结工时" align="center" width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.准结工时 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机动时间s" align="center" width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机动时间s }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="辅助时间s" align="center" width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.辅助时间s }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总时间s" align="center" width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.总时间s }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单装数量(件)" align="center" width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row['单装数量(件)'] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作台数" align="center" width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.操作台数 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="日产能(件)" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row['日产能(件)'] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="最终单价(元/件)" align="center" width="130">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row['最终单价(元/件)'] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="生效日期" align="center" width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.生效日期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="变更次数" align="center" width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.变更次数 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="启用状态" align="center" width="90">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="Number(scope.row.是否启用) === 1 ? 'success' : 'info'" size="mini">
|
||||
{{ Number(scope.row.是否启用) === 1 ? '启用' : '停用' }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" show-overflow-tooltip min-width="140">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="170" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="mini" icon="el-icon-edit-outline" @click="openEditDialog(scope.row)">设置</el-button>
|
||||
<el-button :disabled="!scope.row.工价流水号" type="text" size="mini" icon="el-icon-document" @click="openHistoryDialog(scope.row)">历史</el-button>
|
||||
<el-button :disabled="!scope.row.工价流水号" type="text" size="mini" icon="el-icon-turn-off" style="color:#f56c6c" @click="handleDisable(scope.row)">停用</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 修改人:Ld 修改时间:2026-07-02 15:33:23 -->
|
||||
<!-- 分页 -->
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<!-- 修改人:Ld 修改时间:2026-07-06 08:52:37 -->
|
||||
<!-- 工序工价数据量超过 100 条,放开分页条数选择 -->
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[20, 50, 100, 200, 500, 1000]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange" />
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<!-- 修改人:Ld 修改时间:2026-07-02 15:33:23 -->
|
||||
<!-- 工价设置弹窗 -->
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible" :title="dialogTitle" center width="960px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="100px">
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工艺名称" prop="工艺名称">
|
||||
<el-input v-model="form.工艺名称" disabled size="small" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工序名称" prop="工序名称">
|
||||
<el-input v-model="form.工序名称" disabled size="small" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="零件名称" prop="零件名称">
|
||||
<el-input v-model="form.零件名称" disabled size="small" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="图号" prop="图号">
|
||||
<el-input v-model="form.图号" disabled size="small" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- 修改人:Ld 修改时间:2026-07-03 08:02:29 -->
|
||||
<!-- 按现场确认的 9 个工价字段维护 -->
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="机动时间s" prop="机动时间s">
|
||||
<el-input-number v-model="form.机动时间s" :min="0" :precision="2" :step="1" controls-position="right" style="width: 100%;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="辅助时间s" prop="辅助时间s">
|
||||
<el-input-number v-model="form.辅助时间s" :min="0" :precision="2" :step="1" controls-position="right" style="width: 100%;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="总时间s" prop="总时间s">
|
||||
<el-input-number v-model="form.总时间s" :min="0" :precision="2" :step="1" controls-position="right" style="width: 100%;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单装数量(件)" prop="单装数量(件)">
|
||||
<el-input-number v-model="form['单装数量(件)']" :min="0" :precision="2" :step="1" controls-position="right" style="width: 100%;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="操作台数" prop="操作台数">
|
||||
<el-input-number v-model="form.操作台数" :min="0" :precision="2" :step="1" controls-position="right" style="width: 100%;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="日产能(件)" prop="日产能(件)">
|
||||
<el-input-number v-model="form['日产能(件)']" :min="0" :precision="2" :step="1" controls-position="right" style="width: 100%;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="最终单价" prop="最终单价(元/件)">
|
||||
<!-- 修改人:Ld 修改时间:2026-07-06 09:23:45; 最终单价输入框仅保留两位小数显示 -->
|
||||
<el-input-number v-model="form['最终单价(元/件)']" :min="0" :precision="2" :step="0.1" controls-position="right" style="width: 100%;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="生效日期" prop="生效日期">
|
||||
<el-date-picker v-model="form.生效日期" type="date" value-format="yyyy-MM-dd" format="yyyy-MM-dd" clearable size="small" placeholder="选择生效日期" style="width: 100%;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="变更次数" prop="变更次数">
|
||||
<el-input-number v-model="form.变更次数" :min="0" :precision="0" :step="1" controls-position="right" style="width: 100%;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="启用状态" prop="是否启用">
|
||||
<el-select v-model="form.是否启用" clearable filterable size="small" style="width: 100%;" placeholder="请选择启用状态">
|
||||
<el-option v-for="item in statusOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="备注">
|
||||
<el-input v-model="form.备注" :rows="3" type="textarea" clearable maxlength="200" show-word-limit />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="closeDialog()">取 消</el-button>
|
||||
<el-button type="primary" @click="submitForm()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 修改人:Ld 修改时间:2026-07-06 08:45:45 -->
|
||||
<!-- 工序工价拷贝弹窗,仅保留零件名称、工序号和工艺名称预览 -->
|
||||
<el-dialog v-el-drag-dialog :visible.sync="copyVisible" title="工序工价拷贝" center width="760px">
|
||||
<el-row style="margin-bottom: 10px">
|
||||
<el-input v-model="copyForm.零件筛选" clearable placeholder="零件图号或零件名称筛选" size="small" style="width: 260px">
|
||||
<el-button slot="append" icon="el-icon-right" @click="searchCopyParts()" />
|
||||
</el-input>
|
||||
<el-select v-model="copyForm.源零件图号" clearable filterable size="small" style="width: 260px;margin-left: 10px" placeholder="源零件" @change="searchCopyProcess()">
|
||||
<el-option v-for="item in copyPartList" :key="item.value" :label="item.label" :value="item.value">
|
||||
<span style="float: left">{{ item.label }}</span>
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-row>
|
||||
<el-table :data="copyProcessList" border highlight-current-row stripe size="mini" height="420" style="width: 100%;">
|
||||
<el-table-column type="index" label="序号" align="center" width="60" />
|
||||
<el-table-column label="零件名称" align="center" show-overflow-tooltip min-width="180">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工序号" align="center" width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工序顺序 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工艺名称" align="center" show-overflow-tooltip min-width="180">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="copyVisible = false">取消</el-button>
|
||||
<el-button type="primary" size="small" @click="submitCopy()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 修改人:Ld 修改时间:2026-07-02 15:33:23 -->
|
||||
<!-- 历史定价弹窗 -->
|
||||
<el-dialog v-el-drag-dialog :visible.sync="historyVisible" title="历史定价" center width="980px">
|
||||
<el-table :data="historyData" border stripe size="mini" height="420" style="width: 100%;">
|
||||
<el-table-column type="index" label="序号" align="center" width="60" />
|
||||
<el-table-column label="工价流水号" align="center" width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工价流水号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作类型" align="center" width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.操作类型 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工艺名称" align="center" show-overflow-tooltip width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工序名称" align="center" show-overflow-tooltip width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工序名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="变更前" align="center" show-overflow-tooltip min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.变更前 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="变更后" align="center" show-overflow-tooltip min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.变更后 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作人" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.操作人 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作时间" align="center" width="140">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.操作时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="historyVisible = false">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 修改人:Ld 修改时间:2026-07-06 08:36:02
|
||||
// 查询条件参考制定工艺组件,表格显示字段保持不变
|
||||
queryForm: {
|
||||
订单流水号: '',
|
||||
组件流水号: '',
|
||||
工艺计划流水号: '',
|
||||
工序名称: '',
|
||||
是否启用: ''
|
||||
},
|
||||
// 修改人:Ld 修改时间:2026-07-06 08:36:02
|
||||
// 制定工艺查询入口下拉数据
|
||||
orderNumberType: [],
|
||||
productName: [],
|
||||
partName: [],
|
||||
// 修改人:Ld 修改时间:2026-07-02 15:33:23
|
||||
// 下拉选项
|
||||
statusOptions: [
|
||||
{ label: '启用', value: 1 },
|
||||
{ label: '停用', value: 0 }
|
||||
],
|
||||
// 修改人:Ld 修改时间:2026-07-02 15:33:23
|
||||
// 表格与分页
|
||||
loading: false,
|
||||
tableData: [],
|
||||
historyData: [],
|
||||
total: 0,
|
||||
pageCurrent: 1,
|
||||
pageSize: 100,
|
||||
// 修改人:Ld 修改时间:2026-07-02 15:33:23
|
||||
// 弹窗状态
|
||||
dialogFormVisible: false,
|
||||
dialogTitle: '设置工序工价',
|
||||
dialogMode: 'edit',
|
||||
historyVisible: false,
|
||||
// 修改人:Ld 修改时间:2026-07-06 08:45:45
|
||||
// 工序工价拷贝数据,参考制定工艺拷贝但去掉工艺编辑功能
|
||||
copyVisible: false,
|
||||
copyForm: {
|
||||
零件筛选: '',
|
||||
源零件图号: ''
|
||||
},
|
||||
copyPartList: [],
|
||||
copyProcessList: [],
|
||||
// 修改人:Ld 修改时间:2026-07-02 15:33:23
|
||||
// 表单主键
|
||||
form: {
|
||||
工价流水号: '',
|
||||
工艺名称: '',
|
||||
工序名称: '',
|
||||
零件名称: '',
|
||||
图号: '',
|
||||
机动时间s: 0,
|
||||
辅助时间s: 0,
|
||||
总时间s: 0,
|
||||
'单装数量(件)': 0,
|
||||
操作台数: 0,
|
||||
'日产能(件)': 0,
|
||||
'最终单价(元/件)': 0,
|
||||
生效日期: '',
|
||||
变更次数: 0,
|
||||
是否启用: 1,
|
||||
备注: '',
|
||||
工序流水号: ''
|
||||
},
|
||||
rules: {
|
||||
工艺名称: [{ required: true, message: '请输入工艺名称', trigger: 'blur' }],
|
||||
工序名称: [{ required: true, message: '请输入工序名称', trigger: 'blur' }],
|
||||
零件名称: [{ required: true, message: '请输入零件名称', trigger: 'blur' }],
|
||||
图号: [{ required: true, message: '请输入图号', trigger: 'blur' }],
|
||||
是否启用: [{ required: true, message: '请选择启用状态', trigger: 'change' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getOrderNumberType()
|
||||
this.searchTable()
|
||||
},
|
||||
methods: {
|
||||
// 修改人:Ld 修改时间:2026-07-06 08:36:02
|
||||
// 获取制定工艺组件同源订单下拉
|
||||
getOrderNumberType() {
|
||||
this.orderNumberType = []
|
||||
var param = []
|
||||
var Data = this.CreateData('11', '精工车间_制定工艺_订单查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.orderNumberType.push({
|
||||
label: response.data[i].订单号,
|
||||
value: response.data[i].订单流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 修改人:Ld 修改时间:2026-07-06 08:36:02
|
||||
// 订单切换后按制定工艺组件口径加载产品
|
||||
handleOrderChange() {
|
||||
this.queryForm.组件流水号 = ''
|
||||
this.queryForm.工艺计划流水号 = ''
|
||||
this.productName = []
|
||||
this.partName = []
|
||||
this.getproductName()
|
||||
this.pageCurrent = 1
|
||||
this.searchTable()
|
||||
},
|
||||
// 修改人:Ld 修改时间:2026-07-06 08:36:02
|
||||
// 获取制定工艺组件同源产品下拉
|
||||
getproductName() {
|
||||
if (!this.queryForm.订单流水号) {
|
||||
return
|
||||
}
|
||||
var param = []
|
||||
param[0] = ['订单流水号', this.queryForm.订单流水号]
|
||||
var Data = this.CreateData('11', '订单信息_产品信息_查询数据', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.productName.push({
|
||||
label: response.data[i].产品名称,
|
||||
value: response.data[i].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 修改人:Ld 修改时间:2026-07-06 08:36:02
|
||||
// 产品切换后按制定工艺组件口径加载零件
|
||||
handleProductChange() {
|
||||
this.queryForm.工艺计划流水号 = ''
|
||||
this.partName = []
|
||||
this.getpartName()
|
||||
this.pageCurrent = 1
|
||||
this.searchTable()
|
||||
},
|
||||
// 修改人:Ld 修改时间:2026-07-06 08:36:02
|
||||
// 获取制定工艺组件同源零件下拉
|
||||
getpartName() {
|
||||
if (!this.queryForm.组件流水号) {
|
||||
return
|
||||
}
|
||||
var param = []
|
||||
param[0] = ['组件流水号', this.queryForm.组件流水号]
|
||||
var Data = this.CreateData('11', '精工车间_制定工艺_零件名称_查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.partName.push({
|
||||
label: response.data[i].零件名称,
|
||||
name: response.data[i].零件图号,
|
||||
value: response.data[i].工艺计划流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 修改人:Ld 修改时间:2026-07-06 08:36:02
|
||||
// 查询列表
|
||||
searchTable() {
|
||||
this.loading = true
|
||||
var param = []
|
||||
param[0] = ['订单流水号', this.queryForm.订单流水号]
|
||||
param[1] = ['订单流水号_check', this.queryForm.订单流水号 ? 1 : 0]
|
||||
param[2] = ['组件流水号', this.queryForm.组件流水号]
|
||||
param[3] = ['组件流水号_check', this.queryForm.组件流水号 ? 1 : 0]
|
||||
param[4] = ['工艺计划流水号', this.queryForm.工艺计划流水号]
|
||||
param[5] = ['工艺计划流水号_check', this.queryForm.工艺计划流水号 ? 1 : 0]
|
||||
param[6] = ['工序名称', this.queryForm.工序名称]
|
||||
param[7] = ['工序名称_check', this.queryForm.工序名称 ? 1 : 0]
|
||||
param[8] = ['工艺名称', this.queryForm.工序名称]
|
||||
param[9] = ['工艺名称_check', this.queryForm.工序名称 ? 1 : 0]
|
||||
param[10] = ['是否启用', this.queryForm.是否启用]
|
||||
param[11] = ['是否启用_check', this.queryForm.是否启用 === '' || this.queryForm.是否启用 === null || typeof this.queryForm.是否启用 === 'undefined' ? 0 : 1]
|
||||
var Data = this.CreateData('11', '车间生产管理工艺_工序工价_查询数据', param, this.pageSize, this.pageCurrent)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.tableData = response.data && response.data.rows ? response.data.rows : response.data
|
||||
this.total = response.data && response.data.total ? response.data.total : (this.tableData ? this.tableData.length : 0)
|
||||
this.loading = false
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 修改人:Ld 修改时间:2026-07-06 08:45:45
|
||||
// 打开工序工价拷贝
|
||||
openCopyDialog() {
|
||||
if (!this.queryForm.工艺计划流水号) {
|
||||
this.$message.warning('请先选择要复制到的零件')
|
||||
return
|
||||
}
|
||||
this.copyVisible = true
|
||||
this.copyForm = {
|
||||
零件筛选: '',
|
||||
源零件图号: ''
|
||||
}
|
||||
this.copyPartList = []
|
||||
this.copyProcessList = []
|
||||
},
|
||||
// 修改人:Ld 修改时间:2026-07-06 08:45:45
|
||||
// 参考制定工艺拷贝的源零件查询
|
||||
searchCopyParts() {
|
||||
this.copyPartList = []
|
||||
this.copyForm.源零件图号 = ''
|
||||
this.copyProcessList = []
|
||||
var param = []
|
||||
param[0] = ['零件图号_check', this.copyForm.零件筛选 ? 1 : 0]
|
||||
param[1] = ['零件图号', this.copyForm.零件筛选]
|
||||
var Data = this.CreateData('11', '精工车间_制定工艺_零件名称_查询_工艺拷贝', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.copyPartList.push({
|
||||
label: response.data[i].零件名称,
|
||||
name: response.data[i].零件图号,
|
||||
value: response.data[i].零件图号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 修改人:Ld 修改时间:2026-07-06 08:45:45
|
||||
// 源零件工序预览,仅显示零件名称、工序号和工艺名称
|
||||
searchCopyProcess() {
|
||||
this.copyProcessList = []
|
||||
if (!this.copyForm.源零件图号) {
|
||||
return
|
||||
}
|
||||
var param = []
|
||||
param[0] = ['零件图号', this.copyForm.源零件图号]
|
||||
var Data = this.CreateData('11', '车间生产管理工艺_工序工价_复制源_查询数据', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.copyProcessList = response.data
|
||||
})
|
||||
},
|
||||
// 修改人:Ld 修改时间:2026-07-06 08:45:45
|
||||
// 将源零件已维护的工价按工序号和工艺名称复制到当前零件
|
||||
submitCopy() {
|
||||
if (!this.queryForm.工艺计划流水号) {
|
||||
this.$message.warning('请先选择要复制到的零件')
|
||||
return
|
||||
}
|
||||
if (!this.copyForm.源零件图号 || this.copyProcessList.length === 0) {
|
||||
this.$message.warning('请先选择源零件')
|
||||
return
|
||||
}
|
||||
var param = []
|
||||
param[0] = ['目标工艺计划流水号', this.queryForm.工艺计划流水号]
|
||||
param[1] = ['源零件图号', this.copyForm.源零件图号]
|
||||
var Data = this.CreateData('12', '车间生产管理工艺_工序工价_复制数据', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data && response.data[0] && response.data[0].result === '1') {
|
||||
this.$message.success('拷贝成功')
|
||||
this.copyVisible = false
|
||||
this.searchTable()
|
||||
} else {
|
||||
this.$message.error(response.data && response.data[0] && response.data[0].message ? response.data[0].message : '拷贝失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
// 修改人:Ld 修改时间:2026-07-02 15:33:23
|
||||
// 打开编辑
|
||||
openEditDialog(row) {
|
||||
this.dialogMode = 'edit'
|
||||
this.dialogTitle = '设置工序工价'
|
||||
this.dialogFormVisible = true
|
||||
this.form = {
|
||||
工价流水号: row.工价流水号,
|
||||
工艺名称: row.工艺名称,
|
||||
工序名称: row.工序名称,
|
||||
零件名称: row.零件名称,
|
||||
图号: row.图号,
|
||||
机动时间s: Number(row.机动时间s || 0),
|
||||
辅助时间s: Number(row.辅助时间s || 0),
|
||||
总时间s: Number(row.总时间s || 0),
|
||||
'单装数量(件)': Number(row['单装数量(件)'] || 0),
|
||||
操作台数: Number(row.操作台数 || 0),
|
||||
'日产能(件)': Number(row['日产能(件)'] || 0),
|
||||
'最终单价(元/件)': Number(row['最终单价(元/件)'] || 0),
|
||||
生效日期: row.生效日期,
|
||||
变更次数: Number(row.变更次数 || 0),
|
||||
是否启用: row.是否启用 === '' || row.是否启用 === null || typeof row.是否启用 === 'undefined' ? 1 : Number(row.是否启用),
|
||||
备注: row.备注,
|
||||
工序流水号: row.工序流水号
|
||||
}
|
||||
},
|
||||
// 修改人:Ld 修改时间:2026-07-02 15:33:23
|
||||
// 提交新增或编辑
|
||||
submitForm() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (!valid) {
|
||||
return false
|
||||
}
|
||||
var param = []
|
||||
param[0] = ['工价流水号', this.form.工价流水号]
|
||||
param[1] = ['工艺名称', this.form.工艺名称]
|
||||
param[2] = ['工序名称', this.form.工序名称]
|
||||
param[3] = ['零件名称', this.form.零件名称]
|
||||
param[4] = ['图号', this.form.图号]
|
||||
param[5] = ['机动时间s', this.form.机动时间s]
|
||||
param[6] = ['辅助时间s', this.form.辅助时间s]
|
||||
param[7] = ['总时间s', this.form.总时间s]
|
||||
// 修改人:Ld 修改时间:2026-07-03 08:02:29
|
||||
// 带括号字段提交给存储过程时使用安全参数名,查询返回仍保持原字段名
|
||||
param[8] = ['单装数量件', this.form['单装数量(件)']]
|
||||
param[9] = ['操作台数', this.form.操作台数]
|
||||
param[10] = ['日产能件', this.form['日产能(件)']]
|
||||
param[11] = ['最终单价元件', this.form['最终单价(元/件)']]
|
||||
param[12] = ['生效日期', this.form.生效日期]
|
||||
param[13] = ['变更次数', this.form.变更次数]
|
||||
param[14] = ['是否启用', this.form.是否启用]
|
||||
param[15] = ['备注', this.form.备注]
|
||||
param[16] = ['工序流水号', this.form.工序流水号]
|
||||
var Data = this.CreateData('12', '车间生产管理工艺_工序工价_编辑数据', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data && response.data[0] && response.data[0].result === '1') {
|
||||
this.$message.success('设置成功')
|
||||
this.dialogFormVisible = false
|
||||
this.searchTable()
|
||||
} else {
|
||||
this.$message.error('设置失败')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 修改人:Ld 修改时间:2026-07-02 15:33:23
|
||||
// 重置表单
|
||||
resetForm() {
|
||||
if (this.$refs['form'] !== undefined) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
this.form = {
|
||||
工价流水号: '',
|
||||
工艺名称: '',
|
||||
工序名称: '',
|
||||
零件名称: '',
|
||||
图号: '',
|
||||
机动时间s: 0,
|
||||
辅助时间s: 0,
|
||||
总时间s: 0,
|
||||
'单装数量(件)': 0,
|
||||
操作台数: 0,
|
||||
'日产能(件)': 0,
|
||||
'最终单价(元/件)': 0,
|
||||
生效日期: '',
|
||||
变更次数: 0,
|
||||
是否启用: 1,
|
||||
备注: '',
|
||||
工序流水号: ''
|
||||
}
|
||||
},
|
||||
// 修改人:Ld 修改时间:2026-07-02 15:33:23
|
||||
// 关闭弹窗
|
||||
closeDialog() {
|
||||
this.dialogFormVisible = false
|
||||
this.resetForm()
|
||||
},
|
||||
// 修改人:Ld 修改时间:2026-07-02 15:33:23
|
||||
// 停用工价
|
||||
handleDisable(row) {
|
||||
this.$confirm('确定停用该工序工价吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
var param = []
|
||||
param[0] = ['工价流水号', row.工价流水号]
|
||||
var Data = this.CreateData('12', '车间生产管理工艺_工序工价_删除数据', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data && response.data[0] && response.data[0].result === '1') {
|
||||
this.$message.success('停用成功')
|
||||
this.searchTable()
|
||||
} else {
|
||||
this.$message.error('停用失败')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 修改人:Ld 修改时间:2026-07-06 09:00:29
|
||||
// 打开该零件该工序名称的历史定价
|
||||
openHistoryDialog(row) {
|
||||
this.historyVisible = true
|
||||
var param = []
|
||||
param[0] = ['零件名称_check', row.零件名称 ? 1 : 0]
|
||||
param[1] = ['零件名称', row.零件名称]
|
||||
param[2] = ['图号_check', row.图号 ? 1 : 0]
|
||||
param[3] = ['图号', row.图号]
|
||||
param[4] = ['工序名称_check', row.工序名称 ? 1 : 0]
|
||||
param[5] = ['工序名称', row.工序名称]
|
||||
var Data = this.CreateData('11', '车间生产管理工艺_工序工价_历史_查询数据', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.historyData = response.data
|
||||
})
|
||||
},
|
||||
// 修改人:Ld 修改时间:2026-07-02 15:33:23
|
||||
// 分页条数变化
|
||||
handleSizeChange(val) {
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = val
|
||||
this.searchTable()
|
||||
},
|
||||
// 修改人:Ld 修改时间:2026-07-02 15:33:23
|
||||
// 页码变化
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchTable()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.toolbar {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
align-items: center;
|
||||
padding: 10px 0 12px;
|
||||
}
|
||||
|
||||
.el-card {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
457
src/views/SeikoWorkshop/ProductionCompletionAudit/index.vue
Normal file
457
src/views/SeikoWorkshop/ProductionCompletionAudit/index.vue
Normal file
@@ -0,0 +1,457 @@
|
||||
<!-- 生产完成审核组件 修改人:Ld 修改时间:2026-07-02 13:57:18; -->
|
||||
<template>
|
||||
<div class="app-container production-completion-audit">
|
||||
<el-card>
|
||||
<div class="search-bar">
|
||||
<el-input
|
||||
v-model="searchForm.操作者"
|
||||
style="width: 140px"
|
||||
placeholder="操作者"
|
||||
size="small"
|
||||
clearable
|
||||
@keyup.enter.native="resetSearch"/>
|
||||
<el-select
|
||||
v-model="searchForm.审核类型"
|
||||
style="width: 130px"
|
||||
placeholder="审核类型"
|
||||
size="small"
|
||||
clearable>
|
||||
<el-option label="加工完成" value="加工完成"/>
|
||||
<el-option label="结束整修" value="结束整修"/>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="searchForm.审核状态"
|
||||
style="width: 130px"
|
||||
placeholder="审核状态"
|
||||
size="small"
|
||||
clearable>
|
||||
<el-option label="待审核" value="待审核"/>
|
||||
<el-option label="审核通过" value="审核通过"/>
|
||||
<el-option label="审核不通过" value="审核不通过"/>
|
||||
</el-select>
|
||||
<span class="date-label">提交时间</span>
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
size="small"
|
||||
type="daterange"
|
||||
align="center"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<el-button icon="el-icon-search" type="primary" plain size="small" @click="resetSearch">查询</el-button>
|
||||
<el-button icon="el-icon-refresh" plain size="small" @click="resetForm">重置</el-button>
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
ref="table"
|
||||
:data="tableData"
|
||||
border
|
||||
stripe
|
||||
highlight-current-row
|
||||
size="mini"
|
||||
height="750px"
|
||||
style="width: 100%; margin-top: 7px">
|
||||
<el-table-column label="审核状态" align="center" width="95">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="getAuditStateType(scope.row.审核状态)" size="mini">
|
||||
{{ scope.row.审核状态 }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审核类型" prop="审核类型" align="center" width="95"/>
|
||||
<el-table-column label="订单号" prop="订单号" align="center" width="150" show-overflow-tooltip/>
|
||||
<el-table-column label="零件名称" prop="零件名称" align="center" width="140" show-overflow-tooltip/>
|
||||
<el-table-column label="零件图号" prop="零件图号" align="center" width="140" show-overflow-tooltip/>
|
||||
<el-table-column label="工序" prop="工序" align="center" width="110" show-overflow-tooltip/>
|
||||
<el-table-column label="工作者" prop="工作者姓名" align="center" width="90" show-overflow-tooltip/>
|
||||
<el-table-column label="完成数量" prop="完成数量" align="center" width="90"/>
|
||||
<el-table-column label="投产数量" prop="投产数量" align="center" width="90"/>
|
||||
<el-table-column label="已完成数" prop="已完成数" align="center" width="90"/>
|
||||
<el-table-column label="工位号" prop="工位号" align="center" width="120" show-overflow-tooltip/>
|
||||
<el-table-column label="工位设备名称" prop="工位设备名称" align="center" width="150" show-overflow-tooltip/>
|
||||
<el-table-column label="设备号" prop="设备号" align="center" width="120" show-overflow-tooltip/>
|
||||
<el-table-column label="设备名" prop="设备名" align="center" width="150" show-overflow-tooltip/>
|
||||
<el-table-column label="整修状态" align="center" width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ getRepairStateText(scope.row.整修状态) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="整修方案" prop="整修方案" align="center" min-width="180" show-overflow-tooltip/>
|
||||
<el-table-column label="备注" prop="备注" align="center" min-width="160" show-overflow-tooltip/>
|
||||
<el-table-column label="开始时间" prop="开始时间" align="center" width="155"/>
|
||||
<el-table-column label="结束时间" prop="结束时间" align="center" width="155"/>
|
||||
<el-table-column label="提交时间" prop="提交时间" align="center" width="155"/>
|
||||
<el-table-column label="操作" align="center" width="170" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="mini" icon="el-icon-view" @click="openDetail(scope.row)">查看</el-button>
|
||||
<el-button
|
||||
:disabled="scope.row.审核状态 !== '待审核'"
|
||||
type="text"
|
||||
size="mini"
|
||||
icon="el-icon-check"
|
||||
@click="approveRow(scope.row)">通过</el-button>
|
||||
<el-button
|
||||
:disabled="scope.row.审核状态 !== '待审核'"
|
||||
type="text"
|
||||
size="mini"
|
||||
icon="el-icon-edit"
|
||||
@click="openEditDialog(scope.row)">修改数量/时间</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<div class="block" style="margin-top: 10px">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40, 100]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog v-el-drag-dialog :visible.sync="detailVisible" title="审核详情" width="760px">
|
||||
<el-table
|
||||
v-if="currentRow"
|
||||
:data="detailData"
|
||||
border
|
||||
size="mini"
|
||||
class="detail-table"
|
||||
max-height="520">
|
||||
<el-table-column label="字段" prop="label" align="center" width="150"/>
|
||||
<el-table-column label="内容" prop="value" align="left" show-overflow-tooltip/>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-el-drag-dialog :visible.sync="editVisible" title="修改审核数据" width="420px">
|
||||
<el-form ref="editForm" :model="editForm" label-width="110px" size="small">
|
||||
<el-form-item v-if="editForm.审核类型 === '加工完成'" label="完成数量">
|
||||
<el-input-number v-model="editForm.完成数量" :min="1" :step="1" step-strictly style="width: 220px"/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="editForm.审核类型 === '加工完成'" label="加工开始时间">
|
||||
<el-date-picker
|
||||
v-model="editForm.加工开始时间"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="选择加工开始时间"
|
||||
style="width: 220px"/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="editForm.审核类型 === '加工完成'" label="加工完成时间">
|
||||
<el-date-picker
|
||||
v-model="editForm.加工完成时间"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="选择加工完成时间"
|
||||
style="width: 220px"/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="editForm.审核类型 === '结束整修'" label="整修开始时间">
|
||||
<el-date-picker
|
||||
v-model="editForm.整修开始时间"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="选择整修开始时间"
|
||||
style="width: 220px"/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="editForm.审核类型 === '结束整修'" label="整修结束时间">
|
||||
<el-date-picker
|
||||
v-model="editForm.整修结束时间"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="选择整修结束时间"
|
||||
style="width: 220px"/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="editForm.审核类型 === '结束整修'" label="整修方案">
|
||||
<el-input v-model="editForm.整修方案" type="textarea" :rows="3" style="width: 220px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="editVisible = false">取消</el-button>
|
||||
<el-button size="small" type="primary" @click="confirmEditApprove">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
tableData: [],
|
||||
total: 0,
|
||||
pageCurrent: 1,
|
||||
pageSize: 100,
|
||||
dateRange: '',
|
||||
detailVisible: false,
|
||||
editVisible: false,
|
||||
currentRow: null,
|
||||
detailData: [],
|
||||
editRow: null,
|
||||
editForm: {
|
||||
审核类型: '',
|
||||
完成数量: 1,
|
||||
加工开始时间: '',
|
||||
加工完成时间: '',
|
||||
整修开始时间: '',
|
||||
整修结束时间: '',
|
||||
整修方案: ''
|
||||
},
|
||||
searchForm: {
|
||||
操作者: '',
|
||||
审核类型: '',
|
||||
审核状态: '待审核'
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'id',
|
||||
'token'
|
||||
])
|
||||
},
|
||||
updated() {
|
||||
this.$nextTick(function() {
|
||||
if (this.$refs.table) {
|
||||
this.$refs.table.doLayout()
|
||||
}
|
||||
})
|
||||
},
|
||||
created() {
|
||||
this.searchTable()
|
||||
},
|
||||
methods: {
|
||||
// 生产完成审核查询 修改人:Ld 修改时间:2026-07-02 13:57:18;
|
||||
searchTable() {
|
||||
var dateRangeCheck = this.dateRange ? 1 : 0
|
||||
var param = []
|
||||
param[0] = ['审核状态_check', this.searchForm.审核状态 ? 1 : 0]
|
||||
param[1] = ['审核状态', this.searchForm.审核状态]
|
||||
param[2] = ['审核类型_check', this.searchForm.审核类型 ? 1 : 0]
|
||||
param[3] = ['审核类型', this.searchForm.审核类型]
|
||||
param[4] = ['操作者_check', this.searchForm.操作者 ? 1 : 0]
|
||||
param[5] = ['操作者', this.searchForm.操作者]
|
||||
param[6] = ['时间_check', dateRangeCheck]
|
||||
param[7] = ['开始时间', dateRangeCheck ? this.dateRange[0] : '']
|
||||
param[8] = ['结束时间', dateRangeCheck ? this.dateRange[1] : '']
|
||||
this.loading = true
|
||||
var Data = this.CreateData('11', '机加工MES_加工完成整修审核_查询数据', param, this.pageSize, this.pageCurrent)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.tableData = response.data.rows || []
|
||||
this.total = Number(response.data.total || 0)
|
||||
}).catch(() => {
|
||||
this.tableData = []
|
||||
this.total = 0
|
||||
this.$message.error('查询生产完成审核数据失败')
|
||||
}).then(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
resetSearch() {
|
||||
this.pageCurrent = 1
|
||||
this.searchTable()
|
||||
},
|
||||
resetForm() {
|
||||
this.searchForm = {
|
||||
操作者: '',
|
||||
审核类型: '',
|
||||
审核状态: '待审核'
|
||||
}
|
||||
this.dateRange = ''
|
||||
this.resetSearch()
|
||||
},
|
||||
openDetail(row) {
|
||||
this.currentRow = row
|
||||
// 详情弹窗使用 Element UI 2.13 兼容的表格展示 修改人:Ld 修改时间:2026-07-02 13:57:18;
|
||||
this.detailData = [
|
||||
{ label: '审核流水号', value: row.id },
|
||||
{ label: '审核状态', value: row.审核状态 },
|
||||
{ label: '审核类型', value: row.审核类型 },
|
||||
{ label: '订单号', value: row.订单号 },
|
||||
{ label: '产品名称', value: row.产品名称 },
|
||||
{ label: '零件名称', value: row.零件名称 },
|
||||
{ label: '零件图号', value: row.零件图号 },
|
||||
{ label: '工序', value: row.工序 },
|
||||
{ label: '物料编码', value: row.物料编码 },
|
||||
{ label: '材料', value: row.材料 },
|
||||
{ label: '工艺计划流水号', value: row.工艺计划流水号 },
|
||||
{ label: '工序流水号', value: row.工序流水号 },
|
||||
{ label: '工作者考勤编号', value: row.工作者考勤编号 },
|
||||
{ label: '工作者姓名', value: row.工作者姓名 },
|
||||
{ label: '完成类型', value: row.完成类型 },
|
||||
{ label: '完成数量', value: row.完成数量 },
|
||||
{ label: '投产数量', value: row.投产数量 },
|
||||
{ label: '已完成数', value: row.已完成数 },
|
||||
{ label: '工序顺序', value: row.工序顺序 },
|
||||
{ label: '剩余数量', value: row.剩余数量 },
|
||||
{ label: '剩余工时', value: row.剩余工时 },
|
||||
{ label: '录工票人员编号', value: row.录工票人员编号 },
|
||||
{ label: '录工票人员姓名', value: row.录工票人员姓名 },
|
||||
{ label: '工位号', value: row.工位号 },
|
||||
{ label: '工位设备名称', value: row.工位设备名称 },
|
||||
{ label: '设备号', value: row.设备号 },
|
||||
{ label: '设备名', value: row.设备名 },
|
||||
{ label: '操作者编号', value: row.操作者 },
|
||||
{ label: '操作者姓名', value: row.操作者姓名 },
|
||||
{ label: '整修状态', value: this.getRepairStateText(row.整修状态) },
|
||||
{ label: '整修记录id', value: row.整修记录id },
|
||||
{ label: '开始时间', value: row.开始时间 },
|
||||
{ label: '结束时间', value: row.结束时间 },
|
||||
{ label: '提交时间', value: row.提交时间 },
|
||||
{ label: '审核人', value: row.审核人 },
|
||||
{ label: '审核时间', value: row.审核时间 },
|
||||
{ label: '整修方案', value: row.整修方案 },
|
||||
{ label: '备注', value: row.备注 },
|
||||
{ label: '审核意见', value: row.审核意见 }
|
||||
]
|
||||
this.detailVisible = true
|
||||
},
|
||||
// 生产完成审核通过 修改人:Ld 修改时间:2026-07-02 13:57:18;
|
||||
approveRow(row) {
|
||||
this.$confirm('确定审核通过该生产完成记录?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.submitAudit(row, '审核通过', '')
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 修改完成数量和时间后按原 MES 链路审核通过 修改人:Ld 修改时间:2026-07-03 16:47:02;
|
||||
openEditDialog(row) {
|
||||
this.editRow = row
|
||||
this.editForm = {
|
||||
审核类型: row.审核类型,
|
||||
完成数量: row.完成数量 ? Number(row.完成数量) : 1,
|
||||
加工开始时间: row.开始时间 || '',
|
||||
加工完成时间: row.结束时间 || '',
|
||||
整修开始时间: row.开始时间 || '',
|
||||
整修结束时间: row.结束时间 || '',
|
||||
整修方案: row.整修方案 || ''
|
||||
}
|
||||
this.editVisible = true
|
||||
},
|
||||
confirmEditApprove() {
|
||||
if (!this.editRow) {
|
||||
return
|
||||
}
|
||||
if (this.editForm.审核类型 === '加工完成') {
|
||||
if (!this.editForm.完成数量 || Number(this.editForm.完成数量) <= 0 || Number(this.editForm.完成数量) % 1 !== 0) {
|
||||
this.$message.error('完成数量必须为大于 0 的整数')
|
||||
return
|
||||
}
|
||||
this.submitAudit(this.editRow, '审核通过', '修改完成数量和加工完成时间后通过', {
|
||||
finishQuantity: Number(this.editForm.完成数量),
|
||||
startTime: this.editForm.加工开始时间,
|
||||
finishTime: this.editForm.加工完成时间
|
||||
})
|
||||
} else if (this.editForm.审核类型 === '结束整修') {
|
||||
this.submitAudit(this.editRow, '审核通过', '修改整修开始和结束时间后通过', {
|
||||
repairStartTime: this.editForm.整修开始时间,
|
||||
repairEndTime: this.editForm.整修结束时间,
|
||||
repairPlan: this.editForm.整修方案
|
||||
})
|
||||
}
|
||||
this.editVisible = false
|
||||
},
|
||||
submitAudit(row, state, opinion, editData) {
|
||||
var param = []
|
||||
param[0] = ['审核流水号', row.id]
|
||||
param[1] = ['审核状态', state]
|
||||
param[2] = ['审核人', this.id]
|
||||
param[3] = ['审核意见', opinion]
|
||||
if (editData && editData.finishQuantity !== undefined) {
|
||||
// 仅修改数量通过时传审核完成数量,普通通过沿用审核单原完成数量 修改人:Ld 修改时间:2026-07-02 15:04:16;
|
||||
param.push(['审核完成数量', editData.finishQuantity])
|
||||
}
|
||||
if (editData && editData.startTime) {
|
||||
// 加工完成审核可修正实际加工开始时间 修改人:Ld 修改时间:2026-07-06 08:11:25;
|
||||
param.push(['审核加工开始时间', editData.startTime])
|
||||
}
|
||||
if (editData && editData.finishTime) {
|
||||
// 加工完成审核可修正实际加工完成时间 修改人:Ld 修改时间:2026-07-03 16:47:02;
|
||||
param.push(['审核加工完成时间', editData.finishTime])
|
||||
}
|
||||
if (editData && editData.repairStartTime) {
|
||||
// 整修审核可修正整修开始时间 修改人:Ld 修改时间:2026-07-06 08:11:25;
|
||||
param.push(['审核整修开始时间', editData.repairStartTime])
|
||||
}
|
||||
if (editData && editData.repairEndTime) {
|
||||
// 整修审核可修正整修结束时间 修改人:Ld 修改时间:2026-07-03 16:47:02;
|
||||
param.push(['审核整修结束时间', editData.repairEndTime])
|
||||
}
|
||||
if (editData && editData.repairPlan !== undefined) {
|
||||
param.push(['审核整修方案', editData.repairPlan])
|
||||
}
|
||||
var Data = this.CreateData('12', '机加工MES_加工完成整修审核_审核数据', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data[0] && response.data[0].result === '1') {
|
||||
this.$message.success('审核成功')
|
||||
this.searchTable()
|
||||
} else {
|
||||
this.$message.error(response.data[0] && response.data[0].message ? response.data[0].message : '审核失败')
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message.error('审核失败')
|
||||
})
|
||||
},
|
||||
getAuditStateType(state) {
|
||||
if (state === '审核通过') {
|
||||
return 'success'
|
||||
} else if (state === '审核不通过') {
|
||||
return 'danger'
|
||||
}
|
||||
return 'warning'
|
||||
},
|
||||
getRepairStateText(state) {
|
||||
if (state === null || state === undefined || state === '') {
|
||||
return ''
|
||||
}
|
||||
return Number(state) === 1 ? '整修中' : '已结束'
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = val
|
||||
this.searchTable()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchTable()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.production-completion-audit .search-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
margin-top: 7px;
|
||||
}
|
||||
|
||||
.production-completion-audit .date-label {
|
||||
font-size: 13px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.production-completion-audit .detail-table >>> .el-table__body td {
|
||||
vertical-align: top;
|
||||
}
|
||||
</style>
|
||||
@@ -20,7 +20,8 @@
|
||||
@change="searchTable"/>
|
||||
<el-button type="success" plain icon="el-icon-download" size="small" style="margin-left: 60px" @click="exportExcel()">导出</el-button>
|
||||
</div>
|
||||
<el-col style="margin-left: 7px;width: 281px">
|
||||
<!-- 修改人:Ld 修改时间:2026-07-06 09:12:38; 增加总价列后调整员工汇总表宽度 -->
|
||||
<el-col style="margin-left: 7px;width: 371px">
|
||||
<!-- <el-card>-->
|
||||
<div style="margin-top: 10px">
|
||||
<el-table
|
||||
@@ -32,7 +33,7 @@
|
||||
border
|
||||
stripe
|
||||
size="mini"
|
||||
style="width: 281px;margin-top: 10px"
|
||||
style="width: 371px;margin-top: 10px"
|
||||
height="740"
|
||||
@row-click="searchTable1">
|
||||
<el-table-column :width="setColumnWidth('操作者')" label="操作者" align="center" prop="">
|
||||
@@ -50,12 +51,18 @@
|
||||
{{ scope.row.加工工时 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 修改人:Ld 修改时间:2026-07-06 09:12:38; 员工汇总显示按工序工价计算的总价 -->
|
||||
<el-table-column width="90px" label="总价" align="center" show-overflow-tooltip prop="总价">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.总价 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<!-- </el-card>-->
|
||||
</el-col>
|
||||
|
||||
<el-col style="margin-left: 10px;width: 1361px">
|
||||
<el-col style="margin-left: 10px;width: 1271px">
|
||||
<!-- <el-card>-->
|
||||
<div style="margin-top: 10px">
|
||||
<el-table
|
||||
@@ -68,7 +75,7 @@
|
||||
border
|
||||
stripe
|
||||
size="mini"
|
||||
style="width: 1361px;margin-top: 10px"
|
||||
style="width: 1271px;margin-top: 10px"
|
||||
height="740"
|
||||
@sort-change="sortChange">
|
||||
<el-table-column :width="setColumnWidth('序号')" type="index" label="序号" align="center"/>
|
||||
@@ -102,6 +109,17 @@
|
||||
{{ scope.row.完成数 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 修改人:Ld 修改时间:2026-07-06 09:12:38; 员工明细显示工序工价组件维护的工价和按数量计算的总价 -->
|
||||
<el-table-column width="80px" label="工价" align="center" show-overflow-tooltip prop="工价">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工价 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="90px" label="总价" align="center" show-overflow-tooltip prop="总价">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.总价 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('加工工时M')" label="加工工时M" align="center" show-overflow-tooltip prop="加工时长">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.加工时长 }}
|
||||
@@ -161,7 +179,8 @@
|
||||
@change="searchTable2"/>
|
||||
<!-- <el-button type="success" plain icon="el-icon-download" size="small" style="margin-left: 760px" @click="exportExcel()">导出</el-button>-->
|
||||
</div>
|
||||
<el-col style="margin-left: 7px;width: 321px">
|
||||
<!-- 修改人:Ld 修改时间:2026-07-06 09:12:38; 增加总价列后调整设备汇总表宽度 -->
|
||||
<el-col style="margin-left: 7px;width: 413px">
|
||||
<!-- <el-card>-->
|
||||
<div style="margin-top: 10px">
|
||||
<el-table
|
||||
@@ -173,7 +192,7 @@
|
||||
border
|
||||
stripe
|
||||
size="mini"
|
||||
style="width: 323px;margin-top: 10px"
|
||||
style="width: 413px;margin-top: 10px"
|
||||
height="740"
|
||||
@row-click="searchTable3">
|
||||
<el-table-column label="设备" align="center" prop="">
|
||||
@@ -191,12 +210,18 @@
|
||||
{{ scope.row.加工工时 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 修改人:Ld 修改时间:2026-07-06 09:12:38; 设备汇总显示按工序工价计算的总价 -->
|
||||
<el-table-column width="90px" label="总价" align="center" show-overflow-tooltip prop="总价">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.总价 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<!-- </el-card>-->
|
||||
</el-col>
|
||||
|
||||
<el-col style="margin-left: 10px;width: 1301px">
|
||||
<el-col style="margin-left: 10px;width: 1209px">
|
||||
<!-- <el-card>-->
|
||||
<div style="margin-top: 10px">
|
||||
<el-table
|
||||
@@ -209,7 +234,7 @@
|
||||
border
|
||||
stripe
|
||||
size="mini"
|
||||
style="width: 1301px;margin-top: 10px"
|
||||
style="width: 1209px;margin-top: 10px"
|
||||
height="740"
|
||||
@sort-change="sortChange1">
|
||||
<el-table-column :width="setColumnWidth('序号')" type="index" label="序号" align="center"/>
|
||||
@@ -243,6 +268,17 @@
|
||||
{{ scope.row.完成数 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 修改人:Ld 修改时间:2026-07-06 09:12:38; 设备明细显示工序工价组件维护的工价和按数量计算的总价 -->
|
||||
<el-table-column width="80px" label="工价" align="center" show-overflow-tooltip prop="工价">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工价 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="90px" label="总价" align="center" show-overflow-tooltip prop="总价">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.总价 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('加工工时M')" label="加工工时M" align="center" show-overflow-tooltip prop="加工时长">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.加工时长 }}
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<div class="app-container">
|
||||
<el-card style="height: 850px; display: flex; flex-direction: column;">
|
||||
<div style="margin-top: 7px; margin-bottom: 7px; flex-shrink: 0;">
|
||||
<el-input v-model="materialCodeValue" style="width:150px" placeholder="物料编码" size="small" clearable/>
|
||||
<el-input v-model="materialNameValue" style="width:150px" placeholder="物料名称" size="small" clearable/>
|
||||
<el-input v-model="materialToolValue" style="width:150px" placeholder="图号/型号" size="small" clearable/>
|
||||
<el-input v-model="materialCodeValue" style="width:150px" placeholder="物料编码" size="small" clearable/>
|
||||
<el-select
|
||||
v-model="materialTypeValue"
|
||||
style="width:100px;"
|
||||
@@ -856,8 +856,9 @@ export default {
|
||||
},
|
||||
exportTableData() {
|
||||
if (this.tableData.length !== 0) {
|
||||
let materialToolValue_check, materialNameValue_check, materialTypeValue_check, dateRange_check, checked_check
|
||||
let materialToolValue_check, materialCodeValue_check, materialNameValue_check, materialTypeValue_check, dateRange_check, checked_check
|
||||
this.materialToolValue ? materialToolValue_check = 1 : materialToolValue_check = 0
|
||||
this.materialCodeValue ? materialCodeValue_check = 1 : materialCodeValue_check = 0 // 备注:修改人:Ld 修改时间:2026-06-29 14:18:00
|
||||
this.materialNameValue ? materialNameValue_check = 1 : materialNameValue_check = 0
|
||||
this.materialTypeValue ? materialTypeValue_check = 1 : materialTypeValue_check = 0
|
||||
this.checked ? checked_check = 1 : checked_check = 0
|
||||
@@ -884,6 +885,8 @@ export default {
|
||||
param[12] = ['PageSize', 9999999]
|
||||
param[13] = ['PageCount', '1111', 'int', '1']
|
||||
param[14] = ['ItemCount', '1111', 'int', '1']
|
||||
param[15] = ['物料编码_check', materialCodeValue_check] // 备注:修改人:Ld 修改时间:2026-06-29 14:18:00
|
||||
param[16] = ['物料编码', this.materialCodeValue] // 备注:修改人:Ld 修改时间:2026-06-29 14:18:00
|
||||
var Data = this.CreateData('2001', '物料管理_查询数据_分页', param)
|
||||
this.exportExcel_NPOI(Data)
|
||||
} else {
|
||||
|
||||
@@ -140,13 +140,6 @@
|
||||
</el-table-column>
|
||||
<el-table-column width="110px" label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip :open-delay="700" effect="dark" content="查看图纸" placement="top">
|
||||
<el-button
|
||||
type="text"
|
||||
icon="el-icon-picture-outline"
|
||||
size="mini"
|
||||
@click="getNum(scope.row)"/>
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="700" effect="dark" content="改制" placement="top">
|
||||
<el-button
|
||||
type="text"
|
||||
@@ -264,7 +257,6 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import request, { MESDownloadFile } from '@/utils/request'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -399,15 +391,16 @@ export default {
|
||||
this.form = {
|
||||
原订单流水号: this.currentOrderId,
|
||||
原组件流水号: row.组件流水号 || '',
|
||||
原基本件流水号: row.基本件流水号 || '',
|
||||
// 修改人:Ld 修改时间:2026-07-01 14:36:07; 列表显示改制目标时仍使用接口保留的原基本件和原零件信息发起新改制。
|
||||
原基本件流水号: row.基本件流水号 || row.流水号 || '',
|
||||
原工艺计划流水号: row.工艺计划流水号 || '',
|
||||
原订单编号: this.currentOrderNo,
|
||||
原零件名称: row.零件名称 || '',
|
||||
原零件图号: row.零件图号 || row.图号或型号 || '',
|
||||
原零件名称: row.原零件名称 || row.零件名称 || '',
|
||||
原零件图号: row.原零件图号 || row.零件图号 || row.图号或型号 || '',
|
||||
原数量: row.数量 || '',
|
||||
改制目标: '',
|
||||
改制零件名称: row.零件名称 || '',
|
||||
改制零件图号: row.零件图号 || row.图号或型号 || '',
|
||||
改制零件名称: '',
|
||||
改制零件图号: '',
|
||||
改制数量: row.数量 ? Number(row.数量) : 1,
|
||||
是否毛坯: '',
|
||||
物料编号: '',
|
||||
@@ -463,6 +456,11 @@ export default {
|
||||
submitForm(formName) {
|
||||
var oldDrawingNo = (this.form.原零件图号 || '').toString().trim()
|
||||
var newDrawingNo = (this.form.改制零件图号 || '').toString().trim()
|
||||
var newPartName = (this.form.改制零件名称 || '').toString().trim()
|
||||
if (!newPartName || !newDrawingNo) {
|
||||
this.$message.warning('请填写已维护的新物料名称和图号')
|
||||
return
|
||||
}
|
||||
if (oldDrawingNo && newDrawingNo && oldDrawingNo === newDrawingNo) {
|
||||
this.$message.warning('改制零件图号不能与原零件图号相同')
|
||||
return
|
||||
@@ -479,6 +477,8 @@ export default {
|
||||
param[6] = ['发起人', this.id]
|
||||
param[7] = ['原零件名称', this.form.原零件名称]
|
||||
param[8] = ['原零件图号', this.form.原零件图号]
|
||||
// 修改人:Ld 修改时间:2026-07-01 14:45:00; 发起改制时传入点击行基本件流水号,后端按订单、组件、基本件精确回显改制目标。
|
||||
param[9] = ['原基本件流水号', this.form.原基本件流水号]
|
||||
var Data = this.CreateData('12', '技术中心_改制订单_发起改制', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
@@ -547,35 +547,7 @@ export default {
|
||||
this.loadingPart = false
|
||||
})
|
||||
},
|
||||
getNum(row) {
|
||||
this.dialogVisible = true
|
||||
this.getFileList(row.零件图号 || row.图号或型号)
|
||||
},
|
||||
getFileList(value) {
|
||||
this.hadFile = []
|
||||
if (value) {
|
||||
request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '3',
|
||||
name: "select * from 机加工MES_零件图纸PDF表 where 是否启用 = 1 and name = '" + value + "'"
|
||||
}
|
||||
}).then(data => {
|
||||
if (data.data.length > 0) {
|
||||
var server = ('' + MESDownloadFile).split('/')
|
||||
data.data.map(item => {
|
||||
this.hadFile.push({
|
||||
url: 'http://' + server[2] + '/webpage/part/' + item.uid + '.' + item.suffix,
|
||||
name: item.name + '.' + item.suffix,
|
||||
suffix: item.suffix,
|
||||
id: item.uid
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
handleSizeChanges(val) {
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = val
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<el-card style="height: 850px">
|
||||
<div style="margin-top: 7px; margin-bottom: 7px">
|
||||
<!--{{ $t('m.music') }}-->
|
||||
<el-input v-model="materialCode" style="width: 150px " size="small" clearable placeholder="物料编号"/>
|
||||
<el-input v-model="materialCode" style="width: 150px " size="small" clearable placeholder="物料编码"/><!-- 备注:修改人:Ld 修改时间:2026-06-29 14:24:00 -->
|
||||
<el-input v-model="materialName" style="width: 150px " size="small" clearable placeholder="物料名称"/>
|
||||
<el-input v-model="specificationsModel" style="width: 150px " size="small" clearable placeholder="图号或型号"/>
|
||||
<el-input v-model="LocationName" style="width: 100px " size="small" clearable placeholder="库位"/>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<el-input
|
||||
v-model="materialCodeValue"
|
||||
style="width:200px"
|
||||
placeholder="物料编号"
|
||||
placeholder="物料编码"
|
||||
size="small"
|
||||
clearable
|
||||
@keyup.enter.native="pageCurrent=1;searchTable()"/>
|
||||
@@ -93,7 +93,7 @@
|
||||
style="width:962px"
|
||||
height="258px"
|
||||
size="small">
|
||||
<el-table-column label="物料编号" align="center" prop="物料码">
|
||||
<el-table-column label="物料编码" align="center" prop="物料码"><!-- 备注:修改人:Ld 修改时间:2026-06-29 14:24:00 -->
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料编码 }}
|
||||
</template>
|
||||
@@ -143,7 +143,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
width="140px"
|
||||
label="物料编号"
|
||||
label="物料编码"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
sortable="物料编码"
|
||||
@@ -476,7 +476,7 @@ export default {
|
||||
})
|
||||
},
|
||||
handleEdit(row, column) {
|
||||
if (column.label === '物料编号') {
|
||||
if (column.label === '物料编码') { // 备注:修改人:Ld 修改时间:2026-06-29 14:24:00
|
||||
this.materialSerialNumber = row.物料流水号
|
||||
this.tableData9 = []
|
||||
this.searchTable2()
|
||||
@@ -559,7 +559,7 @@ export default {
|
||||
Promise.all(promises).then(function(results) {
|
||||
var data = []
|
||||
// 表头
|
||||
data.push(['物料编号', '物料名称', '图号型号', '库位', '库存', '需求数', '可用库存', '加工中', '采购中', '毛坯数', '单位', '类型', '库存批次', '待入库', '最低库存', '安全库存', '最高库存', '', '物料编号', '物料名称', '图号/型号', '类型', '出/入库数', '出/入库日期', '批次编码'])
|
||||
data.push(['物料编码', '物料名称', '图号型号', '库位', '库存', '需求数', '可用库存', '加工中', '采购中', '毛坯数', '单位', '类型', '库存批次', '待入库', '最低库存', '安全库存', '最高库存', '', '物料编码', '物料名称', '图号/型号', '类型', '出/入库数', '出/入库日期', '批次编码']) // 备注:修改人:Ld 修改时间:2026-06-29 14:24:00
|
||||
results.forEach(function(item) {
|
||||
var row = item.row
|
||||
var mainRow = [
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
<div class="app-container">
|
||||
<el-card style="height: 850px">
|
||||
<div style="margin-top: 7px">
|
||||
<el-input v-model="production" style="width: 200px ; margin-left: 10px" size="small" clearable placeholder="物料名称/编号/规格/型号" @keyup.enter.native="pageCurrent=1;pageSize=20;searchTable()"/>
|
||||
<el-input v-model="materialCodeValue" style="width: 160px ; margin-left: 10px" size="small" clearable placeholder="物料编码" @keyup.enter.native="pageCurrent=1;pageSize=20;searchTable()"/><!-- 备注:修改人:Ld 修改时间:2026-06-29 14:18:00 -->
|
||||
<el-input v-model="production" style="width: 200px ; margin-left: 10px" size="small" clearable placeholder="物料名称/规格/型号" @keyup.enter.native="pageCurrent=1;pageSize=20;searchTable()"/><!-- 备注:修改人:Ld 修改时间:2026-06-29 14:18:00 -->
|
||||
<span style="font-size: 17px;color: black ; margin-left: 24px">时间</span>
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
@@ -21,7 +22,7 @@
|
||||
<div style="margin-top: 10px">
|
||||
<el-table v-loading="loading" ref="table" :data="tableData" highlight-current-row show-summary border stripe size="small" style="width: 971px" height="740px">
|
||||
<el-table-column width="70px" label="序号" type="index" align="center"/>
|
||||
<el-table-column width="130px" label="物料编号" align="center" show-overflow-tooltip>
|
||||
<el-table-column width="130px" label="物料编码" align="center" show-overflow-tooltip><!-- 备注:修改人:Ld 修改时间:2026-06-29 14:31:00 -->
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料编码 }}
|
||||
</template>
|
||||
@@ -83,6 +84,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
dateRange: '', // 提交日期
|
||||
materialCodeValue: '', // 物料编码 备注:修改人:Ld 修改时间:2026-06-29 14:18:00
|
||||
production: '',
|
||||
loading: false, // 数据加载
|
||||
total: 0, // 分页总数
|
||||
@@ -108,15 +110,18 @@ export default {
|
||||
// 导出表 8.10
|
||||
exportExcel() {
|
||||
if (this.tableData.length !== 0) {
|
||||
let dateRange_check, production_check
|
||||
let dateRange_check, materialCodeValue_check, production_check
|
||||
this.dateRange ? dateRange_check = 1 : (dateRange_check = 0, this.dateRange = '')
|
||||
this.materialCodeValue ? materialCodeValue_check = 1 : materialCodeValue_check = 0 // 备注:修改人:Ld 修改时间:2026-06-29 14:18:00
|
||||
this.production ? production_check = 1 : production_check = 0
|
||||
var param = []
|
||||
param[0] = ['物料名称_check', production_check]
|
||||
param[1] = ['物料名称', this.production]
|
||||
param[2] = ['时间_check', dateRange_check]
|
||||
param[3] = ['开始时间', this.dateRange[0]]
|
||||
param[4] = ['结束时间', this.dateRange[1]]
|
||||
param[2] = ['物料编码_check', materialCodeValue_check] // 备注:修改人:Ld 修改时间:2026-06-29 14:18:00
|
||||
param[3] = ['物料编码', this.materialCodeValue] // 备注:修改人:Ld 修改时间:2026-06-29 14:18:00
|
||||
param[4] = ['时间_check', dateRange_check]
|
||||
param[5] = ['开始时间', this.dateRange[0]]
|
||||
param[6] = ['结束时间', this.dateRange[1]]
|
||||
var Data = this.CreateData('2001', '报表_仓储管理_盘点记录_查询', param)
|
||||
this.exportExcel_NPOI(Data)
|
||||
} else {
|
||||
@@ -124,15 +129,18 @@ export default {
|
||||
}
|
||||
},
|
||||
searchTable() {
|
||||
let dateRange_check, production_check
|
||||
let dateRange_check, materialCodeValue_check, production_check
|
||||
this.dateRange ? dateRange_check = 1 : (dateRange_check = 0, this.dateRange = '')
|
||||
this.materialCodeValue ? materialCodeValue_check = 1 : materialCodeValue_check = 0 // 备注:修改人:Ld 修改时间:2026-06-29 14:18:00
|
||||
this.production ? production_check = 1 : production_check = 0
|
||||
var param = []
|
||||
param[0] = ['物料名称_check', production_check]
|
||||
param[1] = ['物料名称', this.production]
|
||||
param[2] = ['时间_check', dateRange_check]
|
||||
param[3] = ['开始时间', this.dateRange[0]]
|
||||
param[4] = ['结束时间', this.dateRange[1]]
|
||||
param[2] = ['物料编码_check', materialCodeValue_check] // 备注:修改人:Ld 修改时间:2026-06-29 14:18:00
|
||||
param[3] = ['物料编码', this.materialCodeValue] // 备注:修改人:Ld 修改时间:2026-06-29 14:18:00
|
||||
param[4] = ['时间_check', dateRange_check]
|
||||
param[5] = ['开始时间', this.dateRange[0]]
|
||||
param[6] = ['结束时间', this.dateRange[1]]
|
||||
var Data = this.CreateData('11', '仓储管理_盘点记录_查询', param, this.pageSize, this.pageCurrent)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.tableData = response.data.rows
|
||||
@@ -156,4 +164,3 @@ export default {
|
||||
width: 50px!important;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="app-container">
|
||||
<el-card style="height: 850px">
|
||||
<div style="margin-top: 7px; margin-bottom: 7px">
|
||||
<el-input v-model="MaterialCode" style="width: 160px " size="small" clearable placeholder="物料编号"/>
|
||||
<el-input v-model="MaterialCode" style="width: 160px " size="small" clearable placeholder="物料编码"/><!-- 备注:修改人:Ld 修改时间:2026-06-29 14:24:00 -->
|
||||
<el-input v-model="MaterialName" style="width: 200px " size="small" clearable placeholder="物料名称/规格"/>
|
||||
<el-input v-model="DrawingNo" style="width: 200px " size="small" clearable placeholder="图号/型号"/>
|
||||
<el-input v-model="locationWarehouseValue" style="width:200px" placeholder="库位" size="small" clearable/>
|
||||
@@ -11,7 +11,7 @@
|
||||
<div>
|
||||
<el-table v-loading="loading" :data="tableData" highlight-current-row show-summary border stripe size="small" style="width: 731px" height="740px">
|
||||
<el-table-column :width="setColumnWidth('序号')" type="index" label="序号" align="center"/>
|
||||
<el-table-column label="物料编号" align="center" show-overflow-tooltip>
|
||||
<el-table-column label="物料编码" align="center" show-overflow-tooltip><!-- 备注:修改人:Ld 修改时间:2026-06-29 14:24:00 -->
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料编号 }}
|
||||
</template>
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
<div class="app-container">
|
||||
<el-card style="height: 850px">
|
||||
<div style="margin-top: 7px">
|
||||
<el-input v-model="production" style="width: 200px ; margin-left: 10px" size="small" clearable placeholder="物料名称/编号/规格/型号" @keyup.enter.native="pageCurrent=1;pageSize=20;searchTable();searchNumber()"/>
|
||||
<el-input v-model="materialCodeValue" style="width: 160px ; margin-left: 10px" size="small" clearable placeholder="物料编码" @keyup.enter.native="pageCurrent=1;pageSize=20;searchTable();searchNumber()"/><!-- 备注:修改人:Ld 修改时间:2026-06-29 14:18:00 -->
|
||||
<el-input v-model="production" style="width: 200px ; margin-left: 10px" size="small" clearable placeholder="物料名称/规格/型号" @keyup.enter.native="pageCurrent=1;pageSize=20;searchTable();searchNumber()"/><!-- 备注:修改人:Ld 修改时间:2026-06-29 14:18:00 -->
|
||||
<span style="font-size: 17px;color: black ; margin-left: 24px">时间</span>
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
@@ -32,7 +33,7 @@
|
||||
style="width: 1061px"
|
||||
height="740px">
|
||||
<el-table-column width="70px" label="序号" type="index" align="center"/>
|
||||
<el-table-column width="130px" label="物料编号" align="center" show-overflow-tooltip>
|
||||
<el-table-column width="130px" label="物料编码" align="center" show-overflow-tooltip><!-- 备注:修改人:Ld 修改时间:2026-06-29 14:31:00 -->
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料编码 }}
|
||||
</template>
|
||||
@@ -99,6 +100,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
dateRange: '', // 提交日期
|
||||
materialCodeValue: '', // 物料编码 备注:修改人:Ld 修改时间:2026-06-29 14:18:00
|
||||
production: '',
|
||||
loading: false, // 数据加载
|
||||
stockInQuantity: 0, // 入库数
|
||||
@@ -127,15 +129,18 @@ export default {
|
||||
// 导出表 8.10
|
||||
exportExcel() {
|
||||
if (this.tableData.length !== 0) {
|
||||
let dateRange_check, production_check
|
||||
let dateRange_check, materialCodeValue_check, production_check
|
||||
this.dateRange ? dateRange_check = 1 : (dateRange_check = 0, this.dateRange = '')
|
||||
this.materialCodeValue ? materialCodeValue_check = 1 : materialCodeValue_check = 0 // 备注:修改人:Ld 修改时间:2026-06-29 14:18:00
|
||||
this.production ? production_check = 1 : production_check = 0
|
||||
var param = []
|
||||
param[0] = ['物料名称_check', production_check]
|
||||
param[1] = ['物料名称', this.production]
|
||||
param[2] = ['时间_check', dateRange_check]
|
||||
param[3] = ['开始时间', this.dateRange[0]]
|
||||
param[4] = ['结束时间', this.dateRange[1]]
|
||||
param[2] = ['物料编码_check', materialCodeValue_check] // 备注:修改人:Ld 修改时间:2026-06-29 14:18:00
|
||||
param[3] = ['物料编码', this.materialCodeValue] // 备注:修改人:Ld 修改时间:2026-06-29 14:18:00
|
||||
param[4] = ['时间_check', dateRange_check]
|
||||
param[5] = ['开始时间', this.dateRange[0]]
|
||||
param[6] = ['结束时间', this.dateRange[1]]
|
||||
var Data = this.CreateData('2001', '报表_仓储管理_物料记录_查询', param)
|
||||
this.exportExcel_NPOI(Data)
|
||||
} else {
|
||||
@@ -144,8 +149,9 @@ export default {
|
||||
},
|
||||
searchTable() {
|
||||
if (this.dateRange) {
|
||||
let dateRange_check, production_check
|
||||
let dateRange_check, materialCodeValue_check, production_check
|
||||
this.dateRange ? dateRange_check = 1 : (dateRange_check = 0, this.dateRange = '')
|
||||
this.materialCodeValue ? materialCodeValue_check = 1 : materialCodeValue_check = 0 // 备注:修改人:Ld 修改时间:2026-06-29 14:18:00
|
||||
this.production ? production_check = 1 : production_check = 0
|
||||
// var param = []
|
||||
// param[0] = ['物料名称_check', production_check]
|
||||
@@ -166,9 +172,11 @@ export default {
|
||||
var param = []
|
||||
param[0] = ['物料名称_check', production_check]
|
||||
param[1] = ['物料名称', this.production]
|
||||
param[2] = ['时间_check', dateRange_check]
|
||||
param[3] = ['开始时间', this.dateRange[0]]
|
||||
param[4] = ['结束时间', this.dateRange[1]]
|
||||
param[2] = ['物料编码_check', materialCodeValue_check] // 备注:修改人:Ld 修改时间:2026-06-29 14:18:00
|
||||
param[3] = ['物料编码', this.materialCodeValue] // 备注:修改人:Ld 修改时间:2026-06-29 14:18:00
|
||||
param[4] = ['时间_check', dateRange_check]
|
||||
param[5] = ['开始时间', this.dateRange[0]]
|
||||
param[6] = ['结束时间', this.dateRange[1]]
|
||||
var Data = this.CreateData('11', '仓储管理_物料记录_查询新', param, this.pageSize, this.pageCurrent)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
console.log(response, 6666)
|
||||
@@ -180,15 +188,18 @@ export default {
|
||||
}
|
||||
},
|
||||
searchNumber() {
|
||||
let dateRange_check, production_check
|
||||
let dateRange_check, materialCodeValue_check, production_check
|
||||
this.dateRange ? dateRange_check = 1 : (dateRange_check = 0, this.dateRange = '')
|
||||
this.materialCodeValue ? materialCodeValue_check = 1 : materialCodeValue_check = 0 // 备注:修改人:Ld 修改时间:2026-06-29 14:18:00
|
||||
this.production ? production_check = 1 : production_check = 0
|
||||
var param = []
|
||||
param[0] = ['物料名称_check', production_check]
|
||||
param[1] = ['物料名称', this.production]
|
||||
param[2] = ['时间_check', dateRange_check]
|
||||
param[3] = ['开始时间', this.dateRange[0]]
|
||||
param[4] = ['结束时间', this.dateRange[1]]
|
||||
param[2] = ['物料编码_check', materialCodeValue_check] // 备注:修改人:Ld 修改时间:2026-06-29 14:18:00
|
||||
param[3] = ['物料编码', this.materialCodeValue] // 备注:修改人:Ld 修改时间:2026-06-29 14:18:00
|
||||
param[4] = ['时间_check', dateRange_check]
|
||||
param[5] = ['开始时间', this.dateRange[0]]
|
||||
param[6] = ['结束时间', this.dateRange[1]]
|
||||
var Data = this.CreateData('11', '仓储管理_物料记录_查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.stockInQuantity = response.data[0].入库数
|
||||
@@ -230,4 +241,3 @@ export default {
|
||||
width: 50px!important;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
<div class="app-container">
|
||||
<el-card style="height: 850px">
|
||||
<div style="margin-top: 7px">
|
||||
<el-input v-model="production" style="width: 200px ; margin-left: 10px" size="small" clearable placeholder="物料名称/编号/规格/型号" @keyup.enter.native="pageCurrent=1;pageSize=20;searchTable()"/>
|
||||
<el-input v-model="materialCodeValue" style="width: 160px ; margin-left: 10px" size="small" clearable placeholder="物料编码" @keyup.enter.native="pageCurrent=1;pageSize=20;searchTable()"/><!-- 备注:修改人:Ld 修改时间:2026-06-29 14:18:00 -->
|
||||
<el-input v-model="production" style="width: 200px ; margin-left: 10px" size="small" clearable placeholder="物料名称/规格/型号" @keyup.enter.native="pageCurrent=1;pageSize=20;searchTable()"/><!-- 备注:修改人:Ld 修改时间:2026-06-29 14:18:00 -->
|
||||
<el-input v-model="purchaseNumber" style="width: 200px ; margin-left: 10px" size="small" clearable placeholder="采购合同编号" @keyup.enter.native="pageCurrent=1;pageSize=20;searchTable()"/>
|
||||
<el-input v-model="supplier" style="width: 200px ; margin-left: 10px" size="small" clearable placeholder="供应商" @keyup.enter.native="pageCurrent=1;pageSize=20;searchTable()"/>
|
||||
<span style="font-size: 17px;color: black ; margin-left: 10px">时间</span>
|
||||
@@ -245,6 +246,7 @@ export default {
|
||||
return {
|
||||
NowTime: getNowDAY(),
|
||||
dateRange: '', // 提交日期
|
||||
materialCodeValue: '', // 物料编码 备注:修改人:Ld 修改时间:2026-06-29 14:18:00
|
||||
production: '',
|
||||
purchaseNumber: '',
|
||||
supplier: '',
|
||||
@@ -469,8 +471,9 @@ export default {
|
||||
}
|
||||
},
|
||||
searchTable() {
|
||||
let dateRange_check, production_check, purchaseNumber_check, supplier_check
|
||||
let dateRange_check, materialCodeValue_check, production_check, purchaseNumber_check, supplier_check
|
||||
this.dateRange ? dateRange_check = 1 : (dateRange_check = 0, this.dateRange = '')
|
||||
this.materialCodeValue ? materialCodeValue_check = 1 : materialCodeValue_check = 0 // 备注:修改人:Ld 修改时间:2026-06-29 14:18:00
|
||||
this.production ? production_check = 1 : production_check = 0
|
||||
this.purchaseNumber ? purchaseNumber_check = 1 : purchaseNumber_check = 0
|
||||
this.supplier ? supplier_check = 1 : supplier_check = 0
|
||||
@@ -481,9 +484,11 @@ export default {
|
||||
param[3] = ['采购合同', this.purchaseNumber]
|
||||
param[4] = ['供应商_check', supplier_check]
|
||||
param[5] = ['供应商', this.supplier]
|
||||
param[6] = ['时间_check', dateRange_check]
|
||||
param[7] = ['开始时间', this.dateRange[0]]
|
||||
param[8] = ['结束时间', this.dateRange[1]]
|
||||
param[6] = ['物料编码_check', materialCodeValue_check] // 备注:修改人:Ld 修改时间:2026-06-29 14:18:00
|
||||
param[7] = ['物料编码', this.materialCodeValue] // 备注:修改人:Ld 修改时间:2026-06-29 14:18:00
|
||||
param[8] = ['时间_check', dateRange_check]
|
||||
param[9] = ['开始时间', this.dateRange[0]]
|
||||
param[10] = ['结束时间', this.dateRange[1]]
|
||||
var Data = this.CreateData('11', '仓储管理_入库记录退货_条件查询', param, this.pageSize, this.pageCurrent)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.tableData = response.data.rows
|
||||
@@ -507,4 +512,3 @@ export default {
|
||||
width: 50px!important;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
962
src/views/WarehouseManagement/ThirdFloorWarehouse/index.vue
Normal file
962
src/views/WarehouseManagement/ThirdFloorWarehouse/index.vue
Normal file
@@ -0,0 +1,962 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<!-- 顶部筛选与操作区 -->
|
||||
<div style="margin-top: 7px; margin-bottom: 7px">
|
||||
<span style="font-size: 13px; color: black">排号筛选</span>
|
||||
<el-select
|
||||
v-model="rowFilter"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="选择排号"
|
||||
size="small"
|
||||
style="width: 120px; margin-right: 10px"
|
||||
@change="handleRowFilterChange">
|
||||
<el-option
|
||||
v-for="item in rowOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
|
||||
<span style="font-size: 13px; color: black; margin-left: 10px">库位类型</span>
|
||||
<el-select
|
||||
v-model="statusFilter"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="状态筛选"
|
||||
size="small"
|
||||
style="width: 120px; margin-right: 10px"
|
||||
@change="handleStatusFilterChange">
|
||||
<el-option
|
||||
v-for="item in statusOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
|
||||
<span style="font-size: 13px; color: black; margin-left: 10px">库位编号</span>
|
||||
<el-input
|
||||
v-model="locationCodeSearch"
|
||||
placeholder="输入库位编号"
|
||||
size="small"
|
||||
clearable
|
||||
style="width: 150px; margin-right: 10px"
|
||||
@keyup.enter.native="handleSearch"/>
|
||||
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
style="margin-left: 10px"
|
||||
@click="handleSearch">
|
||||
搜索
|
||||
</el-button>
|
||||
|
||||
<el-button
|
||||
type="default"
|
||||
size="small"
|
||||
icon="el-icon-refresh"
|
||||
style="margin-left: 10px"
|
||||
@click="resetFilters">
|
||||
重置
|
||||
</el-button>
|
||||
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
icon="el-icon-refresh-left"
|
||||
style="margin-left: 10px"
|
||||
@click="refreshData">
|
||||
刷新数据
|
||||
</el-button>
|
||||
|
||||
<span style="font-size: 13px; color: black; margin-left: 20px">显示模式</span>
|
||||
<el-switch
|
||||
v-model="showCellText"
|
||||
active-text="文字"
|
||||
inactive-text="图标"
|
||||
active-value="text"
|
||||
inactive-value="icon"
|
||||
style="margin-left: 5px"
|
||||
@change="handleDisplayChange"/>
|
||||
|
||||
<span style="font-size: 13px; color: black; margin-left: 20px">自动刷新</span>
|
||||
<el-switch
|
||||
v-model="autoRefresh"
|
||||
active-text="开"
|
||||
inactive-text="关"
|
||||
style="margin-left: 5px"
|
||||
@change="handleAutoRefreshChange"/>
|
||||
|
||||
<el-select
|
||||
v-if="autoRefresh"
|
||||
v-model="refreshInterval"
|
||||
size="small"
|
||||
style="width: 90px; margin-left: 5px"
|
||||
@change="handleRefreshIntervalChange">
|
||||
<el-option
|
||||
v-for="item in refreshOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<!-- 统计信息卡片区 -->
|
||||
<el-row :gutter="10" style="margin: 10px 0">
|
||||
<el-col :span="4">
|
||||
<el-card shadow="hover" style="text-align: center; padding: 10px 0">
|
||||
<div style="color: #909399; font-size: 12px">总库位数</div>
|
||||
<div style="color: #303133; font-size: 20px; font-weight: bold">{{ statistics.total }}</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-card shadow="hover" style="text-align: center; padding: 10px 0">
|
||||
<div style="color: #909399; font-size: 12px">有库存</div>
|
||||
<div style="color: #4caf50; font-size: 20px; font-weight: bold">{{ statistics.withStock }}</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-card shadow="hover" style="text-align: center; padding: 10px 0">
|
||||
<div style="color: #909399; font-size: 12px">有物料/无库存</div>
|
||||
<div style="color: #ff9800; font-size: 20px; font-weight: bold">{{ statistics.preOccupied }}</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-card shadow="hover" style="text-align: center; padding: 10px 0">
|
||||
<div style="color: #909399; font-size: 12px">空闲库位</div>
|
||||
<div style="color: #9e9e9e; font-size: 20px; font-weight: bold">{{ statistics.empty }}</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-card shadow="hover" style="text-align: center; padding: 10px 0">
|
||||
<div style="color: #909399; font-size: 12px">使用率</div>
|
||||
<div style="color: #2196f3; font-size: 20px; font-weight: bold">{{ statistics.usageRate }}%</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 状态图例区 -->
|
||||
<div style="margin-bottom: 15px; display: flex; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap">
|
||||
<div style="display: flex; align-items: center">
|
||||
<div class="legend-color" style="background-color: #4caf50"/>
|
||||
<span style="margin-left: 5px; font-size: 12px">有库存 (存)</span>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center">
|
||||
<div class="legend-color" style="background-color: #ff9800"/>
|
||||
<span style="margin-left: 5px; font-size: 12px">有物料/无库存 (待)</span>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center">
|
||||
<div class="legend-color" style="background-color: #e0e0e0"/>
|
||||
<span style="margin-left: 5px; font-size: 12px">空闲 (空)</span>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center">
|
||||
<div class="legend-color" style="background-color: #bbdefb; border: 2px solid #2196f3"/>
|
||||
<span style="margin-left: 5px; font-size: 12px">选中库位</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 三楼仓库库位网格矩阵区 -->
|
||||
<div v-loading="loading" style="height: 580px; overflow: auto; border: 1px solid #e4e7ed; border-radius: 4px; padding: 15px; background: #f5f7fa">
|
||||
<!-- 数据为空提示 -->
|
||||
<div v-if="groupedData.length === 0 && !loading" style="text-align: center; padding: 100px; color: #909399">
|
||||
<span style="font-size: 14px">暂无库位数据</span>
|
||||
</div>
|
||||
|
||||
<!-- 按排号分组的库位矩阵 -->
|
||||
<div v-else>
|
||||
<div v-for="group in groupedData" :key="group.排号" class="warehouse-group">
|
||||
<div style="text-align: center; margin-bottom: 10px; color: #303133; font-weight: bold; background: #e8f4fd; padding: 5px; border-radius: 4px">
|
||||
排号{{ group.排号 }} - 三楼仓库库位
|
||||
<span style="margin-left: 20px; color: #909399; font-weight: normal; font-size: 12px">最后更新: {{ lastUpdateTime }}</span>
|
||||
</div>
|
||||
|
||||
<div style="overflow-x: auto; margin-bottom: 10px">
|
||||
<table class="warehouse-table">
|
||||
<!-- 列标题 -->
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="table-header row-header">层号</th>
|
||||
<th
|
||||
v-for="col in columnKeys"
|
||||
:key="col"
|
||||
:class="{ 'highlighted-column': selectedCell && selectedCell.column === col && selectedCell.排号 === group.排号 }"
|
||||
class="table-header column-header">
|
||||
{{ col }}列
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<!-- 数据行(层号) -->
|
||||
<tbody>
|
||||
<tr
|
||||
v-for="layer in group.rows"
|
||||
:key="layer.层号"
|
||||
:class="{ 'highlighted-row': highlightedRow === layer.层号 && highlightedGroup === group.排号 }"
|
||||
class="table-row">
|
||||
<td class="row-label-cell">{{ layer.层号 }}层</td>
|
||||
<td
|
||||
v-for="col in columnKeys"
|
||||
:key="col"
|
||||
:data-row="group.排号 + '-' + layer.层号"
|
||||
:data-col="col"
|
||||
:class="[
|
||||
'status-' + (layer.cells[col] ? layer.cells[col].状态 : -1),
|
||||
{
|
||||
'selected-cell': selectedCell &&
|
||||
selectedCell.排号 === group.排号 &&
|
||||
selectedCell.层号 === layer.层号 &&
|
||||
selectedCell.column === col,
|
||||
'search-highlight': isSearchHighlighted(group.排号, layer.层号, col)
|
||||
}
|
||||
]"
|
||||
class="location-cell"
|
||||
@click="selectLocation(group.排号, layer.层号, col, layer.cells[col])"
|
||||
@mouseenter="onCellHover(group.排号, layer.层号, col)"
|
||||
@mouseleave="onCellLeave">
|
||||
<div class="cell-content">
|
||||
<span v-if="showCellText === 'text'" class="cell-text">
|
||||
{{ getStatusLabel(layer.cells[col] ? layer.cells[col].状态 : -1) }}
|
||||
</span>
|
||||
<span v-else class="cell-icon">
|
||||
<i :class="getStatusIcon(layer.cells[col] ? layer.cells[col].状态 : -1)"/>
|
||||
</span>
|
||||
<div v-if="isHoveredCell(group.排号, layer.层号, col)" class="cell-tooltip">
|
||||
{{ layer.cells[col] ? (layer.cells[col].库位编号 + ' - ' + getStatusDescription(layer.cells[col].状态)) : '无库位' }}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 库位详情弹窗 -->
|
||||
<el-dialog
|
||||
:visible.sync="detailDialogVisible"
|
||||
:title="'库位详情 - ' + detailInfo.库位编号"
|
||||
center
|
||||
width="500px">
|
||||
<el-descriptions :column="1" border size="small">
|
||||
<el-descriptions-item label="库位编号">{{ detailInfo.库位编号 }}</el-descriptions-item>
|
||||
<el-descriptions-item label="库位名称">{{ detailInfo.库位名称 }}</el-descriptions-item>
|
||||
<el-descriptions-item label="排号">{{ detailInfo.排号 }}</el-descriptions-item>
|
||||
<el-descriptions-item label="层号">{{ detailInfo.层号 }}</el-descriptions-item>
|
||||
<el-descriptions-item label="当前状态">
|
||||
<el-tag :type="getStatusTagType(detailInfo.状态值)" size="small">{{ detailInfo.状态 }}</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="状态描述">{{ detailInfo.状态描述 }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="detailDialogVisible = false">关闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 物料信息弹窗 -->
|
||||
<el-dialog
|
||||
:visible.sync="materialDialogVisible"
|
||||
:title="'库位物料信息 - ' + materialLocationCode"
|
||||
center
|
||||
width="900px">
|
||||
<el-table
|
||||
v-loading="materialLoading"
|
||||
:data="materialList"
|
||||
stripe
|
||||
size="small"
|
||||
style="width: 100%"
|
||||
height="350">
|
||||
<el-table-column
|
||||
prop="物料编号"
|
||||
label="物料编号"
|
||||
width="150"
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column
|
||||
prop="物料名称"
|
||||
label="物料名称"
|
||||
width="120"
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column
|
||||
prop="图号"
|
||||
label="图号"
|
||||
width="150"
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column
|
||||
prop="规格型号"
|
||||
label="规格型号"
|
||||
width="150"
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column
|
||||
label="库存数量"
|
||||
width="100"
|
||||
align="right">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{ color: scope.row.库存数量 > 0 ? '#67C23A' : '#F56C6C', fontWeight: 'bold' }">
|
||||
{{ formatNumber(scope.row.库存数量) }}
|
||||
</span>
|
||||
<div style="font-size: 10px; color: #909399">
|
||||
{{ scope.row.单位 || '台' }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div v-if="materialList.length === 0 && !materialLoading" slot="append" style="text-align: center; padding: 20px; color: #909399">
|
||||
暂无物料数据
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="materialDialogVisible = false">关闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ExecDatabase } from '@/main'
|
||||
|
||||
export default {
|
||||
name: 'ThirdFloorWarehouse',
|
||||
data() {
|
||||
return {
|
||||
// ========== 筛选条件 ==========
|
||||
rowFilter: '',
|
||||
statusFilter: '',
|
||||
locationCodeSearch: '',
|
||||
rowOptions: [],
|
||||
statusOptions: [
|
||||
{ label: '全部', value: '' },
|
||||
{ label: '有库存', value: 2 },
|
||||
{ label: '有物料/无库存', value: 1 },
|
||||
{ label: '空闲', value: 0 }
|
||||
],
|
||||
|
||||
// ========== 自动刷新 ==========
|
||||
autoRefresh: false,
|
||||
refreshInterval: 60,
|
||||
refreshTimer: null,
|
||||
refreshOptions: [
|
||||
{ label: '30秒', value: 30 },
|
||||
{ label: '1分钟', value: 60 },
|
||||
{ label: '5分钟', value: 300 }
|
||||
],
|
||||
|
||||
// ========== 矩阵数据 ==========
|
||||
locationRawData: [],
|
||||
allLayers: [],
|
||||
columnKeys: [],
|
||||
groupedData: [],
|
||||
|
||||
// ========== 选中与交互状态 ==========
|
||||
selectedCell: null,
|
||||
highlightedRow: null,
|
||||
highlightedGroup: null,
|
||||
hoveredCell: null,
|
||||
|
||||
// ========== 统计信息 ==========
|
||||
statistics: {
|
||||
total: 0,
|
||||
withStock: 0,
|
||||
preOccupied: 0,
|
||||
empty: 0,
|
||||
usageRate: 0
|
||||
},
|
||||
|
||||
// ========== 弹窗 ==========
|
||||
detailDialogVisible: false,
|
||||
detailInfo: {},
|
||||
materialDialogVisible: false,
|
||||
materialLoading: false,
|
||||
materialList: [],
|
||||
materialLocationCode: '',
|
||||
|
||||
// ========== 显示设置 ==========
|
||||
showCellText: 'text',
|
||||
loading: false,
|
||||
lastUpdateTime: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.loadLocationData()
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.stopAutoRefresh()
|
||||
},
|
||||
methods: {
|
||||
// ========== 数据加载与转换 ==========
|
||||
|
||||
loadLocationData() {
|
||||
var self = this
|
||||
self.loading = true
|
||||
var param = []
|
||||
param[0] = ['排号_check', self.rowFilter ? 1 : 0]
|
||||
param[1] = ['排号', self.rowFilter]
|
||||
param[2] = ['库位编号_check', self.locationCodeSearch ? 1 : 0]
|
||||
param[3] = ['库位编号', self.locationCodeSearch]
|
||||
param[4] = ['库位状态_check', self.statusFilter !== '' ? 1 : 0]
|
||||
param[5] = ['库位状态', self.statusFilter]
|
||||
var Data = self.CreateData('11', '仓储管理_三楼仓库库位_查询数据', param)
|
||||
ExecDatabase(Data).then(function(response) {
|
||||
var rows = []
|
||||
if (response.data && response.data.rows) {
|
||||
rows = response.data.rows
|
||||
} else if (response.data && Array.isArray(response.data)) {
|
||||
rows = response.data
|
||||
}
|
||||
self.locationRawData = rows
|
||||
self.buildMatrix(rows)
|
||||
self.updateRowOptions()
|
||||
self.updateLastUpdateTime()
|
||||
self.loading = false
|
||||
}).catch(function() {
|
||||
self.loading = false
|
||||
})
|
||||
},
|
||||
|
||||
// 构建矩阵:固定8排24列3层,全空也显示
|
||||
buildMatrix(list) {
|
||||
var self = this
|
||||
|
||||
// 固定维度:8排 24列 3层
|
||||
var rowKeys = ['01', '02', '03', '04', '05', '06', '07', '08']
|
||||
var layers = ['03', '02', '01']
|
||||
var cols = []
|
||||
for (var i = 1; i <= 24; i++) {
|
||||
cols.push(i)
|
||||
}
|
||||
self.allLayers = layers
|
||||
self.columnKeys = cols
|
||||
|
||||
// 按排号-层号-列号索引实际数据
|
||||
var dataMap = {}
|
||||
list.forEach(function(item) {
|
||||
var key = item.排号 + '-' + item.层号 + '-' + item.列号
|
||||
dataMap[key] = {
|
||||
库位编号: item.库位编号,
|
||||
库位名称: item.库位编号,
|
||||
状态: item.状态,
|
||||
排号: item.排号,
|
||||
层号: item.层号,
|
||||
列号: item.列号
|
||||
}
|
||||
})
|
||||
|
||||
// 构建分组数据(8排全部显示)
|
||||
var grouped = []
|
||||
rowKeys.forEach(function(rowKey) {
|
||||
var rows = []
|
||||
layers.forEach(function(layer) {
|
||||
var layerCells = {}
|
||||
cols.forEach(function(col) {
|
||||
var key = rowKey + '-' + layer + '-' + col
|
||||
if (dataMap[key]) {
|
||||
layerCells[col] = dataMap[key]
|
||||
} else {
|
||||
layerCells[col] = {
|
||||
库位编号: rowKey + '-' + (col < 10 ? '0' + col : col) + '-' + layer,
|
||||
库位名称: rowKey + '-' + (col < 10 ? '0' + col : col) + '-' + layer,
|
||||
状态: 0,
|
||||
排号: rowKey,
|
||||
层号: layer,
|
||||
列号: col
|
||||
}
|
||||
}
|
||||
})
|
||||
rows.push({ 层号: layer, cells: layerCells })
|
||||
})
|
||||
grouped.push({ 排号: rowKey, rows: rows })
|
||||
})
|
||||
|
||||
self.groupedData = grouped
|
||||
self.updateStatistics()
|
||||
},
|
||||
|
||||
updateRowOptions() {
|
||||
var self = this
|
||||
var rowSet = {}
|
||||
self.locationRawData.forEach(function(item) {
|
||||
if (item.排号) {
|
||||
rowSet[item.排号] = true
|
||||
}
|
||||
})
|
||||
var rows = Object.keys(rowSet).sort()
|
||||
self.rowOptions = rows.map(function(r) {
|
||||
return { label: r + '排', value: r }
|
||||
})
|
||||
},
|
||||
|
||||
updateLastUpdateTime() {
|
||||
this.lastUpdateTime = new Date().toLocaleString()
|
||||
},
|
||||
|
||||
// ========== 筛选与搜索 ==========
|
||||
|
||||
handleRowFilterChange() {
|
||||
this.loadLocationData()
|
||||
},
|
||||
|
||||
handleStatusFilterChange() {
|
||||
this.loadLocationData()
|
||||
},
|
||||
|
||||
handleSearch() {
|
||||
this.loadLocationData()
|
||||
},
|
||||
|
||||
resetFilters() {
|
||||
this.rowFilter = ''
|
||||
this.statusFilter = ''
|
||||
this.locationCodeSearch = ''
|
||||
this.loadLocationData()
|
||||
this.$message.info('筛选条件已重置')
|
||||
},
|
||||
|
||||
refreshData() {
|
||||
this.loadLocationData()
|
||||
},
|
||||
|
||||
// ========== 统计计算 ==========
|
||||
|
||||
updateStatistics() {
|
||||
var withStock = 0
|
||||
var preOccupied = 0
|
||||
var empty = 0
|
||||
this.groupedData.forEach(function(group) {
|
||||
group.rows.forEach(function(layer) {
|
||||
Object.keys(layer.cells).forEach(function(colKey) {
|
||||
var cell = layer.cells[colKey]
|
||||
if (!cell) return
|
||||
var status = cell.状态
|
||||
if (status === 2) withStock++
|
||||
else if (status === 1) preOccupied++
|
||||
else if (status === 0) empty++
|
||||
})
|
||||
})
|
||||
})
|
||||
var total = withStock + preOccupied + empty
|
||||
var usageRate = total > 0 ? (((withStock + preOccupied) / total) * 100).toFixed(1) : 0
|
||||
this.statistics = { total: total, withStock: withStock, preOccupied: preOccupied, empty: empty, usageRate: usageRate }
|
||||
},
|
||||
|
||||
// ========== 单元格交互 ==========
|
||||
|
||||
selectLocation(rowKey, layerKey, colKey, locationInfo) {
|
||||
this.selectedCell = { 排号: rowKey, 层号: layerKey, column: colKey }
|
||||
this.highlightedRow = layerKey
|
||||
this.highlightedGroup = rowKey
|
||||
if (!locationInfo) return
|
||||
if (locationInfo.状态 === 2) {
|
||||
this.loadMaterialDetail(locationInfo.库位编号)
|
||||
} else {
|
||||
this.showLocationDetail(locationInfo)
|
||||
}
|
||||
},
|
||||
|
||||
loadMaterialDetail(locationCode) {
|
||||
var self = this
|
||||
self.materialLoading = true
|
||||
self.materialLocationCode = locationCode
|
||||
self.materialList = []
|
||||
var param = []
|
||||
param[0] = ['库位编号_check', 1]
|
||||
param[1] = ['库位编号', locationCode]
|
||||
var Data = self.CreateData('11', '仓储管理_三楼仓库库位物料_查询数据', param)
|
||||
ExecDatabase(Data).then(function(response) {
|
||||
var rows = []
|
||||
if (response.data && response.data.rows) {
|
||||
rows = response.data.rows
|
||||
} else if (response.data && Array.isArray(response.data)) {
|
||||
rows = response.data
|
||||
}
|
||||
// 按物料编号合并,库存数量累加
|
||||
var merged = {}
|
||||
rows.forEach(function(item) {
|
||||
var key = item.物料编号
|
||||
if (!merged[key]) {
|
||||
merged[key] = {
|
||||
物料编号: item.物料编号,
|
||||
物料名称: item.物料名称,
|
||||
图号: item.图号,
|
||||
规格型号: item.规格型号,
|
||||
库存数量: 0,
|
||||
单位: item.单位
|
||||
}
|
||||
}
|
||||
merged[key].库存数量 += parseFloat(item.库存数量) || 0
|
||||
})
|
||||
self.materialList = Object.values(merged)
|
||||
self.materialDialogVisible = true
|
||||
self.materialLoading = false
|
||||
}).catch(function() {
|
||||
self.materialList = []
|
||||
self.materialDialogVisible = true
|
||||
self.materialLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
showLocationDetail(locationInfo) {
|
||||
this.detailInfo = {
|
||||
库位编号: locationInfo.库位编号,
|
||||
库位名称: locationInfo.库位名称,
|
||||
排号: locationInfo.排号,
|
||||
层号: locationInfo.层号,
|
||||
状态: this.getStatusLabel(locationInfo.状态),
|
||||
状态值: locationInfo.状态,
|
||||
状态描述: this.getStatusDescription(locationInfo.状态)
|
||||
}
|
||||
this.detailDialogVisible = true
|
||||
},
|
||||
|
||||
onCellHover(rowKey, layerKey, colKey) {
|
||||
this.hoveredCell = { 排号: rowKey, 层号: layerKey, column: colKey }
|
||||
},
|
||||
|
||||
onCellLeave() {
|
||||
this.hoveredCell = null
|
||||
},
|
||||
|
||||
isHoveredCell(rowKey, layerKey, colKey) {
|
||||
return this.hoveredCell &&
|
||||
this.hoveredCell.排号 === rowKey &&
|
||||
this.hoveredCell.层号 === layerKey &&
|
||||
this.hoveredCell.column === colKey
|
||||
},
|
||||
|
||||
isSearchHighlighted(rowKey, layerKey, colKey) {
|
||||
if (!this.locationCodeSearch || !this.selectedCell) return false
|
||||
return this.selectedCell.排号 === rowKey &&
|
||||
this.selectedCell.层号 === layerKey &&
|
||||
this.selectedCell.column === colKey
|
||||
},
|
||||
|
||||
// ========== 状态映射方法 ==========
|
||||
|
||||
getStatusLabel(status) {
|
||||
var map = { 0: '空', 1: '待', 2: '存' }
|
||||
return map[status] || '-'
|
||||
},
|
||||
|
||||
getStatusDescription(status) {
|
||||
var map = {
|
||||
0: '空闲库位,可存放物料',
|
||||
1: '有物料但无库存',
|
||||
2: '有库存,库位上存放有物料'
|
||||
}
|
||||
return map[status] || '无库位'
|
||||
},
|
||||
|
||||
getStatusIcon(status) {
|
||||
var map = {
|
||||
0: 'el-icon-minus',
|
||||
1: 'el-icon-time',
|
||||
2: 'el-icon-box'
|
||||
}
|
||||
return map[status] || 'el-icon-question'
|
||||
},
|
||||
|
||||
getStatusTagType(status) {
|
||||
var map = {
|
||||
0: 'info',
|
||||
1: 'warning',
|
||||
2: 'success'
|
||||
}
|
||||
return map[status] || 'info'
|
||||
},
|
||||
|
||||
formatNumber(num) {
|
||||
var n = parseFloat(num)
|
||||
if (isNaN(n)) return '0.000'
|
||||
return n.toFixed(3)
|
||||
},
|
||||
|
||||
// ========== 显示模式 ==========
|
||||
|
||||
handleDisplayChange() {
|
||||
this.$message.info('已切换为' + (this.showCellText === 'text' ? '显示文字' : '显示图标') + '模式')
|
||||
},
|
||||
|
||||
// ========== 自动刷新 ==========
|
||||
|
||||
handleAutoRefreshChange(val) {
|
||||
if (val) {
|
||||
this.startAutoRefresh()
|
||||
} else {
|
||||
this.stopAutoRefresh()
|
||||
}
|
||||
},
|
||||
|
||||
startAutoRefresh() {
|
||||
var self = this
|
||||
self.stopAutoRefresh()
|
||||
self.refreshTimer = setInterval(function() {
|
||||
self.loadLocationData()
|
||||
}, self.refreshInterval * 1000)
|
||||
},
|
||||
|
||||
stopAutoRefresh() {
|
||||
if (this.refreshTimer) {
|
||||
clearInterval(this.refreshTimer)
|
||||
this.refreshTimer = null
|
||||
}
|
||||
},
|
||||
|
||||
handleRefreshIntervalChange() {
|
||||
if (this.autoRefresh) {
|
||||
this.startAutoRefresh()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.app-container {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
/deep/ .el-card__body {
|
||||
padding: 15px !important;
|
||||
}
|
||||
|
||||
.legend-color {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.warehouse-group {
|
||||
margin-bottom: 20px;
|
||||
padding: 15px;
|
||||
background: white;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.warehouse-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin: 0 auto;
|
||||
min-width: 1200px;
|
||||
|
||||
.table-header {
|
||||
background-color: #f5f7fa;
|
||||
color: #303133;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
padding: 8px;
|
||||
border: 1px solid #e4e7ed;
|
||||
min-width: 40px;
|
||||
height: 40px;
|
||||
font-size: 12px;
|
||||
|
||||
&.row-header {
|
||||
background-color: #e8f4fd;
|
||||
color: #2196f3;
|
||||
min-width: 80px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
&.highlighted-column {
|
||||
background-color: #bbdefb;
|
||||
color: #1976d2;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.table-row {
|
||||
&.highlighted-row {
|
||||
background-color: #f0f9ff;
|
||||
|
||||
.row-label-cell {
|
||||
background-color: #bbdefb;
|
||||
color: #1976d2;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: #f5f7fa;
|
||||
}
|
||||
}
|
||||
|
||||
.row-label-cell {
|
||||
background-color: #f5f7fa;
|
||||
color: #303133;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
padding: 8px;
|
||||
border: 1px solid #e4e7ed;
|
||||
width: 80px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.location-cell {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
padding: 0;
|
||||
border: 1px solid #e4e7ed;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
min-width: 40px;
|
||||
height: 40px;
|
||||
|
||||
&:hover {
|
||||
transform: scale(1.1);
|
||||
z-index: 10;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
&.selected-cell {
|
||||
box-shadow: 0 0 0 2px #2196f3;
|
||||
z-index: 20;
|
||||
position: relative;
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: -2px;
|
||||
left: -2px;
|
||||
right: -2px;
|
||||
bottom: -2px;
|
||||
border: 2px solid #2196f3;
|
||||
border-radius: 2px;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
&.search-highlight {
|
||||
animation: highlightPulse 1.5s ease-in-out 3;
|
||||
}
|
||||
|
||||
&.status-2 {
|
||||
background-color: #4caf50;
|
||||
color: white;
|
||||
|
||||
&:hover {
|
||||
background-color: #388e3c;
|
||||
}
|
||||
}
|
||||
|
||||
&.status-1 {
|
||||
background-color: #ff9800;
|
||||
color: white;
|
||||
|
||||
&:hover {
|
||||
background-color: #f57c00;
|
||||
}
|
||||
}
|
||||
|
||||
&.status-0 {
|
||||
background-color: #e0e0e0;
|
||||
color: #666;
|
||||
|
||||
&:hover {
|
||||
background-color: #bdbdbd;
|
||||
}
|
||||
}
|
||||
|
||||
&.status--1 {
|
||||
background-color: #fafafa;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.cell-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.cell-text {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.cell-icon {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.cell-tooltip {
|
||||
position: absolute;
|
||||
bottom: 100%;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
background-color: rgba(0, 0, 0, 0.8);
|
||||
color: white;
|
||||
padding: 4px 8px;
|
||||
border-radius: 4px;
|
||||
font-size: 12px;
|
||||
white-space: nowrap;
|
||||
z-index: 30;
|
||||
margin-bottom: 5px;
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
border-width: 5px;
|
||||
border-style: solid;
|
||||
border-color: rgba(0, 0, 0, 0.8) transparent transparent transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes highlightPulse {
|
||||
0% { box-shadow: 0 0 0 0 rgba(33, 150, 243, 0.4); }
|
||||
50% { box-shadow: 0 0 0 6px rgba(33, 150, 243, 0.2); }
|
||||
100% { box-shadow: 0 0 0 0 rgba(33, 150, 243, 0); }
|
||||
}
|
||||
|
||||
// 响应式调整
|
||||
@media (max-width: 1400px) {
|
||||
.warehouse-table {
|
||||
min-width: 900px;
|
||||
|
||||
.location-cell {
|
||||
min-width: 35px;
|
||||
height: 35px;
|
||||
|
||||
.cell-text {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.cell-icon {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 992px) {
|
||||
.warehouse-table {
|
||||
min-width: 700px;
|
||||
|
||||
.location-cell {
|
||||
min-width: 30px;
|
||||
height: 30px;
|
||||
|
||||
.cell-text {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.cell-icon {
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
.row-label-cell {
|
||||
width: 60px;
|
||||
font-size: 10px;
|
||||
padding: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -12,7 +12,7 @@
|
||||
<el-input
|
||||
v-model="materialCodeValue"
|
||||
clearable
|
||||
placeholder="物料编号"
|
||||
placeholder="物料编码"
|
||||
size="small"
|
||||
style="width:160px"
|
||||
@keyup.enter.native="searchTable()"/>
|
||||
@@ -134,7 +134,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="物料编号"
|
||||
label="物料编码"
|
||||
prop="物料码"
|
||||
show-overflow-tooltip
|
||||
sortable="物料码"
|
||||
@@ -519,7 +519,7 @@ export default {
|
||||
returns: [],
|
||||
contractNumber: '', // 合同
|
||||
supplierSelectionName: '', // 选择供应商名称
|
||||
materialCodeValue: '', // 物料编号
|
||||
materialCodeValue: '', // 物料编码 备注:修改人:Ld 修改时间:2026-06-29 14:24:00
|
||||
materialNameTypeValue: '', // 物料名称规格型号
|
||||
materialNameType: [], // 物料名称规格型号数组
|
||||
入库单号Value: '', // 入库单号
|
||||
|
||||
Reference in New Issue
Block a user