Commit e3cc6715 authored by 黄媛媛's avatar 黄媛媛

供应商返佣比例

parent 95c4e4ef
......@@ -39,13 +39,44 @@
</el-input>
</el-form-item>
<el-form-item class="commonLabel discount" :label="nameC" prop="ClientBankAccount.CardNum" >
<el-input v-model="addMsg.ClientBankAccount.CardNum" style="width:690px" size="small" onkeyup="this.value= this.value.match(/\d+(\d{0,2})?/) ? this.value.match(/\d+(\d{0,2})?/)[0] : ''">
<!-- <el-input v-model="addMsg.ClientBankAccount.CardNum" style="width:690px" size="small" onkeyup="this.value= this.value.match(/\d+(\d{0,2})?/) ? this.value.match(/\d+(\d{0,2})?/)[0] : ''"> -->
<el-input v-model="addMsg.ClientBankAccount.CardNum" style="width:690px" size="small" >
</el-input>
</el-form-item>
<el-form-item class="commonLabel discount" :label="nameD" prop="ClientBankAccount.AccountAlias">
<el-input v-model="addMsg.ClientBankAccount.AccountAlias" style="width:690px" size="small">
</el-input>
</el-form-item>
<el-form-item class="commonLabel discount" label="供应商关联人">
<el-select size="small" v-model="addMsg.Introducer" @change="getSpecification" :filter-method="ChangeListName" filterable clearable
style="display:inline-block;width:690px;"
placeholder="请选择">
<el-option v-for="item in IntroducerList" :key="item.UserId" :label="item.Name" :value="item.UserId">
</el-option>
</el-select>
</el-form-item>
<el-form-item class="commonLabel discount commissionStyle" label="供应商返佣比例" v-if="addMsg.Introducer!='' || addMsg.Introducer !=0">
<span style="color: #ff4544">注:按照毛利百分比,设定结算比例</span>
<div class="content">
<table class="fxCommTable" v-if="addMsg.SupplierCommissionList.length>0">
<tr>
<th>毛利率</th>
<th v-for="(item,index) in addMsg.SupplierCommissionList" :key="index">{{item.CommissionType}}0%</th>
</tr>
<tr>
<td>返佣比例</td>
<td v-for="(subItem,subIndex) in addMsg.SupplierCommissionList" :key="subIndex">
<el-input style="width:100px;" v-model="subItem.CommissionRate" :min='0' size="small" type='number'><template slot="append">%</template></el-input>
</td>
</tr>
</table>
<table class="fxCommTable" v-else>
<tr>
<th>暂无数据</th>
</tr>
</table>
</div>
</el-form-item>
......@@ -68,6 +99,7 @@
Name:'',
Mobile:'',
Address:'',
Introducer:'',//关联人
ClientBankAccount:{
ID:0,
AccountClassify:2,
......@@ -76,6 +108,18 @@
CardNum:'',
AccountAlias:'',
},
SupplierCommissionList:[
{ID:0,CommissionType:1,CommissionRate:0},
{ID:0,CommissionType:2,CommissionRate:0},
{ID:0,CommissionType:3,CommissionRate:0},
{ID:0,CommissionType:4,CommissionRate:0},
{ID:0,CommissionType:5,CommissionRate:0},
{ID:0,CommissionType:6,CommissionRate:0},
{ID:0,CommissionType:7,CommissionRate:0},
{ID:0,CommissionType:8,CommissionRate:0},
{ID:0,CommissionType:9,CommissionRate:0},
{ID:0,CommissionType:10,CommissionRate:0},
]
},
nameA:'开户支行',
......@@ -115,6 +159,10 @@
},
supplierId:-1,
search:{
Name:''
},
IntroducerList:[],
}
},
created(){
......@@ -138,9 +186,18 @@
this.addMsg.ClientBankAccount.CardNum='';
this.addMsg.ClientBankAccount.AccountAlias='';
},
Save(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
if(this.addMsg.Introducer == ''){
this.addMsg.Introducer = 0
}
if(this.addMsg.Introducer == 0){
this.addMsg.SupplierCommissionList = []
}
console.log(this.addMsg)
this.apipost('/api/Supplier/SetSupplier',this.addMsg,
res => {
if (res.data.resultCode === 1) {
......@@ -158,6 +215,7 @@
}
});
},
getData(){
this.pageloading=true;
this.apipost("/api/Supplier/GetSupplierDetail",{ID:this.supplierId}, res => {
......@@ -168,20 +226,52 @@
this.addMsg.Name = data.Name;
this.addMsg.Mobile = data.Mobile;
this.addMsg.Address = data.Address;
this.addMsg.Introducer = data.Introducer;
this.addMsg.ClientBankAccount.ID = data.ClientBankAccount.ID;
if( data.SupplierCommissionList.length!=0){
this.addMsg.SupplierCommissionList = data.SupplierCommissionList;
}
this.addMsg.ClientBankAccount.AccountClassify = data.ClientBankAccount.AccountClassify;
this.addMsg.ClientBankAccount.OpenBankName = data.ClientBankAccount.OpenBankName;
this.addMsg.ClientBankAccount.AccountHolder = data.ClientBankAccount.AccountHolder;
this.addMsg.ClientBankAccount.CardNum = data.ClientBankAccount.CardNum;
this.addMsg.ClientBankAccount.AccountAlias = data.ClientBankAccount.AccountAlias;
this.search.Name = data.IntroducerName;
if(data.IntroducerName !=''){
this.getDistributorInfoList()
}
if(this.addMsg.Introducer == 0){
this.addMsg.Introducer = ''
}
}else {
this.Error(res.data.message);
}
})
},
ChangeListName(val){
this.search.Name = val
this.getDistributorInfoList()
},
getDistributorInfoList(){
this.pageloading=true;
this.apipost('/api/Supplier/GetDistributorInfoList',this.search,
res => {
this.pageloading=false;
if (res.data.resultCode === 1) {
this.IntroducerList = res.data.data
} else {
this.Error(res.data.message);
}
},
null
);
},
getSpecification(){
}
},
};
</script>
......@@ -195,4 +285,48 @@
left: -25px;
top:12px;
}
.supplierEdit .fxCommTable {
width: 100%;
border-collapse: collapse;
}
.supplierEdit .fxCommTable tr th {
height: 48px;
font-size: 14px;
color: #909399;
border: 1px solid #EBEEF5;
font-weight: bold;
}
.supplierEdit .fxCommTable tr {
background: #fff;
text-align: center;
height: 50px;
}
.supplierEdit .fxCommTable tr td {
font-size: 14px;
border: 1px solid #EBEEF5;
}
.supplierEdit .fx_inner:hover td {
background-color: #F5F7FA;
}
.supplierEdit .fxCommTable td {
transition: background-color .25s ease;
}
.supplierEdit .content {
background: #fff;
margin-top: 10px;
/* padding: 20px; */
box-sizing: border-box;
}
.supplierEdit .el-input-group__append{
padding:0 5px
}
.supplierEdit .commissionStyle .el-input__inner{
padding: 0px 0px 0 10px;
}
</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