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

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

parent baadbbc5
......@@ -18,13 +18,13 @@
</el-select>
<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>
</template>
<script>
import {getCustomerContactsSelect, getCustomerContactsListByCustomer} from '@/api/ecw/customerContacts'
import QuickCreate from '@/views/ecw/customer/components/quickCreate'
import Vue from 'vue'
export default {
components:{QuickCreate},
props:{
......@@ -32,7 +32,8 @@ export default {
quickable: {
type: Boolean,
default: true
}
},
type: [String, Number], // 客户类别,新建时指定默认类别,也可以根据需要筛选联系人所属的客户类别
},
data(){
return {
......@@ -50,6 +51,49 @@ export default {
},
value(val){
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(){
......
<template>
<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">
<dict-selector :type="DICT_TYPE.CUSTOMER_TYPE" form-type="checkbox" multiple v-model="form.type"></dict-selector>
</el-form-item>
......@@ -59,19 +59,9 @@ import { getCountryListAll } from '@/api/ecw/country'
export default {
name: "quickCreateCustomer",
props:{
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
})
default: Object,
},
data(){
return {
show: true,
......@@ -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: {
open(){
this.show = true
......@@ -127,7 +128,7 @@ export default {
}
}
</script>
<style scoped lang="scss">
<style lang="scss">
.quick-create-customer .el-form-item{
margin-bottom: 22px;
}
......
This diff is collapsed.
......@@ -154,7 +154,7 @@ export default {
return false
}
console.log('submit')
createPick(this.formData).then(res => {
createPick(Object.assign({orderId: this.orderId}, this.formData)).then(res => {
this.$message.success(res.msg || '操作成功')
this.closeDialog()
})
......
<!--拆单审核中的申请信息部分-->
<template>
<div>
<el-descriptions :column="4">
<el-descriptions-item label="订单号">kooriookami</el-descriptions-item>
<el-descriptions-item label="运输方式">18100000000</el-descriptions-item>
<el-descriptions-item label="出货方式">苏州市</el-descriptions-item>
<div v-if="detail">
<el-descriptions :column="4" v-if="order">
<el-descriptions-item label="订单号">{{order.orderNo}}</el-descriptions-item>
<el-descriptions-item label="运输方式">
<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-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 label="出货方式">苏州市</el-descriptions-item>
<el-descriptions-item label="唛头">苏州市</el-descriptions-item>
<el-descriptions-item label="目的仓">苏州市</el-descriptions-item>
</el-descriptions>
<template v-for="item in detail.orderSplitBackVOList">
<div class="title" :key="item.orderNo">
{{item.orderNo}}
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="item.transportId" />
<div class="title mt-20" :key="item.orderNo">
<span class="mr-10">{{item.orderNo}}</span>
<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>
<span>发往{{item.dstWarehouseName}}</span>
</div>
<el-table :data="item.orderSplitItemBackVOList" :key="'items-' + item.orderNo">
<el-table-column label="序号">
......@@ -47,19 +58,30 @@
</div>
</template>
<script>
import {getApproval} from '@/api/ecw/order'
import {getApproval, getOrder} from '@/api/ecw/order'
import {getChannel} from '@/api/ecw/channel'
export default {
props:{
id: [String, Number]
},
data(){
return {
detail: null
detail: null,
order: null,
channel: null
}
},
watch:{
id(){
this.getData()
},
detail(){
this.getOrder()
},
order(){
if(this.order.channelId){
this.getChannel()
}
}
},
created(){
......@@ -72,7 +94,26 @@ export default {
getApproval(this.id).then(res => {
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>
<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 @@
<el-descriptions-item label="*发货人" :labelStyle="labelStyle">
<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-descriptions-item>
<el-descriptions-item label="电话" :labelStyle="labelStyle">
......@@ -31,7 +31,7 @@
<el-descriptions :column="3" border>
<el-descriptions-item label="*收货人" :labelStyle="labelStyle" >
<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-descriptions-item>
<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