|
|
@@ -136,28 +136,26 @@
|
|
|
<div>
|
|
|
<span class="label">库区类型</span
|
|
|
>{{
|
|
|
- item.extInfo[0].areaType
|
|
|
+ item.type
|
|
|
| useDictLabelFilter(warehouseDefinition_inventoryList)
|
|
|
}}
|
|
|
</div>
|
|
|
<div>
|
|
|
<span class="label">库区属性</span
|
|
|
>{{
|
|
|
- item.extInfo[0].attribute
|
|
|
+ item.attribute
|
|
|
| useDictLabelFilter(warehouseDefinition_areaAttribute)
|
|
|
}}
|
|
|
</div>
|
|
|
<div>
|
|
|
<span class="label">库区长宽高(cm)</span
|
|
|
- >{{ item.extInfo[0].areaLength }}*{{
|
|
|
- item.extInfo[0].areaWidth
|
|
|
- }}*{{ item.extInfo[0].areaHigh }}
|
|
|
+ >{{ item.areaLength }}*{{ item.areaWide }}*{{
|
|
|
+ item.areaHigh
|
|
|
+ }}
|
|
|
</div>
|
|
|
- <div
|
|
|
- ><span class="label">货架数</span>{{ item.subCount }}</div
|
|
|
- >
|
|
|
+ <div><span class="label">货架数</span>{{ item.num }}</div>
|
|
|
<div>
|
|
|
- <span class="label">货位数</span>{{ childrenLength(item) }}
|
|
|
+ <span class="label">货位数</span>{{ item.allocationNumber }}
|
|
|
</div>
|
|
|
<div style="width: 10px"></div>
|
|
|
</div>
|
|
|
@@ -181,7 +179,7 @@
|
|
|
color: p.allocationStatus === 3 ? '#fff' : '#000'
|
|
|
}"
|
|
|
>
|
|
|
- {{ '货位' + p.code }}
|
|
|
+ {{ '货位' + p.goodsAllocationCode }}
|
|
|
<!-- :style="{
|
|
|
'background-color': getStatus(
|
|
|
p.allocationStatus
|
|
|
@@ -199,11 +197,11 @@
|
|
|
p,
|
|
|
warehouseInfo.code +
|
|
|
'-' +
|
|
|
- p.reservoirAreaCode +
|
|
|
+ item.code +
|
|
|
'-' +
|
|
|
- p.goodsShelvesCode +
|
|
|
+ itm.goodsshelvesCode +
|
|
|
'-' +
|
|
|
- p.code
|
|
|
+ p.goodsAllocationCode
|
|
|
)
|
|
|
"
|
|
|
></i>
|
|
|
@@ -220,17 +218,19 @@
|
|
|
<div class="detail">
|
|
|
<div>
|
|
|
<span class="label">货架号</span
|
|
|
- >{{ warehouseInfo.code }}-{{ item.code }}-{{ itm.code }}
|
|
|
+ >{{ warehouseInfo.code }}-{{ item.code }}-{{
|
|
|
+ itm.goodsshelvesCode
|
|
|
+ }}
|
|
|
</div>
|
|
|
<div>
|
|
|
<span class="label">货架长宽高(cm)</span
|
|
|
- >{{ itm.extInfo[0].areaHigh }}*{{
|
|
|
- itm.extInfo[0].areaWidth
|
|
|
- }}*{{ itm.extInfo[0].areaWidth }}
|
|
|
+ >{{ itm.goodsshelvesLength }}*{{
|
|
|
+ itm.goodsshelvesWide
|
|
|
+ }}*{{ itm.goodsshelvesHigh }}
|
|
|
</div>
|
|
|
<div>
|
|
|
<span class="label">货架层数</span
|
|
|
- >{{ itm.extInfo[0].line }}
|
|
|
+ >{{ itm.goodsshelvesLine }}
|
|
|
</div>
|
|
|
<div>
|
|
|
<span class="label">货位数</span
|
|
|
@@ -238,18 +238,27 @@
|
|
|
</div>
|
|
|
<div>
|
|
|
<span class="label">空置货位数</span>
|
|
|
- <!-- {{itm.children.filter((i) => i.allocationStatus === 1).length}} -->
|
|
|
- {{ itm.emptyAllocationNumber }}
|
|
|
+ {{
|
|
|
+ itm.children.filter((i) => i.allocationStatus === 1)
|
|
|
+ .length
|
|
|
+ }}
|
|
|
+ <!-- {{ itm.emptyAllocationNumber }} -->
|
|
|
</div>
|
|
|
<div>
|
|
|
<span class="label">在用货位数</span>
|
|
|
- <!-- {{ itm.children.filter((i) => i.allocationStatus === 2).length }} -->
|
|
|
- {{ itm.useAllocationNumber }}
|
|
|
+ {{
|
|
|
+ itm.children.filter((i) => i.allocationStatus === 2)
|
|
|
+ .length
|
|
|
+ }}
|
|
|
+ <!-- {{ itm.useAllocationNumber }} -->
|
|
|
</div>
|
|
|
<div>
|
|
|
<span class="label">已满货位数</span>
|
|
|
- <!-- {{itm.children.filter((i) => i.allocationStatus === 3) .length }} -->
|
|
|
- {{ itm.fullAllocationNumber }}
|
|
|
+ {{
|
|
|
+ itm.children.filter((i) => i.allocationStatus === 3)
|
|
|
+ .length
|
|
|
+ }}
|
|
|
+ <!-- {{ itm.fullAllocationNumber }} -->
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -264,13 +273,13 @@
|
|
|
</el-card>
|
|
|
|
|
|
<el-dialog :visible.sync="statusVisible" title="变更货位状态" width="400px">
|
|
|
- <el-radio-group v-model="curLocation.type">
|
|
|
+ <el-radio-group v-model="statusSet">
|
|
|
<el-radio :label="1">正常</el-radio>
|
|
|
|
|
|
- <el-radio :label="3" :disabled="[1, 4].includes(warehouseStatVO.type)"
|
|
|
+ <el-radio :label="3" :disabled="[1, 4].includes(curLocation.preStatus)"
|
|
|
>已满</el-radio
|
|
|
>
|
|
|
- <el-radio :label="4" :disabled="[2, 3].includes(warehouseStatVO.type)"
|
|
|
+ <el-radio :label="4" :disabled="[2, 3].includes(curLocation.preStatus)"
|
|
|
>失效</el-radio
|
|
|
>
|
|
|
</el-radio-group>
|
|
|
@@ -308,6 +317,7 @@
|
|
|
// } from '@/api/stockManagement/warehouseDefinition';
|
|
|
import GoodsInfoDialog from './components/GoodsInfoDialog.vue';
|
|
|
import warehouseDefinition from '@/api/warehouseManagement/warehouseDefinition';
|
|
|
+ import { deepClone } from '@/utils';
|
|
|
|
|
|
export default {
|
|
|
components: { GoodsInfoDialog },
|
|
|
@@ -339,21 +349,21 @@
|
|
|
// // 货位状态修改
|
|
|
statusSet: {
|
|
|
set(val) {
|
|
|
- this.curLocation.preStatus = val;
|
|
|
+ this.curLocation.allocationStatus = val;
|
|
|
},
|
|
|
get() {
|
|
|
- if (this.curLocation.preStatus) {
|
|
|
- if ([1, 2].includes(this.curLocation.preStatus)) {
|
|
|
- return 0;
|
|
|
+ if (this.curLocation.allocationStatus) {
|
|
|
+ if ([1, 2].includes(this.curLocation.allocationStatus)) {
|
|
|
+ return 1;
|
|
|
}
|
|
|
- return this.curLocation.preStatus;
|
|
|
+ return this.curLocation.allocationStatus;
|
|
|
}
|
|
|
|
|
|
if (
|
|
|
- this.curLocation.preStatus === 0 ||
|
|
|
+ this.curLocation.allocationStatus === 0 ||
|
|
|
[1, 2].includes(this.curLocation.preStatus)
|
|
|
) {
|
|
|
- return 0;
|
|
|
+ return 1;
|
|
|
}
|
|
|
return this.curLocation.preStatus;
|
|
|
}
|
|
|
@@ -460,37 +470,62 @@
|
|
|
const res = await warehouseDefinition.warehouseDetail(
|
|
|
this.$route.query.id
|
|
|
);
|
|
|
- const { kq, hj, hw } = this.handleHouse(res);
|
|
|
- console.log('=++', kq);
|
|
|
this.warehouseInfo = res.warehouseVO || {};
|
|
|
- // warehouseAreasSaveList: res.reservoirAreaList || [], //库区
|
|
|
- // areaGoodsshelvesList: res.goodsShelvesList || [], //货架
|
|
|
- // allocationReqList: res.goodsAllocationList || [] //货位
|
|
|
- // const {
|
|
|
- // warehouseAreasSaveList = [],
|
|
|
- // areaGoodsshelvesList = [],
|
|
|
- // allocationReqList = []
|
|
|
- // } = res;
|
|
|
- const warehouseAreasSaveList = kq || [];
|
|
|
- const areaGoodsshelvesList = hj || [];
|
|
|
- const allocationReqList = hw || [];
|
|
|
+ const {
|
|
|
+ warehouseAreasSaveList = [],
|
|
|
+ areaGoodsshelvesList = [],
|
|
|
+ allocationReqList = []
|
|
|
+ } = res;
|
|
|
|
|
|
warehouseAreasSaveList.forEach((item) => {
|
|
|
item.children = areaGoodsshelvesList
|
|
|
- .filter((i) => i.reservoirAreaCode === item.code)
|
|
|
+ .filter((i) => i.warehouseAreaCode === item.code)
|
|
|
.map((itm) => {
|
|
|
itm.children = allocationReqList.filter(
|
|
|
- (it) => it.goodsShelvesCode === itm.code
|
|
|
+ (i) =>
|
|
|
+ itm.goodsshelvesCode === i.warehouseAreaGoodsCode &&
|
|
|
+ itm.warehouseAreaCode === i.warehouseAreaCode
|
|
|
);
|
|
|
return itm;
|
|
|
});
|
|
|
});
|
|
|
this.warehouseAreasSaveList = warehouseAreasSaveList;
|
|
|
+ console.log(warehouseAreasSaveList);
|
|
|
+ this.warehouseInfo = res.warehouseVO || {};
|
|
|
+
|
|
|
+ // const { kq, hj, hw } = this.handleHouse(res);
|
|
|
+ // this.warehouseInfo = res.warehouseVO || {};
|
|
|
+ // warehouseAreasSaveList: res.reservoirAreaList || [], //库区
|
|
|
+ // areaGoodsshelvesList: res.goodsShelvesList || [], //货架
|
|
|
+ // allocationReqList: res.goodsAllocationList || [] //货位
|
|
|
+ // const {
|
|
|
+ // warehouseAreasSaveList = [],
|
|
|
+ // areaGoodsshelvesList = [],
|
|
|
+ // allocationReqList = []
|
|
|
+ // } = res;
|
|
|
+ // const warehouseAreasSaveList = kq || [];
|
|
|
+ // const areaGoodsshelvesList = hj || [];
|
|
|
+ // const allocationReqList = hw || [];
|
|
|
+
|
|
|
+ // warehouseAreasSaveList.forEach((item) => {
|
|
|
+ // item.children = areaGoodsshelvesList
|
|
|
+ // .filter((i) => i.reservoirAreaCode === item.code)
|
|
|
+ // .map((itm) => {
|
|
|
+ // itm.children = allocationReqList.filter(
|
|
|
+ // (it) => it.goodsShelvesCode === itm.code
|
|
|
+ // );
|
|
|
+ // return itm;
|
|
|
+ // });
|
|
|
+ // });
|
|
|
+ // this.warehouseAreasSaveList = warehouseAreasSaveList;
|
|
|
+ // console.log('====sssaaa', this.warehouseAreasSaveList);
|
|
|
},
|
|
|
//变更货位状态
|
|
|
transformStatus(item) {
|
|
|
- this.warehouseStatVO = Object.assign({}, item.warehouseStatVO);
|
|
|
- this.curLocation = Object.assign({}, item.warehouseStatVO);
|
|
|
+ // this.warehouseStatVO = item.allocationStatus;
|
|
|
+ // this.curLocation = Object.assign({}, item.warehouseStatVO);
|
|
|
+ this.curLocation = deepClone(item);
|
|
|
+ this.curLocation.preStatus = item.allocationStatus;
|
|
|
this.statusVisible = true;
|
|
|
},
|
|
|
async confirmChange() {
|