Преглед изворни кода

增加了新员工列表页面 增加了申请试用页面的头像栏

wangn пре 5 година
родитељ
комит
fdd8e90d85

+ 179 - 0
hdApp/src/admin/home/newStudent.vue

@@ -0,0 +1,179 @@
+<template>
+  <view class="new_students">
+    <view class="search_frame">
+      <input
+        type="text"
+        placeholder="请输入学员姓名搜索,支持拼音首字母"
+        placeholder-style="color:#999;"
+      >
+      <text class="iconfont iconsearch _search_icon"></text>
+    </view>
+    <scroll-view
+      class="students_list"
+      scroll-y
+    >
+      <view
+        class="list_item"
+        v-for="(item, index) in initData"
+        :key="index"
+      >
+        <view class="item_header">
+          <image :src="item.classFullCover"></image>
+          <text class="student_name">{{item.name}}</text>
+          <text
+            class="_icon_new"
+            v-if="item.isNew === 1"
+          >NEW</text>
+          <text
+            class="status_apply"
+            v-if="item.status === '1'"
+            style="color: #09bb07;"
+          >已报名</text>
+          <text
+            class="status_apply"
+            style="color: #333333;"
+            v-if="item.status === '2'"
+          >待付款</text>
+        </view>
+        <view class="item_main">
+          <image :src="item.classFullCover"></image>
+          <view class="student_text">
+            <view class="_class">{{item.className}}</view>
+            <view class="class_odd">课程单号:{{item.orderSn}} </view>
+            <view class="class_odd">下单日期:{{item.applyTime.length > 10 ? item.applyTime.substr(0, 10) : item.applyTime}}</view>
+          </view>
+          <view class="price">¥985.80</view>
+        </view>
+      </view>
+    </scroll-view>
+  </view>
+</template>
+
+<script>
+import { pxApplyList } from '@/api/px-apply/index'
+export default {
+  data () {
+    return {
+      initData: []
+    }
+  },
+  mounted () {
+    this.getData()
+  },
+  methods: {
+    getData () {
+      console.log(1111)
+      pxApplyList().then(res => {
+        console.log('res===>', res)
+        this.initData = res.data.list
+      }).catch(err => { console.log(err) })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.new_students {
+  .search_frame {
+    padding: 20upx 0;
+    position: relative;
+    & > input {
+      width: 90vw;
+      height: 60upx;
+      margin: 0 auto;
+      background: #f0f2f6;
+      border-radius: 30px;
+      padding-left: 60upx;
+    }
+    & > ._search_icon {
+      position: absolute;
+      top: 52%;
+      left: 8%;
+      transform: translateY(-50%);
+      font-size: 30upx;
+      color: #999;
+    }
+  }
+  .students_list {
+    padding-top: 20upx;
+    background: #f0f2f6;
+    .list_item {
+      background-color: #fff;
+      margin-bottom: 20upx;
+      & > .item_header {
+        padding: 25upx 30upx 0;
+        & > image {
+          display: inline-block;
+          vertical-align: middle;
+          width: 50px;
+          height: 50px;
+          // background: #f0f2f6;
+          border: 1px solid #dddddd;
+          border-radius: 25px;
+        }
+        & > .student_name {
+          display: inline-block;
+          vertical-align: middle;
+          font-size: 32upx;
+          margin-left: 20upx;
+          color: #333;
+          font-weight: 600;
+        }
+        & > ._icon_new {
+          width: 64upx;
+          height: 26upx;
+          margin-left: 20upx;
+          vertical-align: middle;
+          background: #3385ff;
+          border-radius: 4px;
+          color: #fff;
+        }
+        & > .status_apply {
+          font-size: 24px;
+
+          line-height: 50upx;
+          float: right;
+        }
+      }
+      & > .item_main {
+        padding: 30upx;
+        & > image {
+          vertical-align: middle;
+          display: inline-block;
+          background: #eeeeee;
+          width: 150upx;
+          height: 150upx;
+        }
+        & > .student_text {
+          vertical-align: middle;
+          display: inline-block;
+          width: 55%;
+          height: 150upx;
+          // background-color: green;
+          margin-left: 20upx;
+          & > ._class {
+            margin: 10upx 0 20upx;
+            font-size: 28upx;
+            color: #333333;
+            overflow: hidden;
+            white-space: nowrap;
+            text-overflow: ellipsis;
+          }
+          & > .class_odd {
+            font-size: 26upx;
+            color: #999;
+            line-height: 38upx;
+          }
+        }
+        & > .price {
+          display: inline-block;
+          color: #333333;
+          font-size: 30px;
+          font-weight: 600;
+          vertical-align: bottom;
+        }
+      }
+    }
+  }
+}
+</style>

+ 11 - 2
hdApp/src/admin/home/workbench.vue

@@ -34,8 +34,11 @@
             {{ $util.numberFormat(data.todayData.user) || 0 }}
           </div>
         </div>
-        <div class="info-list">
-          <div class="info-list-name">支出</div>
+        <div
+          class="info-list"
+          @click="goNewStudent"
+        >
+          <div class="info-list-name">新学员</div>
           <div class="info-list-value">
             {{ $util.numberFormat(data.todayData.expend) || 0 }}
           </div>
@@ -345,6 +348,12 @@ export default {
         url: page
       });
     },
+    // 新学员列表
+    goNewStudent () {
+      uni.navigateTo({
+        url: '/admin/home/newStudent'
+      })
+    },
     // 续费
     renewFn () {
       this.$util.pageTo({

+ 7 - 0
hdApp/src/api/px-apply/index.js

@@ -0,0 +1,7 @@
+import https from "@/plugins/luch-request_0.0.7/request";
+/** *
+ * 新学员 学员管理 --- 新学员列表
+ */
+export const pxApplyList = data => {
+	return https.get("/px-apply/list", data);
+};

+ 7 - 0
hdApp/src/pages.json

@@ -7,6 +7,13 @@
 				"enablePullDownRefresh": true
 			}
 		},
+    {
+			"path": "admin/home/newStudent",
+			"style": {
+				"navigationBarTitleText": "新学员",
+				"enablePullDownRefresh": true
+			}
+		},
 		{
 			"path": "admin/home/console",
 			"style": {

+ 154 - 70
hdApp/src/pagesClient/official/apply.vue

@@ -2,7 +2,10 @@
   <div class="app-content">
     <form @submit="formSubmit">
       <div class="module-com">
-        <tui-list-cell class="line-cell" :hover="false">
+        <tui-list-cell
+          class="line-cell"
+          :hover="false"
+        >
           <div class="tui-title">花店名称</div>
           <input
             v-model="form.name"
@@ -13,17 +16,42 @@
             placeholder="请输入花店名称"
           />
         </tui-list-cell>
-        <tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="openAddres">
+        <tui-list-cell
+          class="line-cell"
+          :hover="false"
+          :arrow="true"
+          @click="openAddres"
+        >
           <div class="tui-title">所在城市</div>
-          <div class="tui-input" v-if="form.province">{{ form.province + '-' + form.city }}</div>
-          <div class="tui-placeholder" v-else>请选择</div>
+          <div
+            class="tui-input"
+            v-if="form.province"
+          >{{ form.province + '-' + form.city }}</div>
+          <div
+            class="tui-placeholder"
+            v-else
+          >请选择</div>
         </tui-list-cell>
-        <tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="selRegionFn">
+        <tui-list-cell
+          class="line-cell"
+          :hover="false"
+          :arrow="true"
+          @click="selRegionFn"
+        >
           <div class="tui-title">详细地址</div>
-          <div class="tui-input" v-if="form.address">{{ form.address }}</div>
-          <div class="tui-placeholder" v-else>请填写详细地址</div>
+          <div
+            class="tui-input"
+            v-if="form.address"
+          >{{ form.address }}</div>
+          <div
+            class="tui-placeholder"
+            v-else
+          >请填写详细地址</div>
         </tui-list-cell>
-        <tui-list-cell class="line-cell" :hover="false">
+        <tui-list-cell
+          class="line-cell"
+          :hover="false"
+        >
           <div class="tui-title">门牌号</div>
           <input
             v-model="form.floor"
@@ -34,10 +62,31 @@
             placeholder="楼号门牌号(选填)"
           />
         </tui-list-cell>
+        <tui-list-cell
+          class="line-cell"
+          :hover="false"
+        >
+          <div class="tui-title">头像</div>
+          <app-uploader
+            @resultData="_resultData"
+            :num="1"
+          />
+          <!-- <input
+                v-model="form.name"
+                placeholder-class="phcolor"
+                placeholder-style="color:#CCCCCC"
+                class="tui-input"
+                name="name"
+                placeholder="请输入营业执照编号"
+              /> -->
+        </tui-list-cell>
       </div>
       <!-- 店长昵称 -->
       <div class="module-com">
-        <tui-list-cell class="line-cell" :hover="false">
+        <tui-list-cell
+          class="line-cell"
+          :hover="false"
+        >
           <div class="tui-title">店长姓名</div>
           <input
             v-model="form.adminName"
@@ -49,44 +98,60 @@
           />
         </tui-list-cell>
         <AppBindInfo
-            @bindInfo="bindInfo"
-            nameTetx="我的昵称">
+          @bindInfo="bindInfo"
+          nameTetx="我的昵称"
+        >
         </AppBindInfo>
       </div>
       <!-- 手机号 -->
       <div class="module-com">
-          <tui-list-cell
-            v-if="option.style == 1"
-            class="line-cell code-wrap" :hover="false">
-            <div class="tui-title">主营业务</div>
-            <div>
-              <button
-                @click="changeMain(1)"
-                :class="['admin-button-com','mini-btn',form.main==1?'blue':'default']">
-                零售
-              </button>
-              <button
-                @click="changeMain(2)"
-                style="margin-left:10px;" :class="['admin-button-com','mini-btn',form.main==2?'blue':'default']">
-                培训
-              </button>
-            </div>
-          </tui-list-cell>
-          <tui-list-cell class="line-cell" :hover="false">
-              <div class="tui-title">营业执照编号</div>
-              <input
-                v-model="form.licenseNo"
-                placeholder-class="phcolor"
-                placeholder-style="color:#CCCCCC"
-                class="tui-input"
-                name="name"
-                placeholder="请输入营业执照编号"
-              />
-         </tui-list-cell>
-          <tui-list-cell class="line-cell" :hover="false">
-              <div class="tui-title">营业执照片</div>
-              <app-uploader @resultData="resultData" ref="appUploader" :num="1" />
-              <!-- <input
+        <tui-list-cell
+          v-if="option.style == 1"
+          class="line-cell code-wrap"
+          :hover="false"
+        >
+          <div class="tui-title">主营业务</div>
+          <div>
+            <button
+              @click="changeMain(1)"
+              :class="['admin-button-com','mini-btn',form.main==1?'blue':'default']"
+            >
+              零售
+            </button>
+            <button
+              @click="changeMain(2)"
+              style="margin-left:10px;"
+              :class="['admin-button-com','mini-btn',form.main==2?'blue':'default']"
+            >
+              培训
+            </button>
+          </div>
+        </tui-list-cell>
+        <tui-list-cell
+          class="line-cell"
+          :hover="false"
+        >
+          <div class="tui-title">营业执照编号</div>
+          <input
+            v-model="form.licenseNo"
+            placeholder-class="phcolor"
+            placeholder-style="color:#CCCCCC"
+            class="tui-input"
+            name="name"
+            placeholder="请输入营业执照编号"
+          />
+        </tui-list-cell>
+        <tui-list-cell
+          class="line-cell"
+          :hover="false"
+        >
+          <div class="tui-title">营业执照片</div>
+          <app-uploader
+            @resultData="resultData"
+            ref="appUploader"
+            :num="1"
+          />
+          <!-- <input
                 v-model="form.name"
                 placeholder-class="phcolor"
                 placeholder-style="color:#CCCCCC"
@@ -94,14 +159,22 @@
                 name="name"
                 placeholder="请输入营业执照编号"
               /> -->
-         </tui-list-cell>
+        </tui-list-cell>
 
       </div>
       <!-- 推荐人 -->
-      <div class="module-com recommend-wrap" v-if="!$util.isEmpty(merchantData)">
+      <div
+        class="module-com recommend-wrap"
+        v-if="!$util.isEmpty(merchantData)"
+      >
         <div class="recommend-tag">推荐人</div>
         <div class="recommend-det">
-          <image style="width:90rpx;height:90rpx;border-radius:42rpx;" mode="scaleToFill" :src="merchantData.smallLogoUrl" @error="imageError" />
+          <image
+            style="width:90rpx;height:90rpx;border-radius:42rpx;"
+            mode="scaleToFill"
+            :src="merchantData.smallLogoUrl"
+            @error="imageError"
+          />
           <div class="recommend-info">
             <div class="app-size-32">{{ merchantData.name }}</div>
             <div class="app-color-2">{{ merchantData.fullAddress }}</div>
@@ -110,10 +183,17 @@
       </div>
 
       <div class="btn-wrap">
-        <button class="admin-button-com blue big" formType="submit">确认</button>
+        <button
+          class="admin-button-com blue big"
+          formType="submit"
+        >确认</button>
       </div>
       <!-- 选择地区 -->
-      <app-area-sel :show.sync="showRegion" @change="changeAreaFn" :city="form.city" />
+      <app-area-sel
+        :show.sync="showRegion"
+        @change="changeAreaFn"
+        :city="form.city"
+      />
       <!-- 省市联动 -->
       <simple-address
         ref="simpleAddress"
@@ -151,7 +231,7 @@ export default {
     AppUploader,
     AppBindInfo
   },
-  data() {
+  data () {
     return {
       merchantData: {},
       form: {
@@ -161,15 +241,15 @@ export default {
         city: "",
         dist: "",
         address: "",
-        adminName:'',
-        nickName:'',
+        adminName: '',
+        nickName: '',
         main: 1,
         licenseNo: "",
-         license: "",
+        license: "",
         // floor: "",
         longitude: "",
         latitude: "",
-
+        logo: ''
       },
       showRegion: false,
       // 省市联动
@@ -182,7 +262,7 @@ export default {
       nickName: ""
     };
   },
-  onLoad() {
+  onLoad () {
     // form 来源  introMerchantId 推荐ID  style  供货商 | 零售
     // if (!this.$util.isLogin()) {
     // 	// getShopUser()
@@ -192,22 +272,26 @@ export default {
   },
   methods: {
     //图片地址
-    resultData(val){
+    resultData (val) {
       this.form.license = val.shortUrl
     },
-    changeMain(val){
+    _resultData (val) {
+      console.log(val)
+      this.form.logo = val.shortUrl
+    },
+    changeMain (val) {
       this.form.main = val
     },
-    bindInfo(val){
+    bindInfo (val) {
       this.form.nickName = val.nickName;
       this.form.mobile = val.mobile
     },
-    init() {
+    init () {
       this.$util.getCheckLogin().then(res => {
         if (res) {
-            if(this.option.introMerchantId) {
-              this._getMerchantDet();
-            }
+          if (this.option.introMerchantId) {
+            this._getMerchantDet();
+          }
         }
       });
     },
@@ -216,15 +300,15 @@ export default {
     //     this.regionData = res.data.tree;
     //   });
     // },
-    _getMerchantDet() {
+    _getMerchantDet () {
       // let id = uni.getStorageSync("introMerchantId");
       getIntroduce({ id: this.option.introMerchantId || 0 }).then(res => {
         this.merchantData = res.data;
       });
     },
     // ==============
-    confirmFn() {
-    	// console.log('cs',this.option.shopAdminId)
+    confirmFn () {
+      // console.log('cs',this.option.shopAdminId)
       // let id = uni.getStorageSync("introMerchantId");
       applyRegister({
         shopAdminId: this.option.shopAdminId,
@@ -242,7 +326,7 @@ export default {
       });
     },
     // 选择地址
-    selRegionFn() {
+    selRegionFn () {
       if (!this.form.city) {
         this.$msg("请先选择城市!");
         return false;
@@ -261,7 +345,7 @@ export default {
       // 	}
       // })
     },
-    changeAreaFn(e) {
+    changeAreaFn (e) {
       console.log("changeAreaFn", e);
       this.form.address = e.address;
       this.form.latitude = e.location.lat;
@@ -270,17 +354,17 @@ export default {
     },
     // -----
     // 省市联动
-    openAddres() {
+    openAddres () {
       this.$refs.simpleAddress.open();
     },
-    onCityConfirm(e) {
+    onCityConfirm (e) {
       // this.form.receiveAddress = e.label
       this.form.province = e.provinceName;
       this.form.city = e.cityName;
       // this.pickerText = JSON.stringify(e)
     },
     // 表单验证
-    formSubmit(e) {
+    formSubmit (e) {
       // 表单规则
       let rules = [
         {
@@ -309,7 +393,7 @@ export default {
       }
     }
   },
-  watch:{
+  watch: {
     // imageList(val){
     //   this.form.
     //   console.log(val)