|
|
@@ -1613,22 +1613,33 @@
|
|
|
return this.$message.error('货架总体积不能大于库区体积!');
|
|
|
}
|
|
|
|
|
|
- let obj = {};
|
|
|
- for (const item of this.areaForm.allocationReqList) {
|
|
|
- const area = this.areaForm.areaGoodsshelvesList.find((itm) => {
|
|
|
- return itm.reservoirAreaCode === item.code;
|
|
|
- });
|
|
|
+ // let obj = {};
|
|
|
+ // for (const item of this.areaForm.allocationReqList) {
|
|
|
+ // const area = this.areaForm.areaGoodsshelvesList.find((itm) => {
|
|
|
+ // return itm.reservoirAreaCode === item.code;
|
|
|
+ // });
|
|
|
|
|
|
- const id = `${
|
|
|
- area && area.reservoirAreaCode + '-' + item.goodsShelvesCode
|
|
|
- }-${item.code}`;
|
|
|
+ // const id = `${
|
|
|
+ // area && area.reservoirAreaCode + '-' + item.goodsShelvesCode
|
|
|
+ // }-${item.code}`;
|
|
|
|
|
|
- if (obj[id]) {
|
|
|
- return this.$message.error('货位编号不能重复!');
|
|
|
- } else {
|
|
|
- obj[id] = 1;
|
|
|
- }
|
|
|
+ // if (obj[id]) {
|
|
|
+ //
|
|
|
+ // } else {
|
|
|
+ // obj[id] = 1;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+
|
|
|
+ let codeS=this.areaForm.allocationReqList?.map(item=>{
|
|
|
+ return item.reservoirAreaCode+'_'+item.goodsShelvesCode+'_'+item.goodsAllocationCode
|
|
|
+ })
|
|
|
+ if(codeS){
|
|
|
+ codeS=Array.from(new Set(codeS))
|
|
|
+ }
|
|
|
+ if(codeS?.length!=this.areaForm.allocationReqList?.length){
|
|
|
+ return this.$message.error('货位编号不能重复!');
|
|
|
}
|
|
|
+
|
|
|
|
|
|
this.$refs.areaFormName.validate(async (valid) => {
|
|
|
if (valid) {
|