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

修复快速新建联系人,完善报价单

parent baadbbc5
...@@ -18,13 +18,13 @@ ...@@ -18,13 +18,13 @@
</el-select> </el-select>
<el-button v-if="quickable" type="text" @click="showQuickCreate=true" class="ml-10">快速新建</el-button> <el-button v-if="quickable" type="text" @click="showQuickCreate=true" class="ml-10">快速新建</el-button>
<quick-create v-if="showQuickCreate" @success="onQuickCreateSuccess" @close="showQuickCreate=false"></quick-create> <!-- <quick-create v-if="showQuickCreate" @success="onQuickCreateSuccess" @close="showQuickCreate=false" :default="{type}"></quick-create> -->
</div> </div>
</template> </template>
<script> <script>
import {getCustomerContactsSelect, getCustomerContactsListByCustomer} from '@/api/ecw/customerContacts' import {getCustomerContactsSelect, getCustomerContactsListByCustomer} from '@/api/ecw/customerContacts'
import QuickCreate from '@/views/ecw/customer/components/quickCreate' import QuickCreate from '@/views/ecw/customer/components/quickCreate'
import Vue from 'vue'
export default { export default {
components:{QuickCreate}, components:{QuickCreate},
props:{ props:{
...@@ -32,7 +32,8 @@ export default { ...@@ -32,7 +32,8 @@ export default {
quickable: { quickable: {
type: Boolean, type: Boolean,
default: true default: true
} },
type: [String, Number], // 客户类别,新建时指定默认类别,也可以根据需要筛选联系人所属的客户类别
}, },
data(){ data(){
return { return {
...@@ -50,6 +51,49 @@ export default { ...@@ -50,6 +51,49 @@ export default {
}, },
value(val){ value(val){
this.init() this.init()
},
showQuickCreate(){
if(!this.showQuickCreate)return
const QuickCreateComp = Vue.extend(QuickCreate)
const dialog = new QuickCreateComp({
propsData:{
default: {type: this.type}
},
})
/* dialog.$on = () => {
return {
success: this.onQuickCreateSuccess,
close: () => {
console.log('关闭拉')
this.showQuickCreate = false
}
}
} */
dialog.$on('close', () => {
console.log('关闭拉')
this.showQuickCreate = false
document.body.removeChild(dialog.$el)
dialog.$destroy()
})
dialog.$on('success', (id) => {
this.onQuickCreateSuccess(id)
dialog.$emit('close')
})
dialog.$mount()
console.log({
dialog,
parent: this
})
window.dialogComp = dialog
document.body.append(dialog.$el)
/* dialog.remove = () => {
console.log('关闭拉11')
document.body.removeChild(dialog.$el)
} */
} }
}, },
created(){ created(){
......
<template> <template>
<el-dialog :visible.sync="show" title="快速新建客户" :close-on-click-modal="false" class="quick-create-customer"> <el-dialog :visible.sync="show" title="快速新建客户" :close-on-click-modal="false" class="quick-create-customer">
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px" :validate-on-rule-change="false">
<el-form-item label="客户类别" prop="type"> <el-form-item label="客户类别" prop="type">
<dict-selector :type="DICT_TYPE.CUSTOMER_TYPE" form-type="checkbox" multiple v-model="form.type"></dict-selector> <dict-selector :type="DICT_TYPE.CUSTOMER_TYPE" form-type="checkbox" multiple v-model="form.type"></dict-selector>
</el-form-item> </el-form-item>
...@@ -59,19 +59,9 @@ import { getCountryListAll } from '@/api/ecw/country' ...@@ -59,19 +59,9 @@ import { getCountryListAll } from '@/api/ecw/country'
export default { export default {
name: "quickCreateCustomer", name: "quickCreateCustomer",
props:{ props:{
default: Object default: Object,
},
created() {
if(this.default){
this.$set(this, 'form', Object.assign({}, this.default, this.form))
}
listServiceUser().then(r => {
this.serviceUserList = r.data
})
getCountryListAll().then(r => {
this.countryList = r.data
})
}, },
data(){ data(){
return { return {
show: true, show: true,
...@@ -89,7 +79,7 @@ export default { ...@@ -89,7 +79,7 @@ export default {
source: [{ required: true, message: "客户来源不能为空", trigger: "blur" }], source: [{ required: true, message: "客户来源不能为空", trigger: "blur" }],
customerService: [{ required: true, message: "跟进客服不能为空", trigger: "blur" }], customerService: [{ required: true, message: "跟进客服不能为空", trigger: "blur" }],
status: [{ required: true, message: "客户状态不能为空", trigger: "blur" }], status: [{ required: true, message: "客户状态不能为空", trigger: "blur" }],
founder: [{ required: true, message: "创建人不能为空", trigger: "blur" }], founder: [{ required: true, message: "创建人不能为空", trigger: "blur" }],
}, },
serviceUserList: [], serviceUserList: [],
countryList: [], countryList: [],
...@@ -102,6 +92,17 @@ export default { ...@@ -102,6 +92,17 @@ export default {
} }
} }
}, },
created() {
if(this.default){
this.$set(this, 'form', Object.assign({}, this.default, this.form))
}
listServiceUser().then(r => {
this.serviceUserList = r.data
})
getCountryListAll().then(r => {
this.countryList = r.data
})
},
methods: { methods: {
open(){ open(){
this.show = true this.show = true
...@@ -127,7 +128,7 @@ export default { ...@@ -127,7 +128,7 @@ export default {
} }
} }
</script> </script>
<style scoped lang="scss"> <style lang="scss">
.quick-create-customer .el-form-item{ .quick-create-customer .el-form-item{
margin-bottom: 22px; margin-bottom: 22px;
} }
......
...@@ -23,16 +23,16 @@ ...@@ -23,16 +23,16 @@
<customer-contact-selector v-model="form.consignorId" @change="consignor = $event" /> <customer-contact-selector v-model="form.consignorId" @change="consignor = $event" />
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="发货人" :labelStyle="labelStyle"> <!-- <el-descriptions-item label="发货人" :labelStyle="labelStyle">
{{consignor.contactsName || ''}} {{consignor.contactsName || ''}}
</el-descriptions-item> </el-descriptions-item> -->
<el-descriptions-item label="手机号" :labelStyle="labelStyle"> <el-descriptions-item label="手机号" :labelStyle="labelStyle">
{{consignor.areaCode}} {{consignor.phoneNew || ''}} {{consignor.areaCode}} {{consignor.phoneNew || ''}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="发货人公司名称" :labelStyle="labelStyle"> <el-descriptions-item label="发货人公司名称" :labelStyle="labelStyle">
{{consignor.company || ''}} {{consignor.company || ''}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="客户来源" :labelStyle="labelStyle"> <el-descriptions-item label="Email" :labelStyle="labelStyle">
{{consignor.email || ''}} {{consignor.email || ''}}
</el-descriptions-item><!-- </el-descriptions-item><!--
<el-descriptions-item label="社交软件"> <el-descriptions-item label="社交软件">
...@@ -49,9 +49,9 @@ ...@@ -49,9 +49,9 @@
<customer-contact-selector v-model="form.consigneeId" @change="consignee = $event" /> <customer-contact-selector v-model="form.consigneeId" @change="consignee = $event" />
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="收货人" :labelStyle="labelStyle"> <!-- <el-descriptions-item label="收货人" :labelStyle="labelStyle">
{{consignee.contactsName || ''}} {{consignee.contactsName || ''}}
</el-descriptions-item> </el-descriptions-item> -->
<el-descriptions-item label="手机号" :labelStyle="labelStyle"> <el-descriptions-item label="手机号" :labelStyle="labelStyle">
{{consignee.areaCode}} {{consignee.phoneNew}} {{consignee.areaCode}} {{consignee.phoneNew}}
</el-descriptions-item> </el-descriptions-item>
...@@ -132,12 +132,12 @@ ...@@ -132,12 +132,12 @@
</el-table-column> </el-table-column>
<el-table-column label="中文名" width="160px"> <el-table-column label="中文名" width="160px">
<template slot-scope="{row}"> <template slot-scope="{row}">
<product-selector v-model="row.prodId" @change="row.goodsType = $event.typeId;calculationPrice()" /> <product-selector v-model="row.prodId" @change="onProductChange(row, $event)" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="英文名" width="160px"> <el-table-column label="英文名" width="160px">
<template slot-scope="{row}"> <template slot-scope="{row}">
<product-selector v-model="row.prodId" @change="row.goodsType = $event.typeId;calculationPrice()" /> <product-selector v-model="row.prodId" @change="onProductChange(row, $event)" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="商品类型" width="160px"> <el-table-column label="商品类型" width="160px">
...@@ -318,8 +318,8 @@ ...@@ -318,8 +318,8 @@
<div>{{fee.clearanceUSD || 0}}美元</div> <div>{{fee.clearanceUSD || 0}}美元</div>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="其他费用"> <el-descriptions-item label="其他费用">
<el-input v-model="form.otherFee" placeholder="" style="width:100px"></el-input> <el-input v-model="form.otherFee" placeholder="" class="w-100 mr-10"></el-input>
<selector v-model="form.otherFeeCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" /> <selector v-model="form.otherFeeCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable class="w-100" />
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="原价" :span="2"> <el-descriptions-item label="原价" :span="2">
...@@ -331,24 +331,35 @@ ...@@ -331,24 +331,35 @@
</el-descriptions> </el-descriptions>
<div class="card-title" style="padding:20px 0;">优惠信息</div> <div class="card-title" style="padding:20px 0;">优惠信息</div>
<!-- <el-row v-for="(item, index) in couponList" :key="item.value" :gutter="10"> <div v-for="(item, index) in couponList" :key="index" style="display:flex;align-items:center">
<el-col :span="2">{{index+1}}.{{item.label}}</el-col> <div class="w-150">
<el-col :span="4"> {{index+1}}.
<el-select placeholder="请选择优惠" v-model="selectedCoupons[item.value]" :data-type="item.value" clearable> {{productNames[item.prodId] || '未知'}}
<template v-for="(coupon, index) in couponList"> </div>
<el-option v-if="coupon.type == +item.value" :key="coupon.couponId + '_' + index" :label="coupon.titleZh" :value="coupon.couponId"></el-option> <div class="w-100">
<dict-tag :type="DICT_TYPE.ECW_COUPON_TYPE" :value="item.type" />
</div>
<div style="display:flex; align-items:center">
<el-select placeholder="请选择优惠" v-model="item.selectedIndex" :data-type="item.value" clearable class="w-300">
<template v-for="(coupon, couponIndex) in item.options">
<el-option :key="coupon.couponId" :label="coupon.titleZh" :value="couponIndex"></el-option>
</template> </template>
</el-select> </el-select>
</el-col> <template v-if="item.selectedIndex !== null">
<el-col :span="2" v-if="getCoupon(selectedCoupons[item.value])"> <div class="w-100 ml-20">
-{{getCoupon(selectedCoupons[item.value]).reduceAmount}} -{{item.options[item.selectedIndex].reduceAmount}}
{{currentcyMap[getCoupon(selectedCoupons[item.value]).reduceCurrencyId]}} {{currentcyMap[item.options[item.selectedIndex].reduceCurrencyId]}}
</el-col> </div>
<el-col :span="5" v-if="getCoupon(selectedCoupons[item.value])">有效期:{{getCoupon(selectedCoupons[item.value]).endTime || '永久有效'}}</el-col> <div class="ml-20">有效期:{{item.options[item.selectedIndex].endTime || '永久有效'}}</div>
</el-row> --> </template>
<el-descriptions :column="1" border> </div>
</div>
<el-descriptions :column="1" class="mt-20">
<el-descriptions-item label="优惠合计"> <el-descriptions-item label="优惠合计">
{{discount}}美元 <div v-for="(discount, discountIndex) in discountArr" :key="discountIndex">
{{discount.reduceAmount}} {{currentcyMap[discount.reduceCurrencyId]}}
</div>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="预计费用"> <el-descriptions-item label="预计费用">
// TODO // TODO
...@@ -473,6 +484,7 @@ import {getCurrencyList} from '@/api/ecw/currency' ...@@ -473,6 +484,7 @@ import {getCurrencyList} from '@/api/ecw/currency'
import {getUnitList} from '@/api/ecw/unit' import {getUnitList} from '@/api/ecw/unit'
import {calculationPrice} from '@/api/ecw/product' import {calculationPrice} from '@/api/ecw/product'
import {getCustomerAvailableCouponList} from '@/api/ecw/coupon' import {getCustomerAvailableCouponList} from '@/api/ecw/coupon'
import {arrryToKeyedObjectBy} from '@/utils/index'
export default { export default {
name: "OfferEdit", name: "OfferEdit",
...@@ -498,14 +510,13 @@ export default { ...@@ -498,14 +510,13 @@ export default {
transportList: [], transportList: [],
currencyList:[], currencyList:[],
unitList:[], unitList:[],
couponList: [], couponList: [{"selectedIndex":null,"options":[{"couponId":74,"titleZh":"2-1,5-2","titleEn":"2-1,5-2","type":2,"cashCondition":0,"reduceAmount":3,"reduceCurrencyId":1,"startTime":"2022-01-01 00:00:00","afterReceiveDays":0,"costType":2,"discountDetailed":"[{\"type\": 1, \"fullAmount\": 2, \"reduceAmount\": 1, \"fullCurrencyId\": 1, \"reduceCurrencyId\": 1}, {\"type\": 1, \"fullAmount\": 5, \"reduceAmount\": 2, \"fullCurrencyId\": 1, \"reduceCurrencyId\": 1}, {\"type\": 2, \"fullAmount\": 2, \"reduceAmount\": 1, \"fullCurrencyId\": 1, \"reduceCurrencyId\": 1}, {\"type\": 2, \"fullAmount\": 6, \"reduceAmount\": 3, \"fullCurrencyId\": 1, \"reduceCurrencyId\": 1}]","discountDetailedVOList":[{"type":1,"fullAmount":2,"fullCurrencyId":1,"reduceAmount":1,"reduceCurrencyId":1},{"type":1,"fullAmount":5,"fullCurrencyId":1,"reduceAmount":2,"reduceCurrencyId":1},{"type":2,"fullAmount":2,"fullCurrencyId":1,"reduceAmount":1,"reduceCurrencyId":1},{"type":2,"fullAmount":6,"fullCurrencyId":1,"reduceAmount":3,"reduceCurrencyId":1}],"isSimilarSuperposition":false,"couponIds":"","suitableUserType":0,"suitableLineType":0,"suitableProdType":0,"limitNum":1,"overdueStatus":true,"putonStatus":1,"getWay":1,"orderAttr":"1,2,3","isSiteContent":false,"brand":"0,1","isCargoControl":"1,0","documentDeclaration":"1,2,3","status":1,"prodList":[],"isDefault":false},{"couponId":73,"titleZh":"3-2,2-1","titleEn":"3-2,2-1","type":2,"cashCondition":0,"reduceAmount":2,"reduceCurrencyId":1,"startTime":"2022-01-01 00:00:00","afterReceiveDays":0,"costType":1,"discountDetailed":"[{\"type\": 1, \"fullAmount\": 2, \"reduceAmount\": 1, \"fullCurrencyId\": 1, \"reduceCurrencyId\": 1}, {\"type\": 1, \"fullAmount\": 3, \"reduceAmount\": 2, \"fullCurrencyId\": 1, \"reduceCurrencyId\": 1}, {\"type\": 2, \"fullAmount\": 2, \"reduceAmount\": 1, \"fullCurrencyId\": 1, \"reduceCurrencyId\": 1}, {\"type\": 2, \"fullAmount\": 3, \"reduceAmount\": 2, \"fullCurrencyId\": 1, \"reduceCurrencyId\": 1}]","discountDetailedVOList":[{"type":1,"fullAmount":2,"fullCurrencyId":1,"reduceAmount":1,"reduceCurrencyId":1},{"type":1,"fullAmount":3,"fullCurrencyId":1,"reduceAmount":2,"reduceCurrencyId":1},{"type":2,"fullAmount":2,"fullCurrencyId":1,"reduceAmount":1,"reduceCurrencyId":1},{"type":2,"fullAmount":3,"fullCurrencyId":1,"reduceAmount":2,"reduceCurrencyId":1}],"isSimilarSuperposition":false,"couponIds":"","suitableUserType":0,"suitableLineType":0,"suitableProdType":0,"limitNum":1,"overdueStatus":true,"putonStatus":1,"getWay":1,"orderAttr":"1,2,3","isSiteContent":false,"brand":"0,1","isCargoControl":"0,1","documentDeclaration":"1,2,3","status":1,"prodList":[],"isDefault":false},{"couponId":71,"titleZh":"金额满2减1","titleEn":"金额满2减1","type":2,"cashCondition":0,"reduceAmount":5,"reduceCurrencyId":1,"startTime":"2022-01-01 00:00:00","afterReceiveDays":0,"costType":1,"discountDetailed":"[{\"type\": 1, \"fullAmount\": 2, \"reduceAmount\": 1, \"fullCurrencyId\": 1, \"reduceCurrencyId\": 1}, {\"type\": 1, \"fullAmount\": 10, \"reduceAmount\": 5, \"fullCurrencyId\": 1, \"reduceCurrencyId\": 1}]","discountDetailedVOList":[{"type":1,"fullAmount":2,"fullCurrencyId":1,"reduceAmount":1,"reduceCurrencyId":1},{"type":1,"fullAmount":10,"fullCurrencyId":1,"reduceAmount":5,"reduceCurrencyId":1}],"isSimilarSuperposition":true,"couponIds":"","suitableUserType":0,"suitableLineType":0,"suitableProdType":0,"limitNum":1,"overdueStatus":true,"putonStatus":1,"getWay":1,"orderAttr":"1,2,3","isSiteContent":false,"brand":"0,1","isCargoControl":"1,0","documentDeclaration":"1,2,3","status":1,"prodList":[],"isDefault":false}],"prodId":22,"type":2}],
fee: {}, // 费用 fee: {}, // 费用
// 表单参数 // 表单参数
form: { form: {
sendstatus:0, sendstatus:0,
type: [], type: [],
isCargoControl: false, isCargoControl: false,
customsType: 0
}, },
// 表单校验 // 表单校验
rules: { rules: {
...@@ -515,6 +526,7 @@ export default { ...@@ -515,6 +526,7 @@ export default {
sendstatus: [{ required: true, message: "站内信状态,0未发送,1已发送不能为空", trigger: "blur" }], */ sendstatus: [{ required: true, message: "站内信状态,0未发送,1已发送不能为空", trigger: "blur" }], */
}, },
labelStyle: 'width:120px', labelStyle: 'width:120px',
productNames: {} // 品名id和名称对应关系
}; };
}, },
computed:{ computed:{
...@@ -585,8 +597,31 @@ export default { ...@@ -585,8 +597,31 @@ export default {
}, },
// 总有优惠金额 // 总有优惠金额
discount(){ discount(){
return 0 let discount = {
// curreny: amount
}
this.couponList.forEach(item => {
if(item.selectedIndex !== null){
let selected = item.options[item.selectedIndex]
if(!discount[selected.reduceCurrencyId]) discount[selected.reduceCurrencyId] = 0
discount[selected.reduceCurrencyId] += selected.reduceAmount
}
})
return discount
},
discountArr(){
let discount = []
for(let currency in this.discount){
discount.push({
reduceAmount: this.discount[currency],
reduceCurrencyId: currency
})
}
return discount
} }
/* productKeyd(){
return arrryToKeyedObjectBy(this.productList, 'prodId')
} */
}, },
watch:{ watch:{
// 始发地 // 始发地
...@@ -661,6 +696,12 @@ export default { ...@@ -661,6 +696,12 @@ export default {
if(this.getDictData(this.DICT_TYPE.ECW_TRANSPORT_TYPE, val).cssClass != 'channel') row.channelId = null if(this.getDictData(this.DICT_TYPE.ECW_TRANSPORT_TYPE, val).cssClass != 'channel') row.channelId = null
this.updateEnabledTransports() this.updateEnabledTransports()
}, */ }, */
onProductChange(row, product){
row.goodsType = product.typeId;
// 保存商品id和品名,用于优惠信息显示
this.$set(this.productNames, product.id, product.titleZh)
this.calculationPrice()
},
onLineChange(row){ onLineChange(row){
this.calculationPrice() this.calculationPrice()
// this.updateEnabledTransports() // this.updateEnabledTransports()
...@@ -767,7 +808,23 @@ export default { ...@@ -767,7 +808,23 @@ export default {
}) })
getCustomerAvailableCouponList(data) getCustomerAvailableCouponList(data)
.then(res => { .then(res => {
this.couponList = res.data // 对优惠信息按照商品 + 类型 分组展示
let list = {}
res.data.couponAvailableGroupDtoList.forEach(item => {
item.couponAvailableDtoList.forEach(coupon => {
let key = item.prodId + '_' + coupon.type
if(!list[key]){
list[key] = {
selectedIndex: null,
options: [],
prodId: item.prodId,
type: coupon.type
}
}
list[key].options.push(coupon)
})
})
this.couponList = Object.values(list)
}) })
}, },
// 显示更多报价 // 显示更多报价
......
...@@ -154,7 +154,7 @@ export default { ...@@ -154,7 +154,7 @@ export default {
return false return false
} }
console.log('submit') console.log('submit')
createPick(this.formData).then(res => { createPick(Object.assign({orderId: this.orderId}, this.formData)).then(res => {
this.$message.success(res.msg || '操作成功') this.$message.success(res.msg || '操作成功')
this.closeDialog() this.closeDialog()
}) })
......
<!--拆单审核中的申请信息部分--> <!--拆单审核中的申请信息部分-->
<template> <template>
<div> <div v-if="detail">
<el-descriptions :column="4"> <el-descriptions :column="4" v-if="order">
<el-descriptions-item label="订单号">kooriookami</el-descriptions-item> <el-descriptions-item label="订单号">{{order.orderNo}}</el-descriptions-item>
<el-descriptions-item label="运输方式">18100000000</el-descriptions-item> <el-descriptions-item label="运输方式">
<el-descriptions-item label="出货方式">苏州市</el-descriptions-item> <dict-tag class="mr-10" :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="order.transportId" />
</el-descriptions-item>
<el-descriptions-item label="出货方式">
{{channel ? channel.nameZh : ''}}
</el-descriptions-item>
<el-descriptions-item label="订单状态"> <el-descriptions-item label="订单状态">
<el-tag size="small">学校</el-tag> <el-tag size="small">
<dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="order.status" />
</el-tag>
</el-descriptions-item>
<el-descriptions-item label="唛头">{{order.marks}}</el-descriptions-item>
<el-descriptions-item label="始发仓">
{{order.logisticsInfoDto.startTitleZh}}
</el-descriptions-item>
<el-descriptions-item label="目的仓">
{{order.logisticsInfoDto.destAddressZh}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="出货方式">苏州市</el-descriptions-item>
<el-descriptions-item label="唛头">苏州市</el-descriptions-item>
<el-descriptions-item label="目的仓">苏州市</el-descriptions-item>
</el-descriptions> </el-descriptions>
<template v-for="item in detail.orderSplitBackVOList"> <template v-for="item in detail.orderSplitBackVOList">
<div class="title" :key="item.orderNo"> <div class="title mt-20" :key="item.orderNo">
{{item.orderNo}} <span class="mr-10">{{item.orderNo}}</span>
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="item.transportId" /> <dict-tag class="mr-10" :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="item.transportId" />
<span class="mr-10" v-if="item.channelName">{{item.channelName}}</span>
</div> <span>发往{{item.dstWarehouseName}}</span>
<el-table :data="item.orderSplitItemBackVOList" :key="'items-' + item.orderNo"> </div>
<el-table-column label="序号"> <el-table :data="item.orderSplitItemBackVOList" :key="'items-' + item.orderNo">
<template slot-scope="scope">{{scope.$index+1}}</template> <el-table-column label="序号">
</el-table-column> <template slot-scope="scope">{{scope.$index+1}}</template>
<el-table-column label="中文品名"> </el-table-column>
<template slot-scope="{row}">{{row.prodTitleZh}}</template> <el-table-column label="中文品名">
</el-table-column> <template slot-scope="{row}">{{row.prodTitleZh}}</template>
<el-table-column label="英文品名"> </el-table-column>
<template slot-scope="{row}">{{row.prodTitleEn}}</template> <el-table-column label="英文品名">
</el-table-column> <template slot-scope="{row}">{{row.prodTitleEn}}</template>
<el-table-column label="品牌"> </el-table-column>
<template slot-scope="{row}"> <el-table-column label="品牌">
<dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="row.brandType" /> <template slot-scope="{row}">
</template> <dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="row.brandType" />
</el-table-column> </template>
<el-table-column label="体积"> </el-table-column>
<template slot-scope="{row}">{{row.volume}}</template> <el-table-column label="体积">
</el-table-column> <template slot-scope="{row}">{{row.volume}}</template>
<el-table-column label="重量"> </el-table-column>
<template slot-scope="{row}">{{row.weight}}kg</template> <el-table-column label="重量">
</el-table-column> <template slot-scope="{row}">{{row.weight}}kg</template>
<el-table-column label="箱数"> </el-table-column>
<template slot-scope="{row}">{{row.num}}</template></el-table-column> <el-table-column label="箱数">
</el-table> <template slot-scope="{row}">{{row.num}}</template></el-table-column>
</el-table>
</template> </template>
</div> </div>
</template> </template>
<script> <script>
import {getApproval} from '@/api/ecw/order' import {getApproval, getOrder} from '@/api/ecw/order'
import {getChannel} from '@/api/ecw/channel'
export default { export default {
props:{ props:{
id: [String, Number] id: [String, Number]
}, },
data(){ data(){
return { return {
detail: null detail: null,
order: null,
channel: null
} }
}, },
watch:{ watch:{
id(){ id(){
this.getData() this.getData()
},
detail(){
this.getOrder()
},
order(){
if(this.order.channelId){
this.getChannel()
}
} }
}, },
created(){ created(){
...@@ -72,7 +94,26 @@ export default { ...@@ -72,7 +94,26 @@ export default {
getApproval(this.id).then(res => { getApproval(this.id).then(res => {
this.detail = JSON.parse(res.data.details) this.detail = JSON.parse(res.data.details)
}) })
},
getOrder(){
getOrder(this.detail.orderId).then(res => {
this.order = res.data
})
},
getChannel(){
getChannel(this.order.channelId).then(res => {
this.channel = res.data
})
} }
} }
} }
</script> </script>
\ No newline at end of file <style scoped lang="scss">
.title{
padding: 10px 0;
span{
font-size: 14px;
font-weight: bold;
}
}
</style>
\ No newline at end of file
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<el-descriptions-item label="*发货人" :labelStyle="labelStyle"> <el-descriptions-item label="*发货人" :labelStyle="labelStyle">
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="consignorContactsId" required error="发货人不能为空"> <el-form-item label="" label-width="0" style="margin-bottom: 0" prop="consignorContactsId" required error="发货人不能为空">
<customer-contact-selector v-model="form.consignorContactsId" @change="consignorContact = $event" /> <customer-contact-selector v-model="form.consignorContactsId" @change="consignorContact = $event" type="1" />
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="电话" :labelStyle="labelStyle"> <el-descriptions-item label="电话" :labelStyle="labelStyle">
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<el-descriptions :column="3" border> <el-descriptions :column="3" border>
<el-descriptions-item label="*收货人" :labelStyle="labelStyle" > <el-descriptions-item label="*收货人" :labelStyle="labelStyle" >
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="consigneeContactsId" required error="收货人不能为空"> <el-form-item label="" label-width="0" style="margin-bottom: 0" prop="consigneeContactsId" required error="收货人不能为空">
<customer-contact-selector v-model="form.consigneeContactsId" @change="consigneeContact = $event" /> <customer-contact-selector v-model="form.consigneeContactsId" @change="consigneeContact = $event" type="2" />
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="电话" :labelStyle="labelStyle"> <el-descriptions-item label="电话" :labelStyle="labelStyle">
......
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