Commit b559eec8 authored by dcy's avatar dcy

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

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