Commit 57864c82 authored by 我在何方's avatar 我在何方

批量优惠申请完善2.2

parent 08b9d068
...@@ -16,24 +16,24 @@ ...@@ -16,24 +16,24 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('填单货物属性')" align="center"> <el-table-column :label="$t('填单货物属性')" align="center">
<template slot-scope="scope"> <template v-slot="{row}">
{{$t('品牌')}}<dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="order.orderItemVOList[scope.$index].brandType" /><br> {{$t('品牌')}}<dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="row.brandType" /><br>
{{$t('箱数')}}{{ order.orderItemVOList[scope.$index].num }}<br> {{$t('箱数')}}{{ row.num }}<br>
{{$t('体积')}}{{ order.orderItemVOList[scope.$index].volume }}m³<br> {{$t('体积')}}{{ row.volume }}m³<br>
{{$t('重量')}}{{ order.orderItemVOList[scope.$index].weight }}Kg {{$t('重量')}}{{ row.weight }}Kg
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="address" prop="address"
:label="$t('入库货物属性')"> :label="$t('入库货物属性')">
<template slot-scope="scope"> <template v-slot="{row}">
<template v-if="order.orderItemVOList[scope.$index].warehouseInInfoVO"> <template v-if="row.warehouseInInfoVO">
{{$t('品牌')}} {{$t('品牌')}}
<template v-if="order.orderItemVOList[scope.$index].brandName">{{order.orderItemVOList[scope.$index].brandName}}</template> <template v-if="row.brandName">{{row.brandName}}</template>
<dict-tag v-else :type="DICT_TYPE.ECW_IS_BRAND" :value="order.orderItemVOList[scope.$index].feeType" /><br> <dict-tag v-else :type="DICT_TYPE.ECW_IS_BRAND" :value="row.feeType" /><br>
{{$t('箱数')}}{{ order.orderItemVOList[scope.$index].warehouseInInfoVO.cartonsNum }}<br> {{$t('箱数')}}{{ row.warehouseInInfoVO.cartonsNum }}<br>
{{$t('体积')}}{{ order.orderItemVOList[scope.$index].warehouseInInfoVO.volume }}m³<br> {{$t('体积')}}{{ row.warehouseInInfoVO.volume }}m³<br>
{{$t('重量')}}{{ order.orderItemVOList[scope.$index].warehouseInInfoVO.weight }}Kg {{$t('重量')}}{{ row.warehouseInInfoVO.weight }}Kg
</template> </template>
<span v-else>{{$t('暂时没有入库信息')}}</span> <span v-else>{{$t('暂时没有入库信息')}}</span>
</template> </template>
...@@ -90,6 +90,7 @@ export default { ...@@ -90,6 +90,7 @@ export default {
name: "OrderSpecialDiscount", name: "OrderSpecialDiscount",
props: { props: {
order: Object, order: Object,
ids:Array,
applyType:{ // // 31是优惠申请32是管理折扣 applyType:{ // // 31是优惠申请32是管理折扣
type: Number, type: Number,
default: 31 default: 31
...@@ -175,6 +176,39 @@ export default { ...@@ -175,6 +176,39 @@ export default {
getOrderSpecial(){ getOrderSpecial(){
getOrderSpecialBatch(this.order.orderId, this.applyType).then(r => { getOrderSpecialBatch(this.order.orderId, this.applyType).then(r => {
this.form = r.data this.form = r.data
var volist = r.data.batchApplyOrderItemDetailVOList
if(this.form.applyStatus==1){
this.form.batchApplyOrderItemDetailVOList.map(v=>{
var item = this.order.orderItemVOList.find(vs=>vs.orderItemId==v.orderItemId)
if(item){
v.brandType = item.brandType
v.num = item.num
v.volume = item.volume
v.weight = item.weight
v.warehouseInInfoVO = item.warehouseInInfoVO
}
})
}else{
this.form.batchApplyOrderItemDetailVOList = []
var list = []
console.log(this.ids)
volist.map(v=>{
console.log(v.orderItemId)
if(this.ids.indexOf(v.orderItemId)>-1){
var item = this.order.orderItemVOList.find(vs=>vs.orderItemId==v.orderItemId)
if(item){
v.brandType = item.brandType
v.num = item.num
v.volume = item.volume
v.weight = item.weight
v.warehouseInInfoVO = item.warehouseInInfoVO
}
list.push(v)
}
})
console.log(list)
this.$set(this.form,'batchApplyOrderItemDetailVOList',list)
}
}) })
}, },
/* getProductTypeNameById(id){ /* getProductTypeNameById(id){
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<!-- 列表 --> <!-- 列表 -->
<div class="order-header"> <div class="order-header">
<span style="font-size: 15px;">{{$t('订单号')}}{{ order.orderNo }}</span> <span style="font-size: 15px;">{{$t('订单号')}}{{ order.orderNo }}</span>
<el-button v-hasPermi="['ecw:order:reduce']" type="primary" @click="showDiscountsIds=order.orderId" >{{$t('批量特价申请')}}</el-button> <el-button v-hasPermi="['ecw:order:reduce']" type="primary" @click="moreApply(1)" >{{$t('批量特价申请')}}</el-button>
<el-button v-hasPermi="['ecw:order:commission']" type="primary" @click="showAllowanceIds=order.orderId" >{{$t('批量管理折扣')}}</el-button> <el-button v-hasPermi="['ecw:order:commission']" type="primary" @click="moreApply(2)" >{{$t('批量管理折扣')}}</el-button>
</div> </div>
<el-table v-loading="loading" :data="order.orderItemVOList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="order.orderItemVOList" @selection-change="handleSelectionChange">
...@@ -128,9 +128,9 @@ ...@@ -128,9 +128,9 @@
<!-- 重泡货优惠 --> <!-- 重泡货优惠 -->
<preferential v-if="!!showPreferentialType" :applyType="showPreferentialType" :order="order" @close="showPreferentialType=null" @success="onPreferentialSuccess" /> <preferential v-if="!!showPreferentialType" :applyType="showPreferentialType" :order="order" @close="showPreferentialType=null" @success="onPreferentialSuccess" />
<!-- 批量优惠申请 --> <!-- 批量优惠申请 -->
<discounts v-if="!!showDiscountsIds" :order="order" @close="showDiscountsIds=null" @success="onDiscountsSuccess" /> <discounts v-if="!!showDiscountsIds" :order="order" :ids="ids" @close="showDiscountsIds=null" @success="onDiscountsSuccess" />
<!-- 批量管理折扣 --> <!-- 批量管理折扣 -->
<discounts v-if="!!showAllowanceIds" :order="order" @close="showAllowanceIds=null" :applyType="32" @success="onDiscountsSuccess" /> <discounts v-if="!!showAllowanceIds" :order="order" :ids="ids" @close="showAllowanceIds=null" :applyType="32" @success="onDiscountsSuccess" />
<!-- 佣金规则 --> <!-- 佣金规则 -->
</div> </div>
</template> </template>
...@@ -243,6 +243,17 @@ export default { ...@@ -243,6 +243,17 @@ export default {
this.multipleSelection = selection this.multipleSelection = selection
this.ids = selection.map(item => item.orderItemId) this.ids = selection.map(item => item.orderItemId)
}, },
moreApply(type){
if(!this.ids||this.ids.length==0){
this.$message.error(this.$t('请选择商品'))
return
}
if(type==1){
this.showDiscountsIds = true
}else{
this.showAllowanceIds = true
}
}
}, },
computed: { computed: {
currencyMap(){ currencyMap(){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment