Browse Source

在库订单转预约和转库存品需要同一商城

fix_bug_pro20231227
qb 1 year ago
parent
commit
4481f4d14d
  1. 160
      src/views/distribution/inventory/delivery/distributionStockArticle.vue
  2. 3
      src/views/distribution/inventory/distrilbutionBillLading.vue

160
src/views/distribution/inventory/delivery/distributionStockArticle.vue

@ -1112,21 +1112,28 @@ export default {
this.$message.warning('请选择至少一条数据');
return;
}
let st = false;
this.selectionList.forEach(i => {
console.log('yuyuyuuyu', i);
// let flag = false;
console.log('this.selectionList :>> ', this.selectionList);
//
let _mallName = this.selectionList[0].mallName;
const flag = this.selectionList.every(i => {
if (_mallName !== i.mallName) {
this.$message.warning('请选择同一商场操作');
return false;
}
if (i.reservationStatus === '30') {
st = true;
this.$message.warning(i.orderCode + ' - 已预约,请勿重复预约!!!');
return false;
}
if (i.typeService == 3) {
st = true;
this.$message.warning(i.orderCode + ' - 为自提单,无法预约!!!');
return false;
}
return true;
});
if (st) {
return;
}
if (!flag) return;
// orderId
const notEqualFlag = this.selectionList.some(
item =>
@ -1155,77 +1162,69 @@ export default {
if (this.selectionList.length === 0) {
this.$message.warning('请选择至少一条数据');
return;
} else {
let st = false;
let lost = false;
for (const i of this.selectionList) {
console.log('yuyuyuuyu', i);
if (i.reservationStatus == '30') {
st = true;
this.$message.warning(i.orderCode + ' - 已预约,无法转为库存品!!!');
}
if (i.typeService == 3) {
st = true;
this.$message.warning(i.orderCode + ' - 为自提单,无法转为库存品!!!');
}
if (i.freezeStatus == '30') {
st = true;
this.$message.warning(i.orderCode + ' - 为冻结单,无法转为库存品!!!');
}
if (i.isZero === '1' && i.completeSet === '1') {
st = true;
this.$message.warning(i.orderCode + ' - 未齐套,无法转为库存品!!!');
}
if (!st) {
//
// console.log("cxcxcxc",i);
let aa = await getListOwn(this.page.currentPage, this.page.pageSize, {
stockArticleId: i.id,
parcelType: "2"
}).then();
// console.log("",aa.data.data.records);
aa.data.data.records.forEach(l => {
// console.log(l.materialId , l.materialName , l.materialCode , l.materialUnit);
if (!l.materialId) {
lost = true;
}
});
}
}
if (st) {
return;
}
if (lost) {
this.$message.warning(
'订单信息不完整,请完善包件信息!如没有请维护物料信息,在选择!!!'
);
} else {
this.getSock();
}
}
/*else if (this.selectionList.length > 1){
this.getSock();
}else if (this.selectionList.length < 2){
//
let params ={
stockArticleId : this.selectionList[0].id
let lost = true;
const _mallName = this.selectionList[0].mallName;
let ids = [];
//
const isReturn = await this.selectionList.every(async item => {
console.log('yuyuyuuyu', item);
if (_mallName !== item.mallName) {
this.$message.warning('请选择同一商场');
console.log('_mallName !== item.mallName :>> ', _mallName !== item.mallName);
return false;
}
console.log(123123);
let a = await getListOwn(this.page.currentPage,this.page.pageSize,params);
// console.log("aaaaaaa===",a.data.data);
if(a.data.data.records.length > 0){
this.$router.push({
path: '/distribution/inventory/distributionStockArticleFrom',
query: {
id : this.ids,
name : "转库存单"
}
});
}else{
this.getSock();
if (item.reservationStatus == '30') {
console.log('1 :>> ', 1);
this.$message.warning(item.orderCode + ' - 已预约,无法转为库存品!!!');
return false;
}
if (item.typeService == 3) {
console.log('2 :>> ', 2);
this.$message.warning(item.orderCode + ' - 为自提单,无法转为库存品!!!');
return false;
}
if (item.freezeStatus == '30') {
console.log('3 :>> ', 3);
this.$message.warning(item.orderCode + ' - 为冻结单,无法转为库存品!!!');
return false;
}
}*/
if (item.isZero === '1' && item.completeSet === '1') {
console.log('4 :>> ', 4);
this.$message.warning(item.orderCode + ' - 未齐套,无法转为库存品!!!');
return false;
}
console.log('111 :>> ', 111);
ids.push(item.id);
return true;
});
console.log('isReturn :>> ', isReturn);
// , 退
if (!isReturn) return;
//
const res = await getListOwn(this.page.currentPage, this.page.pageSize, {
stockArticleId: ids.join(','),
parcelType: '2',
});
// console.log("",res.data.data.records);
lost = res.data.data.records.every(val => {
if (!val.materialId) return false;
return true;
});
// , 退
if (!lost) {
return this.$message.warning(
'订单信息不完整,请完善包件信息!如没有请维护物料信息,在选择!!!'
);
}
this.getSock();
},
getSock() {
this.$confirm('确定将选择的订单转为库存品吗?', {
@ -1533,12 +1532,9 @@ export default {
},
handleAdd() {
return this.$message({
type: "error",
message: '功能还在开发中'
})
this.title = '新增';
this.form = {};
this.box = true;
type: 'error',
message: '功能还在开发中',
});
},
handleEdit(row) {
this.title = '编辑';
@ -1722,7 +1718,7 @@ export default {
height: 30px !important;
}
}
:deep(.el-form-item__label){
padding:0;
:deep(.el-form-item__label) {
padding: 0;
}
</style>

3
src/views/distribution/inventory/distrilbutionBillLading.vue

@ -2061,7 +2061,8 @@ export default {
}
},
async handleSubmit() {
const zeroOrderList = this.dataList.filter(val => val.isZero === '1');
const zeroOrderList =
this.dataList.length !== 0 || this.dataList.filter(val => val.isZero === '1');
//
const wrongZeroOrder = zeroOrderList.find(val => !val.ParcelLisList);
console.log('wrongZeroOrder :>> ', wrongZeroOrder);

Loading…
Cancel
Save