Commit 392f6865 authored by dcy's avatar dcy

佣金列表佣金详情页面2

parent 970079b6
......@@ -48,7 +48,23 @@ export function exportCustomerCommissionInfoExcel(query) {
return request({
url: '/ecw/customer-commission-info/export-excel',
method: 'get',
params: query,
query: query,
responseType: 'blob'
})
}
//商品类型列表
export function itemTypeListApi(query){
return request({
url:'/ecw/product-attr/list',
method:'get',
query:query
})
}
//
export function customerDropDownList(query){
return request({
url:'/ecw/customer/select',
method:'get',
query,
})
}
......@@ -2,9 +2,9 @@
<el-select v-if="options" v-model="selectVal" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
:key="item[valueKey]"
:label="item[labelKey]"
:value="item[valueKey]">
</el-option>
</el-select>
</template>
......@@ -13,8 +13,19 @@
export default {
name: "customSelectorsDictionary",
props:{
options:Array,
value:String
options:{
type:Array,
default:()=>[]
},
value:String,
labelKey:{
type:String,
default:'label'
},
valueKey:{
type:String,
default: 'value',
},
},
data(){
return{
......
<template>
<el-form>
<el-form-item label="商品类型">
<div class="shanping-type">
<div class="tool">
<el-input placeholder="商品"></el-input>
</div>
<div class="box">
<div class="label">
商品类型
</div>
<div class="custom">
<custom-selectors-dictionary label-key="attrName" value-key="id" :options="commodityType"></custom-selectors-dictionary>
</div>
</div>
<div class="box">
<div class="label">
佣金
</div>
<div class="custom">
<el-input></el-input>
</div>
<div class="custom">
<custom-selectors-dictionary :options="getDictDatas(DICT_TYPE.COMMISSION_CURRENCY_TYPE)"></custom-selectors-dictionary>
</div>
<div class="custom">
<custom-selectors-dictionary :options="getDictDatas(DICT_TYPE.COMMISSION_UNIT)"></custom-selectors-dictionary>
</div>
</div>
<div>
<el-button type="primary">添加</el-button>
</div>
</div>
</el-form-item>
</el-form>
</template>
<script>
//暗涌加产品
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
import customSelectorsDictionary from "@/views/ecw/customerCommissionInfo/customSelectorsDictionary";
export default {
name: "darkServantAndProduct",
components:{
customSelectorsDictionary
},
props:{
commodityType:{
type:Array,
default:()=>[]
}
},
data(){
return{
DICT_TYPE,
getDictDatas,
}
},
mounted() {
console.log(this.commodityType,'commodityType')
},
watch:{
}
}
</script>
<style scoped lang="scss">
.shanping-type {
display: flex;
.tool {
width: 150px;
}
.box {
margin-left: 20px;
display: flex;
.label {
width: 80px;
vertical-align: middle;
font-size: 14px;
color: #606266;
font-weight: 700;
}
.custom {
width: 150px;
margin-right:10px;
}
}
}
</style>
<template>
<div>
<div class="column">
<div class="label">
佣金:
</div>
<div class="content">
<div class="item label"></div>
<div class="item"><el-input></el-input></div>
<div class="item"> <custom-selectors-dictionary :options="getDictDatas(DICT_TYPE.COMMISSION_CURRENCY_TYPE)"></custom-selectors-dictionary></div>
<div class="item">
<custom-selectors-dictionary :options="getDictDatas(DICT_TYPE.COMMISSION_UNIT)"></custom-selectors-dictionary>
</div>
</div>
<div class="content">
<div class="item label"></div>
<div class="item"><el-input></el-input></div>
<div class="item"> <custom-selectors-dictionary :options="getDictDatas(DICT_TYPE.COMMISSION_CURRENCY_TYPE)"></custom-selectors-dictionary></div>
<div class="item">
<custom-selectors-dictionary :options="getDictDatas(DICT_TYPE.COMMISSION_UNIT)"></custom-selectors-dictionary>
</div>
</div>
<el-button>添加</el-button>
</div>
</div>
</template>
<script>
//暗佣-达标返佣
import customSelectorsDictionary from "@/views/ecw/customerCommissionInfo/customSelectorsDictionary";
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
export default {
name: "darkServantAndRebate",
components:{
customSelectorsDictionary
},
data(){
return{
DICT_TYPE,
getDictDatas
}
}
}
</script>
<style scoped lang="scss">
.column{
display: flex;
align-items: center;
.label{
width: 50px;
white-space: nowrap;
vertical-align: middle;
font-size: 14px;
color: #606266;
font-weight: 700;
}
}
.content{
display: flex;
align-items: center;
margin-right: 10px;
.item{
text-align: right;
width: 150px;
margin: 0 5px;
}
.label{
width: 50px;
}
}
</style>
......@@ -4,7 +4,22 @@
<el-row>
<el-col :span="24">
<el-form-item label="客户名称">
<el-input></el-input>
<el-select
v-model="customerForm.name"
filterable
remote
reserve-keyword
placeholder="请输入关键词"
:remote-method="remoteMethod">
<el-option
v-for="item in customeList"
:key="item.id"
:value="item.id.toString()"
:label="item.name"
>
{{item.number}}|{{item.name}}|{{item.defaultContactPhone}}
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
......@@ -33,7 +48,7 @@
<el-col :span="5">
<el-form-item label="报关方式">
<div style="width: 130px;">
<!-- <custom-selectors-dictionary v-model="value" :options="getDictDatas(DICT_TYPE.COMMISSION_PRODUCT_APPROVAL)"></custom-selectors-dictionary>-->
<custom-selectors-dictionary v-model="value" :options="getDictDatas(DICT_TYPE.SHIPPING_DECLARATION_TYPE)"></custom-selectors-dictionary>
</div>
</el-form-item>
</el-col>
......@@ -41,6 +56,7 @@
<el-form-item label="备案">
<div style="width: 130px;">
<custom-selectors-dictionary v-model="value" :options="getDictDatas(DICT_TYPE.COMMISSION_PRODUCT_APPROVAL)"></custom-selectors-dictionary>
</div>
</el-form-item>
</el-col>
......@@ -48,10 +64,8 @@
<el-row>
<el-col :span="24">
<el-form-item label="佣金类型(明佣、暗佣)">
<el-radio-group>
<el-radio :label="3">明佣</el-radio>
<el-radio :label="6">暗佣</el-radio>
<el-radio :label="9">明佣+暗佣</el-radio>
<el-radio-group v-model="form.type">
<el-radio v-for="(item,index) in getDictDatas(DICT_TYPE.COMMISSION_TYPE)" :label="item.value" :key="index">{{item.label}}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
......@@ -59,48 +73,17 @@
<el-row>
<el-col :span="24">
<el-form-item label="返佣类型">
<el-radio-group>
<el-radio :label="3">明佣</el-radio>
<el-radio :label="6">暗佣</el-radio>
<el-radio :label="9">明佣+暗佣</el-radio>
<el-radio-group v-model="form.darkReturnType">
<el-radio v-for="(item,index) in getDictDatas(DICT_TYPE.COMMISSION_DARK_TYPE)" :label="item.value":key="index">{{item.label}}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="商品类型">
<div class="shanping-type">
<div class="tool">
<el-input placeholder="商品"></el-input>
</div>
<div class="box">
<div class="label">
商品类型
</div>
<div class="custom">
<el-input placeholder="商品特性"></el-input>
</div>
</div>
<div class="box">
<div class="label">
佣金
</div>
<div class="custom">
<el-input placeholder="商品特性"></el-input>
</div>
<div class="custom">
<el-input placeholder="商品特性"></el-input>
</div>
<div class="custom">
<el-input placeholder="商品特性"></el-input>
</div>
</div>
<div>
<el-button type="primary">添加</el-button>
</div>
</div>
</el-form-item>
<dark-servant-and-product :commodityType="commodityType"></dark-servant-and-product>
<dark-servant-and-rebate></dark-servant-and-rebate>
<ming-servant-and-dark-servant></ming-servant-and-dark-servant>
</el-col>
</el-row>
<el-row :gutter="50">
......@@ -117,90 +100,74 @@
<script>
import {
createCustomerCommissionInfo,
updateCustomerCommissionInfo,
deleteCustomerCommissionInfo,
getCustomerCommissionInfo,
getCustomerCommissionInfoPage,
exportCustomerCommissionInfoExcel
itemTypeListApi,
customerDropDownList
} from "@/api/ecw/customerCommissionInfo";
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
import customSelectorsDictionary from "./customSelectorsDictionary"
import darkServantAndProduct from "./darkServantAndProduct"
import darkServantAndRebate from "@/views/ecw/customerCommissionInfo/darkServantAndRebate";
import mingServantAndDarkServant from "@/views/ecw/customerCommissionInfo/mingServantAndDarkServant";
export default {
name: "CustomerCommissionInfo",
components: {
customSelectorsDictionary
customSelectorsDictionary,
darkServantAndProduct,
darkServantAndRebate,
mingServantAndDarkServant
},
data() {
return {
value:'真好',
value:'',
getDictDatas,
DICT_TYPE,
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 客户佣金详情列表
list: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
dateRangeCreateTime: [],
// 查询参数
queryParams: {
pageNo: 1,
pageSize: 10,
commissionId: null,
productType: null,
productAttr: null,
darkCommission: null,
darkCurrency: null,
darkUnit: null,
darkAdjustCommission: null,
darkAdjustCurrency: null,
darkAdjustUnit: null,
amount: null,
amountCurrency: null,
amountUnit: null,
refundCurrency: null,
refund: null,
refundUnit: null,
},
commodityType:[],
// 表单参数
form: {},
form: {
approval:"",// 产品备案
customerCommissionInfoBaseVOList:[],// 佣金详情
customerId:'',//客户id
customsType:'',//报关类别:我司全代:1,自单代报:2,混合报关:3
darkReturnType:this.getDictDatas(this.DICT_TYPE.COMMISSION_DARK_TYPE),// 暗佣类型 1产品2达标
departureId:'',// 始发地id
objectiveId:"",// 运输方式
type:this.getDictDatas(this.DICT_TYPE.COMMISSION_TYPE)[0].value,// 佣金类型
},
customerForm:{
defaultContactName:undefined,
defaultContactPhone:undefined,
name:undefined,
number:undefined,
},
customeList:[],
// 表单校验
rules: {
commissionId: [{required: true, message: "佣金表id不能为空", trigger: "blur"}],
}
},
customerShow:true
};
},
created() {
this.getList();
this.getItemType();
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
// 处理查询参数
let params = {...this.queryParams};
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行查询
getCustomerCommissionInfoPage(params).then(response => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
// /** 查询列表客户*/
getCustomeList() {
customerDropDownList(this.customerForm).then(res=>{
console.log(res);
if(res.code === 0){
this.customeList = res.data
}
})
},
remoteMethod(val){
this.customerForm.name = val;
this.getCustomeList();
},
/** 取消按钮 */
cancel() {
this.open = false;
this.reset();
},
/** 表单重置 */
reset() {
......@@ -226,102 +193,28 @@ export default {
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRangeCreateTime = [];
this.resetForm("queryForm");
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加客户佣金详情";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id;
getCustomerCommissionInfo(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改客户佣金详情";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (!valid) {
return;
}
// 修改的提交
if (this.form.id != null) {
updateCustomerCommissionInfo(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
return;
}
// 添加的提交
createCustomerCommissionInfo(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 deleteCustomerCommissionInfo(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.$modal.confirm('是否确认导出所有客户佣金详情数据项?').then(() => {
this.exportLoading = true;
return exportCustomerCommissionInfoExcel(params);
}).then(response => {
this.$download.excel(response, '${table.classComment}.xls');
this.exportLoading = false;
}).catch(() => {
});
// 商品类型
getItemType(){
itemTypeListApi().then(res=>{
if(res.code === 0){
this.commodityType = res.data;
}
})
},
}
};
</script>
<style lang="scss" scoped>
.shanping-type {
display: flex;
.tool {
width: 150px;
}
.box {
margin-left: 20px;
display: flex;
.label {
width: 80px;
}
.custom {
width: 150px;
margin-right:10px;
}
}
}
</style>
<template>
<div>
<div class="mingServantAndDarkServant">
<div class="box">
<div class="label">暗佣佣金:</div>
<div class="content">
<div class="item">
<el-input></el-input>
</div>
<div class="item">
<custom-selectors-dictionary :options="getDictDatas(DICT_TYPE.COMMISSION_CURRENCY_TYPE)"></custom-selectors-dictionary>
</div>
<div class="item">
<custom-selectors-dictionary :options="getDictDatas(DICT_TYPE.COMMISSION_UNIT)"></custom-selectors-dictionary>
</div>
</div>
</div>
<div class="title">
<span class="label">成本价:</span>原价-暗佣佣金
</div>
<div class="box">
<div class="label">销售价上调:</div>
<div class="content">
<div class="item">
<el-input></el-input>
</div>
<div class="item">
<custom-selectors-dictionary :options="getDictDatas(DICT_TYPE.COMMISSION_CURRENCY_TYPE)"></custom-selectors-dictionary>
</div>
<div class="item">
<custom-selectors-dictionary :options="getDictDatas(DICT_TYPE.COMMISSION_UNIT)"></custom-selectors-dictionary>
</div>
</div>
</div>
<div class="title">
<span class="label"> 实际佣金返点:</span>销售价-成本价
</div>
</div>
</div>
</template>
<script>
//暗佣+明佣
import customSelectorsDictionary from "@/views/ecw/customerCommissionInfo/customSelectorsDictionary";
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
export default {
name: "mingServantAndDarkServant",
components:{
customSelectorsDictionary
},
data(){
return{
getDictDatas,
DICT_TYPE
}
}
}
</script>
<style scoped lang="scss">
.mingServantAndDarkServant{
margin-top: 10px;
.box{
display: flex;
align-items: center;
.label{
vertical-align: middle;
font-size: 14px;
color: #606266;
font-weight: 700;
}
.content{
display: flex;
align-items: center;
.item{
margin-right: 20px;
}
}
}
.title{
margin: 15px 0;
.label{
vertical-align: middle;
font-size: 14px;
color: #606266;
font-weight: 700;
}
}
}
</style>
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