This commit is contained in:
2023-10-13 16:09:30 +08:00
parent 78796203f6
commit d51328c836
49 changed files with 985 additions and 600 deletions

View File

@@ -59,17 +59,17 @@
</el-col>
<el-col :span="8">
<el-form-item
label="选择入库位置"
label="选择起点位置"
prop="inWarehouseStorehouseName">
<el-select
v-model="dataForm.inWarehouseStorehouseName"
style="width: 100%"
@change="$forceUpdate()"
placeholder="请选择入库位置">
placeholder="请选择起点位置">
<el-option
v-for="item in potArr"
:key="item.id"
:label="item.warehouseStorehouseName"
:label="item.lineEdgeLibraryCode"
:value="item.id" />
</el-select>
</el-form-item>
@@ -130,7 +130,7 @@ import {
getWarehouseStorehouseGoodsSpecificationPage,
deleteWarehouseStorehouseGoodsSpecification,
} from '@/api/asrs/warehouseStorehouseGoodsSpecification';
import { getWarehouseStorehouseList } from '@/api/asrs/warehouseStorehouse';
import { getLineList } from '@/api/asrs/warehouseStorehouse';
import productAttrAdd from './attr-add';
import inputArea from '../mixins/inputArea';
import selectQuality from '../mixins/selectQuality';
@@ -244,7 +244,7 @@ export default {
this.dataForm = val;
this.initData();
this.visible = true;
getWarehouseStorehouseList().then((response) => {
getLineList().then((response) => {
this.potArr = response.data;
});
this.$nextTick(() => {

View File

@@ -30,7 +30,8 @@
v-for="item in productArr"
:key="item.id"
:label="item.goodSpecificationName"
:value="item" />
:value="item"
:disabled="!item.deactivate" />
</el-select>
</el-form-item>
</el-form>

View File

@@ -43,7 +43,10 @@
<span>{{ scope.row.cacheLocation === 0 ? '否' : '是' }}</span>
</template>
</el-table-column>
<el-table-column prop="warehouseStorehouseState" label="库位状态" width="100">
<el-table-column
prop="warehouseStorehouseState"
label="库位状态"
width="100">
<template slot-scope="scope">
<span>
{{
@@ -57,30 +60,41 @@
</el-table-column>
<el-table-column label="操作" width="100">
<template v-slot="scope">
<el-button
size="mini"
v-if="scope.row.warehouseStorehouseState === 0"
type="text"
@click="handleClick({ data: { id: scope.row }, type: 'in' })"
v-hasPermi="['asrs:warehouse-storehouse-storage:update']">
入库
</el-button>
<el-button
size="mini"
v-if="scope.row.warehouseStorehouseState === 2"
type="text"
@click="handleClick({ data: scope.row, type: 'out' })"
v-hasPermi="['asrs:warehouse-storehouse-storage:update']">
出库
</el-button>
<el-button
size="mini"
v-if="scope.row.warehouseStorehouseState === 2"
type="text"
@click="handleClick({ data: scope.row, type: 'move' })"
v-hasPermi="['asrs:warehouse-storehouse-storage:update']">
移库
</el-button>
<span v-if="scope.row.deactivate === 1">
<el-button
size="mini"
v-if="scope.row.warehouseStorehouseState === 0"
type="text"
@click="handleClick({ data: { id: scope.row }, type: 'in' })"
v-hasPermi="['asrs:warehouse-storehouse-storage:update']">
入库
</el-button>
<el-button
size="mini"
v-if="scope.row.warehouseStorehouseState === 2"
type="text"
@click="handleClick({ data: scope.row, type: 'out' })"
v-hasPermi="['asrs:warehouse-storehouse-storage:update']">
出库
</el-button>
<el-button
size="mini"
v-if="scope.row.warehouseStorehouseState === 2"
type="text"
@click="handleClick({ data: scope.row, type: 'move' })"
v-hasPermi="['asrs:warehouse-storehouse-storage:update']">
移库
</el-button>
</span>
<span v-else>
<el-button
size="mini"
type="text"
@click="handleClick({ data: { id: scope.row }, type: 'restore' })"
v-hasPermi="['asrs:warehouse-storehouse-storage:update']">
启用库位
</el-button>
</span>
</template>
</el-table-column>
</el-table>
@@ -115,7 +129,10 @@ import product from '../product-mini';
import basicPage from '../mixins/basic-page';
import { parseTime } from '../mixins/code-filter';
import { getWarehouseStorehousePage } from '@/api/asrs/warehouseStorehouse';
import {
getWarehouseStorehousePage,
updateWarehouseStorehouse,
} from '@/api/asrs/warehouseStorehouse';
const processArr = [
{
@@ -238,7 +255,7 @@ export default {
case 'reset':
this.$refs.searchBarForm.resetForm();
this.listQuery = {
warehouseId:'1696803324030865409',
warehouseId: '1696803324030865409',
pageSize: 10,
pageNo: 1,
total: 1,
@@ -276,6 +293,15 @@ export default {
this.$nextTick(() => {
this.$refs.drawerRef.init(val.data.id);
});
} else if (val.type === 'restore') {
const dataForm = {
id: val.data.id.id,
deactivate: 1,
};
updateWarehouseStorehouse(dataForm).then((response) => {
this.$modal.msgSuccess('启用成功');
this.getDataList();
});
} else {
console.log(11);
}

View File

@@ -43,7 +43,10 @@
<span>{{ scope.row.cacheLocation === 0 ? '否' : '是' }}</span>
</template>
</el-table-column>
<el-table-column prop="warehouseStorehouseState" label="库位状态" width="100">
<el-table-column
prop="warehouseStorehouseState"
label="库位状态"
width="100">
<template slot-scope="scope">
<span>
{{
@@ -57,30 +60,41 @@
</el-table-column>
<el-table-column label="操作" width="100">
<template v-slot="scope">
<el-button
size="mini"
v-if="scope.row.warehouseStorehouseState === 0"
type="text"
@click="handleClick({ data: { id: scope.row }, type: 'in' })"
v-hasPermi="['asrs:warehouse-storehouse-storage:update']">
入库
</el-button>
<el-button
size="mini"
v-if="scope.row.warehouseStorehouseState === 2"
type="text"
@click="handleClick({ data: scope.row, type: 'out' })"
v-hasPermi="['asrs:warehouse-storehouse-storage:update']">
出库
</el-button>
<el-button
size="mini"
v-if="scope.row.warehouseStorehouseState === 2"
type="text"
@click="handleClick({ data: scope.row, type: 'move' })"
v-hasPermi="['asrs:warehouse-storehouse-storage:update']">
移库
</el-button>
<span v-if="scope.row.deactivate === 1">
<el-button
size="mini"
v-if="scope.row.warehouseStorehouseState === 0"
type="text"
@click="handleClick({ data: { id: scope.row }, type: 'in' })"
v-hasPermi="['asrs:warehouse-storehouse-storage:update']">
入库
</el-button>
<el-button
size="mini"
v-if="scope.row.warehouseStorehouseState === 2"
type="text"
@click="handleClick({ data: scope.row, type: 'out' })"
v-hasPermi="['asrs:warehouse-storehouse-storage:update']">
出库
</el-button>
<el-button
size="mini"
v-if="scope.row.warehouseStorehouseState === 2"
type="text"
@click="handleClick({ data: scope.row, type: 'move' })"
v-hasPermi="['asrs:warehouse-storehouse-storage:update']">
移库
</el-button>
</span>
<span v-else>
<el-button
size="mini"
type="text"
@click="handleClick({ data: { id: scope.row }, type: 'restore' })"
v-hasPermi="['asrs:warehouse-storehouse-storage:update']">
启用库位
</el-button>
</span>
</template>
</el-table-column>
</el-table>
@@ -115,7 +129,10 @@ import product from '../product-mini';
import basicPage from '../mixins/basic-page';
import { parseTime } from '../mixins/code-filter';
import { getWarehouseStorehousePage } from '@/api/asrs/warehouseStorehouse';
import {
getWarehouseStorehousePage,
updateWarehouseStorehouse,
} from '@/api/asrs/warehouseStorehouse';
const processArr = [
{
@@ -163,7 +180,7 @@ export default {
tableData: [],
processArr,
drawerVisible: false,
bPage: true,
bPage: true,
warehouseStorehouseState,
formConfig: [
{
@@ -222,7 +239,7 @@ export default {
},
created() {
this.listQuery.warehouseId = this.bId;
},
},
methods: {
buttonClick(val) {
switch (val.btnName) {
@@ -278,6 +295,15 @@ export default {
this.$nextTick(() => {
this.$refs.drawerRef.init(val.data.id);
});
} else if (val.type === 'restore') {
const dataForm = {
id: val.data.id.id,
deactivate: 1,
};
updateWarehouseStorehouse(dataForm).then((response) => {
this.$modal.msgSuccess('启用成功');
this.getDataList();
});
} else {
console.log(11);
}

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
* @LastEditTime: 2023-10-09 15:49:08
* @LastEditTime: 2023-10-11 13:45:45
* @Description:
-->
<template>
@@ -12,67 +12,85 @@
ref="dataForm"
@keyup.enter.native="dataFormSubmit()"
label-width="150px">
<el-form-item :label="type?'选择移库位置':'选择出库到货位置'" prop="targetId">
<el-select
v-model="dataForm.targetId"
style="width: 100%"
placeholder="请选择位置">
<el-option
v-for="item in potArr"
:key="item.id"
:label="item.warehouseStorehouseName"
:value="item.id" />
</el-select>
<el-form-item
:label="type ? '选择移库位置' : '选择出库到货位置'"
prop="targetId">
<el-select
v-model="dataForm.targetId"
style="width: 100%"
placeholder="请选择位置">
<el-option
v-for="item in potArr"
:key="item.id"
:label="item.warehouseStorehouseName"
:value="item.id" />
</el-select>
</el-form-item>
</el-form>
</template>
<script>
import basicAdd from '../mixins/basic-add';
import { getWarehouseStorehouseList,moveStorehouse } from "@/api/asrs/warehouseStorehouse";
import {
getWarehouseStorehouseList,
moveStorehouse,
getLineList,
} from '@/api/asrs/warehouseStorehouse';
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
},
urlOptions: {},
dataForm: {
sourceId: undefined,
targetId: undefined,
sourceId: undefined,
targetId: undefined,
},
potArr: [],
type: 0,
potArr: [],
type: 0,
dataRule: {
targetId: [{ required: true, message: "位置不能为空", trigger: "blur" }],
}
targetId: [
{ required: true, message: '位置不能为空', trigger: 'blur' },
],
},
};
},
methods: {
init(id,type) {
this.dataForm.sourceId = id || "";
this.type = type
this.visible = true;
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
getWarehouseStorehouseList().then((response) => {
this.potArr = response.data;
init(id, type) {
this.dataForm.sourceId = id || '';
this.type = type;
this.visible = true;
this.$nextTick(() => {
this.$refs['dataForm'].resetFields();
if (this.type) {
getWarehouseStorehouseList().then((response) => {
this.potArr = response.data;
});
return;
}
getLineList().then((response) => {
this.potArr = response.data;
});
});
});
},
// 表单提交
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
moveStorehouse(this.dataForm.sourceId,this.dataForm.targetId).then(response => {
this.$modal.msgSuccess("修改成功");
this.visible = false;
this.$emit("refreshDataList");
});
});
},
},
// 表单提交
dataFormSubmit() {
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false;
}
if (this.type) {
moveStorehouse(this.dataForm.sourceId, this.dataForm.targetId).then(
(response) => {
this.$modal.msgSuccess('修改成功');
this.visible = false;
this.$emit('refreshDataList');
}
);
return;
}
});
},
},
};
</script>