Browse Source

增加商城用户列表

fix_bug_pro20231227
pref_mail@163.com 2 years ago
parent
commit
73efe06668
  1. 21
      src/api/basicdata/basicClientAccount.js
  2. 23
      src/router/views/index.js
  3. 65
      src/views/basicdata/brand/basicClient.vue
  4. 458
      src/views/basicdata/brand/basicClientAccount.vue
  5. 2
      src/views/basicdata/brand/basicdataTripartiteMall.vue

21
src/api/basicdata/basicClientAccount.js

@ -0,0 +1,21 @@
import request from '@/axios';
export const getList = (current, size, params) => {
return request({
url: '/api/logpm-basicdata/basicdataClientAccount/page',
method: 'get',
params: {
...params,
current,
size,
}
})
}
export const add = (row) => {
return request({
url: '/api/logpm-basicdata/basicdataClientAccount/submit',
method: 'post',
data: row
})
}

23
src/router/views/index.js

@ -925,7 +925,30 @@ export default [
component: () => import('@/views/basicdata/team/basicdataTeamStaff.vue'),
},
],
},
{
path: '/basicdata/brand/basicClientAccount',
component: Layout,
redirect: '/basicdata/brand/basicClient',
children: [
{
path: '/basicdata/brand/basicClientAccount',
name: '客户账号列表',
meta: {
i18n: 'dict',
},
props: route => ({
id: route.query.id
}),
component: () => import('@/views/basicdata/brand/basicClientAccount.vue'),
},
],
},
// {
// path: 'basicdata/goodsShelf/basicdataGoodsShelfView',
// component: Layout,

65
src/views/basicdata/brand/basicClient.vue

@ -126,6 +126,9 @@
<el-dropdown-item command="6">
<el-text>三方商城</el-text>
</el-dropdown-item>
<el-dropdown-item command="7">
<el-text>开通账号</el-text>
</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
@ -313,6 +316,36 @@
</span>
</template>
</el-dialog>
<!-- 账号绑定弹出框页面
1显示登录账号
2显示账号的名称 -->
<el-dialog title="开通账号" v-model="openAcountStatus">
<el-form :disabled="view" ref="openAcountorm" :model="openAcountform" :rules="openAcountrules" label-width="120px">
<el-form-item label="姓名" prop="linkman" >
<el-input v-model="openAcountform.name" placeholder="请输入联系人" maxlength="20" style="width: 100%" />
</el-form-item>
<el-form-item label="账号" prop="linkman" >
<el-input v-model="openAcountform.phone" placeholder="请输入电话" type="number" maxlength="11" style="width: 100%" />
</el-form-item>
<el-form-item label="密码" >
<span style="color: red;">默认系统初始化密码</span>
</el-form-item>
</el-form>
<template #footer>
<span v-if="!view" class="dialog-footer">
<el-button type="primary" icon="el-icon-circle-check" @click="handleSubmit('form')"> </el-button>
<el-button icon="el-icon-circle-close" @click="openAcountStatus = false"> </el-button>
</span>
</template>
</el-dialog>
<el-drawer
title="子表操作"
append-to-body
@ -598,7 +631,13 @@ export default {
{ required: true, message: '请上传合同文件', trigger: 'blur' }
]
},
bianji: false
bianji: false,
openAcountStatus:false,//
openAcountform:{
name:"",
phone:""
}
};
},
created() {
@ -649,6 +688,9 @@ export default {
case 6:
this.handleMall(row)
break;
case 7:
this.openAcount(row)
break;
}
},
//
@ -692,6 +734,26 @@ export default {
console.log(val);
},
/**
* 开通账号
*/
openAcount(row) {
// this.openAcountform.name = row.linkman;
// this.openAcountform.phone = row.phone;
// this.openAcountStatus = true;
this.$router.push({
path: '/basicdata/brand/basicClientAccount',
query: {
id: row.id,
name: '商场 - ' + row.clientName
}
});
},
//
handleMall(row) {
// console.log('>>>', row);
@ -706,7 +768,6 @@ export default {
},
//
downloadLink(row) {
console.log('>>>>>', row);
window.open('http://192.168.10.100:8012/onlinePreview?url=' + encodeURIComponent(Base64.encode(row.leaseAccessories)));
},
//

458
src/views/basicdata/brand/basicClientAccount.vue

@ -0,0 +1,458 @@
<template>
<basic-container>
<div class="avue-crud">
<el-row v-if="!search" style="padding:6px 18px">
<!-- 查询模块 -->
<el-form :inline="true" :model="query">
<el-form-item label="账号:">
<el-input v-model="query.account" placeholder="请输入账号"></el-input>
</el-form-item>
<!-- <el-form-item label="状态:">-->
<!-- <el-input v-model="query.condition" placeholder="请输入状态"></el-input>-->
<!-- </el-form-item>-->
<!-- 查询按钮 -->
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="searchChange"> </el-button>
<el-button icon="el-icon-delete" @click="searchReset()"> </el-button>
</el-form-item>
</el-form>
</el-row>
<el-row>
<div class="avue-crud__header">
<!-- 头部左侧按钮模块 -->
<div class="avue-crud__left">
<el-button type="primary" icon="el-icon-plus" @click="handleAdd"> </el-button>
<el-button type="danger" icon="el-icon-delete" @click="handleDelete" plain> </el-button>
</div>
<!-- 头部右侧按钮模块 -->
<div class="avue-crud__right">
<el-button icon="el-icon-refresh" @click="searchChange" circle></el-button>
<el-button icon="el-icon-search" @click="searchHide" circle></el-button>
</div>
</div>
</el-row>
<el-row>
<!-- 列表模块 -->
<tablecmt
:columnList="columnList"
:tableData="data"
:loading="loading"
@inputTxt="inputsc"
@timeCheck="timesc"
@btnCheck="btnsc"
@selectCheck="selectsc"
@selection="selectionChange"
>
<template #default="slotProps">
<!-- <el-text type="primary" text icon="el-icon-view" @click="handleView(slotProps.scope.row)">查看</el-text> -->
<el-text type="primary" text icon="el-icon-delete" @click="rowDel(slotProps.scope.row)">删除</el-text>
</template>
</tablecmt>
</el-row>
<el-row>
<div class="avue-crud__pagination" style="width:100%">
<!-- 分页模块 -->
<el-pagination align="right"
background
@size-change="sizeChange"
@current-change="currentChange"
:current-page="page.currentPage"
:page-sizes="[30, 50,80, 120]"
:page-size="page.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="page.total">
</el-pagination>
</div>
</el-row>
<el-dialog title="创建账号" v-model="openAcountStatus">
<el-form :disabled="view" ref="openAcountorm" :model="openAcountform" :rules="openAcountrules" label-width="120px">
<el-form-item label="姓名" prop="openAcountform.name" >
<el-input v-model="openAcountform.name" placeholder="请输入联系人" maxlength="20" style="width: 100%" />
</el-form-item>
<el-form-item label="账号" prop="openAcountform.phone" >
<el-input v-model="openAcountform.phone" placeholder="请输入电话" type="number" maxlength="11" style="width: 100%" />
</el-form-item>
<el-form-item label="密码" >
<span style="color: red;">默认系统初始化密码</span>
</el-form-item>
</el-form>
<template #footer>
<span v-if="!view" class="dialog-footer">
<el-button type="primary" icon="el-icon-circle-check" @click="handleSubmit('openAcountorm')"> </el-button>
<el-button icon="el-icon-circle-close" @click="openAcountStatus = false"> </el-button>
</span>
</template>
</el-dialog>
</div>
</basic-container>
</template>
<script>
import { getList,add } from "@/api/basicdata/basicClientAccount";
import { mapGetters } from "vuex";
export default {
data () {
return {
columnList: [
{
prop: '',
label: '序号',
type: 0,
values: '',
width: 55,
checkarr: [],
fixed: true,
},
{
prop: 'phone',
label: '账号',
type: 2,
values: '',
width: '200',
checkarr: [],
fixed: false,
sortable: true,
head: false,
},
{
prop: 'name',
label: '姓名',
type: 2,
values: '',
width: '200',
checkarr: [],
fixed: false,
sortable: true,
head: false,
},
{
prop: 'createTime',
label: '创建时间',
type: 2,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: '',
label: '操作',
type: 6,
values: '',
width: '150',
checkarr: [],
fixed: 'right',
hide: true,
},
],
optionProps:{
value: 'id',
label: 'cName',
children: 'childrenList', //
emitPath : false,
checkStrictly:true,
expandTrigger: 'hover' //
},
cascaderKey : 1,//,+1
height: 0,
//
title: '',
costCorrelationId: '',
//
box: false,
openAcountStatus:false,//
openAcountform:{
name:"",
phone:""
},
//
drawer: false,
//
direction: 'rtl',
//
search: true,
//
loading: true,
//
view: false,
//
query: {},
//
page: {
currentPage: 1,
pageSize: 30,
total: 40
},
//
form: {},
pan: false,
//
selectionList: [],
//
data: [],
optioner:[],
optionsr:[],
optionser:[],
rules: {
// province: [
// { required: true, message: '', trigger: 'blur' },
// // { min: 3, max: 5, message: ' 3 5 ', trigger: 'blur' }
// ],
// brand: [
// { required: true, message: '', trigger: 'change' }
// ],
// freightMark : [
// { required: true, message: '', trigger: 'blur' }
// ],
// cost: [
// { required: true, message: '', trigger: 'blur' }
// ],
// warehousingTimeStatus: [
// { required: true, message: '', trigger: 'change' }
// ],
// warehousingTimeCharge: [
// { required: true, message: '', trigger: 'blur' }
// ],
// goalGranary: [
// { required: true, message: '', trigger: 'blur' }
// ],
},
}
},
watch: {
},
created() {
},
mounted () {
this.init();
},
computed: {
...mapGetters(["permission"]),
ids () {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
},
methods: {
//
hideCascaderInp(){
this.$refs.cascaderRef.value.togglePopperVisible(false)
},
handleDrawerClose(){
this.costCorrelationId = '';
this.drawer = false;
},
handleDrawer(row) {
this.costCorrelationId = row.id;
this.drawer = true;
},
textWarebox(e,index) {
console.log(e,index)
this.costWraeList[index] = e;
},
textbox(e,index) {
console.log(e,index)
this.costList[index] = e;
},
handleCheckedCities(value) {
console.log(value);
if(value.length < 1){
this.costWraeList = [];
}
this.wareType.forEach(i =>{
if(value.includes(i.dictValue)){
// console.log(i);
i.pitch = true;
// this.$set(i,'pitch',false);
this.costWraeListName = value;
}else{
i.pitch = false;
this.costWraeList[i] = null;
i.remark = null;
}
});
},
handleCheckedCitiesChange(value) {
},
remoteMethod(query){
},
remoteMethodBin(query){
},
init () {
this.height = this.setPx(document.body.clientHeight - 340);
},
searchHide () {
this.search = !this.search;
},
searchChange () {
this.onLoad(this.page);
},
searchReset () {
this.query = {};
this.page.currentPage = 1;
this.onLoad(this.page);
},
handleSubmit (from) {
this.$refs[from].validate(async (valid) => {
if (valid) {
this.openAcountform.clientId=this.$route.query.id;
add(this.openAcountform).then(() => {
this.openAcountStatus = false;
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!'
});
});
}
})
},
handleAdd () {
this.openAcountStatus = true;
},
handleEdit (row) {
},
handleView (row) {
},
handleDelete () {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.selectionClear();
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
rowDel (row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
beforeClose (done) {
done()
this.form = {};
this.view = false;
},
selectionChange (list) {
this.selectionList = list;
},
selectionClear () {
this.selectionList = [];
},
currentChange (currentPage) {
this.page.currentPage = currentPage;
this.onLoad(this.page);
},
sizeChange (pageSize) {
this.page.pageSize = pageSize;
this.onLoad(this.page);
},
onLoad (page, params = {}) {
this.loading = true;
this.query.clientId= this.$route.query.id;
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data = res.data.data;
this.clientType.forEach(it =>{
data.records.forEach(i =>{
if(parseInt( it.dictKey ) == parseInt(i.freightMark)){
i.freightMark = it.dictValue
}
if(i.freightMark == '-1'){
i.freightMark = '无'
}
})
})
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
});
}
}
};
</script>
<style>
.ca .el-radio__inner {
top: -18px;
left: -19px;
border-radius: 0;
border: 0;
width: 170px;
height: 34px;
background-color: transparent;
cursor: pointer;
box-sizing: border-box;
position: absolute;
}
.ca .el-radio__input.is-checked .el-radio__inner {
background: transparent;
}
</style>

2
src/views/basicdata/brand/basicdataTripartiteMall.vue

@ -270,7 +270,7 @@ export default {
},
onLoad (page, params = {}) {
this.loading = true;
this.query.client = this.$route.query.id;
this.query.clientId = this.$route.query.id;
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data = res.data.data;
this.page.total = data.total;

Loading…
Cancel
Save