Commit 9e08d3dc authored by dragondean@qq.com's avatar dragondean@qq.com

bug

parent 3f23d956
<template> <template>
<selector v-model="valueSync" :options="countryList" value-field="tel" key-field="id" :label-field="item => item.nameZh + item.tel" filterable clearable></selector> <selector v-model="valueSync" :options="countryList" value-field="tel" key-field="id" :label-field="item => item.nameZh + item.tel" filterable clearable :disabled="disabled"></selector>
</template> </template>
<script> <script>
import {getCountryListAll} from '@/api/ecw/country' import {getCountryListAll} from '@/api/ecw/country'
...@@ -8,6 +8,7 @@ export default { ...@@ -8,6 +8,7 @@ export default {
components: {selector}, components: {selector},
props: { props: {
value: String, value: String,
disabled: Boolean
}, },
data(){ data(){
return { return {
......
<template>
<el-dialog title="选择联系人" visible :before-close="closeDialog" :close-on-click-modal="false">
<div class="header mb-10">
<div class="flex-center">关键字:</div>
<el-input v-model="form.searchKey" placeholder="" class="w-200"></el-input>
<el-button type="primary" class="ml-10" @click="handleQuery">搜索</el-button>
</div>
<div class="list">
<div class="list-item" v-for="item in list" :key="item.customerContactsId" @click="choose(item)">
<div class="item-box">
<div class="line">
<div class="label">姓名:</div>
<div class="value">{{item.contactsName}}</div>
</div>
<div class="line">
<div class="label">电话:</div>
<div class="value">{{item.areaCode}} {{item.phoneNew}}</div>
</div>
<div class="line">
<div class="label">邮箱:</div>
<div class="value">{{item.emial}}</div>
</div>
<div class="line">
<div class="label">公司:</div>
<div class="value">{{item.company}}</div>
</div>
</div>
</div>
</div>
</el-dialog>
</template>
<script>
import {getCustomerContactsSelect} from '@/api/ecw/customerContacts'
export default {
props:{
type: Number
},
data(){
return {
show: true,
form:{
/* pageNo: 1,
pageSize: 20, */
searchKey: ''
},
list:[]
}
},
created(){
this.show = true
this.loadList()
},
methods:{
handleQuery(){
// this.form.pageNo = 1
this.loadList()
},
loadList(){
getCustomerContactsSelect(this.form).then(res => {
this.list = res.data
})
},
closeDialog(){
this.show = false
this.$emit('close');
},
choose(contact){
this.$emit('choose', contact)
}
}
}
</script>
<style lang="scss" scoped>
.header{
display: flex;
}
.list{
display: flex;
flex-wrap: wrap;
justify-content: center;
&-item{
background: #eee;
width: 300px;
margin: 10px;
padding: 5px;
border-radius: 10px;
border: 5px solid transparent;
background: linear-gradient(white,white) padding-box,repeating-linear-gradient(-45deg, red 0, red 12.5%, transparent 0, transparent 25%, #58a 0, #58a 37.5%, transparent 0, transparent 50%) 0/5em 5em;
.item-box{
/* background: #fbfaf5; */
padding: 20px;
}
.line{
display: flex;
/* .label{
width: 100px;
} */
.value{
flex: 1;
margin-left: 10px;
}
}
}
}
</style>
...@@ -23,10 +23,10 @@ ...@@ -23,10 +23,10 @@
</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 QuickCreateCustomer from '@/components/QuickCreateCustomer'
import Vue from 'vue' import Vue from 'vue'
export default { export default {
components:{QuickCreate}, components:{QuickCreateCustomer},
props:{ props:{
value: [String, Number], value: [String, Number],
quickable: { quickable: {
...@@ -75,7 +75,7 @@ export default { ...@@ -75,7 +75,7 @@ export default {
}, },
showQuickCreate(){ showQuickCreate(){
if(!this.showQuickCreate)return if(!this.showQuickCreate)return
const QuickCreateComp = Vue.extend(QuickCreate) const QuickCreateComp = Vue.extend(QuickCreateCustomer)
const dialog = new QuickCreateComp({ const dialog = new QuickCreateComp({
propsData:{ propsData:{
default: {type: this.type} default: {type: this.type}
......
...@@ -55,11 +55,12 @@ ...@@ -55,11 +55,12 @@
import {createCustomer} from '@/api/ecw/customer' import {createCustomer} from '@/api/ecw/customer'
import {listServiceUser} from "@/api/system/user" import {listServiceUser} from "@/api/system/user"
import { getCountryListAll } from '@/api/ecw/country' import { getCountryListAll } from '@/api/ecw/country'
import {getCustomerContactsSelect} from '@/api/ecw/customerContacts'
export default { export default {
name: "quickCreateCustomer", name: "quickCreateCustomer",
props:{ props:{
default: Object, type: String,
}, },
data(){ data(){
...@@ -93,8 +94,8 @@ export default { ...@@ -93,8 +94,8 @@ export default {
} }
}, },
created() { created() {
if(this.default){ if(this.type){
this.$set(this, 'form', Object.assign({}, this.default, this.form)) this.$set(this.form, 'type', this.type)
} }
listServiceUser().then(r => { listServiceUser().then(r => {
this.serviceUserList = r.data this.serviceUserList = r.data
...@@ -120,9 +121,10 @@ export default { ...@@ -120,9 +121,10 @@ export default {
// 添加的提交 // 添加的提交
createCustomer(this.form).then(res => { createCustomer(this.form).then(res => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.$emit('success', res.data) return getCustomerContactsSelect({ids: res.data})
// this.getList(); }).then(res => {
}); this.$emit('success', res.data[0])
})
}); });
}, },
} }
......
...@@ -53,6 +53,7 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) { ...@@ -53,6 +53,7 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
// 处理 meta 属性 // 处理 meta 属性
route.meta = { route.meta = {
title: route.name, title: route.name,
titleEn: route.nameEn,
icon: route.icon icon: route.icon
} }
route.hidden = typeof route.isShowInMenuBar != 'undefined' && (route.isShowInMenuBar == 'false' || !route.isShowInMenuBar) route.hidden = typeof route.isShowInMenuBar != 'undefined' && (route.isShowInMenuBar == 'false' || !route.isShowInMenuBar)
......
...@@ -130,27 +130,29 @@ ...@@ -130,27 +130,29 @@
{{scope.$index + 1}} {{scope.$index + 1}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('中文名')" width="160px"> <el-table-column :label="$t('中文名')" width="160px">
<template slot-scope="{row}"> <template slot-scope="{row}">
<product-selector v-model="row.prodId" @change="onProductChange(row, $event)" /> <product-selector v-model="row.prodId" @change="onProductChange(row, $event)" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('英文名')" width="160px"> <el-table-column :label="$t('英文名')" width="160px">
<template slot-scope="{row}"> <template slot-scope="{row}">
<product-selector v-model="row.prodId" @change="onProductChange(row, $event)" /> <product-selector lang="En" v-model="row.prodId" @change="onProductChange(row, $event)" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('商品类型')" width="160px"> <el-table-column :label="$t('品牌')" width="100px">
<template slot-scope="{row}"> <template slot-scope="{row}">
<selector disabled v-model="row.goodsType" :options="productAttrList" label-field="attrName" value-field="id" @input="calculationPrice"></selector> <dict-selector v-model="row.brand" :type="DICT_TYPE.ECW_IS_BRAND" defaultable @input="calculationPrice" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('品牌')" width="100px"> <!-- <el-table-column :label="$t('商品类型')" width="160px">
<template slot-scope="{row}"> <template slot-scope="{row}">
<dict-selector v-model="row.brand" :type="DICT_TYPE.ECW_IS_BRAND" defaultable @input="calculationPrice" /> <selector disabled v-model="row.goodsType" :options="productAttrList" label-field="attrName" value-field="id" @input="calculationPrice"></selector>
</template> </template>
</el-table-column> </el-table-column> -->
<el-table-column :label="$t('件数')" width="90px"> <el-table-column :label="$t('件数')" width="90px">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-input v-model.number="row.num" @input="calculationPrice" /> <el-input v-model.number="row.num" @input="calculationPrice" />
...@@ -166,11 +168,11 @@ ...@@ -166,11 +168,11 @@
<el-input v-model.number="row.quantity" @input="calculationPrice" /> <el-input v-model.number="row.quantity" @input="calculationPrice" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('箱规') + '(m)'" width="120px"> <!-- <el-table-column :label="$t('箱规') + '(m)'" width="120px">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-input v-model="row.boxGauge" @input="calcVolume(row);calculationPrice()" /> <el-input v-model="row.boxGauge" @input="calcVolume(row);calculationPrice()" />
</template> </template>
</el-table-column> </el-table-column> -->
<el-table-column :label="$t('总体积') + '(m³)'" width="100px"> <el-table-column :label="$t('总体积') + '(m³)'" width="100px">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-input v-model="row.volume" @input="calculationPrice"/> <el-input v-model="row.volume" @input="calculationPrice"/>
...@@ -181,7 +183,7 @@ ...@@ -181,7 +183,7 @@
<el-input v-model="row.weight" @input="calculationPrice" /> <el-input v-model="row.weight" @input="calculationPrice" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('货值') + '(RMB)'" width="100px"> <el-table-column :label="$t('货值') + '(RMB)'" width="100px">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-input v-model="row.worth" /> <el-input v-model="row.worth" />
</template> </template>
...@@ -193,34 +195,6 @@ ...@@ -193,34 +195,6 @@
</el-checkbox-group> </el-checkbox-group>
</template> </template>
</el-table-column> </el-table-column>
<!-- <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" />
</template>
</el-table-column>
<el-table-column label="出货渠道" width="150px">
<template slot-scope="{row}">
<selector
:disabled="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, row.transportId).cssClass != 'channel'"
v-model="row.channelId"
:options="channelList"
value-field="channelId"
label-field="nameZh"
@input="onChannelChange(row)"
></selector>
</template>
</el-table-column>
<el-table-column label="线路" width="200px">
<template slot-scope="{row}">
<selector
v-model="row.lineId"
:options="routerList"
@input="onLineChange(row)"
clearable
:label-field="(item, index) => item.startTitleZh + ' >> ' + item.destTitleZh" value-field="id"></selector>
</template>
</el-table-column> -->
<el-table-column :label="$t('运费')" width="200px"> <el-table-column :label="$t('运费')" width="200px">
<template slot-scope="{row}"> <template slot-scope="{row}">
<template v-if="row.fee && row.fee.charging == 1"> <template v-if="row.fee && row.fee.charging == 1">
...@@ -253,11 +227,15 @@ ...@@ -253,11 +227,15 @@
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('快递单号')" width="100px">
<template slot-scope="{row}">
<el-input v-model="row.expressNo" placeholder="缺少字段" />
</template>
</el-table-column>
<el-table-column :label="$t('操作')" width="180px" fixed="right"> <el-table-column :label="$t('操作')" width="180px" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="danger" @click="delProduct(scope.$index)">{{$t('删除')}}</el-button> <el-button size="mini" type="danger" @click="delProduct(scope.$index)">{{$t('删除')}}</el-button>
<el-button size="mini" type="primary" @click="showMorePrice($index)">{{$t('更多报价')}}</el-button> <!-- <el-button size="mini" type="primary" @click="showMorePrice($index)">{{$t('更多报价')}}</el-button> -->
<!-- <el-button size="mini" type="primary" @click="getProductFee(scope.row)">计算</el-button> -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -484,7 +462,6 @@ import {getCurrencyList} from '@/api/ecw/currency' ...@@ -484,7 +462,6 @@ 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",
...@@ -696,11 +673,16 @@ export default { ...@@ -696,11 +673,16 @@ 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){ /* onProductChange(row, product){
row.goodsType = product.typeId; row.goodsType = product.typeId;
// 保存商品id和品名,用于优惠信息显示 // 保存商品id和品名,用于优惠信息显示
this.$set(this.productNames, product.id, product.titleZh) this.$set(this.productNames, product.id, product.titleZh)
this.calculationPrice() this.calculationPrice()
}, */
onProductChange(row, product){
console.log(product)
row.goodsType = product ? product.typeId : null
row.prodAttrArr = !product ? [] : product.attrId.split(',').filter(item => item !== '').map(item => +item)
}, },
onLineChange(row){ onLineChange(row){
this.calculationPrice() this.calculationPrice()
......
This diff is collapsed.
...@@ -101,8 +101,8 @@ ...@@ -101,8 +101,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="英文名称" prop="enName"> <el-form-item label="英文名称" prop="nameEn">
<el-input v-model="form.enName" placeholder="请输入菜单英文名称" /> <el-input v-model="form.nameEn" placeholder="请输入菜单英文名称" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
......
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