Commit 17db2b38 authored by dragondean@qq.com's avatar dragondean@qq.com

完善审核

parent 3c4db856
...@@ -11,6 +11,7 @@ const i18n = new VueI18n({ ...@@ -11,6 +11,7 @@ const i18n = new VueI18n({
'zh_CN': require('./languages/zh_CN.json') 'zh_CN': require('./languages/zh_CN.json')
} }
}) })
window.i18n = i18n
console.log({i18n}) console.log({i18n})
/* /*
用法 用法
...@@ -19,7 +20,7 @@ $l(item, 'title') => item.titleZh ...@@ -19,7 +20,7 @@ $l(item, 'title') => item.titleZh
$l(null, 'title') => titleZh $l(null, 'title') => titleZh
$l() => Zh $l() => Zh
*/ */
Vue.prototype.$l = (object, field = '') => { Vue.prototype.$l = i18n.l = (object, field = '') => {
let prefix = i18n.locale.split('_')[0] let prefix = i18n.locale.split('_')[0]
let append = prefix.charAt(0).toUpperCase() + prefix.toLowerCase().substr(1) let append = prefix.charAt(0).toUpperCase() + prefix.toLowerCase().substr(1)
if(typeof object == 'string'){ if(typeof object == 'string'){
......
...@@ -40,8 +40,10 @@ ...@@ -40,8 +40,10 @@
<dict-selector :type="DICT_TYPE.SYSTEM_LOCALE" v-model="lang" defaultable class="right-menu-item select-nav" /> <dict-selector :type="DICT_TYPE.SYSTEM_LOCALE" v-model="lang" defaultable class="right-menu-item select-nav" />
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click"> <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
<div class="avatar-wrapper">
<img :src="avatar" class="user-avatar"> <div class="avatar-wrapper flex-center">
{{$store.getters.name}}
<img :src="avatar" class="user-avatar ml-10">
<i class="el-icon-caret-bottom" /> <i class="el-icon-caret-bottom" />
</div> </div>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
......
...@@ -109,7 +109,7 @@ const user = { ...@@ -109,7 +109,7 @@ const user = {
user: { user: {
id: '', id: '',
avatar: '', avatar: '',
userName: '' nickname: ''
} }
} }
} }
...@@ -125,7 +125,7 @@ const user = { ...@@ -125,7 +125,7 @@ const user = {
commit('SET_ROLES', ['ROLE_DEFAULT']) commit('SET_ROLES', ['ROLE_DEFAULT'])
} }
commit('SET_ID', user.id) commit('SET_ID', user.id)
commit('SET_NAME', user.userName) commit('SET_NAME', user.nickname)
commit('SET_AVATAR', avatar) commit('SET_AVATAR', avatar)
resolve(res) resolve(res)
}).catch(error => { }).catch(error => {
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
* 数据字典工具类 * 数据字典工具类
*/ */
import store from '@/store' import store from '@/store'
import i18n from '@/i18n'
export const DICT_TYPE = { export const DICT_TYPE = {
USER_TYPE: 'user_type', USER_TYPE: 'user_type',
...@@ -256,7 +257,7 @@ export function getDictData(dictType, value) { ...@@ -256,7 +257,7 @@ export function getDictData(dictType, value) {
export function getDictDataLabel(dictType, value) { export function getDictDataLabel(dictType, value) {
const dict = getDictData(dictType, value); const dict = getDictData(dictType, value);
return dict ? dict.label : ''; return dict ? i18n.l(dict, 'label') : '';
} }
export class getDictDataL { export class getDictDataL {
......
...@@ -158,10 +158,22 @@ export default { ...@@ -158,10 +158,22 @@ export default {
return false return false
} }
const map = { const map = {
// 报价单特价审核,原来配置的组件名
"special-discount": { "special-discount": {
component: 'special-detail', component: 'SpecialDetail',
id: this.processInstance.businessKey, id: this.processInstance.businessKey,
readonly: true type: 1
},
// 报价单特价审核,符合命名规则的组件名
offer_special: {
component: 'SpecialDetail',
id: this.processInstance.businessKey,
type: 1
},
offer_commission: {
component: 'SpecialDetail',
id: this.processInstance.businessKey,
type: 2
}, },
free_apply: { free_apply: {
component: "warehouseDetails", component: "warehouseDetails",
......
<template> <template>
<el-dialog visible :close-on-click-modal="false" :before-close="closeDialog" :title="$t('佣金规则申请')"> <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 ref="form" :model="form" label-width="80px" :rules="rules" :disabled="!!form.applyStatus">
<el-form-item :label="$t('商品类型')"> <el-form-item :label="$t('商品类型')">
<span>{{ getProductAttrNameById(form.productType) }}</span> <span>{{ getProductTypeNameById(form.productType) }}</span>
</el-form-item> </el-form-item>
<el-form-item :label="$t('商品名称')"> <el-form-item :label="$t('商品名称')">
<span>{{ form.prodTitleZh }}</span> <span>{{ form.prodTitleZh }}</span>
...@@ -66,9 +66,10 @@ ...@@ -66,9 +66,10 @@
<div v-if="form.commissionType == 1 || form.commissionType == 3">销售价:{{form.orgSeaFreight + form.shadeCommissionAmount + form.lightCommissionAmount }} {{ currentMap[form.orgSeaFreightCurrency] }} / {{ unitMap[form.orgSeaFreightVolume] }}</div> <div v-if="form.commissionType == 1 || form.commissionType == 3">销售价:{{form.orgSeaFreight + form.shadeCommissionAmount + form.lightCommissionAmount }} {{ currentMap[form.orgSeaFreightCurrency] }} / {{ unitMap[form.orgSeaFreightVolume] }}</div>
<div v-if="form.commissionType == 3">实际佣金返点:{{form.shadeCommissionAmount + form.lightCommissionAmount }} {{ currentMap[form.orgSeaFreightCurrency] }} / {{ unitMap[form.orgSeaFreightVolume] }}</div> <div v-if="form.commissionType == 3">实际佣金返点:{{form.shadeCommissionAmount + form.lightCommissionAmount }} {{ currentMap[form.orgSeaFreightCurrency] }} / {{ unitMap[form.orgSeaFreightVolume] }}</div>
</div> </div>
</el-form>
<div class="page-title">审批流程</div> <div class="page-title">审批流程</div>
<work-flow xmlkey="sheet_sale" v-model="ccIdArr" /> <work-flow xmlkey="sheet_sale" v-model="ccIdArr" />
</el-form>
<div v-if="!form.applyStatus"> <div v-if="!form.applyStatus">
<el-button type="primary" @click="handleSubmit">提交</el-button> <el-button type="primary" @click="handleSubmit">提交</el-button>
...@@ -88,7 +89,7 @@ import DictSelector from "@/components/DictSelector" ...@@ -88,7 +89,7 @@ import DictSelector from "@/components/DictSelector"
import {getUnitList} from "@/api/ecw/unit" import {getUnitList} from "@/api/ecw/unit"
import {getChannelList} 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 { getProductTypeList } from '@/api/ecw/productType'
import WorkFlow from '@/components/WorkFlow' import WorkFlow from '@/components/WorkFlow'
import {getDarkReturnCommission} from '@/api/ecw/customerCommission' import {getDarkReturnCommission} from '@/api/ecw/customerCommission'
export default { export default {
...@@ -109,7 +110,7 @@ export default { ...@@ -109,7 +110,7 @@ export default {
getUnitList().then(res => this.unitList = res.data) getUnitList().then(res => this.unitList = res.data)
getChannelList().then(res => this.channelList = 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) getProductTypeList().then(res => this.productTypeList = res.data)
}, },
data() { data() {
...@@ -119,7 +120,7 @@ export default { ...@@ -119,7 +120,7 @@ export default {
unitList:[], unitList:[],
channelList:[], channelList:[],
currencyList:[], currencyList:[],
productAttrList:[], productTypeList:[],
ccIdArr: [], ccIdArr: [],
form: { form: {
type: 2 type: 2
...@@ -157,9 +158,12 @@ export default { ...@@ -157,9 +158,12 @@ export default {
ccIdArr(){ ccIdArr(){
this.$set(this.form, 'ccIds', this.ccIdArr.join(',')) this.$set(this.form, 'ccIds', this.ccIdArr.join(','))
}, },
'form.commissionType'(val){ 'form.commissionType'(val, old){
if(typeof old !='undefined' && old != val){
this.$set(this.form, 'lightCommissionAmount', 0) this.$set(this.form, 'lightCommissionAmount', 0)
this.$set(this.form, 'shadeCommissionAmount', 0) this.$set(this.form, 'shadeCommissionAmount', 0)
}
// 暗佣需要查询暗佣设置 // 暗佣需要查询暗佣设置
if(val == 2){ if(val == 2){
...@@ -185,8 +189,8 @@ export default { ...@@ -185,8 +189,8 @@ export default {
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(){ closeDialog(){
this.$emit('close') this.$emit('close')
...@@ -199,7 +203,7 @@ export default { ...@@ -199,7 +203,7 @@ export default {
darkUnit: this.form.orgSeaFreightVolume, darkUnit: this.form.orgSeaFreightVolume,
departureId: this.offer.departureId, departureId: this.offer.departureId,
objectiveId: this.offer.objectiveId, objectiveId: this.offer.objectiveId,
productAttr: 3, //this.offerProd.prodAttrIds, productAttr: this.offerProd.prodAttrIds.split(',').filter(item => item && item != ''),
productType: this.offerProd.productType, productType: this.offerProd.productType,
transportId: this.offer.transportId, transportId: this.offer.transportId,
type: 2, // 暗佣 type: 2, // 暗佣
......
<template> <template>
<el-descriptions border :column="1"> <el-descriptions border :column="3" v-if="offer">
<el-descriptions-item label="商品类型">{{ form.productType }}</el-descriptions-item> <el-descriptions-item label="报价单号">{{offer.number}}</el-descriptions-item>
<el-descriptions-item label="运输方式">
<dict-tag :type="DICT_TYPE.TRANSPORT_TYPE" :value="offer.transportId" />
</el-descriptions-item>
<el-descriptions-item label="出货方式">
{{ channel ? $l(channel, 'name') : '/' }}
</el-descriptions-item>
<el-descriptions-item label="报价单状态">
<dict-tag :type="DICT_TYPE.ECW_OFFER_STATUS" :value="offer.status" />
</el-descriptions-item>
<el-descriptions-item label="唛头">{{offer.marks}}</el-descriptions-item>
<el-descriptions-item label="始发仓">{{form.departureName}}</el-descriptions-item>
<el-descriptions-item label="目的仓">{{form.objectiveName}}</el-descriptions-item>
<el-descriptions-item label="申请原因" :span="3" v-if="type == 2">
<div class="item">
商品:{{$l(form, 'prodTitle')}}
</div>
<div class="item">
佣金规则:{{$t('从【{oldType}】改为【{newType}', {
oldType: getDictDataLabel(DICT_TYPE.COMMISSION_TYPE, offer.commissionType) ,
newType: getDictDataLabel(DICT_TYPE.COMMISSION_TYPE, form.commissionType),
})}}
</div>
<div>
原运费:{{form.seaFreight + currentMap[form.orgSeaFreightCurrency] + '/' + unitMap[form.orgSeaFreightVolume]}}
</div>
<div>
新运费:{{newSeaFreight + currentMap[form.orgSeaFreightCurrency] + '/' + unitMap[form.orgSeaFreightVolume]}}
</div>
<div>
成本价:{{form.orgSeaFreight + currentMap[form.orgSeaFreightCurrency] + '/' + unitMap[form.orgSeaFreightVolume]}}
</div>
<div>
明佣:{{ form.lightCommissionAmount + currentMap[form.orgSeaFreightCurrency] + '/' + unitMap[form.orgSeaFreightVolume]}}
</div>
<div>
暗佣:{{form.shadeCommissionAmount + currentMap[form.orgSeaFreightCurrency] + '/' + unitMap[form.orgSeaFreightVolume]}}
</div>
</el-descriptions-item>
<el-descriptions-item label="申请原因" :span="3" v-if="type == 1">
<div class="item">
商品:{{$l(form, 'prodTitle')}}
</div>
<div>
原运费:{{form.orgSeaFreight + currentMap[form.seaFreight] + '/' + unitMap[form.seaFreight]}}
原清关费:{{form.orgClearanceFreight + currentMap[form.clearanceFreightCurrency] + '/' + unitMap[form.clearanceFreightVolume]}}
</div>
<div>
新运费:{{seaFreight + currentMap[form.orgSeaFreightCurrency] + '/' + unitMap[form.orgSeaFreightVolume]}}
新清关费:{{form.clearanceFreight + currentMap[form.clearanceFreightCurrency] + '/' + unitMap[form.clearanceFreightVolume]}}
</div>
</el-descriptions-item>
<!--
<el-descriptions-item label="商品类型">{{ $l(productType, 'title') }}</el-descriptions-item>
<el-descriptions-item label="商品名称">{{ form.prodTitleZh }}</el-descriptions-item> <el-descriptions-item label="商品名称">{{ form.prodTitleZh }}</el-descriptions-item>
<el-descriptions-item label="英文名称">{{ form.prodTitleEn }}</el-descriptions-item> <el-descriptions-item label="英文名称">{{ form.prodTitleEn }}</el-descriptions-item>
<el-descriptions-item label="线路"> <el-descriptions-item label="线路">
{{ `【${getDictDataLabel(DICT_TYPE.TRANSPORT_TYPE, form.transportId)}】${ getChannelNameById(form.channelId) }从【${form.departureName}】发往【${form.objectiveName}】`}} <dict-tag :type="DICT_TYPE.TRANSPORT_TYPE" :value="form.transportId" />
<template v-if="channel">
{{ $l(channel, 'name') }}
</template>
{{$t("从【{start}】发往【{dest}", { start: form.departureName, dest: form.objectiveName })}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="是否预付">{{ form.isPayAdvance === 0 ? '' : '' }}</el-descriptions-item> <el-descriptions-item label="是否预付">
<el-descriptions-item label="旧运费">{{ form.orgSeaFreight }} {{ currentMap[form.orgSeaFreightCurrency] }}/{{ unitMap[form.orgSeaFreightVolume] }}</el-descriptions-item> <dict-tag :type="DICT_TYPE.ECW_PAY_ADVANCE" :value="form.isPayAdvance" />
</el-descriptions-item> -->
<!-- <el-descriptions-item label="旧运费">{{ form.orgSeaFreight }} {{ currentMap[form.orgSeaFreightCurrency] }}/{{ unitMap[form.orgSeaFreightVolume] }}</el-descriptions-item>
<el-descriptions-item label="旧清关费">{{ form.orgClearanceFreight }} {{ currentMap[form.orgClearanceFreightCurrency] }}/{{ unitMap[form.orgClearanceFreightVolume] }}</el-descriptions-item> <el-descriptions-item label="旧清关费">{{ form.orgClearanceFreight }} {{ currentMap[form.orgClearanceFreightCurrency] }}/{{ unitMap[form.orgClearanceFreightVolume] }}</el-descriptions-item>
<el-descriptions-item label="新运费">{{ form.seaFreight }} {{ currentMap[form.seaFreightCurrency] }}/{{ unitMap[form.seaFreightVolume] }}</el-descriptions-item> <el-descriptions-item label="新运费">{{ form.seaFreight }} {{ currentMap[form.seaFreightCurrency] }}/{{ unitMap[form.seaFreightVolume] }}</el-descriptions-item>
<el-descriptions-item label="新清关费">{{ form.clearanceFreight }} {{ currentMap[form.clearanceFreightCurrency] }}/{{ unitMap[form.clearanceFreightVolume] }}</el-descriptions-item> <el-descriptions-item label="新清关费">{{ form.clearanceFreight }} {{ currentMap[form.clearanceFreightCurrency] }}/{{ unitMap[form.clearanceFreightVolume] }}</el-descriptions-item> -->
</el-descriptions> </el-descriptions>
</template> </template>
<script> <script>
import {createOfferSpecial, getOfferSpecial, getOfferSpecialByApproveId} from "@/api/ecw/offer" import {getOfferSpecialByApproveId, getOffer} from "@/api/ecw/offer"
import {DICT_TYPE, getDictDataLabel} from "@/utils/dict"
import {getUnitList} from "@/api/ecw/unit" import {getUnitList} from "@/api/ecw/unit"
import {getChannelList} from "@/api/ecw/channel" import {getChannel} 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 Decimal from 'decimal.js'
export default { export default {
name: "specialDetail", name: "SpecialDetail",
props: { props: {
offerProdId: Number,
id: [String, Number], id: [String, Number],
readonly: { type: Number, // 类型,1特价,2佣金
type: Boolean,
default: false
}
}, },
created() { created() {
// 从流程查看详情 // 从流程查看详情
...@@ -38,84 +97,60 @@ export default { ...@@ -38,84 +97,60 @@ export default {
this.getOfferSpecialByApproveId() this.getOfferSpecialByApproveId()
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)
}, },
data() { data() {
return { return {
getDictDataLabel,
DICT_TYPE,
unitList:[], unitList:[],
channelList:[], channelList:[],
currencyList:[], currencyList:[],
productAttrList:[], productType: null,
ccIdArr: [], channel: null,
form: { offer: null,
type: 1 form:{}
},
rules:{
seaFreight : {required: true, message: '运费不能为空'},
clearanceFreight: {required: true, message: '清关费不能为空'}
}
}
},
watch:{
ccIdArr(){
this.$set(this.form, 'ccIds', this.ccIdArr.join(','))
}
},
methods: {
handleSubmit(){
this.$refs.form.validate().then(res => {
console.log(this.form.type)
createOfferSpecial(Object.assign({}, this.form, {type: 1})).then(res => {
this.$message.success(r.msg || '提交成功')
})
})
},
getOfferSpecial(){
getOfferSpecial(this.offerProdId, {type: 1}).then(r => {
this.form = r.data
})
},
getOfferSpecialByApproveId(){
getOfferSpecialByApproveId(this.id).then(r => {
this.form = r.data
})
},
getProductAttrNameById(id){
return this.productAttrList.find(e => e.id === id)?.attrName || ''
} }
}, },
computed: { computed: {
// 根据渠道id显示渠道名
getChannelNameById(){
return channelId => {
const s = this.channelList.find(item => item.channelId == channelId) ?. nameZh
return s ? '' + s + '' : ''
}
},
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
},
// 新运费
newSeaFreight(){
return Decimal(this.form.seaFreight).plus(this.form.shadeCommissionAmount).plus(this.form.lightCommissionAmount)
}
},
methods: {
getOfferSpecialByApproveId(){
getOfferSpecialByApproveId(this.id).then(r => {
this.form = r.data
getOffer(this.form.offerId).then(res => {
this.offer = res.data
})
if(this.form.productType){
getProductType(this.form.productType).then(res => {
this.productType = res.data
})
}
if(this.form.channelId){
getChannel(this.form.channelId).then(res => {
this.channel = res.data
})
} }
})
} }
},
} }
</script> </script>
\ No newline at end of file
<style scoped>
</style>
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<el-dialog visible :close-on-click-modal="false" :before-close="closeDialog" :title="$t('优惠申请')"> <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 ref="form" :model="form" label-width="80px" :rules="rules">
<el-form-item :label="$t('商品类型')"> <el-form-item :label="$t('商品类型')">
<span>{{ getProductAttrNameById(form.productType) }}</span> <span>{{ getProductTypeNameById(form.productType) }}</span>
</el-form-item> </el-form-item>
<el-form-item :label="$t('商品名称')"> <el-form-item :label="$t('商品名称')">
<span>{{ form.prodTitleZh }}</span> <span>{{ form.prodTitleZh }}</span>
...@@ -73,7 +73,7 @@ import DictSelector from "@/components/DictSelector" ...@@ -73,7 +73,7 @@ import DictSelector from "@/components/DictSelector"
import {getUnitList} from "@/api/ecw/unit" import {getUnitList} from "@/api/ecw/unit"
import {getChannelList} 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 { getProductTypeList } from '@/api/ecw/productType'
import WorkFlow from '@/components/WorkFlow' import WorkFlow from '@/components/WorkFlow'
export default { export default {
name: "specialDiscount", name: "specialDiscount",
...@@ -92,7 +92,7 @@ export default { ...@@ -92,7 +92,7 @@ export default {
getUnitList().then(res => this.unitList = res.data) getUnitList().then(res => this.unitList = res.data)
getChannelList().then(res => this.channelList = 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) getProductTypeList().then(res => this.productTypeList = res.data)
}, },
data() { data() {
...@@ -102,7 +102,7 @@ export default { ...@@ -102,7 +102,7 @@ export default {
unitList:[], unitList:[],
channelList:[], channelList:[],
currencyList:[], currencyList:[],
productAttrList:[], productTypeList:[],
ccIdArr: [], ccIdArr: [],
form: { form: {
type: 1 type: 1
...@@ -132,8 +132,8 @@ export default { ...@@ -132,8 +132,8 @@ export default {
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(){ closeDialog(){
this.$emit('close') this.$emit('close')
......
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
<el-dropdown-item @click.native="$router.push('edit?id=' + scope.row.offerId)" v-if="[1,2,3,7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{$t('编辑')}}</el-dropdown-item> <el-dropdown-item @click.native="$router.push('edit?id=' + scope.row.offerId)" v-if="[1,2,3,7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{$t('编辑')}}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push('logList?offerId=' + scope.row.offerId)" v-if="[1,3,7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{$t('跟进')}}</el-dropdown-item> <el-dropdown-item @click.native="$router.push('logList?offerId=' + scope.row.offerId)" v-if="[1,3,7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{$t('跟进')}}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push(`result?offerId=${scope.row.offerId}&number=${scope.row.number}`)" v-if="[3,7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{$t('结果')}}</el-dropdown-item> <el-dropdown-item @click.native="$router.push(`result?offerId=${scope.row.offerId}&number=${scope.row.number}`)" v-if="[3,7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{$t('结果')}}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push('/offer/special?offerId=' + scope.row.offerId)" v-if="[3,7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{$t('特价')}}</el-dropdown-item> <el-dropdown-item @click.native="$router.push('/offer/special?offerId=' + scope.row.offerId)" v-if="[1,3,7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{$t('特价')}}</el-dropdown-item>
<el-dropdown-item @click.native="cancel(scope.row.offerId)" v-if="[1,3,7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{$t('取消')}}</el-dropdown-item> <el-dropdown-item @click.native="cancel(scope.row.offerId)" v-if="[1,3,7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{$t('取消')}}</el-dropdown-item>
<el-dropdown-item @click.native="recovery(scope.row.offerId)" v-if="[0].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{$t('恢复')}}</el-dropdown-item> <el-dropdown-item @click.native="recovery(scope.row.offerId)" v-if="[0].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{$t('恢复')}}</el-dropdown-item>
<el-dropdown-item @click.native="deleteOffer(scope.row.offerId)" v-if="[0,1,2,3,4,5,6,7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:delete']">{{$t('删除')}}</el-dropdown-item> <el-dropdown-item @click.native="deleteOffer(scope.row.offerId)" v-if="[0,1,2,3,4,5,6,7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:delete']">{{$t('删除')}}</el-dropdown-item>
......
...@@ -116,13 +116,13 @@ ...@@ -116,13 +116,13 @@
<template v-if="scope.row.cargoControlStatus == 2"> <template v-if="scope.row.cargoControlStatus == 2">
<el-button type="text" size="mini" @click="toDetail(scope.row)" >{{$t('修改')}}</el-button> <el-button type="text" size="mini" @click="toDetail(scope.row)" >{{$t('修改')}}</el-button>
<el-button type="text" size="mini" @click="toDetail(scope.row)" >{{$t('取消')}}</el-button> <el-button type="text" size="mini" @click="toDetail(scope.row)" >{{$t('取消')}}</el-button>
<el-button type="text" size="mini" @click="review(scope.row)" >{{$t('放货复核')}}</el-button> <el-button type="text" size="mini" @click="review(scope.row)" v-if="scope.row.isToReview">{{$t('放货复核')}}</el-button>
</template> </template>
<!--已完成放货--> <!--已完成放货-->
<template v-if="scope.row.cargoControlStatus == 1"> <template v-if="scope.row.cargoControlStatus == 1">
<el-button type="text" size="mini" @click="toDetail(scope.row)" >{{$t('查看')}}</el-button> <el-button type="text" size="mini" @click="toDetail(scope.row)" >{{$t('查看')}}</el-button>
<el-button type="text" size="mini" @click="showTransferCargoOrderId=scope.row.orderId" >{{$t('调货')}}</el-button> <el-button type="text" size="mini" @click="showTransferCargoOrderId=scope.row.orderId" >{{$t('调货')}}</el-button>
<el-button type="text" size="mini" @click="showFallbackOrder=scope.row">{{$t('反复核')}}</el-button> <el-button type="text" size="mini" @click="showFallbackOrder=scope.row" v-if="scope.row.isReleaseAfterGoods">{{$t('反复核')}}</el-button>
</template> </template>
<!-- <el-button type="text" size="mini" >取消</el-button> <!-- <el-button type="text" size="mini" >取消</el-button>
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('收货人电话')" prop="field103"> <el-form-item :label="$t('收货人电话')" prop="field103">
{{info.consigneePhone}} +{{info.consigneeCountryCode}} {{info.consigneePhone}}
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</el-form-item> </el-form-item>
<el-form-item :label="$t('控货手机号')" prop="field106"> <el-form-item :label="$t('控货手机号')" prop="field106">
{{info.phone}} +{{info.countryCode}} {{info.phone}}
</el-form-item> </el-form-item>
<el-form-item :label="$t('手机验证码')" prop="field106"> <el-form-item :label="$t('手机验证码')" prop="field106">
<el-input v-model="formData.code" placeholder="" style="width: 100px; margin-right:10px"></el-input> <el-input v-model="formData.code" placeholder="" style="width: 100px; margin-right:10px"></el-input>
......
...@@ -47,13 +47,15 @@ ...@@ -47,13 +47,15 @@
<el-input v-model="formData.consigneeEmail" :placeholder="$t('请输入收货人邮箱')" clearable class="w-150" ></el-input> <el-input v-model="formData.consigneeEmail" :placeholder="$t('请输入收货人邮箱')" clearable class="w-150" ></el-input>
</el-form-item> </el-form-item>
</div> </div>
<el-table :data="[formData]" border> <el-table :data="[formData]" border class="release-table">
<el-table-column :label="$t('控货箱数')"> <el-table-column :label="$t('控货箱数')">
{{detail.sumNum}} {{detail.sumNum}}
</el-table-column> </el-table-column>
<el-table-column :label="$t('放货箱数')"> <el-table-column :label="$t('放货箱数')">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-form-item prop="pickNum" label-width="0" class="mb-0">
<el-input type="number" v-model.number="row.pickNum" placeholder="" clearable></el-input> <el-input type="number" v-model.number="row.pickNum" placeholder="" clearable></el-input>
</el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('体积') + '(m³)'"> <el-table-column :label="$t('体积') + '(m³)'">
...@@ -73,7 +75,7 @@ ...@@ -73,7 +75,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-form-item :label="$t('控货手机号')" prop="field117" style="margin-top:20px"> <el-form-item :label="$t('控货手机号')" prop="field117" style="margin-top:20px">
<el-input :value="detail.phone" readonly :placeholder="$t('请输入控货手机号')" > <el-input :value="'+' + detail.dialCode + detail.phone" readonly :placeholder="$t('请输入控货手机号')" >
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('手机验证码')" prop="code"> <el-form-item :label="$t('手机验证码')" prop="code">
...@@ -120,14 +122,22 @@ export default { ...@@ -120,14 +122,22 @@ export default {
"pickWeight": 0, "pickWeight": 0,
"remarks": "", "remarks": "",
}, },
rules:{
consigneeName: {required: true, message: this.$t('请填写收货人')},
code: {required: true, message: '请填写验证码'}
},
agreement: false, // 是否同意协议 agreement: false, // 是否同意协议
} }
}, },
computed:{ computed:{
rules(){
return {
consigneeName: {required: true, message: this.$t('请填写收货人')},
code: {required: true, message: '请填写验证码'},
pickNum: {
type: 'number',
max: this.detail.sumNum - this.detail.releaseNum,
message: "不能超过剩余箱数",
trigger: 'change'
}
}
},
title(){ title(){
let t = this.$t('放货') let t = this.$t('放货')
if(this.detail){ if(this.detail){
...@@ -159,7 +169,6 @@ export default { ...@@ -159,7 +169,6 @@ export default {
if(!valid){ if(!valid){
return false return false
} }
console.log('submit')
createPick(Object.assign({orderId: this.orderId}, this.formData)).then(res => { createPick(Object.assign({orderId: this.orderId}, this.formData)).then(res => {
this.$message.success(res.msg || this.$t('操作成功')) this.$message.success(res.msg || this.$t('操作成功'))
this.show = false this.show = false
...@@ -186,4 +195,7 @@ export default { ...@@ -186,4 +195,7 @@ export default {
margin-right:10px; margin-right:10px;
} }
} }
::v-deep .release-table .el-form-item__error{
position: static;
}
</style> </style>
\ No newline at end of file
...@@ -988,6 +988,9 @@ export default { ...@@ -988,6 +988,9 @@ export default {
prodConditionParamList: this.getProductListWithDefaultValue() prodConditionParamList: this.getProductListWithDefaultValue()
}).then(res => { }).then(res => {
this.$set(this, 'fee', res.data.costDto) this.$set(this, 'fee', res.data.costDto)
this.form.orderItemVOList.map((item, index) => {
this.$set(item, 'fee', res.data.prodCostDtoList[index] || null)
})
}).finally(() => { }).finally(() => {
this.calculating = false this.calculating = false
}) })
......
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