shish пре 6 година
родитељ
комит
c813fd99cd

+ 3 - 2
store/src/admin/home/member.vue

@@ -307,11 +307,12 @@ export default {
 }
 .user_tag{
   border:1px solid #CCCCCC;
-  padding:2px 10px 2px 10px;
-  border-radius:22px;
+  padding:5px 12px 5px 12px;
+  border-radius:25px;
   color:#BBBBBB;
   margin-right:10px;
   margin-bottom:12px;
   display:inline-block;
+  font-size:30rpx;
 }
 </style>

+ 108 - 5
store/src/admin/home/order.vue

@@ -79,7 +79,7 @@
                 </template>
               </template>
               <template v-if="item.payStatus == 1 && item.classify == 0">
-                <div class="admin-button-com mini" @click.stop="classifyOrder()" >分类</div>
+                <div class="admin-button-com mini" @click.stop="classifyOrder(item.id)" >分类</div>
               </template>
             </div>
           </div>
@@ -99,6 +99,33 @@
       :size="32"
       padding="30rpx 30rpx"
     ></modal-module>
+
+		<!-- 选取分类 -->
+		<modal-module :show="classifyModal" :maskClosable="false" @cancel="modalCancel" @click="confirmClassify" title="订单分类" padding="30rpx 30rpx">
+			<template v-slot:content>
+				<div class="upload-confirm-wrap">
+					<!-- 选择分类 -->
+					<div class="sel-wrap">
+						<div class="sel-tit">类型</div>
+						<div class="sel-btn">
+							<block v-for="(item, index) in categoryData" :key="index">
+								<button class="admin-button-com" :class="[classifyForm.categoryId == item.id ? '' : 'default']" @click="selCategoryFn(item)">{{ item.categoryName || '暂无' }}</button>
+							</block>
+						</div>
+					</div>
+					<!-- 选择用途 -->
+					<div class="sel-wrap">
+						<div class="sel-tit">用途</div>
+						<div class="sel-btn">
+							<block v-for="(item, index) in usageData" :key="index">
+								<button class="admin-button-com" :class="[classifyForm.usageId == item.id ? '' : 'default']" @click="selUsageFn(item)">{{ item.usageName || '暂无' }}</button>
+							</block>
+						</div>
+					</div>
+				</div>
+			</template>
+		</modal-module>
+
   </div>
 </template>
 
@@ -107,8 +134,10 @@ import AppTabs from "@/components/plugin/tabs";
 import ListModule from "@/components/module/app-order-list";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import ModalModule from "@/components/plugin/modal";
+import { getCategory, getUsage } from '@/utils/config'
 import { list } from "@/mixins";
-// api
+import { mapGetters } from 'vuex';
+import { orderClass } from '@/api/order'
 import { getListB, freeShipping } from "@/api/order";
 export default {
   name: "order-list",
@@ -122,6 +151,7 @@ export default {
   data() {
     return {
       tabIndex: 0,
+      classifyModal:false,
       tabs: [
         {
           name: "全部",
@@ -147,7 +177,11 @@ export default {
       operateIndex: null,
       operateData: {},
       // 免发货
-      freeShipModal: false
+      freeShipModal: false,
+      classifyForm: {
+				categoryId: '',
+				usageId: ''
+      }
     };
   },
   onPullDownRefresh() {
@@ -165,6 +199,14 @@ export default {
       uni.stopPullDownRefresh();
     }
   },
+	computed: {
+		...mapGetters({ categoryData: 'getCategory' }),
+		...mapGetters({ usageData: 'getUsage' })
+  },
+	mounted() {
+		getCategory()
+		getUsage()
+	},
   onLoad: function() {},
   onShow() {
     let tabIndex = uni.getStorageSync("switchTabQuery") || null;
@@ -235,9 +277,30 @@ export default {
     // 关闭弹窗
     modalCancel() {
       this.freeShipModal = false;
+      this.classifyModal = false;
+    },
+    classifyOrder(id){
+      this.classifyModal = true
+      this.currentOrderId = id;
+    },
+		confirmClassify(e) {
+			if (e.index === 0) {
+				this.modalCancel()
+			} else {
+				orderClass({
+					id: this.currentOrderId,
+					...this.classifyForm
+				}).then(res => {
+          this.classifyModal = false;
+					this.$msg('分类成功!')
+				})
+			}
+    },
+    selCategoryFn(item) {
+      this.classifyForm.categoryId = item.id
     },
-    classifyOrder(){
-      
+    selUsageFn(item) {
+      this.classifyForm.usageId = item.id
     }
   }
 };
@@ -284,4 +347,44 @@ export default {
     }
   }
 }
+	// 弹窗
+	.upload-confirm-wrap {
+		max-height: 600px;
+		overflow-y: auto;
+		.modal-tit {
+			@include disFlex(center, center);
+			font-size: 40px;
+			margin-top: 30px;
+			margin-bottom: 50px;
+			.iconfont {
+				color: #09bb07;
+				margin-right: 20px;
+				font-size: 50px;
+			}
+		}
+		//  分类
+		.sel-wrap {
+			color: $fontColor2;
+			font-size: 32px;
+			.sel-tit {
+				text-align: left;
+			}
+			.sel-btn {
+				@include disFlex(center, flex-start);
+				flex-wrap: wrap;
+				padding: 10px 0 40px;
+				.admin-button-com {
+					// width: 170px;
+					margin-right: 20px;
+					margin-top: 20px;
+					padding-top: 16px;
+					padding-bottom: 16px;
+					border-radius: 4px;
+					// &:nth-child(3n + 1) {
+					// 	margin-left: 0;
+					// }
+				}
+			}
+		}
+	}
 </style>

+ 4 - 4
store/src/admin/member/detail.vue

@@ -722,12 +722,12 @@ export default {
 }
 .user_tag{
   border:1px solid #CCCCCC;
-  font-size:28rpx;
-  padding:4px 10px 4px 10px;
-  border-radius:30px;
+  padding:5px 12px 5px 12px;
+  border-radius:25px;
   color:#BBBBBB;
   margin-right:10px;
-  margin-bottom:15px;
+  margin-bottom:12px;
   display:inline-block;
+  font-size:30rpx;
 }
 </style>

+ 3 - 3
store/src/admin/order/components/sel-ship-confirm.vue

@@ -15,7 +15,7 @@
             <div class="axis-det">
               <div class="app-color-0 app-bold">{{ orderComData[0].finishTime | formatTime }}</div>
               <template v-if="$util.isEmpty(orderComData[0].classify)">
-              <button class="admin-button-com small blue confirm-btn" @click="confirmFn">类</button>
+              <button class="admin-button-com small blue confirm-btn" @click="confirmFn">类</button>
               </template>
               <template v-else>
               <div>{{ orderComData[0].classify.usage }}  {{ orderComData[0].classify.category }}</div>
@@ -86,7 +86,7 @@
 				<div class="upload-confirm-wrap">
 					<!-- 选择分类 -->
 					<div class="sel-wrap">
-						<div class="sel-tit">选择分类1</div>
+						<div class="sel-tit">类型</div>
 						<div class="sel-btn">
 							<block v-for="(item, index) in categoryData" :key="index">
 								<button class="admin-button-com" :class="[form.categoryId == item.id ? '' : 'default']" @click="selCategoryFn(item)">{{ item.categoryName || '暂无' }}</button>
@@ -95,7 +95,7 @@
 					</div>
 					<!-- 选择用途 -->
 					<div class="sel-wrap">
-						<div class="sel-tit">选择用途2</div>
+						<div class="sel-tit">用途</div>
 						<div class="sel-btn">
 							<block v-for="(item, index) in usageData" :key="index">
 								<button class="admin-button-com" :class="[form.usageId == item.id ? '' : 'default']" @click="selUsageFn(item)">{{ item.usageName || '暂无' }}</button>