|
@@ -219,35 +219,35 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<el-dialog title="设置佣金" :visible.sync="commissionDia" width="65%">
|
|
<el-dialog title="设置佣金" :visible.sync="commissionDia" width="65%">
|
|
- <el-form :model="form1" ref="form1">
|
|
|
|
- <el-form-item label="省" prop="agentName">
|
|
|
|
- <LineArea :provinceAndCity="areaProp" :ifShow="ifShow=true" ref="lineArea"/>
|
|
|
|
|
|
+ <el-form :model="form1" ref="form1" :rules="rules1" label-width="100px">
|
|
|
|
+ <el-form-item label="分佣省份" prop="agentName">
|
|
|
|
+ <LineArea :provinceAndCity="areaProp" :ifShow="1" ref="lineArea" @changeArea="changeArea" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="不参与分佣市" prop="provinceName">
|
|
<el-form-item label="不参与分佣市" prop="provinceName">
|
|
- <LineArea :provinceAndCity="areaProp" :ifShow="ifShow=false" ref="lineArea"/>
|
|
|
|
|
|
+ <LineArea :provinceAndCity="areaProp" :ifShow="2" ref="lineArea" @changeArea="changeArea" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="佣金" align="center" prop="commisson">
|
|
|
|
- <el-input-number style="width:200px" :min="0" controls-position="right" :precision="2" v-model="form1.commisson">
|
|
|
|
|
|
+ <el-form-item label="佣金" prop="commission">
|
|
|
|
+ <el-input-number style="width:200px" :min="0" controls-position="right" :precision="2" v-model="form1.commission">
|
|
</el-input-number>
|
|
</el-input-number>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
- <el-button type="primary" icon="el-icon-search" @click="handleMake">提交</el-button>
|
|
|
|
|
|
+ <el-button type="primary" icon="el-icon-position" @click="commissionSubmit">提交</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<template>已设置省份</template>
|
|
<template>已设置省份</template>
|
|
<el-table v-loading="commissionLoading" :data="commissionList" stripe border highlight-current-row style="width: 100%" >
|
|
<el-table v-loading="commissionLoading" :data="commissionList" stripe border highlight-current-row style="width: 100%" >
|
|
<el-table-column label="省名称" align="center" prop="provinceName" />
|
|
<el-table-column label="省名称" align="center" prop="provinceName" />
|
|
<el-table-column label="不参与分佣市名称" align="center" prop="cityName"/>
|
|
<el-table-column label="不参与分佣市名称" align="center" prop="cityName"/>
|
|
- <el-table-column label="佣金" align="center" prop="num"/>
|
|
|
|
|
|
+ <el-table-column label="佣金" align="center" prop="commission"/>
|
|
<el-table-column label="创建时间" align="center" prop="createTime"/>
|
|
<el-table-column label="创建时间" align="center" prop="createTime"/>
|
|
</el-table>
|
|
</el-table>
|
|
|
|
|
|
<pagination
|
|
<pagination
|
|
- v-show="total>0"
|
|
|
|
- :total="total"
|
|
|
|
|
|
+ v-show="commissionTotal>0"
|
|
|
|
+ :total="commissionTotal"
|
|
:page.sync="commissionParams.pageNum"
|
|
:page.sync="commissionParams.pageNum"
|
|
:limit.sync="commissionParams.pageSize"
|
|
:limit.sync="commissionParams.pageSize"
|
|
- @pagination="getList"
|
|
|
|
|
|
+ @pagination="getCommissionList"
|
|
/>
|
|
/>
|
|
|
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
@@ -256,12 +256,12 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { getList,addLine,updatLine,getInfo,delLine } from "@/api/module/line";
|
|
|
|
|
|
+import { getList,addLine,updatLine,getInfo,delLine,getLineCommissionList,addLineCommission } from "@/api/module/line";
|
|
import Area from '@/components/area'
|
|
import Area from '@/components/area'
|
|
import {getToken} from "@/utils/auth";
|
|
import {getToken} from "@/utils/auth";
|
|
import Editor from '@/components/Editor';
|
|
import Editor from '@/components/Editor';
|
|
import {serverUrl} from "@/utils/auth";
|
|
import {serverUrl} from "@/utils/auth";
|
|
-import LineArea from '@/components/lineArea';
|
|
|
|
|
|
+import LineArea from '@/components/area/lineArea';
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "lineindex",
|
|
name: "lineindex",
|
|
@@ -272,7 +272,14 @@ export default {
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- areaProp: {},
|
|
|
|
|
|
+ areaProp: {
|
|
|
|
+ province: '',
|
|
|
|
+ city: [],
|
|
|
|
+ provinceName: '',
|
|
|
|
+ cityName: '',
|
|
|
|
+ cityValues: [],
|
|
|
|
+ cityNames: []
|
|
|
|
+ },
|
|
lineList: [],
|
|
lineList: [],
|
|
commissionList: [],
|
|
commissionList: [],
|
|
subLoading:false,
|
|
subLoading:false,
|
|
@@ -302,6 +309,7 @@ export default {
|
|
showSearch: true,
|
|
showSearch: true,
|
|
// 总条数
|
|
// 总条数
|
|
total: 0,
|
|
total: 0,
|
|
|
|
+ commissionTotal: 0,
|
|
|
|
|
|
// 弹出层标题
|
|
// 弹出层标题
|
|
title: "",
|
|
title: "",
|
|
@@ -318,8 +326,9 @@ export default {
|
|
status: undefined
|
|
status: undefined
|
|
},
|
|
},
|
|
commissionParams: {
|
|
commissionParams: {
|
|
- pageNum: 1,
|
|
|
|
- pageSize: 10
|
|
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: 10,
|
|
|
|
+ id: undefined
|
|
},
|
|
},
|
|
typeOption: [
|
|
typeOption: [
|
|
{
|
|
{
|
|
@@ -345,8 +354,32 @@ export default {
|
|
message: '请输入标题:',
|
|
message: '请输入标题:',
|
|
trigger: 'blur'
|
|
trigger: 'blur'
|
|
}],
|
|
}],
|
|
-
|
|
|
|
|
|
+ },
|
|
|
|
+ // 表单参数
|
|
|
|
+ form1: {
|
|
|
|
+ lineId: undefined,
|
|
|
|
+ provinceId: '',
|
|
|
|
+ provinceName: '',
|
|
|
|
+ commission: 0,
|
|
|
|
+ cityCode: '',
|
|
|
|
+ cityName: ''
|
|
|
|
+ },
|
|
|
|
|
|
|
|
+ // 表单校验
|
|
|
|
+ rules1: {
|
|
|
|
+ commission: [{
|
|
|
|
+ required: true,
|
|
|
|
+ message: '佣金不能为空:',
|
|
|
|
+ trigger: 'blur'
|
|
|
|
+ }],
|
|
|
|
+ },
|
|
|
|
+ startArea: {
|
|
|
|
+ province: '',
|
|
|
|
+ city: '',
|
|
|
|
+ provinceName: '',
|
|
|
|
+ cityName: '',
|
|
|
|
+ cityValues: [],
|
|
|
|
+ cityNames: []
|
|
},
|
|
},
|
|
caerAction: process.env.VUE_APP_BASE_API + "/common/upload",
|
|
caerAction: process.env.VUE_APP_BASE_API + "/common/upload",
|
|
caerfileList: [],
|
|
caerfileList: [],
|
|
@@ -384,13 +417,21 @@ export default {
|
|
|
|
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ getCommissionList() {
|
|
|
|
+ this.commissionLoading = true;
|
|
|
|
+ getLineCommissionList(this.commissionParams).then(response => {
|
|
|
|
+ this.commissionList = response.rows;
|
|
|
|
+ this.commissionTotal = response.total;
|
|
|
|
+ this.commissionLoading = false;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
|
|
- // 选择区域
|
|
|
|
- changeArea (e) {
|
|
|
|
- this.startArea = e
|
|
|
|
|
|
+ // 选择区域
|
|
|
|
+ changeArea (e) {
|
|
|
|
+ this.startArea = e
|
|
|
|
|
|
- },
|
|
|
|
- /** 重置按钮操作 */
|
|
|
|
|
|
+ },
|
|
|
|
+ /** 重置按钮操作 */
|
|
resetQuery() {
|
|
resetQuery() {
|
|
this.resetForm("queryForm");
|
|
this.resetForm("queryForm");
|
|
this.handleQuery();
|
|
this.handleQuery();
|
|
@@ -460,6 +501,41 @@ export default {
|
|
this.title = "修改旅游线路信息";
|
|
this.title = "修改旅游线路信息";
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+ handleCommission(row) {
|
|
|
|
+ this.commissionParams.lineId = row.id ;
|
|
|
|
+ this.form1.lineId = row.id;
|
|
|
|
+ this.commissionDia = true;
|
|
|
|
+ this.getCommissionList();
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ commissionSubmit() {
|
|
|
|
+ this.$refs["form1"].validate(valid => {
|
|
|
|
+ if (valid) {
|
|
|
|
+ if (this.startArea.province === undefined || this.startArea.province === '') {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '请选择地区',
|
|
|
|
+ type: 'error',
|
|
|
|
+ duration: 1500
|
|
|
|
+ })
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ console.log('startArea', this.startArea)
|
|
|
|
+ this.form1.provinceId = this.startArea.province
|
|
|
|
+ this.form1.cityId = this.startArea.city
|
|
|
|
+ if(this.startArea.city != "" && this.startArea.city != null) {
|
|
|
|
+ this.form1.cityCode = this.startArea.city.join(",")
|
|
|
|
+ }
|
|
|
|
+ this.form1.provinceName = this.startArea.provinceName
|
|
|
|
+ this.form1.cityName = this.startArea.cityName
|
|
|
|
+ console.log('form1', this.form1)
|
|
|
|
+ addLineCommission(this.form1).then(response => {
|
|
|
|
+ this.msgSuccess("新增成功");
|
|
|
|
+ this.getCommissionList();
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
|
|
/** 提交按钮 */
|
|
/** 提交按钮 */
|
|
submitForm() {
|
|
submitForm() {
|
|
@@ -529,12 +605,6 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|
|
- handleCommission(row) {
|
|
|
|
- const id = row.id ;
|
|
|
|
- this.commissionDia = true;
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
-
|
|
|
|
caerBeforeUpload(file) {
|
|
caerBeforeUpload(file) {
|
|
let isRightSize = file.size / 1024 / 1024 < 20
|
|
let isRightSize = file.size / 1024 / 1024 < 20
|
|
if (!isRightSize) {
|
|
if (!isRightSize) {
|