Commit d4012634 authored by dragondean@qq.com's avatar dragondean@qq.com

bug

parent 213600ae
...@@ -293,20 +293,20 @@ export const constantRoutes = [ ...@@ -293,20 +293,20 @@ export const constantRoutes = [
name: 'order-special', name: 'order-special',
meta: {title: '订单特价申请', icon: '', activeMenu: '/order/index'} meta: {title: '订单特价申请', icon: '', activeMenu: '/order/index'}
}, },
{ /* {
path: 'discount/:orderItemId(\\d+)', path: 'discount/:orderItemId(\\d+)',
component: (resolve) => import('@/views/ecw/order/special/discount'), component: (resolve) => import('@/views/ecw/order/special/discount'),
props: true, props: true,
name: 'discount', name: 'discount',
meta: {title: '订单优惠申请', icon: '', activeMenu: '/order/index'} meta: {title: '订单优惠申请', icon: '', activeMenu: '/order/index'}
}, }, */
{ /* {
path: 'discount1/:orderItemId(\\d+)', path: 'discount1/:orderItemId(\\d+)',
component: (resolve) => import('@/views/ecw/order/special/discount'), component: (resolve) => import('@/views/ecw/order/special/discount'),
props: true, props: true,
name: 'discount1', name: 'discount1',
meta: {title: '订单折扣申请', icon: '', activeMenu: '/order/index'} meta: {title: '订单折扣申请', icon: '', activeMenu: '/order/index'}
}, }, */
{ {
path: 'speciallight/:orderId(\\d+)', path: 'speciallight/:orderId(\\d+)',
component: (resolve) => import('@/views/ecw/order/special/light'), component: (resolve) => import('@/views/ecw/order/special/light'),
......
<template>
<el-dialog visible :close-on-click-modal="false" :before-close="closeDialog" :title="$t('优惠申请')">
<el-form ref="form" :model="form" label-width="80px" :rules="rules">
<el-form-item :label="$t('商品类型')">
<span>{{ $l(productType, 'title') }}</span>
</el-form-item>
<el-form-item :label="$t('商品名称')">
<span>{{ form.prodTitleZh }}</span>
</el-form-item>
<el-form-item :label="$t('英文名称')">
<span>{{ form.prodTitleEn }}</span>
</el-form-item>
<el-form-item :label="$t('线路')">
<dict-tag :type="DICT_TYPE.TRANSPORT_TYPE" :value="form.transportId" />
{{ channel ? $l(channel, 'title') : '' }}
{{$t("从【{departureName}】发往【{objectiveName}", {departureName: form.departureName, objectiveName: form.objectiveName})}}
</el-form-item>
<el-form-item :label="$t('是否预付')">
<dict-tag :type="DICT_TYPE.ECW_YESNO" :value="form.isPayAdvance" />
</el-form-item>
<el-row v-if="!form.charging">
<el-col :span="12">
<el-form-item :label="$t('旧运费')">
{{form.orgSeaFreight}} {{ currentMap[form.seaFreightCurrency] }} / {{ unitMap[form.seaFreightVolume] }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('旧清关费')">
{{form.orgClearanceFreight}} {{ currentMap[form.clearanceFreightCurrency] }} / {{ unitMap[form.clearanceFreightVolume] }}
</el-form-item>
</el-col>
</el-row>
<el-row v-if="!form.charging">
<el-col :span="12">
<el-form-item :label="$t('新运费')" style="width: 400px" prop="seaFreight">
<el-input v-model="form.seaFreight" type="number" class="w-100" />
{{ currentMap[form.seaFreightCurrency] }} / {{ unitMap[form.seaFreightVolume] }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('新清关费')" style="width: 400px" prop="clearanceFreight">
<el-input v-model="form.clearanceFreight" type="number" class="w-100" />
{{ currentMap[form.clearanceFreightCurrency] }} / {{ unitMap[form.clearanceFreightVolume] }}
</el-form-item>
</el-col>
</el-row>
<el-form-item :label="$t('旧全包价')" v-if="form.charging">
{{form.orgSeaFreight}} {{ currentMap[form.seaFreightCurrency] }} / {{ unitMap[form.seaFreightVolume] }}
</el-form-item>
<el-form-item :label="$t('新全包价')" style="width: 400px" prop="clearanceFreight" v-if="form.charging">
<el-input v-model="form.seaFreight" type="number" class="w-100" />
{{ currentMap[form.seaFreightCurrency] }} / {{ unitMap[form.seaFreightVolume] }}
</el-form-item>
</el-form>
<div class="page-title">审批流程</div>
<work-flow xmlkey="sheet_sale" v-model="ccIdArr" />
<div v-if="!form.applyStatus">
<el-button type="primary" @click="handleSubmit">提交</el-button>
</div>
<div v-else>
<el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + form.formId)">
<dict-tag :type="DICT_TYPE.APPLY_STATUS" :value="form.applyStatus" />
</el-button>
</div>
</el-dialog>
</template>
<script>
import {createOrderSpecial, getOrderSpecial} from "@/api/ecw/order"
import {getUnitList} from "@/api/ecw/unit"
import {getChannel, getChannelList} from "@/api/ecw/channel"
import { getCurrencyList } from '@/api/ecw/currency'
import { getProductTypeList, getProductType } from '@/api/ecw/productType'
import WorkFlow from '@/components/WorkFlow'
export default {
name: "specialDiscount",
props: {
order: Object,
orderItemId: Number,
},
components: {
WorkFlow
},
created() {
// 查看详情,列表进来的
if(this.orderItemId){
this.getOrderSpecial()
}
getUnitList().then(res => this.unitList = res.data)
// getChannelList().then(res => this.channelList = res.data)
getCurrencyList().then(res => this.currencyList = res.data)
// getProductTypeList().then(res => this.productTypeList = res.data)
},
data() {
return {
unitList:[],
// channelList:[],
currencyList:[],
// productTypeList:[],
ccIdArr: [],
form: {
type: 1
},
rules:{
seaFreight : {required: true, message: '运费不能为空'},
clearanceFreight: {required: true, message: '清关费不能为空'}
},
productType: null,
channel: null
}
},
watch:{
ccIdArr(){
this.$set(this.form, 'ccIds', this.ccIdArr.join(','))
}
},
methods: {
handleSubmit(){
this.$refs.form.validate().then(res => {
createOrderSpecial(Object.assign({}, this.form, {type: 1})).then(res => {
this.$message.success(this.$t('提交成功'))
this.$emit('success')
})
})
},
getOrderSpecial(){
getOrderSpecial(this.order.orderId, 1, {orderItemId: this.orderItemId}).then(r => {
this.form = r.data
getProductType(this.form.productType).then(res => {
this.productType = res.data
})
if(this.form.channelId){
getChannel(this.form.channelId).then(res => {
this.channel = res.data
})
}
})
},
/* getProductTypeNameById(id){
return this.$l(this.productTypeList.find(e => e.id === id), 'title')
}, */
closeDialog(){
this.$emit('close')
}
},
computed: {
// 根据渠道id显示渠道名
getChannelNameById(){
return channelId => {
const s = this.channelList.find(item => item.channelId == channelId) ?. nameZh
return s ? '' + s + '' : ''
}
},
currentMap(){
let map = {}
this.currencyList.forEach(item => {
map[item.id] = this.$l(item, 'title')
})
return map
},
unitMap(){
let map = {}
this.unitList.forEach(item => {
map[item.id] = this.$l(item, 'title')
})
return map
}
}
}
</script>
<template>
<el-dialog visible :close-on-click-modal="false" :before-close="closeDialog" :title="$t('管理折扣')">
<el-form ref="form" :model="form" label-width="80px" :rules="rules">
<el-form-item :label="$t('旧全包价')" v-if="orderItem.charging">
{{form.freight}} {{ currentMap[form.freightCurrency] }} / {{ unitMap[form.freightVolume] }}
</el-form-item>
<el-form-item :label="$t('新全包价')" style="width: 400px" prop="clearanceFreight" v-if="orderItem.charging">
<el-input v-model="form.freight" type="number" class="w-100" />
{{ currentMap[form.freightCurrency] }} / {{ unitMap[form.freightVolume] }}
</el-form-item>
</el-form>
<div class="page-title">审批流程</div>
<work-flow xmlkey="special_apply" v-model="ccIdArr" />
<div v-if="!form.applyStatus">
<el-button type="primary" @click="handleSubmit">提交</el-button>
</div>
<div v-else>
<el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + form.formId)">
<dict-tag :type="DICT_TYPE.APPLY_STATUS" :value="form.applyStatus" />
</el-button>
</div>
</el-dialog>
</template>
<script>
import {createOrderSpecial, getOrderSpecial} from "@/api/ecw/order"
import {getUnitList} from "@/api/ecw/unit"
import {getChannel, getChannelList} from "@/api/ecw/channel"
import { getCurrencyList } from '@/api/ecw/currency'
import { getProductType } from '@/api/ecw/productType'
import WorkFlow from '@/components/WorkFlow'
export default {
name: "OrderSpecialDiscount",
props: {
order: Object,
orderItem: Object,
applyType: Number // 4是重货优惠5是泡货优惠
},
components: {
WorkFlow
},
created() {
// 查看详情,列表进来的
this.getOrderSpecial()
},
data() {
return {
// applyType: 2, //1是优惠申请2是管理折扣3是佣金设置4是重货优惠5是泡货优惠
ccIdArr: [],
form: {
},
rules:{
},
}
},
watch:{
ccIdArr(){
this.$set(this.form, 'ccIds', this.ccIdArr.join(','))
}
},
methods: {
handleSubmit(){
this.$refs.form.validate().then(res => {
createOrderSpecial(Object.assign({}, this.form, {applyType: this.applyType})).then(res => {
this.$message.success(this.$t('提交成功'))
this.$emit('success')
})
})
},
getOrderSpecial(){
getOrderSpecial(this.order.orderId, this.applyType, {}).then(r => {
this.form = r.data
})
},
closeDialog(){
this.$emit('close')
}
}
}
</script>
<template> <template>
<div class="app-container"> <el-dialog visible :close-on-click-modal="false" :before-close="closeDialog" :title="$t('佣金规则')">
<!-- 搜索工作栏 --> <el-form ref="form" :model="form" label-width="80px" :rules="rules">
<el-card> <el-form-item :label="$t('商品类型')">
<div slot="header" class="card-title">{{$t('修改佣金规则')}}-{{form.orderNo||''}}</div> <span>{{ $l(productType, 'title') }}</span>
<el-form :model="form" ref="queryForms" label-width="120px" class="card"> </el-form-item>
<el-form-item :label="$t('商品类型:')"> <el-form-item :label="$t('商品名称')">
<span>{{getProductAttrNameById(form.prodType) }}</span> <span>{{ orderItem.prodTitleZh }}</span>
</el-form-item> </el-form-item>
<el-form-item :label="$t('商品名称:')"> <el-form-item :label="$t('英文名称')">
<span>{{ form.prodTitleZh }}</span> <span>{{ orderItem.prodTitleEn }}</span>
</el-form-item> </el-form-item>
<el-form-item :label="$t('英文名称:')"> <el-form-item :label="$t('线路')">
<span>{{ form.prodTitleEn }}</span> <dict-tag :type="DICT_TYPE.TRANSPORT_TYPE" :value="order.transportId" />
</el-form-item> {{ channel ? $l(channel, 'title') : '' }}
<el-form-item :label="$t('线路:')"> {{$t("从【{departureName}】发往【{objectiveName}", {departureName: $l(order.logisticsInfoDto, 'startTitle'), objectiveName: $l(order.logisticsInfoDto, 'destTitle')})}}
{{ `【${getDictDataLabel(DICT_TYPE.TRANSPORT_TYPE, form.transportId)}】${ getChannelNameById(form.channelId) }从【${startTitleZh}】发往【${destTitleZh}】`}} </el-form-item>
</el-form-item> <el-form-item :label="$t('是否预付')">
<el-form-item :label="$t('运费:')" > <dict-tag :type="DICT_TYPE.ECW_YESNO" :value="orderItem.isPayAdvance" />
<span>{{ form.subtotalFreight }} {{ currentMap[form.freightCurrency] }}</span> </el-form-item>
<el-row v-if="!orderItem.charging">
<el-col :span="12">
<el-form-item :label="$t('运费')">
{{form.oneSeaFreight}} {{ currencyMap[orderItem.seaFreightCurrency] }} / {{ unitMap[orderItem.seaFreightVolume] }}
</el-form-item> </el-form-item>
<el-form-item :label="$t('清关费:')"> </el-col>
<span>{{ form.subtotalClearanceFreight }} {{ currentMap[form.clearanceFreightCurrency] }}</span> <el-col :span="12">
<el-form-item :label="$t('清关费')">
{{form.oneClearanceFreight}} {{ currencyMap[form.clearanceFreightCurrency] }} / {{ unitMap[form.clearanceFreightVolume] }}
</el-form-item> </el-form-item>
<el-form-item :label="$t('佣金类型:')"> </el-col>
<el-radio-group v-model="form.commissionType" > </el-row>
<el-radio :label="dict.value" v-for="dict in getDictDatas('commission_type')">{{dict.label}}</el-radio>
</el-radio-group> <el-form-item :label="$t('全包价')" v-if="orderItem.charging">
</el-form-item> {{orderItem.oneSeaFreight}} {{ currencyMap[form.freightCurrency] }} / {{ unitMap[orderItem.seaFreightVolume] }}
<el-form-item v-if="form.commissionType==3" :label="$t('暗佣佣金:')"> </el-form-item>
<el-input style="width: 100px;" type="number" v-model="shadeCommissionAmount" />
<span style="margin-left: 10px;">{{ currentMap[form.freightCurrency] }}</span> <el-form-item :label="$t('佣金类型')" prop="commissionType">
<span>/{{ volumeMap[form.freightVolume] }}</span> <dict-selector :type="DICT_TYPE.COMMISSION_TYPE" v-model="form.commissionType" form-type="radio" formatter="number" />
</el-form-item > </el-form-item>
<el-form-item v-if="form.commissionType==1||form.commissionType==3" :label="$t('明佣佣金:')">
<el-input style="width: 100px;" type="number" v-model="lightCommissionAmount" /> <!-- 明佣或者明佣+暗佣才显示 -->
<span style="margin-left: 10px;">{{ currentMap[form.freightCurrency] }}</span> <el-form-item label="明佣佣金" v-if="form.commissionType == 1 || form.commissionType == 3">
<span>/{{ volumeMap[form.freightVolume] }}</span> <el-input v-model.number="form.lightCommissionAmount" placeholder="" class="w-100"></el-input>
</el-form-item > {{ currencyMap[orderItem.seaFreightCurrency] }} / {{ unitMap[orderItem.seaFreightVolume] }}
<el-form-item v-if="form.commissionType!=0" :label="$t('商品:')"> </el-form-item>
<span>{{form.prodTitleZh }}</span>
<span style="margin-left: 10px;" v-if="form.commissionType==3">{{$t('成本价')}}{{parseInt(form.freight)-parseInt(shadeCommissionAmount)}}{{ currentMap[form.freightCurrency] }}/{{ volumeMap[form.freightVolume] }}</span> <!-- 明佣+暗佣才显示 -->
<span style="margin-left: 10px;"> {{$t('销售价')}}{{form.commissionType!=2?(parseInt(form.freight)+parseInt(lightCommissionAmount)):form.freight}}{{ currentMap[form.freightCurrency] }}/{{ volumeMap[form.freightVolume] }}</span> <el-form-item label="暗佣佣金" v-if="form.commissionType == 3">
<span style="margin-left: 10px;color: #1E98D7;" v-if="form.commissionType==2" @click="$router.push(`/customer/customerCommission`)">{{$t('去设置')}}</span> <el-input v-model.number="form.shadeCommissionAmount" placeholder="" class="w-100"></el-input>
<span style="margin-left: 10px;" v-if="form.commissionType==3">{{$t('实际佣金返点')}}{{parseInt(lightCommissionAmount)+parseInt(shadeCommissionAmount)}}{{ currentMap[form.freightCurrency] }}/{{ volumeMap[form.freightVolume] }}</span> {{ currencyMap[form.freightCurrency] }} / {{ unitMap[form.freightVolume] }}
</el-form-item> </el-form-item>
<el-form-item :label="$t('审核状态:')">
<dict-tag :type="DICT_TYPE.APPLY_STATUS" :value="form.applyStatus"></dict-tag> <!-- 无佣金不显示 -->
<span>{{form.applyResult?('('+form.applyResult+')'):''}}</span> <div class="pl-50" v-if="form.commissionType != 0">
</el-form-item> <div v-if="form.commissionType != 2">{{$l(orderItem, 'prodTitle')}}</div>
</el-form>
</el-card>
<div slot="header" class="card-title">{{$t('审批流程')}}</div>
<work-flow xmlkey="commission_config" v-model="selectedUsers" style="margin-top: 20px;"></work-flow>
<div slot="footer" class="card footer_btn">
<el-button type="primary" v-if="form.applyStatus==0" @click="submitForm">{{$t('提交')}}</el-button>
<el-button plain type="primary" v-if="form.applyStatus==0" @click="$store.dispatch('tagsView/delCurrentView')">{{$t('取消')}}</el-button>
<el-button v-if="form.applyStatus==1" type="primary" @click="$router.push(`/bpm/process-instance/detail?id=`+form.formId)">{{$t('审核中')}}</el-button>
<el-button v-if="form.applyStatus==1" plain type="primary" @click="dialogVisible = true">{{$t('取消审核')}}</el-button>
<el-button v-if="form.applyStatus==1" plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">{{$t('返回')}}</el-button>
</div>
<el-dialog
:title="$t('提示')"
:visible.sync="dialogVisible"
width="30%">
<span class="cancel_notice">{{$t('特价申请正在审核中,你确定取消特价申请吗?')}}</span>
<div class="cancel_content">
<span>{{$t('取消原因')}}</span>
<el-input v-model="reason" :placeholder="$t('请输入取消原因')"></el-input>
</div>
<span slot="footer" class="dialog-footer"> <!-- 明佣+暗佣显示 -->
<el-button @click="dialogVisible = false">{{$t('取消')}}</el-button> <div v-if="form.commissionType == 3">
<el-button type="primary" @click="cancelSplit">{{$t('确定')}}</el-button> {{$t('成本价')}}{{form.freight}} {{ currencyMap[form.freightCurrency] }} / {{ unitMap[form.freightVolume] }}
</span> </div>
</el-dialog>
</div> <!-- 暗佣显示 -->
<div v-if="form.commissionType == 2">
{{$l(orderItem, 'prodTitle')}}
<template v-if="darkCommission">
{{$t('暗佣')}}{{darkCommission}} {{ currencyMap[form.freightCurrency] }} / {{ unitMap[form.freightVolume] }}
</template>
<el-link type="primary" @click.native="$router.push('/customer/customerCommission?customerId=' + customerId)">{{$t('去设置')}}</el-link>
</div>
<div v-if="form.commissionType == 1 || form.commissionType == 3">{{$t('销售价')}}{{form.freight + form.shadeCommissionAmount + form.lightCommissionAmount }} {{ currencyMap[form.freightCurrency] }} / {{ unitMap[form.freightVolume] }}</div>
<div v-if="form.commissionType == 3">{{$t('实际佣金返点')}}{{form.shadeCommissionAmount + form.lightCommissionAmount }} {{ currencyMap[form.freightCurrency] }} / {{ unitMap[form.freightVolume] }}</div>
</div>
</el-form>
<div class="page-title">审批流程</div>
<work-flow xmlkey="commission_config" v-model="ccIdArr" />
<div v-if="!form.applyStatus">
<el-button type="primary" @click="handleSubmit">提交</el-button>
</div>
<div v-else>
<el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + form.formId)">
<dict-tag :type="DICT_TYPE.APPLY_STATUS" :value="form.applyStatus" />
</el-button>
</div>
</el-dialog>
</template> </template>
<script> <script>
import {getDictData, getDictDatas,DICT_TYPE,getDictDataLabel} from '@/utils/dict' import {createOrderSpecial, getOrderSpecial} from "@/api/ecw/order"
import WorkFlow from '@/components/WorkFlow' import {getUnitList} from "@/api/ecw/unit"
import {getOrder,getOrderSpecial,cancelOrderSpecial,createOrderSpecial} from '@/api/ecw/order' import {getChannel} from "@/api/ecw/channel"
import {getChannelList} from "@/api/ecw/channel"
import { getCurrencyList } from '@/api/ecw/currency' import { getCurrencyList } from '@/api/ecw/currency'
import { getProductAttrList } from '@/api/ecw/productAttr' import { getProductType } from '@/api/ecw/productType'
import {getUnitList} from '@/api/ecw/unit' import WorkFlow from '@/components/WorkFlow'
import {openedRouterList} from "@/api/ecw/warehouse" import {getDarkReturnCommission} from '@/api/ecw/customerCommission'
export default { export default {
name: "specialCommission", name: "OrderSpecialCommission",
props: {
order: Object,
orderItem: Object,
},
components: { components: {
WorkFlow WorkFlow
}, },
props: { created() {
orderItemId: [String, Number] // 查看详情,列表进来的
this.getOrderSpecial()
getUnitList().then(res => this.unitList = res.data)
getCurrencyList().then(res => this.currencyList = res.data)
getProductType(this.orderItem.prodType).then(res => {
this.productType = res.data
})
if(this.order.channelId){
getChannel(this.order.channelId).then(res => {
this.channel = res.data
})
}
}, },
data() { data() {
return { return {
reason:'', applyType: 3, // 1是优惠申请2是管理折扣3是佣金设置4是重货优惠5是泡货优惠
dialogVisible:false, unitList:[],
loading:false,
form:{},
selectedUsers:[],
orderData:{},
channelList:[],
currencyList:[], currencyList:[],
productAttrList:[], ccIdArr: [],
unitType:[], form: {
startTitleZh:'', type: 3
destTitleZh:'', },
shadeCommissionAmount:0, rules:{
lightCommissionAmount:0 seaFreight : {required: true, message: '运费不能为空'},
}; clearanceFreight: {required: true, message: '清关费不能为空'}
},
productType: null,
channel: null,
darkCommission: null
}
}, },
created() { watch:{
if(this.orderItemId){ ccIdArr(){
this.form.orderItemId = this.orderItemId - 0 this.$set(this.form, 'ccIds', this.ccIdArr.join(','))
this.getOrderSpecialData() },
'form.commissionType'(val, old){
if(typeof old !='undefined' && old != val){
this.$set(this.form, 'lightCommissionAmount', 0)
this.$set(this.form, 'shadeCommissionAmount', 0)
}
// 暗佣需要查询暗佣设置
if(val == 2){
this.getCommission()
}
} }
// this.getOrderData()
// this.getList()
this.getUnitTypeData()
getChannelList().then(res => this.channelList = res.data)
getCurrencyList().then(res => this.currencyList = res.data)
getProductAttrList().then(res => this.productAttrList = res.data)
}, },
computed:{ methods: {
getDictData(){ handleSubmit(){
return (type, value) => getDictData(type, value) || {} this.$refs.form.validate().then(res => {
createOrderSpecial(Object.assign({}, this.form, {applyType: this.applyType})).then(res => {
this.$message.success(this.$t('提交成功'))
this.$emit('success')
})
})
}, },
getDictDatas(){ getOrderSpecial(){
return getDictDatas getOrderSpecial(this.order.orderId, this.applyType, {orderItemId: this.orderItem.orderItemId}).then(r => {
this.form = r.data
})
},
/* getProductTypeNameById(id){
return this.$l(this.productTypeList.find(e => e.id === id), 'title')
}, */
closeDialog(){
this.$emit('close')
}, },
getCommission(){
getDarkReturnCommission({
customerId: this.order.customerId,
customsType: this.order.customsType,
darkCurrency: this.orderItem.seaFreightCurrency,
darkUnit: this.order.seaFreightVolume,
departureId: this.order.departureVO.departureId,
objectiveId: this.order.objectiveVO.objectiveId,
productAttr: this.orderItem.prodAttrIds.split(',').filter(item => item && item != ''),
productType: this.orderItem.prodType,
transportId: this.order.transportId,
type: 2, // 暗佣
}).then(res => {
this.darkCommission = res.data?.darkCommission
})
}
},
computed: {
// 根据渠道id显示渠道名 // 根据渠道id显示渠道名
getChannelNameById(){ getChannelNameById(){
return channelId => { return channelId => {
const s = this.channelList.find(item => item.channelId == channelId) ?. nameZh const s = this.channelList.find(item => item.channelId == channelId) ?. nameZh
return s ? '' + s + '' : '' return s ? '' + s + '' : ''
} }
}, },
currentMap(){ currencyMap(){
let map = {} let map = {}
this.currencyList.forEach(item => { this.currencyList.forEach(item => {
map[item.id] = item.titleZh map[item.id] = this.$l(item, 'title')
}) })
return map return map
}, },
volumeMap(){ unitMap(){
let map = {} let map = {}
this.unitType.forEach(item => { this.unitList.forEach(item => {
map[item.id] = item.titleZh map[item.id] = this.$l(item, 'title')
}) })
return map return map
},
},
watch: {
'form.lineId'(val){
if (val){
openedRouterList({lineId: val}).then(r => {
if(r.data && r.data.length > 0){
this.startTitleZh = r.data[0].startTitleZh
this.destTitleZh = r.data[0].destTitleZh
}
})
}
} }
},
methods: {
getUnitTypeData () {
getUnitList().then(res => {
if(res.code==0&&res.data&&res.data.length>0){
this.unitType = res.data
}
})
},
getOrderData(){
getOrder(this.form.orderId).then(response => {
this.orderData = response.data
});
},
getProductAttrNameById(id){
return this.productAttrList.find(e => e.id === id)?.attrName || ''
},
/** 查询列表 */
getOrderSpecialData(){
getOrderSpecial(this.form.orderItemId,3).then(r => {
this.form = r.data
this.lightCommissionAmount = this.form.lightCommissionAmount
this.shadeCommissionAmount = this.form.shadeCommissionAmount
this.form.commissionType = this.form.commissionType.toString()
})
},
submitForm(){
this.form.applyType = 3
this.form.commissionType = parseInt(this.form.commissionType)
if(this.form.commissionType==1){
this.form.lightCommissionAmount = this.lightCommissionAmount
}
if(this.form.commissionType==3){
this.form.lightCommissionAmount = this.lightCommissionAmount
this.form.shadeCommissionAmount = this.shadeCommissionAmount
}
this.form.ccIds = this.selectedUsers.join(',')
createOrderSpecial(this.form).then(r => {
this.$message.success(r.msg || this.$t('提交成功'))
this.$store.dispatch('tagsView/delCurrentView')
})
},
cancelSplit(){
let that = this
if(!that.reason){
that.$message.error(this.$t("请输入取消原因"));
return
}
cancelOrderSpecial(that.form.orderApprovalId,{reason:that.reason}).then(res=>{
that.$message.success(this.$t("取消成功"));
that.$store.dispatch('tagsView/delCurrentView')
})
},
} }
} }
</script> </script>
<style scoped>
.card-title{
font-size: 18px;
font-weight: bold;
margin-top: 10px;
}
.card-info{
font-size: 16px;
}
.card{
margin-top: 20px;
}
.btn-header{
width: 90%;
display: flex;
align-items: center;
justify-content: space-between;
margin: 20px 0;
}
.red{
color:#ff3430;
font-size: 15px;
}
.footer_btn{
padding-bottom: 60px;
}
.cancel_notice{
font-size: 16px;
font-weight: 600;
}
.cancel_content{
display: flex;
align-items: center;
padding-top: 20px;
}
.cancel_content span{
width: 100px;
}
</style>
<template> <template>
<div class="app-container"> <el-dialog visible :close-on-click-modal="false" :before-close="closeDialog" :title="applyType == 2 ? $t('管理折扣') : $t('优惠申请')">
<el-row type="flex" justify="center"> <el-form ref="form" :model="form" label-width="80px" :rules="rules">
<el-col :xs="24" :sm="24" :md="24" :lg="20" :xl="16"> <el-form-item :label="$t('商品类型')">
<el-card class="box-card"> <span>{{ $l(productType, 'title') }}</span>
<div slot="header" class="clearfix"> </el-form-item>
<span style="font-size: 18px;font-weight: bold">{{$t('优惠申请')}}</span> <el-form-item :label="$t('商品名称')">
</div> <span>{{ orderItem.prodTitleZh }}</span>
<el-form ref="form" :model="form" label-width="80px"> </el-form-item>
<el-form-item label="商品类型"> <el-form-item :label="$t('英文名称')">
<span>{{ getProductAttrNameById(form.prodType) }}</span> <span>{{ orderItem.prodTitleEn }}</span>
</el-form-item> </el-form-item>
<el-form-item label="商品名称"> <el-form-item :label="$t('线路')">
<span>{{ form.prodTitleZh }}</span> <dict-tag :type="DICT_TYPE.TRANSPORT_TYPE" :value="order.transportId" />
</el-form-item> {{ channel ? $l(channel, 'title') : '' }}
<el-form-item label="英文名称"> {{$t("从【{departureName}】发往【{objectiveName}", {departureName: $l(order.logisticsInfoDto, 'startTitle'), objectiveName: $l(order.logisticsInfoDto, 'destTitle')})}}
<span>{{ form.prodTitleEn }}</span> </el-form-item>
</el-form-item> <el-form-item :label="$t('是否预付')">
<el-form-item label="线路"> <dict-tag :type="DICT_TYPE.ECW_YESNO" :value="orderItem.isPayAdvance" />
{{ `【${getDictDataLabel(DICT_TYPE.TRANSPORT_TYPE, form.transportId)}】${ getChannelNameById(form.channelId) }从【${startTitleZh}】发往【${destTitleZh}】`}} </el-form-item>
</el-form-item> <el-row v-if="!orderItem.charging">
<el-form-item label="是否预付"> <el-col :span="12">
{{ form.isPayAdvance === 0 ? '' : '' }} <el-form-item :label="$t('旧运费')">
</el-form-item> {{form.orgFreight}} {{ currentMap[form.freightCurrency] }} / {{ unitMap[form.freightVolume] }}
<el-form-item label="旧运费" style="width: 400px"> </el-form-item>
<el-input v-model="form.orgFreight" readonly> </el-col>
<div slot="prepend" style="width: 60px">{{ currentMap[form.orgFreightCurrency] }}</div> <el-col :span="12">
<div slot="append" style="width: 60px">{{ unitMap[form.orgFreightVolume] }}</div> <el-form-item :label="$t('旧清关费')">
</el-input> {{form.orgClearanceFreight}} {{ currentMap[form.clearanceFreightCurrency] }} / {{ unitMap[form.clearanceFreightVolume] }}
</el-form-item> </el-form-item>
<el-form-item label="旧清关费" style="width: 400px"> </el-col>
<el-input v-model="form.orgClearanceFreight" readonly> </el-row>
<div slot="prepend" style="width: 60px">{{ currentMap[form.orgClearanceFreightCurrency] }}</div> <el-row v-if="!orderItem.charging">
<div slot="append" style="width: 60px">{{ unitMap[form.orgClearanceFreightVolume] }}</div> <el-col :span="12">
</el-input> <el-form-item :label="$t('新运费')" style="width: 400px" prop="seaFreight">
</el-form-item> <el-input v-model="form.seaFreight" type="number" class="w-100" />
<el-form-item label="新运费" required style="width: 400px"> {{ currentMap[form.freightCurrency] }} / {{ unitMap[form.freightVolume] }}
<el-input v-model="form.freight" type="number" class="input-with-select"> </el-form-item>
<div slot="prepend" style="width: 60px">{{ currentMap[form.freightCurrency] }}</div> </el-col>
<div slot="append" style="width: 60px">{{ unitMap[form.freightVolume] }}</div> <el-col :span="12">
</el-input> <el-form-item :label="$t('新清关费')" style="width: 400px" prop="clearanceFreight">
</el-form-item> <el-input v-model="form.clearanceFreight" type="number" class="w-100" />
<el-form-item label="新清关费" required style="width: 400px"> {{ currentMap[form.clearanceFreightCurrency] }} / {{ unitMap[form.clearanceFreightVolume] }}
<el-input v-model="form.clearanceFreight" type="number" class="input-with-select"> </el-form-item>
<div slot="prepend" style="width: 60px">{{ currentMap[form.clearanceFreightCurrency] }}</div> </el-col>
<div slot="append" style="width: 60px">{{ unitMap[form.clearanceFreightVolume] }}</div> </el-row>
</el-input>
</el-form-item> <el-form-item :label="$t('旧全包价')" v-if="orderItem.charging">
</el-form> {{form.freight}} {{ currentMap[form.freightCurrency] }} / {{ unitMap[form.freightVolume] }}
</el-form-item>
<div> <el-form-item :label="$t('新全包价')" style="width: 400px" prop="clearanceFreight" v-if="orderItem.charging">
<h2>审批流程</h2> <el-input v-model="form.freight" type="number" class="w-100" />
<work-flow xmlkey="free_apply" v-model="form.channelId" /> {{ currentMap[form.freightCurrency] }} / {{ unitMap[form.freightVolume] }}
</div> </el-form-item>
<div> </el-form>
<el-button type="primary" @click="handleSubmit">提交</el-button> <div class="page-title">审批流程</div>
</div> <work-flow xmlkey="special_apply" v-model="ccIdArr" />
</el-card> <div v-if="!form.applyStatus">
</el-col> <el-button type="primary" @click="handleSubmit">提交</el-button>
</el-row> </div>
</div> <div v-else>
<el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + form.formId)">
<dict-tag :type="DICT_TYPE.APPLY_STATUS" :value="form.applyStatus" />
</el-button>
</div>
</el-dialog>
</template> </template>
<script> <script>
import {createOrderSpecial, getOrderSpecial, getOrderSpecialByApproveId} from "@/api/ecw/order" import {createOrderSpecial, getOrderSpecial} from "@/api/ecw/order"
import {DICT_TYPE, getDictDataLabel} from "@/utils/dict"
import DictSelector from "@/components/DictSelector"
import {getUnitList} from "@/api/ecw/unit" import {getUnitList} from "@/api/ecw/unit"
import {getChannelList} from "@/api/ecw/channel" import {getChannel, getChannelList} from "@/api/ecw/channel"
import { getCurrencyList } from '@/api/ecw/currency' import { getCurrencyList } from '@/api/ecw/currency'
import { getProductAttrList } from '@/api/ecw/productAttr' import { getProductType } from '@/api/ecw/productType'
import {openedRouterList} from "@/api/ecw/warehouse" import WorkFlow from '@/components/WorkFlow'
import WorkFlow from "@/components/WorkFlow"
export default { export default {
name: "specialDiscount", name: "OrderSpecialDiscount",
props: { props: {
orderItemId: String, order: Object,
id: Number, orderItem: Object,
readonly: { applyType:{ // // 1是优惠申请2是管理折扣3是佣金设置4是重货优惠5是泡货优惠, 默认是优惠申请,可以设置为2表示管理折扣,公用一个组件
type: Boolean, type: Number,
default: false default: 1
} }
}, },
components: { components: {
DictSelector,
WorkFlow WorkFlow
}, },
created() { created() {
// 临时
if(this.$route.query.orderId){
this.form.orderId = this.$route.query.orderId - 0
// this.getOrder()
}
// 查看详情,列表进来的 // 查看详情,列表进来的
if(this.orderItemId){ this.getOrderSpecial()
this.form.orderItemId = this.orderItemId - 0
this.getOrderSpecial()
}
// 从流程查看详情
if(this.id)
this.getOrderSpecialByApproveId()
getUnitList().then(res => this.unitList = res.data) getUnitList().then(res => this.unitList = res.data)
getChannelList().then(res => this.channelList = res.data)
getCurrencyList().then(res => this.currencyList = res.data) getCurrencyList().then(res => this.currencyList = res.data)
getProductAttrList().then(res => this.productAttrList = res.data)
getProductType(this.orderItem.prodType).then(res => {
this.productType = res.data
})
if(this.order.channelId){
getChannel(this.order.channelId).then(res => {
this.channel = res.data
})
}
}, },
data() { data() {
return { return {
getDictDataLabel, // applyType: 1, // 1是优惠申请2是管理折扣3是佣金设置4是重货优惠5是泡货优惠
DICT_TYPE,
unitList:[], unitList:[],
channelList:[], // channelList:[],
currencyList:[], currencyList:[],
productAttrList:[], // productTypeList:[],
form: { ccIdArr: [],
"abnormalState": 0, form: { },
"applyResult": "", rules:{
"applyStatus": 0, seaFreight : {required: true, message: '运费不能为空'},
"applyType": '1', clearanceFreight: {required: true, message: '清关费不能为空'}
"ccIds": "",
"channelId": 0,
"charging": 0,
"clearanceFreight": 0,
"clearanceFreightCurrency": 0,
"clearanceFreightVolume": 0,
"commissionCurrencyId": 0,
"commissionType": 0,
"commission_id": 0,
"destAddressEn": "",
"destAddressZh": "",
"destTitleEn": "",
"destTitleZh": "",
"destVolume": "",
"destWarehouseId": 0,
"freight": 0,
"freightCurrency": 0,
"freightVolume": 0,
"inWarehouseState": 0,
"isPayAdvance": 0,
"lightCommissionAmount": 0,
"lineId": 0,
"orderId": 0,
"orderItemId": 0,
"orderNo": "",
"orgClearanceFreight": 0,
"orgClearanceFreightCurrency": 0,
"orgClearanceFreightVolume": 0,
"orgFreight": 0,
"orgFreightCurrency": 0,
"orgFreightVolume": 0,
"orgVWeight": "",
"orgWVolume": "",
"prodId": 0,
"prodTitleEn": "",
"prodTitleZh": "",
"prodType": 0,
"shadeCommissionAmount": 0,
"shipmentState": 0,
"startAddressEn": "",
"startAddressZh": "",
"startTitleEn": "",
"startTitleZh": "",
"startVolume": "",
"startWarehouseId": 0,
"status": 0,
"toWarehouseState": 0,
"transportId": 0,
"vweight": "",
"wvolume": ""
}, },
productType: null,
startTitleZh: '', channel: null
destTitleZh: '' }
},
watch:{
ccIdArr(){
this.$set(this.form, 'ccIds', this.ccIdArr.join(','))
} }
}, },
methods: { methods: {
handleSubmit(){ handleSubmit(){
createOrderSpecial({ this.$refs.form.validate().then(res => {
"applyType": this.isDiscount ? '2' : '1', createOrderSpecial(Object.assign({}, this.form, {applyType: this.applyType})).then(res => {
clearanceFreight: this.form.clearanceFreight, this.$message.success(this.$t('提交成功'))
clearanceFreightCurrency: this.form.clearanceFreightCurrency, this.$emit('success')
clearanceFreightVolume: this.form.clearanceFreightVolume, })
orderId: this.form.orderId,
orderItemId: this.form.orderItemId,
freight: this.form.freight,
freightCurrency: this.form.freightCurrency,
freightVolume: this.form.freightVolume,
}).then(r => {
this.$message.success(r.msg || '提交成功')
this.$tab.closePage()
}) })
}, },
getOrderSpecial(){ getOrderSpecial(){
getOrderSpecial(this.form.orderItemId).then(r => { getOrderSpecial(this.order.orderId, this.applyType, {orderItemId: this.orderItem.orderItemId}).then(r => {
this.form = r.data
this.form.freight = ''
this.form.clearanceFreight = ''
})
},
getOrderSpecialByApproveId(){
getOrderSpecialByApproveId(this.id).then(r => {
this.form = r.data this.form = r.data
}) })
}, },
getProductAttrNameById(id){ /* getProductTypeNameById(id){
return this.productAttrList.find(e => e.id === id)?.attrName || '' return this.$l(this.productTypeList.find(e => e.id === id), 'title')
}, */
closeDialog(){
this.$emit('close')
} }
}, },
computed: { computed: {
// 折扣管理页面
isDiscount(){
return this.$route.query.discount
},
// 根据渠道id显示渠道名 // 根据渠道id显示渠道名
getChannelNameById(){ getChannelNameById(){
return channelId => { return channelId => {
...@@ -228,33 +158,17 @@ export default { ...@@ -228,33 +158,17 @@ export default {
currentMap(){ currentMap(){
let map = {} let map = {}
this.currencyList.forEach(item => { this.currencyList.forEach(item => {
map[item.id] = item.titleZh map[item.id] = this.$l(item, 'title')
}) })
return map return map
}, },
unitMap(){ unitMap(){
let map = {} let map = {}
this.unitList.forEach(item => { this.unitList.forEach(item => {
map[item.id] = item.titleZh map[item.id] = this.$l(item, 'title')
}) })
return map return map
} }
},
watch: {
'form.lineId'(val){
if (val){
openedRouterList({lineId: val}).then(r => {
if(r.data && r.data.length > 0){
this.startTitleZh = r.data[0].startTitleZh
this.destTitleZh = r.data[0].destTitleZh
}
})
}
}
} }
} }
</script> </script>
<style scoped lang="scss">
</style>
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
prop="address" prop="address"
:label="$t('入库货物属性')"> :label="$t('入库货物属性')">
<template v-slot="{row}"> <template v-slot="{row}">
<!-- // TODO 待测试完善 --> <!-- // TODO 缺少入库品牌信息 -->
<template v-if="row.warehouseInInfoVO"> <template v-if="row.warehouseInInfoVO">
{{$t('品牌')}}<dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="row.brandType" /><br> {{$t('品牌')}}<dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="row.brandType" /><br>
{{$t('箱数')}}{{ row.warehouseInInfoVO.cartonsNum }}<br> {{$t('箱数')}}{{ row.warehouseInInfoVO.cartonsNum }}<br>
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
<el-table-column <el-table-column
:label="$t('原价')"> :label="$t('原价')">
<template v-slot="{row}"> <template v-slot="{row}">
<template v-if="!row.originalSeaFreight">未报价</template> <template v-if="!row.originalSeaFreight">{{$t('未报价')}}</template>
<template v-else-if="row.charging ==1"> <template v-else-if="row.charging ==1">
{{$t('全包价')}}{{ row.originalSeaFreight }} {{ currencyMap[row.seaFreightCurrency] }}/{{ unitMap[row.seaFreightVolume] }} {{$t('全包价')}}{{ row.originalSeaFreight }} {{ currencyMap[row.seaFreightCurrency] }}/{{ unitMap[row.seaFreightVolume] }}
</template> </template>
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<el-table-column <el-table-column
label="成本价"> label="成本价">
<template v-slot="{row}"> <template v-slot="{row}">
<template v-if="!row.costSeaFreight">未报价</template> <template v-if="!row.costSeaFreight">{{$t('未报价')}}</template>
<template v-else-if="row.charging"> <template v-else-if="row.charging">
{{$t('全包价')}}{{ row.costSeaFreight }} {{ currencyMap[row.seaFreightCurrency] }}/{{ unitMap[row.seaFreightVolume] }} {{$t('全包价')}}{{ row.costSeaFreight }} {{ currencyMap[row.seaFreightCurrency] }}/{{ unitMap[row.seaFreightVolume] }}
</template> </template>
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
<el-table-column <el-table-column
:label="$t('销售价')"> :label="$t('销售价')">
<template v-slot="{row}"> <template v-slot="{row}">
<template v-if="!row.oneSeaFreight">未报价</template> <template v-if="!row.oneSeaFreight">{{$t('未报价')}}</template>
<template v-else-if="row.charging"> <template v-else-if="row.charging">
{{$t('全包价')}}{{ row.oneSeaFreight }} {{ currencyMap[row.seaFreightCurrency] }}/{{ unitMap[row.seaFreightVolume] }} {{$t('全包价')}}{{ row.oneSeaFreight }} {{ currencyMap[row.seaFreightCurrency] }}/{{ unitMap[row.seaFreightVolume] }}
</template> </template>
...@@ -93,23 +93,33 @@ ...@@ -93,23 +93,33 @@
prop="address" prop="address"
:label="$t('操作')"> :label="$t('操作')">
<template v-slot="{row}"> <template v-slot="{row}">
<el-button size="mini" type="text" v-hasPermi="['ecw:order:update']" @click="showDiscountItemId=row.orderItemId">优惠申请</el-button> <el-button size="mini" type="text" v-hasPermi="['ecw:order:update']" @click="showDiscountItem=row">{{$t('优惠申请')}}</el-button>
<el-button size="mini" type="text" v-hasPermi="['ecw:order:update']" @click="$router.push(`/order/specialCommission/${row.orderItemId}`)">佣金规则</el-button> <el-button size="mini" type="text" v-hasPermi="['ecw:order:update']" @click="showCommissionItem=row">{{$t('佣金规则')}}</el-button>
<el-button size="mini" type="text" v-hasPermi="['ecw:order:update']" @click="$router.push(`/order/discount1/${row.orderItemId}?orderId=${row.orderId}&discount=1`)">管理折扣</el-button> <el-button size="mini" type="text" v-hasPermi="['ecw:order:update']" @click="showAllowanceItem=row">{{$t('管理折扣')}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div style="text-align: center;margin-top: 80px"> <div class="mt-50 flex-center">
<el-button type="primary" @click="toweight" v-if="hasWarehouseInInfo && (order.transportId === 1 || order.transportId === 2)">申请重货优惠</el-button> <!--
<el-button type="primary" @click="tolight" v-if="hasWarehouseInInfo && (order.transportId === 3 || order.transportId === 4)">申请泡货优惠</el-button> 1.海运整柜、海运拼柜显示重货优惠 1,2
<el-button type="primary" @click="$tab.closePage()">关闭窗口</el-button> 2.空运专线、海空联运显示泡货优惠 3,4
-->
<el-button type="primary" @click="showPreferentialType=4" v-if="order.transportId === 1 || order.transportId === 2">{{$t('申请重货优惠')}}</el-button>
<el-button type="primary" @click="showPreferentialType=5" v-else>{{$t('申请泡货优惠')}}</el-button>
<el-button type="primary" @click="$tab.closePage()">{{$t('关闭窗口')}}</el-button>
</div> </div>
</el-card> </el-card>
<special-discount v-if="!!showDiscountItemId" :order="order" :orderItemId="showDiscountItemId" /> <!-- 优惠申请 -->
<discount v-if="!!showDiscountItem" :order="order" :orderItem="showDiscountItem" @close="showDiscountItem=null" @success="onDiscountSuccess" />
<!-- 管理折扣 -->
<discount v-if="!!showAllowanceItem" :order="order" :orderItem="showAllowanceItem" @close="showAllowanceItem=null" :applyType="2" @success="onDiscountSuccess" />
<!-- 佣金规则 -->
<commission v-if="!!showCommissionItem" :order="order" :orderItem="showCommissionItem" @close="showCommissionItem=null" @success="onCommissionSuccess" />
<!-- 重泡货优惠 -->
<preferential v-if="!!showPreferentialType" :applyType="showPreferentialType" :order="order" @close="showPreferentialType=null" @success="onPreferentialSuccess" />
</div> </div>
</template> </template>
...@@ -121,11 +131,13 @@ import {getProductAttrList} from "@/api/ecw/productAttr" ...@@ -121,11 +131,13 @@ import {getProductAttrList} from "@/api/ecw/productAttr"
import { parseTime } from '@/utils/ruoyi' import { parseTime } from '@/utils/ruoyi'
import {getOrder} from "@/api/ecw/order" import {getOrder} from "@/api/ecw/order"
import SpecialDiscount from '@/views/ecw/order/components/SpecialDiscount.vue' import Discount from './Discount'
import Commission from './Commission'
import Preferential from './Preferential'
export default { export default {
name: "OrderSpecial", name: "OrderSpecial",
components: { components: {
SpecialDiscount Discount, Commission, Preferential
}, },
props: { props: {
orderId: [String, Number] orderId: [String, Number]
...@@ -138,15 +150,14 @@ export default { ...@@ -138,15 +150,14 @@ export default {
// 遮罩层 // 遮罩层
loading: true, loading: true,
list: [], list: [],
total:0, /* total:0,
params:{ params:{
page:1, page:1,
rows:20, rows:20,
orderId:0, orderId:0,
type:2 type:2
}, }, */
relationId:0, relationId:0,
creatorName:'test',
order: { order: {
number: '', number: '',
orderItemVOList: [] orderItemVOList: []
...@@ -156,14 +167,14 @@ export default { ...@@ -156,14 +167,14 @@ export default {
productAttrList:[], productAttrList:[],
hasWarehouseInInfo: false, hasWarehouseInInfo: false,
showDiscountItemId: null showDiscountItem: null, // 优惠申请
showCommissionItem: null, // 佣金规则
showAllowanceItem: null, // 管理折扣
showPreferentialType: null, // 重泡货类型
}; };
}, },
created() { created() {
if(this.orderId){ this.getOrder()
this.params.orderId = this.orderId
this.getOrder()
}
getUnitList().then(res => this.unitList = res.data) getUnitList().then(res => this.unitList = res.data)
getCurrencyList().then(res => this.currencyList = res.data) getCurrencyList().then(res => this.currencyList = res.data)
getProductAttrList().then(res => this.productAttrList = res.data) getProductAttrList().then(res => this.productAttrList = res.data)
...@@ -191,17 +202,18 @@ export default { ...@@ -191,17 +202,18 @@ export default {
path:"/order/specialLight/"+this.params.orderId, path:"/order/specialLight/"+this.params.orderId,
}) })
}, },
/* getProductNamesByIds(ids){ onDiscountSuccess(){
const result = [] this.showDiscountItem = null
ids.split(',').forEach(e => { this.getOrder()
this.productAttrList.forEach(f => { },
if (parseInt(e) === f.id) { onCommissionSuccess(){
result.push(f.attrName) this.showCommissionItem = null
} this.getOrder()
}) },
}) onPreferentialSuccess(){
return result.join(',') this.showPreferentialType = null
} */ this.getOrder()
}
}, },
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