1
This commit is contained in:
@@ -9,16 +9,7 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- :model属性用于表单验证使用 比如下面的el-form-item 的 prop属性用于对表单值进行验证操作 -->
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
size="small"
|
||||
label-position="right"
|
||||
inline
|
||||
ref="queryForm"
|
||||
:label-width="labelWidth"
|
||||
v-show="showSearch"
|
||||
@submit.native.prevent
|
||||
>
|
||||
<el-form :model="queryParams" size="small" label-position="right" inline ref="queryForm" :label-width="labelWidth" v-show="showSearch" @submit.native.prevent>
|
||||
<el-form-item label="零件号" prop="partnumber">
|
||||
<el-input v-model.trim="queryParams.partnumber" placeholder="请输入零件号" clearable />
|
||||
</el-form-item>
|
||||
@@ -27,12 +18,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="类别" prop="type">
|
||||
<el-select v-model="queryParams.type" placeholder="请选择类别" @change="handleQuery">
|
||||
<el-option
|
||||
v-for="item in typeOptions"
|
||||
:key="item.dictValue"
|
||||
:label="item.dictLabel"
|
||||
:value="parseInt(item.dictValue)"
|
||||
></el-option>
|
||||
<el-option v-for="item in typeOptions" :key="item.dictValue" :label="item.dictLabel" :value="parseInt(item.dictValue)"></el-option>
|
||||
<el-option label="全部" :value="0"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -60,49 +46,22 @@
|
||||
<!-- 仓库零件数 -->
|
||||
<div style="display: flex; align-items: center; justify-content: center; margin-bottom: 10px">
|
||||
<span style="font-size: 18px; font-weight: 600">一次合格品仓库零件数:{{ partTotal }}</span>
|
||||
<span style="font-size: 18px; font-weight: 600;margin-left: 20px;">当前查询结果零件数:{{ totalQuantity }}</span>
|
||||
<span style="font-size: 18px; font-weight: 600; margin-left: 20px">当前查询结果零件数:{{ totalQuantity }}</span>
|
||||
</div>
|
||||
<!-- 数据区域 -->
|
||||
<el-table
|
||||
:data="dataList"
|
||||
v-loading="loading"
|
||||
ref="table"
|
||||
border
|
||||
highlight-current-row
|
||||
@sort-change="sortChange"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table :data="dataList" v-loading="loading" ref="table" border highlight-current-row @sort-change="sortChange" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column prop="id" label="主键" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('id')" />
|
||||
<el-table-column
|
||||
min-width="200"
|
||||
prop="partnumber"
|
||||
label="零件号"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
v-if="columns.showColumn('partnumber')"
|
||||
>
|
||||
<el-table-column min-width="200" prop="partnumber" label="零件号" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('partnumber')">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="primary" @click="handleShowInfo(scope.row)">{{ scope.row.partnumber }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="description"
|
||||
label="产品描述"
|
||||
align="center"
|
||||
min-width="300"
|
||||
:show-overflow-tooltip="true"
|
||||
v-if="columns.showColumn('description')"
|
||||
/>
|
||||
<el-table-column prop="description" label="产品描述" align="center" min-width="300" :show-overflow-tooltip="true" v-if="columns.showColumn('description')" />
|
||||
<el-table-column prop="color" label="颜色" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('color')" />
|
||||
<el-table-column
|
||||
prop="specification"
|
||||
label="规格"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
v-if="columns.showColumn('specification')"
|
||||
/>
|
||||
<el-table-column prop="quantity" label="库存数量" align="center" v-if="columns.showColumn('quantity')" />
|
||||
<el-table-column prop="specification" label="规格" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('specification')" />
|
||||
<el-table-column prop="quantity" label="盘点数量" align="center" v-if="columns.showColumn('quantity')" />
|
||||
<el-table-column prop="realQuantity" label="实际库存" align="center" v-if="columns.showColumn('realQuantity')" />
|
||||
<el-table-column prop="maxNum" label="最大库存" align="center" v-if="columns.showColumn('maxNum')" />
|
||||
<el-table-column prop="minNum" label="最小库存" align="center" v-if="columns.showColumn('minNum')" />
|
||||
<el-table-column prop="warnNum" label="预警库存" align="center" v-if="columns.showColumn('warnNum')" />
|
||||
@@ -114,22 +73,9 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('remark')" />
|
||||
<el-table-column prop="createdBy" label="创建人" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('createdBy')" />
|
||||
<el-table-column
|
||||
prop="createdTime"
|
||||
label="创建时间"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
v-if="columns.showColumn('createdTime')"
|
||||
/>
|
||||
<el-table-column prop="createdTime" label="盘点时间" align="center" width="160px" :show-overflow-tooltip="true" v-if="columns.showColumn('createdTime')" />
|
||||
<el-table-column prop="updatedBy" label="更新人" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('updatedBy')" />
|
||||
<el-table-column
|
||||
prop="updatedTime"
|
||||
label="更新时间"
|
||||
align="center"
|
||||
min-width="160px"
|
||||
:show-overflow-tooltip="true"
|
||||
v-if="columns.showColumn('updatedTime')"
|
||||
/>
|
||||
<el-table-column prop="updatedTime" label="更新时间" align="center" min-width="160px" :show-overflow-tooltip="true" v-if="columns.showColumn('updatedTime')" />
|
||||
<el-table-column label="操作" align="center" fixed="right" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="info" @click="handleShowInfo(scope.row)">记录</el-button>
|
||||
@@ -138,14 +84,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
class="mt10"
|
||||
background
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<pagination class="mt10" background :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||
|
||||
<!-- 入库,出库,盘点 -->
|
||||
<el-dialog :close-on-click-modal="false" :title="title" :lock-scroll="false" :visible.sync="open" @opened="dialogOpened">
|
||||
@@ -189,23 +128,13 @@
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="零件类别" prop="type">
|
||||
<el-select v-model="form.type" placeholder="请选择类别">
|
||||
<el-option
|
||||
v-for="item in typeOptions"
|
||||
:key="item.dictValue"
|
||||
:label="item.dictLabel"
|
||||
:value="parseInt(item.dictValue)"
|
||||
></el-option>
|
||||
<el-option v-for="item in typeOptions" :key="item.dictValue" :label="item.dictLabel" :value="parseInt(item.dictValue)"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="操作时间" prop="actionTime">
|
||||
<el-date-picker
|
||||
v-model="form.actionTime"
|
||||
type="datetime"
|
||||
:clearable="false"
|
||||
placeholder="选择日期时间"
|
||||
></el-date-picker>
|
||||
<el-date-picker v-model="form.actionTime" type="datetime" :clearable="false" placeholder="选择日期时间"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :lg="24">
|
||||
@@ -221,32 +150,13 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 操作记录 -->
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:title="RecordTitle"
|
||||
:lock-scroll="false"
|
||||
:visible.sync="RecordOpen"
|
||||
@opened="RecordOpened"
|
||||
width="80%"
|
||||
destroy-on-close
|
||||
>
|
||||
<el-dialog :close-on-click-modal="false" :title="RecordTitle" :lock-scroll="false" :visible.sync="RecordOpen" @opened="RecordOpened" width="80%" destroy-on-close>
|
||||
<el-form :model="RecordQueryParams" size="small" label-position="right" inline ref="RecordQueryForm" @submit.native.prevent>
|
||||
<el-form-item label="操作时间" prop="startActionTime">
|
||||
<el-date-picker
|
||||
v-model="RecordQueryParams.startActionTime"
|
||||
type="datetime"
|
||||
:clearable="true"
|
||||
placeholder="开始时间"
|
||||
></el-date-picker>
|
||||
<el-date-picker v-model="RecordQueryParams.startActionTime" type="datetime" :clearable="true" placeholder="开始时间"></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="至" prop="endActionTime">
|
||||
<el-date-picker
|
||||
v-model="RecordQueryParams.endActionTime"
|
||||
type="datetime"
|
||||
:clearable="true"
|
||||
placeholder="结束时间"
|
||||
default-time="23:59:59"
|
||||
></el-date-picker>
|
||||
<el-date-picker v-model="RecordQueryParams.endActionTime" type="datetime" :clearable="true" placeholder="结束时间" default-time="23:59:59"></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="工单号" prop="remark">
|
||||
<el-input v-model.trim="RecordQueryParams.remark" placeholder="请输入工单号" clearable />
|
||||
@@ -254,12 +164,7 @@
|
||||
<el-form-item label="类别" prop="changeType">
|
||||
<el-select v-model="RecordQueryParams.changeType" placeholder="请选择类别" @change="getRecordList">
|
||||
<el-option label="全部" :value="-1"></el-option>
|
||||
<el-option
|
||||
v-for="item in RecordTypeOptions"
|
||||
:key="item.dictValue"
|
||||
:label="item.dictLabel"
|
||||
:value="parseInt(item.dictValue)"
|
||||
></el-option>
|
||||
<el-option v-for="item in RecordTypeOptions" :key="item.dictValue" :label="item.dictLabel" :value="parseInt(item.dictValue)"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@@ -284,14 +189,7 @@
|
||||
<el-table-column prop="createdBy" label="创建人" align="center" :show-overflow-tooltip="true" />
|
||||
<el-table-column prop="createdTime" min-width="160" label="创建时间" align="center" :show-overflow-tooltip="true" />
|
||||
</el-table>
|
||||
<pagination
|
||||
class="mt10"
|
||||
background
|
||||
:total="RecordTotal"
|
||||
:page.sync="RecordQueryParams.pageNum"
|
||||
:limit.sync="RecordQueryParams.pageSize"
|
||||
@pagination="getRecordList"
|
||||
/>
|
||||
<pagination class="mt10" background :total="RecordTotal" :page.sync="RecordQueryParams.pageNum" :limit.sync="RecordQueryParams.pageSize" @pagination="getRecordList" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
@@ -307,7 +205,7 @@ import {
|
||||
doWmOneTimeStocktaking,
|
||||
getWmOneTimeRecordList,
|
||||
getPartNumber,
|
||||
exportOneTimeInventory
|
||||
exportOneTimeInventory,
|
||||
} from '@/api/wmsManagement/wmOneTimeInventory.js'
|
||||
import ThePartNumberSelect from './ThePartNumberSelect.vue'
|
||||
export default {
|
||||
@@ -366,9 +264,10 @@ export default {
|
||||
{ index: 8, key: 'status', label: `状态`, checked: true },
|
||||
{ index: 9, key: 'remark', label: `备注`, checked: false },
|
||||
{ index: 10, key: 'createdBy', label: `创建人`, checked: false },
|
||||
{ index: 11, key: 'createdTime', label: `创建时间`, checked: false },
|
||||
{ index: 11, key: 'createdTime', label: `盘点时间`, checked: true },
|
||||
{ index: 12, key: 'updatedBy', label: `更新人`, checked: false },
|
||||
{ index: 13, key: 'updatedTime', label: `更新时间`, checked: true },
|
||||
{ index: 13, key: 'updatedTime', label: `更新时间`, checked: false },
|
||||
{ index: 14, key: 'realQuantity', label: `实际库存`, checked: true },
|
||||
],
|
||||
// 类别(1-正常 2-返工件)选项列表 格式 eg:{ dictLabel: '标签', dictValue: '0'}
|
||||
typeOptions: [
|
||||
@@ -379,7 +278,7 @@ export default {
|
||||
statusOptions: [],
|
||||
// 数据列表
|
||||
dataList: [],
|
||||
allDataList:[],
|
||||
allDataList: [],
|
||||
// 总记录数
|
||||
total: 0,
|
||||
// 提交按钮是否显示
|
||||
@@ -616,11 +515,13 @@ export default {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}).then(async () => {
|
||||
await exportOneTimeInventory(queryParams)
|
||||
}).catch()
|
||||
})
|
||||
.then(async () => {
|
||||
await exportOneTimeInventory(queryParams)
|
||||
})
|
||||
.catch()
|
||||
},
|
||||
|
||||
|
||||
// 盘点数据计算
|
||||
handlarAddQuantity() {
|
||||
this.$prompt('请输入变动数量', '盘点数变动', {
|
||||
|
||||
@@ -38,6 +38,9 @@
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" :disabled="multiple" icon="el-icon-delete" size="mini" @click="handleDelete">删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="info" icon="el-icon-upload2" size="mini" @click="handleImport">导入</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport">导出 </el-button>
|
||||
</el-col>
|
||||
@@ -45,7 +48,7 @@
|
||||
</el-row>
|
||||
<div style="display: flex; align-items: center; justify-content: center; margin-bottom: 10px">
|
||||
<span style="font-size: 18px; font-weight: 600">抛光仓库总零件数:{{ partTotal }}</span>
|
||||
<span style="font-size: 18px; font-weight: 600;margin-left: 20px;">当前查询结果零件数:{{ totalQuantity }}</span>
|
||||
<span style="font-size: 18px; font-weight: 600; margin-left: 20px">当前查询结果零件数:{{ totalQuantity }}</span>
|
||||
</div>
|
||||
<!-- 数据区域 -->
|
||||
<el-table :data="dataList" v-loading="loading" ref="table" border highlight-current-row @sort-change="sortChange" @selection-change="handleSelectionChange">
|
||||
@@ -60,7 +63,8 @@
|
||||
<el-table-column prop="description" label="产品描述" align="center" min-width="300" :show-overflow-tooltip="true" v-if="columns.showColumn('description')" />
|
||||
<el-table-column prop="color" label="颜色" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('color')" />
|
||||
<el-table-column prop="specification" label="规格" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('specification')" />
|
||||
<el-table-column prop="quantity" label="库存数量" align="center" v-if="columns.showColumn('quantity')" />
|
||||
<el-table-column prop="quantity" label="盘点库存" align="center" v-if="columns.showColumn('quantity')" />
|
||||
<el-table-column prop="realQuantity" label="实际库存" align="center" v-if="columns.showColumn('realQuantity')" />
|
||||
<el-table-column prop="maxNum" label="最大库存" align="center" v-if="columns.showColumn('maxNum')" />
|
||||
<el-table-column prop="minNum" label="最小库存" align="center" v-if="columns.showColumn('minNum')" />
|
||||
<el-table-column prop="warnNum" label="预警库存" align="center" v-if="columns.showColumn('warnNum')" />
|
||||
@@ -72,7 +76,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('remark')" />
|
||||
<el-table-column prop="createdBy" label="创建人" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('createdBy')" />
|
||||
<el-table-column prop="createdTime" label="创建时间" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('createdTime')" />
|
||||
<el-table-column prop="createdTime" label="盘点时间" align="center" width="160px" :show-overflow-tooltip="true" v-if="columns.showColumn('createdTime')" />
|
||||
<el-table-column prop="updatedBy" label="更新人" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('updatedBy')" />
|
||||
<el-table-column prop="updatedTime" label="更新时间" align="center" min-width="160px" :show-overflow-tooltip="true" v-if="columns.showColumn('updatedTime')" />
|
||||
<el-table-column label="操作" align="center" fixed="right" width="200">
|
||||
@@ -184,6 +188,34 @@
|
||||
</el-table>
|
||||
<pagination class="mt10" background :total="RecordTotal" :page.sync="RecordQueryParams.pageNum" :limit.sync="RecordQueryParams.pageSize" @pagination="getRecordList" />
|
||||
</el-dialog>
|
||||
<!-- 导入对话框 -->
|
||||
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
|
||||
<el-upload
|
||||
name="file"
|
||||
ref="upload"
|
||||
:limit="1"
|
||||
accept=".xlsx, .xls"
|
||||
:headers="upload.headers"
|
||||
:action="upload.url + '?updateSupport=' + upload.updateSupport"
|
||||
:disabled="upload.isUploading"
|
||||
:on-progress="handleFileUploadProgress"
|
||||
:on-success="handleFileSuccess"
|
||||
:auto-upload="false"
|
||||
drag
|
||||
>
|
||||
<i class="el-icon-upload"></i>
|
||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||
<div class="el-upload__tip text-center" slot="tip">
|
||||
<div class="el-upload__tip" slot="tip"><el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的数据</div>
|
||||
<span>仅允许导入xls、xlsx格式文件。</span>
|
||||
<el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline" @click="importTemplate">下载模板</el-link>
|
||||
</div>
|
||||
</el-upload>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
||||
<el-button @click="upload.open = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@@ -201,6 +233,7 @@ import {
|
||||
exportPolish,
|
||||
} from '@/api/wmsManagement/wmPolishInventory.js'
|
||||
import ThePartNumberSelect from './ThePartNumberSelect.vue'
|
||||
import { getToken } from '@/utils/auth'
|
||||
export default {
|
||||
name: 'wmpolishinventory',
|
||||
components: {
|
||||
@@ -251,6 +284,7 @@ export default {
|
||||
{ index: 2, key: 'color', label: `颜色`, checked: true },
|
||||
{ index: 2, key: 'specification', label: `规格`, checked: true },
|
||||
{ index: 3, key: 'quantity', label: `库存数量`, checked: true },
|
||||
|
||||
{ index: 4, key: 'maxNum', label: `最大库存`, checked: false },
|
||||
{ index: 5, key: 'minNum', label: `最小库存`, checked: false },
|
||||
{ index: 6, key: 'warnNum', label: `预警库存`, checked: false },
|
||||
@@ -258,9 +292,10 @@ export default {
|
||||
{ index: 8, key: 'status', label: `状态`, checked: true },
|
||||
{ index: 9, key: 'remark', label: `备注`, checked: false },
|
||||
{ index: 10, key: 'createdBy', label: `创建人`, checked: false },
|
||||
{ index: 11, key: 'createdTime', label: `创建时间`, checked: false },
|
||||
{ index: 11, key: 'createdTime', label: `盘点时间`, checked: true },
|
||||
{ index: 12, key: 'updatedBy', label: `更新人`, checked: false },
|
||||
{ index: 13, key: 'updatedTime', label: `更新时间`, checked: true },
|
||||
{ index: 13, key: 'updatedTime', label: `更新时间`, checked: false },
|
||||
{ index: 14, key: 'realQuantity', label: `实际库存`, checked: true },
|
||||
],
|
||||
// 类别(1-正常 2-返工件)选项列表 格式 eg:{ dictLabel: '标签', dictValue: '0'}
|
||||
typeOptions: [
|
||||
@@ -307,6 +342,21 @@ export default {
|
||||
{ dictLabel: '盘点', dictValue: 3 },
|
||||
// { dictLabel: '质检', dictValue: 4 },
|
||||
],
|
||||
// 导入参数
|
||||
upload: {
|
||||
// 是否显示弹出层(用户导入)
|
||||
open: false,
|
||||
// 弹出层标题(用户导入)
|
||||
title: '',
|
||||
// 是否禁用上传
|
||||
isUploading: false,
|
||||
// 是否更新已经存在的数据
|
||||
updateSupport: 0,
|
||||
// 设置上传的请求头部
|
||||
headers: { Authorization: 'Bearer ' + getToken() },
|
||||
// 上传的地址
|
||||
url: process.env.VUE_APP_BASE_API + '/system/user/importData',
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -523,7 +573,31 @@ export default {
|
||||
})
|
||||
.catch()
|
||||
},
|
||||
|
||||
// 导入按钮
|
||||
handleImport() {
|
||||
this.upload.title = '用户导入'
|
||||
this.upload.open = true
|
||||
},
|
||||
/** 下载模板操作 */
|
||||
importTemplate() {
|
||||
this.download('/system/user/importTemplate', '抛光数据导入模板')
|
||||
},
|
||||
// 文件上传中处理
|
||||
handleFileUploadProgress(event, file, fileList) {
|
||||
this.upload.isUploading = true
|
||||
},
|
||||
// 文件上传成功处理
|
||||
handleFileSuccess(response, file, fileList) {
|
||||
this.upload.open = false
|
||||
this.upload.isUploading = false
|
||||
this.$refs.upload.clearFiles()
|
||||
this.$alert(response.msg, '导入结果', { dangerouslyUseHTMLString: true })
|
||||
this.getList()
|
||||
},
|
||||
// 提交上传文件
|
||||
submitFileForm() {
|
||||
this.$refs.upload.submit()
|
||||
},
|
||||
// 类别(1-正常 2-返工件)字典翻译
|
||||
// typeFormat(row, column) {
|
||||
// return this.selectDictLabel(this.typeOptions, row.type)
|
||||
|
||||
Reference in New Issue
Block a user