Merge pull request '修改仓库UI测试bug' (#106) from projects/mes-zwq into projects/mes-test

Reviewed-on: #106
This commit is contained in:
朱文强 2023-11-23 16:42:37 +08:00
commit 2eb1afe9b2
59 changed files with 472 additions and 522 deletions

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 13:52:10 * @Date: 2023-08-01 13:52:10
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-20 15:54:28 * @LastEditTime: 2023-11-23 15:27:55
* @Description: * @Description:
--> -->
<template> <template>
@ -12,7 +12,8 @@
ref="dataForm" ref="dataForm"
v-if="visible" v-if="visible"
@keyup.enter.native="dataFormSubmit()" @keyup.enter.native="dataFormSubmit()"
label-width="100px"> label-width="100px"
label-position="top">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="物品名称" prop="name"> <el-form-item label="物品名称" prop="name">
@ -60,6 +61,7 @@
:min="0" :min="0"
v-model="dataForm.dailyUse" v-model="dataForm.dailyUse"
clearable clearable
style="width: 100%;"
placeholder="请输入单日消耗量" /> placeholder="请输入单日消耗量" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -69,6 +71,7 @@
:min="0" :min="0"
v-model="dataForm.allowTime" v-model="dataForm.allowTime"
clearable clearable
style="width: 90%;"
placeholder="请输入允许留存时间" /> () placeholder="请输入允许留存时间" /> ()
</el-form-item> </el-form-item>
</el-col> </el-col>

View File

@ -75,6 +75,7 @@ const tableProps = [
{ {
prop: 'allowTime', prop: 'allowTime',
label: '允许留存时长(天)', label: '允许留存时长(天)',
width: 150
}, },
{ {
prop: 'dailyUse', prop: 'dailyUse',
@ -127,7 +128,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },

View File

@ -14,13 +14,6 @@
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:table-data="tableData"> :table-data="tableData">
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="100"
label="库位详情"
:method-list="tableBtn"
@clickBtn="handleClick" />
</base-table> </base-table>
<pagination <pagination
:limit.sync="listQuery.pageSize" :limit.sync="listQuery.pageSize"
@ -76,7 +69,7 @@ const tableProps = [
prop: 'operateTime', prop: 'operateTime',
label: '操作时间', label: '操作时间',
filter: parseTime, filter: parseTime,
minWidth: 150, minWidth: 100,
}, },
{ {
prop: 'operator', prop: 'operator',
@ -96,14 +89,6 @@ export default {
}, },
tableData: [], tableData: [],
tableProps, tableProps,
tableBtn: [
this.$auth.hasPermi(`end-material:warehouse-realtime-location-his:query`)
? {
type: 'info',
btnName: '详情',
}
: undefined,
].filter((v) => v),
drawerVisible: false, drawerVisible: false,
formConfig: [ formConfig: [
{ {
@ -143,7 +128,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-11-18 14:16:25 * @Date: 2021-11-18 14:16:25
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-03 16:20:19 * @LastEditTime: 2023-11-23 16:09:20
* @Description: * @Description:
--> -->
<template> <template>
@ -11,7 +11,10 @@
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:height="300" :height="300"
:table-data="tableData" /> :table-data="tableData"
v-if="tableData.length" />
<!-- 没有数据 -->
<div class="no-data-bg" v-else></div>
</template> </template>
<script> <script>
@ -22,37 +25,31 @@ const tableProps = [
{ {
prop: 'name', prop: 'name',
label: '物品名称', label: '物品名称',
align: 'center',
}, },
{ {
prop: 'code', prop: 'code',
label: '物品编码', label: '物品编码',
align: 'center',
}, },
{ {
prop: 'spec', prop: 'spec',
label: '物品规格', label: '物品规格',
align: 'center',
}, },
{ {
prop: 'batchCode', prop: 'batchCode',
label: '物品批次', label: '物品批次',
align: 'center',
}, },
{ {
prop: 'num', prop: 'num',
label: '数量', label: '数量',
align: 'center',
}, },
{ {
prop: 'allowTime', prop: 'allowTime',
label: '允许留存时长(天)', label: '允许留存时长(天)',
align: 'center', width: 150
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注',
align: 'center',
}, },
]; ];
export default { export default {

View File

@ -92,7 +92,7 @@ const tableProps = [
prop: 'createTime', prop: 'createTime',
label: '操作时间', label: '操作时间',
filter: parseTime, filter: parseTime,
minWidth: 150, minWidth: 100,
}, },
{ {
prop: 'creator', prop: 'creator',
@ -115,7 +115,7 @@ export default {
tableBtn: [ tableBtn: [
this.$auth.hasPermi(`end-material:warehouse-location-his:query`) this.$auth.hasPermi(`end-material:warehouse-location-his:query`)
? { ? {
type: 'info', type: 'detail',
btnName: '详情', btnName: '详情',
} }
: undefined, : undefined,
@ -159,7 +159,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
@ -205,7 +205,7 @@ export default {
} }
}, },
otherMethods(val) { otherMethods(val) {
if (val.type === 'info') { if (val.type === 'detail') {
this.addOrUpdateVisible = true; this.addOrUpdateVisible = true;
this.addOrEditTitle = val.data.name + ' -产品信息'; this.addOrEditTitle = val.data.name + ' -产品信息';
this.$nextTick(() => { this.$nextTick(() => {

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 13:52:10 * @Date: 2023-08-01 13:52:10
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-20 15:14:18 * @LastEditTime: 2023-11-23 15:54:25
* @Description: * @Description:
--> -->
<template> <template>
@ -68,6 +68,7 @@
v-model="dataForm.goodsBatch" v-model="dataForm.goodsBatch"
filterable filterable
clearable clearable
style="width:100%"
placeholder="请选择物品名称"> placeholder="请选择物品名称">
<el-option <el-option
v-for="(item, index) in Batch" v-for="(item, index) in Batch"
@ -83,6 +84,7 @@
v-model="dataForm.numDet" v-model="dataForm.numDet"
clearable clearable
:min="0" :min="0"
style="width:100%"
placeholder="请输入数量" /> placeholder="请输入数量" />
</el-form-item> </el-form-item>
</el-col> </el-col>

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-11-03 16:37:06 * @Date: 2023-11-03 16:37:06
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-04 16:33:02 * @LastEditTime: 2023-11-23 15:54:31
* @Description: * @Description:
--> -->
<template> <template>
@ -67,7 +67,7 @@
@cancel="handleCancel" @cancel="handleCancel"
@confirm="handleConfirm" @confirm="handleConfirm"
:before-close="handleCancel" :before-close="handleCancel"
width="50%"> width="40%">
<add-or-update <add-or-update
ref="addOrUpdate" ref="addOrUpdate"
@refreshDataList="successSubmit"></add-or-update> @refreshDataList="successSubmit"></add-or-update>
@ -131,15 +131,18 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
{
type: 'separate',
},
{ {
type: this.$auth.hasPermi('end-material:warehouse-realtime:create') ? 'button' : '', type: this.$auth.hasPermi('end-material:warehouse-realtime:create') ? 'button' : '',
btnName: '入库', btnName: '入库',
name: 'add', name: 'add',
color: 'success', color: 'primary',
plain: true, plain: true,
}, },
], ],

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-11-18 14:16:25 * @Date: 2021-11-18 14:16:25
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-03 14:51:33 * @LastEditTime: 2023-11-23 16:08:09
* @Description: * @Description:
--> -->
<template> <template>
@ -11,7 +11,10 @@
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:height="300" :height="300"
:table-data="tableData" /> :table-data="tableData"
v-if="tableData.length" />
<!-- 没有数据 -->
<div class="no-data-bg" v-else></div>
</template> </template>
<script> <script>
@ -22,48 +25,41 @@ const tableProps = [
{ {
prop: 'name', prop: 'name',
label: '物品名称', label: '物品名称',
align: 'center',
}, },
{ {
prop: 'code', prop: 'code',
label: '物品编码', label: '物品编码',
align: 'center',
}, },
{ {
prop: 'spec', prop: 'spec',
label: '物品规格', label: '物品规格',
align: 'center',
}, },
{ {
prop: 'goodsBatch', prop: 'goodsBatch',
label: '物品批次', label: '物品批次',
align: 'center',
}, },
{ {
prop: 'num', prop: 'num',
label: '数量', label: '数量',
align: 'center',
}, },
{ {
prop: 'allowTime', prop: 'allowTime',
label: '允许留存时长(天)', label: '允许留存时长(天)',
align: 'center', width: 150
}, },
{ {
prop: 'inTime', prop: 'inTime',
label: '入库时间', label: '入库时间',
align: 'center',
filter: parseTime, filter: parseTime,
}, },
{ {
prop: 'leftTime', prop: 'leftTime',
label: '剩余留存时长(天)', label: '剩余留存时长(天)',
align: 'center', width: 150
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注',
align: 'center',
}, },
]; ];
export default { export default {

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
:visible.sync="visible" :visible.sync="visible"
:width="'35%'" :width="'30%'"
:append-to-body="true" :append-to-body="true"
:close-on-click-modal="false" :close-on-click-modal="false"
class="dialog"> class="dialog">
@ -22,7 +22,7 @@
<el-form-item label="产品" prop="productInfo"> <el-form-item label="产品" prop="productInfo">
<el-select <el-select
v-model="dataForm.productInfo" v-model="dataForm.productInfo"
style="width: 100%" style="width: 60%"
filterable filterable
value-key="id" value-key="id"
placeholder="请选择产品"> placeholder="请选择产品">
@ -79,7 +79,7 @@ export default {
// //
dataFormSubmit() { dataFormSubmit() {
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (this.dataForm.productInfo) {
this.dataForm.productInfo.goodsId = this.dataForm.productInfo.id this.dataForm.productInfo.goodsId = this.dataForm.productInfo.id
this.dataForm.productInfo.remark = '' this.dataForm.productInfo.remark = ''
// //
@ -91,6 +91,8 @@ export default {
// //
this.visible = false; this.visible = false;
this.$emit('refreshDataList', this.dataForm); this.$emit('refreshDataList', this.dataForm);
} else {
this.$modal.msgWarning('请选择产品');
} }
}); });
}, },

View File

@ -20,9 +20,7 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="库位名称" prop="name"> <el-form-item label="库位名称" prop="name">
<el-input <el-input v-model="dataForm.name" disabled />
v-model="dataForm.name"
disabled />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -47,15 +45,20 @@
</small-title> </small-title>
<div class="attr-list"> <div class="attr-list">
<div style="position: absolute; top: -40px; right: 15px">
<el-button @click="addNew" type="text">
<i class="el-icon-plus"></i>
新增
</el-button>
</div>
<base-table <base-table
:table-props="tableProps" :table-props="tableProps"
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:add-button-show="addButtonShow"
@emitButtonClick="addNew"
@emitFun="inputChange" @emitFun="inputChange"
:height="400" :height="400"
:table-data="productAttributeList"> :table-data="productAttributeList"
v-if="productAttributeList.length">
<method-btn <method-btn
slot="handleBtn" slot="handleBtn"
:width="70" :width="70"
@ -63,6 +66,8 @@
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleClick" /> @clickBtn="handleClick" />
</base-table> </base-table>
<!-- 没有数据 -->
<div class="no-data-bg" v-else></div>
</div> </div>
</div> </div>
</div> </div>
@ -85,8 +90,10 @@
import productAttrAdd from './attr-add'; import productAttrAdd from './attr-add';
import inputArea from '../../mixins/inputArea'; import inputArea from '../../mixins/inputArea';
import SmallTitle from './SmallTitle'; import SmallTitle from './SmallTitle';
import { inWarehouseRealtimeLocation, import {
getWarehouseRealtimeLocation } from '@/api/warehouse/warehouseRealtimeLocation'; inWarehouseRealtimeLocation,
getWarehouseRealtimeLocation,
} from '@/api/warehouse/warehouseRealtimeLocation';
const tableBtn = [ const tableBtn = [
{ {
@ -99,36 +106,30 @@ const tableProps = [
{ {
prop: 'name', prop: 'name',
label: '物品名称', label: '物品名称',
align: 'center',
}, },
{ {
prop: 'code', prop: 'code',
label: '物品编码', label: '物品编码',
align: 'center',
}, },
{ {
prop: 'spec', prop: 'spec',
label: '物品规格', label: '物品规格',
align: 'center',
}, },
{ {
prop: 'goodsBatch', prop: 'goodsBatch',
label: '物品批次', label: '物品批次',
align: 'center',
subcomponent: inputArea, subcomponent: inputArea,
width: 100, width: 100,
}, },
{ {
prop: 'num', prop: 'num',
label: '数量', label: '数量',
align: 'center',
subcomponent: inputArea, subcomponent: inputArea,
width: 100, width: 100,
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注',
align: 'center',
subcomponent: inputArea, subcomponent: inputArea,
width: 100, width: 100,
}, },
@ -143,7 +144,6 @@ export default {
tableBtn, tableBtn,
tableProps, tableProps,
productAttributeList: [], productAttributeList: [],
addButtonShow: '新增',
operator: '', operator: '',
dataForm: { dataForm: {
id: null, id: null,
@ -171,7 +171,7 @@ export default {
this.productAttributeList.splice(0); this.productAttributeList.splice(0);
}, },
init(val, nickname) { init(val, nickname) {
this.operator = nickname this.operator = nickname;
this.dataForm.id = val.id; this.dataForm.id = val.id;
this.dataForm.name = val.name; this.dataForm.name = val.name;
this.dataForm.palletCode = val.palletCode; this.dataForm.palletCode = val.palletCode;
@ -213,12 +213,8 @@ export default {
handleClick(raw) { handleClick(raw) {
if (raw.type === 'delete') { if (raw.type === 'delete') {
this.$confirm( this.$confirm(
`确定对${ `是否确认删除名称为"${raw.data.name}"的数据项?`,
raw.data.name '系统提示',
? '[名称=' + raw.data.name + ']'
: '[序号=' + raw.data._pageIndex + ']'
}进行删除操作?`,
'提示',
{ {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
@ -242,8 +238,8 @@ export default {
realtimeLocationId: this.dataForm.id, realtimeLocationId: this.dataForm.id,
palletCode: this.dataForm.palletCode, palletCode: this.dataForm.palletCode,
operator: this.operator, operator: this.operator,
goodsInfos: this.productAttributeList goodsInfos: this.productAttributeList,
} };
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
// //
@ -313,5 +309,6 @@ export default {
.drawer >>> .el-form, .drawer >>> .el-form,
.drawer >>> .attr-list { .drawer >>> .attr-list {
padding: 0 16px; padding: 0 16px;
position: relative;
} }
</style> </style>

View File

@ -100,7 +100,7 @@ const tableProps = [
prop: 'inTime', prop: 'inTime',
label: '入库时间', label: '入库时间',
filter: parseTime, filter: parseTime,
minWidth: 150, minWidth: 100,
}, },
{ {
prop: 'remark', prop: 'remark',
@ -125,12 +125,6 @@ export default {
tableData: [], tableData: [],
tableProps, tableProps,
tableBtn: [ tableBtn: [
this.$auth.hasPermi(`end-material:warehouse-realtime-location:query`)
? {
type: 'info',
btnName: '详情',
}
: undefined,
this.$auth.hasPermi(`end-material:warehouse-realtime-location:query`) this.$auth.hasPermi(`end-material:warehouse-realtime-location:query`)
? { ? {
type: 'out', type: 'out',
@ -143,6 +137,12 @@ export default {
btnName: '入库', btnName: '入库',
} }
: undefined, : undefined,
this.$auth.hasPermi(`end-material:warehouse-realtime-location:query`)
? {
type: 'detail',
btnName: '详情',
}
: undefined,
].filter((v) => v), ].filter((v) => v),
drawerVisible: false, drawerVisible: false,
formConfig: [ formConfig: [
@ -183,7 +183,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
@ -262,7 +262,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.drawerRef.init(val.data, this.nickname); this.$refs.drawerRef.init(val.data, this.nickname);
}); });
} else if (val.type === 'info') { } else if (val.type === 'detail') {
this.addOrUpdateVisible = true; this.addOrUpdateVisible = true;
this.addOrEditTitle = val.data.name + ' -产品信息'; this.addOrEditTitle = val.data.name + ' -产品信息';
this.$nextTick(() => { this.$nextTick(() => {

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2022-08-24 11:19:43 * @Date: 2022-08-24 11:19:43
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-14 15:59:53 * @LastEditTime: 2023-11-21 10:37:05
* @Description: * @Description:
*/ */
export default { export default {
@ -104,7 +104,7 @@ export default {
}, },
// 删除 // 删除
deleteHandle(id, name, index) { deleteHandle(id, name, index) {
this.$confirm(`确定对${name ? '[名称=' + name + ']' : '[序号=' + index + ']'}进行删除操作?`, "提示", { this.$confirm(`是否确认删除${name ? '名称为"' + name + '"' : '序号为"' + index + '"'}的数据项?`, "系统提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 13:52:10 * @Date: 2023-08-01 13:52:10
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-20 15:54:39 * @LastEditTime: 2023-11-23 15:27:47
* @Description: * @Description:
--> -->
<template> <template>
@ -12,7 +12,8 @@
ref="dataForm" ref="dataForm"
v-if="visible" v-if="visible"
@keyup.enter.native="dataFormSubmit()" @keyup.enter.native="dataFormSubmit()"
label-width="100px"> label-width="100px"
label-position="top">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="物品名称" prop="name"> <el-form-item label="物品名称" prop="name">
@ -60,6 +61,7 @@
:min="0" :min="0"
v-model="dataForm.dailyUse" v-model="dataForm.dailyUse"
clearable clearable
style="width: 100%;"
placeholder="请输入单日消耗量" /> placeholder="请输入单日消耗量" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -69,6 +71,7 @@
:min="0" :min="0"
v-model="dataForm.allowTime" v-model="dataForm.allowTime"
clearable clearable
style="width: 90%;"
placeholder="请输入允许留存时间" /> () placeholder="请输入允许留存时间" /> ()
</el-form-item> </el-form-item>
</el-col> </el-col>

View File

@ -75,6 +75,7 @@ const tableProps = [
{ {
prop: 'allowTime', prop: 'allowTime',
label: '允许留存时长(天)', label: '允许留存时长(天)',
width: 150
}, },
{ {
prop: 'dailyUse', prop: 'dailyUse',
@ -127,7 +128,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },

View File

@ -14,13 +14,6 @@
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:table-data="tableData"> :table-data="tableData">
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="100"
label="库位详情"
:method-list="tableBtn"
@clickBtn="handleClick" />
</base-table> </base-table>
<pagination <pagination
:limit.sync="listQuery.pageSize" :limit.sync="listQuery.pageSize"
@ -76,7 +69,7 @@ const tableProps = [
prop: 'operateTime', prop: 'operateTime',
label: '操作时间', label: '操作时间',
filter: parseTime, filter: parseTime,
minWidth: 150, minWidth: 100,
}, },
{ {
prop: 'operator', prop: 'operator',
@ -96,14 +89,6 @@ export default {
}, },
tableData: [], tableData: [],
tableProps, tableProps,
tableBtn: [
this.$auth.hasPermi(`out-material:warehouse-realtime-location-his:query`)
? {
type: 'info',
btnName: '详情',
}
: undefined,
].filter((v) => v),
drawerVisible: false, drawerVisible: false,
formConfig: [ formConfig: [
{ {
@ -143,7 +128,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-11-18 14:16:25 * @Date: 2021-11-18 14:16:25
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-03 16:20:19 * @LastEditTime: 2023-11-23 16:09:04
* @Description: * @Description:
--> -->
<template> <template>
@ -11,7 +11,10 @@
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:height="300" :height="300"
:table-data="tableData" /> :table-data="tableData"
v-if="tableData.length" />
<!-- 没有数据 -->
<div class="no-data-bg" v-else></div>
</template> </template>
<script> <script>
@ -22,37 +25,31 @@ const tableProps = [
{ {
prop: 'name', prop: 'name',
label: '物品名称', label: '物品名称',
align: 'center',
}, },
{ {
prop: 'code', prop: 'code',
label: '物品编码', label: '物品编码',
align: 'center',
}, },
{ {
prop: 'spec', prop: 'spec',
label: '物品规格', label: '物品规格',
align: 'center',
}, },
{ {
prop: 'batchCode', prop: 'batchCode',
label: '物品批次', label: '物品批次',
align: 'center',
}, },
{ {
prop: 'num', prop: 'num',
label: '数量', label: '数量',
align: 'center',
}, },
{ {
prop: 'allowTime', prop: 'allowTime',
label: '允许留存时长(天)', label: '允许留存时长(天)',
align: 'center', width: 150
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注',
align: 'center',
}, },
]; ];
export default { export default {

View File

@ -92,7 +92,7 @@ const tableProps = [
prop: 'createTime', prop: 'createTime',
label: '操作时间', label: '操作时间',
filter: parseTime, filter: parseTime,
minWidth: 150, minWidth: 100,
}, },
{ {
prop: 'creator', prop: 'creator',
@ -115,7 +115,7 @@ export default {
tableBtn: [ tableBtn: [
this.$auth.hasPermi(`out-material:warehouse-location-his:query`) this.$auth.hasPermi(`out-material:warehouse-location-his:query`)
? { ? {
type: 'info', type: 'detail',
btnName: '详情', btnName: '详情',
} }
: undefined, : undefined,
@ -159,7 +159,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
@ -205,7 +205,7 @@ export default {
} }
}, },
otherMethods(val) { otherMethods(val) {
if (val.type === 'info') { if (val.type === 'detail') {
this.addOrUpdateVisible = true; this.addOrUpdateVisible = true;
this.addOrEditTitle = val.data.name + ' -产品信息'; this.addOrEditTitle = val.data.name + ' -产品信息';
this.$nextTick(() => { this.$nextTick(() => {

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 13:52:10 * @Date: 2023-08-01 13:52:10
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-20 15:14:00 * @LastEditTime: 2023-11-23 15:54:07
* @Description: * @Description:
--> -->
<template> <template>
@ -68,6 +68,7 @@
v-model="dataForm.goodsBatch" v-model="dataForm.goodsBatch"
filterable filterable
clearable clearable
style="width:100%"
placeholder="请选择物品名称"> placeholder="请选择物品名称">
<el-option <el-option
v-for="(item, index) in Batch" v-for="(item, index) in Batch"
@ -83,6 +84,7 @@
v-model="dataForm.numDet" v-model="dataForm.numDet"
clearable clearable
:min="0" :min="0"
style="width:100%"
placeholder="请输入数量" /> placeholder="请输入数量" />
</el-form-item> </el-form-item>
</el-col> </el-col>

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-11-03 16:37:06 * @Date: 2023-11-03 16:37:06
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-04 16:14:09 * @LastEditTime: 2023-11-23 15:54:14
* @Description: * @Description:
--> -->
<template> <template>
@ -67,7 +67,7 @@
@cancel="handleCancel" @cancel="handleCancel"
@confirm="handleConfirm" @confirm="handleConfirm"
:before-close="handleCancel" :before-close="handleCancel"
width="50%"> width="40%">
<add-or-update <add-or-update
ref="addOrUpdate" ref="addOrUpdate"
@refreshDataList="successSubmit"></add-or-update> @refreshDataList="successSubmit"></add-or-update>
@ -131,15 +131,18 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
{
type: 'separate',
},
{ {
type: this.$auth.hasPermi('out-material:warehouse-realtime:create') ? 'button' : '', type: this.$auth.hasPermi('out-material:warehouse-realtime:create') ? 'button' : '',
btnName: '入库', btnName: '入库',
name: 'add', name: 'add',
color: 'success', color: 'primary',
plain: true, plain: true,
}, },
], ],

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-11-18 14:16:25 * @Date: 2021-11-18 14:16:25
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-03 14:51:33 * @LastEditTime: 2023-11-23 16:07:43
* @Description: * @Description:
--> -->
<template> <template>
@ -11,7 +11,10 @@
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:height="300" :height="300"
:table-data="tableData" /> :table-data="tableData"
v-if="tableData.length" />
<!-- 没有数据 -->
<div class="no-data-bg" v-else></div>
</template> </template>
<script> <script>
@ -22,48 +25,41 @@ const tableProps = [
{ {
prop: 'name', prop: 'name',
label: '物品名称', label: '物品名称',
align: 'center',
}, },
{ {
prop: 'code', prop: 'code',
label: '物品编码', label: '物品编码',
align: 'center',
}, },
{ {
prop: 'spec', prop: 'spec',
label: '物品规格', label: '物品规格',
align: 'center',
}, },
{ {
prop: 'goodsBatch', prop: 'goodsBatch',
label: '物品批次', label: '物品批次',
align: 'center',
}, },
{ {
prop: 'num', prop: 'num',
label: '数量', label: '数量',
align: 'center',
}, },
{ {
prop: 'allowTime', prop: 'allowTime',
label: '允许留存时长(天)', label: '允许留存时长(天)',
align: 'center', width: 150,
}, },
{ {
prop: 'inTime', prop: 'inTime',
label: '入库时间', label: '入库时间',
align: 'center',
filter: parseTime, filter: parseTime,
}, },
{ {
prop: 'leftTime', prop: 'leftTime',
label: '剩余留存时长(天)', label: '剩余留存时长(天)',
align: 'center', width: 150,
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注',
align: 'center',
}, },
]; ];
export default { export default {

View File

@ -1,15 +1,13 @@
<template> <template>
<el-dialog <el-dialog
:visible.sync="visible" :visible.sync="visible"
:width="'35%'" :width="'30%'"
:append-to-body="true" :append-to-body="true"
:close-on-click-modal="false" :close-on-click-modal="false"
class="dialog"> class="dialog">
<template #title> <template #title>
<slot name="title"> <slot name="title">
<div class="titleStyle"> <div class="titleStyle">新增产品</div>
新增产品
</div>
</slot> </slot>
</template> </template>
@ -22,7 +20,7 @@
<el-form-item label="产品" prop="productInfo"> <el-form-item label="产品" prop="productInfo">
<el-select <el-select
v-model="dataForm.productInfo" v-model="dataForm.productInfo"
style="width: 100%" style="width: 60%"
filterable filterable
value-key="id" value-key="id"
placeholder="请选择产品"> placeholder="请选择产品">
@ -44,10 +42,7 @@
</template> </template>
<script> <script>
import { getListByType } from '@/api/warehouse/warehouseGoods';
import {
getListByType
} from "@/api/warehouse/warehouseGoods";
export default { export default {
data() { data() {
@ -59,7 +54,9 @@ export default {
}, },
productArr: [], productArr: [],
dataRule: { dataRule: {
productId: [{ required: true, message: '产品不能为空', trigger: 'blur' }], productId: [
{ required: true, message: '产品不能为空', trigger: 'blur' },
],
}, },
}; };
}, },
@ -79,9 +76,9 @@ export default {
// //
dataFormSubmit() { dataFormSubmit() {
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (this.dataForm.productInfo) {
this.dataForm.productInfo.goodsId = this.dataForm.productInfo.id this.dataForm.productInfo.goodsId = this.dataForm.productInfo.id;
this.dataForm.productInfo.remark = '' this.dataForm.productInfo.remark = '';
// //
if (this.dataForm.index >= 0) { if (this.dataForm.index >= 0) {
this.visible = false; this.visible = false;
@ -91,6 +88,8 @@ export default {
// //
this.visible = false; this.visible = false;
this.$emit('refreshDataList', this.dataForm); this.$emit('refreshDataList', this.dataForm);
} else {
this.$modal.msgWarning('请选择产品');
} }
}); });
}, },

View File

@ -20,9 +20,7 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="库位名称" prop="name"> <el-form-item label="库位名称" prop="name">
<el-input <el-input v-model="dataForm.name" disabled />
v-model="dataForm.name"
disabled />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -47,15 +45,20 @@
</small-title> </small-title>
<div class="attr-list"> <div class="attr-list">
<div style="position: absolute; top: -40px; right: 15px">
<el-button @click="addNew" type="text">
<i class="el-icon-plus"></i>
新增
</el-button>
</div>
<base-table <base-table
:table-props="tableProps" :table-props="tableProps"
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:add-button-show="addButtonShow"
@emitButtonClick="addNew"
@emitFun="inputChange" @emitFun="inputChange"
:height="400" :height="400"
:table-data="productAttributeList"> :table-data="productAttributeList"
v-if="productAttributeList.length">
<method-btn <method-btn
slot="handleBtn" slot="handleBtn"
:width="70" :width="70"
@ -63,6 +66,8 @@
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleClick" /> @clickBtn="handleClick" />
</base-table> </base-table>
<!-- 没有数据 -->
<div class="no-data-bg" v-else></div>
</div> </div>
</div> </div>
</div> </div>
@ -85,8 +90,10 @@
import productAttrAdd from './attr-add'; import productAttrAdd from './attr-add';
import inputArea from '../../mixins/inputArea'; import inputArea from '../../mixins/inputArea';
import SmallTitle from './SmallTitle'; import SmallTitle from './SmallTitle';
import { inWarehouseRealtimeLocation, import {
getWarehouseRealtimeLocation } from '@/api/warehouse/warehouseRealtimeLocation'; inWarehouseRealtimeLocation,
getWarehouseRealtimeLocation,
} from '@/api/warehouse/warehouseRealtimeLocation';
const tableBtn = [ const tableBtn = [
{ {
@ -99,36 +106,30 @@ const tableProps = [
{ {
prop: 'name', prop: 'name',
label: '物品名称', label: '物品名称',
align: 'center',
}, },
{ {
prop: 'code', prop: 'code',
label: '物品编码', label: '物品编码',
align: 'center',
}, },
{ {
prop: 'spec', prop: 'spec',
label: '物品规格', label: '物品规格',
align: 'center',
}, },
{ {
prop: 'goodsBatch', prop: 'goodsBatch',
label: '物品批次', label: '物品批次',
align: 'center',
subcomponent: inputArea, subcomponent: inputArea,
width: 100, width: 100,
}, },
{ {
prop: 'num', prop: 'num',
label: '数量', label: '数量',
align: 'center',
subcomponent: inputArea, subcomponent: inputArea,
width: 100, width: 100,
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注',
align: 'center',
subcomponent: inputArea, subcomponent: inputArea,
width: 100, width: 100,
}, },
@ -143,7 +144,6 @@ export default {
tableBtn, tableBtn,
tableProps, tableProps,
productAttributeList: [], productAttributeList: [],
addButtonShow: '新增',
operator: '', operator: '',
dataForm: { dataForm: {
id: null, id: null,
@ -171,7 +171,7 @@ export default {
this.productAttributeList.splice(0); this.productAttributeList.splice(0);
}, },
init(val, nickname) { init(val, nickname) {
this.operator = nickname this.operator = nickname;
this.dataForm.id = val.id; this.dataForm.id = val.id;
this.dataForm.name = val.name; this.dataForm.name = val.name;
this.dataForm.palletCode = val.palletCode; this.dataForm.palletCode = val.palletCode;
@ -213,12 +213,8 @@ export default {
handleClick(raw) { handleClick(raw) {
if (raw.type === 'delete') { if (raw.type === 'delete') {
this.$confirm( this.$confirm(
`确定对${ `是否确认删除名称为"${raw.data.name}"的数据项?`,
raw.data.name '系统提示',
? '[名称=' + raw.data.name + ']'
: '[序号=' + raw.data._pageIndex + ']'
}进行删除操作?`,
'提示',
{ {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
@ -242,8 +238,8 @@ export default {
realtimeLocationId: this.dataForm.id, realtimeLocationId: this.dataForm.id,
palletCode: this.dataForm.palletCode, palletCode: this.dataForm.palletCode,
operator: this.operator, operator: this.operator,
goodsInfos: this.productAttributeList goodsInfos: this.productAttributeList,
} };
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
// //
@ -313,5 +309,6 @@ export default {
.drawer >>> .el-form, .drawer >>> .el-form,
.drawer >>> .attr-list { .drawer >>> .attr-list {
padding: 0 16px; padding: 0 16px;
position: relative;
} }
</style> </style>

View File

@ -100,7 +100,7 @@ const tableProps = [
prop: 'inTime', prop: 'inTime',
label: '入库时间', label: '入库时间',
filter: parseTime, filter: parseTime,
minWidth: 150, minWidth: 100,
}, },
{ {
prop: 'remark', prop: 'remark',
@ -125,12 +125,6 @@ export default {
tableData: [], tableData: [],
tableProps, tableProps,
tableBtn: [ tableBtn: [
this.$auth.hasPermi(`out-material:warehouse-realtime-location:query`)
? {
type: 'info',
btnName: '详情',
}
: undefined,
this.$auth.hasPermi(`out-material:warehouse-realtime-location:query`) this.$auth.hasPermi(`out-material:warehouse-realtime-location:query`)
? { ? {
type: 'out', type: 'out',
@ -143,6 +137,12 @@ export default {
btnName: '入库', btnName: '入库',
} }
: undefined, : undefined,
this.$auth.hasPermi(`out-material:warehouse-realtime-location:query`)
? {
type: 'detail',
btnName: '详情',
}
: undefined,
].filter((v) => v), ].filter((v) => v),
drawerVisible: false, drawerVisible: false,
formConfig: [ formConfig: [
@ -183,7 +183,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
@ -262,7 +262,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.drawerRef.init(val.data, this.nickname); this.$refs.drawerRef.init(val.data, this.nickname);
}); });
} else if (val.type === 'info') { } else if (val.type === 'detail') {
this.addOrUpdateVisible = true; this.addOrUpdateVisible = true;
this.addOrEditTitle = val.data.name + ' -产品信息'; this.addOrEditTitle = val.data.name + ' -产品信息';
this.$nextTick(() => { this.$nextTick(() => {

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 13:52:10 * @Date: 2023-08-01 13:52:10
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-20 15:54:49 * @LastEditTime: 2023-11-23 15:27:37
* @Description: * @Description:
--> -->
<template> <template>
@ -12,7 +12,8 @@
ref="dataForm" ref="dataForm"
v-if="visible" v-if="visible"
@keyup.enter.native="dataFormSubmit()" @keyup.enter.native="dataFormSubmit()"
label-width="100px"> label-width="100px"
label-position="top">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="物品名称" prop="name"> <el-form-item label="物品名称" prop="name">
@ -60,6 +61,7 @@
:min="0" :min="0"
v-model="dataForm.dailyUse" v-model="dataForm.dailyUse"
clearable clearable
style="width: 100%;"
placeholder="请输入单日消耗量" /> placeholder="请输入单日消耗量" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -69,6 +71,7 @@
:min="0" :min="0"
v-model="dataForm.allowTime" v-model="dataForm.allowTime"
clearable clearable
style="width: 90%;"
placeholder="请输入允许留存时间" /> () placeholder="请输入允许留存时间" /> ()
</el-form-item> </el-form-item>
</el-col> </el-col>

View File

@ -75,6 +75,7 @@ const tableProps = [
{ {
prop: 'allowTime', prop: 'allowTime',
label: '允许留存时长(天)', label: '允许留存时长(天)',
width: 150
}, },
{ {
prop: 'dailyUse', prop: 'dailyUse',
@ -127,7 +128,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },

View File

@ -14,13 +14,6 @@
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:table-data="tableData"> :table-data="tableData">
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="100"
label="库位详情"
:method-list="tableBtn"
@clickBtn="handleClick" />
</base-table> </base-table>
<pagination <pagination
:limit.sync="listQuery.pageSize" :limit.sync="listQuery.pageSize"
@ -76,7 +69,7 @@ const tableProps = [
prop: 'operateTime', prop: 'operateTime',
label: '操作时间', label: '操作时间',
filter: parseTime, filter: parseTime,
minWidth: 150, minWidth: 100,
}, },
{ {
prop: 'operator', prop: 'operator',
@ -96,14 +89,6 @@ export default {
}, },
tableData: [], tableData: [],
tableProps, tableProps,
tableBtn: [
this.$auth.hasPermi(`pack-material:warehouse-realtime-location-his:query`)
? {
type: 'info',
btnName: '详情',
}
: undefined,
].filter((v) => v),
drawerVisible: false, drawerVisible: false,
formConfig: [ formConfig: [
{ {
@ -143,7 +128,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-11-18 14:16:25 * @Date: 2021-11-18 14:16:25
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-03 16:20:19 * @LastEditTime: 2023-11-23 16:09:30
* @Description: * @Description:
--> -->
<template> <template>
@ -11,7 +11,10 @@
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:height="300" :height="300"
:table-data="tableData" /> :table-data="tableData"
v-if="tableData.length" />
<!-- 没有数据 -->
<div class="no-data-bg" v-else></div>
</template> </template>
<script> <script>
@ -22,37 +25,31 @@ const tableProps = [
{ {
prop: 'name', prop: 'name',
label: '物品名称', label: '物品名称',
align: 'center',
}, },
{ {
prop: 'code', prop: 'code',
label: '物品编码', label: '物品编码',
align: 'center',
}, },
{ {
prop: 'spec', prop: 'spec',
label: '物品规格', label: '物品规格',
align: 'center',
}, },
{ {
prop: 'batchCode', prop: 'batchCode',
label: '物品批次', label: '物品批次',
align: 'center',
}, },
{ {
prop: 'num', prop: 'num',
label: '数量', label: '数量',
align: 'center',
}, },
{ {
prop: 'allowTime', prop: 'allowTime',
label: '允许留存时长(天)', label: '允许留存时长(天)',
align: 'center', width: 150
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注',
align: 'center',
}, },
]; ];
export default { export default {

View File

@ -92,7 +92,7 @@ const tableProps = [
prop: 'createTime', prop: 'createTime',
label: '操作时间', label: '操作时间',
filter: parseTime, filter: parseTime,
minWidth: 150, minWidth: 100,
}, },
{ {
prop: 'creator', prop: 'creator',
@ -115,7 +115,7 @@ export default {
tableBtn: [ tableBtn: [
this.$auth.hasPermi(`pack-material:warehouse-location-his:query`) this.$auth.hasPermi(`pack-material:warehouse-location-his:query`)
? { ? {
type: 'info', type: 'detail',
btnName: '详情', btnName: '详情',
} }
: undefined, : undefined,
@ -159,7 +159,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
@ -205,7 +205,7 @@ export default {
} }
}, },
otherMethods(val) { otherMethods(val) {
if (val.type === 'info') { if (val.type === 'detail') {
this.addOrUpdateVisible = true; this.addOrUpdateVisible = true;
this.addOrEditTitle = val.data.name + ' -产品信息'; this.addOrEditTitle = val.data.name + ' -产品信息';
this.$nextTick(() => { this.$nextTick(() => {

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 13:52:10 * @Date: 2023-08-01 13:52:10
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-20 15:13:37 * @LastEditTime: 2023-11-23 15:53:47
* @Description: * @Description:
--> -->
<template> <template>
@ -68,6 +68,7 @@
v-model="dataForm.goodsBatch" v-model="dataForm.goodsBatch"
filterable filterable
clearable clearable
style="width:100%"
placeholder="请选择物品名称"> placeholder="请选择物品名称">
<el-option <el-option
v-for="(item, index) in Batch" v-for="(item, index) in Batch"
@ -83,6 +84,7 @@
v-model="dataForm.numDet" v-model="dataForm.numDet"
clearable clearable
:min="0" :min="0"
style="width:100%"
placeholder="请输入数量" /> placeholder="请输入数量" />
</el-form-item> </el-form-item>
</el-col> </el-col>

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-11-03 16:37:06 * @Date: 2023-11-03 16:37:06
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-04 16:01:58 * @LastEditTime: 2023-11-23 15:53:54
* @Description: * @Description:
--> -->
<template> <template>
@ -67,7 +67,7 @@
@cancel="handleCancel" @cancel="handleCancel"
@confirm="handleConfirm" @confirm="handleConfirm"
:before-close="handleCancel" :before-close="handleCancel"
width="50%"> width="40%">
<add-or-update <add-or-update
ref="addOrUpdate" ref="addOrUpdate"
@refreshDataList="successSubmit"></add-or-update> @refreshDataList="successSubmit"></add-or-update>
@ -131,15 +131,18 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
{
type: 'separate',
},
{ {
type: this.$auth.hasPermi('pack-material:warehouse-realtime:create') ? 'button' : '', type: this.$auth.hasPermi('pack-material:warehouse-realtime:create') ? 'button' : '',
btnName: '入库', btnName: '入库',
name: 'add', name: 'add',
color: 'success', color: 'primary',
plain: true, plain: true,
}, },
], ],

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-11-18 14:16:25 * @Date: 2021-11-18 14:16:25
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-03 14:51:33 * @LastEditTime: 2023-11-23 16:08:22
* @Description: * @Description:
--> -->
<template> <template>
@ -11,7 +11,10 @@
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:height="300" :height="300"
:table-data="tableData" /> :table-data="tableData"
v-if="tableData.length" />
<!-- 没有数据 -->
<div class="no-data-bg" v-else></div>
</template> </template>
<script> <script>
@ -22,48 +25,41 @@ const tableProps = [
{ {
prop: 'name', prop: 'name',
label: '物品名称', label: '物品名称',
align: 'center',
}, },
{ {
prop: 'code', prop: 'code',
label: '物品编码', label: '物品编码',
align: 'center',
}, },
{ {
prop: 'spec', prop: 'spec',
label: '物品规格', label: '物品规格',
align: 'center',
}, },
{ {
prop: 'goodsBatch', prop: 'goodsBatch',
label: '物品批次', label: '物品批次',
align: 'center',
}, },
{ {
prop: 'num', prop: 'num',
label: '数量', label: '数量',
align: 'center',
}, },
{ {
prop: 'allowTime', prop: 'allowTime',
label: '允许留存时长(天)', label: '允许留存时长(天)',
align: 'center', width: 150
}, },
{ {
prop: 'inTime', prop: 'inTime',
label: '入库时间', label: '入库时间',
align: 'center',
filter: parseTime, filter: parseTime,
}, },
{ {
prop: 'leftTime', prop: 'leftTime',
label: '剩余留存时长(天)', label: '剩余留存时长(天)',
align: 'center', width: 150
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注',
align: 'center',
}, },
]; ];
export default { export default {

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
:visible.sync="visible" :visible.sync="visible"
:width="'35%'" :width="'30%'"
:append-to-body="true" :append-to-body="true"
:close-on-click-modal="false" :close-on-click-modal="false"
class="dialog"> class="dialog">
@ -22,7 +22,7 @@
<el-form-item label="产品" prop="productInfo"> <el-form-item label="产品" prop="productInfo">
<el-select <el-select
v-model="dataForm.productInfo" v-model="dataForm.productInfo"
style="width: 100%" style="width: 60%"
filterable filterable
value-key="id" value-key="id"
placeholder="请选择产品"> placeholder="请选择产品">
@ -59,7 +59,7 @@ export default {
}, },
productArr: [], productArr: [],
dataRule: { dataRule: {
productId: [{ required: true, message: '产品不能为空', trigger: 'blur' }], productId: [{ required: true, message: '产品不能为空', trigger: 'change' }],
}, },
}; };
}, },
@ -79,7 +79,7 @@ export default {
// //
dataFormSubmit() { dataFormSubmit() {
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (this.dataForm.productInfo) {
this.dataForm.productInfo.goodsId = this.dataForm.productInfo.id this.dataForm.productInfo.goodsId = this.dataForm.productInfo.id
this.dataForm.productInfo.remark = '' this.dataForm.productInfo.remark = ''
// //
@ -91,6 +91,8 @@ export default {
// //
this.visible = false; this.visible = false;
this.$emit('refreshDataList', this.dataForm); this.$emit('refreshDataList', this.dataForm);
} else {
this.$modal.msgWarning('请选择产品');
} }
}); });
}, },

View File

@ -20,9 +20,7 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="库位名称" prop="name"> <el-form-item label="库位名称" prop="name">
<el-input <el-input v-model="dataForm.name" disabled />
v-model="dataForm.name"
disabled />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -47,15 +45,20 @@
</small-title> </small-title>
<div class="attr-list"> <div class="attr-list">
<div style="position: absolute; top: -40px; right: 15px">
<el-button @click="addNew" type="text">
<i class="el-icon-plus"></i>
新增
</el-button>
</div>
<base-table <base-table
:table-props="tableProps" :table-props="tableProps"
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:add-button-show="addButtonShow"
@emitButtonClick="addNew"
@emitFun="inputChange" @emitFun="inputChange"
:height="400" :height="400"
:table-data="productAttributeList"> :table-data="productAttributeList"
v-if="productAttributeList.length">
<method-btn <method-btn
slot="handleBtn" slot="handleBtn"
:width="70" :width="70"
@ -63,6 +66,8 @@
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleClick" /> @clickBtn="handleClick" />
</base-table> </base-table>
<!-- 没有数据 -->
<div class="no-data-bg" v-else></div>
</div> </div>
</div> </div>
</div> </div>
@ -85,8 +90,10 @@
import productAttrAdd from './attr-add'; import productAttrAdd from './attr-add';
import inputArea from '../../mixins/inputArea'; import inputArea from '../../mixins/inputArea';
import SmallTitle from './SmallTitle'; import SmallTitle from './SmallTitle';
import { inWarehouseRealtimeLocation, import {
getWarehouseRealtimeLocation } from '@/api/warehouse/warehouseRealtimeLocation'; inWarehouseRealtimeLocation,
getWarehouseRealtimeLocation,
} from '@/api/warehouse/warehouseRealtimeLocation';
const tableBtn = [ const tableBtn = [
{ {
@ -99,36 +106,30 @@ const tableProps = [
{ {
prop: 'name', prop: 'name',
label: '物品名称', label: '物品名称',
align: 'center',
}, },
{ {
prop: 'code', prop: 'code',
label: '物品编码', label: '物品编码',
align: 'center',
}, },
{ {
prop: 'spec', prop: 'spec',
label: '物品规格', label: '物品规格',
align: 'center',
}, },
{ {
prop: 'goodsBatch', prop: 'goodsBatch',
label: '物品批次', label: '物品批次',
align: 'center',
subcomponent: inputArea, subcomponent: inputArea,
width: 100, width: 100,
}, },
{ {
prop: 'num', prop: 'num',
label: '数量', label: '数量',
align: 'center',
subcomponent: inputArea, subcomponent: inputArea,
width: 100, width: 100,
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注',
align: 'center',
subcomponent: inputArea, subcomponent: inputArea,
width: 100, width: 100,
}, },
@ -143,7 +144,6 @@ export default {
tableBtn, tableBtn,
tableProps, tableProps,
productAttributeList: [], productAttributeList: [],
addButtonShow: '新增',
operator: '', operator: '',
dataForm: { dataForm: {
id: null, id: null,
@ -171,7 +171,7 @@ export default {
this.productAttributeList.splice(0); this.productAttributeList.splice(0);
}, },
init(val, nickname) { init(val, nickname) {
this.operator = nickname this.operator = nickname;
this.dataForm.id = val.id; this.dataForm.id = val.id;
this.dataForm.name = val.name; this.dataForm.name = val.name;
this.dataForm.palletCode = val.palletCode; this.dataForm.palletCode = val.palletCode;
@ -213,12 +213,8 @@ export default {
handleClick(raw) { handleClick(raw) {
if (raw.type === 'delete') { if (raw.type === 'delete') {
this.$confirm( this.$confirm(
`确定对${ `是否确认删除名称为"${raw.data.name}"的数据项?`,
raw.data.name '系统提示',
? '[名称=' + raw.data.name + ']'
: '[序号=' + raw.data._pageIndex + ']'
}进行删除操作?`,
'提示',
{ {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
@ -242,8 +238,8 @@ export default {
realtimeLocationId: this.dataForm.id, realtimeLocationId: this.dataForm.id,
palletCode: this.dataForm.palletCode, palletCode: this.dataForm.palletCode,
operator: this.operator, operator: this.operator,
goodsInfos: this.productAttributeList goodsInfos: this.productAttributeList,
} };
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
// //
@ -313,5 +309,6 @@ export default {
.drawer >>> .el-form, .drawer >>> .el-form,
.drawer >>> .attr-list { .drawer >>> .attr-list {
padding: 0 16px; padding: 0 16px;
position: relative;
} }
</style> </style>

View File

@ -100,7 +100,7 @@ const tableProps = [
prop: 'inTime', prop: 'inTime',
label: '入库时间', label: '入库时间',
filter: parseTime, filter: parseTime,
minWidth: 150, minWidth: 100,
}, },
{ {
prop: 'remark', prop: 'remark',
@ -125,12 +125,6 @@ export default {
tableData: [], tableData: [],
tableProps, tableProps,
tableBtn: [ tableBtn: [
this.$auth.hasPermi(`pack-material:warehouse-realtime-location:query`)
? {
type: 'info',
btnName: '详情',
}
: undefined,
this.$auth.hasPermi(`pack-material:warehouse-realtime-location:query`) this.$auth.hasPermi(`pack-material:warehouse-realtime-location:query`)
? { ? {
type: 'out', type: 'out',
@ -143,6 +137,12 @@ export default {
btnName: '入库', btnName: '入库',
} }
: undefined, : undefined,
this.$auth.hasPermi(`pack-material:warehouse-realtime-location:query`)
? {
type: 'detail',
btnName: '详情',
}
: undefined,
].filter((v) => v), ].filter((v) => v),
drawerVisible: false, drawerVisible: false,
formConfig: [ formConfig: [
@ -183,7 +183,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
@ -262,7 +262,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.drawerRef.init(val.data, this.nickname); this.$refs.drawerRef.init(val.data, this.nickname);
}); });
} else if (val.type === 'info') { } else if (val.type === 'detail') {
this.addOrUpdateVisible = true; this.addOrUpdateVisible = true;
this.addOrEditTitle = val.data.name + ' -产品信息'; this.addOrEditTitle = val.data.name + ' -产品信息';
this.$nextTick(() => { this.$nextTick(() => {

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 13:52:10 * @Date: 2023-08-01 13:52:10
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-20 15:54:59 * @LastEditTime: 2023-11-23 15:27:28
* @Description: * @Description:
--> -->
<template> <template>
@ -12,7 +12,8 @@
ref="dataForm" ref="dataForm"
v-if="visible" v-if="visible"
@keyup.enter.native="dataFormSubmit()" @keyup.enter.native="dataFormSubmit()"
label-width="100px"> label-width="100px"
label-position="top">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="物品名称" prop="name"> <el-form-item label="物品名称" prop="name">
@ -60,6 +61,7 @@
:min="0" :min="0"
v-model="dataForm.dailyUse" v-model="dataForm.dailyUse"
clearable clearable
style="width: 100%;"
placeholder="请输入单日消耗量" /> placeholder="请输入单日消耗量" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -69,6 +71,7 @@
:min="0" :min="0"
v-model="dataForm.allowTime" v-model="dataForm.allowTime"
clearable clearable
style="width: 90%;"
placeholder="请输入允许留存时间" /> () placeholder="请输入允许留存时间" /> ()
</el-form-item> </el-form-item>
</el-col> </el-col>

View File

@ -75,6 +75,7 @@ const tableProps = [
{ {
prop: 'allowTime', prop: 'allowTime',
label: '允许留存时长(天)', label: '允许留存时长(天)',
width: 150
}, },
{ {
prop: 'dailyUse', prop: 'dailyUse',
@ -127,7 +128,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },

View File

@ -14,13 +14,6 @@
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:table-data="tableData"> :table-data="tableData">
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="100"
label="库位详情"
:method-list="tableBtn"
@clickBtn="handleClick" />
</base-table> </base-table>
<pagination <pagination
:limit.sync="listQuery.pageSize" :limit.sync="listQuery.pageSize"
@ -76,7 +69,7 @@ const tableProps = [
prop: 'operateTime', prop: 'operateTime',
label: '操作时间', label: '操作时间',
filter: parseTime, filter: parseTime,
minWidth: 150, minWidth: 100,
}, },
{ {
prop: 'operator', prop: 'operator',
@ -96,14 +89,6 @@ export default {
}, },
tableData: [], tableData: [],
tableProps, tableProps,
tableBtn: [
this.$auth.hasPermi(`part-material:warehouse-realtime-location-his:query`)
? {
type: 'info',
btnName: '详情',
}
: undefined,
].filter((v) => v),
drawerVisible: false, drawerVisible: false,
formConfig: [ formConfig: [
{ {
@ -143,7 +128,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-11-18 14:16:25 * @Date: 2021-11-18 14:16:25
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-03 16:20:19 * @LastEditTime: 2023-11-23 16:09:38
* @Description: * @Description:
--> -->
<template> <template>
@ -11,7 +11,10 @@
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:height="300" :height="300"
:table-data="tableData" /> :table-data="tableData"
v-if="tableData.length" />
<!-- 没有数据 -->
<div class="no-data-bg" v-else></div>
</template> </template>
<script> <script>
@ -22,37 +25,31 @@ const tableProps = [
{ {
prop: 'name', prop: 'name',
label: '物品名称', label: '物品名称',
align: 'center',
}, },
{ {
prop: 'code', prop: 'code',
label: '物品编码', label: '物品编码',
align: 'center',
}, },
{ {
prop: 'spec', prop: 'spec',
label: '物品规格', label: '物品规格',
align: 'center',
}, },
{ {
prop: 'batchCode', prop: 'batchCode',
label: '物品批次', label: '物品批次',
align: 'center',
}, },
{ {
prop: 'num', prop: 'num',
label: '数量', label: '数量',
align: 'center',
}, },
{ {
prop: 'allowTime', prop: 'allowTime',
label: '允许留存时长(天)', label: '允许留存时长(天)',
align: 'center', width: 150
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注',
align: 'center',
}, },
]; ];
export default { export default {

View File

@ -92,7 +92,7 @@ const tableProps = [
prop: 'createTime', prop: 'createTime',
label: '操作时间', label: '操作时间',
filter: parseTime, filter: parseTime,
minWidth: 150, minWidth: 100,
}, },
{ {
prop: 'creator', prop: 'creator',
@ -115,7 +115,7 @@ export default {
tableBtn: [ tableBtn: [
this.$auth.hasPermi(`part-material:warehouse-location-his:query`) this.$auth.hasPermi(`part-material:warehouse-location-his:query`)
? { ? {
type: 'info', type: 'detail',
btnName: '详情', btnName: '详情',
} }
: undefined, : undefined,
@ -159,7 +159,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
@ -205,7 +205,7 @@ export default {
} }
}, },
otherMethods(val) { otherMethods(val) {
if (val.type === 'info') { if (val.type === 'detail') {
this.addOrUpdateVisible = true; this.addOrUpdateVisible = true;
this.addOrEditTitle = val.data.name + ' -产品信息'; this.addOrEditTitle = val.data.name + ' -产品信息';
this.$nextTick(() => { this.$nextTick(() => {

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 13:52:10 * @Date: 2023-08-01 13:52:10
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-20 15:12:43 * @LastEditTime: 2023-11-23 15:53:35
* @Description: * @Description:
--> -->
<template> <template>
@ -68,6 +68,7 @@
v-model="dataForm.goodsBatch" v-model="dataForm.goodsBatch"
filterable filterable
clearable clearable
style="width:100%"
placeholder="请选择物品名称"> placeholder="请选择物品名称">
<el-option <el-option
v-for="(item, index) in Batch" v-for="(item, index) in Batch"
@ -83,6 +84,7 @@
v-model="dataForm.numDet" v-model="dataForm.numDet"
clearable clearable
:min="0" :min="0"
style="width:100%"
placeholder="请输入数量" /> placeholder="请输入数量" />
</el-form-item> </el-form-item>
</el-col> </el-col>

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-11-03 16:37:06 * @Date: 2023-11-03 16:37:06
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-04 16:24:57 * @LastEditTime: 2023-11-23 15:53:28
* @Description: * @Description:
--> -->
<template> <template>
@ -67,7 +67,7 @@
@cancel="handleCancel" @cancel="handleCancel"
@confirm="handleConfirm" @confirm="handleConfirm"
:before-close="handleCancel" :before-close="handleCancel"
width="50%"> width="40%">
<add-or-update <add-or-update
ref="addOrUpdate" ref="addOrUpdate"
@refreshDataList="successSubmit"></add-or-update> @refreshDataList="successSubmit"></add-or-update>
@ -131,15 +131,18 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
{
type: 'separate',
},
{ {
type: this.$auth.hasPermi('part-material:warehouse-realtime:create') ? 'button' : '', type: this.$auth.hasPermi('part-material:warehouse-realtime:create') ? 'button' : '',
btnName: '入库', btnName: '入库',
name: 'add', name: 'add',
color: 'success', color: 'primary',
plain: true, plain: true,
}, },
], ],

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-11-18 14:16:25 * @Date: 2021-11-18 14:16:25
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-03 14:51:33 * @LastEditTime: 2023-11-23 16:08:31
* @Description: * @Description:
--> -->
<template> <template>
@ -11,7 +11,10 @@
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:height="300" :height="300"
:table-data="tableData" /> :table-data="tableData"
v-if="tableData.length" />
<!-- 没有数据 -->
<div class="no-data-bg" v-else></div>
</template> </template>
<script> <script>
@ -22,48 +25,41 @@ const tableProps = [
{ {
prop: 'name', prop: 'name',
label: '物品名称', label: '物品名称',
align: 'center',
}, },
{ {
prop: 'code', prop: 'code',
label: '物品编码', label: '物品编码',
align: 'center',
}, },
{ {
prop: 'spec', prop: 'spec',
label: '物品规格', label: '物品规格',
align: 'center',
}, },
{ {
prop: 'goodsBatch', prop: 'goodsBatch',
label: '物品批次', label: '物品批次',
align: 'center',
}, },
{ {
prop: 'num', prop: 'num',
label: '数量', label: '数量',
align: 'center',
}, },
{ {
prop: 'allowTime', prop: 'allowTime',
label: '允许留存时长(天)', label: '允许留存时长(天)',
align: 'center', width: 150
}, },
{ {
prop: 'inTime', prop: 'inTime',
label: '入库时间', label: '入库时间',
align: 'center',
filter: parseTime, filter: parseTime,
}, },
{ {
prop: 'leftTime', prop: 'leftTime',
label: '剩余留存时长(天)', label: '剩余留存时长(天)',
align: 'center', width: 150
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注',
align: 'center',
}, },
]; ];
export default { export default {

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
:visible.sync="visible" :visible.sync="visible"
:width="'35%'" :width="'30%'"
:append-to-body="true" :append-to-body="true"
:close-on-click-modal="false" :close-on-click-modal="false"
class="dialog"> class="dialog">
@ -22,7 +22,7 @@
<el-form-item label="产品" prop="productInfo"> <el-form-item label="产品" prop="productInfo">
<el-select <el-select
v-model="dataForm.productInfo" v-model="dataForm.productInfo"
style="width: 100%" style="width: 60%"
filterable filterable
value-key="id" value-key="id"
placeholder="请选择产品"> placeholder="请选择产品">
@ -79,7 +79,7 @@ export default {
// //
dataFormSubmit() { dataFormSubmit() {
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (this.dataForm.productInfo) {
this.dataForm.productInfo.goodsId = this.dataForm.productInfo.id this.dataForm.productInfo.goodsId = this.dataForm.productInfo.id
this.dataForm.productInfo.remark = '' this.dataForm.productInfo.remark = ''
// //
@ -91,6 +91,8 @@ export default {
// //
this.visible = false; this.visible = false;
this.$emit('refreshDataList', this.dataForm); this.$emit('refreshDataList', this.dataForm);
} else {
this.$modal.msgWarning('请选择产品');
} }
}); });
}, },

View File

@ -20,9 +20,7 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="库位名称" prop="name"> <el-form-item label="库位名称" prop="name">
<el-input <el-input v-model="dataForm.name" disabled />
v-model="dataForm.name"
disabled />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -47,15 +45,20 @@
</small-title> </small-title>
<div class="attr-list"> <div class="attr-list">
<div style="position: absolute; top: -40px; right: 15px">
<el-button @click="addNew" type="text">
<i class="el-icon-plus"></i>
新增
</el-button>
</div>
<base-table <base-table
:table-props="tableProps" :table-props="tableProps"
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:add-button-show="addButtonShow"
@emitButtonClick="addNew"
@emitFun="inputChange" @emitFun="inputChange"
:height="400" :height="400"
:table-data="productAttributeList"> :table-data="productAttributeList"
v-if="productAttributeList.length">
<method-btn <method-btn
slot="handleBtn" slot="handleBtn"
:width="70" :width="70"
@ -63,6 +66,8 @@
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleClick" /> @clickBtn="handleClick" />
</base-table> </base-table>
<!-- 没有数据 -->
<div class="no-data-bg" v-else></div>
</div> </div>
</div> </div>
</div> </div>
@ -85,8 +90,10 @@
import productAttrAdd from './attr-add'; import productAttrAdd from './attr-add';
import inputArea from '../../mixins/inputArea'; import inputArea from '../../mixins/inputArea';
import SmallTitle from './SmallTitle'; import SmallTitle from './SmallTitle';
import { inWarehouseRealtimeLocation, import {
getWarehouseRealtimeLocation } from '@/api/warehouse/warehouseRealtimeLocation'; inWarehouseRealtimeLocation,
getWarehouseRealtimeLocation,
} from '@/api/warehouse/warehouseRealtimeLocation';
const tableBtn = [ const tableBtn = [
{ {
@ -99,36 +106,30 @@ const tableProps = [
{ {
prop: 'name', prop: 'name',
label: '物品名称', label: '物品名称',
align: 'center',
}, },
{ {
prop: 'code', prop: 'code',
label: '物品编码', label: '物品编码',
align: 'center',
}, },
{ {
prop: 'spec', prop: 'spec',
label: '物品规格', label: '物品规格',
align: 'center',
}, },
{ {
prop: 'goodsBatch', prop: 'goodsBatch',
label: '物品批次', label: '物品批次',
align: 'center',
subcomponent: inputArea, subcomponent: inputArea,
width: 100, width: 100,
}, },
{ {
prop: 'num', prop: 'num',
label: '数量', label: '数量',
align: 'center',
subcomponent: inputArea, subcomponent: inputArea,
width: 100, width: 100,
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注',
align: 'center',
subcomponent: inputArea, subcomponent: inputArea,
width: 100, width: 100,
}, },
@ -143,7 +144,6 @@ export default {
tableBtn, tableBtn,
tableProps, tableProps,
productAttributeList: [], productAttributeList: [],
addButtonShow: '新增',
operator: '', operator: '',
dataForm: { dataForm: {
id: null, id: null,
@ -171,7 +171,7 @@ export default {
this.productAttributeList.splice(0); this.productAttributeList.splice(0);
}, },
init(val, nickname) { init(val, nickname) {
this.operator = nickname this.operator = nickname;
this.dataForm.id = val.id; this.dataForm.id = val.id;
this.dataForm.name = val.name; this.dataForm.name = val.name;
this.dataForm.palletCode = val.palletCode; this.dataForm.palletCode = val.palletCode;
@ -213,12 +213,8 @@ export default {
handleClick(raw) { handleClick(raw) {
if (raw.type === 'delete') { if (raw.type === 'delete') {
this.$confirm( this.$confirm(
`确定对${ `是否确认删除名称为"${raw.data.name}"的数据项?`,
raw.data.name '系统提示',
? '[名称=' + raw.data.name + ']'
: '[序号=' + raw.data._pageIndex + ']'
}进行删除操作?`,
'提示',
{ {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
@ -242,8 +238,8 @@ export default {
realtimeLocationId: this.dataForm.id, realtimeLocationId: this.dataForm.id,
palletCode: this.dataForm.palletCode, palletCode: this.dataForm.palletCode,
operator: this.operator, operator: this.operator,
goodsInfos: this.productAttributeList goodsInfos: this.productAttributeList,
} };
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
// //
@ -313,5 +309,6 @@ export default {
.drawer >>> .el-form, .drawer >>> .el-form,
.drawer >>> .attr-list { .drawer >>> .attr-list {
padding: 0 16px; padding: 0 16px;
position: relative;
} }
</style> </style>

View File

@ -100,7 +100,7 @@ const tableProps = [
prop: 'inTime', prop: 'inTime',
label: '入库时间', label: '入库时间',
filter: parseTime, filter: parseTime,
minWidth: 150, minWidth: 100,
}, },
{ {
prop: 'remark', prop: 'remark',
@ -125,12 +125,6 @@ export default {
tableData: [], tableData: [],
tableProps, tableProps,
tableBtn: [ tableBtn: [
this.$auth.hasPermi(`part-material:warehouse-realtime-location:query`)
? {
type: 'info',
btnName: '详情',
}
: undefined,
this.$auth.hasPermi(`part-material:warehouse-realtime-location:query`) this.$auth.hasPermi(`part-material:warehouse-realtime-location:query`)
? { ? {
type: 'out', type: 'out',
@ -143,6 +137,12 @@ export default {
btnName: '入库', btnName: '入库',
} }
: undefined, : undefined,
this.$auth.hasPermi(`part-material:warehouse-realtime-location:query`)
? {
type: 'detail',
btnName: '详情',
}
: undefined,
].filter((v) => v), ].filter((v) => v),
drawerVisible: false, drawerVisible: false,
formConfig: [ formConfig: [
@ -183,7 +183,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
@ -262,7 +262,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.drawerRef.init(val.data, this.nickname); this.$refs.drawerRef.init(val.data, this.nickname);
}); });
} else if (val.type === 'info') { } else if (val.type === 'detail') {
this.addOrUpdateVisible = true; this.addOrUpdateVisible = true;
this.addOrEditTitle = val.data.name + ' -产品信息'; this.addOrEditTitle = val.data.name + ' -产品信息';
this.$nextTick(() => { this.$nextTick(() => {

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 13:52:10 * @Date: 2023-08-01 13:52:10
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-20 15:54:15 * @LastEditTime: 2023-11-23 15:25:57
* @Description: * @Description:
--> -->
<template> <template>
@ -12,7 +12,8 @@
ref="dataForm" ref="dataForm"
v-if="visible" v-if="visible"
@keyup.enter.native="dataFormSubmit()" @keyup.enter.native="dataFormSubmit()"
label-width="100px"> label-width="100px"
label-position="top">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="物品名称" prop="name"> <el-form-item label="物品名称" prop="name">
@ -58,6 +59,7 @@
<el-form-item label="单日消耗量" prop="dailyUse"> <el-form-item label="单日消耗量" prop="dailyUse">
<el-input-number <el-input-number
:min="0" :min="0"
style="width: 100%;"
v-model="dataForm.dailyUse" v-model="dataForm.dailyUse"
clearable clearable
placeholder="请输入单日消耗量" /> placeholder="请输入单日消耗量" />
@ -67,6 +69,7 @@
<el-form-item label="允许留存时间" prop="allowTime"> <el-form-item label="允许留存时间" prop="allowTime">
<el-input-number <el-input-number
:min="0" :min="0"
style="width: 90%;"
v-model="dataForm.allowTime" v-model="dataForm.allowTime"
clearable clearable
placeholder="请输入允许留存时间" /> () placeholder="请输入允许留存时间" /> ()

View File

@ -35,7 +35,7 @@
@cancel="handleCancel" @cancel="handleCancel"
@confirm="handleConfirm" @confirm="handleConfirm"
:before-close="handleCancel" :before-close="handleCancel"
width="50%"> width="40%">
<add-or-update <add-or-update
ref="addOrUpdate" ref="addOrUpdate"
@refreshDataList="successSubmit"></add-or-update> @refreshDataList="successSubmit"></add-or-update>
@ -75,6 +75,7 @@ const tableProps = [
{ {
prop: 'allowTime', prop: 'allowTime',
label: '允许留存时长(天)', label: '允许留存时长(天)',
width: 150
}, },
{ {
prop: 'dailyUse', prop: 'dailyUse',
@ -127,7 +128,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },

View File

@ -14,13 +14,6 @@
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:table-data="tableData"> :table-data="tableData">
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="100"
label="库位详情"
:method-list="tableBtn"
@clickBtn="handleClick" />
</base-table> </base-table>
<pagination <pagination
:limit.sync="listQuery.pageSize" :limit.sync="listQuery.pageSize"
@ -76,7 +69,7 @@ const tableProps = [
prop: 'operateTime', prop: 'operateTime',
label: '操作时间', label: '操作时间',
filter: parseTime, filter: parseTime,
minWidth: 150, minWidth: 100,
}, },
{ {
prop: 'operator', prop: 'operator',
@ -96,14 +89,6 @@ export default {
}, },
tableData: [], tableData: [],
tableProps, tableProps,
tableBtn: [
this.$auth.hasPermi(`raw-material:warehouse-realtime-location-his:query`)
? {
type: 'info',
btnName: '详情',
}
: undefined,
].filter((v) => v),
drawerVisible: false, drawerVisible: false,
formConfig: [ formConfig: [
{ {
@ -143,7 +128,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-11-18 14:16:25 * @Date: 2021-11-18 14:16:25
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-03 16:20:19 * @LastEditTime: 2023-11-23 16:09:47
* @Description: * @Description:
--> -->
<template> <template>
@ -11,7 +11,10 @@
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:height="300" :height="300"
:table-data="tableData" /> :table-data="tableData"
v-if="tableData.length" />
<!-- 没有数据 -->
<div class="no-data-bg" v-else></div>
</template> </template>
<script> <script>
@ -22,37 +25,31 @@ const tableProps = [
{ {
prop: 'name', prop: 'name',
label: '物品名称', label: '物品名称',
align: 'center',
}, },
{ {
prop: 'code', prop: 'code',
label: '物品编码', label: '物品编码',
align: 'center',
}, },
{ {
prop: 'spec', prop: 'spec',
label: '物品规格', label: '物品规格',
align: 'center',
}, },
{ {
prop: 'batchCode', prop: 'batchCode',
label: '物品批次', label: '物品批次',
align: 'center',
}, },
{ {
prop: 'num', prop: 'num',
label: '数量', label: '数量',
align: 'center',
}, },
{ {
prop: 'allowTime', prop: 'allowTime',
label: '允许留存时长(天)', label: '允许留存时长(天)',
align: 'center', width: 150
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注',
align: 'center',
}, },
]; ];
export default { export default {

View File

@ -92,7 +92,7 @@ const tableProps = [
prop: 'createTime', prop: 'createTime',
label: '操作时间', label: '操作时间',
filter: parseTime, filter: parseTime,
minWidth: 150, minWidth: 100,
}, },
{ {
prop: 'creator', prop: 'creator',
@ -115,7 +115,7 @@ export default {
tableBtn: [ tableBtn: [
this.$auth.hasPermi(`raw-material:warehouse-location-his:query`) this.$auth.hasPermi(`raw-material:warehouse-location-his:query`)
? { ? {
type: 'info', type: 'detail',
btnName: '详情', btnName: '详情',
} }
: undefined, : undefined,
@ -159,7 +159,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
@ -205,7 +205,7 @@ export default {
} }
}, },
otherMethods(val) { otherMethods(val) {
if (val.type === 'info') { if (val.type === 'detail') {
this.addOrUpdateVisible = true; this.addOrUpdateVisible = true;
this.addOrEditTitle = val.data.name + ' -产品信息'; this.addOrEditTitle = val.data.name + ' -产品信息';
this.$nextTick(() => { this.$nextTick(() => {

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 13:52:10 * @Date: 2023-08-01 13:52:10
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-20 15:12:13 * @LastEditTime: 2023-11-23 15:52:41
* @Description: * @Description:
--> -->
<template> <template>
@ -68,6 +68,7 @@
v-model="dataForm.goodsBatch" v-model="dataForm.goodsBatch"
filterable filterable
clearable clearable
style="width:100%"
placeholder="请选择物品名称"> placeholder="请选择物品名称">
<el-option <el-option
v-for="(item, index) in Batch" v-for="(item, index) in Batch"
@ -82,6 +83,7 @@
<el-input-number <el-input-number
v-model="dataForm.numDet" v-model="dataForm.numDet"
clearable clearable
style="width:100%"
:min="0" :min="0"
placeholder="请输入数量" /> placeholder="请输入数量" />
<!-- :max="max?max:9999999" --> <!-- :max="max?max:9999999" -->

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-11-03 16:37:06 * @Date: 2023-11-03 16:37:06
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-04 14:13:47 * @LastEditTime: 2023-11-23 15:52:53
* @Description: * @Description:
--> -->
<template> <template>
@ -67,7 +67,7 @@
@cancel="handleCancel" @cancel="handleCancel"
@confirm="handleConfirm" @confirm="handleConfirm"
:before-close="handleCancel" :before-close="handleCancel"
width="50%"> width="40%">
<add-or-update <add-or-update
ref="addOrUpdate" ref="addOrUpdate"
@refreshDataList="successSubmit"></add-or-update> @refreshDataList="successSubmit"></add-or-update>
@ -131,15 +131,18 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
{
type: 'separate',
},
{ {
type: this.$auth.hasPermi('raw-material:warehouse-realtime:create') ? 'button' : '', type: this.$auth.hasPermi('raw-material:warehouse-realtime:create') ? 'button' : '',
btnName: '入库', btnName: '入库',
name: 'add', name: 'add',
color: 'success', color: 'primary',
plain: true, plain: true,
}, },
], ],

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-11-18 14:16:25 * @Date: 2021-11-18 14:16:25
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-03 14:51:33 * @LastEditTime: 2023-11-23 16:08:41
* @Description: * @Description:
--> -->
<template> <template>
@ -11,7 +11,10 @@
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:height="300" :height="300"
:table-data="tableData" /> :table-data="tableData"
v-if="tableData.length" />
<!-- 没有数据 -->
<div class="no-data-bg" v-else></div>
</template> </template>
<script> <script>
@ -22,48 +25,41 @@ const tableProps = [
{ {
prop: 'name', prop: 'name',
label: '物品名称', label: '物品名称',
align: 'center',
}, },
{ {
prop: 'code', prop: 'code',
label: '物品编码', label: '物品编码',
align: 'center',
}, },
{ {
prop: 'spec', prop: 'spec',
label: '物品规格', label: '物品规格',
align: 'center',
}, },
{ {
prop: 'goodsBatch', prop: 'goodsBatch',
label: '物品批次', label: '物品批次',
align: 'center',
}, },
{ {
prop: 'num', prop: 'num',
label: '数量', label: '数量',
align: 'center',
}, },
{ {
prop: 'allowTime', prop: 'allowTime',
label: '允许留存时长(天)', label: '允许留存时长(天)',
align: 'center', width: 150
}, },
{ {
prop: 'inTime', prop: 'inTime',
label: '入库时间', label: '入库时间',
align: 'center',
filter: parseTime, filter: parseTime,
}, },
{ {
prop: 'leftTime', prop: 'leftTime',
label: '剩余留存时长(天)', label: '剩余留存时长(天)',
align: 'center', width: 150
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注',
align: 'center',
}, },
]; ];
export default { export default {

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
:visible.sync="visible" :visible.sync="visible"
:width="'35%'" :width="'30%'"
:append-to-body="true" :append-to-body="true"
:close-on-click-modal="false" :close-on-click-modal="false"
class="dialog"> class="dialog">
@ -22,7 +22,7 @@
<el-form-item label="产品" prop="productInfo"> <el-form-item label="产品" prop="productInfo">
<el-select <el-select
v-model="dataForm.productInfo" v-model="dataForm.productInfo"
style="width: 100%" style="width: 60%"
filterable filterable
value-key="id" value-key="id"
placeholder="请选择产品"> placeholder="请选择产品">
@ -79,7 +79,7 @@ export default {
// //
dataFormSubmit() { dataFormSubmit() {
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (this.dataForm.productInfo) {
this.dataForm.productInfo.goodsId = this.dataForm.productInfo.id this.dataForm.productInfo.goodsId = this.dataForm.productInfo.id
this.dataForm.productInfo.remark = '' this.dataForm.productInfo.remark = ''
// //
@ -91,6 +91,8 @@ export default {
// //
this.visible = false; this.visible = false;
this.$emit('refreshDataList', this.dataForm); this.$emit('refreshDataList', this.dataForm);
} else {
this.$modal.msgWarning('请选择产品');
} }
}); });
}, },

View File

@ -20,9 +20,7 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="库位名称" prop="name"> <el-form-item label="库位名称" prop="name">
<el-input <el-input v-model="dataForm.name" disabled />
v-model="dataForm.name"
disabled />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -47,15 +45,20 @@
</small-title> </small-title>
<div class="attr-list"> <div class="attr-list">
<div style="position: absolute; top: -40px; right: 15px">
<el-button @click="addNew" type="text">
<i class="el-icon-plus"></i>
新增
</el-button>
</div>
<base-table <base-table
:table-props="tableProps" :table-props="tableProps"
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:add-button-show="addButtonShow"
@emitButtonClick="addNew"
@emitFun="inputChange" @emitFun="inputChange"
:height="400" :height="400"
:table-data="productAttributeList"> :table-data="productAttributeList"
v-if="productAttributeList.length">
<method-btn <method-btn
slot="handleBtn" slot="handleBtn"
:width="70" :width="70"
@ -63,6 +66,8 @@
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleClick" /> @clickBtn="handleClick" />
</base-table> </base-table>
<!-- 没有数据 -->
<div class="no-data-bg" v-else></div>
</div> </div>
</div> </div>
</div> </div>
@ -85,8 +90,10 @@
import productAttrAdd from './attr-add'; import productAttrAdd from './attr-add';
import inputArea from '../../mixins/inputArea'; import inputArea from '../../mixins/inputArea';
import SmallTitle from './SmallTitle'; import SmallTitle from './SmallTitle';
import { inWarehouseRealtimeLocation, import {
getWarehouseRealtimeLocation } from '@/api/warehouse/warehouseRealtimeLocation'; inWarehouseRealtimeLocation,
getWarehouseRealtimeLocation,
} from '@/api/warehouse/warehouseRealtimeLocation';
const tableBtn = [ const tableBtn = [
{ {
@ -99,36 +106,30 @@ const tableProps = [
{ {
prop: 'name', prop: 'name',
label: '物品名称', label: '物品名称',
align: 'center',
}, },
{ {
prop: 'code', prop: 'code',
label: '物品编码', label: '物品编码',
align: 'center',
}, },
{ {
prop: 'spec', prop: 'spec',
label: '物品规格', label: '物品规格',
align: 'center',
}, },
{ {
prop: 'goodsBatch', prop: 'goodsBatch',
label: '物品批次', label: '物品批次',
align: 'center',
subcomponent: inputArea, subcomponent: inputArea,
width: 100, width: 100,
}, },
{ {
prop: 'num', prop: 'num',
label: '数量', label: '数量',
align: 'center',
subcomponent: inputArea, subcomponent: inputArea,
width: 100, width: 100,
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注',
align: 'center',
subcomponent: inputArea, subcomponent: inputArea,
width: 100, width: 100,
}, },
@ -143,7 +144,6 @@ export default {
tableBtn, tableBtn,
tableProps, tableProps,
productAttributeList: [], productAttributeList: [],
addButtonShow: '新增',
operator: '', operator: '',
dataForm: { dataForm: {
id: null, id: null,
@ -171,7 +171,7 @@ export default {
this.productAttributeList.splice(0); this.productAttributeList.splice(0);
}, },
init(val, nickname) { init(val, nickname) {
this.operator = nickname this.operator = nickname;
this.dataForm.id = val.id; this.dataForm.id = val.id;
this.dataForm.name = val.name; this.dataForm.name = val.name;
this.dataForm.palletCode = val.palletCode; this.dataForm.palletCode = val.palletCode;
@ -213,12 +213,8 @@ export default {
handleClick(raw) { handleClick(raw) {
if (raw.type === 'delete') { if (raw.type === 'delete') {
this.$confirm( this.$confirm(
`确定对${ `是否确认删除名称为"${raw.data.name}"的数据项?`,
raw.data.name '系统提示',
? '[名称=' + raw.data.name + ']'
: '[序号=' + raw.data._pageIndex + ']'
}进行删除操作?`,
'提示',
{ {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
@ -242,8 +238,8 @@ export default {
realtimeLocationId: this.dataForm.id, realtimeLocationId: this.dataForm.id,
palletCode: this.dataForm.palletCode, palletCode: this.dataForm.palletCode,
operator: this.operator, operator: this.operator,
goodsInfos: this.productAttributeList goodsInfos: this.productAttributeList,
} };
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
// //
@ -313,5 +309,6 @@ export default {
.drawer >>> .el-form, .drawer >>> .el-form,
.drawer >>> .attr-list { .drawer >>> .attr-list {
padding: 0 16px; padding: 0 16px;
position: relative;
} }
</style> </style>

View File

@ -100,7 +100,7 @@ const tableProps = [
prop: 'inTime', prop: 'inTime',
label: '入库时间', label: '入库时间',
filter: parseTime, filter: parseTime,
minWidth: 150, minWidth: 100,
}, },
{ {
prop: 'remark', prop: 'remark',
@ -125,12 +125,6 @@ export default {
tableData: [], tableData: [],
tableProps, tableProps,
tableBtn: [ tableBtn: [
this.$auth.hasPermi(`raw-material:warehouse-realtime-location:query`)
? {
type: 'info',
btnName: '详情',
}
: undefined,
this.$auth.hasPermi(`raw-material:warehouse-realtime-location:query`) this.$auth.hasPermi(`raw-material:warehouse-realtime-location:query`)
? { ? {
type: 'out', type: 'out',
@ -143,6 +137,12 @@ export default {
btnName: '入库', btnName: '入库',
} }
: undefined, : undefined,
this.$auth.hasPermi(`raw-material:warehouse-realtime-location:query`)
? {
type: 'detail',
btnName: '详情',
}
: undefined,
].filter((v) => v), ].filter((v) => v),
drawerVisible: false, drawerVisible: false,
formConfig: [ formConfig: [
@ -183,7 +183,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
@ -262,7 +262,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.drawerRef.init(val.data, this.nickname); this.$refs.drawerRef.init(val.data, this.nickname);
}); });
} else if (val.type === 'info') { } else if (val.type === 'detail') {
this.addOrUpdateVisible = true; this.addOrUpdateVisible = true;
this.addOrEditTitle = val.data.name + ' -产品信息'; this.addOrEditTitle = val.data.name + ' -产品信息';
this.$nextTick(() => { this.$nextTick(() => {

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 13:52:10 * @Date: 2023-08-01 13:52:10
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-02 16:13:31 * @LastEditTime: 2023-11-23 15:14:37
* @Description: * @Description:
--> -->
<template> <template>
@ -12,9 +12,10 @@
ref="dataForm" ref="dataForm"
v-if="visible" v-if="visible"
@keyup.enter.native="dataFormSubmit()" @keyup.enter.native="dataFormSubmit()"
label-width="90px"> label-width="90px"
label-position="top">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="8">
<el-form-item label="仓库编码" prop="warehouseCode"> <el-form-item label="仓库编码" prop="warehouseCode">
<el-input <el-input
v-model="dataForm.warehouseCode" v-model="dataForm.warehouseCode"
@ -22,7 +23,7 @@
placeholder="请输入仓库编码" /> placeholder="请输入仓库编码" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="8">
<el-form-item label="仓库名称" prop="warehouseName"> <el-form-item label="仓库名称" prop="warehouseName">
<el-input <el-input
v-model="dataForm.warehouseName" v-model="dataForm.warehouseName"
@ -30,7 +31,7 @@
placeholder="请输入仓库名称" /> placeholder="请输入仓库名称" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="8">
<el-form-item label="库位编码" prop="code"> <el-form-item label="库位编码" prop="code">
<el-input <el-input
v-model="dataForm.code" v-model="dataForm.code"
@ -38,7 +39,7 @@
placeholder="请输入库位编码" /> placeholder="请输入库位编码" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="8">
<el-form-item label="库位名称" prop="name"> <el-form-item label="库位名称" prop="name">
<el-input <el-input
v-model="dataForm.name" v-model="dataForm.name"
@ -70,6 +71,7 @@
v-model="dataForm.type" v-model="dataForm.type"
filterable filterable
clearable clearable
style="width: 100%;"
placeholder="请选择库位类型"> placeholder="请选择库位类型">
<el-option <el-option
v-for="item in urlOptions.dictList.dict0" v-for="item in urlOptions.dictList.dict0"
@ -85,6 +87,7 @@
v-model="dataForm.enabled" v-model="dataForm.enabled"
filterable filterable
clearable clearable
style="width: 100%;"
placeholder="请选择是否可用"> placeholder="请选择是否可用">
<el-option <el-option
v-for="item in isorno" v-for="item in isorno"

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 13:52:10 * @Date: 2023-08-01 13:52:10
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-11-02 15:45:53 * @LastEditTime: 2023-11-23 15:20:31
* @Description: * @Description:
--> -->
<template> <template>
@ -13,26 +13,35 @@
v-if="visible" v-if="visible"
@keyup.enter.native="dataFormSubmit()" @keyup.enter.native="dataFormSubmit()"
label-width="90px"> label-width="90px">
<el-row :gutter="20">
<el-col :span="isdetail?24:12">
<el-form-item label="仓库编码" prop="code"> <el-form-item label="仓库编码" prop="code">
<el-input <el-input
v-model="dataForm.code" v-model="dataForm.code"
clearable clearable
:disabled="isdetail" :disabled="isdetail"
:style="{width: isdetail?'70%':'100%',}"
placeholder="请输入仓库编码" /> placeholder="请输入仓库编码" />
</el-form-item> </el-form-item>
</el-col>
<el-col :span="isdetail?24:12">
<el-form-item label="仓库名称" prop="name"> <el-form-item label="仓库名称" prop="name">
<el-input <el-input
v-model="dataForm.name" v-model="dataForm.name"
clearable clearable
:disabled="isdetail" :disabled="isdetail"
:style="{width: isdetail?'70%':'100%',}"
placeholder="请输入仓库名称" /> placeholder="请输入仓库名称" />
</el-form-item> </el-form-item>
</el-col>
<el-col :span="isdetail?24:12">
<el-form-item prop="type" label="仓库类型"> <el-form-item prop="type" label="仓库类型">
<el-select <el-select
v-model="dataForm.type" v-model="dataForm.type"
:disabled="isdetail" :disabled="isdetail"
filterable filterable
clearable clearable
:style="{width: isdetail?'70%':'100%',}"
placeholder="请选择仓库类型"> placeholder="请选择仓库类型">
<el-option <el-option
v-for="item in urlOptions.dictList.dict0" v-for="item in urlOptions.dictList.dict0"
@ -41,11 +50,14 @@
:value="parseInt(item.value)"></el-option> :value="parseInt(item.value)"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col>
<el-col :span="isdetail?24:12">
<el-form-item prop="storageType" v-if="!isdetail" label="物料类型"> <el-form-item prop="storageType" v-if="!isdetail" label="物料类型">
<el-select <el-select
v-model="dataForm.storageType" v-model="dataForm.storageType"
filterable filterable
clearable clearable
style="width: 100%;"
placeholder="请选择物料类型"> placeholder="请选择物料类型">
<el-option <el-option
v-for="item in urlOptions.dictList.dict1" v-for="item in urlOptions.dictList.dict1"
@ -54,6 +66,8 @@
:value="parseInt(item.value)"></el-option> :value="parseInt(item.value)"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col>
</el-row>
</el-form> </el-form>
</template> </template>

View File

@ -84,7 +84,7 @@
@confirm="handleConfirm" @confirm="handleConfirm"
:before-close="handleCancel" :before-close="handleCancel"
:destroy-on-close="true" :destroy-on-close="true"
width="50%"> width="40%">
<add-or-update <add-or-update
ref="addOrUpdate" ref="addOrUpdate"
@refreshDataList="successSubmit"></add-or-update> @refreshDataList="successSubmit"></add-or-update>
@ -123,6 +123,7 @@ const tableProps = [
{ {
prop: 'code', prop: 'code',
label: '库位编码', label: '库位编码',
width: 180
}, },
{ {
prop: 'name', prop: 'name',
@ -131,24 +132,29 @@ const tableProps = [
{ {
prop: 'arrange', prop: 'arrange',
label: '排', label: '排',
width: 50
}, },
{ {
prop: 'col', prop: 'col',
label: '列', label: '列',
width: 50
}, },
{ {
prop: 'layer', prop: 'layer',
label: '层', label: '层',
width: 50
}, },
{ {
prop: 'type', prop: 'type',
label: '库位类型', label: '库位类型',
filter: codeFilter('wareType'), filter: codeFilter('wareType'),
width: 80
}, },
{ {
prop: 'enabled', prop: 'enabled',
label: '是否可用', label: '是否可用',
filter: codeFilter('deactivate'), filter: codeFilter('deactivate'),
width: 80
}, },
{ {
prop: 'remark', prop: 'remark',
@ -197,7 +203,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },