抛光仓库功能
This commit is contained in:
@@ -76,4 +76,40 @@ export function doWmPolishWarehousing(data) {
|
||||
method: 'post',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 抛光库手动出库
|
||||
* @param data
|
||||
*/
|
||||
export function doWmPolishRetrieval(data) {
|
||||
return request({
|
||||
url: '/mes/wm/WmPolishInventory/doWmPolishRetrieval',
|
||||
method: 'post',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 抛光库盘点
|
||||
* @param data
|
||||
*/
|
||||
export function doWmPolishStocktaking(data) {
|
||||
return request({
|
||||
url: '/mes/wm/WmPolishInventory/doWmPolishStocktaking',
|
||||
method: 'post',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 抛光库操作记录
|
||||
* @param data
|
||||
*/
|
||||
export function getWmPolishRecordList(query) {
|
||||
return request({
|
||||
url: '/mes/wm/WmPolishRecord/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
8
src/views/wmsManagement/WmPolishInventory/PolishFQC.vue
Normal file
8
src/views/wmsManagement/WmPolishInventory/PolishFQC.vue
Normal file
@@ -0,0 +1,8 @@
|
||||
<template>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@@ -4,6 +4,7 @@
|
||||
style="width: 400px"
|
||||
@change="selectChange"
|
||||
v-bind="$attrs"
|
||||
v-on="$listeners"
|
||||
v-model="value"
|
||||
filterable
|
||||
remote
|
||||
@@ -20,6 +21,7 @@
|
||||
import { getMaterialSelectOption } from '@/api/wmsManagement/wmPolishInventory.js'
|
||||
export default {
|
||||
name: 'ThePartNumberSelect',
|
||||
inheritAttrs: false,
|
||||
data() {
|
||||
return {
|
||||
options: [],
|
||||
|
||||
@@ -44,34 +44,25 @@
|
||||
<!-- 工具区域 -->
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" v-hasPermi="['business:wmpolishinventory:add']" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
||||
>抛光零件入库</el-button
|
||||
>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
:disabled="single"
|
||||
v-hasPermi="['business:wmpolishinventory:edit']"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleUpdate"
|
||||
>修改基本数据</el-button
|
||||
@click="handlePolishWarehousing()"
|
||||
>抛光零件入库</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
:disabled="multiple"
|
||||
v-hasPermi="['business:wmpolishinventory:delete']"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
type="primary"
|
||||
v-hasPermi="['business:wmpolishinventory:edit']"
|
||||
icon="el-icon-minus"
|
||||
size="mini"
|
||||
@click="handleDelete"
|
||||
>删除</el-button
|
||||
@click="handlePolishRetrieval()"
|
||||
>抛光零件出库</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
</el-col>
|
||||
<right-toolbar :columns="columns" :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
@@ -89,7 +80,7 @@
|
||||
<el-table-column prop="id" label="主键" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('id')" />
|
||||
<el-table-column prop="blankNum" label="毛坯号" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('blankNum')" />
|
||||
<el-table-column
|
||||
min-width="160"
|
||||
min-width="200"
|
||||
prop="partnumber"
|
||||
label="零件号"
|
||||
align="center"
|
||||
@@ -97,14 +88,14 @@
|
||||
v-if="columns.showColumn('partnumber')"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-link type="primary" @click="handleShowInfo(scope.row)">{{scope.row.partnumber}}</el-link>
|
||||
<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="280"
|
||||
min-width="300"
|
||||
:show-overflow-tooltip="true"
|
||||
v-if="columns.showColumn('description')"
|
||||
/>
|
||||
@@ -154,10 +145,14 @@
|
||||
title="编辑"
|
||||
@click="handleUpdate(scope.row)"
|
||||
></el-button> -->
|
||||
<el-button size="mini" v-hasPermi="['business:wmpolishinventory:edit']" type="success" @click="handleShowInfo(scope.row)"
|
||||
<el-button size="mini" v-hasPermi="['business:wmpolishinventory:edit']" type="info" @click="handleShowInfo(scope.row)"
|
||||
>记录</el-button
|
||||
>
|
||||
<el-button size="mini" v-hasPermi="['business:wmpolishinventory:edit']" type="warning" @click="handleInventory(scope.row)"
|
||||
<el-button
|
||||
size="mini"
|
||||
v-hasPermi="['business:wmpolishinventory:edit']"
|
||||
type="warning"
|
||||
@click="handlePolishStocktaking(scope.row)"
|
||||
>盘点</el-button
|
||||
>
|
||||
<el-button
|
||||
@@ -180,18 +175,12 @@
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改工艺路线-抛光 库存表对话框 -->
|
||||
<!-- 入库,出库,盘点 -->
|
||||
<el-dialog :title="title" :lock-scroll="false" :visible.sync="open" @opened="dialogOpened">
|
||||
<el-form ref="form" :model="form" :rules="rules" :label-width="formLabelWidth">
|
||||
<el-row :gutter="20">
|
||||
<!-- <el-col :lg="12">
|
||||
<el-form-item label="毛坯号" prop="blankNum">
|
||||
<el-input v-model="form.blankNum" placeholder="请输入毛坯号" />
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
|
||||
<el-col :lg="24">
|
||||
<el-form-item label="物料搜索">
|
||||
<el-form-item label="零件搜索">
|
||||
<ThePartNumberSelect ref="ThePartNumberSelectRef" @selected="PartNumberSelect"></ThePartNumberSelect>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -201,32 +190,13 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12" v-if="opertype === 1">
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="库存数量" prop="quantity">
|
||||
<el-input-number v-model="form.quantity" :min="0" label="请输入库存数量"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!-- <el-col :lg="12">
|
||||
<el-form-item label="最大库存" prop="maxNum">
|
||||
<el-input v-model="form.maxNum" placeholder="请输入最大库存" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="最小库存" prop="minNum">
|
||||
<el-input v-model="form.minNum" placeholder="请输入最小库存" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="预警库存" prop="warnNum">
|
||||
<el-input v-model="form.warnNum" placeholder="请输入预警库存" />
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="类别" prop="type">
|
||||
<el-form-item label="零件类别" prop="type">
|
||||
<el-select v-model="form.type" placeholder="请选择类别">
|
||||
<el-option
|
||||
v-for="item in typeOptions"
|
||||
@@ -237,18 +207,8 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!-- <el-col :lg="12">
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio v-for="item in statusOptions" :key="item.dictValue" :label="parseInt(item.dictValue)">{{
|
||||
item.dictLabel
|
||||
}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="入库时间" prop="actionTime">
|
||||
<el-form-item label="操作时间" prop="actionTime">
|
||||
<el-date-picker
|
||||
v-model="form.actionTime"
|
||||
type="datetime"
|
||||
@@ -269,6 +229,56 @@
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 操作记录 -->
|
||||
<el-dialog :title="RecordTitle" :lock-scroll="false" :visible.sync="RecordOpen" @opened="RecordOpened" width="80%">
|
||||
<el-form :model="RecordQueryParams" size="small" label-position="right" inline ref="RecordQueryForm" @submit.native.prevent>
|
||||
<el-form-item label="开始时间" prop="startTime">
|
||||
<el-date-picker v-model="RecordQueryParams.startTime" type="datetime" :clearable="true" placeholder="开始时间"></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="截止时间" prop="endTime">
|
||||
<el-date-picker v-model="RecordQueryParams.endTime" type="datetime" :clearable="true" placeholder="截止时间"></el-date-picker>
|
||||
</el-form-item>
|
||||
<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-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="resetRecordQuery">搜索</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- 数据区域 -->
|
||||
<el-table :data="RecordDataList" v-loading="RecordLoading" border>
|
||||
<el-table-column prop="partnumber" min-width="180" label="零件号" align="center" :show-overflow-tooltip="true" />
|
||||
<el-table-column prop="changeType" label="变动类别" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag effect="plain" v-if="scope.row.changeType === 1" type="success">入库</el-tag>
|
||||
<el-tag effect="plain" v-if="scope.row.changeType === 2" type="danger">出库</el-tag>
|
||||
<el-tag effect="plain" v-if="scope.row.changeType === 3" type="warning">盘点</el-tag>
|
||||
<el-tag effect="plain" v-if="scope.row.changeType === 4" type="primary">检验</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="changeQuantity" label="变动数量" align="center" />
|
||||
<el-table-column prop="actionTime" min-width="160" label="操作时间" align="center" :show-overflow-tooltip="true" />
|
||||
<el-table-column prop="remark" min-width="300" label="备注" align="center" :show-overflow-tooltip="true" />
|
||||
<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"
|
||||
/>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@@ -279,6 +289,9 @@ import {
|
||||
updateWmPolishInventory,
|
||||
getWmPolishInventory,
|
||||
doWmPolishWarehousing,
|
||||
doWmPolishRetrieval,
|
||||
doWmPolishStocktaking,
|
||||
getWmPolishRecordList,
|
||||
} from '@/api/wmsManagement/wmPolishInventory.js'
|
||||
import ThePartNumberSelect from './ThePartNumberSelect.vue'
|
||||
export default {
|
||||
@@ -311,7 +324,7 @@ export default {
|
||||
},
|
||||
// 弹出层标题
|
||||
title: '',
|
||||
// 操作类型 1、add 2、edit
|
||||
// 操作类型 1、入库 2、出库 3.盘点
|
||||
opertype: 0,
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
@@ -319,6 +332,7 @@ export default {
|
||||
form: {
|
||||
type: 1,
|
||||
status: 1,
|
||||
partnumber: '',
|
||||
actionTime: new Date(),
|
||||
},
|
||||
columns: [
|
||||
@@ -359,6 +373,28 @@ export default {
|
||||
quantity: [{ required: true, message: '库存数量不能为空', trigger: 'blur' }],
|
||||
},
|
||||
ThePartNumberSelectRef: null,
|
||||
|
||||
// 详情
|
||||
RecordLoading: false,
|
||||
RecordTitle: '',
|
||||
RecordOpen: false,
|
||||
RecordDataList: [],
|
||||
RecordTotal: 0,
|
||||
RecordQueryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
fkInventoryId: '',
|
||||
status: 1,
|
||||
changeType: -1,
|
||||
sort: 'updatedTime',
|
||||
sortType: 'desc',
|
||||
},
|
||||
RecordTypeOptions: [
|
||||
{ dictLabel: '入库', dictValue: 1 },
|
||||
{ dictLabel: '出库', dictValue: 2 },
|
||||
{ dictLabel: '盘点', dictValue: 3 },
|
||||
{ dictLabel: '质检', dictValue: 4 },
|
||||
],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -434,30 +470,6 @@ export default {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset()
|
||||
this.open = true
|
||||
this.title = '抛光零件入库'
|
||||
this.opertype = 1
|
||||
},
|
||||
dialogOpened() {
|
||||
this.$refs.ThePartNumberSelectRef.init()
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const Ids = row.id || this.ids
|
||||
|
||||
this.$confirm('是否确认删除数据项?')
|
||||
.then(function () {
|
||||
return delWmPolishInventory(Ids)
|
||||
})
|
||||
.then(() => {
|
||||
this.handleQuery()
|
||||
this.msgSuccess('删除成功')
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset()
|
||||
@@ -475,6 +487,86 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const Ids = row.id || this.ids
|
||||
|
||||
this.$confirm('是否确认删除数据项?')
|
||||
.then(function () {
|
||||
return delWmPolishInventory(Ids)
|
||||
})
|
||||
.then(() => {
|
||||
this.handleQuery()
|
||||
this.msgSuccess('删除成功')
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
// 弹窗打开
|
||||
dialogOpened() {
|
||||
this.$refs.ThePartNumberSelectRef.init()
|
||||
},
|
||||
// 仓库操作=====================================================
|
||||
/** 入库操作 */
|
||||
handlePolishWarehousing() {
|
||||
this.reset()
|
||||
this.open = true
|
||||
this.title = '抛光零件入库'
|
||||
this.opertype = 1
|
||||
this.form.id = null
|
||||
},
|
||||
/** 出库操作 */
|
||||
handlePolishRetrieval() {
|
||||
this.reset()
|
||||
this.open = true
|
||||
this.title = '抛光零件出库'
|
||||
this.opertype = 2
|
||||
this.form.id = null
|
||||
},
|
||||
/** 盘点操作 */
|
||||
handlePolishStocktaking(row = null) {
|
||||
this.reset()
|
||||
this.open = true
|
||||
this.title = `零件号:${row.partnumber} 盘点`
|
||||
this.opertype = 3
|
||||
this.form.id = row.id
|
||||
this.form.partnumber = row.partnumber
|
||||
this.form.type = row.type
|
||||
this.form.quantity = row.quantity
|
||||
},
|
||||
PartNumberSelect(value) {
|
||||
this.form.partnumber = value
|
||||
},
|
||||
handleShowInfo(row) {
|
||||
this.RecordDataList = []
|
||||
this.RecordTotal = 0
|
||||
this.RecordTitle = `零件号:${row.partnumber} 仓库操作记录`
|
||||
this.RecordOpen = true
|
||||
this.RecordQueryParams.fkInventoryId = row.id
|
||||
},
|
||||
// 详情
|
||||
RecordOpened() {
|
||||
this.resetRecordQuery()
|
||||
},
|
||||
// 查询记录数据
|
||||
resetRecordQuery() {
|
||||
this.RecordQueryParams.pageNum = 1
|
||||
this.RecordQueryParams.changeType = -1
|
||||
this.RecordQueryParams.startTime = null
|
||||
this.RecordQueryParams.endTime = null
|
||||
this.getRecordList()
|
||||
},
|
||||
getRecordList() {
|
||||
this.RecordLoading = true
|
||||
getWmPolishRecordList(this.RecordQueryParams).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.RecordDataList = res.data.result
|
||||
this.RecordTotal = res.data.totalNum
|
||||
this.RecordLoading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
// 仓库操作=====================================================
|
||||
|
||||
// 类别(1-正常 2-返工件)字典翻译
|
||||
// typeFormat(row, column) {
|
||||
// return this.selectDictLabel(this.typeOptions, row.type)
|
||||
@@ -487,22 +579,34 @@ export default {
|
||||
submitForm: function () {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
console.log(JSON.stringify(this.form))
|
||||
|
||||
if (this.form.id != undefined && this.opertype === 2) {
|
||||
updateWmPolishInventory(this.form)
|
||||
const _opertype = this.opertype
|
||||
if (_opertype === 1) {
|
||||
this.form.remark = '手动入库 ' + this.form.remark;
|
||||
doWmPolishWarehousing(this.form)
|
||||
.then((res) => {
|
||||
this.msgSuccess('修改成功')
|
||||
this.msgSuccess('入库成功')
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
.catch((err) => {
|
||||
//TODO 错误逻辑
|
||||
})
|
||||
} else {
|
||||
doWmPolishWarehousing(this.form)
|
||||
} else if (_opertype === 2) {
|
||||
this.form.remark = '手动出库 ' + this.form.remark;
|
||||
doWmPolishRetrieval(this.form)
|
||||
.then((res) => {
|
||||
this.msgSuccess('入库成功')
|
||||
this.msgSuccess('出库成功')
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
.catch((err) => {
|
||||
//TODO 错误逻辑
|
||||
})
|
||||
} else if (_opertype === 3) {
|
||||
this.form.remark = '手动盘点 ' + this.form.remark;
|
||||
doWmPolishStocktaking(this.form)
|
||||
.then((res) => {
|
||||
this.msgSuccess('盘点成功')
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
@@ -513,11 +617,6 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
PartNumberSelect(value) {
|
||||
this.form.partnumber = value
|
||||
},
|
||||
handleShowInfo(row) {},
|
||||
handleInventory(row) {},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user