Prechádzať zdrojové kódy

管理后台-用户中心

panyong 3 rokov pred
rodič
commit
0f60f4c9bb

+ 10 - 11
htmldev/manage/src/views/ums/boss/details.vue

@@ -9,11 +9,11 @@
                :model="form"
                :rules="formRules"
                label-width="160px">
-        <el-form-item prop="user_song_name"
+        <el-form-item prop="user_name"
                       :rules="formRules.required"
                       label="吧台姓名:">
           <el-col :span="16">
-            <el-input v-model="form.user_song_name"
+            <el-input v-model="form.user_name"
                       placeholder="请输入吧台姓名"
                       clearable></el-input>
           </el-col>
@@ -23,6 +23,7 @@
                       label="手机号:">
           <el-col :span="10">
             <el-input v-model="form.phone"
+                      disabled
                       placeholder="请输入手机号"
                       @input="form.phone = form.phone.replace(/[^\d]/g, '').slice(0, 11)"
                       clearable></el-input>
@@ -50,10 +51,10 @@
                       :rules="formRules.required"
                       label="状态:">
           <el-radio v-model="form.user_sign_status"
-                    label="1">启用
+                    label="0">关闭
           </el-radio>
           <el-radio v-model="form.user_sign_status"
-                    label="0">关闭
+                    label="1">启用
           </el-radio>
         </el-form-item>
         <el-form-item>
@@ -69,7 +70,6 @@
 </template>
 
 <script>
-import { fen2Yuan, yuan2Fen } from '@/utils'
 import getCode from '@/views/ums/mixin/getCode'
 
 export default {
@@ -91,7 +91,7 @@ export default {
     return {
       dialog: !!this.value,
       form: {
-        user_song_name: '', // 歌手名称
+        user_name: '', // 用户姓名
         phone: '', // 手机号码
         code: '', // 验证码
         user_sign_status: '1', // 艺人签约状态(0未签约1已签约)
@@ -100,13 +100,11 @@ export default {
   },
   methods: {
     handleSubmit () {
-      // todo 艺人添加、艺人海报数组转字符串
       const url = this.exData.id ? '/v1/user/member/song/modify' : ''
       this.$refs.form.validate(async valid => {
         if (valid) {
           const data = await this.$fetch(url, {
-            ...this.form,
-            place_price: yuan2Fen(this.form.place_price)
+            ...this.form
           })
           if (data.code === 200) {
             this.$message.success('提交成功')
@@ -120,12 +118,13 @@ export default {
   mounted () {
     if (this.exData.id) {
       this.$set(this.form, 'id', this.exData.id)
+      this.$set(this.form, 'phone', this.exData.user_phone)
       for (const key in this.exData) {
         if (this.form.hasOwnProperty(key)) {
           let value = this.exData[key]
           if ((Array.isArray(value) && value.length >= 1) || (Object.prototype.toString.call(value) === '[object Object]') || (typeof value === 'string' && value) || typeof value === 'number') {
-            if (key === 'place_price') {
-              value = fen2Yuan(value)
+            if (key === 'user_sign_status') {
+              value = value.toString()
             }
             this.$set(this.form, key, value)
           }

+ 6 - 5
htmldev/manage/src/views/ums/boss/index.vue

@@ -46,11 +46,12 @@
       <el-table-column label="手机号" prop="user_phone"></el-table-column>
       <el-table-column label="生日" prop="user_birthday"></el-table-column>
       <el-table-column label="性别" prop="user_sex"></el-table-column>
-      <el-table-column label="注册时间" prop="created_at"></el-table-column>
-      <!--todo 创建时间-->
-      <el-table-column label="创建时间"></el-table-column>
-      <!--todo 状态-->
-      <el-table-column label="状态"></el-table-column>
+      <el-table-column label="创建时间" prop="created_at"></el-table-column>
+      <el-table-column label="用户状态">
+        <template slot-scope="scope">
+          <p>{{ ['正常', '禁用'][scope.row.user_status] }}</p>
+        </template>
+      </el-table-column>
       <el-table-column label="操作">
         <template slot-scope="scope">
           <el-button type="text"

+ 1 - 2
htmldev/manage/src/views/ums/customer/index.vue

@@ -46,8 +46,7 @@
       <el-table-column label="生日" prop="user_birthday"></el-table-column>
       <el-table-column label="性别" prop="user_sex"></el-table-column>
       <el-table-column label="注册时间" prop="created_at"></el-table-column>
-      <!--TODO 缺字段最近一次登录-->
-      <el-table-column label="最近一次登录"></el-table-column>
+      <el-table-column label="最近一次登录时间" prop="user_login_at"></el-table-column>
       <el-table-column label="操作">
         <template>
           <!--TODO 直接跳转财务中心的流水-->

+ 1 - 0
htmldev/manage/src/views/ums/singer/details.vue

@@ -23,6 +23,7 @@
                       label="手机号:">
           <el-col :span="10">
             <el-input v-model="form.phone"
+                      disabled
                       placeholder="请输入手机号"
                       @input="form.phone = form.phone.replace(/[^\d]/g, '').slice(0, 11)"
                       clearable></el-input>

+ 10 - 11
htmldev/manage/src/views/ums/worker/details.vue

@@ -9,11 +9,11 @@
                :model="form"
                :rules="formRules"
                label-width="160px">
-        <el-form-item prop="user_song_name"
+        <el-form-item prop="user_name"
                       :rules="formRules.required"
                       label="吧台姓名:">
           <el-col :span="16">
-            <el-input v-model="form.user_song_name"
+            <el-input v-model="form.user_name"
                       placeholder="请输入吧台姓名"
                       clearable></el-input>
           </el-col>
@@ -23,6 +23,7 @@
                       label="手机号:">
           <el-col :span="10">
             <el-input v-model="form.phone"
+                      disabled
                       placeholder="请输入手机号"
                       @input="form.phone = form.phone.replace(/[^\d]/g, '').slice(0, 11)"
                       clearable></el-input>
@@ -50,10 +51,10 @@
                       :rules="formRules.required"
                       label="状态:">
           <el-radio v-model="form.user_sign_status"
-                    label="1">启用
+                    label="0">关闭
           </el-radio>
           <el-radio v-model="form.user_sign_status"
-                    label="0">关闭
+                    label="1">启用
           </el-radio>
         </el-form-item>
         <el-form-item>
@@ -69,7 +70,6 @@
 </template>
 
 <script>
-import { fen2Yuan, yuan2Fen } from '@/utils'
 import getCode from '@/views/ums/mixin/getCode'
 
 export default {
@@ -91,7 +91,7 @@ export default {
     return {
       dialog: !!this.value,
       form: {
-        user_song_name: '', // 歌手名称
+        user_name: '', // 用户姓名
         phone: '', // 手机号码
         code: '', // 验证码
         user_sign_status: '1', // 艺人签约状态(0未签约1已签约)
@@ -100,13 +100,11 @@ export default {
   },
   methods: {
     handleSubmit () {
-      // todo 艺人添加、艺人海报数组转字符串
       const url = this.exData.id ? '/v1/user/member/song/modify' : ''
       this.$refs.form.validate(async valid => {
         if (valid) {
           const data = await this.$fetch(url, {
-            ...this.form,
-            place_price: yuan2Fen(this.form.place_price)
+            ...this.form
           })
           if (data.code === 200) {
             this.$message.success('提交成功')
@@ -120,12 +118,13 @@ export default {
   mounted () {
     if (this.exData.id) {
       this.$set(this.form, 'id', this.exData.id)
+      this.$set(this.form, 'phone', this.exData.user_phone)
       for (const key in this.exData) {
         if (this.form.hasOwnProperty(key)) {
           let value = this.exData[key]
           if ((Array.isArray(value) && value.length >= 1) || (Object.prototype.toString.call(value) === '[object Object]') || (typeof value === 'string' && value) || typeof value === 'number') {
-            if (key === 'place_price') {
-              value = fen2Yuan(value)
+            if (key === 'user_sign_status') {
+              value = value.toString()
             }
             this.$set(this.form, key, value)
           }

+ 6 - 5
htmldev/manage/src/views/ums/worker/index.vue

@@ -46,11 +46,12 @@
       <el-table-column label="手机号" prop="user_phone"></el-table-column>
       <el-table-column label="生日" prop="user_birthday"></el-table-column>
       <el-table-column label="性别" prop="user_sex"></el-table-column>
-      <el-table-column label="注册时间" prop="created_at"></el-table-column>
-      <!--todo 创建时间-->
-      <el-table-column label="创建时间"></el-table-column>
-      <!--todo 状态-->
-      <el-table-column label="状态"></el-table-column>
+      <el-table-column label="创建时间" prop="created_at"></el-table-column>
+      <el-table-column label="用户状态">
+        <template slot-scope="scope">
+          <p>{{ ['正常', '禁用'][scope.row.user_status] }}</p>
+        </template>
+      </el-table-column>
       <el-table-column label="操作">
         <template slot-scope="scope">
           <el-button type="text"