修改仓库UI测试bug

This commit is contained in:
2023-11-23 16:42:09 +08:00
parent 571d204d68
commit 8cd53915c1
59 changed files with 472 additions and 522 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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