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

新建报价单部分修改,不完整

parent 47f96cc6
......@@ -49,16 +49,11 @@ export default {
if(!this.value) return
let index = this.list.findIndex(item => item.customerContactsId == this.value)
if(index < 0){
getCustomerContacts(this.value).then(res => {
this.list.unshift({
contactsName: res.data.name,
customerName: res.data.customerName,
customerContactsId: res.data.id,
customerId: res.data.customerId,
phoneNew: res.data.phoneNew,
email: res.data.email
})
getCustomerContactsSelect({ids: this.value}).then(res => {
if(!res.data || !res.data.length){
return this.$message.error('联系人信息获取失败')
}
this.list.unshift(res.data[0])
this.index = 0
})
}
......
......@@ -8,10 +8,12 @@
<el-button type="primary" @click="reLoad">搜索</el-button>
</div>
<div class="list">
<div class="item" v-for="item in list" :key="item.customerContactsId">
<el-link class="el-icon-plus" @click="choose(item)" :disabled="selectedIds.indexOf(item.customerContactsId) > -1" />
{{item.customerName}} - {{item.contactsName}}{{item.areaCode}} {{item.phoneNew}}
</div>
<template v-for="item in list" >
<div :key="item.customerContactsId" class="item" v-if="selectedIds.indexOf(item.customerContactsId) < 0">
<el-link class="el-icon-plus" @click="choose(item)" />
{{item.customerName}} - {{item.contactsName}}{{item.areaCode}} {{item.phoneNew}}
</div>
</template>
</div>
</el-card>
</el-col>
......@@ -72,9 +74,9 @@ export default {
}
},
created(){
/* if(this.value && this.value.length){
if(this.value && this.value.length){
this.getChoosedList()
} */
}
this.reLoad()
},
methods:{
......@@ -101,8 +103,8 @@ export default {
this.choosedList.push(item)
},
remove(item){
this.choosedList.forEach((item,index) => {
if(item.customerContactsId==item.customerContactsId) this.choosedList.splice(index,1)
this.choosedList.forEach((choosed,index) => {
if(choosed.customerContactsId == item.customerContactsId) this.choosedList.splice(index,1)
})
}
}
......
......@@ -124,7 +124,7 @@
</el-row>
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table v-loading="loading" :data="list" border>
<el-table-column label="优惠券ID" align="center" prop="couponId" />
<el-table-column label="类型" align="center" prop="type">
<template slot-scope="{row}">
......
......@@ -14,23 +14,23 @@
<el-descriptions :column="3" border>
<el-descriptions-item label="*发货人" >
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="consignorId" required error="发货人不能为空">
<customer-selector v-model="form.consignorId" @change="consignor = $event" />
<customer-contact-selector v-model="form.consignorId" @change="consignor = $event" />
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="发货人">
{{consignor.name || ''}}
{{consignor.contactsName || ''}}
</el-descriptions-item>
<el-descriptions-item label="手机号">
{{consignor.defaultContactPhone || ''}}
{{consignor.areaCode}} {{consignor.phoneNew || ''}}
</el-descriptions-item>
<el-descriptions-item label="发货人公司">
{{consignor.company || ''}}
{{consignor.customerName || ''}}
</el-descriptions-item>
<el-descriptions-item label="客户来源">
{{consignor.source || ''}}
{{consignor.source || ''}} // TODO
</el-descriptions-item>
<el-descriptions-item label="社交软件">
暂缺字段数据
{{consignor.social}} {{consignor.socialNumber}}
</el-descriptions-item>
<el-descriptions-item label="联系地址">
{{consignor.address || ''}}
......@@ -40,30 +40,47 @@
<el-descriptions-item label="*收货人">
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="consigneeId" required error="收货人不能为空">
<customer-selector v-model="form.consigneeId" @change="consignee = $event" />
<customer-contact-selector v-model="form.consigneeId" @change="consignee = $event" />
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="收货人">
{{consignee.name || ''}}
{{consignee.contactsName || ''}}
</el-descriptions-item>
<el-descriptions-item label="手机号">
{{consignee.defaultContactPhone || ''}}
{{consignee.areaCode}} {{consignee.phoneNew}}
</el-descriptions-item>
<el-descriptions-item label="收货人公司">
{{consignee.company || ''}}
{{consignee.customerName || ''}}
</el-descriptions-item>
<el-descriptions-item label="客户来源">
{{consignee.source || ''}}
{{consignee.source || ''}} // TODO
</el-descriptions-item>
<el-descriptions-item label="社交软件">
暂缺字段数据
{{consignee.social}} {{consignee.socialNumber}}
</el-descriptions-item>
<el-descriptions-item label="联系地址">
{{consignee.address || ''}}
{{consignee.address || ''}} // TODO
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="3" border>
<el-descriptions :column="2" border>
<el-descriptions-item label="*运输方式">
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="transportId" required error="请选择运输方式">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="form.transportId" />
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="出货渠道">
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="channelId" :required="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass == 'channel'" error="请选择出货渠道">
<selector
:disabled="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass != 'channel'"
v-model="form.channelId"
:options="channelList"
value-field="channelId"
label-field="nameZh"
></selector>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="*始发城市">
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="departureId" required error="始发地必选">
<el-select v-model="form.departureId" placeholder="请选择始发地">
......@@ -78,6 +95,20 @@
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="*请选择线路" :span="2">
<el-row :gutter="10">
<el-col :span="12">
<el-input :value="getRouterNameById(form.lineId)" readonly placeholder="请在右侧选择线路"></el-input>
</el-col>
<el-col :span="12">
<select size="5" v-model="form.lineId" style="min-width: 300px">
<template v-for="item in routerList">
<option :value="item.id" :key="item.id">{{item.startTitleZh}} >> {{item.destTitleZh}}</option>
</template>
</select>
</el-col>
</el-row>
</el-descriptions-item>
</el-descriptions>
</el-card>
<el-card class="mt-10">
......@@ -149,7 +180,7 @@
</el-checkbox-group>
</template>
</el-table-column>
<el-table-column label="运输方式" width="150px">
<!-- <el-table-column label="运输方式" width="150px">
<template slot-scope="{row}">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="row.transportId"
@input="onTransportChange(row,$event)" formatter="number" />
......@@ -176,7 +207,7 @@
clearable
:label-field="(item, index) => item.startTitleZh + ' >> ' + item.destTitleZh" value-field="id"></selector>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="运费" width="200px">
<template slot-scope="{row}">
<template v-if="row.fee">
......@@ -346,7 +377,7 @@ import ProductSelector from '@/components/ProductSelector'
import {getProductAttrList} from '@/api/ecw/productAttr'
import {getChannelList} from '@/api/ecw/channel'
import Selector from '@/components/Selector'
import CustomerSelector from '@/components/CustomerSelector'
import CustomerContactSelector from '@/components/CustomerContactSelector'
import {openedRouterList as getOpenedRouterList} from '@/api/ecw/warehouse'
import {getTradeCityList} from '@/api/ecw/region'
import {getDictData} from '@/utils/dict'
......@@ -355,7 +386,7 @@ import {getUnitList} from '@/api/ecw/unit'
export default {
name: "OfferEdit",
components: {
ProductSelector, Selector, CustomerSelector
ProductSelector, Selector, CustomerContactSelector
},
data() {
return {
......@@ -400,35 +431,6 @@ export default {
getDictData(){
return (type, value) => getDictData(type, value) || {}
},
// 被启用的货运方式
/* enbedTransports(){
let transports = []
this.transportList.forEach(item => {
let disabled = true
let lineIds = []
let channelIds = []
let routers = []
this.productList.forEach(prod => {
if(prod.offerTransportId == item.transportId){
disabled = false
routers.push({
lineId: prod.lineId,
channelId: prod.channelId
})
if(prod.lineId)lineIds.push(prod.lineId)
if(prod.channelId)channelIds.push(prod.channelId)
}
})
if(!disabled){
item._disabled = disabled
item.routers = routers
item.lineIds = lineIds.join(',')
item.channelIds = channelIds.join(',')
transports.push(item)
}
})
return transports
}, */
// 根据线路id显示线路名称
getRouterNameById(){
return routerId => {
......@@ -486,6 +488,12 @@ export default {
'form.objectiveId'(){
this.getOpenedRouterList()
},
'form.transportId'(){
this.getOpenedRouterList()
},
'form.channelId'(){
this.getOpenedRouterList()
}
},
created() {
getProductAttrList().then(res => this.productAttrList = res.data)
......
......@@ -59,13 +59,13 @@
</el-dialog>
</template>
<script>
import releaseAgreement from "./releaseAgreement"
import ReleaseAgreement from "./ReleaseAgreement"
import WorkFlow from '@/components/WorkFlow'
export default {
props:{
orderId: [String, Number]
},
components: {releaseAgreement, WorkFlow},
components: {ReleaseAgreement, WorkFlow},
data(){
return {
show: 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