cmy hai 2 semanas
pai
achega
31c19af7c6
Modificáronse 2 ficheiros con 133 adicións e 57 borrados
  1. 42 4
      src/pages/user/list/handle/userDetails.vue
  2. 91 53
      src/pages/user/list/index.vue

+ 42 - 4
src/pages/user/list/handle/userDetails.vue

@@ -58,6 +58,9 @@
 								<div class="title">{{ row.store_name }}</div>
 							</div>
 						</template>
+						<template slot-scope="{ row }" slot="productTotal">
+								{{row.total == 0?'无上限':row.total}}
+						</template>
 					</Table>
 					<div class="acea-row row-right page">
 						<Page :total="total" :current.sync="userFrom.page" show-elevator show-total
@@ -134,10 +137,10 @@
 						val: 'integral',
 						label: '积分明细'
 					},
-					{
-						val: 'sign',
-						label: '签到记录'
-					},
+					// {
+					// 	val: 'sign',
+					// 	label: '签到记录'
+					// },
 					{
 						val: 'coupon',
 						label: '持有优惠券'
@@ -146,6 +149,10 @@
 						val: 'first_num',
 						label: '优先单'
 					},
+					{
+						val: 'shelves',
+						label: '货架'
+					},
 					// { val: 'balance_change', label: '余额变动' },
 					{
 						val: 'spread',
@@ -575,6 +582,37 @@
 									}
 								]
 								break;
+							case 'shelves':
+								this.columns = [
+									
+									{
+										title:'ID',
+										key: 'id',
+										minWidth: 80
+									},{
+										title: '本地库存',
+										key: 'number',
+										minWidth: 120
+									},
+									{
+										title: '已售数量',
+										key: 'sold_number',
+										minWidth: 120
+									},
+									{
+										title: '货物上限',
+										slot: 'productTotal',
+										minWidth: 120
+									},
+									{
+										title: '代发库存',
+										key: 'replace_number',
+										minWidth: 120
+									},
+								]
+								break;
+
+
 							case 'spread_change':
 								this.columns = [{
 										title: '推荐人ID',

+ 91 - 53
src/pages/user/list/index.vue

@@ -38,6 +38,15 @@
                         </Input>
                       </FormItem>
                     </Col>
+					<Col>
+					  <FormItem label="货架:"  label-for="pid">
+					    <Select v-model="userFrom.agent_level" placeholder="请选择" element-id="agent_level" clearable
+					            class="input-add"
+					            @on-change="userSearchs">
+					      <Option :value="item.id" v-for="(item,index) in treeData" :key="index">{{ item.name }}</Option>
+					    </Select>
+					  </FormItem>
+					</Col>
                   </Row>
                 </Col>
               </Row>
@@ -103,58 +112,54 @@
                   </Col>
                 </Row>
               </Col>
-              <Col span="18">
-                <Row>
-                  <Col>
-                    <FormItem label="会员等级:" label-for="level">
-                      <Select
-                          v-model="userFrom.level"
-                          placeholder="请选择"
-                          element-id="level"
-                          clearable
-                          class="input-add"
-                      >
-                        <!--                        <Option value="">全部</Option>-->
-                        <Option
-                            :value="item.id"
-                            v-for="(item, index) in levelList"
-                            :key="index"
-                        >{{ item.name }}</Option
-                        >
-                      </Select>
-                    </FormItem>
-                  </Col>
-                  <Col>
-                    <FormItem label="付费会员:" label-for="isMember">
-                      <Select
-                          v-model="userFrom.isMember"
-                          placeholder="请选择"
-                          clearable
-                          class="input-add"
-                      >
-                        <!--                        <Option value="">全部</Option>-->
-                        <Option value="1">是</Option>
-                        <Option value="0">否</Option>
-                      </Select>
-                    </FormItem>
-                  </Col>
-                  <Col>
-                    <FormItem label="身份:">
-                      <Select
-                          v-model="userFrom.is_promoter"
-                          placeholder="请选择"
-                          clearable
-                          class="input-add"
-                      >
-                        <!--                        <Option value="">全部</Option>-->
-                        <Option value="1">推广员</Option>
-                        <Option value="0">普通用户</Option>
-                      </Select>
-                    </FormItem>
-                  </Col>
-                </Row>
-              </Col>
-
+			  <!-- <Col span="18">
+			    <Row>
+			      <Col>
+			        <FormItem label="会员等级:" label-for="level">
+			          <Select
+			              v-model="userFrom.level"
+			              placeholder="请选择"
+			              element-id="level"
+			              clearable
+			              class="input-add"
+			          >
+			            <Option
+			                :value="item.id"
+			                v-for="(item, index) in levelList"
+			                :key="index"
+			            >{{ item.name }}</Option
+			            >
+			          </Select>
+			        </FormItem>
+			      </Col>
+			      <Col>
+			        <FormItem label="付费会员:" label-for="isMember">
+			          <Select
+			              v-model="userFrom.isMember"
+			              placeholder="请选择"
+			              clearable
+			              class="input-add"
+			          >
+			            <Option value="1">是</Option>
+			            <Option value="0">否</Option>
+			          </Select>
+			        </FormItem>
+			      </Col>
+			      <Col>
+			        <FormItem label="身份:">
+			          <Select
+			              v-model="userFrom.is_promoter"
+			              placeholder="请选择"
+			              clearable
+			              class="input-add"
+			          >
+			            <Option value="1">推广员</Option>
+			            <Option value="0">普通用户</Option>
+			          </Select>
+			        </FormItem>
+			      </Col>
+			    </Row>
+			  </Col> -->
               <Col span="18">
                 <Row>
                   <Col class="dateMedia">
@@ -227,6 +232,20 @@
                       </Select>
                     </FormItem>
                   </Col>
+				  <Col>
+				  <FormItem label="身份:">
+				    <Select
+				        v-model="userFrom.is_promoter"
+				        placeholder="请选择"
+				        clearable
+				        class="input-add"
+				    >
+				      <!--                        <Option value="">全部</Option>-->
+				      <Option value="1">推广员</Option>
+				      <Option value="0">普通用户</Option>
+				    </Select>
+				  </FormItem>
+				  </Col>
                   <Col v-if="userFrom.country === 'domestic'">
                     <FormItem label="省份:">
                       <Cascader
@@ -683,6 +702,9 @@ import {
   extendInfo,
   batchProcess
 } from "@/api/user";
+import {
+  membershipDataListApi,
+} from "@/api/membershipLevel";
 import { agentSpreadApi } from "@/api/agent";
 import editFrom from "../../../components/from/from";
 import sendFrom from "@/components/sendCoupons/index";
@@ -900,6 +922,7 @@ export default {
         level: "",
         group_id: "",
         field_key: "",
+		agent_level:'',
       },
       field_key: "",
       level: "",
@@ -943,7 +966,8 @@ export default {
         day: 0,
         spread_uid: '',
       },
-      spread_name: ''
+      spread_name: '',
+	  treeData:[],//货架列表
     };
   },
   watch: {
@@ -987,8 +1011,19 @@ export default {
     this.userGroup();
     this.levelLists();
     this.groupLists();
+	this.getLevel();
   },
   methods: {
+	  // 获取货架等级
+	  getLevel() {
+	    membershipDataListApi(this.formValidate)
+	      .then(async (res) => {
+	        let data = res.data;
+	        this.treeData = data.list;
+	      })
+	      .catch((res) => {
+	      });
+	  },
     checkboxItem(e){
       let uid = parseInt(e.rowid);
       let index = this.checkUidList.indexOf(uid);
@@ -1180,6 +1215,7 @@ export default {
             user_time: this.userFrom.user_time,
             user_time_type: this.userFrom.user_time_type,
             user_type: this.userFrom.user_type,
+			agent_level:this.userFrom.agent_level,
           };
         }
         this.$modalForm(userSetGroup(uids)).then(() => this.getList());
@@ -1212,6 +1248,7 @@ export default {
             user_time: this.userFrom.user_time,
             user_time_type: this.userFrom.user_time_type,
             user_type: this.userFrom.user_type,
+			agent_level:this.userFrom.agent_level
           };
         }
         this.labelShow = true;
@@ -1471,6 +1508,7 @@ export default {
         label_id: "",
         page: 1, // 当前页
         limit: 20, // 每页显示条数
+		agent_level:'',
       };
       this.field_key = "";
       this.level = "";