+
名称:{{item.firsts }}
@@ -336,15 +349,24 @@
出库数量:{{item.outboundQuantity }}
-
- 可用数量:{{(item.quantity)}}
+ 可用数量:{{(item.handQuantity - item.deliveryQuantity - item.outboundQuantity)}}
+
-
+
+
+ 修改(零担订单)
+
提交(零担订单)
-
+
{
+ if (this.marketName === '') return value;
+ return value.marketName === this.marketName;
+ });
//存在库存品,需要将库存品进行回显勾选
if (this.inventoryData) {
this.inventoryInfo.forEach((item, index) => {
@@ -1982,25 +2012,112 @@
this.page.currentPage = 1;
this.onLoad(this.page);
},
- viewStockArticlePackage(row) {
+ entryReservationNum(row) {
this.obj = row;
- if (this.reservationId){
+ if (this.reservationId) {
//查询零担计划数量详情
- console.log("order------------>",row.id);
- getReservationZeroOrderDetail(this.reservationId,row.id).then(res=>{
- this.zeroOrderData =res.data.data;
+ console.log('order------------>', row.id);
+ getReservationZeroOrderDetail(this.reservationId, row.id).then(res => {
+ let a = res.data.data;
+ a.forEach(item=>{
+ item.zeroOrderMax = (item.handQuantity - item.deliveryQuantity - item.outboundQuantity + item.reservationNum)
+ })
+ this.zeroOrderData = res.data.data;
// console.log(res.data.data);
- })
-
- }else {
- getZeroOrderDetail(row.id).then(res=>{
- if (res.data.data != null){
- this.zeroOrderData =res.data.data;
+ });
+ } else {
+ getZeroOrderDetail(row.id).then(res => {
+ if (res.data.data != null) {
+ let a = res.data.data;
+ a.forEach(item=>{
+ item.zeroOrderMax = (item.handQuantity - item.deliveryQuantity - item.outboundQuantity)
+ })
+ this.zeroOrderData = res.data.data;
}
- })
+ });
}
-
this.zeroOrderShow = true;
+ this.isrReservationEntry = true;
+ },
+ entryNum(row) {
+ this.obj = row;
+ getZeroOrderDetail(row.id).then(res => {
+ if (res.data.data != null) {
+ this.zeroOrderData = res.data.data;
+ }
+ });
+ this.zeroOrderShow = true;
+ this.isrReservationEntry = false;
+ },
+ viewStockArticlePackage(row) {
+ this.loading = true;
+ this.packageList = row.packageList;
+ this.obj = row;
+ console.log('row>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>', row);
+ if (this.reservationId) {
+ //这里就是编辑的数据回显问题
+ let packageInfo = row.parcelListVOS;
+ // this.packageData = row.parcelListVOS;
+ let packageListData = this.packageData;
+ if (row.packageList.length > 0) {
+ let packageListInfo = row.packageList;
+ packageInfo.forEach((item, index) => {
+ packageListInfo.forEach(p => {
+ if (item.id === p.id) {
+ this.$nextTick(() => {
+ this.$refs.packageList.toggleRowSelection(this.packageData[index], true);
+ });
+ }
+ });
+ });
+ } else {
+ //新增订单,默认全选
+ packageInfo.forEach((item, index) => {
+ this.$nextTick(() => {
+ this.$refs.packageList.toggleRowSelection(this.packageData[index], true);
+ });
+ });
+ }
+ this.packageData = row.parcelListVOS;
+
+ // 当row内packageList为空时, 默认全选
+ if (row.packageList.length === 0) {
+ this.packageDataSec = row.parcelListVOS;
+ } else {
+ this.packageDataSec = row.parcelListVOS.filter(item => {
+ return row.packageList.some(value => value.id === item.id);
+ });
+ }
+
+ } else {
+ this.packageData = row.parcelListVOS;
+ this.packageDataSec = row.parcelListVOS;
+ //这里回显展示的效果应该是展示被其他预约单勾选的订单处于禁用勾选,冻结订单处于禁用无法勾选,其他默认为全选
+ let data = row.parcelListVOS;
+ data.forEach((item, index) => {
+ if (
+ item.orderPackageReservationStatusName === '已预约' ||
+ item.orderPackageReservationStatus === '20'
+ ) {
+ // //这里就是表示包件此时状态处于已预约,表示该订单下的这个包件信息被其他的预约信息使用,此时应该处于勾选禁用状态
+ this.$nextTick(() => {
+ this.$refs.packageList.toggleRowSelection(this.packageData[index], true);
+ });
+ // console.log('::', item);
+ // this.checkPackage(item, index);
+ }
+ // else if (
+ // item.orderPackageFreezeStatusName !== '已冻结' ||
+ // item.orderPackageFreezeStatus !== '20'
+ // ) {
+ // this.$nextTick(() => {
+ // this.$refs.packageList.toggleRowSelection(this.packageData[index], true);
+ // });
+ // }
+ });
+ }
+ this.isaddvalue = true;
+ this.loading = false;
},
checkPackage(row, index) {
//区分编辑还是新增
@@ -2138,10 +2255,10 @@
item.packageListInfo = item.parcelListVOS;
}
});
- console.log("------------------->this.form.inventoryList",this.form.inventoryList);
- console.log("------------------->this.form.stockArticleList",this.form.stockArticleList);
+ console.log('------------------->this.form.inventoryList', this.form.inventoryList);
+ console.log('------------------->this.form.stockArticleList', this.form.stockArticleList);
- if (JSON.stringify(this.form.inventoryList) === '[]' && JSON.stringify(this.form.stockArticleList) === '[]' ){
+ if (JSON.stringify(this.form.inventoryList) === '[]' && JSON.stringify(this.form.stockArticleList) === '[]') {
this.$message({
type: 'warning',
message: '无效的预约计划!'
@@ -2151,7 +2268,7 @@
}
// this.form.stockArticleList = this.packageList;
console.log('>>>>>>>>', this.form);
- if (this.reservationId) {
+ if (this.reservationId) {
this.form.id = this.reservationId;
update(this.form).then(() => {
this.$router.go(-1);
@@ -2180,9 +2297,9 @@
});
},
removeStockArticle(row) {
- if(this.inventoryData.length==0&&this.orderData.length==1&&this.reservationId){
- this.$message.warning('最少剩下一个数据');
- return
+ if (this.inventoryData.length == 0 && this.orderData.length == 1 && this.reservationId) {
+ this.$message.warning('如需移除请取消该预约计划!!');
+ return;
}
this.orderData.forEach((item, index) => {
if (item.id === row.id) {
@@ -2191,24 +2308,24 @@
console.log(item);
});
// 当两个列表没有数据时, 清空限制
- if(this.inventoryData.length === 0 && this.orderData.length === 0) this.marketName = ''
+ if (this.inventoryData.length === 0 && this.orderData.length === 0) this.marketName = '';
// 当列表没有数据时, 表单清空
- if(this.orderData.length === 0) this.form = {}
+ if (this.orderData.length === 0) this.form = {};
console.log('>>>>>>>>>>>>>>>row', row);
},
removeStockList(row) {
- if(this.inventoryData.length==1&&this.orderData.length==0&&this.reservationId){
+ if (this.inventoryData.length == 1 && this.orderData.length == 0 && this.reservationId) {
this.$message.warning('最少剩下一个数据');
- return
+ return;
}
this.inventoryData.forEach((item, index) => {
if (item.id === row.id) {
this.inventoryData.splice(index, 1);
}
- console.log('item>>>>>>>>>>>',item);
+ console.log('item>>>>>>>>>>>', item);
});
// 当两个列表没有数据时, 清空限制
- if(this.inventoryData.length === 0 && this.orderData.length === 0) this.marketName = ''
+ if (this.inventoryData.length === 0 && this.orderData.length === 0) this.marketName = '';
console.log('>>>>>>>>>>>>>>>row', row);
},
showStockListEdit(row) {
@@ -2289,14 +2406,107 @@
// this.inventoryList = a;
// }
},
- onSubmitZeroOrder(){
- this.orderData.forEach(item=>{
- if (this.obj.id === item.id){
- item.parcelNumberVOS = this.zeroOrderData;
+ onSubmitUpdateZeroOrder() {
+ console.log('this.obj--------------------->', this.obj);
+ console.log('this.zeroOrderData--------------------->', this.zeroOrderData);
+ console.log('this.zeroOrderData--------------------->', this.zeroOrderData);
+
+ this.isrReservationEntry = false;
+ let a = this.zeroOrderData;
+ if (a.length > 1) {
+ let b = 0;
+ //计算该品类已使用数量
+
+ a.forEach(item => {
+ b += item.number;
+ });
+
+ let f = a.every(item=>{
+ console.log('this.number--------------------->', item.number);
+ console.log('number--------------------->', (item.deliveryQuantity + item.outboundQuantity));
+ if (item.number < (item.deliveryQuantity + item.outboundQuantity) || item.number > item.quantity){
+ return false;
+ }
+ return true;
+ })
+
+ if (b > this.obj.handQuantity) {
+ this.$message({
+ type: 'error',
+ message: '录入数量超过订单在库数量!'
+ });
+ return;
+ }
+ if (!f) {
+ this.$message({
+ type: 'error',
+ message: '请检查修改数量!'
+ });
+ return;
+ }
+ }
+ updateEntryNum(this.zeroOrderData).then(res=>{
+ if (res) {
+ this.$message({
+ type: 'success',
+ message: '操作成功'
+ });
}
})
this.zeroOrderShow = false;
- console.log("this.orderData------------->",this.orderData);
+ console.log('-------------->', this.zeroOrderData);
+ },
+ onSubmitZeroOrder() {
+ if (this.isrReservationEntry) {
+ //零担预约数量录入
+ this.orderData.forEach(item => {
+ if (this.obj.id === item.id) {
+ item.parcelNumberVOS = this.zeroOrderData;
+ }
+ });
+ } else {
+ //在库数量录入
+ let a = this.zeroOrderData;
+ if (a.length > 0) {
+ let n = 0;
+ a.forEach(item => {
+ n += item.number;
+ });
+ if (n > this.obj.handQuantity) {
+ this.$message({
+ type: 'error',
+ message: '录入数量超过订单在库数量!'
+ });
+ return;
+ }
+ let b = a.every(item => {
+ console.log('最大数量-------------->', (item.handQuantity + item.outboundQuantity + item.deliveryQuantity + item.number));
+ if ((item.handQuantity + item.outboundQuantity + item.deliveryQuantity + item.number) > item.quantity) {
+ return false;
+ }
+ return true;
+ });
+ console.log('----------------->', b);
+ if (!b) {
+ this.$message({
+ type: 'error',
+ message: '请输入正确数量!'
+ });
+ return;
+ }
+ }
+ entryNum(this.zeroOrderData).then(res => {
+ if (res) {
+ this.$message({
+ type: 'success',
+ message: '操作成功'
+ });
+ }
+ });
+ console.log('this.zeroOrderData------------->', this.zeroOrderData);
+ }
+
+ this.zeroOrderShow = false;
},
// 增加库存品
onSubmitInventory() {
@@ -2312,16 +2522,16 @@
});
console.log('this.inventoryList :>> ', this.inventoryList);
// 检测商场是否选择统一商场
- let _marketName = ''
+ let _marketName = '';
const _isUnifyMarketName = this.inventoryList.every(value => {
- if (_marketName === '') _marketName = value.marketName
- return _marketName === value.marketName
- })
- if(!_isUnifyMarketName){
+ if (_marketName === '') _marketName = value.marketName;
+ return _marketName === value.marketName;
+ });
+ if (!_isUnifyMarketName) {
this.$message.warning('请选择统一商场!!!');
return;
}
- this.marketName = _marketName
+ this.marketName = _marketName;
this.inventoryData = this.inventoryList;
// if (this.orderData.length) {
@@ -2366,6 +2576,7 @@
// 设置商场名称
if (this.marketName === '') this.marketName = _marketName
+ this.marketName = list[0].marketName;
this.form.consignee = _name;
this.form.deliveryAddress = _address;
@@ -2386,7 +2597,6 @@
});
-
if (this.orderData.length >= 1) {
let newDate1 = this.orderData.map(item => {
// map遍历本地数据
@@ -2409,11 +2619,10 @@
}
- this.orderData.forEach(a=>{
- a.reservationNum= a.handQuantity
-
- })
+ this.orderData.forEach(a => {
+ a.reservationNum = a.handQuantity;
+ });
// this.orderData.push(info);
@@ -2491,12 +2700,12 @@
},
timescStockArtic(index, row) {
console.log(index, row);
- if (!!index){
+ if (!!index) {
index = dayjs(index).format('YYYY-MM-DD');
}
- this.query[row.prop] = index
- if (!index){
- delete this.query[row.prop]
+ this.query[row.prop] = index;
+ if (!index) {
+ delete this.query[row.prop];
}
this.onLoadOrder(this.page);
},
@@ -2506,27 +2715,27 @@
},
selectscStockArtic(index, row) {
console.log(index, row);
- if(row.prop ==='reservationStatusName'){
+ if (row.prop === 'reservationStatusName') {
this.query['reservationStatus'] = index;
- }else if(row.prop ==='freezeStatusName'){
+ } else if (row.prop === 'freezeStatusName') {
this.query['freezeStatus'] = index;
- }else if(row.prop ==='completeSetName'){
+ } else if (row.prop === 'completeSetName') {
this.query['completeSet'] = index;
}
- // else if(row.prop ==='groundingStatusName'){
- // this.query['groundingStatus'] = index;
- // }else if(row.prop ==='stockupStatusName'){
- // this.query['stockupStatus'] = index;
- // }else if(row.prop ==='orderStatusName'){
- // this.query['orderStatus'] = index;
- // }else if(row.prop ==='typeServerName'){
- // this.query['typeService'] = index;
- // }
- // else if(row.prop ==='orderReceiveStatusName'){
- // this.query['orderReceiveStatus'] = index;
+ // else if(row.prop ==='groundingStatusName'){
+ // this.query['groundingStatus'] = index;
+ // }else if(row.prop ==='stockupStatusName'){
+ // this.query['stockupStatus'] = index;
+ // }else if(row.prop ==='orderStatusName'){
+ // this.query['orderStatus'] = index;
+ // }else if(row.prop ==='typeServerName'){
+ // this.query['typeService'] = index;
+ // }
+ // else if(row.prop ==='orderReceiveStatusName'){
+ // this.query['orderReceiveStatus'] = index;
// }
- else{
+ else {
this.query[row.prop] = index;
}
this.onLoadOrder(this.page);
@@ -2550,7 +2759,15 @@
Object.assign(params, this.query)
).then(res => {
console.log('res123------------>', res);
- const {records, total} = res.data.data;
+ const { records, total } = res.data.data;
+ this.stockArticleInfo = records.filter(value => {
+ if (this.marketName === '') return value;
+ if (this.marketName) {
+ console.log('value.marketName :>> ', value.marketName);
+ return value.mallName === this.marketName;
+ }
+ });
+ // const {records, total} = res.data.data;
this.stockArticleInfo = records
console.log('this.stockArticleInfo :>> ', this.stockArticleInfo);
this.stockArticleInfo.forEach((item, index) => {
diff --git a/src/views/distribution/reservation/reservationDetails.vue b/src/views/distribution/reservation/reservationDetails.vue
index c3248ba1..bab67c81 100644
--- a/src/views/distribution/reservation/reservationDetails.vue
+++ b/src/views/distribution/reservation/reservationDetails.vue
@@ -498,6 +498,16 @@
fixed: false,
sortable: true,
},
+ {
+ label: '计划数量',
+ prop: 'reservationNum',
+ type: 1,
+ values: '',
+ width: '150',
+ checkarr: [],
+ fixed: false,
+ sortable: true,
+ },
{
label: '车次号',
prop: 'trainNumber',
diff --git a/src/views/distribution/turndelivery/deliveryDiscuss.vue b/src/views/distribution/turndelivery/deliveryDiscuss.vue
index c5293ee8..7bd1a374 100644
--- a/src/views/distribution/turndelivery/deliveryDiscuss.vue
+++ b/src/views/distribution/turndelivery/deliveryDiscuss.vue
@@ -1,55 +1,55 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -58,1872 +58,2114 @@
-
-
- 查看司机配置
-
-
-
-
+
+
+ 查看司机配置
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 商配
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 商配
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 新增
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 新增
+
+
+
+
+
+
+
-
-
- 查看包件
-
- 移除
-
-
-
-
-
-
+
+
+ 查看包件
+
+ 在库录入
+
+ 数量录入
+
+ 移除
+
+
+
+
+
+
-
- 提交(商配订单)
-
- 返 回
-
-
+
+
+
+ 在库总数:{{this.obj.handQuantity}}
+
+
-
- {{ item }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 名称:{{item.firsts }}
+
+
+ 总数量:{{item.quantity }}
+
+
+ 在库数量:{{item.handQuantity }}
+
+
+ 冻结数量:{{item.deliveryQuantity }}
+
+
+ 出库数量:{{item.outboundQuantity }}
+
+
+ 可用数量:{{(item.handQuantity - item.deliveryQuantity - item.outboundQuantity)}}
+
+
+
+
+
+
+
+
+
+ 修改(零担订单)
+
+ 提交(零担订单)
+
+ 返 回
+
+
-
-
-
-
-
-
-
-
-
-
-
- 搜 索
- 清 空
-
-
-
+
+ 提交(商配订单)
+
+ 返 回
+
+
-
-
-
-
-
-
-
-
-
- 提交(订单)
-
- 返 回
-
-
-
-
-
+
+ {{ item }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
- 搜 索
- 清 空
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 提交(库存品)
-
- 返 回
-
-
+
+
+
+
+
+
+
+
+
+
+
+ 搜 索
+ 清 空
+
+
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 提交(包件)
-
- 返 回
-
-
+
+
+
+
+
+
+
+
+ 提交(订单)
+
+ 返 回
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+ 搜 索
+ 清 空
+
+
-
-
-
+ type="selection"
+ v-if="option.selection"
+ width="55"
+ align="center"
+ >
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+ 提交(库存品)
+
+ 返 回
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交(包件)
+
+ 返 回
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
上移
+ >上移
-
-
-
-
-
+
+
+
+
+
-
+
-
-
+
+