|
@@ -232,6 +232,7 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
<el-button type="primary" icon="el-icon-position" @click="commissionSubmit">提交</el-button>
|
|
<el-button type="primary" icon="el-icon-position" @click="commissionSubmit">提交</el-button>
|
|
|
|
+ <el-button type="success" icon="el-icon-edit" @click="commissionEdit">修改</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<template>已设置省份</template>
|
|
<template>已设置省份</template>
|
|
@@ -240,6 +241,17 @@
|
|
<el-table-column label="不参与分佣市名称" align="center" prop="cityName"/>
|
|
<el-table-column label="不参与分佣市名称" align="center" prop="cityName"/>
|
|
<el-table-column label="佣金" align="center" prop="commission"/>
|
|
<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-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-button
|
|
|
|
+ size="mini"
|
|
|
|
+ type="text"
|
|
|
|
+ icon="el-icon-delete"
|
|
|
|
+ @click="commissionDelete(scope.row)"
|
|
|
|
+ >删除
|
|
|
|
+ </el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
|
|
|
|
<pagination
|
|
<pagination
|
|
@@ -256,7 +268,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { getList,addLine,updatLine,getInfo,delLine,getLineCommissionList,addLineCommission } from "@/api/module/line";
|
|
|
|
|
|
+import { getList,addLine,updatLine,getInfo,delLine,getLineCommissionList,addLineCommission,delLineCommission,updatLineCommission } 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';
|
|
@@ -512,7 +524,17 @@ export default {
|
|
commissionSubmit() {
|
|
commissionSubmit() {
|
|
this.$refs["form1"].validate(valid => {
|
|
this.$refs["form1"].validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- if (this.startArea.province === undefined || this.startArea.province === '') {
|
|
|
|
|
|
+ this.setArea();
|
|
|
|
+ addLineCommission(this.form1).then(response => {
|
|
|
|
+ this.msgSuccess("新增成功");
|
|
|
|
+ this.getCommissionList();
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ setArea() {
|
|
|
|
+ if (this.startArea.province === undefined || this.startArea.province === '') {
|
|
this.$message({
|
|
this.$message({
|
|
message: '请选择地区',
|
|
message: '请选择地区',
|
|
type: 'error',
|
|
type: 'error',
|
|
@@ -529,12 +551,33 @@ export default {
|
|
this.form1.provinceName = this.startArea.provinceName
|
|
this.form1.provinceName = this.startArea.provinceName
|
|
this.form1.cityName = this.startArea.cityName
|
|
this.form1.cityName = this.startArea.cityName
|
|
console.log('form1', this.form1)
|
|
console.log('form1', this.form1)
|
|
- addLineCommission(this.form1).then(response => {
|
|
|
|
- this.msgSuccess("新增成功");
|
|
|
|
- this.getCommissionList();
|
|
|
|
- });
|
|
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ commissionDelete(row) {
|
|
|
|
+ const ids = row.id ;
|
|
|
|
+ this.$confirm('是否确认删除?', "警告", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "warning"
|
|
|
|
+ }).then(function () {
|
|
|
|
+ return delLineCommission(ids);
|
|
|
|
+ }).then(() => {
|
|
|
|
+ this.getCommissionList();
|
|
|
|
+ this.msgSuccess("删除成功");
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ commissionEdit() {
|
|
|
|
+ this.$refs["form1"].validate(valid => {
|
|
|
|
+ if (valid) {
|
|
|
|
+ this.setArea();
|
|
|
|
+ updatLineCommission(this.form1).then(response => {
|
|
|
|
+ this.msgSuccess("修改成功");
|
|
|
|
+ this.open = false;
|
|
|
|
+ this.getCommissionList();
|
|
|
|
+ });
|
|
}
|
|
}
|
|
- });
|
|
|
|
|
|
+ });
|
|
},
|
|
},
|
|
|
|
|
|
/** 提交按钮 */
|
|
/** 提交按钮 */
|