Этот коммит содержится в:
朱文强 2024-04-19 15:08:47 +08:00
родитель baa2094fb6
Коммит 43f9da790e
11 изменённых файлов: 71 добавлений и 157 удалений

Просмотреть файл

@ -136,7 +136,9 @@ export default {
components: { components: {
AddOrUpdate, AddOrUpdate,
}, },
created() {}, created() {
this.listQuery.warehouseId = null;
},
methods: { methods: {
buttonClick(val) { buttonClick(val) {
switch (val.btnName) { switch (val.btnName) {

Просмотреть файл

@ -138,7 +138,7 @@ export default {
AddOrUpdate, AddOrUpdate,
}, },
created() { created() {
this.listQuery.warehouseId = this.bId; this.listQuery.warehouseId = null;
}, },
methods: { methods: {
buttonClick(val) { buttonClick(val) {

Просмотреть файл

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-24 14:47:58 * @Date: 2023-08-24 14:47:58
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2024-02-22 16:48:44 * @LastEditTime: 2024-04-19 14:30:04
* @Description: * @Description:
--> -->
<template> <template>
@ -50,9 +50,8 @@ const tableProps = [
label: '数量', label: '数量',
}, },
{ {
prop: 'quality', prop: 'grade',
label: '品质', label: '品质',
filter: codeFilter('quality'),
}, },
]; ];

Просмотреть файл

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-22 15:01:55 * @Date: 2023-08-22 15:01:55
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2024-02-22 16:47:31 * @LastEditTime: 2024-04-19 14:34:09
* @Description: * @Description:
--> -->
<template> <template>
@ -148,10 +148,8 @@ const tableProps = [
width: 55, width: 55,
}, },
{ {
prop: 'quality', prop: 'grade',
label: '品质', label: '品质',
filter: codeFilter('quality'),
width: 55,
}, },
{ {
prop: 'cureTime', prop: 'cureTime',
@ -307,7 +305,7 @@ export default {
}, },
addList(data) { addList(data) {
data.productInfo.number = 1; data.productInfo.number = 1;
data.productInfo.quality = data.quality; data.productInfo.grade = data.grade;
for (let i = 0; i < data.number; i++) { for (let i = 0; i < data.number; i++) {
this.productAttributeList.push(JSON.parse(JSON.stringify(data.productInfo))); this.productAttributeList.push(JSON.parse(JSON.stringify(data.productInfo)));
} }

Просмотреть файл

@ -24,8 +24,11 @@
v-model="dataForm.productInfo" v-model="dataForm.productInfo"
style="width: 100%" style="width: 100%"
filterable filterable
remote
:remote-method="remoteMethod"
value-key="id" value-key="id"
placeholder="请选择产品"> placeholder="请选择产品"
:loading="loading">
<el-option <el-option
v-for="item in productArr" v-for="item in productArr"
:key="item.id" :key="item.id"
@ -34,19 +37,12 @@
:disabled="!item.deactivate" /> :disabled="!item.deactivate" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="品质" prop="quality"> <el-form-item label="品质" prop="grade">
<el-select <el-input
v-model="dataForm.quality" v-model="dataForm.grade"
style="width: 100%" placeholder="请输入品质"
filterable clearable
value-key="id" :style="{ width: '100%' }" />
placeholder="请选择品质">
<el-option
v-for="item in qualityArr"
:key="item.id"
:label="item.name"
:value="item.id" />
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="数量" prop="number"> <el-form-item label="数量" prop="number">
<el-input-number <el-input-number
@ -81,31 +77,16 @@ export default {
index: -1, index: -1,
productInfo: null, productInfo: null,
number: 1, number: 1,
quality: null, grade: null,
}, },
productArr: [], productArr: [],
qualityArr: [ loading: false,
{
name: 'C',
id: 2,
},
{
name: 'B',
id: 1,
},
{
name: 'A',
id: 0,
},
],
dataRule: { dataRule: {
productInfo: [ productInfo: [
{ required: true, message: '产品不能为空', trigger: 'change' }, { required: true, message: '产品不能为空', trigger: 'change' },
], ],
number: [{ required: true, message: '数量不能为空', trigger: 'blur' }], number: [{ required: true, message: '数量不能为空', trigger: 'blur' }],
quality: [ grade: [{ required: true, message: '品质不能为空', trigger: 'change' }],
{ required: true, message: '品质不能为空', trigger: 'change' },
],
}, },
}; };
}, },
@ -117,15 +98,24 @@ export default {
this.visible = true; this.visible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields(); this.$refs['dataForm'].resetFields();
});
},
remoteMethod(query) {
if (query !== '') {
this.loading = true;
const params = { const params = {
pageSize: 100, pageSize: 100,
pageNo: 1, pageNo: 1,
warehouseId: this.warehouseId, goodSpecificationName: query,
// warehouseId: this.warehouseId,
}; };
getGoodSpecificationPage(params).then((response) => { getGoodSpecificationPage(params).then((response) => {
this.loading = false;
this.productArr = response.data.list; this.productArr = response.data.list;
}); });
}); } else {
this.productArr = [];
}
}, },
// //
dataFormSubmit() { dataFormSubmit() {

Просмотреть файл

@ -144,20 +144,6 @@ const warehouseStorehouseState = [
id: 2, id: 2,
}, },
]; ];
const qualityArr = [
{
name: 'A',
id: 0,
},
{
name: 'B',
id: 1,
},
{
name: 'C',
id: 2,
},
];
export default { export default {
mixins: [basicPage], mixins: [basicPage],
data() { data() {
@ -168,7 +154,6 @@ export default {
tableData: [], tableData: [],
processArr, processArr,
warehouseStorehouseState, warehouseStorehouseState,
qualityArr,
formConfig: [ formConfig: [
{ {
type: 'select', type: 'select',
@ -216,12 +201,10 @@ export default {
param: 'pname', param: 'pname',
}, },
{ {
type: 'select', type: 'input',
label: '品质', label: '品质',
selectOptions: qualityArr, placeholder: '品质',
param: 'quality', param: 'quality',
defaultSelect: '',
filterable: true,
}, },
{ {
type: 'select', type: 'select',
@ -298,7 +281,7 @@ export default {
this.listQuery.wareLayer = val.wareLayer; this.listQuery.wareLayer = val.wareLayer;
this.listQuery.trayCode = val.code; this.listQuery.trayCode = val.code;
this.listQuery.goodName = val.pname; this.listQuery.goodName = val.pname;
this.listQuery.quality = val.quality; this.listQuery.grade = val.quality;
this.listQuery.rollCode = val.rollCode; this.listQuery.rollCode = val.rollCode;
this.listQuery.process = val.processId; this.listQuery.process = val.processId;
this.listQuery.warehouseStorehouseState = this.listQuery.warehouseStorehouseState =

Просмотреть файл

@ -139,20 +139,6 @@ const warehouseStorehouseState = [
id: 2, id: 2,
}, },
]; ];
const qualityArr = [
{
name: 'A',
id: 0,
},
{
name: 'B',
id: 1,
},
{
name: 'C',
id: 2,
},
];
export default { export default {
mixins: [basicPage], mixins: [basicPage],
data() { data() {
@ -211,12 +197,10 @@ export default {
param: 'pname', param: 'pname',
}, },
{ {
type: 'select', type: 'input',
label: '品质', label: '品质',
selectOptions: qualityArr, placeholder: '品质',
param: 'quality', param: 'quality',
defaultSelect: '',
filterable: true,
}, },
{ {
type: 'select', type: 'select',
@ -295,7 +279,7 @@ export default {
this.listQuery.trayCode = val.code; this.listQuery.trayCode = val.code;
this.listQuery.goodName = val.pname; this.listQuery.goodName = val.pname;
this.listQuery.rollCode = val.rollCode; this.listQuery.rollCode = val.rollCode;
this.listQuery.quality = val.quality; this.listQuery.grade = val.quality;
this.listQuery.process = val.processId; this.listQuery.process = val.processId;
this.listQuery.warehouseStorehouseState = val.warehouseStorehouseStateId; this.listQuery.warehouseStorehouseState = val.warehouseStorehouseStateId;
this.getDataList(); this.getDataList();

Просмотреть файл

@ -188,10 +188,8 @@ const tableProps = [
width: 55, width: 55,
}, },
{ {
prop: 'quality', prop: 'grade',
label: '品质', label: '品质',
filter: codeFilter('quality'),
width: 55,
}, },
{ {
prop: 'cureTime', prop: 'cureTime',
@ -411,7 +409,7 @@ export default {
}, },
addList(data) { addList(data) {
data.productInfo.number = 1; data.productInfo.number = 1;
data.productInfo.quality = data.quality; data.productInfo.grade = data.grade;
for (let i = 0; i < data.number; i++) { for (let i = 0; i < data.number; i++) {
this.productAttributeList.push( this.productAttributeList.push(
JSON.parse(JSON.stringify(data.productInfo)) JSON.parse(JSON.stringify(data.productInfo))

Просмотреть файл

@ -24,8 +24,11 @@
v-model="dataForm.productInfo" v-model="dataForm.productInfo"
style="width: 100%" style="width: 100%"
filterable filterable
remote
:remote-method="remoteMethod"
value-key="id" value-key="id"
placeholder="请选择产品"> placeholder="请选择产品"
:loading="loading">
<el-option <el-option
v-for="item in productArr" v-for="item in productArr"
:key="item.id" :key="item.id"
@ -34,19 +37,12 @@
:disabled="!item.deactivate" /> :disabled="!item.deactivate" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="品质" prop="quality"> <el-form-item label="品质" prop="grade">
<el-select <el-input
v-model="dataForm.quality" v-model="dataForm.grade"
style="width: 100%" placeholder="请输入品质"
filterable clearable
value-key="id" :style="{ width: '100%' }" />
placeholder="请选择品质">
<el-option
v-for="item in qualityArr"
:key="item.id"
:label="item.name"
:value="item.id" />
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="数量" prop="number"> <el-form-item label="数量" prop="number">
<el-input-number v-model="dataForm.number" :step="1" :min="1" :max="12"></el-input-number> <el-input-number v-model="dataForm.number" :step="1" :min="1" :max="12"></el-input-number>
@ -77,23 +73,10 @@ export default {
index: -1, index: -1,
productInfo: null, productInfo: null,
number: 1, number: 1,
quality: null, grade: null,
}, },
productArr: [], productArr: [],
qualityArr: [ loading: false,
{
name: 'C',
id: 2,
},
{
name: 'B',
id: 1,
},
{
name: 'A',
id: 0,
},
],
dataRule: { dataRule: {
productInfo: [ productInfo: [
{ required: true, message: '产品不能为空', trigger: 'change' }, { required: true, message: '产品不能为空', trigger: 'change' },
@ -101,7 +84,7 @@ export default {
number: [ number: [
{ required: true, message: '数量不能为空', trigger: 'blur' }, { required: true, message: '数量不能为空', trigger: 'blur' },
], ],
quality: [ grade: [
{ required: true, message: '品质不能为空', trigger: 'change' }, { required: true, message: '品质不能为空', trigger: 'change' },
], ],
}, },
@ -115,15 +98,24 @@ export default {
this.visible = true; this.visible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields(); this.$refs['dataForm'].resetFields();
});
},
remoteMethod(query) {
if (query !== '') {
this.loading = true;
const params = { const params = {
pageSize: 100, pageSize: 100,
pageNo: 1, pageNo: 1,
warehouseId: this.warehouseId, goodSpecificationName: query,
// warehouseId: this.warehouseId,
}; };
getGoodSpecificationPage(params).then((response) => { getGoodSpecificationPage(params).then((response) => {
this.loading = false;
this.productArr = response.data.list; this.productArr = response.data.list;
}); });
}); } else {
this.productArr = [];
}
}, },
// //
dataFormSubmit() { dataFormSubmit() {

Просмотреть файл

@ -170,20 +170,6 @@ const warehouseStorehouseState = [
id: 2, id: 2,
}, },
]; ];
const qualityArr = [
{
name: 'A',
id: 0,
},
{
name: 'B',
id: 1,
},
{
name: 'C',
id: 2,
},
];
export default { export default {
mixins: [basicPage], mixins: [basicPage],
data() { data() {
@ -242,12 +228,10 @@ export default {
param: 'pname', param: 'pname',
}, },
{ {
type: 'select', type: 'input',
label: '品质', label: '品质',
selectOptions: qualityArr, placeholder: '品质',
param: 'quality', param: 'quality',
defaultSelect: '',
filterable: true,
}, },
{ {
type: 'select', type: 'select',
@ -326,7 +310,7 @@ export default {
this.listQuery.trayCode = val.code; this.listQuery.trayCode = val.code;
this.listQuery.goodName = val.pname; this.listQuery.goodName = val.pname;
this.listQuery.rollCode = val.rollCode; this.listQuery.rollCode = val.rollCode;
this.listQuery.quality = val.quality; this.listQuery.grade = val.quality;
this.listQuery.process = val.processId; this.listQuery.process = val.processId;
this.listQuery.warehouseStorehouseState = this.listQuery.warehouseStorehouseState =
val.warehouseStorehouseStateId; val.warehouseStorehouseStateId;

Просмотреть файл

@ -170,20 +170,6 @@ const warehouseStorehouseState = [
id: 2, id: 2,
}, },
]; ];
const qualityArr = [
{
name: 'A',
id: 0,
},
{
name: 'B',
id: 1,
},
{
name: 'C',
id: 2,
},
];
export default { export default {
mixins: [basicPage], mixins: [basicPage],
data() { data() {
@ -243,12 +229,10 @@ export default {
param: 'pname', param: 'pname',
}, },
{ {
type: 'select', type: 'input',
label: '品质', label: '品质',
selectOptions: qualityArr, placeholder: '品质',
param: 'quality', param: 'quality',
defaultSelect: '',
filterable: true,
}, },
{ {
type: 'select', type: 'select',
@ -326,7 +310,7 @@ export default {
this.listQuery.wareLayer = val.wareLayer; this.listQuery.wareLayer = val.wareLayer;
this.listQuery.trayCode = val.code; this.listQuery.trayCode = val.code;
this.listQuery.goodName = val.pname; this.listQuery.goodName = val.pname;
this.listQuery.quality = val.quality; this.listQuery.grade = val.quality;
this.listQuery.rollCode = val.rollCode; this.listQuery.rollCode = val.rollCode;
this.listQuery.process = val.processId; this.listQuery.process = val.processId;
this.listQuery.warehouseStorehouseState = this.listQuery.warehouseStorehouseState =