Commit 9482381f authored by zs嵩's avatar zs嵩

报价单,客户等相关优化 bug处理

parent bed4bb1d
...@@ -96,6 +96,7 @@ import '@/icons' ...@@ -96,6 +96,7 @@ import '@/icons'
import axios from 'axios' import axios from 'axios'
Vue.prototype.$axios = axios Vue.prototype.$axios = axios
import '@/styles/index.scss' import '@/styles/index.scss'
import '@/styles/custom.scss'
/** /**
* If you don't want to use mock-server * If you don't want to use mock-server
......
.search-z {
.el-form-item--small.el-form-item {
width: 360px;
}
}
.search-time {
.el-form-item--small.el-form-item {
width: 520px;
}
}
.flex-c-c {
display: flex;
justify-content: center;
align-items: center;
}
...@@ -109,7 +109,7 @@ textarea { ...@@ -109,7 +109,7 @@ textarea {
font-size: 12px; font-size: 12px;
&:hover { &:hover {
background: rgba(210, 23, 23, 0.5) background: rgba(210, 23, 23, 0.5);
} }
} }
...@@ -144,7 +144,7 @@ textarea { ...@@ -144,7 +144,7 @@ textarea {
} }
.el-icon-plus { .el-icon-plus {
color: #409EFF; color: #409eff;
} }
.el-icon-delete { .el-icon-delete {
...@@ -152,10 +152,6 @@ textarea { ...@@ -152,10 +152,6 @@ textarea {
} }
} }
.el-scrollbar__view {
/*overflow-x: hidden;*/
}
.el-rate { .el-rate {
display: inline-block; display: inline-block;
vertical-align: text-top; vertical-align: text-top;
...@@ -164,15 +160,3 @@ textarea { ...@@ -164,15 +160,3 @@ textarea {
.el-upload__tip { .el-upload__tip {
line-height: 1.2; line-height: 1.2;
} }
.search-z {
.el-form-item--small.el-form-item {
width: 360px;
}
}
.search-time {
.el-form-item--small.el-form-item {
width: 520px;
}
}
...@@ -146,6 +146,7 @@ ...@@ -146,6 +146,7 @@
</div> </div>
</el-dialog> </el-dialog>
<choose-contact-dialog v-if="ChooseContactDialog" :type="2" @choose="changeAllContactUser" @close="ChooseContactDialog = false" /> <choose-contact-dialog v-if="ChooseContactDialog" :type="2" @choose="changeAllContactUser" @close="ChooseContactDialog = false" />
<CustomerFollowSelectOffer v-if="CustomerFollowSelectOffer" :customer-id="customerId" ref="customerFollowSelectOffer" @select="selectOffer" @close="CustomerFollowSelectOffer = false" />
</div> </div>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -172,6 +173,7 @@ import { parseTime } from "@/utils/ruoyi" ...@@ -172,6 +173,7 @@ import { parseTime } from "@/utils/ruoyi"
import FileUpload from "@/components/FileUpload/fileUpload" import FileUpload from "@/components/FileUpload/fileUpload"
import { formatDate } from "@/utils/index" import { formatDate } from "@/utils/index"
import ChooseContactDialog from "@/components/ChooseContactDialog" import ChooseContactDialog from "@/components/ChooseContactDialog"
import CustomerFollowSelectOffer from "./customerFollowSelectOffer"
export default { export default {
/** /**
* 客户跟进 * 客户跟进
...@@ -188,10 +190,12 @@ export default { ...@@ -188,10 +190,12 @@ export default {
}, },
components: { components: {
ChooseContactDialog, ChooseContactDialog,
CustomerFollowSelectOffer,
FileUpload FileUpload
}, },
data() { data() {
return { return {
CustomerFollowSelectOffer: false,
ChooseContactDialog: false, ChooseContactDialog: false,
fileType: ["doc", "xls", "ppt", "txt", "pdf", "png", "jpg", "jpeg"], fileType: ["doc", "xls", "ppt", "txt", "pdf", "png", "jpg", "jpeg"],
DICT_TYPE, DICT_TYPE,
...@@ -242,6 +246,9 @@ export default { ...@@ -242,6 +246,9 @@ export default {
}) })
}, },
methods: { methods: {
selectOffer(offerId) {
this.form.offerId = offerId
},
init() { init() {
if (this.form.customerId) { if (this.form.customerId) {
getCustomerContactsListByCustomer({ getCustomerContactsListByCustomer({
...@@ -305,7 +312,7 @@ export default { ...@@ -305,7 +312,7 @@ export default {
handleFollowType(val) { handleFollowType(val) {
console.log(val) console.log(val)
if (val == "2") { if (val == "2") {
this.$refs["customerFollowSelectOffer"].offerDialogVisible = true this.CustomerFollowSelectOffer = true
} else { } else {
this.form.offerId = undefined this.form.offerId = undefined
} }
...@@ -326,7 +333,7 @@ export default { ...@@ -326,7 +333,7 @@ export default {
nextPlan: undefined, nextPlan: undefined,
nextTime: undefined, nextTime: undefined,
number: undefined, number: undefined,
offerId: undefined, offerId: this.offerId,
parentId: undefined, parentId: undefined,
parentNumber: undefined, parentNumber: undefined,
purpose: undefined, purpose: undefined,
......
<template> <template>
<el-dialog append-to-body :title="$t('报价单')" :visible.sync="offerDialogVisible" :close-on-click-modal="false" width="80%"> <el-dialog append-to-body :title="$t('报价单')" :visible.sync="offerDialogVisible" :close-on-click-modal="false" width="80%" @close="$emit('close')">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="100px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="100px">
<el-form-item :label="$t('编号')" prop="searchNumber"> <el-form-item :label="$t('编号')" prop="searchNumber">
<el-input v-model="queryParams.searchNumber" :placeholder="$t('请输入报价单号、订单号')" clearable @keyup.enter.native="handleQuery"/> <el-input v-model="queryParams.searchNumber" :placeholder="$t('请输入报价单号、订单号')" clearable @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('客户')" prop="searchCustomer"> <el-form-item :label="$t('客户')" prop="searchCustomer">
<el-input v-model="queryParams.searchCustomer" :placeholder="$t('请输入客户')" clearable @keyup.enter.native="handleQuery"/> <el-input v-model="queryParams.searchCustomer" :placeholder="$t('请输入客户')" clearable @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('客户经理')" prop="followUpSalesmanId"> <el-form-item :label="$t('客户经理')" prop="followUpSalesmanId">
<user-selector v-model="queryParams.followUpSalesmanId" clearable /> <user-selector v-model="queryParams.followUpSalesmanId" clearable />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t("搜索") }}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{$t('重置')}}</el-button> <el-button icon="el-icon-refresh" @click="resetQuery">{{ $t("重置") }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table :data="offerList" border size="mini"> <el-table :data="offerList" border size="mini">
<el-table-column align="center" width="80"> <el-table-column align="center" width="80">
<template slot-scope="{row}"> <template slot-scope="{ row }">
<el-radio v-model="offerId" :label="row.offerId">&nbsp;</el-radio> <el-radio v-model="offerId" :label="row.offerId">&nbsp;</el-radio>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('报价单号')" min-width="160px"> <el-table-column :label="$t('报价单号')" min-width="160px">
<template slot-scope="{row}"> <template slot-scope="{ row }">
<el-link type="primary" @click.native="$router.push('/offer/detail?offerId=' + row.offerId)">{{row.number}}</el-link> <el-link type="primary" @click.native="$router.push('/offer/detail?offerId=' + row.offerId)">{{ row.number }}</el-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('销售阶段')" min-width="120"> <el-table-column :label="$t('销售阶段')" min-width="120">
<template slot-scope="{row}"> <template slot-scope="{ row }">
<dict-tag :type="DICT_TYPE.ECW_OFFER_STATUS" :value="row.status" /> <dict-tag :type="DICT_TYPE.ECW_OFFER_STATUS" :value="row.status" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('订单编号')" min-width="150px"> <el-table-column :label="$t('订单编号')" min-width="150px">
<template slot-scope="{row}"> <template slot-scope="{ row }">
<el-link type="primary" @click.native="$router.push('/order/detail?orderId=' + row.orderId)">{{row.orderNo}}</el-link> <el-link type="primary" @click.native="$router.push('/order/detail?orderId=' + row.orderId)">{{ row.orderNo }}</el-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('客户编号')" align="center" min-width="100"> <el-table-column :label="$t('客户编号')" align="center" min-width="100">
<template slot-scope="{row}"> <template slot-scope="{ row }">
<el-link type="primary" @click.native="$router.push('/customer/query/' + row.relationId)">{{row.customerNumber}}</el-link> <el-link type="primary" @click.native="$router.push('/customer/query/' + row.relationId)">{{ row.customerNumber }}</el-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('客户名称')" align="center" prop="relationName" min-width="100" /> <el-table-column :label="$t('客户名称')" align="center" prop="relationName" min-width="100" />
<el-table-column :label="$t('联系方式')"> <el-table-column :label="$t('联系方式')">
<template slot-scope="scope"> <template slot-scope="scope"> +{{ scope.row.relationAreaCode }}{{ scope.row.relationPhone }} </template>
+{{ scope.row.relationAreaCode }}{{ scope.row.relationPhone }}
</template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('运输方式')"> <el-table-column :label="$t('运输方式')">
<template slot-scope="scope" > <template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="scope.row.transportId" /> <dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="scope.row.transportId" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('渠道')" align="center" min-width="120" prop="channelName"> <el-table-column :label="$t('渠道')" align="center" min-width="120" prop="channelName"> </el-table-column>
</el-table-column> <el-table-column :label="$t('始发地')" align="center" min-width="120" prop="departureName"> </el-table-column>
<el-table-column :label="$t('始发地')" align="center" min-width="120" prop="departureName">
</el-table-column>
<el-table-column :label="$t('目的地')" align="center" prop="objectiveName" min-width="120" /> <el-table-column :label="$t('目的地')" align="center" prop="objectiveName" min-width="120" />
<el-table-column :label="$t('预计销售额')" min-width="160"> <el-table-column :label="$t('预计销售额')" min-width="160">
<template slot-scope="{row}"> <template slot-scope="{ row }">
<div class="" v-for="(item, feeIndex) in row.estCostVO.feeDtoList" :key="feeIndex"> <div class="" v-for="(item, feeIndex) in row.estCostVO.feeDtoList" :key="feeIndex">
<dict-tag :type="DICT_TYPE.ECW_COST_FEE_TYPE" :value="item.feeType" /> <dict-tag :type="DICT_TYPE.ECW_COST_FEE_TYPE" :value="item.feeType" />
{{item.amount}} {{currencyMap[item.currencyId]}} {{ item.amount }} {{ currencyMap[item.currencyId] }}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
...@@ -73,18 +69,17 @@ ...@@ -73,18 +69,17 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页组件 --> <!-- 分页组件 -->
<pagination v-show="offerTotal > 0" :total="offerTotal" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" <pagination v-show="offerTotal > 0" :total="offerTotal" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" @pagination="getOfferList" />
@pagination="getOfferList"/>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="confirm">{{$t('确 定')}}</el-button> <el-button type="primary" @click="confirm">{{ $t("确 定") }}</el-button>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { getCurrencyList } from '@/api/ecw/currency'; import { getCurrencyList } from "@/api/ecw/currency"
import { getOfferPage } from "@/api/ecw/offer" import { getOfferPage } from "@/api/ecw/offer"
import UserSelector from '@/components/UserSelector' import UserSelector from "@/components/UserSelector"
export default { export default {
name: "CustomerFollowSelectOffer", name: "CustomerFollowSelectOffer",
...@@ -104,35 +99,36 @@ export default { ...@@ -104,35 +99,36 @@ export default {
}, },
offerList: [], offerList: [],
offerTotal: 0, offerTotal: 0,
currencyList: [], currencyList: []
} }
}, },
created() { created() {
getCurrencyList().then(res => { getCurrencyList().then((res) => {
this.currencyList = res.data this.currencyList = res.data
}) })
this.getOfferList() this.getOfferList()
this.offerDialogVisible = true
}, },
computed:{ computed: {
currencyMap(){ currencyMap() {
let map = {} let map = {}
this.currencyList.forEach(item => { this.currencyList.forEach((item) => {
map[item.id] = this.$l(item, 'title') map[item.id] = this.$l(item, "title")
}) })
return map return map
}, },
exportCityList() { exportCityList() {
return this.tradeCityList.filter(item => item.type == 2) return this.tradeCityList.filter((item) => item.type == 2)
}, },
importCityList() { importCityList() {
return this.tradeCityList.filter(item => item.type == 1) return this.tradeCityList.filter((item) => item.type == 1)
}, }
}, },
methods: { methods: {
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNo = 1; this.queryParams.pageNo = 1
this.getOfferList() this.getOfferList()
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
...@@ -141,20 +137,20 @@ export default { ...@@ -141,20 +137,20 @@ export default {
pageNo: 1, pageNo: 1,
pageSize: 10 pageSize: 10
} }
this.handleQuery(); this.handleQuery()
}, },
getOfferList() { getOfferList() {
getOfferPage({ getOfferPage({
...this.queryParams, ...this.queryParams,
customerId: this.customerId customerId: this.customerId
}).then(response => { }).then((response) => {
this.offerList = response.data.list; this.offerList = response.data.list
this.offerTotal = response.data.total; this.offerTotal = response.data.total
}); })
}, },
confirm() { confirm() {
if (this.offerId) { if (this.offerId) {
this.$emit('select', this.offerId) this.$emit("select", this.offerId)
this.offerDialogVisible = false this.offerDialogVisible = false
} else { } else {
this.$message.error(this.$t("请选择报价单")) this.$message.error(this.$t("请选择报价单"))
...@@ -162,4 +158,4 @@ export default { ...@@ -162,4 +158,4 @@ export default {
} }
} }
} }
</script> </script>
\ No newline at end of file
...@@ -1005,7 +1005,6 @@ export default { ...@@ -1005,7 +1005,6 @@ export default {
this.$refs.bankForm.validate((valid3, err3) => { this.$refs.bankForm.validate((valid3, err3) => {
console.log(valid3, "valid3", err3) console.log(valid3, "valid3", err3)
if (!valid1 || !valid2 || !valid3) { if (!valid1 || !valid2 || !valid3) {
console.log(333)
this.$showFormValidateErrors({ ...err1, ...err2, ...err3 }) this.$showFormValidateErrors({ ...err1, ...err2, ...err3 })
this.showBaseFlag = true this.showBaseFlag = true
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
<el-descriptions-item :label="$t('客户状态')"> <el-descriptions-item :label="$t('客户状态')">
{{ getDictDataLabel(DICT_TYPE.CUSTOMER_STATUS, customer.status) }} {{ getDictDataLabel(DICT_TYPE.CUSTOMER_STATUS, customer.status) }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('客户经理')">{{ customer.customerServiceName }}</el-descriptions-item>
<el-descriptions-item :label="$t('询盘信息')">{{ customer.inquiry }}</el-descriptions-item> <el-descriptions-item :label="$t('询盘信息')">{{ customer.inquiry }}</el-descriptions-item>
<el-descriptions-item :label="$t('备注')">{{ customer.remarks }}</el-descriptions-item> <el-descriptions-item :label="$t('备注')">{{ customer.remarks }}</el-descriptions-item>
<el-descriptions-item :label="$t('图片')"> <el-descriptions-item :label="$t('图片')">
...@@ -42,22 +41,23 @@ ...@@ -42,22 +41,23 @@
</image-display> </image-display>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('客户等级')">
{{ getDictDataLabel(DICT_TYPE.CUSTOMER_LEVEL, customer.level) }}
</el-descriptions-item>
<el-descriptions-item :label="$t('推介人')">{{ customer.promoterName }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户生日')">{{ parseTime(customer.birthday, "{y}-{m}-{d}") }} </el-descriptions-item>
<el-descriptions-item :label="$t('客户经理')">{{ customer.customerServiceName }}</el-descriptions-item>
<el-descriptions-item :label="$t('资源类型')">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMER_RESOURCE_TYPE" :value="customer.resourceType"></dict-tag>
</el-descriptions-item>
<el-descriptions-item :label="$t('客户英文名称')">{{ customer.nameEn }}</el-descriptions-item>
<el-descriptions-item :label="$t('联系地址')">{{ customer.address }}</el-descriptions-item>
<el-descriptions-item :label="$t('首次成交时间')">{{ customer.firstDealTime }}</el-descriptions-item>
<el-descriptions-item :label="$t('掉入公海时间')">
{{ customer.estimateEnterOpenSeaTime || customer.enterOpenSeaTime }}
</el-descriptions-item>
<template v-if="showMore"> <template v-if="showMore">
<el-descriptions-item :label="$t('客户等级')">
{{ getDictDataLabel(DICT_TYPE.CUSTOMER_LEVEL, customer.level) }}
</el-descriptions-item>
<el-descriptions-item :label="$t('推介人')">{{ customer.promoterName }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户生日')">{{ parseTime(customer.birthday, "{y}-{m}-{d}") }} </el-descriptions-item>
<el-descriptions-item :label="$t('业绩类型')">{{ customer.isNew ? $t("新客户") : $t("老客户") }} </el-descriptions-item>
<el-descriptions-item :label="$t('资源类型')">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMER_RESOURCE_TYPE" :value="customer.resourceType"></dict-tag>
</el-descriptions-item>
<el-descriptions-item :label="$t('客户英文名称')">{{ customer.nameEn }}</el-descriptions-item>
<el-descriptions-item :label="$t('联系地址')">{{ customer.address }}</el-descriptions-item>
<el-descriptions-item :label="$t('首次成交时间')">{{ customer.firstDealTime }}</el-descriptions-item>
<el-descriptions-item :label="$t('掉入公海时间')">
{{ customer.estimateEnterOpenSeaTime || customer.enterOpenSeaTime }}
</el-descriptions-item>
<el-descriptions-item :label="$t('获取方式')"> <el-descriptions-item :label="$t('获取方式')">
{{ getDictDataLabel(DICT_TYPE.CUSTOMER_GET_METHOD, customer.getMethod) }} {{ getDictDataLabel(DICT_TYPE.CUSTOMER_GET_METHOD, customer.getMethod) }}
</el-descriptions-item> </el-descriptions-item>
...@@ -70,6 +70,7 @@ ...@@ -70,6 +70,7 @@
<el-descriptions-item :label="$t('创建时间')">{{ parseTime(customer.createTime) }}</el-descriptions-item> <el-descriptions-item :label="$t('创建时间')">{{ parseTime(customer.createTime) }}</el-descriptions-item>
<el-descriptions-item :label="$t('最后更新人')">{{ customer.updaterName }}</el-descriptions-item> <el-descriptions-item :label="$t('最后更新人')">{{ customer.updaterName }}</el-descriptions-item>
<el-descriptions-item :label="$t('最后更新时间')">{{ customer.updateTime }}</el-descriptions-item> <el-descriptions-item :label="$t('最后更新时间')">{{ customer.updateTime }}</el-descriptions-item>
<el-descriptions-item :label="$t('业绩类型')">{{ customer.isNew ? $t("新客户") : $t("老客户") }} </el-descriptions-item>
</template> </template>
</el-descriptions> </el-descriptions>
</el-card> </el-card>
...@@ -93,46 +94,50 @@ ...@@ -93,46 +94,50 @@
<el-tab-pane name="order" :label="$t('订单')"> <el-tab-pane name="order" :label="$t('订单')">
<el-card class="box-card"> <el-card class="box-card">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<el-form :inline="true" size="small"> <el-form :inline="true" size="small" label-width="100px">
<el-form-item :label="$t('运输方式:')"> <div class="search-z">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="queryParams.transportId" formatter="number" /> <el-form-item :label="$t('运输方式:')">
</el-form-item> <dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="queryParams.transportId" formatter="number" />
<el-form-item :label="$t('订单状态:')"> </el-form-item>
<dict-selector :type="DICT_TYPE.ORDER_STATUS" v-model="queryParams.status" /> <el-form-item :label="$t('订单状态:')">
</el-form-item> <dict-selector :type="DICT_TYPE.ORDER_STATUS" v-model="queryParams.status" />
<el-form-item :label="$t('报关方式:')"> </el-form-item>
<dict-selector :type="DICT_TYPE.ECW_CUSTOMS_TYPE" v-model="queryParams.customsTypes" multiple /> <el-form-item :label="$t('报关方式:')">
</el-form-item> <dict-selector :type="DICT_TYPE.ECW_CUSTOMS_TYPE" v-model="queryParams.customsTypes" multiple />
<el-form-item :label="$t('控货')"> </el-form-item>
<dict-selector :type="DICT_TYPE.INFRA_BOOLEAN_STRING" v-model="queryParams.isCargoControl" /> <el-form-item :label="$t('控货:')">
</el-form-item> <dict-selector :type="DICT_TYPE.INFRA_BOOLEAN_STRING" v-model="queryParams.isCargoControl" />
<el-form-item :label="$t('入仓时间:')"> </el-form-item>
<el-date-picker v-model="rucangtime" @change="changeDate" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" /> <el-form-item :label="$t('始发仓:')" prop="startWarehouseIds">
</el-form-item> <el-select v-model="queryParams.startWarehouseIds" multiple :placeholder="$t('请选择始发仓')" clearable @change="handleQuery">
<el-form-item :label="$t('始发仓')" prop="startWarehouseIds"> <el-option v-for="item in exportWarehouseList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
<el-select v-model="queryParams.startWarehouseIds" multiple :placeholder="$t('请选择始发仓')" clearable @change="handleQuery"> </el-select>
<el-option v-for="item in exportWarehouseList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option> </el-form-item>
</el-select> <el-form-item :label="$t('目的国:')" prop="destCountryId">
</el-form-item> <el-select v-model="destCountryId" multiple :placeholder="$t('请选择目的国')" clearable @change="handleQuery">
<el-form-item :label="$t('目的国')" prop="destCountryId"> <el-option v-for="item in AddressProvince" :key="item.guojia" :label="item.guojiaName" :value="item.guojia"></el-option>
<el-select v-model="destCountryId" multiple :placeholder="$t('请选择目的国')" clearable @change="handleQuery"> </el-select>
<el-option v-for="item in AddressProvince" :key="item.guojia" :label="item.guojiaName" :value="item.guojia"></el-option> </el-form-item>
</el-select> <el-form-item :label="$t('目的城市:')" prop="objectiveId">
</el-form-item> <el-select v-model="objectiveId" multiple :placeholder="$t('请选择目的城市')" style="width: 200px" clearable @change="handleQuery">
<el-form-item :label="$t('目的城市')" prop="objectiveId"> <el-option v-for="item in AddressCity" :key="item.shi" :label="item.shiName" :value="item.shi"></el-option>
<el-select v-model="objectiveId" multiple :placeholder="$t('请选择目的城市')" style="width: 200px" clearable @change="handleQuery"> </el-select>
<el-option v-for="item in AddressCity" :key="item.shi" :label="item.shiName" :value="item.shi"></el-option> </el-form-item>
</el-select> <el-form-item :label="$t('目的仓:')" prop="destWarehouseId">
</el-form-item> <el-select v-model="destWarehouseId" multiple :placeholder="$t('请选择目的仓')" style="width: 200px" clearable @change="handleQuery">
<el-form-item :label="$t('目的仓')" prop="destWarehouseId"> <el-option v-for="item in AddressTown" :key="item.id" :label="item.titleZh" :value="item.id"></el-option>
<el-select v-model="destWarehouseId" multiple :placeholder="$t('请选择目的仓')" style="width: 200px" clearable @change="handleQuery"> </el-select>
<el-option v-for="item in AddressTown" :key="item.id" :label="item.titleZh" :value="item.id"></el-option> </el-form-item>
</el-select> </div>
</el-form-item> <div class="search-time">
<el-form-item> <el-form-item :label="$t('入仓时间:')">
<el-button type="primary" @click="getorderList">{{ $t("搜索") }}</el-button> <el-date-picker v-model="rucangtime" @change="changeDate" value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" />
<el-button type="primary" @click="handleOrderReset">{{ $t("重置") }}</el-button> </el-form-item>
</el-form-item> <el-form-item style="padding-left: 20px">
<el-button type="primary" @click="getorderList">{{ $t("搜索") }}</el-button>
<el-button type="primary" @click="handleOrderReset">{{ $t("重置") }}</el-button>
</el-form-item>
</div>
</el-form> </el-form>
</div> </div>
<el-descriptions :column="2"> <el-descriptions :column="2">
...@@ -228,65 +233,68 @@ ...@@ -228,65 +233,68 @@
<el-tab-pane name="quote" :label="$t('报价')"> <el-tab-pane name="quote" :label="$t('报价')">
<el-card class="box-card"> <el-card class="box-card">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<el-form :inline="true" size="small" ref="handleOffer"> <el-form :inline="true" size="small" ref="handleOffer" label-width="100px">
<el-form-item :label="$t('编号')" prop="searchNumber"> <div class="search-z">
<el-input v-model.trim="queryOfferParams.searchNumber" :placeholder="$t('请输入报价单号、订单号')" clearable @keyup.enter.native="handleQuery" /> <el-form-item :label="$t('编号')" prop="searchNumber">
</el-form-item> <el-input v-model.trim="queryOfferParams.searchNumber" :placeholder="$t('请输入报价单号、订单号')" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('客户')" prop="searchCustomer">
<el-input v-model.trim="queryOfferParams.searchCustomer" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('联系方式')" prop="relationPhone"> <el-form-item :label="$t('客户')" prop="searchCustomer">
<el-input v-model.trim="queryOfferParams.relationPhone" clearable @keyup.enter.native="handleQuery" @input="queryOfferParams.relationPhone = queryOfferParams.relationPhone.replace(/\s+/g, '')" /> <el-input v-model.trim="queryOfferParams.searchCustomer" clearable @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('区号')" prop="relationAreaCode"> <el-form-item :label="$t('联系方式')" prop="relationPhone">
<el-input v-model.trim="queryOfferParams.relationAreaCode" :placeholder="$t('请输入客户')" clearable @keyup.enter.native="handleQuery" @input="queryOfferParams.relationAreaCode = queryOfferParams.relationAreaCode.replace(/\s+/g, '')" /> <el-input v-model.trim="queryOfferParams.relationPhone" clearable @keyup.enter.native="handleQuery" @input="queryOfferParams.relationPhone = queryOfferParams.relationPhone.replace(/\s+/g, '')" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('始发仓')" prop="startWarehouseIds"> <el-form-item :label="$t('区号')" prop="relationAreaCode">
<el-select v-model="queryParams.startWarehouseIds" multiple :placeholder="$t('请选择始发仓')" clearable @change="handleQuery"> <el-input v-model.trim="queryOfferParams.relationAreaCode" :placeholder="$t('请输入客户')" clearable @keyup.enter.native="handleQuery" @input="queryOfferParams.relationAreaCode = queryOfferParams.relationAreaCode.replace(/\s+/g, '')" />
<el-option v-for="item in exportWarehouseList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option> </el-form-item>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的国')" prop="destCountryId"> <el-form-item :label="$t('始发仓')" prop="startWarehouseIds">
<el-select v-model="destCountryId" multiple :placeholder="$t('请选择目的国')" clearable @change="handleQuery"> <el-select v-model="queryParams.startWarehouseIds" multiple :placeholder="$t('请选择始发仓')" clearable @change="handleQuery">
<el-option v-for="item in AddressProvince" :key="item.guojia" :label="item.guojiaName" :value="item.guojia"></el-option> <el-option v-for="item in exportWarehouseList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('目的城市')" prop="objectiveId">
<el-select v-model="objectiveId" multiple :placeholder="$t('请选择目的城市')" style="width: 200px" clearable @change="handleQuery">
<el-option v-for="item in AddressCity" :key="item.shi" :label="item.shiName" :value="item.shi"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的仓')" prop="destWarehouseId">
<el-select v-model="destWarehouseId" multiple :placeholder="$t('请选择目的仓')" style="width: 200px" clearable @change="handleQuery">
<el-option v-for="item in AddressTown" :key="item.id" :label="item.titleZh" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('客户经理')" prop="salesmanIds"> <el-form-item :label="$t('目的国')" prop="destCountryId">
<user-selector v-model="queryOfferParams.salesmanIds" multiple clearable @change="handleQuery" /> <el-select v-model="destCountryId" multiple :placeholder="$t('请选择目的国')" clearable @change="handleQuery">
</el-form-item> <el-option v-for="item in AddressProvince" :key="item.guojia" :label="item.guojiaName" :value="item.guojia"></el-option>
<el-form-item :label="$t('销售阶段')" prop="statusList"> </el-select>
<dict-selector :type="DICT_TYPE.ECW_OFFER_STATUS" multiple v-model="queryOfferParams.statusList" clearable @change="handleQuery" /> </el-form-item>
</el-form-item> <el-form-item :label="$t('目的城市')" prop="objectiveId">
<el-form-item :label="$t('重要程度')" prop="importances"> <el-select v-model="objectiveId" multiple :placeholder="$t('请选择目的城市')" style="width: 200px" clearable @change="handleQuery">
<el-select v-model="queryOfferParams.importances" multiple :placeholder="$t('请选择')" clearable @change="handleQuery"> <el-option v-for="item in AddressCity" :key="item.shi" :label="item.shiName" :value="item.shi"></el-option>
<el-option v-for="item in [1, 2, 3, 4, 5]" :label="item" :value="item" :key="item"></el-option> </el-select>
</el-select> </el-form-item>
</el-form-item> <el-form-item :label="$t('目的仓')" prop="destWarehouseId">
<el-select v-model="destWarehouseId" multiple :placeholder="$t('请选择目的仓')" style="width: 200px" clearable @change="handleQuery">
<el-option v-for="item in AddressTown" :key="item.id" :label="item.titleZh" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('创建时间')"> <el-form-item :label="$t('客户经理')" prop="salesmanIds">
<el-date-picker v-model="queryTmp.createTime" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" value-format="yyyy-MM-dd HH:mm:ss" @change="handleQuery"> </el-date-picker> <user-selector v-model="queryOfferParams.salesmanIds" multiple clearable @change="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('销售阶段')" prop="statusList">
<dict-selector :type="DICT_TYPE.ECW_OFFER_STATUS" multiple v-model="queryOfferParams.statusList" clearable @change="handleQuery" />
</el-form-item>
<el-form-item :label="$t('重要程度')" prop="importances">
<el-select v-model="queryOfferParams.importances" multiple :placeholder="$t('请选择')" clearable @change="handleQuery">
<el-option v-for="item in [1, 2, 3, 4, 5]" :label="item" :value="item" :key="item"></el-option>
</el-select>
</el-form-item>
</div>
<div class="search-time">
<el-form-item :label="$t('创建时间')">
<el-date-picker v-model="queryTmp.createTime" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" value-format="yyyy-MM-dd HH:mm:ss" @change="handleQuery"> </el-date-picker>
</el-form-item>
<el-form-item> <el-form-item style="padding-left: 20px">
<el-button type="primary" @click="getInfoListOfferPage">{{ $t("搜索") }}</el-button> <el-button type="primary" @click="getInfoListOfferPage">{{ $t("搜索") }}</el-button>
<el-button type="primary" @click="handleOfferReset">{{ $t("重置") }}</el-button> <el-button type="primary" @click="handleOfferReset">{{ $t("重置") }}</el-button>
</el-form-item> </el-form-item>
</div>
</el-form> </el-form>
</div> </div>
<el-table :data="infoListOfferList" style="width: 100%"> <el-table :data="infoListOfferList" style="width: 100%">
...@@ -380,7 +388,7 @@ ...@@ -380,7 +388,7 @@
</el-card> </el-card>
</el-tab-pane> </el-tab-pane>
<el-tab-pane name="follow" :label="$t('跟进')"> <el-tab-pane name="follow" :label="$t('跟进')">
<logListCommon ref="logListCommon" v-if="activeName === 'follow'" :customerId="id" /> <logListCommon ref="logListCommon" :customerService="customer.customerService" :customerNumber="customer.number" v-if="activeName === 'follow'" :customerId="id" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane name="complain" :label="$t('客户投诉')"> <el-tab-pane name="complain" :label="$t('客户投诉')">
<customer-complaint v-if="activeName === 'complain'" ref="customerComplaint" :customer-id="id" hidden-search></customer-complaint> <customer-complaint v-if="activeName === 'complain'" ref="customerComplaint" :customer-id="id" hidden-search></customer-complaint>
...@@ -950,7 +958,7 @@ export default { ...@@ -950,7 +958,7 @@ export default {
}, },
infoListReceiptTotal: 0, infoListReceiptTotal: 0,
country: "", country: "",
showMore: true, showMore: false,
AddressCity: [], AddressCity: [],
AddressProvince: [], AddressProvince: [],
AddressTown: [], AddressTown: [],
......
<template> <template>
<div class="app-container"> <div class="app-container">
<el-card> <el-card>
<div slot="header" class="card-title">{{$t('报价单详情')}}</div> <div slot="header" class="card-title">{{ $t("报价单详情") }}</div>
<!-- 列表 --> <!-- 列表 -->
<div class="offer-header"> <div class="offer-header">
<span style="font-size: 15px;">{{$t('报价单号')}}{{list.number}} - <dict-tag :type="DICT_TYPE.ECW_OFFER_STATUS" :value="list.status" /></span> <span style="font-size: 15px">{{ $t("报价单号") }}{{ list.number }} - <dict-tag :type="DICT_TYPE.ECW_OFFER_STATUS" :value="list.status" /></span>
<div class="btns"> <div class="btns">
<el-button v-hasPermi="['ecw:offer:update']" size="mini" type="primary" v-if="[4,5,6].indexOf(list.status) == -1" @click="$router.push('edit?id=' + offerId)">{{$t('编辑')}}</el-button> <el-button v-hasPermi="['ecw:offer:update']" size="mini" type="primary" v-if="[4, 5, 6].indexOf(list.status) == -1" @click="$router.push('edit?id=' + offerId)">{{ $t("编辑") }}</el-button>
<el-button v-hasPermi="['ecw:offer:loglist']" type="primary" v-if="[1,3,7].indexOf(list.status) > -1" size="mini" @click="handleAdd">{{$t('跟进')}}</el-button> <el-button v-hasPermi="['ecw:offer:loglist']" type="primary" v-if="[1, 3, 7].indexOf(list.status) > -1" size="mini" @click="handleAddOffer(list)">{{ $t("跟进") }}</el-button>
<el-button v-hasPermi="['ecw:offer:result']" type="primary" v-if="[3,7].indexOf(list.status) > -1" size="mini" @click="toResult">{{$t('结果')}}</el-button> <el-button v-hasPermi="['ecw:offer:result']" type="primary" v-if="[3, 7].indexOf(list.status) > -1" size="mini" @click="toResult">{{ $t("结果") }}</el-button>
<el-button v-hasPermi="['ecw:offer:discount','ecw:offer:commission']" size="mini" v-if="[1,3,7].indexOf(list.status) > -1" type="primary" @click.native="$router.push('/offer/special?offerId=' + offerId)" >{{$t('特价')}}</el-button> <el-button v-hasPermi="['ecw:offer:discount', 'ecw:offer:commission']" size="mini" v-if="[1, 3, 7].indexOf(list.status) > -1" type="primary" @click.native="$router.push('/offer/special?offerId=' + offerId)">{{ $t("特价") }}</el-button>
<el-button v-hasPermi="['ecw:offer:delete']" type="danger" size="mini" @click="handleDelete">{{$t('删除')}}</el-button> <el-button v-hasPermi="['ecw:offer:delete']" type="danger" size="mini" @click="handleDelete">{{ $t("删除") }}</el-button>
</div> </div>
</div> </div>
<div> <div>
<div class="title-font"> <div class="title-font">
<label>{{$t('报价单所属')}}{{list.relation?list.relation==1?$t('发货人'):$t('收货人'):$t('发货人')}}</label> <label>{{ $t("报价单所属") }}{{ list.relation ? (list.relation == 1 ? $t("发货人") : $t("收货人")) : $t("发货人") }}</label>
</div> </div>
<el-descriptions :column="3" border class="card" v-if="list.consignorId"> <el-descriptions :column="3" border class="card" v-if="list.consignorId">
<el-descriptions-item :label="$t('发货人')+':'"> <el-descriptions-item :label="$t('发货人') + ':'">
{{consignorData.contactsName||$t('')}} {{ consignorData.contactsName || $t("") }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('手机号')+':'"> <el-descriptions-item :label="$t('手机号') + ':'">
{{consignorData && consignorData.phoneNew ? (checkCode(consignorData.areaCode) + consignorData.phoneNew)||$t(''):$t('')}} {{ consignorData && consignorData.phoneNew ? checkCode(consignorData.areaCode) + consignorData.phoneNew || $t("") : $t("") }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('联系地址')+':'"> <el-descriptions-item :label="$t('联系地址') + ':'">
{{consignorData.address||$t('')}} {{ consignorData.address || $t("") }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('客户来源')+':'"> <el-descriptions-item :label="$t('客户来源') + ':'">
{{consignorData.source||$t('')}} {{ consignorData.source || $t("") }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('发货人公司名称')+':'"> <el-descriptions-item :label="$t('发货人公司名称') + ':'">
{{consignorData.company||$t('')}} {{ consignorData.company || $t("") }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('社交软件')+':'"> <el-descriptions-item :label="$t('社交软件') + ':'">
<dict-tag :type="DICT_TYPE.SOCIAL" :value="consignorData.social" /> <dict-tag :type="DICT_TYPE.SOCIAL" :value="consignorData.social" />
{{consignorData.socialNumber?('('+consignorData.socialNumber+')'):''}} {{ consignorData.socialNumber ? "(" + consignorData.socialNumber + ")" : "" }}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-descriptions :column="3" border class="card" v-if="list.consigneeId"> <el-descriptions :column="3" border class="card" v-if="list.consigneeId">
<el-descriptions-item :label="$t('收货人')+':'"> <el-descriptions-item :label="$t('收货人') + ':'">
{{consigneeData.contactsName||$t('')}} {{ consigneeData.contactsName || $t("") }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('手机号')+':'"> <el-descriptions-item :label="$t('手机号') + ':'">
{{consigneeData && consigneeData.phoneNew ?(checkCode(consigneeData.areaCode)+consigneeData.phoneNew)||$t(''):$t('')}} {{ consigneeData && consigneeData.phoneNew ? checkCode(consigneeData.areaCode) + consigneeData.phoneNew || $t("") : $t("") }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('联系地址')+':'"> <el-descriptions-item :label="$t('联系地址') + ':'">
{{consigneeData.address||$t('')}} {{ consigneeData.address || $t("") }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('客户来源')+':'"> <el-descriptions-item :label="$t('客户来源') + ':'">
{{consigneeData.source||$t('')}} {{ consigneeData.source || $t("") }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('发货人公司名称')+':'"> <el-descriptions-item :label="$t('发货人公司名称') + ':'">
{{consigneeData.company||$t('')}} {{ consigneeData.company || $t("") }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('社交软件')+':'"> <el-descriptions-item :label="$t('社交软件') + ':'">
<dict-tag :type="DICT_TYPE.SOCIAL" :value="consigneeData.social" /> <dict-tag :type="DICT_TYPE.SOCIAL" :value="consigneeData.social" />
{{consigneeData.socialNumber?('('+consigneeData.socialNumber+')'):''}} {{ consigneeData.socialNumber ? "(" + consigneeData.socialNumber + ")" : "" }}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-descriptions :column="4" class="card"> <el-descriptions :column="4" class="card">
<el-descriptions-item :label="$t('运输方式')"> <el-descriptions-item :label="$t('运输方式')">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="list.transportId" /> <dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="list.transportId" />
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('出货渠道')" v-if="[3,4].indexOf(list.transportId) > -1"> <el-descriptions-item :label="$t('出货渠道')" v-if="[3, 4].indexOf(list.transportId) > -1">
{{channelName}} {{ channelName }}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-descriptions :column="4" class="card"> <el-descriptions :column="4" class="card">
<el-descriptions-item :label="$t('始发城市')"> <el-descriptions-item :label="$t('始发城市')">
{{getCity(list.departureId)}} {{ getCity(list.departureId) }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('目的城市')"> <el-descriptions-item :label="$t('目的城市')">
{{getCity(list.objectiveId)}} {{ getCity(list.objectiveId) }}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-descriptions :column="4" class="card"> <el-descriptions :column="4" class="card">
<el-descriptions-item :label="$t('线路')"> <el-descriptions-item :label="$t('线路')">
{{getRouterNameById(list.lineId)}} {{ getRouterNameById(list.lineId) }}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-descriptions :column="4" class="card"> <el-descriptions :column="4" class="card">
<el-descriptions-item :label="$t('报价单状态')"> <el-descriptions-item :label="$t('报价单状态')">
<dict-tag :type="DICT_TYPE.ECW_OFFER_STATUS" :value="list.status" /> <dict-tag :type="DICT_TYPE.ECW_OFFER_STATUS" :value="list.status" />
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-descriptions :column="4" class="card" v-if="list.status==5"> <el-descriptions :column="4" class="card" v-if="list.status == 5">
<el-descriptions-item :label="$t('输单原因')"> <el-descriptions-item :label="$t('输单原因')">
{{list.reason}} {{ list.reason }}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
</div>
</el-card>
</div> <el-card class="card">
</el-card> <div slot="header" class="card-title">{{ $t("商品信息") }}</div>
<div style="overflow: auto">
<el-table v-loading="loading" border :data="list.offerProdRespVOList">
<el-table-column :label="$t('序号')" width="60px" fixed>
<template slot-scope="scope">
{{ scope.$index + 1 }}
</template>
</el-table-column>
<!-- <el-table-column :label="商品类型" align="center" prop="goodsType" /> -->
<el-table-column :label="$t('中文品名')" align="center" prop="prodTitleZh" />
<el-table-column :label="$t('英文品名')" align="center" prop="prodTitleEn" />
<el-table-column :label="$t('品牌')" width="100px">
<template slot-scope="scope">
<dict-tag :value="scope.row.brand" :type="DICT_TYPE.ECW_IS_BRAND" defaultable />
</template>
</el-table-column>
<el-table-column :label="$t('件数')" width="90px" prop="num" />
<el-table-column :label="$t('包装单位')">
<template slot-scope="scope">
<dict-tag :value="scope.row.unit" :type="DICT_TYPE.ECW_PACKAGING_TYPE" defaultable />
</template>
</el-table-column>
<!-- <el-table-column :label="$t('箱规') + '(m)'" width="120px" prop="boxGauge" /> -->
<el-table-column :label="$t('体积') + '(m³)'" width="100px" prop="volume" />
<el-table-column :label="$t('数量')" width="100px" prop="quantity" />
<el-table-column :label="$t('重量') + '(kg)'" width="100px" prop="weight" />
<el-table-column :label="$t('货值') + '(RMB)'" width="100px" prop="worth" />
<el-table-column :label="$t('商品特性')" width="200px" prop="prodAttrName" />
<el-table-column :label="$t('是否预付')">
<template slot-scope="scope">
{{ scope.row.isPayAdvance == 1 ? $t("预付") : $t("到付") }}
</template>
</el-table-column>
<el-card class="card"> <el-table-column :label="$t('成交价')" width="200px">
<div slot="header" class="card-title">{{$t('商品信息')}}</div> <template slot-scope="{ row }">
<div style="overflow: auto;"> <template v-if="row.charging == 1">
<el-table v-loading="loading" border :data="list.offerProdRespVOList"> <template v-if="!row.oneSeaFreight">{{ $t("未报价") }}</template>
<el-table-column :label="$t('序号')" width="60px" fixed> <template>{{ $t("全包价") }} {{ row.oneSeaFreight }} {{ currentcyMap[row.seaFreightCurrency] }} / {{ unitMap[row.seaFreightVolume] }}</template>
<template slot-scope="scope"> </template>
{{scope.$index + 1}} <template v-else-if="!row.oneSeaFreight && !row.oneClearanceFreight">{{ $t("未报价") }}</template>
</template> <template v-else>
</el-table-column> <div>{{ $t("运费") }}{{ row.oneSeaFreight }} {{ currentcyMap[row.seaFreightCurrency] }} / {{ unitMap[row.seaFreightVolume] }}</div>
<!-- <el-table-column :label="商品类型" align="center" prop="goodsType" /> --> <div v-if="row.oneClearanceFreight">{{ $t("清关费") }}{{ row.oneClearanceFreight }} {{ currentcyMap[row.clearanceFreightCurrency] }} / {{ unitMap[row.clearanceFreightVolume] }}</div>
<el-table-column :label="$t('中文品名')" align="center" prop="prodTitleZh" /> <div v-else>{{ $t("清关费未报价") }}</div>
<el-table-column :label="$t('英文品名')" align="center" prop="prodTitleEn" /> </template>
<el-table-column :label="$t('品牌')" width="100px"> </template>
<template slot-scope="scope"> </el-table-column>
<dict-tag :value="scope.row.brand" :type="DICT_TYPE.ECW_IS_BRAND" defaultable /> </el-table>
</template> </div>
</el-table-column> </el-card>
<el-table-column :label="$t('件数')" width="90px" prop="num" /> <el-card class="card">
<el-table-column :label="$t('包装单位')"> <div slot="header" class="card-title">{{ $t("费用小计") }}</div>
<template slot-scope="scope"> <el-descriptions border class="card" :column="5">
<dict-tag :value="scope.row.unit" :type="DICT_TYPE.ECW_PACKAGING_TYPE" defaultable /> <el-descriptions-item :label="$t('总件数') + ':'">
</template> {{ list.estCostVO ? list.estCostVO.totalNum || "0" : 0 }}
</el-table-column> </el-descriptions-item>
<!-- <el-table-column :label="$t('箱规') + '(m)'" width="120px" prop="boxGauge" /> --> <el-descriptions-item :label="$t('总体积') + ':'">
<el-table-column :label="$t('体积') + '(m³)'" width="100px" prop="volume" /> {{ list.estCostVO ? list.estCostVO.totalVolume + "m³" || "0" : 0 }}
<el-table-column :label="$t('数量')" width="100px" prop="quantity" /> </el-descriptions-item>
<el-table-column :label="$t('重量') + '(kg)'" width="100px" prop="weight" /> <el-descriptions-item :label="$t('总重量') + ':'">
<el-table-column :label="$t('货值') + '(RMB)'" width="100px" prop="worth" /> {{ list.estCostVO ? list.estCostVO.totalWeight + "kg" || "0" : 0 }}
<el-table-column :label="$t('商品特性')" width="200px" prop="prodAttrName" /> </el-descriptions-item>
<el-table-column :label="$t('是否预付')"> <el-descriptions-item :label="$t('总数量') + ':'">
<template slot-scope="scope"> {{ list.estCostVO ? list.estCostVO.totalQuantity || "0" : 0 }}
{{scope.row.isPayAdvance==1?$t('预付'):$t('到付')}} </el-descriptions-item>
</template> <el-descriptions-item :label="$t('总货值(RMB)') + ':'">
</el-table-column> {{ list.estCostVO ? list.estCostVO.totalWorth || "0" : 0 }}
</el-descriptions-item>
<el-table-column :label="$t('成交价')" width="200px"> <!-- <el-descriptions-item :label="报价费:">
<template slot-scope="{row}">
<template v-if="row.charging ==1">
<template v-if="!row.oneSeaFreight">{{ $t('未报价') }}</template>
<template>{{$t('全包价')}} {{row.oneSeaFreight}} {{currentcyMap[row.seaFreightCurrency]}} / {{unitMap[row.seaFreightVolume]}}</template>
</template>
<template v-else-if="!row.oneSeaFreight && !row.oneClearanceFreight">{{ $t('未报价') }}</template>
<template v-else>
<div>
{{$t('运费')}}{{row.oneSeaFreight}} {{currentcyMap[row.seaFreightCurrency]}} / {{unitMap[row.seaFreightVolume]}}
</div>
<div v-if="row.oneClearanceFreight">
{{$t('清关费')}}{{row.oneClearanceFreight}} {{currentcyMap[row.clearanceFreightCurrency]}} / {{unitMap[row.clearanceFreightVolume]}}
</div>
<div v-else>{{$t('清关费未报价')}}</div>
</template>
</template>
</el-table-column>
</el-table>
</div>
</el-card>
<el-card class="card">
<div slot="header" class="card-title">{{$t('费用小计')}}</div>
<el-descriptions border class="card" :column="5">
<el-descriptions-item :label="$t('总件数')+':'">
{{list.estCostVO?list.estCostVO.totalNum||'0':0}}
</el-descriptions-item>
<el-descriptions-item :label="$t('总体积')+':'">
{{list.estCostVO?(list.estCostVO.totalVolume+'m³')||'0':0}}
</el-descriptions-item>
<el-descriptions-item :label="$t('总重量')+':'">
{{list.estCostVO?(list.estCostVO.totalWeight+'kg')||'0':0}}
</el-descriptions-item>
<el-descriptions-item :label="$t('总数量')+':'">
{{list.estCostVO?list.estCostVO.totalQuantity||'0':0}}
</el-descriptions-item>
<el-descriptions-item :label="$t('总货值(RMB)')+':'">
{{list.estCostVO?list.estCostVO.totalWorth||'0':0}}
</el-descriptions-item>
<!-- <el-descriptions-item :label="报价费:">
{{list.estCostVO?list.estCostVO.insuranceFee||'0':0}} {{list.estCostVO?list.estCostVO.insuranceFee||'0':0}}
</el-descriptions-item> --> </el-descriptions-item> -->
</el-descriptions> </el-descriptions>
<!-- <el-descriptions border class="card"> <!-- <el-descriptions border class="card">
<el-descriptions-item :label="佣金类型" :span="2" class="card"> <el-descriptions-item :label="佣金类型" :span="2" class="card">
<dict-selector :type="DICT_TYPE.COMMISSION_TYPE" form-type="radio" fomtter="number" :value="list.commissionType" defaultable /> <dict-selector :type="DICT_TYPE.COMMISSION_TYPE" form-type="radio" fomtter="number" :value="list.commissionType" defaultable />
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> --> </el-descriptions> -->
</el-card> </el-card>
<el-card class="mt-10"> <el-card class="mt-10">
<div class="card-title" slot="header">{{$t('预计费用')}}</div> <div class="card-title" slot="header">{{ $t("预计费用") }}</div>
<el-descriptions :column="5" border>
<el-descriptions-item :label="$t('保价费')">
{{list.estCostVO?list.estCostVO.insuranceFee: 0}} {{ selectedRouter ? currentcyMap[selectedRouter.currencyUnit || 1] : '' }}
</el-descriptions-item>
<el-descriptions-item :label="$t('总运费')">
<template v-if="freightFeeList.length>0" v-for="item in freightFeeList">
<div :key="item.currencyId">{{item.amount || 0}}{{currentcyMap[item.currencyId]}}</div>
</template>
</el-descriptions-item>
<template v-if="freightFeeList.length==0">
0
</template>
<!--代收货款,只有非控货订单、并且线路开通了代收货款后,才显示是否代收货款选项-->
<el-descriptions-item :label="$t('总清关费')">
<template v-if="clearanceFeeList.length>0" v-for="item in clearanceFeeList">
<div :key="item.currencyId">{{item.amount || 0}}{{currentcyMap[item.currencyId]}}</div>
</template>
<template v-if="clearanceFeeList.length==0">
0
</template>
</el-descriptions-item>
<el-descriptions-item :label="$t('其他费用')">
<template v-if="otherFeeList.length>0" v-for="item in otherFeeList">
<div :key="item.currencyId">{{item.amount || 0}}{{currentcyMap[item.currencyId]}}</div>
</template>
<template v-if="otherFeeList.length==0">
0
</template>
</el-descriptions-item>
<el-descriptions-item :label="$t('原价')" :span="2">
<template v-if="originalFeeList.length>0" v-for="item in originalFeeList">
<div :key="item.currencyId">{{item.amount || 0}}{{currentcyMap[item.currencyId]}}</div>
</template>
<template v-if="originalFeeList.length==0">
0
</template>
</el-descriptions-item>
</el-descriptions>
<div class="card-title" style="padding:20px 0;">{{$t('优惠信息')}}</div>
<el-table :data="couponList" :show-header="false">
<el-table-column label="">
<template slot-scope="scope">
{{scope.$index+1}}.
{{getProductName(scope.row.prodId)}}
</template>
</el-table-column>
<el-table-column label="">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.ECW_COUPON_TYPE" :value="row.type" />
</template>
</el-table-column>
<el-table-column label="">
<template slot-scope="{row}">
{{$l(row, 'title')}}
</template>
</el-table-column>
<el-table-column label="">
<template slot-scope="{row}">
-{{row.reduceAmount}}
{{currentcyMap[row.reduceCurrencyId]}}
</template>
</el-table-column>
<el-table-column label="">
<template slot-scope="{row}">
{{$t('有效期至')}}{{row.endTime ? row.endTime : $t('永久有效')}}
</template>
</el-table-column>
</el-table>
<el-descriptions :column="1" class="mt-20"> <el-descriptions :column="5" border>
<el-descriptions-item :label="$t('优惠费用')" v-if="couponTotalAmountList && couponTotalAmountList.length>0"> <el-descriptions-item :label="$t('保价费')"> {{ list.estCostVO ? list.estCostVO.insuranceFee : 0 }} {{ selectedRouter ? currentcyMap[selectedRouter.currencyUnit || 1] : "" }} </el-descriptions-item>
<div v-for="(item, discountIndex) in couponTotalAmountList" :key="discountIndex"> <el-descriptions-item :label="$t('总运费')">
{{item.totalAmount}} {{currentcyMap[item.currencyId]}} <template v-if="freightFeeList.length > 0" v-for="item in freightFeeList">
</div> <div :key="item.currencyId">{{ item.amount || 0 }}{{ currentcyMap[item.currencyId] }}</div>
</el-descriptions-item> </template>
<el-descriptions-item :label="$t('预计费用')"> </el-descriptions-item>
<template > <template v-if="freightFeeList.length == 0"> 0 </template>
<div style="display:flex;flex-direction:column"> <!--代收货款,只有非控货订单、并且线路开通了代收货款后,才显示是否代收货款选项-->
<div v-for="item in estimatedCosts" :key="item.currencyId"> <el-descriptions-item :label="$t('总清关费')">
<span>{{item.amount || 0}}{{currentcyMap[item.currencyId]}}</span> <template v-if="clearanceFeeList.length > 0" v-for="item in clearanceFeeList">
</div> <div :key="item.currencyId">{{ item.amount || 0 }}{{ currentcyMap[item.currencyId] }}</div>
</div> </template>
</template> <template v-if="clearanceFeeList.length == 0"> 0 </template>
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> <el-descriptions-item :label="$t('其他费用')">
</el-card> <template v-if="otherFeeList.length > 0" v-for="item in otherFeeList">
<el-card class="card"> <div :key="item.currencyId">{{ item.amount || 0 }}{{ currentcyMap[item.currencyId] }}</div>
<div slot="header" class="card-title">{{$t('通用信息')}}</div> </template>
<el-descriptions :column="4"> <template v-if="otherFeeList.length == 0"> 0 </template>
<el-descriptions-item :label="$t('唛头')"> </el-descriptions-item>
{{list.marks||'/'}} <el-descriptions-item :label="$t('原价')" :span="2">
</el-descriptions-item> <template v-if="originalFeeList.length > 0" v-for="item in originalFeeList">
<el-descriptions-item :label="$t('报关方式')"> <div :key="item.currencyId">{{ item.amount || 0 }}{{ currentcyMap[item.currencyId] }}</div>
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="list.customsType"></dict-tag> </template>
</el-descriptions-item> <template v-if="originalFeeList.length == 0"> 0 </template>
</el-descriptions> </el-descriptions-item>
<el-descriptions :column="4"> </el-descriptions>
<el-descriptions-item :label="$t('预计结束时间')">
{{list.stopTime||'/'}}
</el-descriptions-item>
<el-descriptions-item :label="$t('控货')">
{{list.control?$t('是'):$t('否')}}
</el-descriptions-item>
<el-descriptions-item :label="$t('竞争对手')">
{{list.competitor||'/'}}
</el-descriptions-item>
<el-descriptions-item :label="$t('重要程度')">
<el-rate v-model="list.importance" disabled></el-rate>
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="4">
<el-descriptions-item :label="$t('价格有效期')">
{{list.startTime+$t('至')}}{{list.endTime}}
</el-descriptions-item>
<el-descriptions-item :label="$t('交货方式')">
<dict-tag :type="DICT_TYPE.ECW_TRADE_TYPE" :value="list.tradeType"></dict-tag>
<span style="margin-left: 10px;">{{list.tradeAdress}}</span>
</el-descriptions-item>
</el-descriptions>
<el-descriptions >
<el-descriptions-item :label="$t('备注')">
{{list.remarks||'/'}}
</el-descriptions-item>
</el-descriptions>
</el-card>
<el-card class="card" v-if='list.transportVO'>
<div slot="header" class="card-title">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="list.transportId"></dict-tag>
</div>
<div class="line">
<el-descriptions>
<el-descriptions-item :label="[3,4].indexOf(list.transportId)>-1?$t('空运路线'):$t('海运路线')">
{{getRouterNameById(list.lineId)||'/'}}
</el-descriptions-item>
</el-descriptions>
<el-descriptions v-if="[3,4].indexOf(list.transportId) > -1">
<el-descriptions-item :label="$t('出货渠道')">
{{channelName||'/'}}
</el-descriptions-item>
</el-descriptions>
</div>
<el-descriptions class="card" v-if="[2,3,4].indexOf(list.transportId) > -1">
<el-descriptions-item :label="$t('是否双清')">
<dict-tag :type="DICT_TYPE.ECW_DOUBLE_CLEAR" :value="list.transportVO.doubleClear"></dict-tag>
</el-descriptions-item>
</el-descriptions>
<el-descriptions v-if="[3,4].indexOf(list.transportId) > -1">
<el-descriptions-item :label="$t('航空公司')">
{{airlineCompany ? $l(airlineCompany, 'company') : '/'}}
</el-descriptions-item>
</el-descriptions>
<el-descriptions v-if="list.transportId==2">
<el-descriptions-item :label="$t('船公司')">
{{shippingCompany ? $l(shippingCompany, 'company') : '/'}}
</el-descriptions-item>
</el-descriptions>
<el-descriptions v-if="[2,3,4].indexOf(list.transportId) > -1">
<el-descriptions-item :label="$t('清关证书')">
<dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="list.transportVO.customsClearCert"></dict-tag>
</el-descriptions-item>
</el-descriptions>
<el-descriptions v-if="[2,3,4].indexOf(list.transportId) > -1">
<el-descriptions-item :label="$t('清关证书备注')">
{{list.transportVO.remarks||'/'}}
</el-descriptions-item>
</el-descriptions>
<el-descriptions class="card" v-if="[3,4].indexOf(list.transportId) > -1">
<el-descriptions-item :label="$t('是否拆包')">
<dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="list.transportVO.isUnpack"></dict-tag>
</el-descriptions-item>
</el-descriptions>
<el-descriptions v-if="[3,4].indexOf(list.transportId) > -1">
<el-descriptions-item :label="$t('单票立刻转运')">
<dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="list.transportVO.isSingleTicketTransport"></dict-tag>
<span style="margin-left:10px;color: #0000FF;">{{$t('注:若只有一件,货到仓库立即发,选“是”,多件需仓库集运待发,选“否”')}}</span> <div class="card-title" style="padding: 20px 0">{{ $t("优惠信息") }}</div>
</el-descriptions-item> <el-table :data="couponList" :show-header="false">
<el-table-column label="">
<template slot-scope="scope">
{{ scope.$index + 1 }}.
{{ getProductName(scope.row.prodId) }}
</template>
</el-table-column>
<el-table-column label="">
<template slot-scope="{ row }">
<dict-tag :type="DICT_TYPE.ECW_COUPON_TYPE" :value="row.type" />
</template>
</el-table-column>
<el-table-column label="">
<template slot-scope="{ row }">
{{ $l(row, "title") }}
</template>
</el-table-column>
<el-table-column label="">
<template slot-scope="{ row }">
-{{ row.reduceAmount }}
{{ currentcyMap[row.reduceCurrencyId] }}
</template>
</el-table-column>
<el-table-column label="">
<template slot-scope="{ row }"> {{ $t("有效期至") }}{{ row.endTime ? row.endTime : $t("永久有效") }} </template>
</el-table-column>
</el-table>
</el-descriptions> <el-descriptions :column="1" class="mt-20">
<el-descriptions> <el-descriptions-item :label="$t('优惠费用')" v-if="couponTotalAmountList && couponTotalAmountList.length > 0">
<el-descriptions-item :label="$t('特殊要求')"> <div v-for="(item, discountIndex) in couponTotalAmountList" :key="discountIndex">{{ item.totalAmount }} {{ currentcyMap[item.currencyId] }}</div>
<dict-selector form-type="checkbox" :type="DICT_TYPE.ORDER_SPECIAL_NEEDS" multiple v-model="list.transportVO.packageType" :disabled="true" /> </el-descriptions-item>
</el-descriptions-item> <el-descriptions-item :label="$t('预计费用')">
</el-descriptions> <template>
<el-descriptions> <div style="display: flex; flex-direction: column">
<el-descriptions-item :label="$t('特殊要求备注')"> <div v-for="item in estimatedCosts" :key="item.currencyId">
{{list.transportVO.packageRemarks||'/'}} <span>{{ item.amount || 0 }}{{ currentcyMap[item.currencyId] }}</span>
</el-descriptions-item> </div>
</el-descriptions> </div>
</el-card> </template>
</el-descriptions-item>
</el-descriptions>
</el-card>
<el-card class="card">
<div slot="header" class="card-title">{{ $t("通用信息") }}</div>
<el-descriptions :column="4">
<el-descriptions-item :label="$t('唛头')">
{{ list.marks || "/" }}
</el-descriptions-item>
<el-descriptions-item :label="$t('报关方式')">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="list.customsType"></dict-tag>
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="4">
<el-descriptions-item :label="$t('预计结束时间')">
{{ list.stopTime || "/" }}
</el-descriptions-item>
<el-descriptions-item :label="$t('控货')">
{{ list.control ? $t("是") : $t("否") }}
</el-descriptions-item>
<el-descriptions-item :label="$t('竞争对手')">
{{ list.competitor || "/" }}
</el-descriptions-item>
<el-descriptions-item :label="$t('重要程度')">
<el-rate v-model="list.importance" disabled></el-rate>
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="4">
<el-descriptions-item :label="$t('价格有效期')"> {{ list.startTime + $t("至") }}{{ list.endTime }} </el-descriptions-item>
<el-descriptions-item :label="$t('交货方式')">
<dict-tag :type="DICT_TYPE.ECW_TRADE_TYPE" :value="list.tradeType"></dict-tag>
<span style="margin-left: 10px">{{ list.tradeAdress }}</span>
</el-descriptions-item>
</el-descriptions>
<el-descriptions>
<el-descriptions-item :label="$t('备注')">
{{ list.remarks || "/" }}
</el-descriptions-item>
</el-descriptions>
</el-card>
<el-card class="card" v-if="list.transportVO">
<div slot="header" class="card-title">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="list.transportId"></dict-tag>
</div>
<div class="line">
<el-descriptions>
<el-descriptions-item :label="[3, 4].indexOf(list.transportId) > -1 ? $t('空运路线') : $t('海运路线')">
{{ getRouterNameById(list.lineId) || "/" }}
</el-descriptions-item>
</el-descriptions>
<el-descriptions v-if="[3, 4].indexOf(list.transportId) > -1">
<el-descriptions-item :label="$t('出货渠道')">
{{ channelName || "/" }}
</el-descriptions-item>
</el-descriptions>
</div>
<el-descriptions class="card" v-if="[2, 3, 4].indexOf(list.transportId) > -1">
<el-descriptions-item :label="$t('是否双清')">
<dict-tag :type="DICT_TYPE.ECW_DOUBLE_CLEAR" :value="list.transportVO.doubleClear"></dict-tag>
</el-descriptions-item>
</el-descriptions>
<el-descriptions v-if="[3, 4].indexOf(list.transportId) > -1">
<el-descriptions-item :label="$t('航空公司')">
{{ airlineCompany ? $l(airlineCompany, "company") : "/" }}
</el-descriptions-item>
</el-descriptions>
<el-descriptions v-if="list.transportId == 2">
<el-descriptions-item :label="$t('船公司')">
{{ shippingCompany ? $l(shippingCompany, "company") : "/" }}
</el-descriptions-item>
</el-descriptions>
<el-descriptions v-if="[2, 3, 4].indexOf(list.transportId) > -1">
<el-descriptions-item :label="$t('清关证书')">
<dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="list.transportVO.customsClearCert"></dict-tag>
</el-descriptions-item>
</el-descriptions>
<el-descriptions v-if="[2, 3, 4].indexOf(list.transportId) > -1">
<el-descriptions-item :label="$t('清关证书备注')">
{{ list.transportVO.remarks || "/" }}
</el-descriptions-item>
</el-descriptions>
<el-descriptions class="card" v-if="[3, 4].indexOf(list.transportId) > -1">
<el-descriptions-item :label="$t('是否拆包')">
<dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="list.transportVO.isUnpack"></dict-tag>
</el-descriptions-item>
</el-descriptions>
<el-descriptions v-if="[3, 4].indexOf(list.transportId) > -1">
<el-descriptions-item :label="$t('单票立刻转运')">
<dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="list.transportVO.isSingleTicketTransport"></dict-tag>
<span style="margin-left: 10px; color: #0000ff">{{ $t("注:若只有一件,货到仓库立即发,选“是”,多件需仓库集运待发,选“否”") }}</span>
</el-descriptions-item>
</el-descriptions>
<el-descriptions>
<el-descriptions-item :label="$t('特殊要求')">
<dict-selector form-type="checkbox" :type="DICT_TYPE.ORDER_SPECIAL_NEEDS" multiple v-model="list.transportVO.packageType" :disabled="true" />
</el-descriptions-item>
</el-descriptions>
<el-descriptions>
<el-descriptions-item :label="$t('特殊要求备注')">
{{ list.transportVO.packageRemarks || "/" }}
</el-descriptions-item>
</el-descriptions>
</el-card>
<customer-follow ref="customerFollow" v-if="customerFollowVisible" :customerService="curData.salesmanId" :customerNumber="curData.customerNumber" :offerId="offerId" />
</div> </div>
</template> </template>
<script> <script>
import {DICT_TYPE,getDictDatas} from '@/utils/dict' import { DICT_TYPE, getDictDatas } from "@/utils/dict"
import {getOffer,deleteOffer} from '@/api/ecw/offer' import { getOffer, deleteOffer } from "@/api/ecw/offer"
import {getProductAttrList} from '@/api/ecw/productAttr' import { getProductAttrList } from "@/api/ecw/productAttr"
import {getCustomerList,getCustomer} from '@/api/ecw/customer' import { getCustomerList, getCustomer } from "@/api/ecw/customer"
import {getChannelList,getChannel} from '@/api/ecw/channel' import { getChannelList, getChannel } from "@/api/ecw/channel"
import {getTradeCityList} from '@/api/ecw/region' import { getTradeCityList } from "@/api/ecw/region"
import {getUnitList} from '@/api/ecw/unit' import { getUnitList } from "@/api/ecw/unit"
import { getOrder } from '@/api/ecw/order' import { getOrder } from "@/api/ecw/order"
import {getCurrencyList} from '@/api/ecw/currency' import { getCurrencyList } from "@/api/ecw/currency"
import {getCustomerContactsSelect} from '@/api/ecw/customerContacts' import { getCustomerContactsSelect } from "@/api/ecw/customerContacts"
import {openedRouterList as getOpenedRouterList} from '@/api/ecw/warehouse' import { openedRouterList as getOpenedRouterList } from "@/api/ecw/warehouse"
import {calculationPrice} from '@/api/ecw/product' import { calculationPrice } from "@/api/ecw/product"
import {getSupplier, getSupplierPage} from '@/api/ecw/supplier' import { getSupplier, getSupplierPage } from "@/api/ecw/supplier"
import Decimal from 'decimal.js' import Decimal from "decimal.js"
window.Decimal= Decimal window.Decimal = Decimal
export default { import CustomerFollow from "@/views/ecw/customer/components/customerFollow"
name: "detail", export default {
data() { name: "detail",
return { components: { CustomerFollow },
// 遮罩层 data() {
loading: false, return {
list: [], customerFollowVisible: false,
types:'package,bag', // 遮罩层
importance:1, loading: false,
productAttrList:[], list: [],
offerId:0, types: "package,bag",
//发货/收货人信息 importance: 1,
consigneeData:{}, productAttrList: [],
routerList:[], offerId: 0,
fee:{}, //发货/收货人信息
channelName:'/', consigneeData: {},
tradeCityList:[], routerList: [],
productNames: {}, fee: {},
currencyList:[], channelName: "/",
unitList:[], tradeCityList: [],
orderData:[], productNames: {},
consignorData:{}, currencyList: [],
customerSource: getDictDatas(DICT_TYPE.CUSTOMER_SOURCE), unitList: [],
couponAvailableGroupDtoList: [], // 可用优惠 orderData: [],
couponTotalAmountList: [], // 优惠总额 consignorData: {},
// 航空公司 customerSource: getDictDatas(DICT_TYPE.CUSTOMER_SOURCE),
airlineCompany: null, couponAvailableGroupDtoList: [], // 可用优惠
// 船公司 couponTotalAmountList: [], // 优惠总额
shippingCompany: null, // 航空公司
}; airlineCompany: null,
// 船公司
shippingCompany: null,
curData: {}
}
},
computed: {
// 根据id获取商品名称(显示优惠列表的时候用)
getProductName() {
return (prodId) => {
if (!this.list) return this.$t("未知")
let row = this.list.offerProdRespVOList.find((item) => item.prodId == prodId)
if (!row) return this.$t("未知")
return this.$l(row, "prodTitle")
}
}, },
computed:{ selectedRouter() {
// 根据id获取商品名称(显示优惠列表的时候用) // otherService 1 送货上门,2非控货订单代收货款
getProductName(){ if (!this.list.lineId) return null
return prodId => { return this.routerList.find((item) => item.id == this.list.lineId)
if(!this.list) return this.$t('未知')
let row = this.list.offerProdRespVOList.find(item => item.prodId == prodId)
if(!row) return this.$t('未知')
return this.$l(row, 'prodTitle')
}
},
selectedRouter(){
// otherService 1 送货上门,2非控货订单代收货款
if(!this.list.lineId) return null
return this.routerList.find(item => item.id == this.list.lineId)
},
currentcyMap(){
let map = {}
this.currencyList.forEach(item => {
map[item.id] = this.$i18n.locale=='zh_CN'?item.titleZh:item.titleEn
})
return map
},
unitMap(){
let map = {}
this.unitList.forEach(item => {
map[item.id] = this.$i18n.locale=='zh_CN'?item.titleZh:item.titleEn
})
return map
},
// 总有优惠金额
// 总有优惠金额
// 总有优惠金额
couponList(){
let arr = []
this.couponAvailableGroupDtoList.forEach(item => {
if(item.couponAvailableDtoList && item.couponAvailableDtoList.length){
// 只取第一个
let it = item.couponAvailableDtoList[0]
arr.push({
prodId: item.prodId,
type: it.type,
titleZh: it.titleZh,
titleEn: it.titleEn,
endTime: it.endTime,
reduceAmount: it.reduceAmount,
reduceCurrencyId: it.reduceCurrencyId
})
}
})
return arr
}, },
// 计算返回的费用清单 currentcyMap() {
feeDtoList(){ let map = {}
if(this.list&&this.list.estCostVO){ this.currencyList.forEach((item) => {
return this.list.estCostVO.feeDtoList || [] map[item.id] = this.$i18n.locale == "zh_CN" ? item.titleZh : item.titleEn
}else{ })
return [] return map
} },
}, unitMap() {
// 清关费 let map = {}
clearanceFeeList(){ this.unitList.forEach((item) => {
return this.feeDtoList.filter(item => item.feeType == 2) map[item.id] = this.$i18n.locale == "zh_CN" ? item.titleZh : item.titleEn
}, })
// 运费 return map
freightFeeList(){ },
return this.feeDtoList.filter(item => item.feeType == 1) // 总有优惠金额
}, // 总有优惠金额
// 其他费用 // 总有优惠金额
otherFeeList(){ couponList() {
return this.feeDtoList.filter(item => item.feeType == 3) let arr = []
}, this.couponAvailableGroupDtoList.forEach((item) => {
// 原价(清关费 + 运费) if (item.couponAvailableDtoList && item.couponAvailableDtoList.length) {
originalFeeList(){ // 只取第一个
let arr = [] let it = item.couponAvailableDtoList[0]
this.clearanceFeeList.forEach(item => { arr.push({
let it = { prodId: item.prodId,
src: this.$t('清关费'), type: it.type,
currencyId: item.currencyId, titleZh: it.titleZh,
amount: Decimal(item.amount) titleEn: it.titleEn,
} endTime: it.endTime,
let freight = this.freightFeeList.find(fee => fee.currencyId == item.currencyId) reduceAmount: it.reduceAmount,
if(freight){ reduceCurrencyId: it.reduceCurrencyId
it.amount = it.amount.plus(freight.amount)
}
arr.push(it)
})
// 判断是否有运费单位不在清关费里的
this.freightFeeList.forEach(item => {
if(!arr.find(arrItem => arrItem.currencyId == item.currencyId)){
arr.push({
src: this.$t('未计算的运费'),
currencyId: item.currencyId,
amount: Decimal(item.amount)
})
}
})
return arr
},
// 预计费用(原价 - 优惠金额)
estimatedCosts(){
let arr = []
this.originalFeeList.forEach(item => {
let it = {
currencyId: item.currencyId,
amount: Decimal(item.amount)
}
let coupon = this.couponList.find(coupon => coupon.reduceCurrencyId == item.currencyId)
if(coupon){
it.amount = it.amount.minus(coupon.reduceAmount)
}
arr.push(it)
}) })
// 累加保价费 }
const insuranceFeeIndex = arr.findIndex(item => item.currencyId == this.insuranceFeeCurrency) })
const insuranceFee = this.list&&this.list.estCostVO&&this.list.estCostVO.insuranceFee return arr
if(insuranceFeeIndex > -1){
arr[insuranceFeeIndex].amount = arr[insuranceFeeIndex].amount.plus(insuranceFee || 0)
}else{
arr.push({
currencyId: this.insuranceFeeCurrency,
amount: Decimal(insuranceFee || 0)
})
}
// 累加其他费用
const otherFeeIndex = arr.findIndex(item => item.currencyId == this.list.otherFeeCurrencyId)
if(otherFeeIndex > -1){
arr[otherFeeIndex].amount = arr[otherFeeIndex].amount.plus(this.list.otherFee || 0)
}else{
if(this.list.otherFee>0){
arr.push({
currencyId: this.list.otherFeeCurrencyId,
amount: Decimal(this.list.otherFee || 0)
})
}
}
return arr
},
// 保价费单位(路线里设置,默认美元)
insuranceFeeCurrency() {
return this.selectedRouter?.currencyUnit || 1;
},
}, },
created() { // 计算返回的费用清单
getCurrencyList().then(res => this.currencyList = res.data) feeDtoList() {
getUnitList().then(res => this.unitList = res.data) if (this.list && this.list.estCostVO) {
getTradeCityList().then(res => this.tradeCityList = res.data) return this.list.estCostVO.feeDtoList || []
getProductAttrList().then(res => this.productAttrList = res.data) } else {
if(this.$route.query.offerId){ return []
this.offerId = this.$route.query.offerId
this.getList();
} }
}, },
methods: { // 清关费
sourceLabel(data){ clearanceFeeList() {
let label='' return this.feeDtoList.filter((item) => item.feeType == 2)
var source = this.customerSource.find(item=>item.value==data) },
if(source) label = this.$i18n.locale=='zh_CN'?source.label:source.labelEn // 运费
return label freightFeeList() {
}, return this.feeDtoList.filter((item) => item.feeType == 1)
checkCode(data){ },
if(!data){ // 其他费用
return '' otherFeeList() {
return this.feeDtoList.filter((item) => item.feeType == 3)
},
// 原价(清关费 + 运费)
originalFeeList() {
let arr = []
this.clearanceFeeList.forEach((item) => {
let it = {
src: this.$t("清关费"),
currencyId: item.currencyId,
amount: Decimal(item.amount)
} }
if(data.indexOf('+')==-1){ let freight = this.freightFeeList.find((fee) => fee.currencyId == item.currencyId)
return '+'+data if (freight) {
it.amount = it.amount.plus(freight.amount)
} }
return data arr.push(it)
}, })
getOrderData(id) { // 判断是否有运费单位不在清关费里的
let that = this this.freightFeeList.forEach((item) => {
that.loading = true; if (!arr.find((arrItem) => arrItem.currencyId == item.currencyId)) {
// 执行查询 arr.push({
getOrder(id).then(response => { src: this.$t("未计算的运费"),
that.orderData = response.data; currencyId: item.currencyId,
}); amount: Decimal(item.amount)
},
getProductListWithDefaultValue(){
let arr = []
this.list.offerProdRespVOList.forEach(item => {
let tmp = {
"brand":item.brand,
"unit":item.unit,
"prodId":item.prodId,
"num":item.num,
"quantity":item.quantity,
"volume":item.volume,
"weight":item.weight,
"worth":item.worth,
"brandType":item.brandType||0,
"prodAttrIds":item.prodAttrIds
}
arr.push(tmp)
}) })
return arr }
}, })
// 计算商品运费 return arr
calculationPrice(){ },
calculationPrice({ // 预计费用(原价 - 优惠金额)
lineId: this.list.lineId, estimatedCosts() {
transportId: this.list.transportId, let arr = []
channelId: this.list.channelId, this.originalFeeList.forEach((item) => {
prodConditionParamList: this.getProductListWithDefaultValue(), let it = {
consigneeCustomerContactsId: this.list.consigneeCustomerContactsId, currencyId: item.currencyId,
consignorCustomerContactsId: this.list.consignorCustomerContactsId, amount: Decimal(item.amount)
customsType: this.list.customsType, }
isCargoControl: this.list.control, let coupon = this.couponList.find((coupon) => coupon.reduceCurrencyId == item.currencyId)
orderType: this.list.orderType, if (coupon) {
}).then(res => { it.amount = it.amount.minus(coupon.reduceAmount)
this.$set(this, 'fee', res.data.costDto) }
if(res.data.availableDto){ arr.push(it)
this.$set(this, 'couponTotalAmountList', res.data.availableDto.couponTotalAmountList) })
this.$set(this, 'couponAvailableGroupDtoList', res.data.availableDto.couponAvailableGroupDtoList) // 累加保价费
} const insuranceFeeIndex = arr.findIndex((item) => item.currencyId == this.insuranceFeeCurrency)
}).finally(() => { const insuranceFee = this.list && this.list.estCostVO && this.list.estCostVO.insuranceFee
this.calculating = false if (insuranceFeeIndex > -1) {
arr[insuranceFeeIndex].amount = arr[insuranceFeeIndex].amount.plus(insuranceFee || 0)
} else {
arr.push({
currencyId: this.insuranceFeeCurrency,
amount: Decimal(insuranceFee || 0)
})
}
// 累加其他费用
const otherFeeIndex = arr.findIndex((item) => item.currencyId == this.list.otherFeeCurrencyId)
if (otherFeeIndex > -1) {
arr[otherFeeIndex].amount = arr[otherFeeIndex].amount.plus(this.list.otherFee || 0)
} else {
if (this.list.otherFee > 0) {
arr.push({
currencyId: this.list.otherFeeCurrencyId,
amount: Decimal(this.list.otherFee || 0)
}) })
}, }
/** 查询列表 */ }
getList() { return arr
let that = this },
that.loading = true; // 保价费单位(路线里设置,默认美元)
// 执行查询 insuranceFeeCurrency() {
getOffer(that.offerId).then(response => { return this.selectedRouter?.currencyUnit || 1
that.list = response.data; }
if(that.list.channelId){ },
that.getChannelData() created() {
getCurrencyList().then((res) => (this.currencyList = res.data))
getUnitList().then((res) => (this.unitList = res.data))
getTradeCityList().then((res) => (this.tradeCityList = res.data))
getProductAttrList().then((res) => (this.productAttrList = res.data))
if (this.$route.query.offerId) {
this.offerId = this.$route.query.offerId
this.getList()
}
},
methods: {
handleAddOffer(row) {
console.log(row)
this.curData = row
this.customerFollowVisible = true
this.$nextTick(() => {
this.$refs["customerFollow"].handleAdd()
})
},
sourceLabel(data) {
let label = ""
var source = this.customerSource.find((item) => item.value == data)
if (source) label = this.$i18n.locale == "zh_CN" ? source.label : source.labelEn
return label
},
checkCode(data) {
if (!data) {
return ""
}
if (data.indexOf("+") == -1) {
return "+" + data
}
return data
},
getOrderData(id) {
let that = this
that.loading = true
// 执行查询
getOrder(id).then((response) => {
that.orderData = response.data
})
},
getProductListWithDefaultValue() {
let arr = []
this.list.offerProdRespVOList.forEach((item) => {
let tmp = {
brand: item.brand,
unit: item.unit,
prodId: item.prodId,
num: item.num,
quantity: item.quantity,
volume: item.volume,
weight: item.weight,
worth: item.worth,
brandType: item.brandType || 0,
prodAttrIds: item.prodAttrIds
}
arr.push(tmp)
})
return arr
},
// 计算商品运费
calculationPrice() {
calculationPrice({
lineId: this.list.lineId,
transportId: this.list.transportId,
channelId: this.list.channelId,
prodConditionParamList: this.getProductListWithDefaultValue(),
consigneeCustomerContactsId: this.list.consigneeCustomerContactsId,
consignorCustomerContactsId: this.list.consignorCustomerContactsId,
customsType: this.list.customsType,
isCargoControl: this.list.control,
orderType: this.list.orderType
})
.then((res) => {
this.$set(this, "fee", res.data.costDto)
if (res.data.availableDto) {
this.$set(this, "couponTotalAmountList", res.data.availableDto.couponTotalAmountList)
this.$set(this, "couponAvailableGroupDtoList", res.data.availableDto.couponAvailableGroupDtoList)
} }
that.calculationPrice() })
// if(that.list.orderId){ .finally(() => {
// that.getOrderData(that.list.orderId) this.calculating = false
// } })
getCustomerContactsSelect({ids: [that.list.consignorId, that.list.consigneeId].join(',')}).then((res) => { },
let consignor = res.data.list.find(item => item.customerContactsId == that.list.consignorId) /** 查询列表 */
if(consignor) that.consignorData=consignor getList() {
let consignee = res.data.list.find(item => item.customerContactsId == that.list.consigneeId) let that = this
if(consignee) that.consigneeData=consignee that.loading = true
that.getCnsigneeData() // 执行查询
}) getOffer(that.offerId).then((response) => {
that.list.offerProdRespVOList.forEach((item)=>{ that.list = response.data
var arr = item.prodAttrIds.split(',') if (that.list.channelId) {
var prodAttrName = [] that.getChannelData()
arr.forEach((itemValue)=>{ }
var prodAttrCenter = this.productAttrList.filter(items=>items.id==itemValue) that.calculationPrice()
if(prodAttrCenter.length>0){ // if(that.list.orderId){
prodAttrName.push(this.$i18n.locale=='zh_CN'?prodAttrCenter[0].attrName:prodAttrCenter[0].attrNameEn) // that.getOrderData(that.list.orderId)
} // }
}) getCustomerContactsSelect({ ids: [that.list.consignorId, that.list.consigneeId].join(",") }).then((res) => {
if(prodAttrName.length>1){ let consignor = res.data.list.find((item) => item.customerContactsId == that.list.consignorId)
item.prodAttrName = prodAttrName.join(',') if (consignor) that.consignorData = consignor
}else if(prodAttrName.length==1){ let consignee = res.data.list.find((item) => item.customerContactsId == that.list.consigneeId)
item.prodAttrName = prodAttrName[0] if (consignee) that.consigneeData = consignee
}else{ that.getCnsigneeData()
item.prodAttrName = '' })
that.list.offerProdRespVOList.forEach((item) => {
var arr = item.prodAttrIds.split(",")
var prodAttrName = []
arr.forEach((itemValue) => {
var prodAttrCenter = this.productAttrList.filter((items) => items.id == itemValue)
if (prodAttrCenter.length > 0) {
prodAttrName.push(this.$i18n.locale == "zh_CN" ? prodAttrCenter[0].attrName : prodAttrCenter[0].attrNameEn)
} }
}) })
if (prodAttrName.length > 1) {
item.prodAttrName = prodAttrName.join(",")
} else if (prodAttrName.length == 1) {
item.prodAttrName = prodAttrName[0]
} else {
item.prodAttrName = ""
}
})
that.loading = false; that.loading = false
that.getOpenedRouterList() that.getOpenedRouterList()
if(this.list.transportVO.airlineCompany){ if (this.list.transportVO.airlineCompany) {
getSupplier(this.list.transportVO.airlineCompany).then(res=>{ getSupplier(this.list.transportVO.airlineCompany).then((res) => {
if(res.data){ if (res.data) {
this.airlineCompany = res.data.companyZh this.airlineCompany = res.data.companyZh
} }
}) })
} }
if(this.list.transportVO.shippingCompany){ if (this.list.transportVO.shippingCompany) {
getSupplier(this.list.transportVO.shippingCompany).then(res=>{ getSupplier(this.list.transportVO.shippingCompany).then((res) => {
if(res.data){ if (res.data) {
this.shippingCompany = res.data.companyZh this.shippingCompany = res.data.companyZh
} }
}) })
} }
}); })
}, },
getCity(id){ getCity(id) {
var city = '' var city = ""
this.tradeCityList.forEach((item)=>{ this.tradeCityList.forEach((item) => {
if(item.id == id){ if (item.id == id) {
city = this.$i18n.locale=='zh_CN'?item.titleZh:item.titleEn city = this.$i18n.locale == "zh_CN" ? item.titleZh : item.titleEn
} }
})
return city
},
getChannelData() {
getChannel(this.list.channelId).then((res) => {
this.channelName = res.data.nameZh
})
},
// 获取路线
getOpenedRouterList() {
let params = {}
if (this.list.departureId) {
params.startCityId = this.list.departureId
}
if (this.list.objectiveId) {
params.destCityId = this.list.objectiveId
}
getOpenedRouterList(params).then((res) => (this.routerList = res.data))
},
// 根据线路id显示线路名称
getRouterNameById(routerId) {
let router = this.routerList.find((item) => item.id == routerId)
if (router) {
return this.$i18n.locale == "zh_CN" ? router.startTitleZh : router.startTitleEn + " >>>" + this.$i18n.locale == "zh_CN" ? router.destTitleZh : router.destTitleEn
}
return "-"
},
// 获取发货/收货人
getCnsigneeData() {
let that = this
if (that.consigneeData && that.consigneeData.customerId) {
getCustomer(that.consigneeData.customerId).then((result) => {
result.data.source = this.sourceLabel(result.data.source)
that.$set(that.consigneeData, "source", result.data.source)
that.$set(that.consigneeData, "address", result.data.address)
}) })
return city }
}, if (that.consignorData && that.consignorData.customerId) {
getChannelData(){ getCustomer(that.consignorData.customerId).then((ress) => {
getChannel(this.list.channelId).then(res=>{ ress.data.source = this.sourceLabel(ress.data.source)
this.channelName = res.data.nameZh that.$set(that.consignorData, "source", ress.data.source)
that.$set(that.consignorData, "address", ress.data.address)
}) })
}, }
// 获取路线 },
getOpenedRouterList(){ /** 跟进按钮操作 */
let params = {} handleAdd() {
if(this.list.departureId){ this.$router.push({
params.startCityId = this.list.departureId path: "/offer/logList",
} query: {
if(this.list.objectiveId){ offerId: this.offerId,
params.destCityId = this.list.objectiveId relationId: this.list.consignorId
}
getOpenedRouterList(params).then(res => this.routerList = res.data)
},
// 根据线路id显示线路名称
getRouterNameById(routerId){
let router = this.routerList.find(item => item.id == routerId)
if(router){
return this.$i18n.locale=='zh_CN'?router.startTitleZh:router.startTitleEn + ' >>>' + this.$i18n.locale=='zh_CN'?router.destTitleZh:router.destTitleEn
}
return '-'
},
// 获取发货/收货人
getCnsigneeData(){
let that = this
if(that.consigneeData&&that.consigneeData.customerId){
getCustomer(that.consigneeData.customerId).then(result=>{
result.data.source = this.sourceLabel(result.data.source)
that.$set(that.consigneeData,'source',result.data.source)
that.$set(that.consigneeData,'address',result.data.address)
})
} }
if(that.consignorData&&that.consignorData.customerId){ })
getCustomer(that.consignorData.customerId).then(ress=>{ },
ress.data.source = this.sourceLabel(ress.data.source) toResult() {
that.$set(that.consignorData,'source',ress.data.source) this.$router.push({
that.$set(that.consignorData,'address',ress.data.address) path: "/offer/result",
}) query: {
} offerId: this.offerId,
}, number: this.list.number
/** 跟进按钮操作 */ }
handleAdd() { })
this.$router.push({ },
path: "/offer/logList", /** 删除按钮操作 */
query:{ handleDelete() {
offerId:this.offerId, const offerId = this.offerId
relationId:this.list.consignorId this.$confirm(this.$t("是否确认删除报价单管理编号为") + '"' + offerId + '"' + this.$t("的数据项") + "?")
} .then(function () {
}); return deleteOffer(offerId)
}, })
toResult(){ .then(() => {
this.$router.push({ this.$router.push({
path: "/offer/result", path: "/offer/result"
query:{ })
offerId:this.offerId, this.$message.success(this.$t("删除成功"))
number:this.list.number })
} .catch(() => {})
});
},
/** 删除按钮操作 */
handleDelete() {
const offerId = this.offerId;
this.$confirm(this.$t('是否确认删除报价单管理编号为')+'"' + offerId + '"'+this.$t('的数据项')+'?').then(function() {
return deleteOffer(offerId);
}).then(() => {
this.$router.push({
path: "/offer/result"
});
this.$message.success(this.$t("删除成功"));
}).catch(() => {});
},
} }
} }
}
</script> </script>
<style scoped> <style scoped>
.card-title{ .card-title {
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;
margin-top: 10px; margin-top: 10px;
} }
.offer-header{ .offer-header {
padding-bottom: 16px; padding-bottom: 16px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
.line{ .line {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.line el-descriptions{ .line el-descriptions {
flex: 1; flex: 1;
} }
.btn{ .btn {
width: 60%; width: 60%;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-around; justify-content: space-around;
} }
.title-font{ .title-font {
font-size: 16px; font-size: 16px;
font-weight: 600; font-weight: 600;
margin-top: 20px; margin-top: 20px;
} }
.title-font label{ .title-font label {
margin-right: 20px; margin-right: 20px;
} }
.card{ .card {
margin-top: 20px; margin-top: 20px;
} }
</style> </style>
...@@ -411,7 +411,7 @@ ...@@ -411,7 +411,7 @@
</div> </div>
<div class="form-section"> <div class="form-section">
<el-form-item :label="$t('竞争对手')" prop="competitor"> <el-form-item :label="$t('竞争对手')" prop="competitor">
<el-select clearable v-model="form.competitor" :placeholder="$t('请选择')" class="w-200" @change="changeCompetitor"> <el-select filterable clearable v-model="form.competitor" :placeholder="$t('请选择')" class="w-200" @change="changeCompetitor">
<el-option v-for="item in competitorList" :key="item.id" :label="item.name" :value="item.name" /> <el-option v-for="item in competitorList" :key="item.id" :label="item.name" :value="item.name" />
<el-option :label="$t('其他')" :value="0" /> <el-option :label="$t('其他')" :value="0" />
</el-select> </el-select>
...@@ -1185,6 +1185,8 @@ export default { ...@@ -1185,6 +1185,8 @@ export default {
formData.stopTime = "" formData.stopTime = ""
} }
formData.channelId = formData.channelId || null
this.$set(this, "form", formData) this.$set(this, "form", formData)
// 接口只返回了发货人和收货人ID,还需要调用接口获取详细信息回显 // 接口只返回了发货人和收货人ID,还需要调用接口获取详细信息回显
getCustomerContactsSelect({ getCustomerContactsSelect({
......
...@@ -180,7 +180,7 @@ ...@@ -180,7 +180,7 @@
<el-dropdown-item @click.native="$router.push('detail?offerId=' + scope.row.offerId)" v-hasPermi="['ecw:offer:show']">{{ $t("详情") }}</el-dropdown-item> <el-dropdown-item @click.native="$router.push('detail?offerId=' + scope.row.offerId)" v-hasPermi="['ecw:offer:show']">{{ $t("详情") }}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push('edit?id=' + scope.row.offerId)" v-if="[1, 2, 3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{ $t("编辑") }}</el-dropdown-item> <el-dropdown-item @click.native="$router.push('edit?id=' + scope.row.offerId)" v-if="[1, 2, 3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{ $t("编辑") }}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push('create?copyId=' + scope.row.offerId)" v-if="[1, 2, 3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{ $t("复制") }}</el-dropdown-item> <el-dropdown-item @click.native="$router.push('create?copyId=' + scope.row.offerId)" v-if="[1, 2, 3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{ $t("复制") }}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push(`logList?offerId=${scope.row.offerId}&customerId=${scope.row.customerId}`)" v-if="[1, 3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:loglist']">{{ $t("跟进") }}</el-dropdown-item> <el-dropdown-item @click.native="handleAddOffer(scope.row)" v-if="[1, 3, 7].indexOf(scope.row.status) > -1">{{ $t("跟进") }}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push(`result?offerId=${scope.row.offerId}&number=${scope.row.number}`)" v-if="[3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:result']">{{ $t("结果") }}</el-dropdown-item> <el-dropdown-item @click.native="$router.push(`result?offerId=${scope.row.offerId}&number=${scope.row.number}`)" v-if="[3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:result']">{{ $t("结果") }}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push('/offer/special?offerId=' + scope.row.offerId)" v-if="[1, 3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:discount', 'ecw:offer:commission']">{{ $t("特价") }}</el-dropdown-item> <el-dropdown-item @click.native="$router.push('/offer/special?offerId=' + scope.row.offerId)" v-if="[1, 3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:discount', 'ecw:offer:commission']">{{ $t("特价") }}</el-dropdown-item>
<el-dropdown-item @click.native="cancel(scope.row.offerId)" v-if="[1, 3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:cancel']">{{ $t("取消") }}</el-dropdown-item> <el-dropdown-item @click.native="cancel(scope.row.offerId)" v-if="[1, 3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:cancel']">{{ $t("取消") }}</el-dropdown-item>
...@@ -193,6 +193,7 @@ ...@@ -193,6 +193,7 @@
</el-table> </el-table>
<!-- 分页组件 --> <!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" @pagination="getList" /> <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" @pagination="getList" />
<CustomerFollow ref="customerFollow" @refresh="handleQuery" v-if="customerFollowVisible" :customer-id="curData.relationId" :customerService="curData.salesmanId" :customerNumber="curData.customerNumber" :offerId="curData.offerId" />
</div> </div>
</template> </template>
...@@ -205,16 +206,19 @@ import { getTradeCityList } from "@/api/ecw/region" ...@@ -205,16 +206,19 @@ import { getTradeCityList } from "@/api/ecw/region"
import { getWarehouseList } from "@/api/ecw/warehouse" import { getWarehouseList } from "@/api/ecw/warehouse"
import UserSelector from "@/components/UserSelector" import UserSelector from "@/components/UserSelector"
import Selector from "@/components/Selector" import Selector from "@/components/Selector"
import Template from "@/views/cms/template/index.vue"; import Template from "@/views/cms/template/index.vue"
import CustomerFollow from "@/views/ecw/customer/components/customerFollow"
export default { export default {
name: "EcwOfferIndex", name: "EcwOfferIndex",
components: { components: {
Template, Template,
Selector, Selector,
UserSelector UserSelector,
CustomerFollow
}, },
data() { data() {
return { return {
customerFollowVisible: false,
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 导出遮罩层 // 导出遮罩层
...@@ -259,6 +263,7 @@ export default { ...@@ -259,6 +263,7 @@ export default {
cityList: [], cityList: [],
//目的仓 //目的仓
destWarehouseList: [], destWarehouseList: [],
curData: {},
dept: false // 是否部门订单 dept: false // 是否部门订单
} }
}, },
...@@ -440,6 +445,14 @@ export default { ...@@ -440,6 +445,14 @@ export default {
} }
}, },
methods: { methods: {
handleAddOffer(row) {
console.log(row)
this.curData = row
this.customerFollowVisible = true
this.$nextTick(() => {
this.$refs["customerFollow"].handleAdd()
})
},
init() { init() {
//加载时发起请求获取所有省份值 //加载时发起请求获取所有省份值
getRegionList(1, 1) getRegionList(1, 1)
......
...@@ -3,52 +3,58 @@ ...@@ -3,52 +3,58 @@
<el-card class="box-card"> <el-card class="box-card">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<el-form size="small" :inline="true" label-width="100px"> <el-form size="small" :inline="true" label-width="100px">
<el-form-item :label="$t('编号')" prop="number"> <div class="search-z">
<el-input v-model.trim="followForm.number" clearable @keyup.enter.native="handleQuery" /> <el-form-item :label="$t('编号')" prop="number">
</el-form-item> <el-input v-model.trim="followForm.number" clearable @keyup.enter.native="handleQuery" />
<el-form-item :label="$t('报价单号')" prop="offerNumber"> </el-form-item>
<el-input v-model.trim="followForm.offerNumber" clearable @keyup.enter.native="handleQuery" /> <el-form-item :label="$t('报价单号')" prop="offerNumber">
</el-form-item> <el-input v-model.trim="followForm.offerNumber" clearable @keyup.enter.native="handleQuery" />
<el-form-item :label="$t('联系人')" prop="contactName"> </el-form-item>
<el-input v-model.trim="followForm.contactName" clearable @keyup.enter.native="handleQuery" /> <el-form-item :label="$t('联系人')" prop="contactName">
</el-form-item> <el-input v-model.trim="followForm.contactName" clearable @keyup.enter.native="handleQuery" />
<el-form-item :label="$t('联系方式')" prop="contactPhone"> </el-form-item>
<el-input v-model.trim="followForm.contactPhone" clearable @keyup.enter.native="handleQuery" /> <el-form-item :label="$t('联系方式')" prop="contactPhone">
</el-form-item> <el-input v-model.trim="followForm.contactPhone" clearable @keyup.enter.native="handleQuery" />
<el-form-item :label="$t('客户经理')" prop="followUserIds"> </el-form-item>
<user-selector v-model="followForm.followUserIds" multiple clearable @input="handleQuery" /> <el-form-item :label="$t('客户经理')" prop="followUserIds">
</el-form-item> <user-selector v-model="followForm.followUserIds" multiple clearable @input="handleQuery" />
<el-form-item :label="$t('下次跟进时间')"> </el-form-item>
<el-date-picker v-model="followFormTmp.nextTime" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" value-format="yyyy-MM-dd HH:mm:ss" @change="handleQuery"> </el-date-picker> <el-form-item :label="$t('关联跟进记录')" prop="parentNumber">
</el-form-item> <el-input v-model.trim="followForm.parentNumber" clearable @keyup.enter.native="handleQuery" />
<el-form-item :label="$t('关联跟进记录')" prop="parentNumber"> </el-form-item>
<el-input v-model.trim="followForm.parentNumber" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('跟进类型')"> <el-form-item :label="$t('跟进类型')">
<dict-selector clearable :type="DICT_TYPE.CUSTOMER_FOLLOWUP_TYPE" v-model="followForm.followType" @input="handleQuery"></dict-selector> <dict-selector clearable :type="DICT_TYPE.CUSTOMER_FOLLOWUP_TYPE" v-model="followForm.followType" @input="handleQuery"></dict-selector>
</el-form-item> </el-form-item>
<el-form-item :label="$t('跟进方式')"> <el-form-item :label="$t('跟进方式')">
<dict-selector clearable :type="DICT_TYPE.CUSTOMER_FOLLOWUP_METHOD" v-model="followForm.followMethod" @input="handleQuery"></dict-selector> <dict-selector clearable :type="DICT_TYPE.CUSTOMER_FOLLOWUP_METHOD" v-model="followForm.followMethod" @input="handleQuery"></dict-selector>
</el-form-item> </el-form-item>
<el-form-item :label="$t('跟进结果')"> <el-form-item :label="$t('跟进结果')">
<el-select clearable v-model="followForm.resultType" :placeholder="$t('请选择')" size="small" @change="handleQuery"> <el-select clearable v-model="followForm.resultType" :placeholder="$t('请选择')" size="small" @change="handleQuery">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_FOLLOWUP_RESULT_TYPE)" :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value" /> <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_FOLLOWUP_RESULT_TYPE)" :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('跟进状态')"> <el-form-item :label="$t('跟进状态')">
<el-select clearable v-model="followForm.status" :placeholder="$t('请选择')" size="small" @change="handleQuery"> <el-select clearable v-model="followForm.status" :placeholder="$t('请选择')" size="small" @change="handleQuery">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_FOLLOWUP_STATUS)" :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value" /> <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_FOLLOWUP_STATUS)" :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> </div>
<el-button type="primary" icon="el-icon-search" @click="getCustomerFollowList">{{ $t("搜索") }} </el-button> <div class="search-time">
<el-button type="primary" @click="reset">{{ $t("重置") }} </el-button> <el-form-item :label="$t('下次跟进时间')">
<el-button type="success" @click="handleAdd" v-hasPermi="['ecw:customer:follow-create']">{{ $t("新增") }} </el-button> <el-date-picker v-model="followFormTmp.nextTime" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" value-format="yyyy-MM-dd HH:mm:ss" @change="handleQuery"> </el-date-picker>
<el-button type="warning" @click="handleExport" v-hasPermi="['ecw:customer:follow-export']"> </el-form-item>
{{ $t("导出") }} <el-form-item style="padding-left: 20px; width: auto">
</el-button> <div class="flex-c-c">
</el-form-item> <el-button type="primary" icon="el-icon-search" @click="getCustomerFollowList">{{ $t("搜索") }} </el-button>
<el-button type="primary" @click="reset">{{ $t("重置") }} </el-button>
<el-button type="success" @click="handleAdd" v-hasPermi="['ecw:customer:follow-create']">{{ $t("新增") }} </el-button>
<el-button type="warning" @click="handleExport" v-hasPermi="['ecw:customer:follow-export']">
{{ $t("导出") }}
</el-button>
</div>
</el-form-item>
</div>
</el-form> </el-form>
</div> </div>
<el-table :data="customerFollowList" style="width: 100%"> <el-table :data="customerFollowList" style="width: 100%">
...@@ -60,7 +66,11 @@ ...@@ -60,7 +66,11 @@
<el-table-column prop="followType" :label="$t('跟进类型')" :formatter="(row, column, cellValue) => getDictDataLabel(DICT_TYPE.CUSTOMER_FOLLOWUP_TYPE, cellValue)"></el-table-column> <el-table-column prop="followType" :label="$t('跟进类型')" :formatter="(row, column, cellValue) => getDictDataLabel(DICT_TYPE.CUSTOMER_FOLLOWUP_TYPE, cellValue)"></el-table-column>
<el-table-column prop="offerNumber" :label="$t('报价单号')"> </el-table-column> <el-table-column prop="offerNumber" :label="$t('报价单号')"> </el-table-column>
<el-table-column prop="followTime" :label="$t('跟进时间')" :formatter="(row, column, cellValue) => parseTime(cellValue)"></el-table-column> <el-table-column prop="followTime" :label="$t('跟进时间')" :formatter="(row, column, cellValue) => parseTime(cellValue)"></el-table-column>
<el-table-column prop="customerNumber" :label="$t('客户编号')"></el-table-column> <el-table-column prop="customerNumber" :label="$t('客户编号')">
<template slot-scope="scope">
<a href="javascript:void(0)" @click="handleCustomerViewLink(scope.row)" class="link-type">{{ scope.row.customerNumber }}</a>
</template>
</el-table-column>
<el-table-column prop="contactName" :label="$t('联系人')"></el-table-column> <el-table-column prop="contactName" :label="$t('联系人')"></el-table-column>
<el-table-column prop="contactPhone" :label="$t('联系方式')"></el-table-column> <el-table-column prop="contactPhone" :label="$t('联系方式')"></el-table-column>
<el-table-column prop="followUserName" :label="$t('客户经理')"></el-table-column> <el-table-column prop="followUserName" :label="$t('客户经理')"></el-table-column>
...@@ -101,7 +111,7 @@ ...@@ -101,7 +111,7 @@
</el-table> </el-table>
<pagination :total="customerFollowTotal" :page.sync="followForm.pageNo" :limit.sync="followForm.pageSize" @pagination="getCustomerFollowList" /> <pagination :total="customerFollowTotal" :page.sync="followForm.pageNo" :limit.sync="followForm.pageSize" @pagination="getCustomerFollowList" />
</el-card> </el-card>
<customer-follow ref="customerFollow" @handleCustomerFollowAdd="handleCustomerFollowAdd" @refresh="handleQuery" v-if="customerFollowVisible" :customer-id="customerId" :offerId="offerId" /> <customer-follow ref="customerFollow" @handleCustomerFollowAdd="handleCustomerFollowAdd" @refresh="handleQuery" v-if="customerFollowVisible" :customer-id="customerId" :customerService="customerService" :customerNumber="customerNumber" />
</div> </div>
</template> </template>
...@@ -112,7 +122,7 @@ import UserSelector from "@/components/UserSelector" ...@@ -112,7 +122,7 @@ import UserSelector from "@/components/UserSelector"
export default { export default {
name: "logListCommon", name: "logListCommon",
components: { UserSelector, CustomerFollow }, components: { UserSelector, CustomerFollow },
props: ["customerId", "offerId"], props: ["customerId", "offerId", "customerService", "customerNumber"],
data() { data() {
return { return {
customerFollowVisible: false, customerFollowVisible: false,
...@@ -172,6 +182,9 @@ export default { ...@@ -172,6 +182,9 @@ export default {
this.$refs["customerFollow"].handleView(row) this.$refs["customerFollow"].handleView(row)
}) })
}, },
handleCustomerViewLink(row) {
this.$router.push(`/customer/query/${row.customerId}`)
},
formatQuery() { formatQuery() {
let obj = {} let obj = {}
obj.customerId = this.customerId || null obj.customerId = this.customerId || null
......
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