Răsfoiți Sursa

客户详情增加导航

shish 5 ani în urmă
părinte
comite
9e9a60e842

+ 25 - 57
ghsApp/src/admin/home/member.vue

@@ -11,43 +11,16 @@
     />
     <block v-if="!$util.isEmpty(list.data)">
       <block v-for="(item, index) in list.data" :key="index">
-        <tui-list-cell
-          :arrow="true"
-          @click="
-            pageTo({
-              url: '/pagesClient/member/detail',
-              query: {
-                id: item.id,
-              },
-            })
-          "
-        >
+        <tui-list-cell :arrow="true" @click=" pageTo({url: '/pagesClient/member/detail',query: {id: item.id,},})">
           <div class="tui-msg-box">
             <img :src="item.avatar" class="tui-msg-pic" mode="widthFix" />
             <div class="tui-msg-item">
               <div class="tui-msg-name">
                 <div class="tui-user-name">{{ item.name }}</div>
-                <appVipModule
-                  v-if="item.level > 0"
-                  class="level-img"
-                  :vipImg="`${constant.imgUrl}/retail/member/grade/${item.level}.png`"
-                />
-                <template v-else>
-                  <appVipModule
-                    v-if="item.mobile == ''"
-                    class="level-img"
-                    :vipImg="`${constant.imgUrl}/retail/member/grade/customer.png`"
-                  />
-
-                  <appVipModule
-                    v-else
-                    class="level-img"
-                    :vipImg="`${constant.imgUrl}/retail/member/grade/member.png`"
-                  />
-                </template>
               </div>
               <div class="tui-msg-content">
                 <span>{{ item.visitTime }}</span>
+                <span v-if="item.debtAmount > 0" class="debt-amount">欠款:<span class="amount_num">{{item.debtAmount}}</span></span>
               </div>
             </div>
           </div>
@@ -97,8 +70,8 @@ export default {
           value: 0
         },
         {
-          name: "会员",
-          value: 0
+          name: "欠款",
+          value: 1
         }
       ]
     };
@@ -130,37 +103,26 @@ export default {
     },
     // 列表
     _list() {
-      let type = JSON.parse(JSON.stringify(this.tabIndex));
-      type = type == 0 ? -1 : type;
-		return getList({
-        search: "",
-        page: this.list.page,
-        ...this.form,
-      }).then((res) => {
-        this.completes(res);
-        if (this.$util.isEmpty(res.data)){
-          return false;
-        }
-
-        this.tabs[0].value = res.data.allNum;
-        this.tabs[1].value = res.data.allNum;
-
-      });
+      return getList({
+          search: "",
+          type:this.tabIndex,
+          page: this.list.page,
+        }).then((res) => {
+          this.completes(res);
+          if (this.$util.isEmpty(res.data)){
+            return false;
+          }
+          this.tabs[0].value = res.data.totalUser;
+          this.tabs[1].value = res.data.mayGatheringNum;
+        });
     },
     change(e) {
       if (this.tabIndex == e.index) {
         return false;
-      } else {
-        if (e.index == 3) {
-          // this.showMoreUser = true;
-          this.tabIndex = e.index;
-        } else {
-          // this.showMoreUser = false;
-          this.tabIndex = e.index;
-          this.resetList();
-          this._list();
-        }
       }
+      this.tabIndex = e.index;
+      this.resetList();
+      this._list();
     },
   },
 };
@@ -268,6 +230,12 @@ export default {
     font-size: 24upx;
     line-height: 1;
     color: #9397a4;
+    .debt-amount{
+      margin-left:40rpx;
+      .amount_num{
+        color:red;
+      }
+    }
   }
 }
 

+ 5 - 5
ghsApp/src/admin/home/workbench.vue

@@ -219,11 +219,6 @@ export default {
 					img: `${this.$constant.imgUrl}/ghs/home/dbrk.png`,
 					url: "/pagesStorehouse/allot/allotPut"
 				},
-				{
-					name: "客户欠款",
-					img: `${this.$constant.imgUrl}/ghs/home/khqk.png`,
-					url: "/pagesArrears/list"
-				},
 				{
 					name: "盘点",
 					img: `${this.$constant.imgUrl}/ghs/home/pandian.png`,
@@ -239,6 +234,11 @@ export default {
 					img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`,
 					url: "/admin/item/list"
 				},
+				{
+					name: "员工",
+					img: `${this.$constant.imgUrl}/ghs/home/yggl.png`,
+					url: "/admin/staff/list"
+				},
 				{
 					name: "经营概况",
 					img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,

+ 19 - 29
ghsApp/src/mixins/productContrapose.js

@@ -7,7 +7,6 @@ export default {
 	data() {
 		return {
 			pageType: "bill", //选择商品页面类别  用于区分不同功能的数据
-
 			productInfo: [], //商品信息
 			classIndex: 0, //当前商品类别下标
 			py: "", //拼音搜索条件
@@ -25,7 +24,6 @@ export default {
 		if (pageType) {
 			this.pageType = pageType;
 		}
-
 		if (this.autoLoad) {
 			this.initDataContrapose();
 		}
@@ -49,34 +47,28 @@ export default {
 			}
 
 		},
-		// async initDataContrapose(extendInfo) {
 		async initDataContrapose(extendInfo) {
-			//extendInfo调用时的扩展参数  如  shopId
-				let params = {
-					py: this.py,
-					type: this.type,
-					// showPage: this.offShowPage?'':1,
-					showPage: 1,
-					page: this.page,
-				};
+			let params = {
+				py: this.py,
+				type: this.type,
+				showPage: 1,
+				page: this.page,
+			};
 			if (extendInfo) {
 				params = { ...params, ...extendInfo };
 			}
-				const { data } = await getAllProductDataApi(params);
+			const { data } = await getAllProductDataApi(params);
 			data.list.forEach((ele)=>{
 				this.filterProductInfoContrapose.push(ele);
 			})
 			this.allFilterProductInfoContrapose = this.filterProductInfoContrapose;
-			if(this.filterProductInfoContrapose.length==data.totalNum){this.isMore = false;}
-				this.productInfo = data.list;
-				uni.stopPullDownRefresh();
+			if(this.filterProductInfoContrapose.length==data.totalNum){
+				this.isMore = false;
+			}
+			this.productInfo = data.list;
+			uni.stopPullDownRefresh();
 			uni.hideLoading();
 		},
-
-
-
-
-
 		/**
 		 * 搜索对应花材
 		 */
@@ -86,16 +78,14 @@ export default {
 				let commonChildList = [];
 				console.log(this.py)
 				list.forEach(ele => {
-						let hasName = ele.itemName && ele.itemName.indexOf(this.py) >= 0;
-						let elePy = (ele.py && ele.py.toLocaleUpperCase()) || "";
-						let hasPy = elePy.indexOf(this.py.toLocaleUpperCase()) >= 0;
-						if (hasName || hasPy) {
-							console.log(ele)
-							commonChildList.push(ele)
-						}
-
+					let hasName = ele.itemName && ele.itemName.indexOf(this.py) >= 0;
+					let elePy = (ele.py && ele.py.toLocaleUpperCase()) || "";
+					let hasPy = elePy.indexOf(this.py.toLocaleUpperCase()) >= 0;
+					if (hasName || hasPy) {
+						console.log(ele)
+						commonChildList.push(ele)
+					}
 				});
-				// list = this.$util.unique(commonChildList)
 				this.filterProductInfoContrapose = commonChildList;
 			}else{
 				this.filterProductInfoContrapose = this.allFilterProductInfoContrapose;

+ 1 - 1
ghsApp/src/pages.json

@@ -490,7 +490,7 @@
 				{
 					"path": "customList",
 					"style": {
-						"navigationBarTitleText": "帐单"
+						"navigationBarTitleText": "历史帐单"
 					}
 				},
 				{

+ 4 - 1
ghsApp/src/pagesClient/member/detail.vue

@@ -50,8 +50,11 @@
       </view>
       <view class="module-com user-open_bx">
         <view class="input-line-wrap">
+            <tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="pageTo({ url: '/pagesArrears/details',query: {id: userInfo.id}})">
+              <div class="tui-title">欠款订单</div>
+            </tui-list-cell>
             <tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="pageTo({ url: '/admin/clear/customList',query: {customId: userInfo.id}})">
-              <div class="tui-title">帐单</div>
+              <div class="tui-title">历史帐单</div>
             </tui-list-cell>
             <tui-list-cell class="line-cell" :hover="false">
               <div class="tui-title">允许欠款</div>

+ 1 - 1
ghsApp/src/pagesStorehouse/components/CommodityStock.vue

@@ -5,7 +5,7 @@
 		</view>
 		<navigator :url="type == STOCK_TYPE.WARN?'':`/pagesStorehouse/stockWarn/detailed?id=${info.itemId}`" class="cmd-info_bx" :class="type == STOCK_TYPE.WARN?'':'active'">
 			<view class="tit">{{ info.itemName || "" }}</view>
-			<view class="kc">{{ info.rank || "" }}级1</view>
+			<view class="kc"></view>
 			<view class="num-open_bx">
 				<view class="price" v-if="isPrice">¥{{ info.price }}</view>
 				<view class="open-bx warn">

+ 7 - 29
ghsApp/src/pagesStorehouse/stockWarn/manage.vue

@@ -3,7 +3,7 @@
     <app-tabs :tabs="tabs" :currentTab="tabIndex" @change="change" itemWidth="50%"/>
     <view class="input-wrap">
 			<view class="search-bar">
-				<app-search-module v-if="tabs[tabIndex].name=='库存预警'" v-model="py" placeholder="输入拼音首字母查询" @input="searchFnContrapose"/>
+				<app-search-module v-if="tabs[tabIndex].key==STOCK_TYPE.WARN" v-model="py" placeholder="输入拼音首字母查询" @input="searchFnContrapose"/>
 				<app-search-module v-else v-model="py" placeholder="输入拼音首字母查询" @input="searchFn"/>
 			</view>
 		</view>
@@ -110,17 +110,13 @@ export default {
 	},
 	onLoad() {
 		let type = this.tabs[this.tabIndex].key == STOCK_TYPE.WARN ? "waring" : "";
-		// 当前门店
-		// this.shopId = this.userInfo.id;
 		this.shopId = this.getMyShopInfo.id;
 		if(type=="waring"){
-			this.initDataContrapose({ type, shopId: this.shopId });
+			this.initDataContrapose({ type, shopId: this.shopId,status:0});
 		}else{
 			this.initData({ type, shopId: this.shopId,status:0});
 		}
-
 	},
-
 	methods: {
 		affirm(val) {
 			if (val.index === 0) {
@@ -141,23 +137,11 @@ export default {
 				if(type=="waring"){
 					this.filterProductInfoContrapose = this.allFilterProductInfoContrapose;
 					uni.hideLoading();
-					// this.initDataContrapose({ type, shopId: this.shopId });
 				}else{
 					this.initData({ type, shopId: this.shopId,status:0});
 				}
 			}
 		},
-		// searchFn() {
-		// 	// uni.showLoading({
-		// 	// 	title: "加载中"
-		// 	// });
-		// 	// if(type=="waring"){
-		// 	// 	this.initDataContrapose({ type, shopId: this.shopId });
-		// 	// }else{
-		// 	// 	this.initData({ type, shopId: this.shopId });
-		// 	// }
-		// 	// this.initData({ shopId: this.shopId });
-		// },
 		scrollTop() {},
 		initProductInfo() {
 			this.filterProductInfoContrapose = [];
@@ -171,11 +155,10 @@ export default {
 			this.initProductInfo();
 			let type = this.tabs[this.tabIndex].key == STOCK_TYPE.WARN ? "waring" : "";
 			this.shopId = val.selectItem.id;
-			// this.initData({ type, shopId: this.shopId });
 			if(type=="waring"){
-				this.initDataContrapose({ type, shopId: this.shopId });
+				this.initDataContrapose({ type, shopId: this.shopId,status:0});
 			}else{
-				this.initData({ type, shopId: this.shopId });
+				this.initData({ type, shopId: this.shopId,status:0});
 			}
 		}
 	}
@@ -242,18 +225,16 @@ export default {
 				color: #fff;
 				font-size: 20px;
 			}
-      &:last-child{
-        margin-bottom: 110upx;
-      }
+			&:last-child{
+				margin-bottom: 110upx;
+			}
 		}
-
 		.active {
 			position: relative;
 			color: $mainColor;
 			font-size: 26px;
 			background: #fff;
 		}
-
 		.active::before {
 			content: "";
 			position: absolute;
@@ -269,9 +250,6 @@ export default {
 	}
 	.item_list_bx {
 		padding: 40px 16px;
-    //&:last-child{
-    //  margin-bottom: 70upx;
-    //}
 	}
 	.item_list_title {
 		margin-bottom: 20px;