Ver código fonte

fix:商品模块部分接口对接

storeBelieveInLight 1 ano atrás
pai
commit
cfb97b4bdb

+ 1 - 0
commit/order.js

@@ -205,6 +205,7 @@ export function confirmReceiptApi(id, data) {
205 205
  * @returns 
206 206
  */
207 207
 export function getPhpGlobalToken(data, merId) {
208
+    return ;
208 209
     return myRequestPhp({
209 210
         url: `${pre}mer/getPhpToken?${merId}`,
210 211
         method: 'POST',

+ 79 - 3
commit/product.js

@@ -21,12 +21,88 @@ export function getSupplyChainTab(data) {
21 21
 /**
22 22
  * 获取供应链tab
23 23
  */
24
-export function getSupplyChainTab(data) {
24
+// export function getSupplyChainTab(data) {
25
+//     return myRequestPhp({
26
+//         url: `${pre}mer/store/product/gong_lst_filter`,
27
+//         method: 'GET',
28
+//         data,
29
+//         apiType
30
+//     })
31
+// }
32
+
33
+/**
34
+ * 供应链列表
35
+ * page: 1
36
+ limit: 20
37
+ keyword:
38
+     type: 1   2
39
+ spec_type: 商品规格 null 0 1
40
+ * @param {*} data 
41
+ * @returns 
42
+ */
43
+export function getSupplyChainList(data) {
25 44
     return myRequestPhp({
26
-        url: `${pre}mer/store/product/gong_lst_filter`,
45
+        url: `${pre}mer/store/product/gong_lst`,
46
+        method: 'GET',
47
+        data,
48
+        apiType
49
+    })
50
+}
51
+// 供应链修改价格
52
+/**
53
+ *{
54
+     "skuArr": [{
55
+         "sku_id": "Se88f891b5d",
56
+         "edit_price": "10.5"
57
+     }],
58
+     "type": 1
59
+ }
60
+ * @param {*} id 
61
+ * @param {*} data 
62
+ * @returns 
63
+ */
64
+export function editSupplyChainPrice(id,data) {
65
+     return myRequestPhp({
66
+         url: `${pre}mer/store/product/edit_price/${id}`,
67
+         method: 'POST',
68
+         data,
69
+         apiType
70
+     })
71
+}
72
+/**
73
+ * @description 供应链商品 -- 上下架
74
+ */
75
+export function postchangeshow(data) {
76
+     return myRequestPhp({
77
+         url: `${pre}mer/store/product/change_show`,
78
+         method: 'POST',
79
+         data,
80
+         apiType
81
+     })
82
+}
83
+
84
+
85
+
86
+/**商品列表    */
87
+
88
+// 商品列表tab
89
+
90
+export function getGoodsTab(data) {
91
+    return myRequestPhp({
92
+        url: `${pre}mer/store/product/lst_filter`,
27 93
         method: 'GET',
28 94
         data,
29 95
         apiType
30 96
     })
97
+}
98
+
99
+// 平台商品分类
100
+export function getGoodsClassCategory(data) {
101
+    return myRequestPhp({
102
+        url: `${pre}mer/store/category/list`,
103
+        method: 'GET',
104
+        data,
105
+        apiType
106
+    })
107
+}
31 108
 
32
-}

+ 1 - 1
commit/request.js

@@ -7,7 +7,7 @@ var baseURL = 'https://api.hxxfb.com/gateway/' // API访问的地址
7 7
 	 // baseURL = 'https://api.hebeiyhc.com/gateway/'; //生产环境
8 8
 	 // baseURL = 'https://api.hebeiyhc.com/gateway/'; //生产环境
9 9
 	   baseURL = 'https://testapi.hxxfb.com/gateway/'; //预生产环境
10
-	//    baseURL = '/gateway/'; //预生产环境
10
+	   // baseURL = '/gateway/'; //预生产环境
11 11
 	
12 12
  }else{
13 13
 	  baseURL = 'https://api.hxxfb.com/gateway/'; //预生产环境

+ 3 - 1
commit/requestPhp.js

@@ -70,5 +70,7 @@ export function myRequestPhp(options) {
70 70
 				uni.hideToast();
71 71
 			}
72 72
 		});
73
-	}).catch(() => {});
73
+	}).catch(() => {
74
+		uni.hideToast();
75
+	});
74 76
 };

+ 1 - 0
pages/ordermanagement/index.vue

@@ -513,6 +513,7 @@ page {
513 513
       width: 30rpx;
514 514
       height: 30rpx;
515 515
       border-radius: 50%;
516
+      padding: 6rpx;
516 517
       background: #fe0032;
517 518
       font-size: 20rpx;
518 519
       font-weight: 400;

+ 48 - 18
pages/supplychainon/ProductCard.vue

@@ -2,26 +2,35 @@
2 2
 <template>
3 3
   <view class="product-card">
4 4
     <!-- 图片容器增加背景和阴影 -->
5
-    <!-- <view class="image-container">
5
+    <view class="image-container">
6 6
       <image
7 7
         class="product-image"
8 8
         :src="data.image"
9
-        mode="aspectFill"
9
+        :webp="true"
10
+        v-if="data.image && !isError"
10 11
         :style="{ background: '#f5f5f5' }"
12
+        @error="handleError"
13
+      />
14
+      <image
15
+      v-else
16
+        class="product-image"
17
+        src="/static/images/new_ui/kongtu.png"
18
+        :webp="true"
19
+     
11 20
       />
12 21
       <view v-if="data.activity" class="activity-badge">
13 22
         {{ data.activity }}
14 23
       </view>
15
-    </view> -->
24
+    </view>
16 25
 
17 26
     <!-- 信息内容区域 -->
18 27
     <view class="content">
19 28
       <!-- 标题与状态开关 -->
20 29
       <view class="header">
21
-        <text class="title">{{ data.name }}</text>
30
+        <text class="title">{{ data.store_name }}</text>
22 31
         <switch
23
-          :checked="data.status"
24
-          @change="$emit('status-change', $event.detail.value)"
32
+          :checked="data.is_show==1?true:false"
33
+          @change="$emit('status-change', data)"
25 34
           class="status-switch"
26 35
         />
27 36
       </view>
@@ -30,11 +39,11 @@
30 39
       <view class="data-grid">
31 40
         <view class="data-item">
32 41
           <text class="label">售价</text>
33
-          <text class="value highlight">¥1000</text>
42
+          <text class="value highlight">¥{{data.price ||"0.00"}}</text>
34 43
         </view>
35 44
         <view class="data-item">
36 45
           <text class="label">利润</text>
37
-          <text class="value profit">¥33333</text>
46
+          <text class="value profit">¥{{data.plate_mer_profit  ||"0.00"}}</text>
38 47
         </view>
39 48
       </view>
40 49
 
@@ -43,12 +52,12 @@
43 52
         <view class="meta-item">
44 53
           <uni-icons type="shop-filled" size="30" color="#666" />
45 54
 
46
-          <text class="kucun">销量 555453</text>
55
+          <text class="kucun">销量 {{data.sales}}</text>
47 56
         </view>
48 57
         <view class="meta-item">
49 58
           <uni-icons type="shop" size="30" color="#666" />
50 59
           <text :class="{ warn: data.stock < 100 }" class="kucun"
51
-            >库存 45345454</text
60
+            >库存 {{data.stock}}</text
52 61
           >
53 62
         </view>
54 63
       </view>
@@ -73,17 +82,37 @@ export default {
73 82
       default: () => {
74 83
         return {
75 84
           image: "",
76
-          name: "zfgsdg",
77
-          price: 1110,
78
-          sales: 11110,
79
-          stock: 1110,
80
-          status: true,
81
-          profit: 0,
82
-          activity: "",
85
+          store_name: "",
86
+          price: 0,//商品售价
87
+          sales: 0,//销量
88
+          stock: 0,//库存
89
+          status: "",//商品状态
90
+          is_show: true,//商品状态
91
+          plate_mer_profit: 0,//利润
92
+          activity: "",//活动
83 93
         };
84 94
       },
85 95
     },
86 96
   },
97
+  data(){
98
+    return {
99
+      isError:false
100
+    }
101
+  },
102
+  methods:{
103
+    getFormData(image){
104
+      // console.log(image,"imageimage")
105
+      if(image){
106
+        return this.data.image
107
+      }else{
108
+        return "/static/images/new_ui/kongtu.png"
109
+      }
110
+    },
111
+    handleError(e){
112
+      this.isError = e.type=="error"?true:false
113
+      // console.log(e,"e")
114
+    }
115
+  }
87 116
 };
88 117
 </script>
89 118
 
@@ -91,7 +120,8 @@ export default {
91 120
 .product-card {
92 121
   background: #fff;
93 122
   border-radius: 24rpx;
94
-  margin: 24rpx 32rpx;
123
+  // margin: 24rpx 32rpx;
124
+  width: 100%;
95 125
   box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.06);
96 126
   overflow: hidden;
97 127
   display: flex;

+ 7 - 7
pages/supplychainon/price-edit-modal.vue

@@ -51,7 +51,7 @@ export default {
51 51
   props: {
52 52
     minPrice: { type: Number, default: 8.75 },
53 53
     originalPrice: { type: Number, required: true },
54
-    goodsType: { type: String, default: 'normal' }
54
+    goodsType: { type: String, default: 1 }
55 55
   },
56 56
   data() {
57 57
     return {
@@ -60,12 +60,12 @@ export default {
60 60
       pensionFund: 0,
61 61
       makerProfit: 1.75,
62 62
       goodsTypes: [
63
-        { label: '普通商品', value: 'normal' },
64
-        { label: '会员商品', value: 'member' },
65
-        { label: '高级会员商品', value: 'vip' },
66
-        { label: '合伙人商品', value: 'partner' },
67
-        { label: '股权商品', value: 'stock' },
68
-        { label: '合伙人+股权商品', value: 'partner_stock' }
63
+        { label: '普通商品', value: 1 },
64
+        { label: '会员商品', value: 8 },
65
+        { label: '高级会员商品', value: 10 },
66
+        { label: '合伙人商品', value: 14 },
67
+        { label: '股权商品', value: 15 },
68
+        { label: '合伙人+股权商品', value: 16 }
69 69
       ]
70 70
     }
71 71
   },

+ 90 - 86
pages/supplychainon/search/search.vue

@@ -1,96 +1,100 @@
1 1
 <template>
2
-	<view class="search-wrapper">
3
-		      <view class=" flex-row justify-end">
4
-		        <image
5
-		          class="search__image"
6
-		          referrerpolicy="no-referrer"
7
-		          src="/static/images/new_ui/search_icon_blod.png"
8
-		        />
9
-				<input class="search__input" v-model="searchValue" type="text" :placeholder="placeholder" />
10
-		        <button class="search__btn" @click="haandleSearch">
11
-		          搜索
12
-		        </button>
13
-		      </view>
14
-	</view>
2
+  <view class="search-wrapper">
3
+    <view class="flex-row justify-end">
4
+      <image
5
+        class="search__image"
6
+        referrerpolicy="no-referrer"
7
+        src="/static/images/new_ui/search_icon_blod.png"
8
+      />
9
+      <input
10
+        class="search__input"
11
+        v-model="searchValue"
12
+        type="text"
13
+        @input="handleInput"
14
+        :placeholder="placeholder"
15
+      />
16
+      <button class="search__btn" @click="haandleSearch">搜索</button>
17
+    </view>
18
+  </view>
15 19
 </template>
16 20
 
17 21
 <script>
18
-	export default {
19
-		props:{
20
-			placeholder:{
21
-				type:String,
22
-				default:"请输入搜索内容"
23
-			}
24
-		},
22
+export default {
23
+  props: {
24
+    placeholder: {
25
+      type: String,
26
+      default: "请输入搜索内容",
27
+    },
28
+  },
25 29
 
26
-		data() {
27
-			return {
28
-				searchValue:""
29
-			};
30
-		},
31
-		methods:{
32
-			haandleSearch(){
33
-				this.$emit("search",this.searchValue)
34
-			}
35
-		}
36
-	}
30
+  data() {
31
+    return {
32
+      searchValue: "",
33
+    };
34
+  },
35
+  methods: {
36
+    haandleSearch() {
37
+      this.$emit("search", this.searchValue);
38
+    },
39
+    handleInput() {
40
+      if (!this.searchValue) {
41
+        this.$emit("search", this.searchValue);
42
+      }
43
+    },
44
+  },
45
+};
37 46
 </script>
38 47
 
39 48
 <style lang="scss">
40
-.search-wrapper{
41
-	background: #FFFFFF;
42
-	height: 110rpx;
43
-	display: flex;
44
-	align-items: center;
45
-	width: 100%;
46
-	
47
-	.search__image{
48
-		position: absolute;
49
-		  width: 32rpx;
50
-		  height: 32rpx;
51
-		  left:40rpx;
52
-		  top:18rpx;
53
-	}
54
-	.search__input{
55
-		border:2rpx solid #000;
56
-		flex:1;
57
-		height: 60rpx;
58
-		margin-left:26rpx;
59
-		padding: 0 120rpx 0 55rpx;
60
-		border-radius: 30rpx;
61
-		margin-right: 20rpx;
62
-		border: none;
63
-			background: #F8F8F8;
64
-			font-size: 26rpx;
65
-			color: #333333;
66
-	}
67
-	.flex-row{
68
-		display: flex;
69
-		flex-direction: row;
70
-		align-items: center;
71
-		
72
-	}
73
-	.justify-end{
74
-		position: relative;
75
-		border-radius: 30rpx;
76
-		    flex: 1;
77
-		
78
-		
79
-	}
80
-	.search__btn{
81
-		position: absolute;
82
-		right:20rpx;
83
-		width: 108rpx;
84
-		height: 60rpx;
85
-		white-space: nowrap;
86
-		 background-color: rgba(31, 124, 255, 1);
87
-		border-radius: 30rpx;
88
-		   text-align: center;
89
-		    font-size: 28rpx;
90
-			 line-height:60rpx;
91
-			 color: rgba(255, 255, 255, 1);
92
-			 
93
-	}
94
-	     
49
+.search-wrapper {
50
+  background: #ffffff;
51
+  height: 110rpx;
52
+  display: flex;
53
+  align-items: center;
54
+  width: 100%;
55
+
56
+  .search__image {
57
+    position: absolute;
58
+    width: 32rpx;
59
+    height: 32rpx;
60
+    left: 40rpx;
61
+    top: 18rpx;
62
+  }
63
+  .search__input {
64
+    border: 2rpx solid #000;
65
+    flex: 1;
66
+    height: 60rpx;
67
+    margin-left: 26rpx;
68
+    padding: 0 120rpx 0 55rpx;
69
+    border-radius: 30rpx;
70
+    margin-right: 20rpx;
71
+    border: none;
72
+    background: #f8f8f8;
73
+    font-size: 26rpx;
74
+    color: #333333;
75
+  }
76
+  .flex-row {
77
+    display: flex;
78
+    flex-direction: row;
79
+    align-items: center;
80
+  }
81
+  .justify-end {
82
+    position: relative;
83
+    border-radius: 30rpx;
84
+    flex: 1;
85
+  }
86
+  .search__btn {
87
+    position: absolute;
88
+    right: 20rpx;
89
+    width: 108rpx;
90
+    height: 60rpx;
91
+    white-space: nowrap;
92
+    background-color: rgba(31, 124, 255, 1);
93
+    border-radius: 30rpx;
94
+    text-align: center;
95
+    font-size: 28rpx;
96
+    line-height: 60rpx;
97
+    color: rgba(255, 255, 255, 1);
98
+  }
95 99
 }
96 100
 </style>

+ 143 - 32
pages/supplychainon/supplychainon.vue

@@ -10,23 +10,32 @@
10 10
         class="mt"
11 11
         :category="category"
12 12
         :curruntActive="curruntActive"
13
+        @tabs="tabsHandleClick"
13 14
       ></tablist>
14 15
     </view>
15 16
     <view class="content-wrapper">
16
-      <ProductCard class="mrb" />
17
-      <ProductCard class="mrb" />
18
-      <ProductCard class="mrb" />
19
-      <ProductCard class="mrb" />
20
-      <ProductCard class="mrb" />
21
-      <ProductCard class="mrb" />
22
-        <view
23
-      class=""
24
-      style="margin: 60rpx 0 30rpx 0; color: #999999; font-size: 26rpx"
25
-    >
26
-      —— 已经到最底部了哦 ——
17
+      <template v-if="list.length > 0">
18
+        <ProductCard
19
+          class="mrb"
20
+          v-for="(item, index) in list"
21
+          :key="index"
22
+          :data="item"
23
+          @status-change="handleStatusChange"
24
+          @edit-price="handleEditPrice"
25
+        />
26
+      </template>
27
+      <template v-else>
28
+        <emptyDataVue style="top: initial" />
29
+      </template>
30
+      <view
31
+        v-if="tihsi == 0 && list.length > 0"
32
+        class=""
33
+        style="margin: 0rpx 0 30rpx 0; color: #999999; font-size: 26rpx"
34
+      >
35
+        —— 已经到最底部了哦 ——
36
+      </view>
27 37
     </view>
28
-    </view>
29
-  
38
+    <priceEditModal v-if="isshow" @close="isshow=false"/>
30 39
   </view>
31 40
 </template>
32 41
 
@@ -35,48 +44,150 @@ import headerCom from "../../shop/components/headers/headers.vue";
35 44
 import searchVue from "./search/search.vue";
36 45
 import tablist from "./tablist.vue";
37 46
 import ProductCard from "./ProductCard.vue";
47
+import emptyDataVue from "../../shop/components/emptyData/emptyData.vue";
48
+import priceEditModal from './price-edit-modal.vue'
49
+import {
50
+  getSupplyChainList,
51
+  getSupplyChainTab,
52
+  postchangeshow,
53
+} from "@/commit/product.js";
38 54
 export default {
39 55
   components: {
40 56
     headerCom,
41 57
     searchVue,
42 58
     tablist,
43 59
     ProductCard,
60
+    emptyDataVue,
61
+    priceEditModal
44 62
   },
45 63
   data() {
46 64
     return {
65
+      page: 1,
66
+      limit: 10,
67
+      tihsi: "",
68
+      list: [],
69
+      keywords: "",
70
+      is_panudn: true,
47 71
       productData: {},
48 72
       curruntActive: 0,
49
-      category: [
50
-        {
51
-          type: 1,
52
-          name: "出售中商品",
53
-          count: 0,
54
-        },
55
-        {
56
-          type: 2,
57
-          name: "仓库中商品",
58
-          count: 0,
59
-        },
60
-      ],
73
+      category: [],
74
+      type: 1,
75
+      isshow:false
61 76
     };
62 77
   },
63
-  onLoad(options) {
64
-    this.curruntActive = options.indexs || "0";
78
+  async onLoad(options) {
79
+    this.curruntActive = options.indexs || options.tabIndex || "0";
80
+    this.type = options.type || 1;
81
+    await this.getSupplyChainTabData();
82
+    await this.getSupplyChainListData();
83
+  },
84
+  onPullDownRefresh() {
85
+    uni.showLoading({
86
+      title: "加载中",
87
+    });
88
+    this.page = 1;
89
+    this.is_panudn = true;
90
+    this.list = [];
91
+    this.getSupplyChainListData();
92
+  },
93
+  onReachBottom() {
94
+    if (this.is_panudn == true) {
95
+      this.page++;
96
+      this.getSupplyChainListData();
97
+    } else {
98
+      return;
99
+    }
65 100
   },
66 101
   methods: {
102
+    async tabsHandleClick({ index, item }) {
103
+      this.indexs = index;
104
+      this.curruntActive = index;
105
+      this.list = [];
106
+      this.type = item.type || 1;
107
+      this.page = 1;
108
+      this.is_panudn = true;
109
+      await this.getSupplyChainListData();
110
+    },
111
+    async getSupplyChainTabData() {
112
+      try {
113
+        const res = await getSupplyChainTab();
114
+        if (res.data.status === 200) {
115
+          this.category = res.data.data || [];
116
+        }
117
+      } catch (error) {}
118
+    },
119
+    async getSupplyChainListData() {
120
+      uni.showLoading({
121
+        title: "加载中",
122
+      });
123
+      try {
124
+        const res = await getSupplyChainList({
125
+          page: this.page,
126
+          limit: this.limit,
127
+          keyword: this.keywords,
128
+          type: this.type,
129
+          spec_type: null, //商品规格 null 0 1
130
+        });
131
+        uni.stopPullDownRefresh();
132
+        if (res.data.status === 200) {
133
+          this.tihsi = res.data.data.list.length || 0;
134
+          console.log(this.tihsi, "this.tihsi");
135
+          if (res.data.data.count > 0) {
136
+            if (this.page == 1) {
137
+              this.list = res.data.data.list;
138
+            } else {
139
+              this.list = this.list.concat(res.data.data.list);
140
+            }
141
+          } else {
142
+            if (this.page == 1) {
143
+              this.list = [];
144
+            }
145
+            this.is_panudn = false;
146
+          }
147
+          uni.hideLoading();
148
+        }
149
+      } catch (error) {}
150
+    },
67 151
     headerJump() {
68 152
       uni.switchTab({ url: "/shop/productManagementModule/index" });
69 153
     },
70
-    onHandleSearch(val) {
71
-      console.log(val);
154
+    async onHandleSearch(val) {
155
+      this.keywords = val;
156
+      await this.getSupplyChainListData();
157
+    },
158
+    handleStatusChange(row) {
159
+      let ids = [];
160
+      ids.push(row.product_id);
161
+      uni.showLoading({
162
+        title: "状态更改中",
163
+      });
164
+      postchangeshow({ ids: ids, is_show: row.is_show })
165
+        .then((res) => {
166
+          if (res.data.status === 200) {
167
+            uni.showToast({
168
+              title: res.data.message,
169
+              icon: "none",
170
+            });
171
+            this.getSupplyChainTabData();
172
+            this.getSupplyChainListData();
173
+          }
174
+        })
175
+        .catch((err) => {
176
+          uni.hideLoading();
177
+          uni.hideToast();
178
+        });
72 179
     },
180
+   handleEditPrice(data){
181
+    //  this.productData = data;
182
+     this.isshow = true;
183
+   }
73 184
   },
74 185
 };
75 186
 </script>
76 187
 <style>
77 188
 page {
78 189
   background-color: #f7f8fc;
79
-  height: 100%;
190
+  /* height: 100%; */
80 191
 }
81 192
 </style>
82 193
 <style lang="scss" scoped>
@@ -89,12 +200,12 @@ page {
89 200
     z-index: 33;
90 201
   }
91 202
   .content-wrapper {
92
-     width: 100%;
203
+    width: calc(100% - 52rpx);
93 204
     height: 100%;
94 205
     display: flex;
95 206
     flex-direction: column;
96 207
     align-items: center;
97
-    margin: 340rpx 0rpx 0rpx;
208
+    margin: 340rpx 26rpx 0rpx;
98 209
     padding-bottom: 60rpx;
99 210
   }
100 211
 }

+ 12 - 1
shop/afterSalesManagement/afterCardListInfo.vue

@@ -26,7 +26,12 @@
26 26
       <!-- item.product.cart_info.product -->
27 27
         <view class="order-list-yi-in-neibu-left">
28 28
           <view class="order-list-yi-in-neibu-left-img" v-if="item.product">
29
-            <image :src="item.product.cart_info.product.image" mode="widthFix" v-if="item.product.cart_info"></image>
29
+            <image :src="item.product.cart_info.product.image" @error="handleError"  mode="widthFix" v-if="item.product.cart_info && !isError"></image>
30
+            <image
31
+            v-else
32
+              src="/static/images/new_ui/wutu.png"
33
+             mode="widthFix"
34
+            />
30 35
           </view>
31 36
           <view class="order-list-yi-in-neibu-left-url">
32 37
             <view class="order-list-yi-in-neibu-left-url-top" v-if="item.product">
@@ -74,10 +79,15 @@ export default {
74 79
   },
75 80
   data() {
76 81
     return {
82
+      isError:false
77 83
     };
78 84
   },
79 85
 
80 86
   methods: {
87
+        handleError(e){
88
+      this.isError = e.type=="error"?true:false
89
+      console.log(e,"e",this.isError)
90
+    },
81 91
     formatDataValue(data,type){
82 92
       if(type === 'status'){
83 93
         return orderRefundFilter(data[type]) || ''
@@ -213,6 +223,7 @@ export default {
213 223
         .order-list-yi-in-neibu-left-url {
214 224
           // width: 290rpx;
215 225
           display: flex;
226
+          flex-direction: column;
216 227
           padding: 0 20rpx;
217 228
 
218 229
           .order-list-yi-in-neibu-left-url-top {

+ 3 - 0
shop/afterSalesManagement/afterSalesDetail.vue

@@ -397,6 +397,7 @@ export default {
397 397
         });
398 398
       } finally {
399 399
         uni.hideLoading();
400
+        uni.hideToast();
400 401
       }
401 402
     },
402 403
     handleconfirmReceipt(refund_order_id) {
@@ -499,6 +500,7 @@ export default {
499 500
         }
500 501
       } finally {
501 502
         uni.hideLoading();
503
+        uni.hideToast();
502 504
       }
503 505
     },
504 506
 
@@ -521,6 +523,7 @@ export default {
521 523
       } catch (error) {
522 524
       } finally {
523 525
         uni.hideLoading();
526
+        uni.hideToast();
524 527
       }
525 528
     },
526 529
     handleDetailInfo() {

+ 2 - 1
shop/afterSalesManagement/index.vue

@@ -162,7 +162,8 @@ export default {
162 162
         const res = await getAfterSaleList(params);
163 163
         uni.stopPullDownRefresh();
164 164
         if (res.data.status == 200) {
165
-          this.tihsi = res.data.data.count || 0;
165
+          this.tihsi = res.data.data.list.length || 0;
166
+          // this.tihsi = res.data.data.count || 0;
166 167
           if (res.data.data.count > 0) {
167 168
             if (this.page == 1) {
168 169
               this.list = res.data.data.list;

+ 1 - 0
shop/commodity/components/orderDetail/orderCardDetailInfo.vue

@@ -194,6 +194,7 @@ export default {
194 194
       } catch (error) {
195 195
       } finally {
196 196
         uni.hideLoading();
197
+        uni.hideToast();
197 198
       }
198 199
     },
199 200
     sendGoods() {

+ 2 - 0
shop/commodity/logisticsInformationDetail.vue

@@ -177,6 +177,7 @@ export default {
177 177
         uni.makePhoneCall({
178 178
           phoneNumber: value,
179 179
         });
180
+        uni.hideToast();
180 181
       }
181 182
     },
182 183
     formatData(data, type) {
@@ -265,6 +266,7 @@ export default {
265 266
       } catch (error) {
266 267
       } finally {
267 268
         uni.hideLoading();
269
+        uni.hideToast();
268 270
       }
269 271
     },
270 272
     async getLogisticData(id) {

+ 4 - 2
shop/commodity/order.vue

@@ -256,7 +256,7 @@ export default {
256 256
       });
257 257
 
258 258
       getOrderList({
259
-        mer_id: this.mer_id,
259
+        // mer_id: this.mer_id,
260 260
         status: this.status,
261 261
         order_sn: "",
262 262
         order_type: -1,
@@ -275,7 +275,8 @@ export default {
275 275
         (res) => {
276 276
           uni.stopPullDownRefresh();
277 277
           if (res.data.status == 200) {
278
-            this.tihsi = res.data.data.count || 0;
278
+            // this.tihsi = res.data.data.count || 0;
279
+            this.tihsi = res.data.data.list.lenght || 0;
279 280
             if (res.data.data.count > 0) {
280 281
               if (this.page == 1) {
281 282
                 this.list = res.data.data.list;
@@ -317,6 +318,7 @@ export default {
317 318
       this.status = index == 0 ? null : status;
318 319
       this.indexs = index;
319 320
       this.page = 1;
321
+       this.list = [];
320 322
       this.is_panudn = true;
321 323
       this.orderList();
322 324
     },

+ 1 - 0
shop/commodity/sendoutgoods.vue

@@ -263,6 +263,7 @@ export default {
263 263
         
264 264
       }finally{
265 265
         uni.hideLoading();
266
+        uni.hideToast();
266 267
       }
267 268
     },
268 269
     copyHandle(val) {

+ 1 - 1
shop/department/managementadd.vue

@@ -259,4 +259,4 @@
259 259
 			line-height: 98rpx;
260 260
 		}
261 261
 	}
262
-</style>
262
+</style>

+ 1 - 1
shop/productManagementModule/components/listCardInfo.vue

@@ -134,7 +134,7 @@ page {
134 134
             width: 30rpx;
135 135
             height: 30rpx;
136 136
             border-radius: 50%;
137
-            // padding: 5rpx 8rpx;
137
+            padding: 5rpx;
138 138
             background: #fe0032;
139 139
             // word-break: break-all;
140 140
             font-size: 20rpx;

+ 109 - 89
shop/productManagementModule/index.vue

@@ -8,22 +8,24 @@
8 8
         headerTitle="商品列表"
9 9
         class="mb-t1"
10 10
         :cardData="dataBuss"
11
-		   @custom-handle-click="businessHandleClick"
11
+        @custom-handle-click="businessHandleClick"
12 12
       ></listCardInfo>
13 13
       <listCardInfo
14 14
         headerTitle="供应链"
15 15
         class="mb-t1"
16 16
         :cardData="onlineData"
17
-         @custom-handle-click="onGongyingliang"
17
+        @custom-handle-click="onGongyingliang"
18 18
       ></listCardInfo>
19 19
       <!-- <listCardInfo headerTitle="在线选品" class="mb-t1"></listCardInfo> -->
20 20
       <!-- <listCardInfo headerTitle="商品分类" class="mb-t1" :fullSreen="true" fullSreenTitle="商品分类列表" ></listCardInfo> -->
21 21
       <!-- <listCardInfo headerTitle="商品规格" class="mb-t1" :fullSreen="true" fullSreenTitle="商品规格列表"></listCardInfo> -->
22
-      <listCardInfo headerTitle="商品评价" 
23
-      class="mb-t1" 
24
-      :fullSreen="true" 
25
-      fullSreenTitle="商品评价列表" 
26
-      @custom-handle-click="onHandlePingJia"></listCardInfo>
22
+      <listCardInfo
23
+        headerTitle="商品评价"
24
+        class="mb-t1"
25
+        :fullSreen="true"
26
+        fullSreenTitle="商品评价列表"
27
+        @custom-handle-click="onHandlePingJia"
28
+      ></listCardInfo>
27 29
       <!-- <listCardInfo headerTitle="在线选品" class="mb-t1"></listCardInfo> -->
28 30
       <!-- <listCardInfo headerTitle="在线选品" class="mb-t1"></listCardInfo> -->
29 31
       <!-- <listCardInfo headerTitle="在线选品" class="mb-t1"></listCardInfo> -->
@@ -32,9 +34,10 @@
32 34
 </template>
33 35
 
34 36
 <script>
35
-import readAppInfo,{getPhpToken} from "@/utils/readAppInfo.js";
37
+import readAppInfo, { getPhpToken } from "@/utils/readAppInfo.js";
36 38
 import listCardInfo from "./components/listCardInfo.vue";
37
-import {toQueryString} from "@/utils/index.js"
39
+import { toQueryString } from "@/utils/index.js";
40
+import { getGoodsTab, getSupplyChainTab } from "@/commit/product.js";
38 41
 export default {
39 42
   components: { listCardInfo },
40 43
   data() {
@@ -43,13 +46,13 @@ export default {
43 46
         {
44 47
           type: 1,
45 48
           name: "出售中商品",
46
-          count: 10,
49
+          count: 0,
47 50
           img: "/static/images/new_ui/yijingchushou.png",
48 51
         },
49 52
         {
50 53
           type: 2,
51 54
           name: "仓库中商品",
52
-          count: 31,
55
+          count: 0,
53 56
           img: "/static/images/new_ui/cangku.png",
54 57
         },
55 58
         {
@@ -69,13 +72,13 @@ export default {
69 72
         {
70 73
           type: 1,
71 74
           name: "出售中商品",
72
-          count: 10,
75
+          count: 0,
73 76
           img: "/static/images/new_ui/yijingchushou.png",
74 77
         },
75 78
         {
76 79
           type: 2,
77 80
           name: "仓库中商品",
78
-          count: 31,
81
+          count:0,
79 82
           img: "/static/images/new_ui/cangku.png",
80 83
         },
81 84
       ],
@@ -116,7 +119,7 @@ export default {
116 119
 
117 120
     await readAppInfo();
118 121
     await getPhpToken();
119
-return
122
+    return;
120 123
     let jurisdiction = uni.getStorageSync("jurisdiction") || [];
121 124
     console.log("jurisdiction", jurisdiction);
122 125
     let mnuList = this.mnu;
@@ -162,7 +165,7 @@ return
162 165
         selectmerchant.merId > 0 &&
163 166
         (selectmerchant.status == 1 || selectmerchant.status == 5)
164 167
       ) {
165
-        return; 
168
+        return;
166 169
       } else if (
167 170
         selectmerchant.merId >= 0 &&
168 171
         (selectmerchant.status == 3 || selectmerchant.status == 4)
@@ -184,72 +187,77 @@ return
184 187
       }
185 188
     }
186 189
   },
187
-  onShow() {
188
-    return;
189
-
190
-    // 以下逻辑在onload处理
191
-
192
-    this.authorization = uni.getStorageSync("authorization");
193
-    let userinfo = uni.getStorageSync("userinfo");
194
-    this.uid = userinfo.uid;
195
-
196
-    let authorization = uni.getStorageSync("authorization");
197
-    // let userinfo = uni.getStorageSync('userinfo')
198
-    let selectmerchant = uni.getStorageSync("selectmerchant");
199
-    let uid = userinfo.uid;
200
-    console.log(selectmerchant, authorization, userinfo);
201
-    if (authorization && uid) {
202
-      if (selectmerchant.merId >= 0 && selectmerchant.status == -1) {
203
-        uni.redirectTo({
204
-          url: "/openmerchant/guide/index", //有或者没有商户 没有金额支付and激活码支付
205
-        });
206
-        return;
207
-      } else if (
208
-        selectmerchant.merId > 0 &&
209
-        (selectmerchant.status == 1 || selectmerchant.status == 5)
210
-      ) {
211
-        return;
212
-      } else if (
213
-        selectmerchant.merId >= 0 &&
214
-        (selectmerchant.status == 3 || selectmerchant.status == 4)
215
-      ) {
216
-        uni.redirectTo({
217
-          url: "/openmerchant/shopentry/process?mer_id=" + selectmerchant.merId, //已开通商户未填写资料
218
-        });
219
-        return;
220
-      } else if (selectmerchant.merId > 0 && selectmerchant.status == 0) {
221
-        uni.redirectTo({
222
-          url: "/openmerchant/shopentry/processaudit?submitCode=" + 3, //已开通商户待审核
223
-        });
224
-        return;
225
-      } else if (selectmerchant.merId > 0 && selectmerchant.status == 2) {
226
-        uni.redirectTo({
227
-          url: "/openmerchant/shopentry/processaudit?submitCode=" + 2, //已开通商户审核拒绝
228
-        });
229
-        return;
230
-      }
190
+  async onShow() {
191
+    uni.showLoading({
192
+      title: "加载中",
193
+    });
194
+    try {
195
+      await this.getGoodsTabNum();
196
+      await this.getSupplyChainTabData();
197
+    } finally {
198
+      uni.hideLoading();
199
+      uni.hideToast();
231 200
     }
232 201
   },
233 202
   methods: {
234
-	//商品列表
235
-	businessHandleClick(item,index){
236
-		const obj = {
237
-			tabIndex: index,
238
-			type: item.type,
239
-		}
203
+    async getGoodsTabNum() {
204
+      try {
205
+        const res = await getGoodsTab();
206
+        if (res.data.status === 200) {
207
+          let data = JSON.parse(JSON.stringify(this.dataBuss));
208
+          this.dataBuss = data.map((item, index) => {
209
+            return {
210
+              ...item,
211
+              count: res.data.data[index] ? res.data.data[index].count : 0,
212
+            };
213
+          });
214
+        }
215
+      } catch (error) {}
216
+    },
217
+
218
+    async getSupplyChainTabData() {
219
+      try {
220
+        const res = await getSupplyChainTab();
221
+        if(res.data.status === 200) {
222
+          let data = JSON.parse(JSON.stringify(this.onlineData));
223
+          this.onlineData = data.map((item, index) => {
224
+            return {
225
+              ...item,
226
+              count: res.data.data[index] ? res.data.data[index].count : 0,
227
+            };
228
+          });
229
+        
230
+        }
231
+      } catch (error) {}
232
+    },
233
+
234
+    //点击事件
235
+    businessHandleClick(item, index) {
236
+      const obj = {
237
+        tabIndex: index,
238
+        type: item.type,
239
+      };
240
+      uni.redirectTo({
241
+        url: `./productManagement?${toQueryString(obj)}`,
242
+      });
243
+    },
244
+
245
+    //商品列表
246
+    businessHandleClick(item, index) {
247
+      const obj = {
248
+        tabIndex: index,
249
+        type: item.type,
250
+      };
240 251
       uni.redirectTo({
241
-        url:`./productManagement?${toQueryString(obj)}` ,
252
+        url: `./productManagement?${toQueryString(obj)}`,
242 253
       });
243
-	},
244
-    jinru(n, p) {
245
-      let name = p;
246
-      let page = n;
247
-      if (name == "分润设置") {
248
-        let authorization = uni.getStorageSync("authorization");
254
+    },
255
+    getUrlAuthorization() {
256
+       let authorization = uni.getStorageSync("authorization");
249 257
         let userinfo = uni.getStorageSync("userinfo");
250 258
         let selectmerchant = uni.getStorageSync("selectmerchant");
251 259
         let uid = userinfo.uid;
252
-        if (authorization && uid) {
260
+          if (authorization && uid) {
253 261
           if (selectmerchant.merId >= 0 && selectmerchant.status == -1) {
254 262
             uni.redirectTo({
255 263
               url: "/openmerchant/guide/index", //有或者没有商户 没有金额支付and激活码支付
@@ -290,30 +298,42 @@ return
290 298
           });
291 299
           return;
292 300
         }
293
-      } else if (name == "锁定用户") {
294
-        uni.redirectTo({
295
-          url: page,
296
-        });
297
-      } else {
298
-        uni.redirectTo({
299
-          url: page,
300
-        });
301
-      }
302 301
     },
302
+    // jinru(n, p) {
303
+    //   let name = p;
304
+    //   let page = n;
305
+    //   if (name == "分润设置") {
306
+       
307
+      
308
+    //   } else if (name == "锁定用户") {
309
+    //     uni.redirectTo({
310
+    //       url: page,
311
+    //     });
312
+    //   } else {
313
+    //     uni.redirectTo({
314
+    //       url: page,
315
+    //     });
316
+    //   }
317
+    // },
303 318
     //商品评价
304
-    onHandlePingJia(){
305
-      console.log('商品评价')
319
+    onHandlePingJia() {
320
+      console.log("商品评价");
306 321
       uni.redirectTo({
307
-        url: "./productevaluation",
322
+        url: "/shop/productManagementModule/productevaluation",
308 323
       });
309 324
     },
310 325
     //供应链
311
-    onGongyingliang(item,index){
326
+    onGongyingliang(item, index) {
312 327
       // console.log('供应链',item,index)
328
+       const obj = {
329
+        tabIndex: index,
330
+        indexs:index,
331
+        type: item.type,
332
+      };
313 333
       uni.redirectTo({
314
-        url: `/pages/supplychainon/supplychainon?indexs=${index}`
315
-      })
316
-    }
334
+        url: `/pages/supplychainon/supplychainon?${toQueryString(obj)}`,
335
+      });
336
+    },
317 337
   },
318 338
 };
319 339
 </script>

BIN
static/images/new_ui/kongtu.png


BIN
static/images/new_ui/wutu.png.crdownload