Commit 683f79dd authored by yujinyao's avatar yujinyao

客户详情 报价标签加查询条件

parent 7e0c1c55
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
range-separator="-" range-separator="-"
:start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" /> :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('目的国')" prop="destCountryId"> <el-form-item :label="$t('目的国')">
<el-select <el-select
v-model="destCountryId" v-model="destCountryId"
:label="destCountryId" :label="destCountryId"
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('目的地')" prop="destCityId"> <el-form-item :label="$t('目的地')">
<el-select v-model="destCityId" clearable @change="handleQuery"> <el-select v-model="destCityId" clearable @change="handleQuery">
<el-option <el-option
v-for="item in AddressCity" v-for="item in AddressCity"
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('目的仓')" prop="destWarehouseId"> <el-form-item :label="$t('目的仓')">
<el-select v-model="destWarehouseId" clearable @change="handleQuery"> <el-select v-model="destWarehouseId" clearable @change="handleQuery">
<el-option <el-option
v-for="item in AddressTown" v-for="item in AddressTown"
...@@ -207,94 +207,151 @@ ...@@ -207,94 +207,151 @@
</el-card> </el-card>
</el-tab-pane> </el-tab-pane>
<el-tab-pane name="quote" :label="$t('报价')"> <el-tab-pane name="quote" :label="$t('报价')">
<el-table <el-card class="box-card">
:data="infoListOfferList" <div slot="header" class="clearfix">
style="width: 100%" <el-form :inline="true" size="small">
> <el-form-item :label="$t('目的国')">
<el-table-column <el-select
type="index" v-model="destCountryId"
:label="$t('序号')" :label="destCountryId"
> clearable
</el-table-column> @change="handleQuery"
<el-table-column >
prop="number" <el-option
:label="$t('报价单号')" v-for="item in countryList"
> :key="item.id"
</el-table-column> :label="$l(item, 'title')"
<el-table-column :value="item.id"
prop="orderNo" >
:label="$t('订单号')" </el-option>
> </el-select>
</el-table-column> </el-form-item>
<!-- <el-form-item :label="$t('目的地')">
<el-table-column <el-select v-model="destCityId" clearable @change="handleQuery">
prop="consignorName" <el-option
:label="$t('客户名称')" v-for="item in AddressCity"
> :key="item.shi"
<template v-slot> :label="item.shiName"
{{customer.name}} :value="item.shi"
</template> ></el-option>
</el-table-column> </el-select>
--> </el-form-item>
<el-table-column <el-form-item :label="$t('目的仓')">
prop="relationName" <el-select v-model="destWarehouseId" clearable @change="handleQuery">
:label="$t('联系人')" <el-option
> v-for="item in AddressTown"
</el-table-column> :key="item.id"
<el-table-column :label="item.titleZh"
:label="$t('联系方式')" :value="item.id"
> ></el-option>
<template v-slot="{row}"> </el-select>
+{{ row.relationAreaCode }}{{ row.relationPhone }} </el-form-item>
</template> <el-form-item>
</el-table-column> <el-button type="primary" @click="getorderList">{{$t('搜索')}}</el-button>
<el-table-column <el-button type="primary" @click="()=>{
prop="objectiveName" queryParams = { rows:10,page:1}; getInfoListOfferPage();rucangtime = [];
:label="$t('目的地')" }">{{$t('重置')}}</el-button>
> </el-form-item>
</el-table-column> </el-form>
<el-table-column </div>
:label="$t('销售阶段')" <el-table
> :data="infoListOfferList"
<template v-slot="{row}"> style="width: 100%"
{{STATUS[row.status]}}
</template>
</el-table-column>
<el-table-column
prop="stopTime"
:label="$t('预计结束时间')"
>
</el-table-column>
<el-table-column
prop="businessManagerName"
:label="$t('负责人')"
>
</el-table-column>
<el-table-column
prop="importance"
:label="$t('重要程度')"
>
</el-table-column>
<el-table-column
prop="importance"
:label="$t('报价有效期')"
>
<template v-slot="{row}">
{{ row.startTime }} - {{ row.endTime }}
</template>
</el-table-column>
<el-table-column
prop="businessManagerName"
:label="$t('客户经理')"
>
</el-table-column>
<el-table-column
prop="createTime"
:label="$t('创建时间')"
> >
</el-table-column> <el-table-column
</el-table> type="index"
<pagination @pagination="getInfoListOfferPage" :page.sync="infoListOfferFrom.pageNo" :limit.sync="infoListOfferFrom.pageSize" :total="infoListOfferTotal" ></pagination> :label="$t('序号')"
>
</el-table-column>
<el-table-column
prop="number"
:label="$t('报价单号')"
>
</el-table-column>
<el-table-column
prop="orderNo"
:label="$t('订单号')"
>
</el-table-column>
<!--
<el-table-column
prop="consignorName"
:label="$t('客户名称')"
>
<template v-slot>
{{customer.name}}
</template>
</el-table-column>
-->
<el-table-column
prop="relationName"
:label="$t('联系人')"
>
</el-table-column>
<el-table-column
:label="$t('联系方式')"
>
<template v-slot="{row}">
+{{ row.relationAreaCode }}{{ row.relationPhone }}
</template>
</el-table-column>
<el-table-column
:label="$t('始发仓')"
>
<template v-slot="{row}">
{{getWarehouse(row.startWarehouseId)}}
</template>
</el-table-column>
<el-table-column
:label="$t('运输方式/目的地')"
>
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="row.transportType" /> / {{row.objectiveName}}
</template>
</el-table-column>
<el-table-column
:label="$t('销售阶段')"
>
<template v-slot="{row}">
{{STATUS[row.status]}}
</template>
</el-table-column>
<el-table-column
prop="stopTime"
:label="$t('预计结束时间')"
>
</el-table-column>
<el-table-column
prop="businessManagerName"
:label="$t('负责人')"
>
</el-table-column>
<el-table-column
prop="importance"
:label="$t('重要程度')"
>
</el-table-column>
<el-table-column
prop="importance"
:label="$t('报价有效期')"
>
<template v-slot="{row}">
{{ row.startTime }} - {{ row.endTime }}
</template>
</el-table-column>
<el-table-column
prop="businessManagerName"
:label="$t('客户经理')"
>
</el-table-column>
<el-table-column
prop="createTime"
:label="$t('创建时间')"
>
</el-table-column>
</el-table>
<pagination @pagination="getInfoListOfferPage" :page.sync="infoListOfferFrom.pageNo" :limit.sync="infoListOfferFrom.pageSize" :total="infoListOfferTotal" ></pagination>
</el-card>
</el-tab-pane> </el-tab-pane>
<el-tab-pane name="follow" :label="$t('跟进')"> <el-tab-pane name="follow" :label="$t('跟进')">
<customer-follow v-if="activeName === 'follow'" customerQuery ref="customerFollow" :id="id" :customer-id="id"></customer-follow> <customer-follow v-if="activeName === 'follow'" customerQuery ref="customerFollow" :id="id" :customer-id="id"></customer-follow>
...@@ -615,10 +672,10 @@ ...@@ -615,10 +672,10 @@
<el-input type="textarea" v-model="creditFrom.remark"> </el-input> <el-input type="textarea" v-model="creditFrom.remark"> </el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="submit">{{$t('提交')}}</el-button> <el-button @click="submit">{{$t('提交')}}</el-button>
<el-button @click="dialogVisible = false" >{{$t('取消')}}</el-button> <el-button @click="dialogVisible = false" >{{$t('取消')}}</el-button>
</span> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
...@@ -655,6 +712,7 @@ import customerLog from "@/views/ecw/customer/customerLog.vue"; ...@@ -655,6 +712,7 @@ import customerLog from "@/views/ecw/customer/customerLog.vue";
import {checkPermi} from "@/utils/permission"; import {checkPermi} from "@/utils/permission";
import ImageDisplay from "@/views/ecw/order/components/imageDisplay.vue"; import ImageDisplay from "@/views/ecw/order/components/imageDisplay.vue";
import { getListTree } from "@/api/ecw/region"; import { getListTree } from "@/api/ecw/region";
import { getWarehouseList } from "@/api/ecw/warehouse";
export default { export default {
name: 'query', name: 'query',
components: { components: {
...@@ -708,14 +766,23 @@ export default { ...@@ -708,14 +766,23 @@ export default {
this.getData(); this.getData();
//获取城市列表 //获取城市列表
this.getCountryList(); this.getCountryList();
this.getWarehouseList()
}, },
watch:{ watch:{
activeName(val){ activeName(val){
switch (val) { switch (val) {
case 'order': case 'order':
this.destCountryId = ''
this.destCityId = ''
this.destWarehouseId = ''
this.queryParams = { rows:10, page:1}
this.getorderList()//订单 this.getorderList()//订单
break break
case 'quote': case 'quote':
this.destCountryId = ''
this.destCityId = ''
this.destWarehouseId = ''
this.queryParams = { rows:10, page:1}
this.getInfoListOfferPage()//报价 this.getInfoListOfferPage()//报价
break break
case 'bill': case 'bill':
...@@ -768,16 +835,16 @@ export default { ...@@ -768,16 +835,16 @@ export default {
}); });
} else if ( } else if (
this.destCountryId != "" && this.destCountryId != "" &&
this.objectiveId == "" && this.destCityId == "" &&
this.destWarehouseId == "" this.destWarehouseId == ""
) { ) {
getRegionList(2, this.destCountryId) /*getRegionList(2, this.destCountryId)
.then(({ data }) => { .then(({ data }) => {
this.AddressCity = data; this.AddressCity = data;
}) })
.catch((error) => { .catch((error) => {
console.log(error); console.log(error);
}); });*/
getRegionList(5, 5) getRegionList(5, 5)
.then(({ data }) => { .then(({ data }) => {
this.AddressTown = data; this.AddressTown = data;
...@@ -800,13 +867,13 @@ export default { ...@@ -800,13 +867,13 @@ export default {
this.destWarehouseId == "" this.destWarehouseId == ""
) { ) {
//获取当前城市值id,获取该城市下区域 //获取当前城市值id,获取该城市下区域
getRegionList(3, this.destCityId) /*getRegionList(3, this.destCityId)
.then(({ data }) => { .then(({ data }) => {
this.AddressTown = data; this.AddressTown = data;
}) })
.catch((error) => { .catch((error) => {
console.log(error); console.log(error);
}); });*/
} else if ( } else if (
this.destCountryId == "" && this.destCountryId == "" &&
this.destCityId == "" && this.destCityId == "" &&
...@@ -1007,10 +1074,11 @@ export default { ...@@ -1007,10 +1074,11 @@ export default {
AddressCity: [], //目的城市 AddressCity: [], //目的城市
AddressProvince: [], //省份 AddressProvince: [], //省份
AddressTown: [], //目的仓 AddressTown: [], //目的仓
destCountryId: [], destCountryId: null,
objectiveId: [], // objectiveId: null,
destCityId: null, destCityId: null,
destWarehouseId: "", destWarehouseId: null,
warehouseList: [],
} }
}, },
computed: { computed: {
...@@ -1181,7 +1249,7 @@ export default { ...@@ -1181,7 +1249,7 @@ export default {
}, },
findBycityCode() { findBycityCode() {
//获取当前城市值id,获取该城市下区域 //获取当前城市值id,获取该城市下区域
getRegionList(3, this.objectiveId) getRegionList(3, this.destCityId)
.then(({ data }) => { .then(({ data }) => {
this.AddressTown = data; this.AddressTown = data;
}) })
...@@ -1224,14 +1292,32 @@ export default { ...@@ -1224,14 +1292,32 @@ export default {
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNo = 1; this.queryParams.pageNo = 1;
//目的城市
this.queryParams.destCityId = this.destCityId;
//目的国 //目的国
this.queryParams.destCountryId = this.destCountryId; this.queryParams.destCountryId = this.destCountryId;
//目的城市
this.queryParams.objectiveId = this.destCityId;
//目的仓 //目的仓
this.queryParams.destWarehouseId = this.destWarehouseId; this.queryParams.destWarehouseId = this.destWarehouseId;
if (this.activeName == 'order') {
this.getorderList() this.getorderList()
} else if (this.activeName == 'quote') {
this.getInfoListOfferPage()
}
},
getWarehouseList() {
getWarehouseList().then((res) => {
this.warehouseList = res.data;
})
},
getWarehouse(id) {
let warehouseName = ''
for(const item of this.warehouseList) {
if(item.id == id){
warehouseName = this.$i18n.locale=='zh_CN'?item.titleZh:item.titleEn
break
}
}
return warehouseName
}, },
}, },
......
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