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

批量优惠申请完善2.2

parent 08b9d068
......@@ -16,24 +16,24 @@
</template>
</el-table-column>
<el-table-column :label="$t('填单货物属性')" align="center">
<template slot-scope="scope">
{{$t('品牌')}}<dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="order.orderItemVOList[scope.$index].brandType" /><br>
{{$t('箱数')}}{{ order.orderItemVOList[scope.$index].num }}<br>
{{$t('体积')}}{{ order.orderItemVOList[scope.$index].volume }}m³<br>
{{$t('重量')}}{{ order.orderItemVOList[scope.$index].weight }}Kg
<template v-slot="{row}">
{{$t('品牌')}}<dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="row.brandType" /><br>
{{$t('箱数')}}{{ row.num }}<br>
{{$t('体积')}}{{ row.volume }}m³<br>
{{$t('重量')}}{{ row.weight }}Kg
</template>
</el-table-column>
<el-table-column
prop="address"
:label="$t('入库货物属性')">
<template slot-scope="scope">
<template v-if="order.orderItemVOList[scope.$index].warehouseInInfoVO">
<template v-slot="{row}">
<template v-if="row.warehouseInInfoVO">
{{$t('品牌')}}
<template v-if="order.orderItemVOList[scope.$index].brandName">{{order.orderItemVOList[scope.$index].brandName}}</template>
<dict-tag v-else :type="DICT_TYPE.ECW_IS_BRAND" :value="order.orderItemVOList[scope.$index].feeType" /><br>
{{$t('箱数')}}{{ order.orderItemVOList[scope.$index].warehouseInInfoVO.cartonsNum }}<br>
{{$t('体积')}}{{ order.orderItemVOList[scope.$index].warehouseInInfoVO.volume }}m³<br>
{{$t('重量')}}{{ order.orderItemVOList[scope.$index].warehouseInInfoVO.weight }}Kg
<template v-if="row.brandName">{{row.brandName}}</template>
<dict-tag v-else :type="DICT_TYPE.ECW_IS_BRAND" :value="row.feeType" /><br>
{{$t('箱数')}}{{ row.warehouseInInfoVO.cartonsNum }}<br>
{{$t('体积')}}{{ row.warehouseInInfoVO.volume }}m³<br>
{{$t('重量')}}{{ row.warehouseInInfoVO.weight }}Kg
</template>
<span v-else>{{$t('暂时没有入库信息')}}</span>
</template>
......@@ -90,6 +90,7 @@ export default {
name: "OrderSpecialDiscount",
props: {
order: Object,
ids:Array,
applyType:{ // // 31是优惠申请32是管理折扣
type: Number,
default: 31
......@@ -175,6 +176,39 @@ export default {
getOrderSpecial(){
getOrderSpecialBatch(this.order.orderId, this.applyType).then(r => {
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){
......
......@@ -5,8 +5,8 @@
<!-- 列表 -->
<div class="order-header">
<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:commission']" type="primary" @click="showAllowanceIds=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="moreApply(2)" >{{$t('批量管理折扣')}}</el-button>
</div>
<el-table v-loading="loading" :data="order.orderItemVOList" @selection-change="handleSelectionChange">
......@@ -128,9 +128,9 @@
<!-- 重泡货优惠 -->
<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>
</template>
......@@ -243,6 +243,17 @@ export default {
this.multipleSelection = selection
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: {
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