Commit 942535dd authored by dragondean@qq.com's avatar dragondean@qq.com
parents a69dbff0 210991ee
...@@ -162,6 +162,19 @@ export const constantRoutes = [ ...@@ -162,6 +162,19 @@ export const constantRoutes = [
} }
] ]
}, },
{
path: '/deptTarget',
component: Layout,
hidden: true,
redirect: 'noredirect',
children: [ {
path: 'empAchievement',
component: (resolve) => require(['@/views/ecw/deptTarget/empAchievement'], resolve),
name: '员工业绩',
meta: {title: '员工业绩', activeMenu: '/deptTarget/index'}
}
]
},
{ {
path: '/node', path: '/node',
component: Layout, component: Layout,
......
...@@ -178,7 +178,8 @@ export default { ...@@ -178,7 +178,8 @@ export default {
const { bookSeaInfo } = this.shipmentObj; const { bookSeaInfo } = this.shipmentObj;
makeBillService({ makeBillService({
orderId: row.orderId, orderId: row.orderId,
zgDate: bookSeaInfo.sailTime, zgDate: '2022-09-27',
// zgDate: bookSeaInfo.sailTime,
}).then((res) => { }).then((res) => {
const { data } = res; const { data } = res;
const { titleZh = "", contentZh = "" } = data?.ladingTemplate ?? {}; const { titleZh = "", contentZh = "" } = data?.ladingTemplate ?? {};
......
...@@ -11,36 +11,50 @@ ...@@ -11,36 +11,50 @@
<el-input v-model="queryParams.name" placeholder="请输入客户名称" clearable @keyup.enter.native="handleQuery"/> <el-input v-model="queryParams.name" placeholder="请输入客户名称" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> </el-form-item>
<el-form-item label="客户等级" prop="level"> <el-form-item label="客户等级" prop="level">
<el-select v-model="queryParams.level" placeholder="请选择客户等级" clearable size="small"> <el-select clearable v-model="queryParams.level" placeholder="请选择客户等级" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)"
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="联系方式">
<el-input placeholder="请输入联系方式" v-model="queryParams.defaultContactPhone"></el-input>
</el-form-item>
<el-form-item label="客户类别" prop="level">
<dict-selector :type="DICT_TYPE.CUSTOMER_TYPE" multiple v-model="queryParams.type"></dict-selector>
</el-form-item>
<el-form-item label="客户经理" prop="customerService">
<el-select clearable v-model="queryParams.customerService" placeholder="请选择客户经理" clearable size="small">
<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="客户来源" prop="source"> <el-form-item label="客户来源" prop="source">
<el-select v-model="queryParams.source" placeholder="请选择客户来源" clearable size="small"> <el-select clearable v-model="queryParams.source" placeholder="请选择客户来源" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="客户经理" prop="customerService"> <el-form-item label="国家" prop="source">
<el-select v-model="queryParams.customerService" placeholder="请选择客户经理" clearable size="small"> <el-select clearable v-model="form.country" placeholder="请选择国家">
<el-option v-for="dict in customerServiceList" <el-option v-for="dict in countryList"
:key="dict.id" :label="dict.nickname" :value="dict.id"/> :key="dict.id" :label="dict.nameZh" :value="parseInt(dict.id)" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="客户状态" prop="status"> <el-form-item label="客户状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择客户状态" clearable size="small"> <el-select clearable v-model="queryParams.status" placeholder="请选择客户状态" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_STATUS)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_STATUS)"
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="部门" prop="department">
<el-input v-model="queryParams.department" placeholder="请输入部门" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="创建时间"> <el-form-item label="创建时间">
<el-date-picker v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd" <el-date-picker clearable v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd"
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" /> type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" />
</el-form-item> </el-form-item>
<el-form-item label="信用等级" prop="department">
<el-select clearable v-model="form.level" >
<el-option v-for="(item,index) in creditList" :label="item.nameZh" :key="index" :value="item.id" ></el-option>
</el-select>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
...@@ -57,36 +71,44 @@ ...@@ -57,36 +71,44 @@
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
v-hasPermi="['ecw:customer:export']">导出</el-button> v-hasPermi="['ecw:customer:export']">导出</el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-col :span="1.5" >
<el-button :disabled="selectCustomerList.length === 0" type="warning" size="mini" @click="batchTransferShow = true;" :loading="exportLoading"
v-hasPermi="['ecw:customer:export']">批量移交</el-button>
</el-col>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<!-- 列表 --> <!-- 列表 -->
<el-table v-loading="loading" :data="list"> <el-table ref="multipleTable" v-loading="loading" :data="list" @selection-change="handleSelectionChange">
<el-table-column
type="selection"
width="55">
</el-table-column>
<el-table-column label="客户编号" align="center" prop="number" /> <el-table-column label="客户编号" align="center" prop="number" />
<el-table-column label="客户名称" align="center" prop="name" /> <el-table-column label="客户名称" align="center" prop="name" />
<el-table-column label="客户等级" align="center" prop="level"> <el-table-column label="客户等级" align="center" prop="vipLevelNameZh">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL" :value="scope.row.level" /> <dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL" :value="scope.row.level" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="国家" align="center" prop="country"> <el-table-column label="信用等级" prop="creditLevelNameZh"></el-table-column>
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.COUNTRY" :value="scope.row.country" />
</template>
</el-table-column>
<el-table-column label="客户经理" align="center" prop="customerService" :formatter="customerServiceFn">
</el-table-column>
<el-table-column label="客户状态" align="center" prop="status"> <el-table-column label="客户状态" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_STATUS" :value="scope.row.status" /> <dict-tag :type="DICT_TYPE.CUSTOMER_STATUS" :value="scope.row.status" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="部门" align="center" prop="department" /> <el-table-column label="主联系人" prop="defaultContactName"></el-table-column>
<el-table-column label="主联系方式" prop="defaultContactPhone"></el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="180"> <el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="客户经理" align="center" prop="customerService" :formatter="customerServiceFn">
</el-table-column>
<el-table-column label="国家" align="center" prop="country" :formatter="countryFormatter"></el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
...@@ -120,6 +142,7 @@ ...@@ -120,6 +142,7 @@
<!-- 分页组件 --> <!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList"/> @pagination="getList"/>
<transfer-customer :show.sync="batchTransferShow" :customer-ids.sync="selectCustomerList"></transfer-customer>
</div> </div>
</template> </template>
...@@ -129,13 +152,18 @@ import { createCustomer, updateCustomer, deleteCustomer, getCustomer,handOverCus ...@@ -129,13 +152,18 @@ import { createCustomer, updateCustomer, deleteCustomer, getCustomer,handOverCus
import { getDictDatas, DICT_TYPE } from '@/utils/dict'; import { getDictDatas, DICT_TYPE } from '@/utils/dict';
import upload from '@/components/ImageUpload' import upload from '@/components/ImageUpload'
import {listServiceUser} from "@/api/system/user"; import {listServiceUser} from "@/api/system/user";
import {getCountryListAll} from "@/api/ecw/country";
import {getCreditPage} from "@/api/customer/credit";
import transferCustomer from "@/views/ecw/customer/transferCustomer";
export default { export default {
name: "customerToBeAssigned", name: "customerToBeAssigned",
components: { components: {
upload upload,
transferCustomer
}, },
data() { data() {
return { return {
batchTransferShow:false,
getDictDatas, getDictDatas,
DICT_TYPE, DICT_TYPE,
// 遮罩层 // 遮罩层
...@@ -186,9 +214,19 @@ export default { ...@@ -186,9 +214,19 @@ export default {
service:undefined,//客服 service:undefined,//客服
transferData:undefined,//移交数据 transferData:undefined,//移交数据
transferShow:false, transferShow:false,
creditList:[],
selectCustomerList:[],
countryList:[]
}; };
}, },
created() { created() {
getCountryListAll().then(r => {
console.log(r,'国家')
this.countryList = r.data
})
getCreditPage({page:1,rows:999}).then(r => {
this.creditList = r.data.list
})
this.getList(); this.getList();
listServiceUser().then(r=>{ listServiceUser().then(r=>{
console.log(r,'客服'); console.log(r,'客服');
...@@ -199,6 +237,13 @@ export default { ...@@ -199,6 +237,13 @@ export default {
// }) // })
}, },
methods: { methods: {
countryFormatter(row, column, cellValue) {
const country = this.countryList.find((e) => e.id === cellValue)
return country?.nameZh
},
handleSelectionChange(val){
this.selectCustomerList = val.map(i => i.id);
},
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true; this.loading = true;
...@@ -370,6 +415,14 @@ export default { ...@@ -370,6 +415,14 @@ export default {
return '' return ''
} }
} }
},
watch:{
selectCustomerList(val){
if(val.length === 0){
this.getList()
this.$refs.multipleTable.clearSelection();
}
},
} }
}; };
</script> </script>
<template>
<div class="app-container">
<!--人员目标进度-->
<el-card class="card">
<div slot="header" class="card-title">
人员目标进度
</div>
<el-form>
<el-form-item>
{{detail.deptName}}-{{getDictDataLabel(DICT_TYPE.TARGET_TYPE,detail.targetType)}}
</el-form-item>
<el-form-item label="运输方式:">{{getDictDataLabel(DICT_TYPE.TRANSPORT_TYPE,detail.transportType)}}</el-form-item>
<el-form-item label="出货渠道:">{{ getShipChannelName(detail.shippingChannel) }}</el-form-item>
<el-form-item label="部门目标:">{{detail.cubeNum}}</el-form-item>
</el-form>
</el-card>
<el-card class="card">
<el-table v-loading="loading" :data="tableList">
<el-table-column label="员工名称" align="center" width="180">
<template slot-scope="scope">
<span>{{scope.row.userName}}</span>
</template>
</el-table-column>
<el-table-column label="部门" align="center">
<template>
<span>{{detail.deptName}}</span>
</template>
</el-table-column>
<el-table-column label="目标类型" align="center" prop="targetType">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.TARGET_TYPE" :value="scope.row.targetType"/>
</template>
</el-table-column>
<el-table-column label="时间范围" align="center" prop="targetPeriodName">
<template slot-scope="scope">
<span>{{dateFormat(scope.row.startTime)}}~{{dateFormat(scope.row.endTime)}}</span>
</template>
</el-table-column>
<el-table-column label="个人目标方数" align="center" prop="personalCubeNum"/>
<el-table-column label="已完成方数" align="center" prop="personalCompleteCubeNum"/>
<el-table-column label="完成比例" align="center">
<template slot-scope="scope">
<span>{{ (scope.row.personalCompleteCubeNum/scope.row.personalCubeNum*100).toFixed(2)+'%' }}</span>
</template>
</el-table-column>
</el-table>
</el-card>
<!-- 分页组件 -->
<pagination v-show="tableTotal > 0" :total="tableTotal" :page.sync="tableQueryParams.pageNo"
:limit.sync="tableQueryParams.pageSize"
@pagination="getTableList"/>
</div>
</template>
<script>
import {
createDeptTarget,
updateDeptTarget,
deleteDeptTarget,
getDeptTarget,
getDeptTargetPage,
exportDeptTargetExcel,
getCreateInitData,
getPersonTargetPage,
myAchievementByPage
} from "@/api/ecw/deptTarget";
import {listSimpleDepts} from "@/api/system/dept";
import {getChannelList} from '@/api/ecw/channel';
import dayjs from "dayjs";
export default {
name: "DeptTarget",
components: {},
data() {
return {
// 遮罩层
loading: false,
// 导出遮罩层
exportLoading: false,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
tableTotal: 0,
// 部门业绩目标设置列表
list: [],
tableList: [],
// 弹出层标题
title: "",
detail: {
deptName: null,
targetType: null,
cubeNum: null,
shippingChannel: null,
transportType: null,
},
// 是否显示弹出层
open: false,
tableOpen: false,
dateRangeCreateTime: [],
dateRangeStartTime: [],
dateRangeEndTime: [],
deptData: [],
deptArr: [],
channelList: [],
monthList: [],
quarterList: [],
yearList: [],
targetPeriod: [],
// 查询参数
queryParams: {
pageNo: 1,
pageSize: 10,
beginStartTime:null,
transportType: null,
shippingChannel: null,
endStartTime: null,
},
tableQueryParams: {
pageNo: 1,
pageSize: 10,
id: null,
},
// 表单参数
form: {},
// 表单校验
rules: {
deptId: [{required: true, message: "部门ID不能为空", trigger: "blur"}],
targetType: [{required: true, message: "目标类型不能为空", trigger: "change"}],
cubeNum: [{required: true, message: "立方数不能为空", trigger: "blur"}],
}
};
},
computed: {
getShipChannelName() {
return shippingChannelId => {
for (let index in this.channelList) {
let channelItem = this.channelList[index];
if (channelItem.channelId == shippingChannelId) {
return channelItem.nameZh;
}
}
return '/'
}
}
},
created() {
if (this.$route.query) {
this.tableQueryParams.id = this.$route.query.row.id
this.detail=this.$route.query.row
this.getTableList();
this.getChannelList();
}
},
methods: {
getTableList() {
getPersonTargetPage(this.tableQueryParams).then(res => {
this.tableList = res.data.list;
this.tableTotal = res.data.total;
});
},
getChannelList() {
getChannelList().then(res => this.channelList = res.data)
},
dateFormat(val) {
return dayjs(val).format("YYYY-MM-DD");
},
changeList(val) {
if (val === 1) {
this.form.targetPeriodName = undefined;
this.targetPeriod = this.monthList;
} else if (val === 2) {
this.form.targetPeriodName = undefined;
this.targetPeriod = this.quarterList;
} else {
this.form.targetPeriodName = undefined;
this.targetPeriod = this.yearList;
}
},
setTime(item) {
this.targetPeriod.forEach((i, index) => {
if (i.name === item) {
this.form.startTime = i.startDate;
this.form.endTime = i.endDate;
}
})
},
/** 查询列表 */
getList() {
this.loading = true;
// 执行查询
myAchievementByPage(this.queryParams).then(response => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 取消按钮 */
cancel() {
this.open = false;
this.reset();
},
/** 表单重置 */
reset() {
this.form = {
id: undefined,
deptId: undefined,
targetType: undefined,
targetPeriodName: undefined,
startTime: undefined,
endTime: undefined,
transportType: undefined,
shippingChannel: undefined,
cubeNum: undefined,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRangeCreateTime = [];
this.dateRangeStartTime = [];
this.dateRangeEndTime = [];
this.resetForm("queryForm");
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
this.targetPeriod = this.monthList;
this.reset();
this.open = true;
this.title = "添加部门业绩目标设置";
},
/** 查看人员目标情况 */
handleView(row) {
this.detail = row;
this.tableQueryParams.id = row.id;
this.getTableList();
this.tableOpen = true;
},
getTableList() {
getPersonTargetPage(this.tableQueryParams).then(res => {
this.tableList = res.data.list;
this.tableTotal = res.data.total;
});
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id;
getDeptTarget(id).then(response => {
this.form = response.data;
if (response.data.targetType === 1) {
this.targetPeriod = this.monthList;
} else if (response.data.targetType === 2) {
this.targetPeriod = this.quarterList;
} else {
this.targetPeriod = this.yearList;
}
this.open = true;
this.title = "修改部门业绩目标设置";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (!valid) {
return;
}
// 修改的提交
if (this.form.id != null) {
updateDeptTarget(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
return;
}
// 添加的提交
createDeptTarget(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
});
},
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id;
this.$modal.confirm('是否确认删除部门业绩目标设置编号为"' + id + '"的数据项?').then(function () {
return deleteDeptTarget(id);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
});
},
/** 导出按钮操作 */
handleExport() {
// 处理查询参数
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
this.addBeginAndEndTime(params, this.dateRangeStartTime, 'startTime');
this.addBeginAndEndTime(params, this.dateRangeEndTime, 'endTime');
// 执行导出
this.$modal.confirm('是否确认导出所有部门业绩目标设置数据项?').then(() => {
this.exportLoading = true;
return exportDeptTargetExcel(params);
}).then(response => {
this.$download.excel(response, '${table.classComment}.xls');
this.exportLoading = false;
}).catch(() => {
});
}
}
};
</script>
<style scoped>
.card {
margin-bottom: 20px;
}
.card-title{
font-size: 18px;
font-weight: bold;
}
.el-dropdown-link {
cursor: pointer;
color: #409EFF;
}
.el-icon-arrow-down {
font-size: 12px;
}
.el-form-item {
margin-bottom: 0px;
}
</style>
...@@ -40,7 +40,9 @@ ...@@ -40,7 +40,9 @@
<el-table v-loading="loading" :data="list"> <el-table v-loading="loading" :data="list">
<el-table-column label="目标名称" align="center" width="180"> <el-table-column label="目标名称" align="center" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.deptName}}{{scope.row.targetPeriodName}}目标</span> <router-link :to="{path: '/deptTarget/empAchievement',query: {row: scope.row}}" class="link-type">
<span>{{scope.row.deptName}}{{scope.row.targetPeriodName}}目标</span>
</router-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="部门" align="center" prop="deptName"/> <el-table-column label="部门" align="center" prop="deptName"/>
...@@ -80,8 +82,8 @@ ...@@ -80,8 +82,8 @@
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['ecw:dept-target:delete']">删除 v-hasPermi="['ecw:dept-target:delete']">删除
</el-button> </el-button>
<el-button size="mini" type="text" icon="el-icon-search" @click="handleView(scope.row)" <!-- <el-button size="mini" type="text" icon="el-icon-search" @click="handleView(scope.row)"-->
v-hasPermi="['ecw:dept-target:create']"></el-button> <!-- v-hasPermi="['ecw:dept-target:create']"></el-button>-->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -127,49 +129,6 @@ ...@@ -127,49 +129,6 @@
</div> </div>
</el-dialog> </el-dialog>
<!--人员目标进度-->
<el-dialog title="人员目标进度" :visible.sync="tableOpen" width="1000px" append-to-body>
<div><span><b>{{detail.deptName}}-{{getDictDataLabel(DICT_TYPE.TARGET_TYPE,detail.targetType)}}</b></span></div>
<div>
<span>运输方式:</span><span>{{getDictDataLabel(DICT_TYPE.TRANSPORT_TYPE,detail.transportType)}}</span>
<span>出货渠道:</span><span>{{ getShipChannelName(detail.shippingChannel) }}</span>
<span>部门目标:</span><span>{{detail.cubeNum}}</span>
</div>
<el-table v-loading="loading" :data="tableList">
<el-table-column label="员工名称" align="center" width="180">
<template slot-scope="scope">
<span>{{scope.row.userName}}</span>
</template>
</el-table-column>
<el-table-column label="部门" align="center">
<template>
<span>{{detail.deptName}}</span>
</template>
</el-table-column>
<el-table-column label="目标类型" align="center" prop="targetType">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.TARGET_TYPE" :value="scope.row.targetType"/>
</template>
</el-table-column>
<el-table-column label="时间范围" align="center" prop="targetPeriodName">
<template slot-scope="scope">
<span>{{dateFormat(scope.row.startTime)}}~{{dateFormat(scope.row.endTime)}}</span>
</template>
</el-table-column>
<el-table-column label="个人目标方数" align="center" prop="personalCubeNum"/>
<el-table-column label="已完成方数" align="center" prop="personalCompleteCubeNum"/>
<el-table-column label="完成比例" align="center">
<template slot-scope="scope">
<span>{{ (scope.row.personalCompleteCubeNum/scope.row.personalCubeNum*100).toFixed(2)+'%' }}</span>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="tableTotal > 0" :total="tableTotal" :page.sync="tableQueryParams.pageNo"
:limit.sync="tableQueryParams.pageSize"
@pagination="getTableList"/>
</el-dialog>
</div> </div>
</template> </template>
......
...@@ -159,8 +159,8 @@ ...@@ -159,8 +159,8 @@
v-model="form.openInvoice" v-model="form.openInvoice"
placeholder="请选择是否需要开票" placeholder="请选择是否需要开票"
> >
<el-option :value="1" label="需要"></el-option> <el-option :value="1" label=""></el-option>
<el-option :value="0" label="不需要"></el-option> <el-option :value="0" label=""></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
...@@ -377,7 +377,8 @@ ...@@ -377,7 +377,8 @@
</el-card> </el-card>
</el-form> </el-form>
<div slot="footer" style="margin: 20px 0"> <div slot="footer" style="margin: 20px 0">
<el-button type="primary" :loading="saveBtnLoading" @click="submitForm(1)"> </el-button> <el-button v-if="id==0" type="primary" :loading="saveBtnLoading" @click="submitForm(1)"> </el-button>
<el-button v-else type="primary" :loading="saveBtnLoading" @click="$store.dispatch('tagsView/delCurrentView')"> </el-button>
<el-button type="primary" :loading="saveBtnLoading" @click="submitForm(0)">{{ id ? '修 改' : '新 增' }}</el-button> <el-button type="primary" :loading="saveBtnLoading" @click="submitForm(0)">{{ id ? '修 改' : '新 增' }}</el-button>
</div> </div>
<el-dialog <el-dialog
...@@ -596,7 +597,7 @@ ...@@ -596,7 +597,7 @@
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="selectListRow.currencyId" /> <dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="selectListRow.currencyId" />
</el-form-item> </el-form-item>
<el-form-item label="优惠金额"> <el-form-item label="优惠金额">
<el-input v-model="discountForm.discountTotal" style="width: 300px"></el-input> <el-input v-model="discountForm.discountTotal" type="number" min="0" :max="selectListRow.totalAmount" @input="checkDiscount" style="width: 300px" ></el-input>
&nbsp;&nbsp; &nbsp;&nbsp;
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="selectListRow.currencyId" /> <dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="selectListRow.currencyId" />
</el-form-item> </el-form-item>
...@@ -698,6 +699,7 @@ export default { ...@@ -698,6 +699,7 @@ export default {
let that = this; let that = this;
if (that.$route.query.id) { if (that.$route.query.id) {
this.id = this.$route.query.id; this.id = this.$route.query.id;
console.log(this.id)
getReceiptInfoByIds({ id: this.id }).then(res => { getReceiptInfoByIds({ id: this.id }).then(res => {
res.data.rateValidateDate = dayjs(res.data.rateValidateDate).format('YYYY-MM-DD HH:mm:ss') res.data.rateValidateDate = dayjs(res.data.rateValidateDate).format('YYYY-MM-DD HH:mm:ss')
this.form = Object.assign({}, this.form, res.data) this.form = Object.assign({}, this.form, res.data)
...@@ -808,6 +810,12 @@ export default { ...@@ -808,6 +810,12 @@ export default {
} }
}, },
methods: { methods: {
checkDiscount(e){
console.log(e)
if(e>this.selectListRow.totalAmount){
this.discountForm.discountTotal = this.selectListRow.totalAmount
}
},
currencyIdChange(val, row, index) { currencyIdChange(val, row, index) {
row.collectionCurrencyId = val row.collectionCurrencyId = val
if (val == row.currencyId) row.collectionRate = 1 if (val == row.currencyId) row.collectionRate = 1
...@@ -819,7 +827,7 @@ export default { ...@@ -819,7 +827,7 @@ export default {
if (row.currencyId == 3 && val == 1) row.collectionRate = this.NANtoUS() if (row.currencyId == 3 && val == 1) row.collectionRate = this.NANtoUS()
if (row.currencyId == 3 && val == 2) row.collectionRate = this.NANtoRMB() if (row.currencyId == 3 && val == 2) row.collectionRate = this.NANtoRMB()
} }
this.rateChange(row, index) this.rateChange(row, index)
}, },
writeOffRateChange(row, index) { writeOffRateChange(row, index) {
...@@ -835,13 +843,13 @@ export default { ...@@ -835,13 +843,13 @@ export default {
setTimeout(() => { setTimeout(() => {
// 收款总计 // 收款总计
const dollarList = this.form.receiptAccountList.filter(v => v.collectionCurrencyId == 1) const dollarList = this.form.receiptAccountList.filter(v => v.collectionCurrencyId == 1)
const dollar = dollarList.reduce((total, currentValue) => NP.plus(total, NP.minus(currentValue.receivableAmount, currentValue.discountTotal || 0) || 0), 0) const dollar = dollarList.reduce((total, currentValue) => NP.plus(total, currentValue.collectionAmount), 0)
const rmbList = this.form.receiptAccountList.filter(v => v.collectionCurrencyId == 2) const rmbList = this.form.receiptAccountList.filter(v => v.collectionCurrencyId == 2)
const rmb = rmbList.reduce((total, currentValue) => NP.plus(total, NP.minus(currentValue.receivableAmount, currentValue.discountTotal || 0) || 0), 0) const rmb = rmbList.reduce((total, currentValue) => NP.plus(total, currentValue.collectionAmount), 0)
const nairaList = this.form.receiptAccountList.filter(v => v.collectionCurrencyId == 3) const nairaList = this.form.receiptAccountList.filter(v => v.collectionCurrencyId == 3)
const naira = nairaList.reduce((total, currentValue) => NP.plus(total, NP.minus(currentValue.receivableAmount, currentValue.discountTotal || 0) || 0), 0) const naira = nairaList.reduce((total, currentValue) => NP.plus(total, currentValue.collectionAmount), 0)
this.form.receiptAccountList[this.form.receiptAccountList.length -1].collectionAmount = [dollar, rmb, naira] this.form.receiptAccountList[this.form.receiptAccountList.length -1].collectionAmount = [dollar, rmb, naira]
this.$set(this.form, 'receiptAccountList', [...this.form.receiptAccountList]) this.$set(this.form, 'receiptAccountList', [...this.form.receiptAccountList])
...@@ -857,7 +865,7 @@ export default { ...@@ -857,7 +865,7 @@ export default {
discountDollar = dollarList.reduce((total, currentValue) => NP.plus(total, currentValue.discountTotal || 0), 0) discountDollar = dollarList.reduce((total, currentValue) => NP.plus(total, currentValue.discountTotal || 0), 0)
const t = copyList.find(v => v.currencyId == 1) const t = copyList.find(v => v.currencyId == 1)
this.form.receiptAccountList = [ this.form.receiptAccountList = [
{ {
discountTotal: discountDollar, discountTotal: discountDollar,
currencyId: 1, currencyId: 1,
receivableAmount: dollar, receivableAmount: dollar,
...@@ -877,7 +885,7 @@ export default { ...@@ -877,7 +885,7 @@ export default {
const t = copyList.find(v => v.currencyId == 2) const t = copyList.find(v => v.currencyId == 2)
this.form.receiptAccountList = [ this.form.receiptAccountList = [
...this.form.receiptAccountList, ...this.form.receiptAccountList,
{ {
discountTotal: discountRmb, discountTotal: discountRmb,
currencyId: 2, currencyId: 2,
receivableAmount: rmb, receivableAmount: rmb,
...@@ -897,7 +905,7 @@ export default { ...@@ -897,7 +905,7 @@ export default {
const t = copyList.find(v => v.currencyId == 3) const t = copyList.find(v => v.currencyId == 3)
this.form.receiptAccountList = [ this.form.receiptAccountList = [
...this.form.receiptAccountList, ...this.form.receiptAccountList,
{ {
discountTotal: discountNaira, discountTotal: discountNaira,
currencyId: 3, currencyId: 3,
receivableAmount: naira, receivableAmount: naira,
...@@ -996,7 +1004,7 @@ export default { ...@@ -996,7 +1004,7 @@ export default {
}) })
}, },
getReceivableListByIds() { getReceivableListByIds() {
}, },
cancelDiscount() { cancelDiscount() {
this.discountVisible = false this.discountVisible = false
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<el-form-item label="柜号:"> <el-form-item label="柜号:">
<el-input <el-input
style="max-width: 188px" style="max-width: 188px"
v-model="queryParams.orderNo" v-model="queryParams.containerNo"
placeholder="请输入柜号" placeholder="请输入柜号"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<el-form-item label="自编号:"> <el-form-item label="自编号:">
<el-input <el-input
style="max-width: 188px" style="max-width: 188px"
v-model="queryParams.orderNo" v-model="queryParams.payableNo"
placeholder="请输入自编号" placeholder="请输入自编号"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
<el-select <el-select
v-model="queryParams.departureId" v-model="queryParams.departureId"
placeholder="请选择始发城市" placeholder="请选择始发城市"
clearable
> >
<el-option <el-option
v-for="item in expoerCityList" v-for="item in expoerCityList"
...@@ -50,6 +51,7 @@ ...@@ -50,6 +51,7 @@
<el-select <el-select
v-model="queryParams.objectiveId" v-model="queryParams.objectiveId"
placeholder="请选择目的城市" placeholder="请选择目的城市"
clearable
> >
<el-option <el-option
v-for="item in importCityList" v-for="item in importCityList"
...@@ -64,6 +66,7 @@ ...@@ -64,6 +66,7 @@
:type="DICT_TYPE.ECW_TRANSPORT_TYPE" :type="DICT_TYPE.ECW_TRANSPORT_TYPE"
v-model="queryParams.transportId" v-model="queryParams.transportId"
formatter="number" formatter="number"
clearable
/> />
</el-form-item> </el-form-item>
</el-row> </el-row>
......
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
<el-select <el-select
v-model="queryParams.departureId" v-model="queryParams.departureId"
placeholder="请选择始发城市" placeholder="请选择始发城市"
clearable
> >
<el-option <el-option
v-for="item in expoerCityList" v-for="item in expoerCityList"
...@@ -55,6 +56,7 @@ ...@@ -55,6 +56,7 @@
<el-select <el-select
v-model="queryParams.objectiveId" v-model="queryParams.objectiveId"
placeholder="请选择目的城市" placeholder="请选择目的城市"
clearable
> >
<el-option <el-option
v-for="item in importCityList" v-for="item in importCityList"
...@@ -69,12 +71,14 @@ ...@@ -69,12 +71,14 @@
:type="DICT_TYPE.ECW_TRANSPORT_TYPE" :type="DICT_TYPE.ECW_TRANSPORT_TYPE"
v-model="queryParams.transportId" v-model="queryParams.transportId"
formatter="number" formatter="number"
clearable
/> />
</el-form-item> </el-form-item>
<el-form-item label="控货:"> <el-form-item label="控货:">
<dict-selector <dict-selector
:type="DICT_TYPE.INFRA_BOOLEAN_STRING" :type="DICT_TYPE.INFRA_BOOLEAN_STRING"
v-model="queryParams.isCargoControl" v-model="queryParams.isCargoControl"
clearable
/> />
</el-form-item> </el-form-item>
</el-row> </el-row>
...@@ -83,12 +87,14 @@ ...@@ -83,12 +87,14 @@
<dict-selector <dict-selector
:type="DICT_TYPE.ORDER_STATUS" :type="DICT_TYPE.ORDER_STATUS"
v-model="queryParams.status" v-model="queryParams.status"
clearable
/> />
</el-form-item> </el-form-item>
<el-form-item label="报关方式:"> <el-form-item label="报关方式:">
<dict-selector <dict-selector
:type="DICT_TYPE.ECW_CUSTOMS_TYPE" :type="DICT_TYPE.ECW_CUSTOMS_TYPE"
v-model="queryParams.customsType" v-model="queryParams.customsType"
clearable
/> />
</el-form-item> </el-form-item>
<el-form-item label="订单号:"> <el-form-item label="订单号:">
...@@ -133,12 +139,14 @@ ...@@ -133,12 +139,14 @@
<dict-selector <dict-selector
:type="DICT_TYPE.FEE_TYPE" :type="DICT_TYPE.FEE_TYPE"
v-model="queryParams.feeType" v-model="queryParams.feeType"
clearable
></dict-selector> ></dict-selector>
</el-form-item> </el-form-item>
<el-form-item label="发货人:"> <el-form-item label="发货人:">
<customer-selector <customer-selector
v-model="queryParams.consignorNameOrPhone" v-model="queryParams.consignorNameOrPhone"
@change="consignor = $event" @change="consignor = $event"
clearable
/> />
</el-form-item> </el-form-item>
<!-- <el-form-item label="发货人:" > <!-- <el-form-item label="发货人:" >
...@@ -151,6 +159,7 @@ ...@@ -151,6 +159,7 @@
<customer-selector <customer-selector
v-model="queryParams.consigneeNameOrPhone" v-model="queryParams.consigneeNameOrPhone"
@change="consignor = $event" @change="consignor = $event"
clearable
/> />
</el-form-item> </el-form-item>
<el-form-item label="自编号:"> <el-form-item label="自编号:">
...@@ -189,7 +198,7 @@ ...@@ -189,7 +198,7 @@
<el-table-column label="唛头" align="center" prop="marks" /> <el-table-column label="唛头" align="center" prop="marks" />
<el-table-column label="品名" align="center" prop="title"> <el-table-column label="品名" align="center" prop="title">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.titleZh + "(" + scope.row.titleEn + ")" }} {{ scope.row.titleZh? (scope.row.titleZh + "(" + scope.row.titleEn + ")"):'' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="箱数" align="center" prop="num" /> <el-table-column label="箱数" align="center" prop="num" />
......
...@@ -11,36 +11,50 @@ ...@@ -11,36 +11,50 @@
<el-input v-model="queryParams.name" placeholder="请输入客户名称" clearable @keyup.enter.native="handleQuery"/> <el-input v-model="queryParams.name" placeholder="请输入客户名称" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> </el-form-item>
<el-form-item label="客户等级" prop="level"> <el-form-item label="客户等级" prop="level">
<el-select v-model="queryParams.level" placeholder="请选择客户等级" clearable size="small"> <el-select clearable v-model="queryParams.level" placeholder="请选择客户等级" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)"
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="联系方式">
<el-input placeholder="请输入联系方式" v-model="queryParams.defaultContactPhone"></el-input>
</el-form-item>
<el-form-item label="客户类别" prop="level">
<dict-selector :type="DICT_TYPE.CUSTOMER_TYPE" multiple v-model="queryParams.type"></dict-selector>
</el-form-item>
<el-form-item label="客户经理" prop="customerService">
<el-select clearable v-model="queryParams.customerService" placeholder="请选择客户经理" clearable size="small">
<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="客户来源" prop="source"> <el-form-item label="客户来源" prop="source">
<el-select v-model="queryParams.source" placeholder="请选择客户来源" clearable size="small"> <el-select clearable v-model="queryParams.source" placeholder="请选择客户来源" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="客户经理" prop="customerService"> <el-form-item label="国家" prop="source">
<el-select v-model="queryParams.customerService" placeholder="请选择客户经理" clearable size="small"> <el-select clearable v-model="form.country" placeholder="请选择国家">
<el-option v-for="dict in customerServiceList" <el-option v-for="dict in countryList"
:key="dict.id" :label="dict.nickname" :value="dict.id"/> :key="dict.id" :label="dict.nameZh" :value="parseInt(dict.id)" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="客户状态" prop="status"> <el-form-item label="客户状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择客户状态" clearable size="small"> <el-select clearable v-model="queryParams.status" placeholder="请选择客户状态" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_STATUS)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_STATUS)"
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="部门" prop="department">
<el-input v-model="queryParams.department" placeholder="请输入部门" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="创建时间"> <el-form-item label="创建时间">
<el-date-picker v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd" <el-date-picker clearable v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd"
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" /> type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" />
</el-form-item> </el-form-item>
<el-form-item label="信用等级" prop="department">
<el-select clearable v-model="form.level" >
<el-option v-for="(item,index) in creditList" :label="item.nameZh" :key="index" :value="item.id" ></el-option>
</el-select>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
...@@ -73,29 +87,27 @@ ...@@ -73,29 +87,27 @@
</el-table-column> </el-table-column>
<el-table-column label="客户编号" align="center" prop="number" /> <el-table-column label="客户编号" align="center" prop="number" />
<el-table-column label="客户名称" align="center" prop="name" /> <el-table-column label="客户名称" align="center" prop="name" />
<el-table-column label="客户等级" align="center" prop="level"> <el-table-column label="客户等级" align="center" prop="vipLevelNameZh">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL" :value="scope.row.level" /> <dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL" :value="scope.row.level" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="国家" align="center" prop="country"> <el-table-column label="信用等级" prop="creditLevelNameZh"></el-table-column>
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.COUNTRY" :value="scope.row.country" />
</template>
</el-table-column>
<el-table-column label="客户经理" align="center" prop="customerService" :formatter="customerServiceFn">
</el-table-column>
<el-table-column label="客户状态" align="center" prop="status"> <el-table-column label="客户状态" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_STATUS" :value="scope.row.status" /> <dict-tag :type="DICT_TYPE.CUSTOMER_STATUS" :value="scope.row.status" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="部门" align="center" prop="department" /> <el-table-column label="主联系人" prop="defaultContactName"></el-table-column>
<el-table-column label="主联系方式" prop="defaultContactPhone"></el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="180"> <el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="客户经理" align="center" prop="customerService" :formatter="customerServiceFn">
</el-table-column>
<el-table-column label="国家" align="center" prop="country" :formatter="countryFormatter"></el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-folder-add" @click="distribution(scope.row)">移交</el-button> <el-button size="mini" type="text" icon="el-icon-folder-add" @click="distribution(scope.row)">移交</el-button>
...@@ -134,6 +146,8 @@ import { createCustomer, updateCustomer, deleteCustomer,handOverCustomer,getPubl ...@@ -134,6 +146,8 @@ import { createCustomer, updateCustomer, deleteCustomer,handOverCustomer,getPubl
import { getDictDatas, DICT_TYPE } from '@/utils/dict'; import { getDictDatas, DICT_TYPE } from '@/utils/dict';
import upload from '@/components/ImageUpload' import upload from '@/components/ImageUpload'
import {listServiceUser} from "@/api/system/user"; import {listServiceUser} from "@/api/system/user";
import {getCountryListAll} from "@/api/ecw/country";
import {getCreditPage} from "@/api/customer/credit";
export default { export default {
name: "customerToBeAssigned", name: "customerToBeAssigned",
components: { components: {
...@@ -193,6 +207,8 @@ export default { ...@@ -193,6 +207,8 @@ export default {
transferShow:false, transferShow:false,
multipleSelection:[], multipleSelection:[],
isBatch:false, isBatch:false,
countryList:[],
creditList:[]
}; };
}, },
created() { created() {
...@@ -201,11 +217,21 @@ export default { ...@@ -201,11 +217,21 @@ export default {
console.log(r,'客服'); console.log(r,'客服');
this.customerServiceList = r.data; this.customerServiceList = r.data;
}) })
getCountryListAll().then(r => {
this.countryList = r.data
})
getCreditPage({page:1,rows:999}).then(r => {
this.creditList = r.data.list
})
// getNodeList().then(r => { // getNodeList().then(r => {
// this.nodeList = r.data // this.nodeList = r.data
// }) // })
}, },
methods: { methods: {
countryFormatter(row, column, cellValue) {
const country = this.countryList.find((e) => e.id === cellValue)
return country?.nameZh
},
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true; this.loading = true;
......
...@@ -196,6 +196,7 @@ export default { ...@@ -196,6 +196,7 @@ export default {
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true; this.loading = true;
this.list = []
// 处理查询参数 // 处理查询参数
let params = {...this.queryParams} let params = {...this.queryParams}
// 执行查询 // 执行查询
...@@ -203,7 +204,7 @@ export default { ...@@ -203,7 +204,7 @@ export default {
this.list = response.data.list; this.list = response.data.list;
this.total = response.data.total; this.total = response.data.total;
this.loading = false; this.loading = false;
this.reset() // this.reset()
}); });
}, },
/** 表单重置 */ /** 表单重置 */
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<el-divider></el-divider> <el-divider></el-divider>
<el-form inline label-width="100px"> <el-form inline label-width="100px">
<el-form-item label="订单号"><div class="content"> <el-form-item label="订单号"><div class="content">
<el-input v-model.trim="params.relateOrderNo"></el-input> <el-input v-model.trim="params.mutualOrderNo"></el-input>
</div></el-form-item> </div></el-form-item>
<el-form-item><div class="content"> <el-form-item><div class="content">
<el-button @click="getList">查询</el-button> <el-button @click="getList">查询</el-button>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<el-form inline label-width="85px" label-position="left"> <el-form inline label-width="85px" label-position="left">
<el-form-item label="订单号"> <el-form-item label="订单号">
<div class="content"> <div class="content">
<el-input v-model.trim="params.relateOrderNo"></el-input> <el-input v-model.trim="params.mutualOrderNo"></el-input>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
......
...@@ -278,6 +278,12 @@ ...@@ -278,6 +278,12 @@
<!--设置服务--> <!--设置服务-->
<el-dialog title="设置服务" :visible.sync="serviceOpen" width="1000px" append-to-body> <el-dialog title="设置服务" :visible.sync="serviceOpen" width="1000px" append-to-body>
<div style="font-size:large">
线路:{{this.startName}}到{{this.destName}}<span style="margin-left:20px">运输方式:{{transportName(this.lineform.transportType)}}</span>
</div>
<br/>
<el-form ref="form" :model="lineform" :rules="rules" label-width="120px"> <el-form ref="form" :model="lineform" :rules="rules" label-width="120px">
<el-form-item label="始发港服务"> <el-form-item label="始发港服务">
<el-checkbox-group v-model="lineform.otherService"> <el-checkbox-group v-model="lineform.otherService">
...@@ -501,6 +507,8 @@ export default { ...@@ -501,6 +507,8 @@ export default {
form: {checkList:[],}, form: {checkList:[],},
ladingform: {prefixCounter:null,titleZh:null,contentZh:null,account:null,acctArr:[]}, ladingform: {prefixCounter:null,titleZh:null,contentZh:null,account:null,acctArr:[]},
lineform: {otherService:[]}, lineform: {otherService:[]},
startName:'',
destName:'',
// 表单校验 // 表单校验
rules: { rules: {
...@@ -785,6 +793,11 @@ export default { ...@@ -785,6 +793,11 @@ export default {
}, },
serviceClick(row) { serviceClick(row) {
if(this.routeQueryParam.tradeType == 1) {
this.destName = row.titleZh;
} else {
this.startName = row.titleZh;
}
if(row.otherService) { if(row.otherService) {
this.lineform.otherService = Array.isArray(row.otherService) ? row.otherService : row.otherService?.split(",") ?? []; this.lineform.otherService = Array.isArray(row.otherService) ? row.otherService : row.otherService?.split(",") ?? [];
} else { } else {
...@@ -792,6 +805,7 @@ export default { ...@@ -792,6 +805,7 @@ export default {
} }
this.serviceOpen = true; this.serviceOpen = true;
this.lineform.lineId = row.lineId; this.lineform.lineId = row.lineId;
this.lineform.transportType = row.transportType;
}, },
submitLineForm() { submitLineForm() {
...@@ -835,7 +849,13 @@ export default { ...@@ -835,7 +849,13 @@ export default {
this.routeQueryParam.pageNo = 1; this.routeQueryParam.pageNo = 1;
this.showRouteList = true; this.showRouteList = true;
this.routeLoadig = true; this.routeLoadig = true;
if(tradeType == 1) {
this.startName = row.titleZh;
} else {
this.destName = row.titleZh;
}
this.getRouteList(); this.getRouteList();
}, },
......
...@@ -270,6 +270,7 @@ export default { ...@@ -270,6 +270,7 @@ export default {
const id = row.id; const id = row.id;
getZhongPao(id).then(response => { getZhongPao(id).then(response => {
const form = response.data; const form = response.data;
// console.log(form);
form.objectiveIds = form.objectiveIds && form.objectiveIds.length > 0 ? form.objectiveIds.split(',') : [] form.objectiveIds = form.objectiveIds && form.objectiveIds.length > 0 ? form.objectiveIds.split(',') : []
...@@ -286,6 +287,7 @@ export default { ...@@ -286,6 +287,7 @@ export default {
} }
let form = this.form let form = this.form
form.objectiveIds = form.objectiveIds?.join(',') form.objectiveIds = form.objectiveIds?.join(',')
form.transportTypes = form.transportTypes?.join(',');
// 修改的提交 // 修改的提交
if (this.form.id != null) { if (this.form.id != null) {
updateZhongPao(this.form).then(response => { updateZhongPao(this.form).then(response => {
...@@ -297,6 +299,8 @@ export default { ...@@ -297,6 +299,8 @@ export default {
return; return;
} }
// 添加的提交 // 添加的提交
// console.log(this.form);
createZhongPao(this.form).then(response => { createZhongPao(this.form).then(response => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
......
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