Merge pull request '更新仓库bug' (#96) from projects/mes-zwq into projects/mes-test

Reviewed-on: #96
This commit is contained in:
朱文强 2023-11-20 16:11:49 +08:00
commit c46c4dbf65
26 changed files with 131 additions and 162 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-17 09:52:17 * @LastEditTime: 2023-11-20 15:54:28
* @Description: * @Description:
--> -->
<template> <template>
@ -15,31 +15,31 @@
label-width="100px"> label-width="100px">
<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" v-model="dataForm.name"
clearable clearable
placeholder="请输入名称" /> placeholder="请输入物品名称" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="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
placeholder="请输入编码" /> placeholder="请输入物品编码" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="规格" prop="spec"> <el-form-item label="物品规格" prop="spec">
<el-input <el-input
v-model="dataForm.spec" v-model="dataForm.spec"
clearable clearable
placeholder="请输入规格" /> placeholder="请输入物品规格" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="单位" prop="unit"> <el-form-item label="物品单位" prop="unit">
<el-select <el-select
v-model="dataForm.unit" v-model="dataForm.unit"
filterable filterable
@ -57,6 +57,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="单日消耗量" prop="dailyUse"> <el-form-item label="单日消耗量" prop="dailyUse">
<el-input-number <el-input-number
:min="0"
v-model="dataForm.dailyUse" v-model="dataForm.dailyUse"
clearable clearable
placeholder="请输入单日消耗量" /> placeholder="请输入单日消耗量" />
@ -65,9 +66,10 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="允许留存时间" prop="allowTime"> <el-form-item label="允许留存时间" prop="allowTime">
<el-input-number <el-input-number
:min="0"
v-model="dataForm.allowTime" v-model="dataForm.allowTime"
clearable clearable
placeholder="请输入允许留存时间" /> placeholder="请输入允许留存时间" /> ()
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -134,10 +136,10 @@ export default {
}, },
dataRule: { dataRule: {
code: [ code: [
{ required: true, message: '库位编码不能为空', trigger: 'blur' }, { required: true, message: '物品编码不能为空', trigger: 'blur' },
], ],
name: [ name: [
{ required: true, message: '库位名称不能为空', trigger: 'blur' }, { required: true, message: '物品名称不能为空', trigger: 'blur' },
], ],
}, },
isorno: [ isorno: [

View File

@ -57,19 +57,19 @@ import { publicFormatter } from '@/utils/dict';
const tableProps = [ const tableProps = [
{ {
prop: 'name', prop: 'name',
label: '名称', label: '物品名称',
}, },
{ {
prop: 'code', prop: 'code',
label: '编码', label: '物品编码',
}, },
{ {
prop: 'spec', prop: 'spec',
label: '规格', label: '物品规格',
}, },
{ {
prop: 'unit', prop: 'unit',
label: '单位', label: '物品单位',
filter: publicFormatter('unit_dict') filter: publicFormatter('unit_dict')
}, },
{ {
@ -121,8 +121,8 @@ export default {
formConfig: [ formConfig: [
{ {
type: 'input', type: 'input',
label: '名称', label: '物品名称',
placeholder: '名称', placeholder: '物品名称',
param: 'name', param: 'name',
}, },
{ {

View File

@ -2,7 +2,6 @@
<div class="app-container"> <div class="app-container">
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<search-bar <search-bar
:isFold="true"
:formConfigs="formConfig" :formConfigs="formConfig"
ref="searchBarForm" ref="searchBarForm"
@headBtnClick="buttonClick" /> @headBtnClick="buttonClick" />

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-04 16:32:54 * @LastEditTime: 2023-11-20 15:14:18
* @Description: * @Description:
--> -->
<template> <template>
@ -68,7 +68,6 @@
v-model="dataForm.goodsBatch" v-model="dataForm.goodsBatch"
filterable filterable
clearable clearable
@change="setBatchInfo"
placeholder="请选择物品名称"> placeholder="请选择物品名称">
<el-option <el-option
v-for="(item, index) in Batch" v-for="(item, index) in Batch"
@ -79,13 +78,12 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="入库数量" prop="numDet"> <el-form-item :label="dataForm.id?'出库数量':'入库数量'" prop="numDet">
<el-input-number <el-input-number
v-model="dataForm.numDet" v-model="dataForm.numDet"
clearable clearable
:min="0" :min="0"
:max="max?max:9999999" placeholder="请输入数量" />
placeholder="请输入入库数量" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -130,7 +128,6 @@ export default {
}, },
goodsArr: [], goodsArr: [],
Batch: [], Batch: [],
max: 0,
dataRule: { dataRule: {
goodsId: [ goodsId: [
{ required: true, message: '物品名称不能为空', trigger: 'change' }, { required: true, message: '物品名称不能为空', trigger: 'change' },
@ -143,7 +140,7 @@ export default {
}, },
], ],
numDet: [ numDet: [
{ required: true, message: '入库数量不能为空', trigger: 'blur' }, { required: true, message: '数量不能为空', trigger: 'blur' },
], ],
}, },
}; };
@ -172,13 +169,6 @@ export default {
} }
}); });
}, },
setBatchInfo(){
this.Batch.forEach((item) => {
if (item.goodsBatch === this.dataForm.goodsBatch) {
this.max = item.numDet
}
});
},
outWare(data) { outWare(data) {
this.getArr(); this.getArr();
this.visible = true; this.visible = true;

View File

@ -29,6 +29,7 @@
<el-option <el-option
v-for="item in productArr" v-for="item in productArr"
:key="item.id" :key="item.id"
:disabled="!item.enabled"
:label="item.name" :label="item.name"
:value="item" /> :value="item" />
</el-select> </el-select>

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-17 09:51:59 * @LastEditTime: 2023-11-20 15:54:39
* @Description: * @Description:
--> -->
<template> <template>
@ -15,31 +15,31 @@
label-width="100px"> label-width="100px">
<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" v-model="dataForm.name"
clearable clearable
placeholder="请输入名称" /> placeholder="请输入物品名称" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="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
placeholder="请输入编码" /> placeholder="请输入物品编码" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="规格" prop="spec"> <el-form-item label="物品规格" prop="spec">
<el-input <el-input
v-model="dataForm.spec" v-model="dataForm.spec"
clearable clearable
placeholder="请输入规格" /> placeholder="请输入物品规格" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="单位" prop="unit"> <el-form-item label="物品单位" prop="unit">
<el-select <el-select
v-model="dataForm.unit" v-model="dataForm.unit"
filterable filterable
@ -57,6 +57,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="单日消耗量" prop="dailyUse"> <el-form-item label="单日消耗量" prop="dailyUse">
<el-input-number <el-input-number
:min="0"
v-model="dataForm.dailyUse" v-model="dataForm.dailyUse"
clearable clearable
placeholder="请输入单日消耗量" /> placeholder="请输入单日消耗量" />
@ -65,9 +66,10 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="允许留存时间" prop="allowTime"> <el-form-item label="允许留存时间" prop="allowTime">
<el-input-number <el-input-number
:min="0"
v-model="dataForm.allowTime" v-model="dataForm.allowTime"
clearable clearable
placeholder="请输入允许留存时间" /> placeholder="请输入允许留存时间" /> ()
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -134,10 +136,10 @@ export default {
}, },
dataRule: { dataRule: {
code: [ code: [
{ required: true, message: '库位编码不能为空', trigger: 'blur' }, { required: true, message: '物品编码不能为空', trigger: 'blur' },
], ],
name: [ name: [
{ required: true, message: '库位名称不能为空', trigger: 'blur' }, { required: true, message: '物品名称不能为空', trigger: 'blur' },
], ],
}, },
isorno: [ isorno: [

View File

@ -57,19 +57,19 @@ import { publicFormatter } from '@/utils/dict';
const tableProps = [ const tableProps = [
{ {
prop: 'name', prop: 'name',
label: '名称', label: '物品名称',
}, },
{ {
prop: 'code', prop: 'code',
label: '编码', label: '物品编码',
}, },
{ {
prop: 'spec', prop: 'spec',
label: '规格', label: '物品规格',
}, },
{ {
prop: 'unit', prop: 'unit',
label: '单位', label: '物品单位',
filter: publicFormatter('unit_dict') filter: publicFormatter('unit_dict')
}, },
{ {
@ -121,8 +121,8 @@ export default {
formConfig: [ formConfig: [
{ {
type: 'input', type: 'input',
label: '名称', label: '物品名称',
placeholder: '名称', placeholder: '物品名称',
param: 'name', param: 'name',
}, },
{ {

View File

@ -2,7 +2,6 @@
<div class="app-container"> <div class="app-container">
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<search-bar <search-bar
:isFold="true"
:formConfigs="formConfig" :formConfigs="formConfig"
ref="searchBarForm" ref="searchBarForm"
@headBtnClick="buttonClick" /> @headBtnClick="buttonClick" />

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-04 16:24:41 * @LastEditTime: 2023-11-20 15:14:00
* @Description: * @Description:
--> -->
<template> <template>
@ -68,7 +68,6 @@
v-model="dataForm.goodsBatch" v-model="dataForm.goodsBatch"
filterable filterable
clearable clearable
@change="setBatchInfo"
placeholder="请选择物品名称"> placeholder="请选择物品名称">
<el-option <el-option
v-for="(item, index) in Batch" v-for="(item, index) in Batch"
@ -79,13 +78,12 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="入库数量" prop="numDet"> <el-form-item :label="dataForm.id?'出库数量':'入库数量'" prop="numDet">
<el-input-number <el-input-number
v-model="dataForm.numDet" v-model="dataForm.numDet"
clearable clearable
:min="0" :min="0"
:max="max?max:9999999" placeholder="请输入数量" />
placeholder="请输入入库数量" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -130,7 +128,6 @@ export default {
}, },
goodsArr: [], goodsArr: [],
Batch: [], Batch: [],
max: 0,
dataRule: { dataRule: {
goodsId: [ goodsId: [
{ required: true, message: '物品名称不能为空', trigger: 'change' }, { required: true, message: '物品名称不能为空', trigger: 'change' },
@ -143,7 +140,7 @@ export default {
}, },
], ],
numDet: [ numDet: [
{ required: true, message: '入库数量不能为空', trigger: 'blur' }, { required: true, message: '数量不能为空', trigger: 'blur' },
], ],
}, },
}; };
@ -172,13 +169,6 @@ export default {
} }
}); });
}, },
setBatchInfo(){
this.Batch.forEach((item) => {
if (item.goodsBatch === this.dataForm.goodsBatch) {
this.max = item.numDet
}
});
},
outWare(data) { outWare(data) {
this.getArr(); this.getArr();
this.visible = true; this.visible = true;

View File

@ -29,6 +29,7 @@
<el-option <el-option
v-for="item in productArr" v-for="item in productArr"
:key="item.id" :key="item.id"
:disabled="!item.enabled"
:label="item.name" :label="item.name"
:value="item" /> :value="item" />
</el-select> </el-select>

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-17 09:51:44 * @LastEditTime: 2023-11-20 15:54:49
* @Description: * @Description:
--> -->
<template> <template>
@ -15,31 +15,31 @@
label-width="100px"> label-width="100px">
<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" v-model="dataForm.name"
clearable clearable
placeholder="请输入名称" /> placeholder="请输入物品名称" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="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
placeholder="请输入编码" /> placeholder="请输入物品编码" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="规格" prop="spec"> <el-form-item label="物品规格" prop="spec">
<el-input <el-input
v-model="dataForm.spec" v-model="dataForm.spec"
clearable clearable
placeholder="请输入规格" /> placeholder="请输入物品规格" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="单位" prop="unit"> <el-form-item label="物品单位" prop="unit">
<el-select <el-select
v-model="dataForm.unit" v-model="dataForm.unit"
filterable filterable
@ -57,6 +57,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="单日消耗量" prop="dailyUse"> <el-form-item label="单日消耗量" prop="dailyUse">
<el-input-number <el-input-number
:min="0"
v-model="dataForm.dailyUse" v-model="dataForm.dailyUse"
clearable clearable
placeholder="请输入单日消耗量" /> placeholder="请输入单日消耗量" />
@ -65,9 +66,10 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="允许留存时间" prop="allowTime"> <el-form-item label="允许留存时间" prop="allowTime">
<el-input-number <el-input-number
:min="0"
v-model="dataForm.allowTime" v-model="dataForm.allowTime"
clearable clearable
placeholder="请输入允许留存时间" /> placeholder="请输入允许留存时间" /> ()
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -134,10 +136,10 @@ export default {
}, },
dataRule: { dataRule: {
code: [ code: [
{ required: true, message: '库位编码不能为空', trigger: 'blur' }, { required: true, message: '物品编码不能为空', trigger: 'blur' },
], ],
name: [ name: [
{ required: true, message: '库位名称不能为空', trigger: 'blur' }, { required: true, message: '物品名称不能为空', trigger: 'blur' },
], ],
}, },
isorno: [ isorno: [

View File

@ -57,19 +57,19 @@ import { publicFormatter } from '@/utils/dict';
const tableProps = [ const tableProps = [
{ {
prop: 'name', prop: 'name',
label: '名称', label: '物品名称',
}, },
{ {
prop: 'code', prop: 'code',
label: '编码', label: '物品编码',
}, },
{ {
prop: 'spec', prop: 'spec',
label: '规格', label: '物品规格',
}, },
{ {
prop: 'unit', prop: 'unit',
label: '单位', label: '物品单位',
filter: publicFormatter('unit_dict') filter: publicFormatter('unit_dict')
}, },
{ {
@ -121,8 +121,8 @@ export default {
formConfig: [ formConfig: [
{ {
type: 'input', type: 'input',
label: '名称', label: '物品名称',
placeholder: '名称', placeholder: '物品名称',
param: 'name', param: 'name',
}, },
{ {

View File

@ -2,7 +2,6 @@
<div class="app-container"> <div class="app-container">
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<search-bar <search-bar
:isFold="true"
:formConfigs="formConfig" :formConfigs="formConfig"
ref="searchBarForm" ref="searchBarForm"
@headBtnClick="buttonClick" /> @headBtnClick="buttonClick" />

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-04 14:17:39 * @LastEditTime: 2023-11-20 15:13:37
* @Description: * @Description:
--> -->
<template> <template>
@ -68,7 +68,6 @@
v-model="dataForm.goodsBatch" v-model="dataForm.goodsBatch"
filterable filterable
clearable clearable
@change="setBatchInfo"
placeholder="请选择物品名称"> placeholder="请选择物品名称">
<el-option <el-option
v-for="(item, index) in Batch" v-for="(item, index) in Batch"
@ -79,13 +78,12 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="入库数量" prop="numDet"> <el-form-item :label="dataForm.id?'出库数量':'入库数量'" prop="numDet">
<el-input-number <el-input-number
v-model="dataForm.numDet" v-model="dataForm.numDet"
clearable clearable
:min="0" :min="0"
:max="max?max:9999999" placeholder="请输入数量" />
placeholder="请输入入库数量" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -130,7 +128,6 @@ export default {
}, },
goodsArr: [], goodsArr: [],
Batch: [], Batch: [],
max: 0,
dataRule: { dataRule: {
goodsId: [ goodsId: [
{ required: true, message: '物品名称不能为空', trigger: 'change' }, { required: true, message: '物品名称不能为空', trigger: 'change' },
@ -143,7 +140,7 @@ export default {
}, },
], ],
numDet: [ numDet: [
{ required: true, message: '入库数量不能为空', trigger: 'blur' }, { required: true, message: '数量不能为空', trigger: 'blur' },
], ],
}, },
}; };
@ -172,13 +169,6 @@ export default {
} }
}); });
}, },
setBatchInfo(){
this.Batch.forEach((item) => {
if (item.goodsBatch === this.dataForm.goodsBatch) {
this.max = item.numDet
}
});
},
outWare(data) { outWare(data) {
this.getArr(); this.getArr();
this.visible = true; this.visible = true;

View File

@ -29,6 +29,7 @@
<el-option <el-option
v-for="item in productArr" v-for="item in productArr"
:key="item.id" :key="item.id"
:disabled="!item.enabled"
:label="item.name" :label="item.name"
:value="item" /> :value="item" />
</el-select> </el-select>

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-17 09:51:29 * @LastEditTime: 2023-11-20 15:54:59
* @Description: * @Description:
--> -->
<template> <template>
@ -15,31 +15,31 @@
label-width="100px"> label-width="100px">
<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" v-model="dataForm.name"
clearable clearable
placeholder="请输入名称" /> placeholder="请输入物品名称" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="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
placeholder="请输入编码" /> placeholder="请输入物品编码" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="规格" prop="spec"> <el-form-item label="物品规格" prop="spec">
<el-input <el-input
v-model="dataForm.spec" v-model="dataForm.spec"
clearable clearable
placeholder="请输入规格" /> placeholder="请输入物品规格" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="单位" prop="unit"> <el-form-item label="物品单位" prop="unit">
<el-select <el-select
v-model="dataForm.unit" v-model="dataForm.unit"
filterable filterable
@ -57,6 +57,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="单日消耗量" prop="dailyUse"> <el-form-item label="单日消耗量" prop="dailyUse">
<el-input-number <el-input-number
:min="0"
v-model="dataForm.dailyUse" v-model="dataForm.dailyUse"
clearable clearable
placeholder="请输入单日消耗量" /> placeholder="请输入单日消耗量" />
@ -65,9 +66,10 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="允许留存时间" prop="allowTime"> <el-form-item label="允许留存时间" prop="allowTime">
<el-input-number <el-input-number
:min="0"
v-model="dataForm.allowTime" v-model="dataForm.allowTime"
clearable clearable
placeholder="请输入允许留存时间" /> placeholder="请输入允许留存时间" /> ()
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -134,10 +136,10 @@ export default {
}, },
dataRule: { dataRule: {
code: [ code: [
{ required: true, message: '库位编码不能为空', trigger: 'blur' }, { required: true, message: '物品编码不能为空', trigger: 'blur' },
], ],
name: [ name: [
{ required: true, message: '库位名称不能为空', trigger: 'blur' }, { required: true, message: '物品名称不能为空', trigger: 'blur' },
], ],
}, },
isorno: [ isorno: [

View File

@ -57,19 +57,19 @@ import { publicFormatter } from '@/utils/dict';
const tableProps = [ const tableProps = [
{ {
prop: 'name', prop: 'name',
label: '名称', label: '物品名称',
}, },
{ {
prop: 'code', prop: 'code',
label: '编码', label: '物品编码',
}, },
{ {
prop: 'spec', prop: 'spec',
label: '规格', label: '物品规格',
}, },
{ {
prop: 'unit', prop: 'unit',
label: '单位', label: '物品单位',
filter: publicFormatter('unit_dict') filter: publicFormatter('unit_dict')
}, },
{ {
@ -121,8 +121,8 @@ export default {
formConfig: [ formConfig: [
{ {
type: 'input', type: 'input',
label: '名称', label: '物品名称',
placeholder: '名称', placeholder: '物品名称',
param: 'name', param: 'name',
}, },
{ {

View File

@ -2,7 +2,6 @@
<div class="app-container"> <div class="app-container">
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<search-bar <search-bar
:isFold="true"
:formConfigs="formConfig" :formConfigs="formConfig"
ref="searchBarForm" ref="searchBarForm"
@headBtnClick="buttonClick" /> @headBtnClick="buttonClick" />

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-04 16:24:26 * @LastEditTime: 2023-11-20 15:12:43
* @Description: * @Description:
--> -->
<template> <template>
@ -68,7 +68,6 @@
v-model="dataForm.goodsBatch" v-model="dataForm.goodsBatch"
filterable filterable
clearable clearable
@change="setBatchInfo"
placeholder="请选择物品名称"> placeholder="请选择物品名称">
<el-option <el-option
v-for="(item, index) in Batch" v-for="(item, index) in Batch"
@ -79,13 +78,12 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="入库数量" prop="numDet"> <el-form-item :label="dataForm.id?'出库数量':'入库数量'" prop="numDet">
<el-input-number <el-input-number
v-model="dataForm.numDet" v-model="dataForm.numDet"
clearable clearable
:min="0" :min="0"
:max="max?max:9999999" placeholder="请输入数量" />
placeholder="请输入入库数量" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -130,7 +128,6 @@ export default {
}, },
goodsArr: [], goodsArr: [],
Batch: [], Batch: [],
max: 0,
dataRule: { dataRule: {
goodsId: [ goodsId: [
{ required: true, message: '物品名称不能为空', trigger: 'change' }, { required: true, message: '物品名称不能为空', trigger: 'change' },
@ -143,7 +140,7 @@ export default {
}, },
], ],
numDet: [ numDet: [
{ required: true, message: '入库数量不能为空', trigger: 'blur' }, { required: true, message: '数量不能为空', trigger: 'blur' },
], ],
}, },
}; };
@ -172,13 +169,6 @@ export default {
} }
}); });
}, },
setBatchInfo(){
this.Batch.forEach((item) => {
if (item.goodsBatch === this.dataForm.goodsBatch) {
this.max = item.numDet
}
});
},
outWare(data) { outWare(data) {
this.getArr(); this.getArr();
this.visible = true; this.visible = true;

View File

@ -29,6 +29,7 @@
<el-option <el-option
v-for="item in productArr" v-for="item in productArr"
:key="item.id" :key="item.id"
:disabled="!item.enabled"
:label="item.name" :label="item.name"
:value="item" /> :value="item" />
</el-select> </el-select>

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-17 09:50:55 * @LastEditTime: 2023-11-20 15:54:15
* @Description: * @Description:
--> -->
<template> <template>
@ -15,31 +15,31 @@
label-width="100px"> label-width="100px">
<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" v-model="dataForm.name"
clearable clearable
placeholder="请输入名称" /> placeholder="请输入物品名称" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="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
placeholder="请输入编码" /> placeholder="请输入物品编码" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="规格" prop="spec"> <el-form-item label="物品规格" prop="spec">
<el-input <el-input
v-model="dataForm.spec" v-model="dataForm.spec"
clearable clearable
placeholder="请输入规格" /> placeholder="请输入物品规格" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="单位" prop="unit"> <el-form-item label="物品单位" prop="unit">
<el-select <el-select
v-model="dataForm.unit" v-model="dataForm.unit"
filterable filterable
@ -57,6 +57,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="单日消耗量" prop="dailyUse"> <el-form-item label="单日消耗量" prop="dailyUse">
<el-input-number <el-input-number
:min="0"
v-model="dataForm.dailyUse" v-model="dataForm.dailyUse"
clearable clearable
placeholder="请输入单日消耗量" /> placeholder="请输入单日消耗量" />
@ -65,9 +66,10 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="允许留存时间" prop="allowTime"> <el-form-item label="允许留存时间" prop="allowTime">
<el-input-number <el-input-number
:min="0"
v-model="dataForm.allowTime" v-model="dataForm.allowTime"
clearable clearable
placeholder="请输入允许留存时间" /> placeholder="请输入允许留存时间" /> ()
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -134,10 +136,10 @@ export default {
}, },
dataRule: { dataRule: {
code: [ code: [
{ required: true, message: '库位编码不能为空', trigger: 'blur' }, { required: true, message: '物品编码不能为空', trigger: 'blur' },
], ],
name: [ name: [
{ required: true, message: '库位名称不能为空', trigger: 'blur' }, { required: true, message: '物品名称不能为空', trigger: 'blur' },
], ],
}, },
isorno: [ isorno: [

View File

@ -57,19 +57,19 @@ import { publicFormatter } from '@/utils/dict';
const tableProps = [ const tableProps = [
{ {
prop: 'name', prop: 'name',
label: '名称', label: '物品名称',
}, },
{ {
prop: 'code', prop: 'code',
label: '编码', label: '物品编码',
}, },
{ {
prop: 'spec', prop: 'spec',
label: '规格', label: '物品规格',
}, },
{ {
prop: 'unit', prop: 'unit',
label: '单位', label: '物品单位',
filter: publicFormatter('unit_dict') filter: publicFormatter('unit_dict')
}, },
{ {
@ -121,8 +121,8 @@ export default {
formConfig: [ formConfig: [
{ {
type: 'input', type: 'input',
label: '名称', label: '物品名称',
placeholder: '名称', placeholder: '物品名称',
param: 'name', param: 'name',
}, },
{ {

View File

@ -2,7 +2,6 @@
<div class="app-container"> <div class="app-container">
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<search-bar <search-bar
:isFold="true"
:formConfigs="formConfig" :formConfigs="formConfig"
ref="searchBarForm" ref="searchBarForm"
@headBtnClick="buttonClick" /> @headBtnClick="buttonClick" />

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-04 14:17:39 * @LastEditTime: 2023-11-20 15:12:13
* @Description: * @Description:
--> -->
<template> <template>
@ -68,7 +68,6 @@
v-model="dataForm.goodsBatch" v-model="dataForm.goodsBatch"
filterable filterable
clearable clearable
@change="setBatchInfo"
placeholder="请选择物品名称"> placeholder="请选择物品名称">
<el-option <el-option
v-for="(item, index) in Batch" v-for="(item, index) in Batch"
@ -79,13 +78,13 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="入库数量" prop="numDet"> <el-form-item :label="dataForm.id?'出库数量':'入库数量'" prop="numDet">
<el-input-number <el-input-number
v-model="dataForm.numDet" v-model="dataForm.numDet"
clearable clearable
:min="0" :min="0"
:max="max?max:9999999" placeholder="请输入数量" />
placeholder="请输入入库数量" /> <!-- :max="max?max:9999999" -->
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -130,7 +129,7 @@ export default {
}, },
goodsArr: [], goodsArr: [],
Batch: [], Batch: [],
max: 0, //max: 0,
dataRule: { dataRule: {
goodsId: [ goodsId: [
{ required: true, message: '物品名称不能为空', trigger: 'change' }, { required: true, message: '物品名称不能为空', trigger: 'change' },
@ -143,7 +142,7 @@ export default {
}, },
], ],
numDet: [ numDet: [
{ required: true, message: '入库数量不能为空', trigger: 'blur' }, { required: true, message: '数量不能为空', trigger: 'blur' },
], ],
}, },
}; };
@ -172,13 +171,13 @@ export default {
} }
}); });
}, },
setBatchInfo(){ // setBatchInfo(){
this.Batch.forEach((item) => { // this.Batch.forEach((item) => {
if (item.goodsBatch === this.dataForm.goodsBatch) { // if (item.goodsBatch === this.dataForm.goodsBatch) {
this.max = item.numDet // this.max = item.numDet
} // }
}); // });
}, // },
outWare(data) { outWare(data) {
this.getArr(); this.getArr();
this.visible = true; this.visible = true;

View File

@ -29,6 +29,7 @@
<el-option <el-option
v-for="item in productArr" v-for="item in productArr"
:key="item.id" :key="item.id"
:disabled="!item.enabled"
:label="item.name" :label="item.name"
:value="item" /> :value="item" />
</el-select> </el-select>

View File

@ -18,7 +18,7 @@
@click.native="setWareInfo(item)" @click.native="setWareInfo(item)"
:style="{ :style="{
background: item.id === wareInfo.warehouseId ? '#37D97F' : '', background: item.id === wareInfo.warehouseId ? '#37D97F' : '',
color: item.id === wareInfo.warehouseId ? 'white' : '' color: item.id === wareInfo.warehouseId ? 'white' : '',
}" }"
class="ware-card"> class="ware-card">
{{ item.name }} {{ item.name }}
@ -263,7 +263,7 @@ export default {
this.dataListLoading = true; this.dataListLoading = true;
this.urlOptions.getDataListURL(this.listQuery).then((response) => { this.urlOptions.getDataListURL(this.listQuery).then((response) => {
this.tableData = response.data.list; this.tableData = response.data.list;
this.total = response.data.total; this.listQuery.total = response.data.total;
this.dataListLoading = false; this.dataListLoading = false;
}); });
}, },