|
|
|
@ -104,15 +104,15 @@
|
|
|
|
|
<el-input v-model="form.otherFee" placeholder="请输入其他费用"/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="10"> |
|
|
|
|
<el-form-item label="服务类型:" prop="serveType" label-width="120px"> |
|
|
|
|
<el-checkbox-group v-model="serveType" v-for="item in this.addvalueServeTypeData"> |
|
|
|
|
<el-checkbox :label="item.dictKey" |
|
|
|
|
:value="item.dictKey">{{item.dictValue}}  |
|
|
|
|
</el-checkbox> |
|
|
|
|
</el-checkbox-group> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="10"> |
|
|
|
|
<el-form-item label="服务类型:" prop="serveType" label-width="120px"> |
|
|
|
|
<el-checkbox-group v-model="serveType" v-for="item in this.addvalueServeTypeData"> |
|
|
|
|
<el-checkbox :label="item.dictKey" |
|
|
|
|
:value="item.dictKey">{{item.dictValue}}  |
|
|
|
|
</el-checkbox> |
|
|
|
|
</el-checkbox-group> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="10"> |
|
|
|
|
<el-form-item label="备注:" prop="orderSource" label-width="100px" style="width: 100%"> |
|
|
|
|
<el-input type="textarea" :rows="1" placeholder="请输入内容" v-model="form.remarks"> |
|
|
|
@ -137,18 +137,25 @@
|
|
|
|
|
> |
|
|
|
|
<template #default="slotProps"> |
|
|
|
|
<el-text v-if="slotProps.scope.row.resource !=='零担'" |
|
|
|
|
type="primary" |
|
|
|
|
link |
|
|
|
|
icon="el-icon-view" |
|
|
|
|
@click="viewStockArticlePackage(slotProps.scope.row)" |
|
|
|
|
type="primary" |
|
|
|
|
link |
|
|
|
|
icon="el-icon-view" |
|
|
|
|
@click="viewStockArticlePackage(slotProps.scope.row)" |
|
|
|
|
>查看包件 |
|
|
|
|
</el-text> |
|
|
|
|
<el-text v-else |
|
|
|
|
type="primary" |
|
|
|
|
link |
|
|
|
|
icon="el-icon-view" |
|
|
|
|
@click="viewStockArticlePackage(slotProps.scope.row)" |
|
|
|
|
>录入数量 |
|
|
|
|
<el-text v-if="slotProps.scope.row.resource ==='零担' ||slotProps.scope.row.isZero ==='1'" |
|
|
|
|
type="primary" |
|
|
|
|
link |
|
|
|
|
icon="el-icon-view" |
|
|
|
|
@click="entryNum(slotProps.scope.row)" |
|
|
|
|
>在库录入 |
|
|
|
|
</el-text> |
|
|
|
|
<el-text v-if="slotProps.scope.row.resource ==='零担' ||slotProps.scope.row.isZero ==='1'" |
|
|
|
|
type="primary" |
|
|
|
|
link |
|
|
|
|
icon="el-icon-view" |
|
|
|
|
@click="entryReservationNum(slotProps.scope.row)" |
|
|
|
|
>预约录入 |
|
|
|
|
</el-text> |
|
|
|
|
<el-text |
|
|
|
|
type="primary" |
|
|
|
@ -314,11 +321,17 @@
|
|
|
|
|
|
|
|
|
|
<el-dialog |
|
|
|
|
v-model="zeroOrderShow" |
|
|
|
|
title="零担订单信息" |
|
|
|
|
title="零担品类信息" |
|
|
|
|
width="50%" |
|
|
|
|
:model="zeroOrderData"> |
|
|
|
|
<el-row :gutter="24" class="rows"> |
|
|
|
|
<el-col :xl="4" :lg="7" :md="8" :sm="24"> |
|
|
|
|
<h3><span>在库总数:{{this.obj.handQuantity}}</span></h3> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
<template v-if="zeroOrderData != null"> |
|
|
|
|
<div v-for="(item,index) in zeroOrderData" :key="index" > |
|
|
|
|
<div v-for="(item,index) in zeroOrderData" :key="index"> |
|
|
|
|
<el-row :gutter="24" class="rows"> |
|
|
|
|
<el-col :xl="4" :lg="7" :md="8" :sm="24"> |
|
|
|
|
<span>名称:{{item.firsts }}</span> |
|
|
|
@ -336,15 +349,24 @@
|
|
|
|
|
<span>出库数量:{{item.outboundQuantity }} </span> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :xl="4" :lg="7" :md="8" :sm="24"> |
|
|
|
|
<!-- <span>可用数量:{{(item.handQuantity - item.outboundQuantity)}}</span>--> |
|
|
|
|
<span>可用数量:{{(item.quantity)}}</span> |
|
|
|
|
<span>可用数量:{{(item.handQuantity - item.deliveryQuantity - item.outboundQuantity)}}</span> |
|
|
|
|
<!-- <span>可用数量:{{(item.quantity)}}</span>--> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
<el-input-number v-model="item.reservationNum" min="0" :max="item.quantity" placeholder="请输入预约数量"></el-input-number> |
|
|
|
|
<el-input-number v-if="this.isrReservationEntry" v-model="item.reservationNum" min="0" |
|
|
|
|
:max="item.zeroOrderMax" |
|
|
|
|
placeholder="请输入预约数量"></el-input-number> |
|
|
|
|
<el-input-number v-else v-model="item.number" min="0" |
|
|
|
|
:max="item.quantity" |
|
|
|
|
placeholder="请输入预约数量"></el-input-number> |
|
|
|
|
<!-- <el-input-number v-model="item.reservationNum" min="0" :max="item.quantity - item.deliveryQuantity -item.outboundQuantity " placeholder="请输入预约数量"></el-input-number>--> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
<el-form-item style="margin-left: 37%; margin-top: 5px"> |
|
|
|
|
<el-button v-if="!isrReservationEntry" type="primary" icon="el-icon-circle-close" @click="onSubmitUpdateZeroOrder" |
|
|
|
|
>修改(零担订单) |
|
|
|
|
</el-button |
|
|
|
|
> |
|
|
|
|
<el-button type="primary" icon="el-icon-circle-close" @click="onSubmitZeroOrder" |
|
|
|
|
>提交(零担订单) |
|
|
|
|
</el-button |
|
|
|
@ -412,7 +434,7 @@
|
|
|
|
|
|
|
|
|
|
<el-dialog v-model="isaddvalue" title="包件信息" width="100%" :model="addvalue"> |
|
|
|
|
<!-- 列表模块 --> |
|
|
|
|
<!-- :isselectfun="checkPackage"--> |
|
|
|
|
<!-- :isselectfun="checkPackage"--> |
|
|
|
|
<tablecmt |
|
|
|
|
:columnList="columnParcels" |
|
|
|
|
:tableData="packageData" |
|
|
|
@ -583,6 +605,7 @@
|
|
|
|
|
import { mapGetters } from 'vuex'; |
|
|
|
|
import { getDictionaryBiz } from '@/api/system/dict'; |
|
|
|
|
import dayjs from 'dayjs'; |
|
|
|
|
import { entryNum, updateEntryNum } from '@/api/distribution/distributionParcelNumber'; |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
@ -720,7 +743,7 @@
|
|
|
|
|
sortable: true, |
|
|
|
|
head: false |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
{ |
|
|
|
|
prop: 'reservationNum', |
|
|
|
|
label: '预约数量', |
|
|
|
|
type: 2, |
|
|
|
@ -777,8 +800,8 @@
|
|
|
|
|
], |
|
|
|
|
stockcolumnList: [ |
|
|
|
|
{ |
|
|
|
|
prop: 'orderCode', |
|
|
|
|
label: '订单自编号', |
|
|
|
|
prop: 'incomingBatch', |
|
|
|
|
label: '入库批次号', |
|
|
|
|
type: 2, |
|
|
|
|
values: '', |
|
|
|
|
width: '150', |
|
|
|
@ -1077,7 +1100,7 @@
|
|
|
|
|
{ |
|
|
|
|
label: '部分预约', |
|
|
|
|
value: '20' |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
], |
|
|
|
|
fixed: false, |
|
|
|
|
sortable: true, |
|
|
|
@ -1176,7 +1199,7 @@
|
|
|
|
|
{ |
|
|
|
|
label: '是', |
|
|
|
|
value: '2' |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
], |
|
|
|
|
fixed: false, |
|
|
|
|
sortable: true, |
|
|
|
@ -1725,8 +1748,10 @@
|
|
|
|
|
serveType: [], |
|
|
|
|
//增加订单弹窗 |
|
|
|
|
orderShow: false, |
|
|
|
|
zeroOrderData:[], |
|
|
|
|
zeroOrderData: [], |
|
|
|
|
zeroOrderShow: false, |
|
|
|
|
//是否是预约录入 |
|
|
|
|
isrReservationEntry: false, |
|
|
|
|
// zeroPackageNum:0, |
|
|
|
|
//在库订单信息 |
|
|
|
|
stockArticleInfo: [], |
|
|
|
@ -1738,6 +1763,7 @@
|
|
|
|
|
orderIds: '', |
|
|
|
|
//预约编号 |
|
|
|
|
reservationId: '', |
|
|
|
|
zeroOrderMax: 0, |
|
|
|
|
// 商城名称 |
|
|
|
|
marketName: '', |
|
|
|
|
// 包件复选框列表 |
|
|
|
@ -1889,6 +1915,10 @@
|
|
|
|
|
// return value.marketName === this.marketName |
|
|
|
|
// }); |
|
|
|
|
this.inventoryInfo = inventoryList.records |
|
|
|
|
this.inventoryInfo = inventoryList.records.filter(value => { |
|
|
|
|
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) => { |
|
|
|
|