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

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

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