Commit cec5e442 authored by dragondean@qq.com's avatar dragondean@qq.com
parents cc5f66d9 bf6eec70
......@@ -51,6 +51,16 @@ export function getCustomerPage(query) {
params: query
})
}
/**
* 获得部门客户
* */
export function getCustomerDeptPage(query){
return request({
url:'/ecw/customer/deptPage',
method:'get',
params:query
})
}
// 获得客户下拉
export function getCustomerSelect(query) {
......@@ -350,3 +360,13 @@ export function testEnterToOpenSea(customerId) {
params: {customerId}
})
}
/**
* 获取常用提货网点
* */
export function getServiceNetwork(){
return request({
url:'/ecw/node/list',
method:'get',
})
}
......@@ -258,11 +258,18 @@ export const constantRoutes = [
meta: {title: '佣金设置', titleEn:'Commission settings', icon: '', activeMenu: '/customer/customerCommissionInfo'},
props: true,
},
// {
// path: 'edit/:customerId(\\d+)',
// component: (resolve) => import('@/views/ecw/customer/edit'),
// props: true,
// name: 'customerEdit',
// meta: {title:'编辑客户',titleEn:'Edit Customer', icon: ''}
// },
{
path: 'edit/:customerId(\\d+)',
path: 'edit-distribution/:customerId(\\d+)',
component: (resolve) => import('@/views/ecw/customer/edit'),
props: true,
name: 'customerEdit',
name: 'allocatedCustomerEdit',
meta: {title:'编辑客户',titleEn:'Edit Customer', icon: ''}
},
{
......
......@@ -84,7 +84,7 @@ export function addDateRange(params, dateRange, propName) {
* 大小为 2 的数组,每个时间为 yyyy-MM-dd 格式
* @param propName 加入的参数名,可以为空
*/
export function addBeginAndEndTime(params, dateRange, propName) {
export function addBeginAndEndTime(params, dateRange, propName,isTime = true) {
// 必须传入参数
if (!dateRange) {
return params;
......@@ -97,10 +97,10 @@ export function addBeginAndEndTime(params, dateRange, propName) {
}
// 设置参数
if (dateRange[0]) {
params['begin' + propName] = dateRange[0] + ' 00:00:00';
params['begin' + propName] = dateRange[0] + (isTime ? ' 00:00:00':'');
}
if (dateRange[1]) {
params['end' + propName] = dateRange[1] + ' 23:59:59';
params['end' + propName] = dateRange[1] + (isTime ? ' 23:59:59' : '');
}
return params;
}
......
......@@ -107,9 +107,13 @@
<el-form-item label="100外币兑人民币汇率" prop="huilv">
<el-input v-model="form.huilv" placeholder="请输入100外币兑人民币汇率汇率" />
</el-form-item>
<el-form-item label="100人民币兑外币汇率" prop="huilv">
{{ form.huilv ? (10000 / form.huilv).toFixed(6) : ''}}
<el-form-item label="100人民币兑外币汇率" prop="exchangeToFc">
<el-input v-model="form.exchangeToFc" placeholder="请输入100人民币兑外币汇率" />
</el-form-item>
<!-- <el-form-item label="100人民币兑外币汇率" prop="huilv">
{{ form.huilv ? (10000 / form.huilv).toFixed(6) : ''}}
</el-form-item> -->
<el-form-item :label="$t('排序')" prop="aorder">
<el-input v-model="form.aorder" :placeholder="$t('请输入排序')" />
</el-form-item>
......
......@@ -33,7 +33,10 @@
<el-col :span="12">
<el-form-item :label="$t('出货渠道')" prop="transportType">
<dict-selector :type="DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE" form-type="checkbox" multiple v-model="form.transportType"></dict-selector>
<!-- <dict-selector :type="DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE" form-type="checkbox" multiple v-model="form.transportType"></dict-selector>-->
<el-checkbox-group v-model="form.transportType">
<el-checkbox v-for="item in getDictDatas(DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE)" :key="item.value" :label="item.value" :disabled="item.value == 4">{{item.label}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
<el-col :span="12">
......@@ -42,8 +45,13 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('资源类型')" prop="remarks">
<dict-selector :type="DICT_TYPE.ECW_CUSTOMER_RESOURCE_TYPE" v-model="form.resourceType" formatter="number"></dict-selector>
<!-- <el-form-item :label="$t('资源类型')" prop="remarks">-->
<!-- <dict-selector :type="DICT_TYPE.ECW_CUSTOMER_RESOURCE_TYPE" v-model="form.resourceType" formatter="number"></dict-selector>-->
<!-- </el-form-item>-->
<el-form-item :label="$t('常用提货网点')" prop="remarks">
<el-select v-model="form.pickupPoint">
<el-option v-for="item in serviceNetworkList " :value="item.id" :label="isChinese ? item.titleZh : item.titleEn "></el-option>
</el-select>
</el-form-item>
</el-col>
......@@ -106,7 +114,8 @@
</el-col>
<el-col :span="12">
<el-form-item :label="$t('客户经理')" prop="customerService">
<el-select v-model="form.customerService" :placeholder="$t('请选择客户经理')" :disabled="(customerId !== '0' || isCustomerServiceConfirmed)">
{{$route.nam}}
<el-select v-model="form.customerService" :placeholder="$t('请选择客户经理')" :disabled="((customerId !== '0' && $route.name !== 'allocatedCustomerEdit')) || isCustomerServiceConfirmed">
<el-option v-for="item in serviceUserList"
:key="item.id" :label="item.nickname" :value="item.id" />
</el-select>
......@@ -205,6 +214,14 @@
<customer-line-table v-if="showPao1" :warehouse-list="warehouseList" :import-city-list="importCityList" v-model="paoLines" :zhong-pao-type="2"></customer-line-table>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-hasPermi="['ecw:customer:query-card']" :label="$t('身份证姓名')">
<el-input v-model="form.carName"></el-input>
</el-form-item>
<el-form-item v-hasPermi="['ecw:customer:query-card']" :label="$t('身份证号码')">
<el-input v-model="form.carNo" ></el-input>
</el-form-item>
</el-col>
</el-row>
<el-card class="box-card">
......@@ -417,7 +434,7 @@ import {
getCustomerPage, memberUserList,
updateCustomer,
userMemberUserList,
getCustomerLines, fillupCustomeInfo
getCustomerLines, fillupCustomeInfo, getServiceNetwork
} from '@/api/ecw/customer'
import {getNodeList} from "@/api/ecw/node"
import { getProductTypeList } from '@/api/ecw/productType'
......@@ -437,9 +454,7 @@ import MemberSelector from '@/components/MemberSelector'
export default {
name: "edit",
props: {
customerId: String,
},
components: {
Template,
upload,
......@@ -517,6 +532,10 @@ export default {
getCountryListAll().then(r => {
this.countryList = r.data
})
// 获取服务网点
getServiceNetwork().then(r =>{
this.serviceNetworkList = r.data
})
},
data(){
return {
......@@ -566,7 +585,8 @@ export default {
zhongLines: [], // 重货线路
paoLines: [], // 泡货线路
memberList:[],//会员列表
selectMemberList:[]//选中会员列表
selectMemberList:[],//选中会员列表
serviceNetworkList:[] //网点列表
}
},
......@@ -751,13 +771,15 @@ export default {
weightUnit: undefined,
createTime: undefined,
isShowTidanPrice:true,
carName:undefined,
carNo:undefined,
};
this.form.createTime = (new Date()).getTime()
this.resetForm("form");
},
getCustomer(id) {
return getCustomer(id).then(response => {
this.form = { ...this.form, ...response.data, id: this.customerId };
this.form = { ...this.form, ...response.data, id: this.customerId,transportType: response.data.transportType.split(',') };
this.open = true;
this.title = this.$t('修改客户');
this.getZhongPao()
......@@ -776,7 +798,7 @@ export default {
handleAddContact() {
this.form.customerContacts.push({
"areaCode": "",
// "customerId": 0,
// "customerId": 0,q
"department": "",
"email": "",
"isDefault": this.form.customerContacts.length === 0 ? 1 : 0,
......@@ -817,6 +839,9 @@ export default {
userId(){
return this.$store.state.user.id
},
customerId(){
return this.$route.params.customerId;
},
/* userMemberUser(){
let list = this.memberList.filter(item => {
return this.selectMemberList.findIndex(i => i.id === item.id) < 0
......
......@@ -46,8 +46,10 @@
</el-select>
</el-form-item>
<el-form-item :label="$t('创建时间')">
<el-date-picker clearable v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd"
type="daterange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" />
<el-date-picker
type="datetimerange"
clearable v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss"
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" >
......@@ -74,6 +76,14 @@
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
v-hasPermi="['ecw:customer:export']">{{$t('导出')}}</el-button>
</el-col>
<el-col :span="1.5">
<el-button v-if="$route.path === '/customer/customer'" type="primary" plain size="mini" :loading="exportLoading"
v-hasPermi="['ecw:customer:transport']" >{{$t('设为空运客户')}}</el-button>
</el-col>
<el-col :span="1.5">
<el-button v-if="$route.path === '/customer/customer'" type="primary" plain size="mini" :loading="exportLoading"
v-hasPermi="['ecw:customer:transport']">{{$t('设为非空运客户')}}</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
......@@ -504,7 +514,7 @@
<script>
import {
createCustomer, updateCustomer, deleteCustomer, getCustomer,
getCustomerPage, exportCustomerExcel, testEnterToOpenSea
getCustomerPage, exportCustomerExcel, testEnterToOpenSea, getCustomerDeptPage
} from "@/api/ecw/customer";
import { getDictDatas, DICT_TYPE } from '@/utils/dict';
import {CommonStatusEnum} from '@/utils/constants'
......@@ -623,17 +633,26 @@ export default {
},
/** 查询列表 */
getList() {
console.log(this.$route.path,'path')
this.loading = true;
// 处理查询参数
let params = {...this.queryParams};
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime', false);
// 执行查询
getCustomerPage(params).then(response => {
console.log(response,'response')
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
switch (this.$route.path){
case '/customer/customer' :
getCustomerPage(params).then(this.setData);
break;
case '/customer/department-customers':
getCustomerDeptPage(params).then(this.setData);
}
},
setData(response){
console.log(response,'response')
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
},
/** 取消按钮 */
cancel() {
......
......@@ -22,8 +22,8 @@
</el-select>
</el-form-item>
<el-form-item :label="$t('创建时间')">
<el-date-picker clearable v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd"
type="daterange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" />
<el-date-picker clearable v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button>
......@@ -152,7 +152,7 @@ export default {
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime', false);
// 执行导出
this.$modal.confirm(this.$t('是否确认导出间接客户数据项?')).then(() => {
this.exportLoading = true;
......@@ -175,7 +175,7 @@ export default {
this.loading = true;
// 处理查询参数
let params = {...this.queryParams};
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime', false);
// 执行查询
getCustomerPage(params).then(response => {
this.list = response.data.list;
......
......@@ -46,8 +46,8 @@
</el-select>
</el-form-item>
<el-form-item :label="$t('创建时间')">
<el-date-picker clearable v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd"
type="daterange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" />
<el-date-picker clearable v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss"
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" >
......@@ -444,7 +444,7 @@ export default {
this.loading = true;
// 处理查询参数
let params = {...this.queryParams};
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime', false);
// 执行查询
getWaitForConfirmList(params).then(response => {
this.list = response.data.list;
......
......@@ -47,8 +47,8 @@
</el-select>
</el-form-item>
<el-form-item :label="$t('创建时间')">
<el-date-picker clearable v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd"
type="daterange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" />
<el-date-picker clearable v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss"
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" >
......@@ -268,7 +268,7 @@ export default {
this.loading = true;
// 处理查询参数
let params = {...this.queryParams};
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime', false);
// 执行查询
getCustomerToBeAssigned(params).then(response => {
this.list = response.data.list;
......@@ -359,7 +359,7 @@ export default {
},
/** 修改按钮操作 */
handleUpdate(row) {
this.$router.push('/customer/edit/' + row.id)
this.$router.push('/customer/edit-distribution/' + row.id)
// this.reset();
// const id = row.id;
// getCustomer(id).then(response => {
......
......@@ -32,7 +32,7 @@
</el-select>
</el-form-item> -->
<el-form-item>
<el-date-picker v-model="dateFilter" type="daterange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
<el-date-picker v-model="dateFilter" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
<!-- <el-date-picker v-model="queryParams.beginStartTime" :placeholder="$t('请选择开始时间')" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>-->
</el-form-item>
<!-- <el-form-item :label="$t('结束时间')" prop="endStartTime">-->
......
......@@ -41,8 +41,8 @@
</el-select>
</el-form-item>
<el-form-item :label="$t('创建时间')">
<el-date-picker clearable v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd"
type="daterange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" />
<el-date-picker clearable v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" />
</el-form-item>
<el-form-item :label="$t('信用等级')" prop="department">
......@@ -258,7 +258,7 @@ export default {
this.loading = true;
// 处理查询参数
let params = {...this.queryParams};
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime', false);
// 执行查询
getMyCustomerService(params).then(response => {
this.list = response.data.list;
......
......@@ -10,11 +10,11 @@
<el-form-item :label="$t('客户')" prop="searchCustomer">
<el-input v-model="queryParams.searchCustomer" :placeholder="$t('请输入客户')" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item :label="$t('创建时间')" prop="orderNo">
<el-date-picker v-model="queryParams.beginCreateTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>{{ $t('') }}<el-date-picker v-model="queryParams.endCreateTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
<el-date-picker type="datetime" v-model="queryParams.beginCreateTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>{{ $t('') }}<el-date-picker v-model="queryParams.endCreateTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('始发地')" prop="departureId">
<el-select v-model="queryParams.departureId" :placeholder="$t('请选择始发地')" clearable>
<el-option v-for="item in exportCityList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
......@@ -47,14 +47,14 @@
<div>
<el-form-item :label="$t('预计结束时间')" prop="orderNo">
<el-date-picker v-model="queryParams.beginStopTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>{{ $t('') }}<el-date-picker v-model="queryParams.endStopTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
<el-date-picker type="datetime" v-model="queryParams.beginStopTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>{{ $t('') }}<el-date-picker type="datetime" v-model="queryParams.endStopTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
<el-form-item>
<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-form-item>
</div>
</el-form>
<!-- 操作工具栏 -->
......@@ -95,7 +95,7 @@
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="scope.row.transportId" />
</template>
</el-table-column>
<el-table-column :label="$t('预计销售额')" align="left" prop="estCost">
<template slot-scope="{row}">
......@@ -109,7 +109,7 @@
</el-table-column>
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<!--
<!--
0 取消 恢复
1 特价审批 编辑、跟进、 取消 删除
2 草稿 编辑、 删除
......@@ -131,7 +131,7 @@
<el-dropdown-item @click.native="recovery(scope.row.offerId)" v-if="[0].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{$t('恢复')}}</el-dropdown-item>
<el-dropdown-item @click.native="deleteOffer(scope.row.offerId)" v-if="[0,1,2,3,4,5,6,7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:delete']">{{$t('删除')}}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-dropdown>
</template>
</el-table-column>
</el-table>
......
......@@ -18,8 +18,7 @@
</el-form-item>
<el-form-item label="">
<dict-selector :type="DICT_TYPE.ECW_BEGINTIME_TYPE_ENDTIME" v-model="dateFilterType" defaultable style="width: 150px; margin-right: 5px" />
<el-date-picker v-model="dateFilter"
type="daterange" range-separator="-"
<el-date-picker v-model="dateFilter" type="datetimerange" range-separator="-"
:start-placeholder="$t('开始日期')"
:end-placeholder="$t('结束日期')"
value-format="yyyy-MM-dd HH:mm:ss"
......
......@@ -19,6 +19,15 @@
<el-form-item :label="$t('审核状态')" prop="registerIp">
<dict-selector v-model="queryParams.auditStatus" :type="DICT_TYPE.AUDIT_STATUS"></dict-selector>
</el-form-item>
<el-form-item :label="$t('创建时间')">
<el-date-picker
v-model="dateRangeCreateTime"
type="datetimerange"
:start-placeholder="$t('开始日期')"
value-format="yyyy-MM-dd HH:mm:ss"
:end-placeholder="$t('结束日期')">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{$t('重置')}}</el-button>
......@@ -378,8 +387,8 @@ export default {
this.loading = true;
// 处理查询参数
let params = {...this.queryParams};
this.addBeginAndEndTime(params, this.dateRangeLoginDate, 'loginDate');
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// this.addBeginAndEndTime(params, this.dateRangeLoginDate, 'loginDate');
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime', false);
// 执行查询
getUserPage(params).then(response => {
this.list = response.data.list;
......
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