Commit b559eec8 authored by dcy's avatar dcy

佣金修改 佣金id通过首页传入详情页面

parent cd46f825
...@@ -252,10 +252,11 @@ export const constantRoutes = [ ...@@ -252,10 +252,11 @@ export const constantRoutes = [
redirect: 'noredirect', redirect: 'noredirect',
children: [ children: [
{ {
path: '/customerCommissionInfo/:dictId(\\d+)', path: '/customerCommissionInfo/:dictId(\\d+)/:id(\\d+)?',
component: (resolve) => require(['@/views/ecw/customerCommissionInfo/index'], resolve), component: (resolve) => require(['@/views/ecw/customerCommissionInfo/index'], resolve),
name: 'customerCommissionInfo', name: 'customerCommissionInfo',
meta: {title: '佣金设置', icon: '', activeMenu: '/customer/customerCommissionInfo'} meta: {title: '佣金设置', icon: '', activeMenu: '/customer/customerCommissionInfo'},
props: true,
}, },
{ {
path: 'edit/:customerId(\\d+)', path: 'edit/:customerId(\\d+)',
......
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
type="selection" type="selection"
width="55"> width="55">
</el-table-column> </el-table-column>
<el-table-column :label="$t('佣金编码')" align="center" prop="customerId" /> <el-table-column :label="$t('佣金编码')" align="center" prop="id" />
<el-table-column :label="$t('客户名称')" align="center" prop="customerName" show-overflow-tooltip > <el-table-column :label="$t('客户名称')" align="center" prop="customerName" show-overflow-tooltip >
</el-table-column> </el-table-column>
<el-table-column :label="$t('联系电话')" align="center" prop="transportId" show-overflow-tooltip > <el-table-column :label="$t('联系电话')" align="center" prop="transportId" show-overflow-tooltip >
...@@ -256,10 +256,11 @@ export default { ...@@ -256,10 +256,11 @@ export default {
this.resetForm("queryForm"); this.resetForm("queryForm");
this.handleQuery(); this.handleQuery();
}, },
/** 修改按钮操作 */ /** 查看按钮操作 */
handleUpdate(row) { handleUpdate(row) {
const id = row.customerId; const customerId = row.customerId;
this.$router.push(`/customerCommissionInfo/${id}`) const id = row.id;
this.$router.push(`/customerCommissionInfo/${customerId}/${id}`)
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
......
...@@ -285,6 +285,9 @@ export default { ...@@ -285,6 +285,9 @@ export default {
CustomersSelector, CustomersSelector,
ChooseContactDialog ChooseContactDialog
}, },
props:{
id:[Number,String]//佣金编号id
},
data() { data() {
return { return {
customerName:undefined, customerName:undefined,
...@@ -360,7 +363,6 @@ export default { ...@@ -360,7 +363,6 @@ export default {
customerId: [{required: true, message: this.$t('客户名称不能为空'), trigger: "blur"}], customerId: [{required: true, message: this.$t('客户名称不能为空'), trigger: "blur"}],
}, },
customerShow: true, customerShow: true,
id:undefined,//佣金id
weightList:[], weightList:[],
productAttrList:[], productAttrList:[],
params: { params: {
...@@ -403,7 +405,6 @@ export default { ...@@ -403,7 +405,6 @@ export default {
refund: '', refund: '',
refundCurrency:parseInt(this.currencyList[0].id), refundCurrency:parseInt(this.currencyList[0].id),
refundUnit: parseInt(r.data[0].id)}) refundUnit: parseInt(r.data[0].id)})
console.log(this.weightList[0].id,'this.weightList[0].id');
this.$set(this.darkServantAndProductForm, 0, this.$set(this.darkServantAndProductForm, 0,
{ {
productType: -1,//商品类型 productType: -1,//商品类型
...@@ -446,10 +447,9 @@ export default { ...@@ -446,10 +447,9 @@ export default {
this.form = f; this.form = f;
this.customerForm.name = p.customerName; this.customerForm.name = p.customerName;
this.customerName = p.customerName this.customerName = p.customerName
this.id = r.data.id;
} }
getCustomerCommission(r.data.id).then(r =>{ getCustomerCommission(this.id).then(r =>{
console.log(r,'客户佣金详情',); // console.log(r,'客户佣金详情',);
if(r.code != 0 || r.data.length == 0) return if(r.code != 0 || r.data.length == 0) return
if(this.form.type == 1){ if(this.form.type == 1){
//明佣 //明佣
...@@ -487,7 +487,6 @@ export default { ...@@ -487,7 +487,6 @@ export default {
// /** 查询列表客户*/ // /** 查询列表客户*/
getCustomeList() { getCustomeList() {
customerDropDownList(this.customerForm).then(res => { customerDropDownList(this.customerForm).then(res => {
console.log(res);
if (res.code === 0) { if (res.code === 0) {
this.customeList = res.data this.customeList = res.data
} }
...@@ -496,10 +495,9 @@ export default { ...@@ -496,10 +495,9 @@ export default {
remoteMethod(val) { remoteMethod(val) {
this.customerForm.name = val; this.customerForm.name = val;
}, },
changefn(val){ // changefn(val){
console.log(val,'val') // this.form.customerId = val;
this.form.customerId = val; // },
},
/** 取消按钮 */ /** 取消按钮 */
cancel() { cancel() {
this.$tab.closeOpenPage({path:'/customer/customerCommission'}); this.$tab.closeOpenPage({path:'/customer/customerCommission'});
...@@ -561,7 +559,7 @@ export default { ...@@ -561,7 +559,7 @@ export default {
} }
if(this.$route.params.dictId == 0){ if(this.$route.params.dictId == 0){
createCommission(this.form).then(r =>{ createCommission(this.form).then(r =>{
console.log('添加',r) // console.log('添加',r)
if(r.code == 0){ if(r.code == 0){
this.$message.success(this.$t('添加成功!')); this.$message.success(this.$t('添加成功!'));
this.$tab.closeOpenPage({path:'/customer/customerCommission'}); this.$tab.closeOpenPage({path:'/customer/customerCommission'});
...@@ -620,7 +618,7 @@ export default { ...@@ -620,7 +618,7 @@ export default {
deep:true, deep:true,
}, },
'form.transportId':function (val){ 'form.transportId':function (val){
console.log('1234567',val,'val'); // console.log('1234567',val,'val');
if(this.weightList.length === 0 || !val) return if(this.weightList.length === 0 || !val) return
if((val == 1 || val == 2)){ if((val == 1 || val == 2)){
let index = this.weightList.findIndex(item => item.id == 7); 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