Răsfoiți Sursa

Merge branch 'master' of git.huaml.com:zhh/front-end

zhengxin 5 ani în urmă
părinte
comite
ae66c05a47

+ 52 - 49
ghs/src/admin/billing/result.vue

@@ -1,63 +1,66 @@
 <template>
 <template>
-	<view class="billing_box_bg">
-		<view class="top-view"> </view>
-		<view class="result-view">
-			<view class="iconfont iconchenggong"></view>
-			<view class="result-title">开单成功</view>
-			<button class="admin-button-com blue big">发货详情</button>
-			<button class="admin-button-com big">打印单据</button>
-			<button class="admin-button-com big">继续开单</button>
-			<button class="admin-button-com big">订单列表</button>
-		</view>
-	</view>
+	<appResult>
+		<button class="admin-button-com blue big">发货详情</button>
+		<button class="admin-button-com big">打印单据</button>
+		<button class="admin-button-com big">继续开单</button>
+		<button class="admin-button-com big">订单列表</button>
+	</appResult>
 </template>
 </template>
 
 
 <script>
 <script>
+import appResult from '@/components/app-result'
 export default {
 export default {
-	name: "BillingResult" // 开单结果
+	name: "BillingResult", // 开单结果
+	components:{
+		appResult
+	}
 };
 };
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>
-.billing_box_bg {
-	position: relative;
-	padding: 60px 30px;
-	height: 100%;
-	display: flex;
-	flex-direction: column;
-
-	.top-view {
-		position: absolute;
-		top: 0;
-		left: 0;
-		width: 100%;
-
-		height: 299px;
-		background: #3385ff;
-		border-radius: 0px 0px 83px 83px;
-	}
-	.result-view {
-		position: relative;
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-		padding: 70px;
-		width: 100%;
-		background: #ffffff;
-		border-radius: 20px;
-		z-index: 1;
-		.iconchenggong {
-			font-size: 170px;
-			color: $mainColor1;
-		}
-		.result-title {
-			margin: 50px 0 70px;
-			font-size: 32px;
-		}
-	}
 	.admin-button-com {
 	.admin-button-com {
 		margin-bottom: 20px;
 		margin-bottom: 20px;
 		width: 100%;
 		width: 100%;
 	}
 	}
-}
+// .billing_box_bg {
+// 	position: relative;
+// 	padding: 60px 30px;
+// 	height: 100%;
+// 	display: flex;
+// 	flex-direction: column;
+
+// 	.top-view {
+// 		position: absolute;
+// 		top: 0;
+// 		left: 0;
+// 		width: 100%;
+
+// 		height: 299px;
+// 		background: #3385ff;
+// 		border-radius: 0px 0px 83px 83px;
+// 	}
+// 	.result-view {
+// 		position: relative;
+// 		display: flex;
+// 		flex-direction: column;
+// 		align-items: center;
+// 		padding: 70px;
+// 		width: 100%;
+// 		background: #ffffff;
+// 		border-radius: 20px;
+// 		z-index: 1;
+// 		.iconchenggong {
+// 			font-size: 170px;
+// 			color: $mainColor1;
+// 		}
+// 		.result-title {
+// 			margin: 50px 0 70px;
+// 			font-size: 32px;
+// 		}
+// 	}
+// 	.admin-button-com {
+// 		margin-bottom: 20px;
+// 		width: 100%;
+// 	}
+// }
 </style>
 </style>

+ 2 - 2
ghs/src/admin/home/workbench.vue

@@ -247,12 +247,12 @@ export default {
           url: "/admin/interest/my-invite"
           url: "/admin/interest/my-invite"
         },
         },
         {
         {
-          name: "邀请开店",
+          name: "客户列表",
           img: `${this.$constant.imgUrl}/ghs/home/khlb.png`,
           img: `${this.$constant.imgUrl}/ghs/home/khlb.png`,
           url: "/admin/interest/my-invite"
           url: "/admin/interest/my-invite"
         },
         },
         {
         {
-          name: "邀请开店",
+          name: "经营概况",
           img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,
           img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,
           url: "/admin/interest/my-invite"
           url: "/admin/interest/my-invite"
         },
         },

+ 0 - 1
ghs/src/admin/interest/my-invite.vue

@@ -133,7 +133,6 @@ export default {
     init() {
     init() {
       this._assetDet();
       this._assetDet();
       this._applyList();
       this._applyList();
-
       getUser().then(res => {
       getUser().then(res => {
         let params = {
         let params = {
           title: "更懂您的花卉宝",
           title: "更懂您的花卉宝",

+ 145 - 71
ghs/src/admin/member/detail.vue

@@ -1,68 +1,88 @@
 <template>
 <template>
   <view class="app-content">
   <view class="app-content">
-    <view class="app-round_bg"></view>
-    <!-- 客户信息 -->
-    <view class="module-com user-info">
-      <view class="user-info_top">
-          <view class="user-info_lf">
-              <AppAvatarModule class="avatar" :src="userInfo.avatar" :width="100"></AppAvatarModule>
-              <view class="dec-bx">
-                <view>
-                    {{userInfo.shopName}}
-                </view>
-                <view>
-                    No.{{userInfo.retailShopId}}
+    <templete v-if="!$util.isEmpty(userInfo)">
+      <view class="app-round_bg"></view>
+      <view class="module-com user-info">
+        <view class="user-info_top">
+            <view class="user-info_lf">
+                <AppAvatarModule class="avatar" :src="userInfo.avatar" :width="100"></AppAvatarModule>
+                <view class="dec-bx">
+                  <view>
+                      {{userInfo.shopName}}
+                  </view>
+                  <view>
+                      No.{{userInfo.retailShopId}}
+                  </view>
                 </view>
                 </view>
+            </view>
+            <button 
+              v-if="userInfo.isOpen === 0"
+              class="invite-bt" open-type="share">
+              邀请开店
+            </button>
+            <view 
+              v-else
+              class="already-shop">
+              <i class="iconfont iconweixinlaiyuan"></i>
+              已开店
+            </view>
+        </view>
+        <view class="user-info_data order-wrap">
+            <view class="total-blo">
+              <view
+                class="total-list"
+                v-for="(item, index) in orderData"
+                :key="index"
+                @click="pageTo(item)"
+              >
+                <view class="app-color-3">{{ item.name }}</view>
+                <view :class="['list-num',index===0?'color-blue':'']">{{ item.value }}</view>
               </view>
               </view>
           </view>
           </view>
-          <view 
-            v-if="userInfo.isOpen === 0"
-            class="invite-bt">
-            邀请开店
+        </view>
+            <!-- iconfont iconweixinlaiyuan _i  -->
+      </view>
+      <view class="module-com user-address_bx">
+          <view class="address-tit">
+            门店地址
           </view>
           </view>
-          <view 
-            v-else
-            class="already-shop">
-            <i class="iconfont iconweixinlaiyuan"></i>
-            已开店
+          <view class="address-des_bx">
+            <view>
+                <view>
+                  {{userInfo.userName}} {{userInfo.mobile}}
+                </view>
+                <view class="">
+                  {{userInfo.address}}
+                </view>
+            </view>
+            <view>
+              <view
+                @click="pageTo({
+                  url:'/admin/shopAdmin/bind'
+                })" 
+                class="invite-bt white">
+                关联微信
+              </view>
+              <i @click="callUp" class="iconfont icondianhua1"></i>
+            </view>
           </view>
           </view>
       </view>
       </view>
-      <view class="user-info_data order-wrap">
-          <view class="total-blo">
-            <view
-              class="total-list"
-              v-for="(item, index) in orderData"
-              :key="index"
-              @click="pageTo(item)"
-            >
-              <view class="app-color-3">{{ item.name }}</view>
-              <view :class="['list-num',index===0?'color-blue':'']">{{ item.value }}</view>
-            </view>
+      <view class="module-com user-open_bx">
+        <view class="input-line-wrap">
+            <tui-list-cell class="line-cell" :hover="false">
+              <div class="tui-title">延期付款</div>
+              <div class="switch_bx">
+                <text>已关闭</text>
+                <switch :checked="form.debt == 0 ? false : true" @change="remindChangeFn" />
+              </div>
+            </tui-list-cell>
+            <tui-list-cell class="line-cell" :hover="false" :arrow="true">
+              <div class="tui-title">消费记录</div>
+              <!-- <input v-model="form.name" placeholder-class="phcolor" class="tui-input" name="name" placeholder="请输入" maxlength="50" type="text" /> -->
+            </tui-list-cell>
         </view>
         </view>
       </view>
       </view>
-          <!-- iconfont iconweixinlaiyuan _i  -->
-    </view>
-    <view class="module-com user-address_bx">
-        <view class="address-tit">
-          门店地址
-        </view>
-        <view class="address-des_bx">
-           <view>
-              <view>
-                冯宝宝 15280215347
-              </view>
-              <view class="">
-                中国北京北京市朝阳区还好软件园
-              </view>
-           </view>
-           <view>
-             <view class="invite-bt white">
-               关联微信
-             </view>
-             <i class="iconfont icondianhua1"></i>
-           </view>
-        </view>
-    </view>
+    </templete>
   </view>
   </view>
 </template>
 </template>
 
 
@@ -70,34 +90,41 @@
 import { mapGetters } from "vuex";
 import { mapGetters } from "vuex";
 // import AppVipModule from "@/components/module/app-vip";
 // import AppVipModule from "@/components/module/app-vip";
 import AppAvatarModule from "@/components/module/app-avatar";
 import AppAvatarModule from "@/components/module/app-avatar";
-import ModalModule from "@/components/plugin/modal";
+// import ModalModule from "@/components/plugin/modal";
+import TuiListCell from '@/components/plugin/list-cell'
+import { share } from "@/mixins";
 import {
 import {
   getUserDet,
   getUserDet,
-  remarkAdd,
-  remarkDel,
-  upgrade,
-  rechargeB,
-  resetPassword
+  debt
+  // remarkAdd,
+  // remarkDel,
+  // upgrade,
+  // rechargeB,
+  // resetPassword
 } from "@/api/member";
 } from "@/api/member";
 export default {
 export default {
   name: "member-detail",
   name: "member-detail",
   components: {
   components: {
     // AppVipModule,
     // AppVipModule,
     AppAvatarModule,
     AppAvatarModule,
-    ModalModule
+    // ModalModule,
+    TuiListCell
   },
   },
+  mixins: [share],
   props: {},
   props: {},
   data() {
   data() {
     return {
     return {
-      userInfo: {
-        avatar:''
+      userInfo: {},
+      form:{
+        name:'',
+        debt: 0
       },
       },
       // 订单总览
       // 订单总览
       orderData: [
       orderData: [
         {
         {
           name: "欠款",
           name: "欠款",
           value: 0,
           value: 0,
-          url: "/admin/home/order",
+          url: "",
           type: 4,
           type: 4,
           query: {
           query: {
      
      
@@ -106,7 +133,7 @@ export default {
         {
         {
           name: "消费次数",
           name: "消费次数",
           value: 0,
           value: 0,
-          url: "/admin/home/order",
+          url: "",
           type: 4,
           type: 4,
           query: {
           query: {
            
            
@@ -129,18 +156,43 @@ export default {
   },
   },
   onLoad() {},
   onLoad() {},
   methods: {
   methods: {
-    callUp(phone) {
+    async remindChangeFn(e){
+      this.form.debt = e.detail.value ? 1 : 0;
+      try {
+          let res = await  debt({
+            debt: this.form.debt,
+            customId: this.userInfo.id
+          })
+          let msg = e.detail.value?'开启延期付款':'关闭延期付款'
+          this.$msg(msg);
+        } catch (err) {
+          console.log(err)
+          // 错误捕获
+        }
+   
+    },
+    callUp() {
       uni.makePhoneCall({
       uni.makePhoneCall({
-        phoneNumber: phone //仅为示例
+        phoneNumber: this.userInfo.mobile //仅为示例
       });
       });
     },
     },
     init() {
     init() {
       this._getUserDet();
       this._getUserDet();
-      // getLevel();
     },
     },
     _getUserDet() {
     _getUserDet() {
       getUserDet({ id: this.option.id }).then(res => {
       getUserDet({ id: this.option.id }).then(res => {
         this.userInfo = res.data;
         this.userInfo = res.data;
+        this.form.debt = this.userInfo.debt
+        this.orderData[0].value = this.userInfo.debtAmount
+        this.orderData[1].value = this.userInfo.buyNum
+        this.orderData[2].value = this.userInfo.buyAmount
+        let params = {
+          title: "更懂您的花卉宝",
+          desc: "",
+          imgUrl: this.constant.imgUrl + "/retail/official/banner-1.png",
+          pagePath: "admin/official/index?introMerchantId=" + res.data.id
+        };
+        this.jweixinFn(params);
       });
       });
     },
     },
     // operate ===========================
     // operate ===========================
@@ -221,6 +273,9 @@ export default {
     text-align: center;
     text-align: center;
     border-radius: 25px;
     border-radius: 25px;
     border: 1px solid #DDDDDD;
     border: 1px solid #DDDDDD;
+    padding: 0;
+    user-select: none;
+    outline: none;
     &.white{
     &.white{
      background-color: #FFFFFF;
      background-color: #FFFFFF;
      color: #666666;
      color: #666666;
@@ -289,13 +344,32 @@ export default {
         font-size: 28px;
         font-size: 28px;
         font-weight: 400;
         font-weight: 400;
         margin-top: 20px;
         margin-top: 20px;
+        
       }
       }
     }
     }
     & > view:nth-child(2) {
     & > view:nth-child(2) {
       display: flex;
       display: flex;
-      align-items: center;
-      justify-content: flex-start;
+      & .icondianhua1 {
+          font-size: 44px;
+          color: #3385FF;
+          margin-left: 10px;
+        }
     }
     }
   }
   }
 }
 }
+.user-open_bx {
+  margin-top: 20px;
+  padding: 0;
+  & .switch_bx {
+    flex: 1;
+    text-align:right;
+    & > text {
+      color: #999999;
+      font-size: 28px;
+      display: inline-block;
+      margin-right: 22px;
+    }
+  }
+
+}
 </style>
 </style>

+ 65 - 11
ghs/src/admin/official/apply.vue

@@ -37,6 +37,17 @@
       </div>
       </div>
       <!-- 店长昵称 -->
       <!-- 店长昵称 -->
       <div class="module-com">
       <div class="module-com">
+        <tui-list-cell class="line-cell" :hover="false">
+          <div class="tui-title">店长姓名</div>
+          <input
+            v-model="form.name"
+            placeholder-class="phcolor"
+            placeholder-style="color:#CCCCCC"
+            class="tui-input"
+            name="name"
+            placeholder="请输入店长姓名"
+          />
+        </tui-list-cell>
         <tui-list-cell class="line-cell code-wrap" :hover="false">
         <tui-list-cell class="line-cell code-wrap" :hover="false">
           <div class="tui-title">我的昵称</div>
           <div class="tui-title">我的昵称</div>
           <div class="tui-code" style="width:260rpx;">{{nickName}}</div>
           <div class="tui-code" style="width:260rpx;">{{nickName}}</div>
@@ -46,9 +57,6 @@
             @getuserinfo="getWxAvatar"
             @getuserinfo="getWxAvatar"
           >帮我填</button>
           >帮我填</button>
         </tui-list-cell>
         </tui-list-cell>
-      </div>
-      <!-- 手机号 -->
-      <div class="module-com">
         <tui-list-cell class="line-cell code-wrap" :hover="false">
         <tui-list-cell class="line-cell code-wrap" :hover="false">
           <div class="tui-title">我的手机号</div>
           <div class="tui-title">我的手机号</div>
           <div class="tui-code" style="width:260rpx;">{{form.mobile}}</div>
           <div class="tui-code" style="width:260rpx;">{{form.mobile}}</div>
@@ -59,6 +67,43 @@
           >帮我填</button>
           >帮我填</button>
         </tui-list-cell>
         </tui-list-cell>
       </div>
       </div>
+      <!-- 手机号 -->
+      <div class="module-com">
+          <tui-list-cell class="line-cell code-wrap" :hover="false">
+            <div class="tui-title">主营业务</div>
+            <div>
+              <button class="admin-button-com blue mini-btn">
+                零售
+              </button>
+              <button style="margin-left:10px;" class="admin-button-com default mini-btn">
+                培训
+              </button>
+            </div>
+          </tui-list-cell>
+          <tui-list-cell class="line-cell" :hover="false">
+              <div class="tui-title">营业执照编号</div>
+              <app-uploader ref="appUploader" :imgList.sync="form.shopImg" :isMain="true" :num="4" />
+              <!-- <input
+                v-model="form.name"
+                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>
+              <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 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-tag">推荐人</div>
@@ -92,6 +137,7 @@ import AppAreaSel from "@/components/app-area-sel";
 import SimpleAddress from "@/components/plugin/simple-address";
 import SimpleAddress from "@/components/plugin/simple-address";
 import AppAvatarModule from "@/components/module/app-avatar";
 import AppAvatarModule from "@/components/module/app-avatar";
 import { getWxInfo, getWxPhone } from "@/api/mini";
 import { getWxInfo, getWxPhone } from "@/api/mini";
+import AppUploader from "@/components/app-uploader";
 const form = require("@/utils/formValidation.js");
 const form = require("@/utils/formValidation.js");
 // api
 // api
 import {
 import {
@@ -107,7 +153,8 @@ export default {
     TuiListCell,
     TuiListCell,
     AppAreaSel,
     AppAreaSel,
     SimpleAddress,
     SimpleAddress,
-    AppAvatarModule
+    AppAvatarModule,
+    AppUploader
   },
   },
   data() {
   data() {
     return {
     return {
@@ -302,14 +349,21 @@ export default {
       // 进行表单检查
       // 进行表单检查
       let formData = this.form;
       let formData = this.form;
       let checkRes = form.validation(formData, rules);
       let checkRes = form.validation(formData, rules);
-      // 验证通过!
-      if (!checkRes) {
-        setTimeout(() => {
-          this.confirmFn();
+      this.$util.pageTo({
+          url: "/admin/official/callback",
+          type: 2,
+          query: {
+            pagestatus: 1
+          }
         });
         });
-      } else {
-        this.$msg(checkRes);
-      }
+      // 验证通过!
+      // if (!checkRes) {
+      //   setTimeout(() => {
+        //   this.confirmFn();
+        // });
+      // } else {
+      //   this.$msg(checkRes);
+      // }
     }
     }
   }
   }
 };
 };

+ 1 - 0
ghs/src/admin/shopAdmin/bind.vue

@@ -91,6 +91,7 @@ export default {
   },
   },
   computed: {},
   computed: {},
   onLoad(props) {
   onLoad(props) {
+    console.log(props)
     const scene = decodeURIComponent(props.scene);
     const scene = decodeURIComponent(props.scene);
     var sceneItem = scene.split("&");
     var sceneItem = scene.split("&");
     var arr, name, value;
     var arr, name, value;

+ 4 - 1
ghs/src/api/member/index.js

@@ -27,7 +27,10 @@ export const getDet = data => {
 export const add = data => {
 export const add = data => {
 	return https.post('/custom/add', data)
 	return https.post('/custom/add', data)
 }
 }
-
+// 延期付
+export const debt = data => {
+	return https.get('/custom/debt', data)
+}
 /** *
 /** *
  * 给客户充值 b
  * 给客户充值 b
  */
  */

+ 67 - 0
ghs/src/components/app-result.vue

@@ -0,0 +1,67 @@
+<template>
+	<view class="billing_box_bg">
+		<view class="top-view"> </view>
+		<view class="result-view">
+			<view :class="['iconfont', icon]"></view>
+			<view class="result-title">{{ title }}</view>
+            <slot></slot>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+    name: "AppResult", // 开单结果
+    props:{
+        title:{
+            type:String,
+            default: '开单成功'
+        },
+        icon:{
+           type:String,
+            default: 'iconchenggong' 
+        }
+    }
+};
+</script>
+
+<style lang="scss" scoped>
+.billing_box_bg {
+	position: relative;
+	padding: 60px 30px;
+	height: 100vh;
+	display: flex;
+	flex-direction: column;
+    background-color: #f5f5f5;
+	.top-view {
+		position: absolute;
+		top: 0;
+		left: 0;
+		width: 100%;
+
+		height: 299px;
+		background: #3385ff;
+		border-radius: 0px 0px 83px 83px;
+	}
+	.result-view {
+		position: relative;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		padding: 70px;
+		width: 100%;
+		background: #ffffff;
+		border-radius: 20px;
+		z-index: 1;
+		.iconchenggong {
+			font-size: 170px;
+			color: $mainColor1;
+		}
+		.result-title {
+			margin: 50px 0 70px;
+			font-size: 32px;
+		}
+	}
+	
+}
+</style>