Commit be359eba authored by dcy's avatar dcy

佣金调整

parent afae1eef
......@@ -105,7 +105,7 @@
</el-table-column>
<el-table-column :label="$t('运输方式')" align="center" prop="transportId">
<template slot-scope="scope">
<dict-tag v-if="scope.row.transportId" :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="scope.row.transportId" />
<dict-tag v-if="scope.row.transportId !== -1" :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="scope.row.transportId" />
<div v-else>{{$t('全部')}}</div>
</template>
</el-table-column>
......@@ -113,19 +113,19 @@
</el-table-column>
<el-table-column :label="$t('报关方式')" align="center" prop="customsType" show-overflow-tooltip>
<template slot-scope="scope">
<dict-tag v-if="scope.row.customsType" :type="DICT_TYPE.SHIPPING_DECLARATION_TYPE" :value="scope.row.customsType" />
<dict-tag v-if="scope.row.customsType !== -1" :type="DICT_TYPE.SHIPPING_DECLARATION_TYPE" :value="scope.row.customsType" />
<div v-else>{{$t('全部')}}</div>
</template>
</el-table-column>
<el-table-column :label="$t('备案')" align="center" prop="approval">
<template slot-scope="scope">
<dict-tag v-if="scope.row.approval" :type="DICT_TYPE.COMMISSION_PRODUCT_APPROVAL" :value="scope.row.approval" />
<dict-tag v-if="scope.row.approval !== -1" :type="DICT_TYPE.COMMISSION_PRODUCT_APPROVAL" :value="scope.row.approval" />
<div v-else>{{$t('全部')}}</div>
</template>
</el-table-column>
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width" width="200px">
<template slot-scope="scope">
<!-- <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">编辑</el-button>-->
<el-button size="mini" type="text" icon="el-icon-view" @click="handleUpdate(scope.row)">查看</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">{{$t('删除')}}</el-button>
</template>
</el-table-column>
......
<template>
<el-select v-if="options" v-model="selectVal" :placeholder="$t('请选择')">
<el-option v-if="allShow" :label="$t('全部')" :value='0'></el-option>
<el-option v-if="allShow" :label="$t('全部')" :value='-1'></el-option>
<el-option
v-for="item in options"
:key="item[valueKey]"
......
<template>
<div class="app-container">
<el-form class="demo-ruleForm" label-position="left" label-width="110px" :rules="rules" :model="form" ref="form" >
<el-form :disabled="$route.params.dictId != 0" class="demo-ruleForm" label-position="left" label-width="110px" :rules="rules" :model="form" ref="form" >
<el-card class="box-card" style="padding: 10px">
<div slot="header" class="clearfix">
<el-row>
......@@ -8,7 +8,7 @@
<el-form-item :label="$t('客户名称')" prop="customerId">
<div style="display: flex">
<el-input readonly="readonly" :placeholder="$t('请输入选择客户')" v-model="customerName"></el-input>
<img style="width: 40px;height: 40px;margin-left: 40px;" src="@/assets/images/phonebook.png" class="phonebook" @click="customerNameShow= true" />
<img v-if="$route.params.dictId == 0" style="width: 40px;height: 40px;margin-left: 40px;" src="@/assets/images/phonebook.png" class="phonebook" @click="customerNameShow= true" />
</div>
<!-- <el-select-->
<!-- v-model="customerForm.name"-->
......@@ -245,13 +245,18 @@
</el-col>
</el-row>
<el-row>
<el-col :span="12" style="margin-top: 20px">
<el-col :span="12" style="margin-top: 20px" v-if="$route.params.dictId == 0">
<el-button style="width:200px;margin: 0 40px" type="primary" @click="submitForm">{{$t('确定')}}</el-button>
<el-button style="width:200px" @click="cancel">{{$t('取消')}}</el-button>
</el-col>
</el-row>
</el-card>
</el-form>
<el-row>
<el-col :span="12" style="margin-top: 20px" v-if="$route.params.dictId != 0">
<el-button style="width:200px" type="primary" @click="cancel">{{$t('取消')}}</el-button>
</el-col>
</el-row>
<choose-contact-dialog v-if="customerNameShow" @choose="onContactChoose" @close="customerNameShow = false" />
</div>
</template>
......@@ -292,15 +297,15 @@ export default {
tradeCityList: [],
// 表单参数
form: {
approval: 0,// 产品备案
approval: -1,// 产品备案
customerCommissionInfoBaseVOList: [],// 佣金详情
customerId: undefined,//客户id
customsType: 0,//报关类别:我司全代:1,自单代报:2,混合报关:3
darkReturnType: parseInt(this.getDictDatas(this.DICT_TYPE.COMMISSION_DARK_TYPE)[0].value),// 暗佣类型 1产品2达标
departureId: 0,// 始发地id
objectiveId: 0 ,//目的地id
transportId:0,//运输方式
type: parseInt(this.getDictDatas(this.DICT_TYPE.COMMISSION_TYPE)[1].value),// 佣金类型
customsType: -1,//报关类别:我司全代:1,自单代报:2,混合报关:3
darkReturnType:undefined,// 暗佣类型 1产品2达标
departureId: -1,// 始发地id
objectiveId: -1 ,//目的地id
transportId:-1,//运输方式
type: undefined,// 佣金类型
},
//明佣
mingServantFrom: [
......@@ -374,8 +379,10 @@ export default {
},
},
created() {
this.form.darkReturnType = parseInt(this.getDictDatas(this.DICT_TYPE.COMMISSION_DARK_TYPE)[0].value);
this.form.type = parseInt(this.getDictDatas(this.DICT_TYPE.COMMISSION_TYPE)[1].value);
getProductTypeList().then(response => {
console.log(response.data,'response.data')
// console.log(response.data,'response.data')
this.productAttrList = response.data
})
getCurrencyPage(this.params).then(res => {
......@@ -388,16 +395,15 @@ export default {
this.mingServantAnddarkServant[0].refundCurrency = id
this.mingServantAnddarkServant[0].darkAdjustCurrency = id
})
//重量单位
getUnitList().then(r =>{
if(r.code === 0){
this.weightList = r.data
this.$set(this.mingServantFrom,0, {
this.$set(this.mingServantFrom, 0, {
refund: '',
refundCurrency:parseInt(this.currencyList[0].id),
refundUnit: parseInt(this.weightList[0].id),})
refundUnit: parseInt(r.data[0].id)})
console.log(this.weightList[0].id,'this.weightList[0].id');
this.$set(this.darkServantAndProductForm, 0,
{
productType: 0,//商品类型
......@@ -424,10 +430,6 @@ export default {
darkAdjustCurrency: parseInt(this.currencyList[0].id),//暗佣+明佣 上调对应的货币
darkAdjustUnit:parseInt(this.weightList[0].id),//暗佣+明佣 上调对应的单位
})
}
})
this.getCustomeList();
if(this.$route.params.dictId != 0){
commissionGetByCustomerId(this.$route.params.dictId).then(r => {
if(r.code === 0){
......@@ -443,10 +445,11 @@ export default {
f.transportId = p.transportId;
this.form = f;
this.customerForm.name = p.customerName;
this.customerName = p.customerName
this.id = r.data.id;
}
getCustomerCommission(r.data.id).then(r =>{
console.log(r,'客户佣金详情');
console.log(r,'客户佣金详情',);
if(r.code != 0 || r.data.length == 0) return
if(this.form.type == 1){
//明佣
......@@ -467,9 +470,12 @@ export default {
}
})
})
}else {
}
}
})
})
this.getCustomeList();
this.getItemType();
this.productAttrFn();
......@@ -496,7 +502,7 @@ export default {
},
/** 取消按钮 */
cancel() {
this.$router.go(-1);
this.$tab.closeOpenPage({path:'/customer/customerCommission'});
},
/** 表单重置 */
reset() {
......@@ -569,7 +575,7 @@ export default {
p.customerCommissionInfoBaseVOList.forEach(item => {item.commissionId = this.$route.params.dictId})
updateCustomerCommissionInfo(p).then(r=>{
if(r.code == 0){
this.$router.go(-1)
this.$tab.closeOpenPage({path:'/customer/customerCommission'});
this.$message.success(this.$t('修改成功!'));
}
})
......@@ -614,6 +620,7 @@ export default {
deep:true,
},
'form.transportId':function (val){
console.log('1234567',val,'val');
if(this.weightList.length === 0 || !val) return
if((val == 1 || val == 2)){
let index = this.weightList.findIndex(item => item.id == 7);
......
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