This commit is contained in:
朱文强 2024-01-16 15:31:55 +08:00
parent 97b8ddd3b5
commit dc406786e7
11 changed files with 530 additions and 142 deletions

View File

@ -2,7 +2,7 @@
# @Author: zwq # @Author: zwq
# @Date: 2023-08-17 15:10:53 # @Date: 2023-08-17 15:10:53
# @LastEditors: zwq # @LastEditors: zwq
# @LastEditTime: 2023-11-02 11:20:37 # @LastEditTime: 2024-01-15 14:08:52
# @Description: # @Description:
### ###
# 生产环境配置 # 生产环境配置
@ -12,10 +12,12 @@ ENV = 'production'
VUE_APP_TITLE = 南京锂膜管理系统 VUE_APP_TITLE = 南京锂膜管理系统
# 南京锂膜管理系统/生产环境 # 南京锂膜管理系统/生产环境
VUE_APP_BASE_API = '/prod-api' # VUE_APP_BASE_API = '/prod-api'
VUE_APP_BASE_API = ''
# 根据服务器或域名修改 # 根据服务器或域名修改
PUBLIC_PATH = 'http://192.168.0.31:8003/' # PUBLIC_PATH = 'http://192.168.0.31:8003/'
PUBLIC_PATH = ''
# 二级部署路径 # 二级部署路径
VUE_APP_APP_NAME ='yudao-admin' VUE_APP_APP_NAME ='yudao-admin'

View File

@ -33,6 +33,10 @@ const tableProps = [
prop: 'reqParameter', prop: 'reqParameter',
label: '请求参数', label: '请求参数',
}, },
{
prop: 'response',
label: '响应参数',
},
{ {
prop: 'createTime', prop: 'createTime',
label: '时间', label: '时间',

View File

@ -57,6 +57,10 @@ const tableProps = [
label: '堆垛机', label: '堆垛机',
width:110 width:110
}, },
{
prop: 'trayCode',
label: '托盘编码',
},
{ {
prop: 'agv', prop: 'agv',
label: 'agv', label: 'agv',
@ -132,20 +136,6 @@ const mainTaskState = [
id: 7, id: 7,
}, },
]; ];
const agvArr = [
{
name: 'A1',
id: 1,
},
{
name: 'A2',
id: 2,
},
{
name: 'A3',
id: 3,
},
];
export default { export default {
mixins: [basicPage], mixins: [basicPage],
data() { data() {
@ -161,10 +151,10 @@ export default {
}, },
tableProps, tableProps,
tableBtn: [ tableBtn: [
{ // {
type: 'canlce', // type: 'canlce',
btnName: '取消', // btnName: '',
}, // },
], ],
tableData: [], tableData: [],
formConfig: [ formConfig: [
@ -182,6 +172,12 @@ export default {
defaultSelect: '', defaultSelect: '',
filterable: true, filterable: true,
}, },
{
type: 'input',
label: '托盘编码',
placeholder: '托盘编码',
param: 'tcode',
},
{ {
type: 'select', type: 'select',
label: '状态', label: '状态',
@ -193,7 +189,7 @@ export default {
{ {
type: 'select', type: 'select',
label: 'agv', label: 'agv',
selectOptions: agvArr, selectOptions: [],
param: 'agv', param: 'agv',
defaultSelect: '', defaultSelect: '',
filterable: true, filterable: true,
@ -224,8 +220,19 @@ export default {
}; };
}, },
components: {}, components: {},
created() {}, created() {
this.setFormConfig();
},
methods: { methods: {
setFormConfig() {
for (let i = 1; i <= 16; i++) {
const obj = {
id: i,
name: i,
};
this.formConfig[4].selectOptions.push(obj);
}
},
buttonClick(val) { buttonClick(val) {
switch (val.btnName) { switch (val.btnName) {
case 'search': case 'search':
@ -233,6 +240,7 @@ export default {
this.listQuery.pageSize = 10; this.listQuery.pageSize = 10;
this.listQuery.mainTaskCode = val.code; this.listQuery.mainTaskCode = val.code;
this.listQuery.mainTaskType = val.taskType; this.listQuery.mainTaskType = val.taskType;
this.listQuery.trayCode = val.tcode;
this.listQuery.mainTaskState = val.status; this.listQuery.mainTaskState = val.status;
this.listQuery.agv = val.agv; this.listQuery.agv = val.agv;
this.listQuery.createTime = val.searchTime; this.listQuery.createTime = val.searchTime;

View File

@ -50,6 +50,10 @@ const tableProps = [
label: '堆垛机', label: '堆垛机',
width:110 width:110
}, },
{
prop: 'trayCode',
label: '托盘编码',
},
{ {
prop: 'agv', prop: 'agv',
label: 'agv', label: 'agv',
@ -92,6 +96,10 @@ const mainTaskType = [
name: '移库', name: '移库',
id: 3, id: 3,
}, },
{
name: '出库带移库',
id: 4,
},
]; ];
const mainTaskState = [ const mainTaskState = [
{ {
@ -119,33 +127,23 @@ const mainTaskState = [
id: 5, id: 5,
}, },
]; ];
const agvArr = [
{
name: 'A1',
id: 1,
},
{
name: 'A2',
id: 2,
},
{
name: 'A3',
id: 3,
},
];
const stackerArr = [ const stackerArr = [
{ {
name: 'D1', name: '1',
id: 1, id: 1,
}, },
{ {
name: 'D2', name: '2',
id: 2, id: 2,
}, },
{ {
name: 'D3', name: '3',
id: 3, id: 3,
}, },
{
name: '4',
id: 4,
},
]; ];
export default { export default {
mixins: [basicPage], mixins: [basicPage],
@ -171,6 +169,12 @@ export default {
defaultSelect: '', defaultSelect: '',
filterable: true, filterable: true,
}, },
{
type: 'input',
label: '托盘编码',
placeholder: '托盘编码',
param: 'tcode',
},
// { // {
// type: 'select', // type: 'select',
// label: '', // label: '',
@ -190,7 +194,7 @@ export default {
{ {
type: 'select', type: 'select',
label: 'agv', label: 'agv',
selectOptions: agvArr, selectOptions: [],
param: 'agv', param: 'agv',
defaultSelect: '', defaultSelect: '',
filterable: true, filterable: true,
@ -223,8 +227,18 @@ export default {
components: {}, components: {},
created() { created() {
this.listQuery.mainTaskState = 5; this.listQuery.mainTaskState = 5;
}, this.setFormConfig();
},
methods: { methods: {
setFormConfig() {
for (let i = 1; i <= 16; i++) {
const obj = {
id: i,
name: i,
};
this.formConfig[4].selectOptions.push(obj);
}
},
buttonClick(val) { buttonClick(val) {
switch (val.btnName) { switch (val.btnName) {
case 'search': case 'search':
@ -232,6 +246,7 @@ export default {
this.listQuery.pageSize = 10; this.listQuery.pageSize = 10;
this.listQuery.mainTaskCode = val.code; this.listQuery.mainTaskCode = val.code;
this.listQuery.mainTaskType = val.taskType; this.listQuery.mainTaskType = val.taskType;
this.listQuery.trayCode = val.tcode;
// this.listQuery.mainTaskState = val.status; // this.listQuery.mainTaskState = val.status;
this.listQuery.mainTaskState = 5; this.listQuery.mainTaskState = 5;
this.listQuery.stacker = val.stacker; this.listQuery.stacker = val.stacker;

View File

@ -109,12 +109,12 @@ export default {
btnName: '编辑', btnName: '编辑',
} }
: undefined, : undefined,
this.$auth.hasPermi(`asrs:warehouse-storehouse:delete`) // this.$auth.hasPermi(`asrs:warehouse-storehouse:delete`)
? { // ? {
type: 'delete', // type: 'delete',
btnName: '删除', // btnName: '',
} // }
: undefined, // : undefined,
].filter((v)=>v), ].filter((v)=>v),
tableData: [], tableData: [],
formConfig: [ formConfig: [
@ -136,16 +136,16 @@ export default {
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
{ // {
type: 'separate', // type: 'separate',
}, // },
{ // {
type: this.$auth.hasPermi('asrs:warehouse-storehouse:create') ? 'button' : '', // type: this.$auth.hasPermi('asrs:warehouse-storehouse:create') ? 'button' : '',
btnName: '新增', // btnName: '',
name: 'add', // name: 'add',
color: 'success', // color: 'success',
plain: true, // plain: true,
}, // },
// { // {
// type: this.$auth.hasPermi('base:factory:create') ? 'separate' : '', // type: this.$auth.hasPermi('base:factory:create') ? 'separate' : '',
// }, // },

View File

@ -110,12 +110,12 @@ export default {
btnName: '编辑', btnName: '编辑',
} }
: undefined, : undefined,
this.$auth.hasPermi(`asrs:warehouse-storehouse:delete`) // this.$auth.hasPermi(`asrs:warehouse-storehouse:delete`)
? { // ? {
type: 'delete', // type: 'delete',
btnName: '删除', // btnName: '',
} // }
: undefined, // : undefined,
].filter((v)=>v), ].filter((v)=>v),
tableData: [], tableData: [],
formConfig: [ formConfig: [
@ -137,16 +137,16 @@ export default {
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
{ // {
type: 'separate', // type: 'separate',
}, // },
{ // {
type: this.$auth.hasPermi('asrs:warehouse-storehouse:create') ? 'button' : '', // type: this.$auth.hasPermi('asrs:warehouse-storehouse:create') ? 'button' : '',
btnName: '新增', // btnName: '',
name: 'add', // name: 'add',
color: 'success', // color: 'success',
plain: true, // plain: true,
}, // },
// { // {
// type: this.$auth.hasPermi('base:factory:create') ? 'separate' : '', // type: this.$auth.hasPermi('base:factory:create') ? 'separate' : '',
// }, // },

View File

@ -144,6 +144,20 @@ 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() {
@ -154,17 +168,39 @@ export default {
tableData: [], tableData: [],
processArr, processArr,
warehouseStorehouseState, warehouseStorehouseState,
qualityArr,
formConfig: [ formConfig: [
{ {
type: 'input', type: 'select',
label: '库位名', label: '排',
placeholder: '库位名', selectOptions: [],
param: 'name', param: 'wareRow',
defaultSelect: '',
filterable: true,
width: 100
},
{
type: 'select',
label: '列',
selectOptions: [],
param: 'wareColumn',
defaultSelect: '',
filterable: true,
width: 100
},
{
type: 'select',
label: '层',
selectOptions: [],
param: 'wareLayer',
defaultSelect: '',
filterable: true,
width: 100
}, },
{ {
type: 'input', type: 'input',
label: '库位编码', label: '托盘编码',
placeholder: '库位编码', placeholder: '托盘编码',
param: 'code', param: 'code',
}, },
{ {
@ -174,10 +210,12 @@ export default {
param: 'pname', param: 'pname',
}, },
{ {
type: 'input', type: 'select',
label: '产品编码', label: '品质',
placeholder: '产品编码', selectOptions: qualityArr,
param: 'pcode', param: 'quality',
defaultSelect: '',
filterable: true,
}, },
{ {
type: 'select', type: 'select',
@ -217,17 +255,44 @@ export default {
AddOrUpdate, AddOrUpdate,
product, product,
}, },
created() {}, created() {
this.setFormConfig();
},
methods: { methods: {
setFormConfig() {
for (let i = 1; i <= 16; i++) {
const obj = {
id: i,
name: i + '排',
};
this.formConfig[0].selectOptions.push(obj);
}
for (let i = 1; i <= 30; i++) {
const obj = {
id: i,
name: i + '列',
};
this.formConfig[1].selectOptions.push(obj);
}
for (let i = 1; i <= 4; i++) {
const obj = {
id: i,
name: i + '层',
};
this.formConfig[2].selectOptions.push(obj);
}
},
buttonClick(val) { buttonClick(val) {
switch (val.btnName) { switch (val.btnName) {
case 'search': case 'search':
this.listQuery.pageNo = 1; this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10; this.listQuery.pageSize = 10;
this.listQuery.warehouseStorehouseName = val.name; this.listQuery.wareRow = val.wareRow;
this.listQuery.warehouseStorehouseCode = val.code; this.listQuery.wareColumn = val.wareColumn;
this.listQuery.wareLayer = val.wareLayer;
this.listQuery.trayCode = val.code;
this.listQuery.goodName = val.pname; this.listQuery.goodName = val.pname;
this.listQuery.goodCode = val.pcode; this.listQuery.quality = val.quality;
this.listQuery.process = val.processId; this.listQuery.process = val.processId;
this.listQuery.warehouseStorehouseState = this.listQuery.warehouseStorehouseState =
val.warehouseStorehouseStateId; val.warehouseStorehouseStateId;

View File

@ -139,6 +139,20 @@ 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() {
@ -152,15 +166,36 @@ export default {
bPage: true, bPage: true,
formConfig: [ formConfig: [
{ {
type: 'input', type: 'select',
label: '库位名', label: '排',
placeholder: '库位名', selectOptions: [],
param: 'name', param: 'wareRow',
defaultSelect: '',
filterable: true,
width: 100
},
{
type: 'select',
label: '列',
selectOptions: [],
param: 'wareColumn',
defaultSelect: '',
filterable: true,
width: 100
},
{
type: 'select',
label: '层',
selectOptions: [],
param: 'wareLayer',
defaultSelect: '',
filterable: true,
width: 100
}, },
{ {
type: 'input', type: 'input',
label: '库位编码', label: '托盘编码',
placeholder: '库位编码', placeholder: '托盘编码',
param: 'code', param: 'code',
}, },
{ {
@ -170,10 +205,12 @@ export default {
param: 'pname', param: 'pname',
}, },
{ {
type: 'input', type: 'select',
label: '产品编码', label: '品质',
placeholder: '产品编码', selectOptions: qualityArr,
param: 'pcode', param: 'quality',
defaultSelect: '',
filterable: true,
}, },
{ {
type: 'select', type: 'select',
@ -215,17 +252,43 @@ export default {
}, },
created() { created() {
this.listQuery.warehouseId = this.bId; this.listQuery.warehouseId = this.bId;
}, this.setFormConfig();
},
methods: { methods: {
setFormConfig() {
for (let i = 1; i <= 16; i++) {
const obj = {
id: i,
name: i + '排',
};
this.formConfig[0].selectOptions.push(obj);
}
for (let i = 1; i <= 30; i++) {
const obj = {
id: i,
name: i + '列',
};
this.formConfig[1].selectOptions.push(obj);
}
for (let i = 1; i <= 4; i++) {
const obj = {
id: i,
name: i + '层',
};
this.formConfig[2].selectOptions.push(obj);
}
},
buttonClick(val) { buttonClick(val) {
switch (val.btnName) { switch (val.btnName) {
case 'search': case 'search':
this.listQuery.pageNo = 1; this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10; this.listQuery.pageSize = 10;
this.listQuery.warehouseStorehouseName = val.name; this.listQuery.wareRow = val.wareRow;
this.listQuery.warehouseStorehouseCode = val.code; this.listQuery.wareColumn = val.wareColumn;
this.listQuery.wareLayer = val.wareLayer;
this.listQuery.trayCode = val.code;
this.listQuery.goodName = val.pname; this.listQuery.goodName = val.pname;
this.listQuery.goodCode = val.pcode; this.listQuery.quality = 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();

View File

@ -170,6 +170,20 @@ 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() {
@ -183,10 +197,31 @@ export default {
warehouseStorehouseState, warehouseStorehouseState,
formConfig: [ formConfig: [
{ {
type: 'input', type: 'select',
label: '库位名', label: '排',
placeholder: '库位名', selectOptions: [],
param: 'name', param: 'wareRow',
defaultSelect: '',
filterable: true,
width: 100
},
{
type: 'select',
label: '列',
selectOptions: [],
param: 'wareColumn',
defaultSelect: '',
filterable: true,
width: 100
},
{
type: 'select',
label: '层',
selectOptions: [],
param: 'wareLayer',
defaultSelect: '',
filterable: true,
width: 100
}, },
{ {
type: 'input', type: 'input',
@ -201,10 +236,12 @@ export default {
param: 'pname', param: 'pname',
}, },
{ {
type: 'input', type: 'select',
label: '产品编码', label: '品质',
placeholder: '产品编码', selectOptions: qualityArr,
param: 'pcode', param: 'quality',
defaultSelect: '',
filterable: true,
}, },
{ {
type: 'select', type: 'select',
@ -228,6 +265,15 @@ export default {
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
// {
// type: this.$auth.hasPermi('base:factory:create') ? 'separate' : '',
// },
// {
// type: this.$auth.hasPermi('base:factory:export') ? 'button' : '',
// btnName: '',
// name: 'export',
// color: 'warning',
// },
], ],
}; };
}, },
@ -236,17 +282,44 @@ export default {
product, product,
outOrMove, outOrMove,
}, },
created() {}, created() {
this.setFormConfig();
},
methods: { methods: {
setFormConfig() {
for (let i = 1; i <= 16; i++) {
const obj = {
id: i,
name: i + '排',
};
this.formConfig[0].selectOptions.push(obj);
}
for (let i = 1; i <= 30; i++) {
const obj = {
id: i,
name: i + '列',
};
this.formConfig[1].selectOptions.push(obj);
}
for (let i = 1; i <= 4; i++) {
const obj = {
id: i,
name: i + '层',
};
this.formConfig[2].selectOptions.push(obj);
}
},
buttonClick(val) { buttonClick(val) {
switch (val.btnName) { switch (val.btnName) {
case 'search': case 'search':
this.listQuery.pageNo = 1; this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10; this.listQuery.pageSize = 10;
this.listQuery.warehouseStorehouseName = val.name; this.listQuery.wareRow = val.wareRow;
this.listQuery.wareColumn = val.wareColumn;
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.goodCode = val.pcode; this.listQuery.quality = val.quality;
this.listQuery.process = val.processId; this.listQuery.process = val.processId;
this.listQuery.warehouseStorehouseState = this.listQuery.warehouseStorehouseState =
val.warehouseStorehouseStateId; val.warehouseStorehouseStateId;
@ -286,7 +359,7 @@ export default {
this.addOrUpdateVisible = true; this.addOrUpdateVisible = true;
this.addOrEditTitle = '移库'; this.addOrEditTitle = '移库';
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id, 1,this.listQuery.warehouseId); this.$refs.addOrUpdate.init(val.data.id, 1,this.listQuery.warehouseId,val.data.stacker);
}); });
} else if (val.type === 'in') { } else if (val.type === 'in') {
this.drawerVisible = true; this.drawerVisible = true;

View File

@ -170,6 +170,20 @@ 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() {
@ -184,10 +198,31 @@ export default {
warehouseStorehouseState, warehouseStorehouseState,
formConfig: [ formConfig: [
{ {
type: 'input', type: 'select',
label: '库位名', label: '排',
placeholder: '库位名', selectOptions: [],
param: 'name', param: 'wareRow',
defaultSelect: '',
filterable: true,
width: 100
},
{
type: 'select',
label: '列',
selectOptions: [],
param: 'wareColumn',
defaultSelect: '',
filterable: true,
width: 100
},
{
type: 'select',
label: '层',
selectOptions: [],
param: 'wareLayer',
defaultSelect: '',
filterable: true,
width: 100
}, },
{ {
type: 'input', type: 'input',
@ -202,10 +237,12 @@ export default {
param: 'pname', param: 'pname',
}, },
{ {
type: 'input', type: 'select',
label: '产品编码', label: '品质',
placeholder: '产品编码', selectOptions: qualityArr,
param: 'pcode', param: 'quality',
defaultSelect: '',
filterable: true,
}, },
{ {
type: 'select', type: 'select',
@ -229,6 +266,15 @@ export default {
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
// {
// type: this.$auth.hasPermi('base:factory:create') ? 'separate' : '',
// },
// {
// type: this.$auth.hasPermi('base:factory:export') ? 'button' : '',
// btnName: '',
// name: 'export',
// color: 'warning',
// },
], ],
}; };
}, },
@ -239,17 +285,42 @@ export default {
}, },
created() { created() {
this.listQuery.warehouseId = this.bId; this.listQuery.warehouseId = this.bId;
this.setFormConfig();
}, },
methods: { methods: {
setFormConfig() {
for (let i = 1; i <= 16; i++) {
const obj = {
id: i,
name: i + '排',
};
this.formConfig[0].selectOptions.push(obj);
}
for (let i = 1; i <= 30; i++) {
const obj = {
id: i,
name: i + '列',
};
this.formConfig[1].selectOptions.push(obj);
}
for (let i = 1; i <= 4; i++) {
const obj = {
id: i,
name: i + '层',
};
this.formConfig[2].selectOptions.push(obj);
}
},
buttonClick(val) { buttonClick(val) {
switch (val.btnName) { switch (val.btnName) {
case 'search': case 'search':
this.listQuery.pageNo = 1; this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10; this.listQuery.pageSize = 10;
this.listQuery.warehouseStorehouseName = val.name; this.listQuery.wareColumn = val.wareColumn;
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.goodCode = val.pcode; this.listQuery.quality = val.quality;
this.listQuery.process = val.processId; this.listQuery.process = val.processId;
this.listQuery.warehouseStorehouseState = this.listQuery.warehouseStorehouseState =
val.warehouseStorehouseStateId; val.warehouseStorehouseStateId;
@ -288,7 +359,7 @@ export default {
this.addOrUpdateVisible = true; this.addOrUpdateVisible = true;
this.addOrEditTitle = '移库'; this.addOrEditTitle = '移库';
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id, 1,this.listQuery.warehouseId); this.$refs.addOrUpdate.init(val.data.id, 1,this.listQuery.warehouseId,val.data.stacker);
}); });
} else if (val.type === 'in') { } else if (val.type === 'in') {
this.drawerVisible = true; this.drawerVisible = 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-02 11:15:57 * @LastEditTime: 2024-01-16 14:49:00
* @Description: * @Description:
--> -->
<template> <template>
@ -11,9 +11,11 @@
:rules="dataRule" :rules="dataRule"
ref="dataForm" ref="dataForm"
@keyup.enter.native="dataFormSubmit()" @keyup.enter.native="dataFormSubmit()"
label-width="150px"> label-width="60px">
<el-form-item <el-form-item
:label="type ? '选择移库位置' : '选择出库到货位置'" v-if="!type"
label-width="150px"
label="选择出库到货位置"
prop="targetId"> prop="targetId">
<el-select <el-select
v-model="dataForm.targetId" v-model="dataForm.targetId"
@ -22,17 +24,55 @@
<el-option <el-option
v-for="item in potArr" v-for="item in potArr"
:key="item.id" :key="item.id"
:label="item.warehouseStorehouseName" :label="item.lineEdgeLibraryCode"
:value="item.id" /> :value="item.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<div v-else style="display: flex; justify-content: space-around">
<el-form-item label="排" prop="wareRow">
<el-select
v-model="dataForm.wareRow"
style="width: 150px"
placeholder="请选择排">
<el-option
v-for="item in potArr1"
:key="item.id"
:label="item.label"
:value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="列" prop="wareColumn">
<el-select
v-model="dataForm.wareColumn"
style="width: 150px"
placeholder="请选择列">
<el-option
v-for="item in potArr2"
:key="item.id"
:label="item.label"
:value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="层" prop="wareLayer">
<el-select
v-model="dataForm.wareLayer"
style="width: 150px"
placeholder="请选择层">
<el-option
v-for="item in potArr3"
:key="item.id"
:label="item.label"
:value="item.id" />
</el-select>
</el-form-item>
</div>
</el-form> </el-form>
</template> </template>
<script> <script>
import basicAdd from '../mixins/basic-add'; import basicAdd from '../mixins/basic-add';
import { import {
getWarehouseStorehouseList, getWarehouseStorehousePage,
moveStorehouse, moveStorehouse,
outWarehouseStorehouse, outWarehouseStorehouse,
getLineList, getLineList,
@ -40,38 +80,71 @@ import {
} from '@/api/asrs/warehouseStorehouse'; } from '@/api/asrs/warehouseStorehouse';
import { getWarehouseStorehouseGoodsSpecificationPage } from '@/api/asrs/warehouseStorehouseGoodsSpecification'; import { getWarehouseStorehouseGoodsSpecificationPage } from '@/api/asrs/warehouseStorehouseGoodsSpecification';
const potArr3 = [
{ label: '1层', id: 1 },
{ label: '2层', id: 2 },
{ label: '3层', id: 3 },
{ label: '4层', id: 4 },
];
export default { export default {
mixins: [basicAdd], mixins: [basicAdd],
data() { data() {
return { return {
urlOptions: {}, urlOptions: {},
warehouseId: null,
dataForm: { dataForm: {
sourceId: undefined, sourceId: undefined,
targetId: undefined, targetId: undefined,
wareRow: undefined,
wareColumn: undefined,
wareLayer: undefined,
}, },
wareInfo: { wareInfo: {
list:[] list: [],
}, },
potArr: [], potArr: [],
potArr1: [],
potArr2: [],
potArr3,
type: 0, type: 0,
dataRule: { dataRule: {
targetId: [ targetId: [
{ required: true, message: '位置不能为空', trigger: 'blur' }, { required: true, message: '位置不能为空', trigger: 'blur' },
], ],
wareRow: [{ required: true, message: '排不能为空', trigger: 'blur' }],
wareColumn: [
{ required: true, message: '列不能为空', trigger: 'blur' },
],
wareLayer: [{ required: true, message: '层不能为空', trigger: 'blur' }],
}, },
}; };
}, },
methods: { methods: {
init(id, type, wId) { init(id, type, wId, stacker) {
this.dataForm.sourceId = id || ''; this.dataForm.sourceId = id || '';
this.warehouseId = wId || null;
this.dataForm.targetId = null
this.type = type; this.type = type;
this.visible = true; this.visible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields(); this.$refs['dataForm'].resetFields();
if (this.type) { if (this.type) {
getWarehouseStorehouseList({ warehouseId: wId,warehouseStorehouseState:0 }).then((response) => { this.potArr1.splice(0, this.potArr1.length);
this.potArr = response.data; for (let i = 1; i <= 4; i++) {
}); const obj = {
id: i + (stacker - 1) * 4,
label: i + (stacker - 1) * 4 + '排',
};
this.potArr1.push(obj);
}
this.potArr2.splice(0, this.potArr2.length);
for (let i = 1; i <= 30; i++) {
const obj = {
id: i,
label: i + '列',
};
this.potArr2.push(obj);
}
return; return;
} }
getLineList().then((response) => { getLineList().then((response) => {
@ -98,13 +171,27 @@ export default {
return false; return false;
} }
if (this.type) { if (this.type) {
moveStorehouse(this.dataForm.sourceId, this.dataForm.targetId).then( const lQ = {
(response) => { warehouseId: this.warehouseId,
this.$modal.msgSuccess('移库成功'); wareRow: this.dataForm.wareRow,
this.visible = false; wareColumn: this.dataForm.wareColumn,
this.$emit('refreshDataList'); wareLayer: this.dataForm.wareLayer,
pageSize: 10,
pageNo: 1,
};
getWarehouseStorehousePage(lQ).then((response) => {
if (response.data.list) {
this.dataForm.targetId = response.data.list[0].id;
moveStorehouse(
this.dataForm.sourceId,
this.dataForm.targetId
).then((response) => {
this.$modal.msgSuccess('移库成功');
this.visible = false;
this.$emit('refreshDataList');
});
} }
); });
return; return;
} }
const pos = this.potArr.find((item) => { const pos = this.potArr.find((item) => {