Commit 0282d200 authored by liuzeheng's avatar liuzeheng

调整

parent f84516e9
......@@ -4,43 +4,43 @@
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="$t('客户编号')" prop="number">
<el-input v-model="queryParams.number" :placeholder="$t('请输入客户编号')" clearable @keyup.enter.native="handleQuery"/>
<el-input v-model.trim="queryParams.number" :placeholder="$t('请输入客户编号')" clearable @keyup.enter.native="handleQuery" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"/>
</el-form-item>
<el-form-item :label="$t('客户名称')" prop="name">
<el-input v-model="queryParams.name" :placeholder="$t('请输入客户名称')" clearable @keyup.enter.native="handleQuery"/>
<el-input v-model.trim="queryParams.name" :placeholder="$t('请输入客户名称')" clearable @keyup.enter.native="handleQuery" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"/>
</el-form-item>
<el-form-item :label="$t('客户等级')" prop="level">
<el-select clearable v-model="queryParams.level" :placeholder="$t('请选择客户等级')" clearable size="small">
<el-select multiple v-model="queryParams.level" :placeholder="$t('请选择客户等级')" clearable size="small" @change="handleQuery">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)"
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('联系方式')">
<el-input :placeholder="$t('请输入联系方式')" v-model="queryParams.defaultContactPhone"></el-input>
<el-input :placeholder="$t('请输入联系方式')" v-model.trim="queryParams.defaultContactPhone" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"></el-input>
</el-form-item>
<el-form-item :label="$t('客户类别')" prop="level">
<dict-selector :type="DICT_TYPE.CUSTOMER_TYPE" v-model="queryParams.type"></dict-selector>
<dict-selector multiple :type="DICT_TYPE.CUSTOMER_TYPE" v-model="queryParams.type" clearable @change="handleQuery"></dict-selector>
</el-form-item>
<el-form-item :label="$t('客户经理')" prop="customerService">
<el-select clearable v-model="queryParams.customerService" :placeholder="$t('请选择客户经理')" clearable size="small">
<el-select multiple v-model="queryParams.customerService" :placeholder="$t('请选择客户经理')" clearable size="small" @change="handleQuery">
<el-option v-for="dict in customerServiceList"
:key="dict.id" :label="dict.nickname" :value="dict.id"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('客户来源')" prop="source">
<el-select clearable v-model="queryParams.source" :placeholder="$t('请选择客户来源')" clearable size="small">
<el-select v-model="queryParams.source" :placeholder="$t('请选择客户来源')" clearable size="small" @change="handleQuery">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('国家')" prop="source">
<el-select clearable v-model="form.country" :placeholder="$t('请选择国家')">
<el-select multiple clearable v-model="form.country" :placeholder="$t('请选择国家')" @change="handleQuery">
<el-option v-for="dict in countryList"
:key="dict.id" :label=" isChinese ? dict.nameZh : dict.nameEn" :value="parseInt(dict.id)" />
</el-select>
</el-form-item>
<el-form-item :label="$t('客户状态')" prop="status">
<el-select clearable v-model="queryParams.status" :placeholder="$t('请选择客户状态')" clearable size="small">
<el-select multiple v-model="queryParams.status" :placeholder="$t('请选择客户状态')" clearable size="small" @change="handleQuery">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_STATUS)"
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select>
......@@ -50,12 +50,12 @@
type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" />
</el-form-item>
<el-form-item :label="$t('信用等级')" prop="department">
<el-select clearable v-model="queryParams.creditLevel" >
<el-select multiple clearable v-model="queryParams.creditLevel" @change="handleQuery">
<el-option v-for="(item,index) in creditList" :label=" isChinese ? item.nameZh : item.nameEn" :key="index" :value="item.id" ></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('市场获客')" prop="department">
<dict-selector clearable :type="DICT_TYPE.ECW_CUSTOMER_RESOURCE_TYPE" v-model="queryParams.marketType" formatter="number"></dict-selector>
<dict-selector multiple clearable :type="DICT_TYPE.ECW_CUSTOMER_RESOURCE_TYPE" v-model="queryParams.marketType" formatter="number" @change="handleQuery"></dict-selector>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button>
......
......@@ -16,9 +16,11 @@
:label="$t('始发仓')"
:rules="{ required: true, message: $t('请选择始发仓') }"
prop="startWarehouseIdList"
@change="handleSelect"
>
<el-select
v-model="queryParams.startWarehouseIdList"
multiple
:placeholder="$t('请选择')"
clearable
......@@ -94,7 +96,7 @@
></dict-selector>
</el-form-item>
<!-- <el-form-item :label="$t('到港时间')" prop="daogangTime">
<el-form-item :label="$t('到港时间')" prop="daogangTime">
<el-date-picker
v-model="daogangTime"
type="datetimerange"
......@@ -131,7 +133,7 @@
>
</el-date-picker>
</el-form-item> -->
</el-form-item>
<el-form-item>
<el-button
......@@ -373,6 +375,7 @@ export default {
startWarehouseIdList: [],
destWarehouseIdList: [],
},
exportWarehouseList:[],
// tradeCityList: [],
currencyList: [],
warehouseList: [],
......@@ -381,6 +384,7 @@ export default {
exporting: false,
};
},
activated() {
// 如果有必须的条件则查询
if (
......@@ -391,15 +395,32 @@ export default {
}
},
created() {
this.handleSelect();
getCurrencyPage(this.params).then(
(res) => (this.currencyList = res.data.list)
);
// getTradeCityList().then((res) => (this.tradeCityList = res.data));
// 默认不查询,必须选择目的国以后才可以查询 this.getList();
getWarehouseList().then((res) => (this.warehouseList = res.data));
getWarehouseList().then((res) =>{
this.warehouseList = res.data
let da= res.data.filter(
(item) => +item.tradeType === 2 || +item.tradeType === 3
);
let ids = da.map(item => item.id);
this.$set(this.queryParams, "startWarehouseIdList", ids);
this.exportWarehouseList = da;//下拉框数据
}
);
getListTree({ treeType: 1 }).then((r) => {
this.countryList = r.data;
});
},
watch: {
// 目的国变更后要重置目的仓
......@@ -417,12 +438,19 @@ export default {
importCityList() {
return this.tradeCityList.filter((item) => item.type === 1);
},*/
exportWarehouseList() {
// exportWarehouseList() {
// /* tradeType 1 进口,2出口,3进出口 */
// return this.warehouseList.filter(
// (item) => +item.tradeType === 2 || +item.tradeType === 3
// );
// },
t() {
/* tradeType 1 进口,2出口,3进出口 */
return this.warehouseList.filter(
(item) => +item.tradeType === 2 || +item.tradeType === 3
);
},
importWarehouseList() {
// 目的仓根据选择的目的国过滤
if (!this.queryParams.destCountryId) return [];
......@@ -454,6 +482,12 @@ export default {
},
},
methods: {
handleSelect(val){
console.log("")
//console.log(this.currencyList)
},
getCurrencyLabel(id) {
const item = this.currencyList.find((item) => item.id === id);
if (!item) return "";
......
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