fuwei 4 лет назад
Родитель
Сommit
d93fc63b88

+ 27 - 9
ghsPad/src/admin/home/components/select-user.vue

@@ -2,21 +2,23 @@
   <view class="app-select_user">
     <view class="title">客户列表</view>
     <view class="app-userList_box">
-      <view class="userList-item_box" v-for="item in 5">
+      <view 
+	  	:key="item.id"
+	  	class="userList-item_box" v-for="item in list">
         <view class="head-box">
           <image
             class="img"
-            src="../../../static/images/member/bg.png"
+            :src="item.avatar"
             mode=""
           ></image>
-          <view class="name">花落谁家</view>
+          <view class="name">{{item.name}}</view>
         </view>
         <view class="footer-box">
-          <view> 03-07 12:00 </view>
-          <view>欠28755</view>
+          <view> {{item.updateTime}} </view>
+          <view>欠{{item.debtAmount}}</view>
         </view>
       </view>
-      <view class="userList-item_box">
+      <!-- <view class="userList-item_box">
         <view class="head-box">
           <image
             class="img"
@@ -29,13 +31,14 @@
           <view> 03-07 12:00 </view>
           <view>欠28755</view>
         </view>
-      </view>
+      </view> -->
     </view>
 	<input 
 		disabled 
 		class="input-serach_box" 
 		v-model="searchUser" 
 		type="text"
+		@change="changSearch"
 		placeholder-class="input-placeholder"
 		placeholder="搜索客户"/>
 	 <view class="keyboard-body_box">
@@ -55,6 +58,7 @@
 
 <script>
 import VKeyboard from "@/components/plugin/vKeyboard/VKeyboard.vue";
+import { customList } from '@/api/home/index'
 export default {
   name: "selectUser",
   components: {
@@ -62,19 +66,32 @@ export default {
   },
   data() {
     return {
-		searchUser: ''
+		searchUser: '',
+		list:[]
 	};
   },
   mounted() {
+	this.init()
     this.activeKeyboard();
   },
   methods: {
+	  changSearch(val){
+		  this.init()
+	  },
+	 async init() {
+		 try {
+		let { data } = await customList({
+				name: this.searchUser
+			}) 
+		 }catch(err) {
+
+		 }
+	 },
     //键盘方法
     activeKeyboard() {
       this.$refs.keyboard.activate();
     },
     typing(e) {
-	  console.log(888556633,e)
 	  if(e.char === '确定') {
 		  return false
 	  }
@@ -83,6 +100,7 @@ export default {
       } else {
         this.searchUser += e.char;
       }
+	  
     },
     enter() {
       //this.$refs.keyboard.deactivate();

+ 210 - 0
ghsPad/src/admin/home/components/shopTypeSelect.vue

@@ -0,0 +1,210 @@
+<template>
+    <view class="shop-listType_box">
+        <view class="shop-type_box">
+            <view
+                v-for="item in shopListType"
+                :key="item.id"
+                :class="[selectTypeId===item.id?'active':'']"
+                @click="changeType(item)"
+            >
+                {{item.name}}
+            </view>
+        </view>
+        <view class="shop-show_box">
+            <view
+                @click="selectItemChange(item)"
+                v-for="item in currenTypeShopList"
+                :key="item.id"
+                class="show-shop_box">
+                <image
+                    class="img"
+                    src="https://file02.16sucai.com/d/file/2014/0829/372edfeb74c3119b666237bd4af92be5.jpg"
+                    mode="scaleToFill"
+                />
+                <view class="shop-info_price">
+                    <view>
+                        <view>{{item.name}}</view>
+                        <view>¥{{item.price}}</view>
+                    </view>
+                </view>
+            </view>
+        </view>
+        <view class="shop-footer_box">
+            <view class="btn-breakage">
+                报损
+            </view>
+            <view
+                @click="settle"
+                class="btn-account">
+                结算
+            </view>
+        </view>
+        <uniPopup
+            :show.sync="isShowFllowNum"
+            type="top"
+            maxHeight="90vh"
+		>
+			<keyboardSetFlower :selectItem="selectItem"></keyboardSetFlower>
+		</uniPopup>
+		<uniPopup
+            :show.sync="isShowSettle"
+            type="top"
+            maxHeight="90vh"
+            >
+			<selectSettle></selectSettle>
+		</uniPopup>
+    </view>
+</template>
+
+<script>
+    import uniPopup from '@/components/uni-popup'
+    import selectSettle from './select-settle.vue'
+    import keyboardSetFlower from '@/components/app-boardSet-flower.vue'
+    import { showClass,showList } from '@/api/home/index'
+    export default {
+        name:'shopTypeSelect',
+        components:{
+            uniPopup,
+            selectSettle,
+            keyboardSetFlower
+        },
+        data(){
+            return {
+                shopListType:[],
+                selectTypeId: '',
+                arrShop:[],
+                currenTypeShopList:[],
+                isShowFllowNum: false,
+                isShowSettle: false,
+                selectItem:{}
+            }
+        },
+        created(){
+            this.init()
+        },
+        methods:{
+           async init(){
+               try {
+                let { data } =  await showClass()
+                this.shopListType = data
+                this.selectTypeId = this.shopListType[0].id
+                this.getShowList()
+               }catch(err){
+               }
+            },
+           async getShowList(){
+               try {
+                let { data:{list} } =  await showList({})
+                this.arrShop = list
+                this.updateCurrentShop()
+               }catch(err){
+               }
+            },
+            updateCurrentShop(){
+              this.currenTypeShopList = this.arrShop[this.selectTypeId]
+            },
+            changeType(item){
+                if(item.id === this.selectTypeId) return false
+                this.selectTypeId = item.id
+                this.updateCurrentShop()
+            },
+            selectItemChange(item){
+                this.selectItem = {
+                    ...item,
+                    currentUnit:item.bigUnit,
+                    currentUnitPrice: item.bigPrice,
+                    currentNum: 0
+                }
+                this.isShowFllowNum = true
+            },
+            settle(){
+                this.isShowSettle = true
+            }
+        }
+    }
+</script>
+
+<style lang="scss" scoped>
+    .shop-listType_box {
+			height: 100%;
+			border: 1px solid #eee;
+			display: flex;
+			flex-direction: column;
+            box-sizing: border-box;
+			& .shop-type_box {
+				max-height: 300rpx;
+				display: flex;
+				align-items: center;
+                flex-wrap: wrap;
+                overflow-y: scroll;
+				& > view {
+					border:1px solid #e4e4e4;
+					padding: 8rpx 5rpx;
+					font-size: 14px;
+                    min-width: 80rpx;
+                    text-align: center;
+					&.active {
+						background-color: #428369;
+						color: #ffffff;
+					}
+				}
+			}
+			& .shop-show_box {
+				flex: 1;
+				padding: 5rpx;
+				display: flex;
+				flex-wrap: wrap;
+                overflow-y: scroll;
+                overflow-x: hidden;
+				& .show-shop_box {
+					position: relative;
+					width: 18%;
+                    margin-right: 1%;
+                    margin-bottom: 1%;
+					height: 70rpx;
+					& .img {
+						height: 100%;
+					}
+					.shop-info_price {
+						position: absolute;
+						// height: 25rpx;
+						background-color: rgba(0, 0, 0, 0.2);
+						bottom: 0;
+						width: 100%;
+						font-size: 12rpx;
+						color: #ffffff;
+						& > view {
+                            font-size: 12rpx;
+							& > view:nth-child(1) {
+								// margin-bottom: 2rpx;
+							}
+						}
+					}
+				}
+			}
+			& .shop-footer_box {
+				height: 40rpx;
+				display: flex;
+				align-items: center;
+				justify-content: flex-end;
+				& > view {
+					height: 40rpx;
+					padding: 5rpx 25rpx;
+					border-radius: 5rpx;
+					font-size: 14rpx;
+					margin: 0 10rpx;
+					vertical-align: middle;
+					display: flex;
+					align-items: center;
+					&.btn-breakage {
+						background-color: #da9f5a;
+						color: #ffffff;
+					}
+					&.btn-account {
+						background-color: #009966;
+						color: #ffffff;
+					}
+				}
+			}
+		}
+</style>

+ 28 - 28
ghsPad/src/admin/home/login.vue

@@ -3,17 +3,17 @@
 		<view class="login-model">
 			<view class="experFrame">
 				<view>
-					<view style="text-align:center;margin-bottom:20upx;">
+					<view style="text-align:center;margin-bottom:20rpx;">
 						<image :src="`${constant.imgUrl}/logo3.png`" class="logo" mode="widthFix"></image> 
 					</view>
-					<view style="color:#666666;text-align:center;margin-bottom:50upx;font-size:50upx;">销花宝</view>
+					<view style="color:#666666;text-align:center;margin-bottom:10rpx;font-size:20rpx;">销花宝</view>
 					<view>
 						<input @focus="mobile=''" v-model="mobile" class="experInput" placeholder="手机号" type="number" />
 					</view>
 					<view>
 						<input @focus="password=''" v-model="password" class="experInput" placeholder="密码" type="password" />
 					</view>
-					<view style="margin-top:40upx;">
+					<view style="margin-top:10rpx;">
 						<button class="admin-button-com small blue buttonText" @click="loginFun">登陆</button>
 					</view>
 				</view>
@@ -101,62 +101,62 @@ export default {
   overflow: hidden;
   text-align: center;
   & > .noData_img {
-    width: 318upx;
-    height: 318upx;
-    margin: 332upx auto 0;
+    width: 100rpx;
+    height: 100rpx;
+    margin: 100rpx auto 0;
   }
   & > .no_data_text {
-    font-size: 32upx;
+    font-size: 32rpx;
     color: #ffffff;
     text-align: center;
-    margin: 50upx 0;
+    margin: 30rpx 0;
   }
   & > .freeApply {
-    width: 376upx;
-    height: 88upx;
-    line-height: 88upx;
+    width: 376rpx;
+    height: 88rpx;
+    line-height: 88rpx;
     background: linear-gradient(90deg, #3385ff, #33b0ff);
-    border-radius: 44upx;
+    border-radius: 44rpx;
     margin: 0 auto;
-    font-size: 32upx;
+    font-size: 32rpx;
     color: #ffffff;
     text-align: center;
   }
   &>.experience{
-    margin-top: 40upx;
+    margin-top: 20rpx;
     color: #fff;
-    font-size: 30upx;
+    font-size: 20rpx;
   }
   &>.experFrame{
-      margin-top: 130upx;
-      height: 50upx;
+      margin-top: 25rpx;
+      height: 0rpx;
       .experInput{
-        height: 120upx;
-        width: 600upx;
-        margin-bottom:38upx;
+        height: 60rpx;
+        width: 600rpx;
+        margin-bottom:14rpx;
         display: inline-block;
         vertical-align: middle;
         background-color: #f5f5f5;
         border:none;
         border-bottom: 1px solid #CCCCCC;
         color: #666;
-        padding-left: 20upx;
+        padding-left: 20rpx;
         box-sizing: border-box;
         text-align: left;
       }
       .buttonText{
         display: inline-block;
-        line-height:120upx;
-        padding: 0 20upx;
+        line-height:60rpx;
+        padding: 0 20rpx;
         vertical-align: middle;
-        font-size: 45upx;
-        width: 600upx;
-        height:120upx;
+        font-size: 25rpx;
+        width: 600rpx;
+        height:60rpx;
       }
       .logo{
-        width:200upx;
+        width:100rpx;
         margin:0 auto;
-		border-radius:20upx;
+		border-radius:5rpx;
       }
   }
 }

+ 7 - 145
ghsPad/src/admin/home/workbench.vue

@@ -65,64 +65,16 @@
 			</view>
 		</view>
 		<view class="shop-list">
-			<view class="shop-type_box">
-				<view
-					v-for="item in shopListType"
-					:key="item.id"
-					class="active"
-				>
-					{{item.name}}
-				</view>
-			</view>
-			<view class="shop-show_box">
-				<view
-				@click="selectItem"
-				class="show-shop_box">
-					<image
-						class="img"
-						src="https://file02.16sucai.com/d/file/2014/0829/372edfeb74c3119b666237bd4af92be5.jpg"
-						mode="scaleToFill"
-					/>
-					<view class="shop-info_price">
-						<view>
-							<view>粉佳人</view>
-							<view>¥89</view>
-						</view>
-					</view>
-				</view>
-			</view>
-			<view class="shop-footer_box">
-				<view class="btn-breakage">
-					报损
-				</view>
-				<view
-					@click="settle"
-				class="btn-account">
-					结算
-				</view>
-			</view>
+			<shopTypeSelect></shopTypeSelect>
 		</view>
 		<uniPopup
-		:show.sync="isShowFllowNum"
-		type="top"
-		maxHeight="90vh"
-		>
-			<keyboardSetFlower></keyboardSetFlower>
-		</uniPopup>
-		<uniPopup
-		:show.sync="isShowSettle"
-		type="top"
-		maxHeight="90vh"
-		>
-			<selectSettle></selectSettle>
-		</uniPopup>
-		<uniPopup
 		:show.sync="isShowUser"
 		type="top"
 		maxHeight="90vh"
 		>
 			<selectUser></selectUser>
 		</uniPopup>
+		<NotLogin></NotLogin>
 	</view>
 </template>
 <script>
@@ -131,32 +83,19 @@ import NotLogin from "@/components/not-login";
 import productMins from "@/mixins/product";
 import autoUpdateMixins from "@/mixins/autoUpdate";
 import uniPopup from '@/components/uni-popup'
-import keyboardSetFlower from '@/components/app-boardSet-flower.vue'
-import selectSettle from './components/select-settle.vue'
+// import keyboardSetFlower from '@/components/app-boardSet-flower.vue'
+// import selectSettle from './components/select-settle.vue'
 import selectUser from './components/select-user.vue'
+import shopTypeSelect from './components/shopTypeSelect.vue'
 export default {
 	name: "workbench",
-	components: { NotLogin,uniPopup,keyboardSetFlower,selectSettle,selectUser },
+	components: { NotLogin,uniPopup,selectUser,shopTypeSelect },
 	mixins: [productMins,autoUpdateMixins],
 	data() {
 		return {
 			isShowFllowNum: false,
 			isShowUser: false,
 			isShowSettle: false,
-			shopListType:[
-				{
-					name:'今日特价',
-					id:1
-				},
-				{
-					name:'常用玫瑰',
-					id:2
-				},
-				{
-					name:'拍市玫瑰',
-					id:3
-				}
-			]
 		};
 	},
 	computed: {
@@ -192,6 +131,7 @@ export default {
 		height: 100vh;
 		& .shop-list {
 			flex: 63;
+			height: 100%;
 		}
 		& .nav-left {
 			height: 100%;
@@ -275,83 +215,5 @@ export default {
 				}
 			}
 		}
-		& .shop-list {
-			height: 100%;
-			border: 1px solid #eee;
-			display: flex;
-			flex-direction: column;
-			& .shop-type_box {
-				max-height: 300rpx;
-				display: flex;
-				align-items: center;
-				& > view {
-					border:1px solid #e4e4e4;
-					padding: 8rpx 5rpx;
-					font-size: 14px;
-					&.active {
-						background-color: #428369;
-						color: #ffffff;
-					}
-				}
-			}
-			& .shop-show_box {
-				flex: 1;
-				padding: 5rpx;
-				display: flex;
-				flex-wrap: wrap;
-				& .show-shop_box {
-					position: relative;
-					width: 120rpx;
-					height: 100rpx;
-
-					& .img {
-						height: 100%;
-					}
-					.shop-info_price {
-						position: absolute;
-						height: 42rpx;
-						background-color: rgba(0, 0, 0, 0.2);
-						bottom: 0;
-						width: 100%;
-						font-size: 14rpx;
-						color: #ffffff;
-						& > view {
-							display: flex;
-							flex-direction: column;
-							padding: 3rpx;
-
-							justify-content: center;
-							& > view:nth-child(1) {
-								margin-bottom: 2rpx;
-							}
-						}
-					}
-				}
-			}
-			& .shop-footer_box {
-				height: 40rpx;
-				display: flex;
-				align-items: center;
-				justify-content: flex-end;
-				& > view {
-					height: 40rpx;
-					padding: 5rpx 25rpx;
-					border-radius: 5rpx;
-					font-size: 14rpx;
-					margin: 0 10rpx;
-					vertical-align: middle;
-					display: flex;
-					align-items: center;
-					&.btn-breakage {
-						background-color: #da9f5a;
-						color: #ffffff;
-					}
-					&.btn-account {
-						background-color: #009966;
-						color: #ffffff;
-					}
-				}
-			}
-		}
 	}
 </style>

+ 14 - 1
ghsPad/src/api/home/index.js

@@ -12,4 +12,17 @@ export const mainMy = async (data) => {
 //提现申请
 export const applyCash = async (data) => {
 	return https.get("/cash/apply", data);
-};
+};
+// 花材分类
+export const showClass = async (data) => {
+	return https.get("/item-class/show-class", data);
+};
+// 花材列表
+export const showList = async (data) => {
+	return https.get("/item/show-list", data);
+};
+// 选客户
+export const customList = async (data) => {
+	return https.get("/custom/list", data);
+};
+

+ 25 - 8
ghsPad/src/components/app-boardSet-flower.vue

@@ -7,11 +7,19 @@
                 <view>
                     <view class="desc">数量</view>
                     <div class="flower-unit_box">
-                        <input @tap="activeKeyboard" disabled type="number" v-model="currentNum">
-                        <span>扎</span>
+                        <input 
+                            @tap="activeKeyboard" 
+                            disabled 
+                            type="number" 
+                            v-model="selectItem.currentNum">
+                        <span>{{selectItem.currentUnit}}</span>
                     </div>
                 </view>
-                <i class="icon-qiehuan">换</i>
+                <image
+                    class="change-unit"
+                    src="https://bpic.51yuansu.com/pic3/cover/03/80/68/5c0607c96e49d_610.jpg"
+                    mode="scaleToFill"
+                />
                 <view>
                     <view class="desc">单价</view>
                     <div class="flower-unit_box">
@@ -45,6 +53,12 @@
             VKeyboard,
             keyboardModule
         },
+        props:{
+            selectItem:{
+                type:Object,
+                default:()=>{}
+            }
+        },
         data() {
 			return {
 				input: '',//键盘输入
@@ -64,11 +78,14 @@
 			typing(e) {
 				if (e.backspace) {
 					if (this.currentNum.length > 0) {
-						this.currentNum = this.input.substring(0, this.input.length - 1);
+						this.currentNum = this.currentNum.substring(0, this.currentNum.length - 1);
 					}
-				}
-				else {
-					this.currentNum += e.char;
+				}else {
+                    if(this.currentNum == 0) {
+                        this.currentNum = e.char
+                    }else {
+                        this.currentNum += e.char;
+                    }
 				}
 			},
 			enter() {
@@ -123,7 +140,7 @@
                     }
                 }
             }
-            & .icon-qiehuan {
+            & .change-unit {
                 width: 35rpx;
                 height: 35rpx;
                 padding: 0 7rpx;

+ 1 - 1
ghsPad/src/components/not-login.vue

@@ -36,7 +36,7 @@ export default {
 <style lang="scss" scoped>
 .model {
   position: fixed;
-  z-index: 9999;
+  z-index: 9999999;
   top: 0;
   left: 0;
   width: 100vw;

+ 3 - 3
ghsPad/src/components/plugin/vKeyboard/VKeyboard.vue

@@ -24,12 +24,12 @@
 		</view>
 		<view class="full-keyboard" v-else>
 			<view class="line" v-for="(letters, index) in lines" :key="index">
-				<view class="enl-letter enl-key-button special-key enl-gray" v-if="index === 3 && mode === 'letter'" @tap="toggleCase"><i
+				<view class="enl-letter enl-key-button special-key enl-gray" v-if="index === 2 && mode === 'letter'" @tap="toggleCase"><i
 					 :class="'iconfont ' + (lowercase ? 'icon-xiaoxie' : 'icon-daxie')"></i></view>
 				<view class="enl-letter enl-key-button normal" v-for="letter in letters" @tap="typing(letter)" :key="letter">
 					<text>{{letter}}</text>
 				</view>
-				<view class="enl-letter enl-key-button special-key enl-gray" v-if="index === 3" @tap="backspace"><i class="iconfont icon-backspace"></i></view>
+				<view class="enl-letter enl-key-button special-key enl-gray" v-if="index === 2" @tap="backspace"><i class="iconfont icon-backspace"></i></view>
 			</view>
 			<view class="line special-line">
 				<view class="enl-letter enl-key-button swith-key enl-gray">
@@ -38,7 +38,7 @@
 				</view>
 				<view class="enl-letter enl-key-button space" @tap="typing(' ')"><text class="enl-logo">spacebar</text></view>
 				<view class="enl-letter enl-key-button swith-key enl-gray" @tap="typingDigit"><i class="iconfont icon-shuzi"></i></view>
-			<!-- 	<view class="enl-letter enl-key-button swith-key enl-gray" @tap="enter">
+				<!-- <view class="enl-letter enl-key-button swith-key enl-gray" @tap="enter">
 					<i class="iconfont icon-huiche"></i>
 				</view> -->
 			</view>

+ 1 - 1
ghsPad/src/components/plugin/vKeyboard/utils.js

@@ -10,7 +10,7 @@ export const order = [
 	// ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0'],
 	['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p'],
 	['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l'],
-	['z', 'x', 'c', 'v', 'b', 'n', 'm','确定']
+	['z', 'x', 'c', 'v', 'b', 'n', 'm']
 ];
 
 //随机排序全键盘