1748153932 12 months ago
parent 718be11d3c
commit 2e81767727
  1. 50
      src/api/user.js
  2. 240
      src/views/merchant/type/index.vue
  3. 1607
      src/views/user/list/index.vue
  4. 1208
      src/views/user/list2/index.vue

@ -60,6 +60,10 @@ export function getMenusApi() {
export function createUserApi() {
return request.get(`user/create`)
}
export function getCity() {
return request.get(`user/create`)
}
/**
* @description 用户分组 -- 编辑表单
* @param {Object} param params {Object} 传值参数
@ -98,6 +102,14 @@ export function labelEditApi(id) {
export function labelFormApi() {
return request.get('user/label/form')
}
// wmc
export function labelFormApi2() {
return request.get('user/label/form2')
}
/**
* @description 用户标签 -- 列表
*/
@ -113,9 +125,44 @@ export function labelDeleteApi(id) {
/**
* @description 用户列表 -- 列表
*/
export function userLstApi(data) {
return request.get('user/lst', data)
}
//wmc
export function userLstApi2(data) {
return request.get('partner/role/list', data)
}
export function userLstApi1(data) {
return request.get('store/brand/brandList', data)
}
export function userLstApi3(data) {
return request.get('store/brand/city/0', data)
}
export function userLstApi4(data) {
return request.get('store/brand/category/lst', data)
}
export function userLstApi5(data) {
return request.post('partner/role/add', data)
}
export function userLstApi6(id) {
return request.get(`partner/role/detail/${id}`)
}
export function userLstApi7(data) {
return request.post('partner/role/update', data)
}
export function userLstApi8(id) {
return request.get(`partner/role/delete/${id}`)
}
/**
* @description 用户列表 -- 设置分组
*/
@ -128,6 +175,9 @@ export function changeGroupApi(id) {
export function changelabelApi(id) {
return request.get(`user/change_label/form/${id}`)
}
export function changelabelApi2(id) {
return request.get(`user/partner/${id}`)
}
/**
* @description 用户列表 -- 编辑会员等级
*/

@ -4,7 +4,7 @@
<el-card class="box-card">
<div slot="header" class="clearfix">
<el-button size="small" type="primary" @click="onAdd"
>添加店铺类型
>添加店铺类型
</el-button>
</div>
<el-table
@ -15,7 +15,7 @@
highlight-current-row
class="switchTable"
>
<el-table-column prop="mer_type_id" label="ID" min-width="60" />
<el-table-column prop="mer_type_id" label="ID" min-width="60"/>
<el-table-column
prop="type_name"
label="店铺类型名称"
@ -24,8 +24,8 @@
<el-table-column prop="type_name" label="店铺保证金" min-width="200">
<template slot-scope="scope">
<span class="spBlock">{{
scope.row.is_margin ? scope.row.margin + "元" : "无"
}}</span>
scope.row.is_margin ? scope.row.margin + '元' : '无'
}}</span>
</template>
</el-table-column>
<el-table-column
@ -54,22 +54,22 @@
type="text"
size="small"
@click="handleDetail(scope.row)"
>详情
>详情
</el-button>
<el-button type="text" size="small" @click="onEdit(scope.row)"
>编辑
>编辑
</el-button>
<el-button
type="text"
size="small"
@click="handleDelete(scope.row.mer_type_id, scope.$index)"
>删除
>删除
</el-button>
<el-button
type="text"
size="small"
@click="handleMark(scope.row.mer_type_id)"
>备注
>备注
</el-button>
</template>
</el-table-column>
@ -110,7 +110,7 @@
/>
</el-form-item>
<el-form-item label="店铺类型要求:">
<el-input type="textarea" v-model="formValidate.type_info" />
<el-input type="textarea" v-model="formValidate.type_info"/>
</el-form-item>
<el-form-item label="店铺保证金:">
<el-radio-group v-model="formValidate.is_margin">
@ -118,7 +118,7 @@
<el-radio :label="1"></el-radio>
</el-radio-group>
<div v-if="formValidate.is_margin == 1" class="input_inline">
<el-input v-model="formValidate.margin" placeholder="请输入单位" />
<el-input v-model="formValidate.margin" placeholder="请输入单位"/>
单位
</div>
</el-form-item>
@ -139,7 +139,7 @@
></el-tree>
</el-form-item>
<el-form-item label="其它说明:">
<el-input type="textarea" v-model="formValidate.description" />
<el-input type="textarea" v-model="formValidate.description"/>
</el-form-item>
<el-form-item style="margin-top: 30px">
<el-button
@ -148,7 +148,7 @@
class="submission"
size="small"
@click="handleSubmit('formValidate')"
>提交
>提交
</el-button>
<el-button
v-else
@ -156,7 +156,7 @@
class="submission"
size="small"
@click="handleUpdate('formValidate')"
>提交
>提交
</el-button>
</el-form-item>
</el-form>
@ -183,7 +183,7 @@
{{
formDetailValidate.type_name
? formDetailValidate.type_name
: "暂无数据"
: '暂无数据'
}}
</span>
</el-form-item>
@ -191,13 +191,15 @@
{{
formDetailValidate.type_info
? formDetailValidate.type_info
: "暂无数据"
}}</el-form-item
: '暂无数据'
}}
</el-form-item
>
<el-form-item label="店铺保证金:">
{{
formDetailValidate.margin ? formDetailValidate.margin : "暂无数据"
}}</el-form-item
formDetailValidate.margin ? formDetailValidate.margin : '暂无数据'
}}
</el-form-item
>
<el-form-item label="店铺权限:">
<el-tree
@ -210,23 +212,25 @@
{{
formDetailValidate.description
? formDetailValidate.description
: "暂无数据"
}}</el-form-item
: '暂无数据'
}}
</el-form-item
>
<el-form-item label="创建时间:">
{{
formDetailValidate.create_time
? formDetailValidate.create_time
: "暂无数据"
}}</el-form-item
: '暂无数据'
}}
</el-form-item
>
<el-form-item label="最新修改时间:"
>{{
>{{
formDetailValidate.update_time
? formDetailValidate.update_time
: "暂无数据"
: '暂无数据'
}}
</el-form-item>
</el-form>
@ -252,21 +256,21 @@ import {
storeTypeDeleteApi,
storeJurisdictionApi,
merchantTypeMarkForm,
merchantTypeMarkApi,
} from "@/api/merchant";
import { fromList } from "@/libs/constants.js";
import { roterPre } from "@/settings";
import SettingMer from "@/libs/settingMer";
import Cookies from "js-cookie";
merchantTypeMarkApi
} from '@/api/merchant'
import { fromList } from '@/libs/constants.js'
import { roterPre } from '@/settings'
import SettingMer from '@/libs/settingMer'
import Cookies from 'js-cookie'
export default {
name: "MerchantList",
name: 'MerchantList',
data() {
return {
//
dialogDetailVisible: false,
formDetailValidate: {},
detailTypeId: "",
detailTypeId: '',
fromList: fromList,
roterPre: roterPre,
@ -275,195 +279,195 @@ export default {
permissions: [], //
tableData: {
data: [],
total: 0,
total: 0
},
tableFrom: {
page: 1,
limit: 20,
limit: 20
},
formValidate: {
type_name: "",
type_info: "",
type_name: '',
type_info: '',
is_margin: 1,
margin: 0,
auth: [],
description: "",
description: ''
},
ruleValidate: {
type_name: [
{ required: true, message: "请输入店铺类型名称", trigger: "blur" },
{ required: true, message: '请输入店铺类型名称', trigger: 'blur' }
],
auth: [
{ required: true, message: "请选择店铺权限", trigger: "change" },
],
{ required: true, message: '请选择店铺权限', trigger: 'change' }
]
},
dialogVisible: false,
isEdit: false,
typeId: "",
cccc: "",
typeId: '',
cccc: '',
props: {
multiple: true,
expandTrigger: "hover",
emitPath: false,
},
};
expandTrigger: 'hover',
emitPath: false
}
}
},
mounted() {
this.getList("");
this.getList('')
},
methods: {
//
getList(num) {
this.listLoading = true;
this.tableFrom.page = num ? num : this.tableFrom.page;
this.listLoading = true
this.tableFrom.page = num ? num : this.tableFrom.page
storeTypeLstApi(this.tableFrom)
.then((res) => {
this.tableData.data = res.data.list;
this.tableData.total = res.data.count;
this.listLoading = false;
this.jurisdiction();
this.tableData.data = res.data.list
this.tableData.total = res.data.count
this.listLoading = false
this.jurisdiction()
})
.catch((res) => {
this.listLoading = false;
this.$message.error(res.message);
});
this.listLoading = false
this.$message.error(res.message)
})
},
pageChange(page) {
this.tableFrom.page = page;
this.getList("");
this.tableFrom.page = page
this.getList('')
},
handleSizeChange(val) {
this.tableFrom.limit = val;
this.getList(1);
this.tableFrom.limit = val
this.getList(1)
},
handleClose() {
this.dialogVisible = false;
this.dialogVisible = false
},
//
onAdd() {
this.dialogVisible = true;
this.isEdit = false;
this.dialogVisible = true
this.isEdit = false
// this.jurisdiction();
this.formValidate = {
type_name: "",
type_info: "",
type_name: '',
type_info: '',
is_margin: 1,
margin: 0,
description: "",
auth: [],
};
this.$refs.tree && this.$refs.tree.setCheckedKeys([]);
description: '',
auth: []
}
this.$refs.tree && this.$refs.tree.setCheckedKeys([])
},
//
jurisdiction() {
storeJurisdictionApi().then((res) => {
function loadData(lst) {
lst.forEach((v) => {
v.value = v.id;
v.label = v.title;
delete v.id;
delete v.title;
v.value = v.id
v.label = v.title
delete v.id
delete v.title
if (v.children) {
if (!v.children.length) {
delete v.children;
delete v.children
} else {
loadData(v.children);
loadData(v.children)
}
}
});
return lst;
})
return lst
}
this.permissions = loadData(res.data);
});
this.permissions = loadData(res.data)
})
},
handleSubmit(name) {
this.$refs[name].validate((valid) => {
if (valid) {
storeTypeCreateApi(this.formValidate)
.then(async (res) => {
this.$message.success(res.message);
this.dialogVisible = false;
this.getList("");
.then(async(res) => {
this.$message.success(res.message)
this.dialogVisible = false
this.getList('')
})
.catch((res) => {
this.$message.error(res.message);
});
this.$message.error(res.message)
})
} else {
return false;
return false
}
});
})
},
//
onEdit(row) {
this.isEdit = true;
this.dialogVisible = true;
this.typeId = row.mer_type_id;
this.isEdit = true
this.dialogVisible = true
this.typeId = row.mer_type_id
this.formValidate = {
type_name: row.type_name,
type_info: row.type_info,
is_margin: row.is_margin || 0,
margin: row.margin || 0,
auth: row.auth_ids,
description: row.description,
};
this.$refs.tree && this.$refs.tree.setCheckedKeys(row.auth_ids);
description: row.description
}
this.$refs.tree && this.$refs.tree.setCheckedKeys(row.auth_ids)
// this.jurisdiction();
},
//
handleDetailClose() {
this.dialogDetailVisible = false;
this.getList();
this.dialogDetailVisible = false
this.getList()
},
//
handleDetail(row) {
this.dialogDetailVisible = true;
this.detailTypeId = row.mer_type_id;
this.getDetail();
this.dialogDetailVisible = true
this.detailTypeId = row.mer_type_id
this.getDetail()
},
getDetail() {
merchantTypeMarkApi(this.detailTypeId).then((res) => {
this.formDetailValidate = res.data;
});
this.formDetailValidate = res.data
})
},
handleUpdate(name) {
this.$refs[name].validate((valid) => {
if (valid) {
storeTypeUpdateApi(this.typeId, this.formValidate)
.then(async (res) => {
this.$message.success(res.message);
this.dialogVisible = false;
this.getList("");
.then(async(res) => {
this.$message.success(res.message)
this.dialogVisible = false
this.getList('')
})
.catch((res) => {
this.$message.error(res.message);
});
this.$message.error(res.message)
})
} else {
return false;
return false
}
});
})
},
//
handleDelete(id) {
this.$modalSure("确定删除该店铺类型吗").then(() => {
this.$modalSure('确定删除该店铺类型吗').then(() => {
storeTypeDeleteApi(id)
.then(({ message }) => {
this.$message.success(message);
this.getList("");
this.$message.success(message)
this.getList('')
})
.catch(({ message }) => {
this.$message.error(message);
});
});
this.$message.error(message)
})
})
},
//
handleMark(id) {
// console.log(id,'9999999');
this.$modalForm(merchantTypeMarkForm(id)).then(() => this.getList());
},
},
};
this.$modalForm(merchantTypeMarkForm(id)).then(() => this.getList())
}
}
}
</script>
<style scoped lang="scss">

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save