Commit 3c7ddfc2 authored by 黄奎's avatar 黄奎

页面修改

parent 485eedf7
...@@ -73,11 +73,12 @@ ...@@ -73,11 +73,12 @@
<div style="margin-bottom:20px"> <div style="margin-bottom:20px">
<div class="searchInput"> <div class="searchInput">
<el-input style="display:inline-block;width:170px;" placeholder="请输入内容" v-model="qMsg.MallName" <el-input style="display:inline-block;width:170px;" placeholder="请输入内容" v-model="qMsg.MallName"
size="small" clearable> size="small" clearable @keyup.enter.native="qMsg.pageIndex=1,getMiniPrograme()">
</el-input> </el-input>
<span class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"></span> <span class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"
@click="qMsg.pageIndex=1,getMiniPrograme()"></span>
</div> </div>
<el-button @click="creatDig=true" size="small" type="primary">添加小程序商城</el-button> <el-button @click="createMallDig=true" size="small" type="primary">添加小程序商城</el-button>
<span style="margin-left: 20px;font-size:14px;position: relative;top: 2px;"> <span style="margin-left: 20px;font-size:14px;position: relative;top: 2px;">
<span style="color:#BCBCBC;">可创建小程序商城数量</span> <span style="color:#BCBCBC;">可创建小程序商城数量</span>
<span style="color: rgb(73, 169, 255);padding: 0px 5px;">1</span> <span style="color: rgb(73, 169, 255);padding: 0px 5px;">1</span>
...@@ -88,7 +89,9 @@ ...@@ -88,7 +89,9 @@
</el-table-column> </el-table-column>
<el-table-column prop="name" label="商城名称" width="155"> <el-table-column prop="name" label="商城名称" width="155">
<template slot-scope="scope"> <template slot-scope="scope">
<p style="color:#409EFF;cursor:pointer;" @click="setMallBaseId(scope.row.MallBaseId,scope.row.MallName),CommonJump('mall',{})">{{scope.row.MallName}}</p> <p style="color:#409EFF;cursor:pointer;"
@click="setMallBaseId(scope.row.MallBaseId,scope.row.MallName),CommonJump('mall',{})">
{{scope.row.MallName}}</p>
<p>账号:{{scope.row.Account}}</p> <p>账号:{{scope.row.Account}}</p>
<p> <p>
手机:<span style="color:rgb(144, 147, 153)">{{scope.row.MobilePhone}}</span> 手机:<span style="color:rgb(144, 147, 153)">{{scope.row.MobilePhone}}</span>
...@@ -102,10 +105,9 @@ ...@@ -102,10 +105,9 @@
</el-table-column> </el-table-column>
<el-table-column prop="address" label="操作"> <el-table-column prop="address" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="info" plain>编辑 </el-button> <el-button size="mini" type="info" plain @click="EditMall(scope.row)">编辑 </el-button>
<el-button size="mini" type="info" plain>回收</el-button>
<el-button size="mini" type="info" plain>版权</el-button> <el-button size="mini" type="info" plain>版权</el-button>
<el-button size="mini" type="info" plain>禁用</el-button> <el-button size="mini" type="info" plain @click="RemmoveMall(scope.row)">禁用</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -120,43 +122,43 @@ ...@@ -120,43 +122,43 @@
</p> </p>
<div style="margin-bottom:20px;padding: 15px 20px;"> <div style="margin-bottom:20px;padding: 15px 20px;">
<div class="searchInput" style="width:250px;"> <div class="searchInput" style="width:250px;">
<el-input style="display:inline-block;width:225px;" @keyup.enter.native="qMsg.pageIndex=1,getMiniPrograme()" placeholder="请输入商城名称或用户名搜索" v-model="val" <el-input style="display:inline-block;width:225px;" placeholder="请输入商城名称或用户名搜索" v-model="qMsg2.MallName"
size="small" clearable> size="small" clearable @keyup.enter.native="qMsg2.pageIndex=1,getRemoveMiniPrograme()">
</el-input> </el-input>
<span class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"></span> <span class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"
@click="qMsg2.pageIndex=1,getRemoveMiniPrograme()"></span>
</div> </div>
</div> </div>
<div style="padding: 15px 20px;"> <div style="padding: 15px 20px;">
<el-table :data="tableData" border style="width: 100%;margin-bottom:20px"> <el-table :data="tableData2" border style="width: 100%;margin-bottom:20px">
<el-table-column prop="MallBaseId" label="编号" width="60"> <el-table-column prop="MallBaseId" label="编号" width="60">
</el-table-column> </el-table-column>
<el-table-column prop="name" label="商城名称" width="155"> <el-table-column prop="name" label="商城名称" width="155">
<template slot-scope="scope"> <template slot-scope="scope">
<p style="color:#409EFF;">{{scope.row.MallName}}</p> <p style="color:#409EFF;">{{scope.row.MallName}}</p>
<p>账号:{{scope.row.Account}}</p> <p>账号:{{scope.row.Account}}</p>
<p> <p>
手机:<span style="color:rgb(144, 147, 153)">{{scope.row.MobilePhone}}</span> 手机:<span style="color:rgb(144, 147, 153)">{{scope.row.MobilePhone}}</span>
</p> </p>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="address" label="数据统计" show-overflow-tooltip :render-header="renderHeader" <el-table-column prop="address" label="数据统计" show-overflow-tooltip :render-header="renderHeader"
width="155"> width="155">
</el-table-column> </el-table-column>
<el-table-column prop="EffectiveDateStr" label="有效期" width="170"> <el-table-column prop="EffectiveDateStr" label="有效期" width="170">
</el-table-column> </el-table-column>
<el-table-column prop="address" label="操作"> <el-table-column prop="address" label="操作">
<template> <template slot-scope="scope">
<el-button size="mini" type="info" plain>恢复</el-button> <el-button size="mini" type="info" plain @click="RecoverMall(scope.row)">恢复</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination style="text-align:right" background layout="prev, pager, next" :total="1000"> <el-pagination style="text-align:right" background @current-change="handleCurrentChange2"
v-if="tableData2&&tableData2.length>0" :current-page.sync="qMsg2.pageIndex"
layout="total,prev, pager, next, jumper" :page-size="qMsg.pageSize" :total="qMsg2.total">
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
</div> </div>
<div v-show="tab1==3" class="content"> <div v-show="tab1==3" class="content">
<div style="background:#fff" class="radius tab2Div"> <div style="background:#fff" class="radius tab2Div">
...@@ -208,9 +210,9 @@ ...@@ -208,9 +210,9 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div style="text-align: center;line-height: 60px;color: #000;font-size:12px">由成都微途科技有限公司提供技术支持</div> <div style="text-align: center;line-height: 60px;color: #000;font-size:12px">由成都微途科技有限公司提供技术支持</div>
<!-- 修改手机号 --> <!-- 修改手机号 -->
<el-dialog title="修改手机号" :visible.sync="dialogVisible" width="400px"> <el-dialog title="修改手机号" :visible.sync="dialogVisible" width="400px">
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="100px"> <el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="100px">
...@@ -227,14 +229,17 @@ ...@@ -227,14 +229,17 @@
<el-button size="small" type="primary" @click="dialogVisible = false">确 定</el-button> <el-button size="small" type="primary" @click="dialogVisible = false">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
<!-- 修改密码 --> <!-- 修改密码 -->
<el-dialog title="修改密码" :visible.sync="upDatePwd" width="400px"> <el-dialog title="修改密码" :visible.sync="upDatePwd" width="400px">
<el-form :model="updateMsg" :rules="uprules" ref="updateMsg" label-width="100px"> <el-form :model="updateMsg" :rules="uprules" ref="updateMsg" label-width="100px">
<el-form-item label="密码" prop="Password"> <el-form-item label="密码" prop="Password">
<el-input type="password" style="width:234px" size="small" maxlength="25" v-model="updateMsg.Password"></el-input> <el-input type="password" style="width:234px" size="small" maxlength="25" v-model="updateMsg.Password">
</el-input>
</el-form-item> </el-form-item>
<el-form-item label="确认密码" prop="Password2"> <el-form-item label="确认密码" prop="Password2">
<el-input type="password" style="width:234px" size="small" maxlength="25" v-model="updateMsg.Password2"></el-input> <el-input type="password" style="width:234px" size="small" maxlength="25" v-model="updateMsg.Password2">
</el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
...@@ -244,24 +249,26 @@ ...@@ -244,24 +249,26 @@
</el-dialog> </el-dialog>
<!-- 创建商城 --> <!-- 创建商城 -->
<el-dialog title="创建商城" :visible.sync="creatDig" width="440px"> <el-dialog title="创建商城" :visible.sync="createMallDig" width="440px">
<el-form :model="creatMsg" :rules="creatMsgrules" ref="creatMsg" label-width="100px"> <el-form :model="creatMallMsg" :rules="creatMallMsgrules" ref="creatMallMsg" label-width="100px">
<el-form-item label="商城名称" prop="MallName"> <el-form-item label="商城名称" prop="MallName">
<el-input size="small" v-model="creatMsg.MallName"></el-input> <el-input size="small" v-model="creatMallMsg.MallName"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="商城有效期" prop="MallValidate"> <el-form-item label="商城有效期" prop="MallValidate">
<el-date-picker v-model="creatMsg.MallValidate" :disabled="creatMsg.isChecked" value-format="yyyy-MM-dd" <el-date-picker v-model="creatMallMsg.MallValidate" :disabled="creatMallMsg.isChecked"
style="width:220px;margin-right:8px" type="date" placeholder="选择日期时间"></el-date-picker> value-format="yyyy-MM-dd" style="width:220px;margin-right:8px" type="date" placeholder="选择日期时间">
<el-checkbox v-model="creatMsg.isChecked">永久</el-checkbox> </el-date-picker>
<el-checkbox v-model="creatMallMsg.isChecked" @change="GetChange()">永久</el-checkbox>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" @click="creatDig = false">取 消</el-button> <el-button size="small" @click="createMallDig = false">取 消</el-button>
<el-button size="small" type="primary" @click="submitForm('creatMsg')">确 定</el-button> <el-button size="small" type="primary" @click="submitForm('creatMallMsg')">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
<!-- 存储位置编辑 --> <!-- 存储位置编辑 -->
<el-dialog title="存储位置编辑" :visible.sync="dialogEdit" top="5%" width="800px"> <el-dialog title="存储位置编辑" :visible.sync="storageDig" top="5%" width="800px">
<el-form class="editMsg" :model="editMsg" :rules="editMsgrules" ref="editMsg" label-width="0px"> <el-form class="editMsg" :model="editMsg" :rules="editMsgrules" ref="editMsg" label-width="0px">
<el-form-item label-width="80px" label="存储位置" prop="name"> <el-form-item label-width="80px" label="存储位置" prop="name">
<el-radio v-model="editMsg.type" label="1">腾讯云COS</el-radio> <el-radio v-model="editMsg.type" label="1">腾讯云COS</el-radio>
...@@ -332,7 +339,7 @@ ...@@ -332,7 +339,7 @@
name: 'homeIndex', name: 'homeIndex',
data() { data() {
let validataMala = (rule, value, callback) => { let validataMala = (rule, value, callback) => {
if (!this.creatMsg.isChecked && this.creatMsg.MallValidate == '') { if (!this.creatMallMsg.isChecked && this.creatMallMsg.MallValidate == '') {
return callback(new Error('请选择商城有效期')); return callback(new Error('请选择商城有效期'));
} else { } else {
callback(); callback();
...@@ -349,37 +356,48 @@ ...@@ -349,37 +356,48 @@
} }
} }
return { return {
currentUserMsg: {}, currentUserMsg: {}, //当前登录用户信息
creatMsg: { createMallDig: false, //是否显示创建小程序弹窗
//创建商城参数
creatMallMsg: {
MallBaseId: 0, MallBaseId: 0,
MallName: '', MallName: '',
MallValidate: '', MallValidate: '',
IsEffective: 0, IsEffective: 0,
isChecked: false isChecked: false
}, },
creatDig: false,
editMsg: { editMsg: {
type: '', type: '',
}, },
dialogEdit: false, storageDig: false, //是否显示存储位置弹窗
tab1: 1, tab1: 1,
tab2: 1, tab2: 1,
tab3: 1, tab3: 1,
tableData: [], tableData: [], //正常的小程序列表
tableData2: [], //删除的小程序列表
val: '', val: '',
dialogVisible: false, dialogVisible: false,
upDatePwd:false, upDatePwd: false,
addMsg: {}, addMsg: {},
qMsg: { qMsg: {
pageIndex: 1, pageIndex: 1,
pageSize: 1, pageSize: 1,
MallName: "", MallName: "",
total: 0, total: 0,
Status: 0,
},
qMsg2: {
pageIndex: 1,
pageSize: 1,
MallName: "",
total: 0,
Status: 1,
}, },
//修改密码msg //修改密码msg
updateMsg:{ updateMsg: {
Password:'', MobilePhone: "",
Password2:'' Password: '',
Password2: ''
}, },
rules: { rules: {
name: [{ name: [{
...@@ -395,7 +413,7 @@ ...@@ -395,7 +413,7 @@
trigger: 'blur' trigger: 'blur'
}], }],
}, },
creatMsgrules: { creatMallMsgrules: {
MallName: [{ MallName: [{
required: true, required: true,
message: '请填写商城名称。', message: '请填写商城名称。',
...@@ -409,7 +427,7 @@ ...@@ -409,7 +427,7 @@
}], }],
}, },
//修改密码验证 //修改密码验证
uprules:{ uprules: {
Password: [{ Password: [{
required: true, required: true,
message: '请输入密码', message: '请输入密码',
...@@ -424,6 +442,7 @@ ...@@ -424,6 +442,7 @@
} }
}, },
methods: { methods: {
//退出登录
loginOut() { loginOut() {
localStorage.removeItem("mall_userInfo"); localStorage.removeItem("mall_userInfo");
location.href = '/'; location.href = '/';
...@@ -441,7 +460,7 @@ ...@@ -441,7 +460,7 @@
}, },
addAdress() { addAdress() {
this.dialogEdit = true; this.storageDig = true;
this.editMsg = { this.editMsg = {
type: '', type: '',
} }
...@@ -481,6 +500,15 @@ ...@@ -481,6 +500,15 @@
] ]
) )
}, },
//是否永久有效
GetChange() {
if (this.creatMallMsg.isChecked) {
this.creatMallMsg.IsEffective = 1;
this.creatMallMsg.MallValidate = "";
} else {
this.creatMallMsg.IsEffective = 0;
}
},
handleCurrentChange(val) { handleCurrentChange(val) {
this.qMsg.pageIndex = val; this.qMsg.pageIndex = val;
this.getMiniPrograme(); this.getMiniPrograme();
...@@ -496,7 +524,20 @@ ...@@ -496,7 +524,20 @@
} }
}) })
}, },
handleCurrentChange2(val) {
this.qMsg2.pageIndex = val;
this.getRemoveMiniPrograme();
},
getRemoveMiniPrograme() {
this.apipost("/api/Tenant/GetMiniProgramePage", this.qMsg2, res => {
if (res.data.resultCode == 1) {
this.tableData2 = res.data.data.pageData;
this.qMsg2.total = res.data.data.count;
} else {
this.Info(res.data.message);
}
})
},
//创建商城 //创建商城
submitForm(addMsg) { submitForm(addMsg) {
this.$refs[addMsg].validate(valid => { this.$refs[addMsg].validate(valid => {
...@@ -508,38 +549,90 @@ ...@@ -508,38 +549,90 @@
}); });
}, },
createShop() { createShop() {
if (this.creatMsg.isChecked) { if (this.creatMallMsg.isChecked) {
this.creatMsg.MallValidate = "" this.creatMallMsg.MallValidate = "";
this.creatMallMsg.IsEffective = 1;
} else {
this.creatMallMsg.IsEffective = 0;
} }
this.apipost("/api/Tenant/SetMiniPrograme", this.creatMsg, res => { this.apipost("/api/Tenant/SetMiniPrograme", this.creatMallMsg, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.createMallDig = false;
this.creatMallMsg.MallBaseId = 0;
this.creatMallMsg.MallName = "";
this.creatMallMsg.MallValidate = "";
this.creatMallMsg.IsEffective = 0;
this.creatMallMsg.isChecked = false;
this.getMiniPrograme(); this.getMiniPrograme();
this.creatDig = false;
} else { } else {
this.Info(res.data.message); this.Info(res.data.message);
} }
}) })
}, },
//点击商品名称设置setMallBaseId //点击商品名称设置setMallBaseId
setMallBaseId(Id,Name){ setMallBaseId(Id, Name) {
let userInfo = this.getLocalStorage(); let userInfo = this.getLocalStorage();
userInfo.MallBaseId = Id; userInfo.MallBaseId = Id;
userInfo.MallName = Name; userInfo.MallName = Name;
localStorage.mall_userInfo = JSON.stringify(userInfo); localStorage.mall_userInfo = JSON.stringify(userInfo);
}, },
//修改密码 //修改密码
upPassWord(){ upPassWord() {
this.updateMsg.MobilePhone = this.getLocalStorage().MobilePhone;
this.apipost("/api/Tenant/UpdateTenantPwd", this.updateMsg, res => {
if (res.data.resultCode == 1) {
this.loginOut();
} else {
this.Info(res.data.message);
}
})
},
//修改小程序
EditMall(item) {
this.creatMallMsg.MallBaseId = item.MallBaseId;
this.creatMallMsg.MallName = item.MallName;
this.creatMallMsg.MallValidate = item.MallValidate;
this.creatMallMsg.IsEffective = item.IsEffective;
this.creatMallMsg.isChecked = item.IsEffective > 0;
this.createMallDig = true;
},
//删除小程序
RemmoveMall(item) {
this.apipost("/api/Tenant/SetMiniProgrameStatus", {
MallBaseId: item.MallBaseId,
Status: 1
}, res => {
if (res.data.resultCode == 1) {
this.getMiniPrograme();
this.getRemoveMiniPrograme();
} else {
this.Info(res.data.message);
}
})
},
//恢复小程序
RecoverMall(item) {
this.apipost("/api/Tenant/SetMiniProgrameStatus", {
MallBaseId: item.MallBaseId,
Status: 0
}, res => {
if (res.data.resultCode == 1) {
this.getMiniPrograme();
this.getRemoveMiniPrograme();
} else {
this.Info(res.data.message);
}
})
} }
}, },
mounted() { mounted() {
this.init(); this.init();
this.getMiniPrograme(); this.getMiniPrograme();
this.getRemoveMiniPrograme();
} }
} }
</script> </script>
<style> <style>
.homeIndex .uploadBig { .homeIndex .uploadBig {
padding: 30px 0 10px 110px; padding: 30px 0 10px 110px;
......
...@@ -171,7 +171,7 @@ ...@@ -171,7 +171,7 @@
<el-form-item label="" prop="Password"> <el-form-item label="" prop="Password">
<el-input type="password" v-model="msg.Password" placeholder="请输入密码" maxlength="25" /> <el-input type="password" v-model="msg.Password" placeholder="请输入密码" maxlength="25" />
</el-form-item> </el-form-item>
<el-form-item label="" prop="ValidataCode"> <el-form-item label="" prop="ValidataCode" style="display:none;">
<el-input v-model="msg.ValidataCode" style="width:140px;" placeholder="验证码" maxlength="25" /> <el-input v-model="msg.ValidataCode" style="width:140px;" placeholder="验证码" maxlength="25" />
<img class="pic-captcha" src="/web/index.php?r=site%2Fpic-captcha&amp;v=5e9e7ef6a93ac6.36592545" /> <img class="pic-captcha" src="/web/index.php?r=site%2Fpic-captcha&amp;v=5e9e7ef6a93ac6.36592545" />
</el-form-item> </el-form-item>
......
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