lhl 1 週間 前
コミット
f938f1963b

+ 1 - 1
.env.dev

@@ -5,4 +5,4 @@ VUE_APP_ENV='dev'
 VUE_APP_TITLE='智宝'
 
 # 接口请求地址
-VUE_APP_API_URL='http://zhibao.frp.qiniu1314.com/adminapi'
+VUE_APP_API_URL='https://zbtest.qiniu1314.com/adminapi'

+ 126 - 102
package-lock.json

@@ -1577,6 +1577,27 @@
           "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==",
           "dev": true
         },
+        "color-convert": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
+          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+          "dev": true,
+          "requires": {
+            "color-name": "~1.1.4"
+          }
+        },
+        "color-name": {
+          "version": "1.1.4",
+          "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz",
+          "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+          "dev": true
+        },
+        "is-fullwidth-code-point": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+          "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+          "dev": true
+        },
         "string-width": {
           "version": "5.1.2",
           "resolved": "https://registry.npmmirror.com/string-width/-/string-width-5.1.2.tgz",
@@ -1588,6 +1609,40 @@
             "strip-ansi": "^7.0.1"
           }
         },
+        "string-width-cjs": {
+          "version": "npm:string-width@4.2.3",
+          "resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz",
+          "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+          "dev": true,
+          "requires": {
+            "emoji-regex": "^8.0.0",
+            "is-fullwidth-code-point": "^3.0.0",
+            "strip-ansi": "^6.0.1"
+          },
+          "dependencies": {
+            "ansi-regex": {
+              "version": "5.0.1",
+              "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz",
+              "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+              "dev": true
+            },
+            "emoji-regex": {
+              "version": "8.0.0",
+              "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz",
+              "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+              "dev": true
+            },
+            "strip-ansi": {
+              "version": "6.0.1",
+              "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz",
+              "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+              "dev": true,
+              "requires": {
+                "ansi-regex": "^5.0.1"
+              }
+            }
+          }
+        },
         "strip-ansi": {
           "version": "7.1.2",
           "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-7.1.2.tgz",
@@ -1597,6 +1652,23 @@
             "ansi-regex": "^6.0.1"
           }
         },
+        "strip-ansi-cjs": {
+          "version": "npm:strip-ansi@6.0.1",
+          "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz",
+          "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+          "dev": true,
+          "requires": {
+            "ansi-regex": "^5.0.1"
+          },
+          "dependencies": {
+            "ansi-regex": {
+              "version": "5.0.1",
+              "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz",
+              "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+              "dev": true
+            }
+          }
+        },
         "wrap-ansi": {
           "version": "8.1.0",
           "resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz",
@@ -1607,6 +1679,60 @@
             "string-width": "^5.0.1",
             "strip-ansi": "^7.0.1"
           }
+        },
+        "wrap-ansi-cjs": {
+          "version": "npm:wrap-ansi@7.0.0",
+          "resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
+          "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^4.0.0",
+            "string-width": "^4.1.0",
+            "strip-ansi": "^6.0.0"
+          },
+          "dependencies": {
+            "ansi-regex": {
+              "version": "5.0.1",
+              "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz",
+              "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+              "dev": true
+            },
+            "ansi-styles": {
+              "version": "4.3.0",
+              "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz",
+              "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+              "dev": true,
+              "requires": {
+                "color-convert": "^2.0.1"
+              }
+            },
+            "emoji-regex": {
+              "version": "8.0.0",
+              "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz",
+              "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+              "dev": true
+            },
+            "string-width": {
+              "version": "4.2.3",
+              "resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz",
+              "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+              "dev": true,
+              "requires": {
+                "emoji-regex": "^8.0.0",
+                "is-fullwidth-code-point": "^3.0.0",
+                "strip-ansi": "^6.0.1"
+              }
+            },
+            "strip-ansi": {
+              "version": "6.0.1",
+              "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz",
+              "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+              "dev": true,
+              "requires": {
+                "ansi-regex": "^5.0.1"
+              }
+            }
+          }
         }
       }
     },
@@ -20951,31 +21077,6 @@
         }
       }
     },
-    "string-width-cjs": {
-      "version": "npm:string-width@4.2.3",
-      "resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz",
-      "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
-      "dev": true,
-      "requires": {
-        "emoji-regex": "^8.0.0",
-        "is-fullwidth-code-point": "^3.0.0",
-        "strip-ansi": "^6.0.1"
-      },
-      "dependencies": {
-        "emoji-regex": {
-          "version": "8.0.0",
-          "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz",
-          "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
-          "dev": true
-        },
-        "is-fullwidth-code-point": {
-          "version": "3.0.0",
-          "resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
-          "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
-          "dev": true
-        }
-      }
-    },
     "string.prototype.padend": {
       "version": "3.1.6",
       "resolved": "https://registry.npmmirror.com/string.prototype.padend/-/string.prototype.padend-3.1.6.tgz",
@@ -21083,23 +21184,6 @@
         }
       }
     },
-    "strip-ansi-cjs": {
-      "version": "npm:strip-ansi@6.0.1",
-      "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz",
-      "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
-      "dev": true,
-      "requires": {
-        "ansi-regex": "^5.0.1"
-      },
-      "dependencies": {
-        "ansi-regex": {
-          "version": "5.0.1",
-          "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz",
-          "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
-          "dev": true
-        }
-      }
-    },
     "strip-bom": {
       "version": "2.0.0",
       "resolved": "https://registry.npmmirror.com/strip-bom/-/strip-bom-2.0.0.tgz",
@@ -24047,66 +24131,6 @@
         }
       }
     },
-    "wrap-ansi-cjs": {
-      "version": "npm:wrap-ansi@7.0.0",
-      "resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
-      "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
-      "dev": true,
-      "requires": {
-        "ansi-styles": "^4.0.0",
-        "string-width": "^4.1.0",
-        "strip-ansi": "^6.0.0"
-      },
-      "dependencies": {
-        "ansi-styles": {
-          "version": "4.3.0",
-          "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz",
-          "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
-          "dev": true,
-          "requires": {
-            "color-convert": "^2.0.1"
-          }
-        },
-        "color-convert": {
-          "version": "2.0.1",
-          "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
-          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
-          "dev": true,
-          "requires": {
-            "color-name": "~1.1.4"
-          }
-        },
-        "color-name": {
-          "version": "1.1.4",
-          "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz",
-          "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
-          "dev": true
-        },
-        "emoji-regex": {
-          "version": "8.0.0",
-          "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz",
-          "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
-          "dev": true
-        },
-        "is-fullwidth-code-point": {
-          "version": "3.0.0",
-          "resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
-          "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
-          "dev": true
-        },
-        "string-width": {
-          "version": "4.2.3",
-          "resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz",
-          "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
-          "dev": true,
-          "requires": {
-            "emoji-regex": "^8.0.0",
-            "is-fullwidth-code-point": "^3.0.0",
-            "strip-ansi": "^6.0.1"
-          }
-        }
-      }
-    },
     "wrappy": {
       "version": "1.0.2",
       "resolved": "https://registry.npmmirror.com/wrappy/-/wrappy-1.0.2.tgz",

+ 10 - 0
src/api/finance.js

@@ -229,3 +229,13 @@ export function setBalanceMark(id, data) {
     data,
   });
 }
+
+
+//finance/get_brokerage
+export function getBrokerage(data) {
+  return request({
+    url: `finance/finance/get_brokerage`,
+    method: 'get',
+    params: data,
+  });
+}

+ 567 - 553
src/pages/agent/agentManage.vue

@@ -1,563 +1,577 @@
 <template>
-  <div>
-    <el-card :bordered="false" shadow="never" class="ivu-mb-16" :body-style="{ padding: 0 }">
-      <div class="padding-add">
-        <el-form
-          ref="formValidate"
-          :model="formValidate"
-          :label-width="labelWidth"
-          :label-position="labelPosition"
-          @submit.native.prevent
-          inline
-        >
-          <el-form-item label="时间选择:">
-            <el-date-picker
-              clearable
-              v-model="timeVal"
-              type="daterange"
-              :editable="false"
-              @change="onchangeTime"
-              format="yyyy/MM/dd"
-              value-format="yyyy/MM/dd"
-              start-placeholder="开始日期"
-              end-placeholder="结束日期"
-              :picker-options="pickerOptions"
-              style="width: 250px"
-              class="mr20"
-            ></el-date-picker>
-          </el-form-item>
-          <el-form-item label="搜索:" label-for="status">
-            <el-input
-              clearable
-              placeholder="请输入姓名、电话、UID"
-              v-model="formValidate.nickname"
-              class="form_content_width"
-            />
-          </el-form-item>
-          <el-form-item>
-            <el-button type="primary" v-db-click @click="userSearchs">查询</el-button>
-          </el-form-item>
-        </el-form>
-      </div>
-    </el-card>
-    <cards-data :cardLists="cardLists" v-if="cardLists.length >= 0"></cards-data>
-    <el-card :bordered="false" shadow="never">
-      <el-button v-auth="['export-userAgent']" class="export" v-db-click @click="exports">导出</el-button>
-      <el-table
-        ref="selection"
-        :data="tableList"
-        class="mt14"
-        v-loading="loading"
-        empty-text="暂无数据"
-        highlight-current-row
-      >
-        <el-table-column label="ID" width="80">
-          <template slot-scope="scope">
-            <span>{{ scope.row.uid }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="商品图片" min-width="90">
-          <template slot-scope="scope">
-            <div class="tabBox_img" v-viewer>
-              <img v-lazy="scope.row.headimgurl ? scope.row.headimgurl : require('../../assets/images/moren.jpg')" />
-            </div>
-          </template>
-        </el-table-column>
-        <el-table-column label="用户信息" width="150">
-          <template slot-scope="scope">
-            <div class="name">
-              <div class="item">昵称:{{ scope.row.nickname }}</div>
-              <div class="item">姓名:{{ scope.row.real_name }}</div>
-              <div class="item">电话:{{ scope.row.phone }}</div>
-            </div>
-          </template>
-        </el-table-column>
-        <el-table-column label="分销等级" min-width="120">
-          <template slot-scope="scope">
-            <div>{{ scope.row.agentLevel ? scope.row.agentLevel.name : '--' }}</div>
-          </template>
-        </el-table-column>
-        <el-table-column label="推广用户数量" min-width="120">
-          <template slot-scope="scope">
-            <span>{{ scope.row.spread_count }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="推广订单数量" min-width="120">
-          <template slot-scope="scope">
-            <div>{{ scope.row.spread_order.order_count }}</div>
-          </template>
-        </el-table-column>
-        <el-table-column label="推广订单金额" min-width="120">
-          <template slot-scope="scope">
-            <div>{{ scope.row.spread_order.order_price || '0.00' }}</div>
-          </template>
-        </el-table-column>
-        <el-table-column label="佣金总金额" min-width="120">
-          <template slot-scope="scope">
-            <div>{{ scope.row.brokerage_money }}</div>
-          </template>
-        </el-table-column>
-        <el-table-column label="已提现金额" min-width="120">
-          <template slot-scope="scope">
-            <div>{{ scope.row.extract_count_price }}</div>
-          </template>
-        </el-table-column>
-        <el-table-column label="提现次数" min-width="120">
-          <template slot-scope="scope">
-            <div>{{ scope.row.extract_count_num }}</div>
-          </template>
-        </el-table-column>
-        <el-table-column label="未提现金额" min-width="120">
-          <template slot-scope="scope">
-            <div>{{ scope.row.new_money }}</div>
-          </template>
-        </el-table-column>
-        <el-table-column label="上级推广人" min-width="120">
-          <template slot-scope="scope">
-            <div>{{ scope.row.spread_name }}</div>
-          </template>
-        </el-table-column>
-        <el-table-column label="操作" fixed="right" width="120">
-          <template slot-scope="scope">
-            <a v-db-click @click="promoters(scope.row, 'man')">推广人</a>
-            <el-divider direction="vertical"></el-divider>
-            <template>
-              <el-dropdown size="small" @command="changeMenu(scope.row, $event, scope.$index)" :transfer="true">
-                <span class="el-dropdown-link">更多<i class="el-icon-arrow-down el-icon--right"></i> </span>
-                <el-dropdown-menu slot="dropdown">
-                  <el-dropdown-item command="1">推广订单</el-dropdown-item>
-                  <el-dropdown-item command="2">推广二维码</el-dropdown-item>
-                  <el-dropdown-item command="3">修改上级推广人</el-dropdown-item>
-                  <el-dropdown-item command="4" v-if="scope.row.spread_uid">清除上级推广人</el-dropdown-item>
-                  <el-dropdown-item command="5">取消推广资格</el-dropdown-item>
-                  <el-dropdown-item command="6">修改分销等级</el-dropdown-item>
-                </el-dropdown-menu>
-              </el-dropdown>
-            </template>
-          </template>
-        </el-table-column>
-      </el-table>
-      <div class="acea-row row-right page">
-        <pagination
-          v-if="total"
-          :total="total"
-          :page.sync="formValidate.page"
-          :limit.sync="formValidate.limit"
-          @pagination="getList"
-        />
-      </div>
-    </el-card>
-    <!-- 推广人列表-->
-    <promoters-list ref="promotersLists"></promoters-list>
-    <!-- 推广二维码-->
-    <el-dialog :visible.sync="modals" title="推广二维码" :close-on-click-modal="false" width="540px">
-      <div class="acea-row row-around" v-loading="spinShow">
-        <div class="acea-row row-column-around row-between-wrapper">
-          <div class="QRpic" v-if="code_src"><img v-lazy="code_src" /></div>
-          <span class="QRpic_sp1 mt10" v-db-click @click="getWeChat">公众号推广二维码</span>
-        </div>
-        <div class="acea-row row-column-around row-between-wrapper">
-          <div class="QRpic" v-if="code_xcx"><img v-lazy="code_xcx" /></div>
-          <span class="QRpic_sp2 mt10" v-db-click @click="getXcx">小程序推广二维码</span>
-        </div>
-        <div class="acea-row row-column-around row-between-wrapper">
-          <div class="QRpic" v-if="code_h5"><img v-lazy="code_h5" /></div>
-          <span class="QRpic_sp2 mt10" v-db-click @click="getH5">H5推广二维码</span>
-        </div>
-      </div>
-    </el-dialog>
-    <!--修改推广人-->
-    <el-dialog :visible.sync="promoterShow" title="修改推广人" width="540px" :show-close="true">
-      <el-form ref="formInline" :model="formInline" label-width="100px" @submit.native.prevent>
-        <el-form-item label="用户头像:" prop="image">
-          <div class="picBox" v-db-click @click="customer">
-            <div class="pictrue" v-if="formInline.image">
-              <img v-lazy="formInline.image" />
-            </div>
-            <div class="upLoad acea-row row-center-wrapper" v-else>
-              <i class="el-icon-picture-outline" style="font-size: 24px"></i>
-            </div>
-          </div>
-        </el-form-item>
-      </el-form>
-      <span slot="footer" class="dialog-footer">
-        <el-button v-db-click @click="cancel('formInline')">取 消</el-button>
-        <el-button type="primary" v-db-click @click="putSend('formInline')">提交</el-button>
-      </span>
-    </el-dialog>
-    <el-dialog :visible.sync="customerShow" title="请选择商城用户" :show-close="true" width="1000px">
-      <customerInfo v-if="customerShow" @imageObject="imageObject"></customerInfo>
-    </el-dialog>
-  </div>
+	<div>
+		<el-card :bordered="false" shadow="never" class="ivu-mb-16" :body-style="{ padding: 0 }">
+			<div class="padding-add">
+				<el-form ref="formValidate" :model="formValidate" :label-width="labelWidth"
+					:label-position="labelPosition" @submit.native.prevent inline>
+					<el-form-item label="时间选择:">
+						<el-date-picker clearable v-model="timeVal" type="daterange" :editable="false"
+							@change="onchangeTime" format="yyyy/MM/dd" value-format="yyyy/MM/dd"
+							start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions"
+							style="width: 250px" class="mr20"></el-date-picker>
+					</el-form-item>
+					<el-form-item label="搜索:" label-for="status">
+						<el-input clearable placeholder="请输入姓名、电话、UID" v-model="formValidate.nickname"
+							class="form_content_width" />
+					</el-form-item>
+					<el-form-item>
+						<el-button type="primary" v-db-click @click="userSearchs">查询</el-button>
+					</el-form-item>
+				</el-form>
+			</div>
+		</el-card>
+		<cards-data :cardLists="cardLists" v-if="cardLists.length >= 0"></cards-data>
+		<el-card :bordered="false" shadow="never">
+			<el-button v-auth="['export-userAgent']" class="export" v-db-click @click="exports">导出</el-button>
+			<el-table ref="selection" :data="tableList" class="mt14" v-loading="loading" empty-text="暂无数据"
+				highlight-current-row>
+				<el-table-column label="ID" width="80">
+					<template slot-scope="scope">
+						<span>{{ scope.row.uid }}</span>
+					</template>
+				</el-table-column>
+				<el-table-column label="商品图片" min-width="90">
+					<template slot-scope="scope">
+						<div class="tabBox_img" v-viewer>
+							<img
+								v-lazy="scope.row.headimgurl ? scope.row.headimgurl : require('../../assets/images/moren.jpg')" />
+						</div>
+					</template>
+				</el-table-column>
+				<el-table-column label="用户信息" width="150">
+					<template slot-scope="scope">
+						<div class="name">
+							<div class="item">昵称:{{ scope.row.nickname }}</div>
+							<div class="item">姓名:{{ scope.row.real_name }}</div>
+							<div class="item">电话:{{ scope.row.phone }}</div>
+						</div>
+					</template>
+				</el-table-column>
+				<el-table-column label="分销等级" min-width="120">
+					<template slot-scope="scope">
+						<div>{{ scope.row.agentLevel ? scope.row.agentLevel.name : '--' }}</div>
+					</template>
+				</el-table-column>
+				<el-table-column label="推广用户数量" min-width="120">
+					<template slot-scope="scope">
+						<span>{{ scope.row.spread_count }}</span>
+					</template>
+				</el-table-column>
+				<el-table-column label="推广订单数量" min-width="120">
+					<template slot-scope="scope">
+						<div>{{ scope.row.spread_order.order_count }}</div>
+					</template>
+				</el-table-column>
+				<el-table-column label="推广订单金额" min-width="120">
+					<template slot-scope="scope">
+						<div>{{ scope.row.spread_order.order_price || '0.00' }}</div>
+					</template>
+				</el-table-column>
+				<el-table-column label="佣金总金额" min-width="120">
+					<template slot-scope="scope">
+						<div>{{ scope.row.brokerage_money }}</div>
+					</template>
+				</el-table-column>
+				<el-table-column label="已提现金额" min-width="120">
+					<template slot-scope="scope">
+						<div>{{ scope.row.extract_count_price }}</div>
+					</template>
+				</el-table-column>
+				<el-table-column label="提现次数" min-width="120">
+					<template slot-scope="scope">
+						<div>{{ scope.row.extract_count_num }}</div>
+					</template>
+				</el-table-column>
+				<el-table-column label="未提现金额" min-width="120">
+					<template slot-scope="scope">
+						<div>{{ scope.row.new_money }}</div>
+					</template>
+				</el-table-column>
+				<el-table-column label="上级推广人" min-width="120">
+					<template slot-scope="scope">
+						<div>{{ scope.row.spread_name }}</div>
+					</template>
+				</el-table-column>
+				<el-table-column label="操作" fixed="right" width="120">
+					<template slot-scope="scope">
+						<a v-db-click @click="promoters(scope.row, 'man')">推广人</a>
+						<el-divider direction="vertical"></el-divider>
+						<template>
+							<el-dropdown size="small" @command="changeMenu(scope.row, $event, scope.$index)"
+								:transfer="true">
+								<span class="el-dropdown-link">更多<i class="el-icon-arrow-down el-icon--right"></i>
+								</span>
+								<el-dropdown-menu slot="dropdown">
+									<el-dropdown-item command="1">推广订单</el-dropdown-item>
+									<el-dropdown-item command="2">推广二维码</el-dropdown-item>
+									<el-dropdown-item command="3">修改上级推广人</el-dropdown-item>
+									<el-dropdown-item command="4" v-if="scope.row.spread_uid">清除上级推广人</el-dropdown-item>
+									<el-dropdown-item command="5">取消推广资格</el-dropdown-item>
+									<el-dropdown-item command="6">修改分销等级</el-dropdown-item>
+									<el-dropdown-item command="7">清除分销等级</el-dropdown-item>
+								</el-dropdown-menu>
+							</el-dropdown>
+						</template>
+					</template>
+				</el-table-column>
+			</el-table>
+			<div class="acea-row row-right page">
+				<pagination v-if="total" :total="total" :page.sync="formValidate.page" :limit.sync="formValidate.limit"
+					@pagination="getList" />
+			</div>
+		</el-card>
+		<!-- 推广人列表-->
+		<promoters-list ref="promotersLists"></promoters-list>
+		<!-- 推广二维码-->
+		<el-dialog :visible.sync="modals" title="推广二维码" :close-on-click-modal="false" width="540px">
+			<div class="acea-row row-around" v-loading="spinShow">
+				<div class="acea-row row-column-around row-between-wrapper">
+					<div class="QRpic" v-if="code_src"><img v-lazy="code_src" /></div>
+					<span class="QRpic_sp1 mt10" v-db-click @click="getWeChat">公众号推广二维码</span>
+				</div>
+				<div class="acea-row row-column-around row-between-wrapper">
+					<div class="QRpic" v-if="code_xcx"><img v-lazy="code_xcx" /></div>
+					<span class="QRpic_sp2 mt10" v-db-click @click="getXcx">小程序推广二维码</span>
+				</div>
+				<div class="acea-row row-column-around row-between-wrapper">
+					<div class="QRpic" v-if="code_h5"><img v-lazy="code_h5" /></div>
+					<span class="QRpic_sp2 mt10" v-db-click @click="getH5">H5推广二维码</span>
+				</div>
+			</div>
+		</el-dialog>
+		<!--修改推广人-->
+		<el-dialog :visible.sync="promoterShow" title="修改推广人" width="540px" :show-close="true">
+			<el-form ref="formInline" :model="formInline" label-width="100px" @submit.native.prevent>
+				<el-form-item label="用户头像:" prop="image">
+					<div class="picBox" v-db-click @click="customer">
+						<div class="pictrue" v-if="formInline.image">
+							<img v-lazy="formInline.image" />
+						</div>
+						<div class="upLoad acea-row row-center-wrapper" v-else>
+							<i class="el-icon-picture-outline" style="font-size: 24px"></i>
+						</div>
+					</div>
+				</el-form-item>
+			</el-form>
+			<span slot="footer" class="dialog-footer">
+				<el-button v-db-click @click="cancel('formInline')">取 消</el-button>
+				<el-button type="primary" v-db-click @click="putSend('formInline')">提交</el-button>
+			</span>
+		</el-dialog>
+		<el-dialog :visible.sync="customerShow" title="请选择商城用户" :show-close="true" width="1000px">
+			<customerInfo v-if="customerShow" @imageObject="imageObject"></customerInfo>
+		</el-dialog>
+	</div>
 </template>
 
 <script>
-import cardsData from '@/components/cards/cards';
-import searchFrom from '@/components/publicSearchFrom';
-import { mapState } from 'vuex';
-import {
-  agentListApi,
-  statisticsApi,
-  lookCodeApi,
-  lookxcxCodeApi,
-  lookh5CodeApi,
-  userAgentApi,
-  agentSpreadApi,
-} from '@/api/agent';
-import promotersList from './handle/promotersList';
-import customerInfo from '@/components/customerInfo';
-import { membershipDataAddApi } from '@/api/membershipLevel';
-export default {
-  name: 'agentManage',
-  components: { cardsData, searchFrom, promotersList, customerInfo },
-  data() {
-    return {
-      customerShow: false,
-      promoterShow: false,
-      modals: false,
-      spinShow: false,
-      pickerOptions: this.$timeOptions,
-      rows: {},
-      formValidate: {
-        nickname: '',
-        data: '',
-        page: 1,
-        limit: 15,
-      },
-      date: 'all',
-      total: 0,
-      cardLists: [],
-      loading: false,
-      tableList: [],
-      timeVal: [],
-      code_src: '',
-      code_xcx: '',
-      code_h5: '',
-      formInline: {
-        uid: 0,
-        spread_uid: 0,
-        image: '',
-      },
-    };
-  },
-  computed: {
-    ...mapState('media', ['isMobile']),
-    labelWidth() {
-      return this.isMobile ? undefined : '80px';
-    },
-    labelPosition() {
-      return this.isMobile ? 'top' : 'right';
-    },
-  },
-  created() {
-    this.getList();
-    this.getStatistics();
-  },
-  methods: {
-    // 提交
-    putSend(name) {
-      this.$refs[name].validate((valid) => {
-        if (valid) {
-          if (!this.formInline.spread_uid) {
-            return this.$message.error('请上传用户');
-          }
-          agentSpreadApi(this.formInline)
-            .then((res) => {
-              this.promoterShow = false;
-              this.$message.success(res.msg);
-              this.getList();
-              this.$refs[name].resetFields();
-            })
-            .catch((res) => {
-              this.$message.error(res.msg);
-            });
-        }
-      });
-    },
-    // 导出
-    exports() {
-      let formValidate = this.formValidate;
-      let data = {
-        data: formValidate.data,
-        nickname: formValidate.nickname,
-      };
-      userAgentApi(data)
-        .then((res) => {
-          location.href = res.data[0];
-        })
-        .catch((res) => {
-          this.$message.error(res.msg);
-        });
-    },
-    // 操作
-    changeMenu(row, name, index) {
-      switch (name) {
-        case '1':
-          this.promoters(row, 'order'); //推广人订单
-          break;
-        case '2':
-          this.spreadQR(row); //推广方式二维码
-          break;
-        case '3':
-          this.editS(row); //修改上级推广人
-          break;
-        case '4': //清除上级推广人
-          this.del_parent(row, '清除【 ' + row.nickname + ' 】的上级推广人', index);
-          break;
-        case '5': //取消推广资格
-          this.del_agent(row, '取消【 ' + row.nickname + ' 】的推广资格', index);
-          break;
-        case '6': //修改推广等级
-          this.$modalForm(membershipDataAddApi({ uid: row.uid }, '/agent/get_level_form')).then(() => this.getList());
-          break;
-        default:
-          break;
-      }
-    },
-    editS(row) {
-      this.promoterShow = true;
-      this.formInline.uid = row.uid;
-    },
-    customer() {
-      this.customerShow = true;
-    },
-    imageObject(e) {
-      this.customerShow = false;
-      this.formInline.spread_uid = e.uid;
-      this.formInline.image = e.image;
-    },
-    // 清除上级关系
-    del_parent(rows, titile, num) {
-      let delfromDatap = {
-        title: titile,
-        num: num,
-        url: `agent/stair/delete_spread/${rows.uid}`,
-        method: 'PUT',
-        ids: '',
-      };
-      this.$modalSure(delfromDatap)
-        .then((res) => {
-          this.$message.success(res.msg);
-          this.getList();
-        })
-        .catch((res) => {
-          this.$message.error(res.msg);
-        });
-    },
-    // 取消自己推广资格
-    del_agent(row, tit, num) {
-      let delfromData = {
-        title: tit,
-        num: num,
-        url: `agent/stair/delete_system_spread/${row.uid}`,
-        method: 'PUT',
-        ids: '',
-      };
-      this.$modalSure(delfromData)
-        .then((res) => {
-          this.$message.success(res.msg);
-          this.getList();
-        })
-        .catch((res) => {
-          this.$message.error(res.msg);
-        });
-    },
-    edit(row) {
-      this.promoterShow = true;
-      this.formInline.uid = row.uid;
-    },
-    cancel(name) {
-      this.promoterShow = false;
-      this.$refs[name].resetFields();
-    },
-    // 推广人列表 订单
-    promoters(row, tit) {
-      this.$refs.promotersLists.modals = true;
-      this.$refs.promotersLists.getList(row, tit);
-    },
-    // 统计
-    getStatistics() {
-      let data = {
-        nickname: this.formValidate.nickname,
-        data: this.formValidate.data,
-      };
-      statisticsApi(data)
-        .then(async (res) => {
-          let data = res.data;
-          this.cardLists = data.res;
-        })
-        .catch((res) => {
-          this.$message.error(res.msg);
-        });
-    },
-    // 具体日期
-    onchangeTime(e) {
-      this.timeVal = e;
-      this.formValidate.data = this.timeVal ? this.timeVal.join('-') : '';
-      this.formValidate.page = 1;
-      if (!e[0]) {
-        this.formValidate.data = '';
-      }
-      this.getList();
-      this.getStatistics();
-    },
-    // 选择时间
-    selectChange(tab) {
-      this.formValidate.page = 1;
-      this.formValidate.data = tab;
-      this.timeVal = [];
-      this.getList();
-      this.getStatistics();
-    },
-    // 列表
-    getList() {
-      this.loading = true;
-      agentListApi(this.formValidate)
-        .then(async (res) => {
-          let data = res.data;
-          this.tableList = data.list;
-          this.total = res.data.count;
-          this.loading = false;
-        })
-        .catch((res) => {
-          this.loading = false;
-          this.$message.error(res.msg);
-        });
-    },
-    // 表格搜索
-    userSearchs() {
-      this.formValidate.page = 1;
-      this.getList();
-      this.getStatistics();
-    },
-    // 二维码
-    spreadQR(row) {
-      this.modals = true;
-      this.rows = row;
-      this.getWeChat();
-      this.getXcx();
-      this.getH5();
-    },
-    // 公众号推广二维码
-    getWeChat() {
-      this.spinShow = true;
-      let data = {
-        uid: this.rows.uid,
-        action: 'wechant_code',
-      };
-      lookCodeApi(data)
-        .then(async (res) => {
-          let data = res.data;
-          this.code_src = data.code_src;
-          this.spinShow = false;
-        })
-        .catch((res) => {
-          this.spinShow = false;
-          this.$message.error(res.msg);
-        });
-    },
-    // 小程序推广二维码
-    getXcx() {
-      this.spinShow = true;
-      let data = {
-        uid: this.rows.uid,
-      };
-      lookxcxCodeApi(data)
-        .then(async (res) => {
-          let data = res.data;
-          this.code_xcx = data.code_src;
-          this.spinShow = false;
-        })
-        .catch((res) => {
-          this.spinShow = false;
-          this.$message.error(res.msg);
-        });
-    },
-    getH5() {
-      this.spinShow = true;
-      let data = {
-        uid: this.rows.uid,
-      };
-      lookh5CodeApi(data)
-        .then(async (res) => {
-          let data = res.data;
-          this.code_h5 = data.code_src;
-          this.spinShow = false;
-        })
-        .catch((res) => {
-          this.spinShow = false;
-          this.$message.error(res.msg);
-        });
-    },
-  },
-};
+	import cardsData from '@/components/cards/cards';
+	import searchFrom from '@/components/publicSearchFrom';
+	import {
+		mapState
+	} from 'vuex';
+	import {
+		agentListApi,
+		statisticsApi,
+		lookCodeApi,
+		lookxcxCodeApi,
+		lookh5CodeApi,
+		userAgentApi,
+		agentSpreadApi,
+	} from '@/api/agent';
+	import promotersList from './handle/promotersList';
+	import customerInfo from '@/components/customerInfo';
+	import {
+		membershipDataAddApi
+	} from '@/api/membershipLevel';
+	export default {
+		name: 'agentManage',
+		components: {
+			cardsData,
+			searchFrom,
+			promotersList,
+			customerInfo
+		},
+		data() {
+			return {
+				customerShow: false,
+				promoterShow: false,
+				modals: false,
+				spinShow: false,
+				pickerOptions: this.$timeOptions,
+				rows: {},
+				formValidate: {
+					nickname: '',
+					data: '',
+					page: 1,
+					limit: 15,
+				},
+				date: 'all',
+				total: 0,
+				cardLists: [],
+				loading: false,
+				tableList: [],
+				timeVal: [],
+				code_src: '',
+				code_xcx: '',
+				code_h5: '',
+				formInline: {
+					uid: 0,
+					spread_uid: 0,
+					image: '',
+				},
+			};
+		},
+		computed: {
+			...mapState('media', ['isMobile']),
+			labelWidth() {
+				return this.isMobile ? undefined : '80px';
+			},
+			labelPosition() {
+				return this.isMobile ? 'top' : 'right';
+			},
+		},
+		created() {
+			this.getList();
+			this.getStatistics();
+		},
+		methods: {
+			// 提交
+			putSend(name) {
+				this.$refs[name].validate((valid) => {
+					if (valid) {
+						if (!this.formInline.spread_uid) {
+							return this.$message.error('请上传用户');
+						}
+						agentSpreadApi(this.formInline)
+							.then((res) => {
+								this.promoterShow = false;
+								this.$message.success(res.msg);
+								this.getList();
+								this.$refs[name].resetFields();
+							})
+							.catch((res) => {
+								this.$message.error(res.msg);
+							});
+					}
+				});
+			},
+			// 导出
+			exports() {
+				let formValidate = this.formValidate;
+				let data = {
+					data: formValidate.data,
+					nickname: formValidate.nickname,
+				};
+				userAgentApi(data)
+					.then((res) => {
+						location.href = res.data[0];
+					})
+					.catch((res) => {
+						this.$message.error(res.msg);
+					});
+			},
+			// 操作
+			changeMenu(row, name, index) {
+				switch (name) {
+					case '1':
+						this.promoters(row, 'order'); //推广人订单
+						break;
+					case '2':
+						this.spreadQR(row); //推广方式二维码
+						break;
+					case '3':
+						this.editS(row); //修改上级推广人
+						break;
+					case '4': //清除上级推广人
+						this.del_parent(row, '清除【 ' + row.nickname + ' 】的上级推广人', index);
+						break;
+					case '5': //取消推广资格
+						this.del_agent(row, '取消【 ' + row.nickname + ' 】的推广资格', index);
+						break;
+					case '6': //修改推广等级
+						this.$modalForm(membershipDataAddApi({
+							uid: row.uid
+						}, '/agent/get_level_form')).then(() => this.getList());
+						break;
+					case '7': //清除分销等级
+						this.del_parents(row, '清除【 ' + row.nickname + ' 】的分销等级', index);
+						break;
+					default:
+						break;
+				}
+			},
+			editS(row) {
+				this.promoterShow = true;
+				this.formInline.uid = row.uid;
+			},
+			customer() {
+				this.customerShow = true;
+			},
+			imageObject(e) {
+				this.customerShow = false;
+				this.formInline.spread_uid = e.uid;
+				this.formInline.image = e.image;
+			},
+			// 清除上级关系
+			del_parent(rows, titile, num) {
+				let delfromDatap = {
+					title: titile,
+					num: num,
+					url: `agent/stair/delete_spread/${rows.uid}`,
+					method: 'PUT',
+					ids: '',
+				};
+				this.$modalSure(delfromDatap)
+					.then((res) => {
+						this.$message.success(res.msg);
+						this.getList();
+					})
+					.catch((res) => {
+						this.$message.error(res.msg);
+					});
+			},
+			// 取消自己推广资格
+			del_agent(row, tit, num) {
+				let delfromData = {
+					title: tit,
+					num: num,
+					url: `agent/stair/delete_system_spread/${row.uid}`,
+					method: 'PUT',
+					ids: '',
+				};
+				this.$modalSure(delfromData)
+					.then((res) => {
+						this.$message.success(res.msg);
+						this.getList();
+					})
+					.catch((res) => {
+						this.$message.error(res.msg);
+					});
+			},
+			del_parents(row, tit, num) {
+				let delfromData = {
+					title: tit,
+					num: num,
+					url: `agent/level/delLevel/${row.uid}`,
+					method: 'POST',
+					ids: '',
+				};
+				this.$modalSure(delfromData)
+					.then((res) => {
+						this.$message.success(res.msg);
+						this.getList();
+					})
+					.catch((res) => {
+						this.$message.error(res.msg);
+					});
+			},
+			edit(row) {
+				this.promoterShow = true;
+				this.formInline.uid = row.uid;
+			},
+			cancel(name) {
+				this.promoterShow = false;
+				this.$refs[name].resetFields();
+			},
+			// 推广人列表 订单
+			promoters(row, tit) {
+				this.$refs.promotersLists.modals = true;
+				this.$refs.promotersLists.getList(row, tit);
+			},
+			// 统计
+			getStatistics() {
+				let data = {
+					nickname: this.formValidate.nickname,
+					data: this.formValidate.data,
+				};
+				statisticsApi(data)
+					.then(async (res) => {
+						let data = res.data;
+						this.cardLists = data.res;
+					})
+					.catch((res) => {
+						this.$message.error(res.msg);
+					});
+			},
+			// 具体日期
+			onchangeTime(e) {
+				this.timeVal = e;
+				this.formValidate.data = this.timeVal ? this.timeVal.join('-') : '';
+				this.formValidate.page = 1;
+				if (!e[0]) {
+					this.formValidate.data = '';
+				}
+				this.getList();
+				this.getStatistics();
+			},
+			// 选择时间
+			selectChange(tab) {
+				this.formValidate.page = 1;
+				this.formValidate.data = tab;
+				this.timeVal = [];
+				this.getList();
+				this.getStatistics();
+			},
+			// 列表
+			getList() {
+				this.loading = true;
+				agentListApi(this.formValidate)
+					.then(async (res) => {
+						let data = res.data;
+						this.tableList = data.list;
+						this.total = res.data.count;
+						this.loading = false;
+					})
+					.catch((res) => {
+						this.loading = false;
+						this.$message.error(res.msg);
+					});
+			},
+			// 表格搜索
+			userSearchs() {
+				this.formValidate.page = 1;
+				this.getList();
+				this.getStatistics();
+			},
+			// 二维码
+			spreadQR(row) {
+				this.modals = true;
+				this.rows = row;
+				this.getWeChat();
+				this.getXcx();
+				this.getH5();
+			},
+			// 公众号推广二维码
+			getWeChat() {
+				this.spinShow = true;
+				let data = {
+					uid: this.rows.uid,
+					action: 'wechant_code',
+				};
+				lookCodeApi(data)
+					.then(async (res) => {
+						let data = res.data;
+						this.code_src = data.code_src;
+						this.spinShow = false;
+					})
+					.catch((res) => {
+						this.spinShow = false;
+						this.$message.error(res.msg);
+					});
+			},
+			// 小程序推广二维码
+			getXcx() {
+				this.spinShow = true;
+				let data = {
+					uid: this.rows.uid,
+				};
+				lookxcxCodeApi(data)
+					.then(async (res) => {
+						let data = res.data;
+						this.code_xcx = data.code_src;
+						this.spinShow = false;
+					})
+					.catch((res) => {
+						this.spinShow = false;
+						this.$message.error(res.msg);
+					});
+			},
+			getH5() {
+				this.spinShow = true;
+				let data = {
+					uid: this.rows.uid,
+				};
+				lookh5CodeApi(data)
+					.then(async (res) => {
+						let data = res.data;
+						this.code_h5 = data.code_src;
+						this.spinShow = false;
+					})
+					.catch((res) => {
+						this.spinShow = false;
+						this.$message.error(res.msg);
+					});
+			},
+		},
+	};
 </script>
 <style lang="scss" scoped>
-.picBox {
-  display: inline-block;
-  cursor: pointer;
-  .upLoad {
-    width: 58px;
-    height: 58px;
-    line-height: 58px;
-    border: 1px dotted rgba(0, 0, 0, 0.1);
-    border-radius: 4px;
-    background: rgba(0, 0, 0, 0.02);
-  }
-  .pictrue {
-    width: 60px;
-    height: 60px;
-    border: 1px dotted rgba(0, 0, 0, 0.1);
-    margin-right: 10px;
+	.picBox {
+		display: inline-block;
+		cursor: pointer;
 
-    img {
-      width: 100%;
-      height: 100%;
-    }
-  }
-  .iconfont {
-    color: #898989;
-  }
-}
-.QRpic {
-  width: 180px;
-  height: 180px;
+		.upLoad {
+			width: 58px;
+			height: 58px;
+			line-height: 58px;
+			border: 1px dotted rgba(0, 0, 0, 0.1);
+			border-radius: 4px;
+			background: rgba(0, 0, 0, 0.02);
+		}
 
-  img {
-    width: 100%;
-    height: 100%;
-  }
-}
-.QRpic_sp1 {
-  font-size: 13px;
-  color: #19be6b;
-  cursor: pointer;
-}
-.QRpic_sp2 {
-  font-size: 13px;
-  color: #2d8cf0;
-  cursor: pointer;
-}
+		.pictrue {
+			width: 60px;
+			height: 60px;
+			border: 1px dotted rgba(0, 0, 0, 0.1);
+			margin-right: 10px;
 
-img {
-  height: 36px;
-  display: block;
-}
-.ivu-mt .name .item {
-  margin: 3px 0;
-}
-.tabform {
-  margin-bottom: 10px;
-}
-.Refresh {
-  font-size: 12px;
-  color: var(--prev-color-primary);
-  cursor: pointer;
-}
-.ivu-form-item {
-  margin-bottom: 10px;
-}
+			img {
+				width: 100%;
+				height: 100%;
+			}
+		}
 
-/* .ivu-mt ::v-deep .ivu-table-header */
-/* border-top:1px dashed #ddd!important */
-</style>
+		.iconfont {
+			color: #898989;
+		}
+	}
+
+	.QRpic {
+		width: 180px;
+		height: 180px;
+
+		img {
+			width: 100%;
+			height: 100%;
+		}
+	}
+
+	.QRpic_sp1 {
+		font-size: 13px;
+		color: #19be6b;
+		cursor: pointer;
+	}
+
+	.QRpic_sp2 {
+		font-size: 13px;
+		color: #2d8cf0;
+		cursor: pointer;
+	}
+
+	img {
+		height: 36px;
+		display: block;
+	}
+
+	.ivu-mt .name .item {
+		margin: 3px 0;
+	}
+
+	.tabform {
+		margin-bottom: 10px;
+	}
+
+	.Refresh {
+		font-size: 12px;
+		color: var(--prev-color-primary);
+		cursor: pointer;
+	}
+
+	.ivu-form-item {
+		margin-bottom: 10px;
+	}
+
+	/* .ivu-mt ::v-deep .ivu-table-header */
+	/* border-top:1px dashed #ddd!important */
+</style>

+ 185 - 0
src/pages/finance/commission/indexs.vue

@@ -0,0 +1,185 @@
+<template>
+  <div>
+    <el-card :bordered="false" shadow="never" :body-style="{ padding: 0 }">
+      <div class="padding-add">
+        <el-form ref="formValidate" :label-width="labelWidth" label-position="right" inline @submit.native.prevent>
+          <el-form-item label="ID:">
+            <el-input placeholder="请输入" v-model="formValidate.uid" clearable class="form_content_width" />
+          </el-form-item>
+          <!-- <el-form-item label="佣金范围:" class="tab_data">
+            <el-input-number :controls="false" :min="0" class="mr10" v-model="formValidate.price_min" />
+            <span class="mr10">一</span>
+            <el-input-number :controls="false" :min="0" v-model="formValidate.price_max" />
+          </el-form-item> -->
+          <el-form-item>
+            <el-button type="primary" v-db-click @click="userSearchs">查询</el-button>
+          </el-form-item>
+        </el-form>
+      </div>
+    </el-card>
+    <el-card :bordered="false" shadow="never" class="mt16">
+      <!-- <el-button v-auth="['export-userCommission']" class="export" v-db-click @click="exports">导出</el-button> -->
+      <el-table
+        ref="table"
+        :data="tabList"
+        v-loading="loading"
+        empty-text="暂无数据"
+        @on-sort-change="sortChanged"
+        class="mt14"
+      >
+        <el-table-column label="用户信息" min-width="100">
+          <template slot-scope="scope">
+            <div>{{ scope.row.user.nickname }}</div>
+			<div>ID: {{scope.row.uid}}</div>
+          </template>
+        </el-table-column>
+        <el-table-column label="理由" min-width="100">
+          <template slot-scope="scope">
+            <span>{{ scope.row.title }}</span>
+          </template>
+        </el-table-column>
+		<el-table-column label="金额" min-width="100">
+		  <template slot-scope="scope">
+		    <span :style="{ color: scope.row.pm == 1 ?'#F56C6C': '#67C23A'}">{{scope.row.pm == 1 ? '+': '-'}}{{ scope.row.number }}</span>
+		  </template>
+		</el-table-column>
+        <el-table-column label="详情" min-width="100">
+          <template slot-scope="scope">
+            <span>{{ scope.row.mark }}</span>
+          </template>
+        </el-table-column>
+        
+        <el-table-column label="账户余额" min-width="100">
+          <template slot-scope="scope">
+            <span>{{ scope.row.balance }}</span>
+          </template>
+        </el-table-column>
+		<el-table-column label="时间" min-width="100">
+		  <template slot-scope="scope">
+		    <span>{{ scope.row.add_time | formatDate }}</span>
+		  </template>
+		</el-table-column>
+      </el-table>
+      <div class="acea-row row-right page">
+        <pagination
+          v-if="total"
+          :total="total"
+          :page.sync="formValidate.page"
+          :limit.sync="formValidate.limit"
+          @pagination="getList"
+        />
+      </div>
+    </el-card>
+    <commission-details ref="commission"></commission-details>
+  </div>
+</template>
+<script>
+import { mapState } from 'vuex';
+import { getBrokerage, userCommissionApi } from '@/api/finance';
+import commissionDetails from './handle/commissionDetails';
+import { formatDate } from '@/utils/validate';
+export default {
+  name: 'commissionRecord',
+  components: { commissionDetails },
+  data() {
+    return {
+      total: 0,
+      loading: false,
+      tabList: [],
+      formValidate: {
+        uid: '',
+        price_max: undefined,
+        price_min: undefined,
+        page: 1, // 当前页
+        limit: 20, // 每页显示条数
+      },
+    };
+  },
+  computed: {
+    ...mapState('media', ['isMobile']),
+    labelWidth() {
+      return this.isMobile ? undefined : '80px';
+    },
+    labelPosition() {
+      return this.isMobile ? 'top' : 'right';
+    },
+  },
+  filters: {
+    formatDate(time) {
+      if (time !== 0) {
+        const date = new Date(time * 1000);
+        return formatDate(date, 'yyyy-MM-dd hh:mm');
+      }
+    },
+  },
+  mounted() {
+    this.getList();
+  },
+  methods: {
+    // 列表
+    getList() {
+      this.loading = true;
+      getBrokerage(this.formValidate)
+        .then(async (res) => {
+          let data = res.data;
+          this.tabList = data.list;
+          this.total = data.count;
+          this.loading = false;
+        })
+        .catch((res) => {
+          this.loading = false;
+          this.$message.error(res.msg);
+        });
+    },
+    // 搜索
+    userSearchs() {
+      this.formValidate.page = 1;
+      this.getList();
+    },
+    // 导出
+    exports() {
+      let formValidate = this.formValidate;
+      let data = {
+        price_max: formValidate.price_max,
+        price_min: formValidate.price_min,
+        nickname: formValidate.nickname,
+      };
+      userCommissionApi(data)
+        .then((res) => {
+          location.href = res.data[0];
+        })
+        .catch((res) => {
+          this.$message.error(res.msg);
+        });
+    },
+    // 详情
+    Info(row) {
+      this.$refs.commission.modals = true;
+      this.$refs.commission.getDetails(row.uid);
+      this.$refs.commission.getList(row.uid);
+    },
+    // 排序
+    sortChanged(e) {
+      if (e.key == 'sum_number') {
+        delete this.formValidate.brokerage_price;
+      } else {
+        delete this.formValidate.sum_number;
+      }
+      this.formValidate[e.key] = e.order;
+      this.getList();
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.lines {
+  padding-top: 6px !important;
+}
+.tabform .export {
+  margin-left: 10px;
+}
+.tab_data ::v-deep .ivu-form-item-content {
+  display: flex !important;
+}
+</style>

+ 250 - 240
src/pages/product/productAdd/components/MarketingSetting.vue

@@ -1,254 +1,264 @@
 <template>
-  <!-- 营销设置 -->
-  <el-row>
-    <el-col :span="24">
-      <el-form-item label="是否报单:">
-        <el-switch v-model="formValidate.is_pack" class="defineSwitch" active-text="是" inactive-text="否"
-          :active-value="1" :inactive-value="0" size="large" @change="changeTemplate">
-        </el-switch>
-      </el-form-item>
-    </el-col>
-    <el-col :span="24">
-      <el-form-item label="报单数:" v-if="formValidate.is_pack">
-        <el-input-number :controls="false" v-model="formValidate.share" :min="0" :max="9999999999"
-          placeholder="请输入报单数" class="input_width input-number-unit-class" class-unit="单" />
-      </el-form-item>
-    </el-col>
-    <el-col :span="24">
-      <el-form-item label="是否复购:">
-        <el-switch v-model="formValidate.is_share" class="defineSwitch" active-text="是" inactive-text="否"
-          :active-value="1" :inactive-value="0" size="large" @change="changeTemplates">
-        </el-switch>
-      </el-form-item>
-    </el-col>
-     <el-col :span="24">
-      <el-form-item label="PV:">
-        <el-input-number :controls="false" v-model="formValidate.pv" :min="0" :max="9999999999"
-          placeholder="请输入PV值" class="input_width input-number-unit-class" class-unit="" />
-      </el-form-item>
-    </el-col>
-    <el-col :span="24">
-      <div class="line"></div>
-    </el-col>
-    <el-col :span="24">
-      <el-form-item label="购买送积分:" prop="give_integral">
-        <el-input-number :controls="false" v-model="formValidate.give_integral" :min="0" :max="9999999999"
-          placeholder="请输入积分" class="input_width input-number-unit-class" class-unit="积分" />
-      </el-form-item>
-    </el-col>
-    <el-col :span="24">
-      <el-form-item label="购买送优惠券:">
-        <div v-if="couponName.length" class="mb10">
-          <el-tag class="mr10" closable v-for="(item, index) in couponName" :key="index" @close="handleClose(item)">{{
+	<!-- 营销设置 -->
+	<el-row>
+		<el-col :span="24">
+			<el-form-item label="是否报单:">
+				<el-switch v-model="formValidate.is_pack" class="defineSwitch" active-text="是" inactive-text="否"
+					:active-value="1" :inactive-value="0" size="large" @change="changeTemplate">
+				</el-switch>
+			</el-form-item>
+		</el-col>
+		<el-col :span="24">
+			<el-form-item label="报单数:" v-if="formValidate.is_pack">
+				<el-input-number :controls="false" v-model="formValidate.share" :min="0" :max="9999999999"
+					placeholder="请输入报单数" class="input_width input-number-unit-class" class-unit="单" />
+			</el-form-item>
+		</el-col>
+		<el-col :span="24">
+			<el-form-item label="是否复购:">
+				<el-switch v-model="formValidate.is_share" class="defineSwitch" active-text="是" inactive-text="否"
+					:active-value="1" :inactive-value="0" size="large" @change="changeTemplates">
+				</el-switch>
+			</el-form-item>
+		</el-col>
+		<el-col :span="24">
+			<el-form-item label="PV:">
+				<el-input-number :controls="false" v-model="formValidate.pv" :min="0" :max="9999999999"
+					placeholder="请输入PV值" class="input_width input-number-unit-class" class-unit="" />
+			</el-form-item>
+		</el-col>
+		<el-col :span="24">
+			<el-form-item label="最小购买等级:">
+				<el-input-number :controls="false" v-model="formValidate.min_level" :min="0" :max="9999999999"
+					placeholder="请输入最小购买等级" class="input_width input-number-unit-class" class-unit="" />
+			</el-form-item>
+		</el-col>
+		<el-col :span="24">
+			<div class="line"></div>
+		</el-col>
+		<el-col :span="24">
+			<el-form-item label="购买送积分:" prop="give_integral">
+				<el-input-number :controls="false" v-model="formValidate.give_integral" :min="0" :max="9999999999"
+					placeholder="请输入积分" class="input_width input-number-unit-class" class-unit="积分" />
+			</el-form-item>
+		</el-col>
+		<el-col :span="24">
+			<el-form-item label="购买送优惠券:">
+				<div v-if="couponName.length" class="mb10">
+					<el-tag class="mr10" closable v-for="(item, index) in couponName" :key="index"
+						@close="handleClose(item)">{{
             item.title
           }}</el-tag>
-        </div>
-        <el-button type="primary" v-db-click @click="addCoupon">选择优惠券</el-button>
-      </el-form-item>
-    </el-col>
-    <el-col :span="24">
-      <el-form-item label="关联用户标签:" prop="label_id">
-        <div style="display: flex">
-          <div class="labelInput acea-row row-between-wrapper" v-db-click @click="openLabel">
-            <div style="width: 90%">
-              <div v-if="dataLabel.length">
-                <el-tag closable v-for="(item, index) in dataLabel" @close="closeLabel(item)" :key="index">{{
+				</div>
+				<el-button type="primary" v-db-click @click="addCoupon">选择优惠券</el-button>
+			</el-form-item>
+		</el-col>
+		<el-col :span="24">
+			<el-form-item label="关联用户标签:" prop="label_id">
+				<div style="display: flex">
+					<div class="labelInput acea-row row-between-wrapper" v-db-click @click="openLabel">
+						<div style="width: 90%">
+							<div v-if="dataLabel.length">
+								<el-tag closable v-for="(item, index) in dataLabel" @close="closeLabel(item)"
+									:key="index">{{
                   item.label_name
                 }}</el-tag>
-              </div>
-              <span class="span" v-else>选择用户关联标签</span>
-            </div>
-            <div class="iconfont iconxiayi"></div>
-          </div>
-          <span class="addfont" v-db-click @click="addLabel">新增标签</span>
-        </div>
-      </el-form-item>
-    </el-col>
-    <el-col :span="24">
-      <div class="line"></div>
-    </el-col>
-    <el-col v-if="formValidate.virtual_type == 0" :span="24">
-      <el-form-item label="起购数量:">
-        <el-input-number :controls="false" :min="1" :max="9999999999" :precision="0" v-model="formValidate.min_qty"
-          placeholder="请输入起购数量" class="input_width input-number-unit-class"
-          :class-unit="formValidate.unit_name || '件'" />
-      </el-form-item>
-    </el-col>
-    <el-col :span="24">
-      <el-form-item label="是否限购:">
-        <el-switch v-model="formValidate.is_limit" class="defineSwitch" active-text="开启" inactive-text="关闭"
-          :active-value="1" :inactive-value="0" size="large">
-        </el-switch>
-      </el-form-item>
-    </el-col>
-    <el-col :span="24">
-      <el-form-item label="限购类型:" v-if="formValidate.is_limit">
-        <el-radio-group v-model="formValidate.limit_type">
-          <el-radio :label="1">单次限购</el-radio>
-          <el-radio :label="2">单人限购</el-radio>
-        </el-radio-group>
-        <div class="tips-info">单次限购是限制每次下单最多购买的数量,单人限购是限制一个用户总共可以购买的数量</div>
-      </el-form-item>
-    </el-col>
-    <el-col :span="24" v-if="formValidate.is_limit">
-      <el-form-item label="限购数量:" prop="limit_num">
-        <div class="acea-row row-middle">
-          <el-input-number :controls="false" placeholder="请输入限购数量" :precision="0" :min="1"
-            v-model="formValidate.limit_num" class="input_width input-number-unit-class"
-            :class-unit="formValidate.unit_name || '件'" />
-        </div>
-      </el-form-item>
-    </el-col>
-    <el-col v-if="formValidate.is_limit" :span="24">
-      <div class="line"></div>
-    </el-col>
-    <el-col :span="24" v-if="formValidate.virtual_type == 0 || formValidate.virtual_type == 3">
-      <el-form-item label="预售商品:">
-        <el-switch v-model="formValidate.presale" class="defineSwitch" active-text="开启" inactive-text="关闭"
-          :active-value="1" :inactive-value="0" size="large">
-        </el-switch>
-      </el-form-item>
-    </el-col>
-    <el-col :span="24" v-if="formValidate.presale">
-      <el-form-item label="预售活动时间:" prop="presale_time">
-        <div class="acea-row row-middle">
-          <el-date-picker clearable :editable="false" type="datetimerange" format="yyyy-MM-dd HH:mm"
-            value-format="yyyy-MM-dd HH:mm" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
-            @change="onchangeTime" v-model="formValidate.presale_time"></el-date-picker>
-        </div>
-        <div class="tips-info">设置活动开启结束时间,用户可以在设置时间内发起参与预售</div>
-      </el-form-item>
-    </el-col>
-    <el-col :span="24" v-if="formValidate.presale">
-      <el-form-item label="发货时间:" prop="presale_day">
-        <div class="acea-row row-middle">
-          <span class="mr10">预售活动结束后</span>
-          <el-input-number class="w-80 input-number-unit-class" :controls="false" placeholder="请输入发货时间" :precision="0"
-            :min="1" class-unit="天" v-model="formValidate.presale_day" />
-          <span class="ml10"> 之内 </span>
-        </div>
-      </el-form-item>
-    </el-col>
-    <el-col :span="24">
-      <div class="line"></div>
-    </el-col>
-    <el-col :span="24">
-      <el-form-item label="商品推荐:">
-        <el-checkbox-group v-model="formValidate.recommend">
-          <el-checkbox label="is_hot">热卖单品</el-checkbox>
-          <el-checkbox label="is_best">精品推荐</el-checkbox>
-          <el-checkbox label="is_new">首发新品</el-checkbox>
-          <el-checkbox label="is_good">优品推荐</el-checkbox>
-        </el-checkbox-group>
-      </el-form-item>
-    </el-col>
-    <el-col :span="24">
-      <el-form-item label="活动优先级:">
-        <div class="color-list acea-row row-middle">
-          <div class="color-item" :class="activity[color]" v-for="color in formValidate.activity" v-dragging="{
+							</div>
+							<span class="span" v-else>选择用户关联标签</span>
+						</div>
+						<div class="iconfont iconxiayi"></div>
+					</div>
+					<span class="addfont" v-db-click @click="addLabel">新增标签</span>
+				</div>
+			</el-form-item>
+		</el-col>
+		<el-col :span="24">
+			<div class="line"></div>
+		</el-col>
+		<el-col v-if="formValidate.virtual_type == 0" :span="24">
+			<el-form-item label="起购数量:">
+				<el-input-number :controls="false" :min="1" :max="9999999999" :precision="0"
+					v-model="formValidate.min_qty" placeholder="请输入起购数量" class="input_width input-number-unit-class"
+					:class-unit="formValidate.unit_name || '件'" />
+			</el-form-item>
+		</el-col>
+		<el-col :span="24">
+			<el-form-item label="是否限购:">
+				<el-switch v-model="formValidate.is_limit" class="defineSwitch" active-text="开启" inactive-text="关闭"
+					:active-value="1" :inactive-value="0" size="large">
+				</el-switch>
+			</el-form-item>
+		</el-col>
+		<el-col :span="24">
+			<el-form-item label="限购类型:" v-if="formValidate.is_limit">
+				<el-radio-group v-model="formValidate.limit_type">
+					<el-radio :label="1">单次限购</el-radio>
+					<el-radio :label="2">单人限购</el-radio>
+				</el-radio-group>
+				<div class="tips-info">单次限购是限制每次下单最多购买的数量,单人限购是限制一个用户总共可以购买的数量</div>
+			</el-form-item>
+		</el-col>
+		<el-col :span="24" v-if="formValidate.is_limit">
+			<el-form-item label="限购数量:" prop="limit_num">
+				<div class="acea-row row-middle">
+					<el-input-number :controls="false" placeholder="请输入限购数量" :precision="0" :min="1"
+						v-model="formValidate.limit_num" class="input_width input-number-unit-class"
+						:class-unit="formValidate.unit_name || '件'" />
+				</div>
+			</el-form-item>
+		</el-col>
+		<el-col v-if="formValidate.is_limit" :span="24">
+			<div class="line"></div>
+		</el-col>
+		<el-col :span="24" v-if="formValidate.virtual_type == 0 || formValidate.virtual_type == 3">
+			<el-form-item label="预售商品:">
+				<el-switch v-model="formValidate.presale" class="defineSwitch" active-text="开启" inactive-text="关闭"
+					:active-value="1" :inactive-value="0" size="large">
+				</el-switch>
+			</el-form-item>
+		</el-col>
+		<el-col :span="24" v-if="formValidate.presale">
+			<el-form-item label="预售活动时间:" prop="presale_time">
+				<div class="acea-row row-middle">
+					<el-date-picker clearable :editable="false" type="datetimerange" format="yyyy-MM-dd HH:mm"
+						value-format="yyyy-MM-dd HH:mm" range-separator="-" start-placeholder="开始日期"
+						end-placeholder="结束日期" @change="onchangeTime"
+						v-model="formValidate.presale_time"></el-date-picker>
+				</div>
+				<div class="tips-info">设置活动开启结束时间,用户可以在设置时间内发起参与预售</div>
+			</el-form-item>
+		</el-col>
+		<el-col :span="24" v-if="formValidate.presale">
+			<el-form-item label="发货时间:" prop="presale_day">
+				<div class="acea-row row-middle">
+					<span class="mr10">预售活动结束后</span>
+					<el-input-number class="w-80 input-number-unit-class" :controls="false" placeholder="请输入发货时间"
+						:precision="0" :min="1" class-unit="天" v-model="formValidate.presale_day" />
+					<span class="ml10"> 之内 </span>
+				</div>
+			</el-form-item>
+		</el-col>
+		<el-col :span="24">
+			<div class="line"></div>
+		</el-col>
+		<el-col :span="24">
+			<el-form-item label="商品推荐:">
+				<el-checkbox-group v-model="formValidate.recommend">
+					<el-checkbox label="is_hot">热卖单品</el-checkbox>
+					<el-checkbox label="is_best">精品推荐</el-checkbox>
+					<el-checkbox label="is_new">首发新品</el-checkbox>
+					<el-checkbox label="is_good">优品推荐</el-checkbox>
+				</el-checkbox-group>
+			</el-form-item>
+		</el-col>
+		<el-col :span="24">
+			<el-form-item label="活动优先级:">
+				<div class="color-list acea-row row-middle">
+					<div class="color-item" :class="activity[color]" v-for="color in formValidate.activity" v-dragging="{
             item: color,
             list: formValidate.activity,
             group: 'color',
           }" :key="color">
-            {{ color }}
-          </div>
-        </div>
-        <div class="tips-info">可拖动按钮调整活动的优先展示顺序</div>
-      </el-form-item>
-    </el-col>
-    <el-col :span="24">
-      <el-form-item label="优品推荐商品:">
-        <div class="picBox">
-          <div class="pictrue" v-for="(item, index) in formValidate.recommend_list" :key="index">
-            <img v-lazy="item.image" />
-            <i class="el-icon-error btndel" v-db-click @click="handleRemoveRecommend(index)"></i>
-          </div>
-          <div class="upLoad acea-row row-center-wrapper" v-db-click @click="changeGoods">
-            <i class="el-icon-picture-outline" style="font-size: 24px"></i>
-          </div>
-        </div>
-      </el-form-item>
-    </el-col>
-    <el-col :span="24">
-      <div class="line"></div>
-    </el-col>
-    <el-col :span="24">
-      <el-form-item label="已售数量:">
-        <el-input-number :controls="false" :min="0" :max="9999999999" v-model="formValidate.ficti" placeholder="请输入虚拟销量"
-          class="input_width input-number-unit-class" :class-unit="formValidate.unit_name || '件'" />
-      </el-form-item>
-    </el-col>
-    <el-col :span="24">
-      <el-form-item label="排序:">
-        <el-input-number :controls="false" :min="0" :max="9999999999" v-model="formValidate.sort"
-          placeholder="请输入数字越大越靠前" class="input_width" />
-      </el-form-item>
-    </el-col>
-  </el-row>
+						{{ color }}
+					</div>
+				</div>
+				<div class="tips-info">可拖动按钮调整活动的优先展示顺序</div>
+			</el-form-item>
+		</el-col>
+		<el-col :span="24">
+			<el-form-item label="优品推荐商品:">
+				<div class="picBox">
+					<div class="pictrue" v-for="(item, index) in formValidate.recommend_list" :key="index">
+						<img v-lazy="item.image" />
+						<i class="el-icon-error btndel" v-db-click @click="handleRemoveRecommend(index)"></i>
+					</div>
+					<div class="upLoad acea-row row-center-wrapper" v-db-click @click="changeGoods">
+						<i class="el-icon-picture-outline" style="font-size: 24px"></i>
+					</div>
+				</div>
+			</el-form-item>
+		</el-col>
+		<el-col :span="24">
+			<div class="line"></div>
+		</el-col>
+		<el-col :span="24">
+			<el-form-item label="已售数量:">
+				<el-input-number :controls="false" :min="0" :max="9999999999" v-model="formValidate.ficti"
+					placeholder="请输入虚拟销量" class="input_width input-number-unit-class"
+					:class-unit="formValidate.unit_name || '件'" />
+			</el-form-item>
+		</el-col>
+		<el-col :span="24">
+			<el-form-item label="排序:">
+				<el-input-number :controls="false" :min="0" :max="9999999999" v-model="formValidate.sort"
+					placeholder="请输入数字越大越靠前" class="input_width" />
+			</el-form-item>
+		</el-col>
+	</el-row>
 </template>
 
 <script>
-export default {
-  name: 'MarketingSetting',
-  props: {
-    formValidate: {
-      type: Object,
-      required: true,
-    },
-    couponName: {
-      type: Array,
-      default: () => [],
-    },
-    dataLabel: {
-      type: Array,
-      default: () => [],
-    },
-    activity: {
-      type: Object,
-      default: () => ({}),
-    },
-  },
-  methods: {
-    changeTemplate(e) {
-      if (e) {
-        this.formValidate.is_share = 0
-      }else { 
-        this.formValidate.share = 0
-      }
-    },
-    changeTemplates(e) {
-      if (e) {
-        this.formValidate.is_pack = 0
-        this.formValidate.share = 0
-      }
-    },
-    handleClose(tag) {
-      this.$emit('handleClose', tag);
-    },
-    addCoupon() {
-      this.$emit('addCoupon');
-    },
-    openLabel() {
-      this.$emit('openLabel');
-    },
-    closeLabel() {
-      this.$emit('closeLabel');
-    },
-    addLabel() {
-      this.$emit('addLabel');
-    },
-    onchangeTime(val) {
-      this.$emit('onchangeTime', val);
-    },
-    handleRemoveRecommend(index) {
-      this.$emit('handleRemoveRecommend', index);
-    },
-    changeGoods(val) {
-      this.$emit('changeGoods', val);
-    },
-  },
-};
+	export default {
+		name: 'MarketingSetting',
+		props: {
+			formValidate: {
+				type: Object,
+				required: true,
+			},
+			couponName: {
+				type: Array,
+				default: () => [],
+			},
+			dataLabel: {
+				type: Array,
+				default: () => [],
+			},
+			activity: {
+				type: Object,
+				default: () => ({}),
+			},
+		},
+		methods: {
+			changeTemplate(e) {
+				if (e) {
+					this.formValidate.is_share = 0
+				} else {
+					this.formValidate.share = 0
+				}
+			},
+			changeTemplates(e) {
+				if (e) {
+					this.formValidate.is_pack = 0
+					this.formValidate.share = 0
+				}
+			},
+			handleClose(tag) {
+				this.$emit('handleClose', tag);
+			},
+			addCoupon() {
+				this.$emit('addCoupon');
+			},
+			openLabel() {
+				this.$emit('openLabel');
+			},
+			closeLabel() {
+				this.$emit('closeLabel');
+			},
+			addLabel() {
+				this.$emit('addLabel');
+			},
+			onchangeTime(val) {
+				this.$emit('onchangeTime', val);
+			},
+			handleRemoveRecommend(index) {
+				this.$emit('handleRemoveRecommend', index);
+			},
+			changeGoods(val) {
+				this.$emit('changeGoods', val);
+			},
+		},
+	};
 </script>
 <style lang="scss" scoped>
-@use '../productAdd.scss' as *;
-</style>
+	@use '../productAdd.scss' as *;
+</style>

+ 2036 - 2104
src/pages/product/productAdd/index.vue

@@ -1,2145 +1,2077 @@
 <template>
-  <div class="" id="shopp-manager" v-loading="spinShow">
-    <pages-header
-      ref="pageHeader"
-      :title="$route.params.id ? '编辑商品' : '添加商品'"
-      :backUrl="$routeProStr + '/product/product_list'"
-    ></pages-header>
-    <el-card :bordered="false" shadow="never" class="mt16" :body-style="{ padding: '0px 20px' }">
-      <el-tabs v-model="currentTab">
-        <el-tab-pane v-for="(item, index) in headTab" :key="index" :label="item.tit" :name="item.name"></el-tab-pane>
-      </el-tabs>
-      <el-form
-        class="formValidate mt20"
-        ref="formValidate"
-        :rules="ruleValidate"
-        :model="formValidate"
-        :label-width="labelWidth"
-        :label-position="labelPosition"
-        @submit.native.prevent
-      >
-        <!-- 基础信息-->
-        <basic-info
-          v-show="currentTab === '1'"
-          :isCai="type"
-          :formValidate="formValidate"
-          :goodsType="goodsType"
-          :treeSelect="treeSelect"
-          :tileLabelList="tileLabelList"
-          :progress="progress"
-          :upload="upload"
-          :videoIng="videoIng"
-          @virtualbtn="virtualbtn"
-          @handleDragStart="handleDragStart"
-          @handleDragOver="handleDragOver"
-          @handleDragEnter="handleDragEnter"
-          @handleDragEnd="handleDragEnd"
-          @handleRemove="handleRemove"
-          @modalPicTap="modalPicTap"
-          @addVideo="addVideo"
-          @delVideo="delVideo"
-          @addCate="addCate"
-          @addGoodsTag="addGoodsTag"
-        ></basic-info>
+	<div class="" id="shopp-manager" v-loading="spinShow">
+		<pages-header ref="pageHeader" :title="$route.params.id ? '编辑商品' : '添加商品'"
+			:backUrl="$routeProStr + '/product/product_list'"></pages-header>
+		<el-card :bordered="false" shadow="never" class="mt16" :body-style="{ padding: '0px 20px' }">
+			<el-tabs v-model="currentTab">
+				<el-tab-pane v-for="(item, index) in headTab" :key="index" :label="item.tit"
+					:name="item.name"></el-tab-pane>
+			</el-tabs>
+			<el-form class="formValidate mt20" ref="formValidate" :rules="ruleValidate" :model="formValidate"
+				:label-width="labelWidth" :label-position="labelPosition" @submit.native.prevent>
+				<!-- 基础信息-->
+				<basic-info v-show="currentTab === '1'" :isCai="type" :formValidate="formValidate"
+					:goodsType="goodsType" :treeSelect="treeSelect" :tileLabelList="tileLabelList" :progress="progress"
+					:upload="upload" :videoIng="videoIng" @virtualbtn="virtualbtn" @handleDragStart="handleDragStart"
+					@handleDragOver="handleDragOver" @handleDragEnter="handleDragEnter" @handleDragEnd="handleDragEnd"
+					@handleRemove="handleRemove" @modalPicTap="modalPicTap" @addVideo="addVideo" @delVideo="delVideo"
+					@addCate="addCate" @addGoodsTag="addGoodsTag"></basic-info>
 
-        <!-- 规格库存-->
-        <spec-stock
-          ref="specStock"
-          v-show="currentTab === '2'"
-          :formValidate="formValidate"
-          :ruleList="ruleList"
-          :attrs="attrs"
-          :manyFormValidate="manyFormValidate"
-          :oneFormValidate="oneFormValidate"
-          :tableKey="tableKey"
-          :oneFormBatch="oneFormBatch"
-          :formDynamic="formDynamic"
-          :canSel="canSel"
-          @changeSpec="changeSpec"
-          @confirm="confirm"
-          @onMoveSpec="onMoveSpec"
-          @changeCurrentIndex="changeCurrentIndex"
-          @handleRemoveRole="handleRemoveRole"
-          @attrChangeValue="attrChangeValue"
-          @handleFocus="handleFocus"
-          @addPic="addPic"
-          @handleRemove2="handleRemove2"
-          @attrDetailChangeValue="attrDetailChangeValue"
-          @handleBlur="handleBlur"
-          @handleSelImg="handleSelImg"
-          @handleRemoveImg="handleRemoveImg"
-          @handleShowPop="handleShowPop"
-          @createAttr="createAttr"
-          @handleAddRole="handleAddRole"
-          @handleSaveAsTemplate="handleSaveAsTemplate"
-          @batchAdd="batchAdd"
-          @batchDel="batchDel"
-          @modalPicTap="modalPicTap"
-          @changeDefaultSelect="changeDefaultSelect"
-          @changeDefaultShow="changeDefaultShow"
-          @addGoodsCoupon="addGoodsCoupon"
-          @see="see"
-          @addVirtual="addVirtual"
-        ></spec-stock>
+				<!-- 规格库存-->
+				<spec-stock ref="specStock" v-show="currentTab === '2'" :formValidate="formValidate"
+					:ruleList="ruleList" :attrs="attrs" :manyFormValidate="manyFormValidate"
+					:oneFormValidate="oneFormValidate" :tableKey="tableKey" :oneFormBatch="oneFormBatch"
+					:formDynamic="formDynamic" :canSel="canSel" @changeSpec="changeSpec" @confirm="confirm"
+					@onMoveSpec="onMoveSpec" @changeCurrentIndex="changeCurrentIndex"
+					@handleRemoveRole="handleRemoveRole" @attrChangeValue="attrChangeValue" @handleFocus="handleFocus"
+					@addPic="addPic" @handleRemove2="handleRemove2" @attrDetailChangeValue="attrDetailChangeValue"
+					@handleBlur="handleBlur" @handleSelImg="handleSelImg" @handleRemoveImg="handleRemoveImg"
+					@handleShowPop="handleShowPop" @createAttr="createAttr" @handleAddRole="handleAddRole"
+					@handleSaveAsTemplate="handleSaveAsTemplate" @batchAdd="batchAdd" @batchDel="batchDel"
+					@modalPicTap="modalPicTap" @changeDefaultSelect="changeDefaultSelect"
+					@changeDefaultShow="changeDefaultShow" @addGoodsCoupon="addGoodsCoupon" @see="see"
+					@addVirtual="addVirtual"></spec-stock>
 
-        <!-- 商品详情-->
-        <product-detail
-          v-show="currentTab === '3'"
-          :contents="contents"
-          :content="content"
-          @getEditorContent="getEditorContent"
-        ></product-detail>
+				<!-- 商品详情-->
+				<product-detail v-show="currentTab === '3'" :contents="contents" :content="content"
+					@getEditorContent="getEditorContent"></product-detail>
 
-        <!-- 物流设置-->
-        <logistics-setting
-          v-show="headTab.length === 7 ? currentTab === '4' : false"
-          :formValidate="formValidate"
-          :templateList="templateList"
-          @logisticsBtn="logisticsBtn"
-          @addTemp="addTemp"
-        ></logistics-setting>
+				<!-- 物流设置-->
+				<logistics-setting v-show="headTab.length === 7 ? currentTab === '4' : false"
+					:formValidate="formValidate" :templateList="templateList" @logisticsBtn="logisticsBtn"
+					@addTemp="addTemp"></logistics-setting>
 
-        <!-- 会员价/佣金 -->
-        <price-commission
-          v-show="headTab.length === 7 ? currentTab === '5' : currentTab === '4'"
-          :formValidate="formValidate"
-          :oneFormValidate="oneFormValidate"
-          :manyFormValidate="manyFormValidate"
-          :columnsInstall="columnsInstall"
-          :columnsInstal2="columnsInstal2"
-          :manyBrokerage.sync="manyBrokerage"
-          :manyBrokerageTwo.sync="manyBrokerageTwo"
-          :manyVipPrice.sync="manyVipPrice"
-          :manyVipDiscount.sync="manyVipDiscount"
-          @checkAllGroupChange="checkAllGroupChange"
-          @changeVipPrice="changeVipPrice"
-          @changeDiscount="changeDiscount"
-          @brokerageSetUp="brokerageSetUp"
-        ></price-commission>
+				<!-- 会员价/佣金 -->
+				<price-commission v-show="headTab.length === 7 ? currentTab === '5' : currentTab === '4'"
+					:formValidate="formValidate" :oneFormValidate="oneFormValidate" :manyFormValidate="manyFormValidate"
+					:columnsInstall="columnsInstall" :columnsInstal2="columnsInstal2"
+					:manyBrokerage.sync="manyBrokerage" :manyBrokerageTwo.sync="manyBrokerageTwo"
+					:manyVipPrice.sync="manyVipPrice" :manyVipDiscount.sync="manyVipDiscount"
+					@checkAllGroupChange="checkAllGroupChange" @changeVipPrice="changeVipPrice"
+					@changeDiscount="changeDiscount" @brokerageSetUp="brokerageSetUp"></price-commission>
 
-        <!-- 营销设置-->
-        <marketing-setting
-          v-show="headTab.length === 7 ? currentTab === '6' : currentTab === '5'"
-          :formValidate="formValidate"
-          :couponName="couponName"
-          :dataLabel="dataLabel"
-          :activity="activity"
-          @handleClose="handleClose"
-          @addCoupon="addCoupon"
-          @openLabel="openLabel"
-          @closeLabel="closeLabel"
-          @addLabel="addLabel"
-          @onchangeTime="onchangeTime"
-          @handleRemoveRecommend="handleRemoveRecommend"
-          @changeGoods="changeGoods"
-        ></marketing-setting>
+				<!-- 营销设置-->
+				<marketing-setting v-show="headTab.length === 7 ? currentTab === '6' : currentTab === '5'"
+					:formValidate="formValidate" :couponName="couponName" :dataLabel="dataLabel" :activity="activity"
+					@handleClose="handleClose" @addCoupon="addCoupon" @openLabel="openLabel" @closeLabel="closeLabel"
+					@addLabel="addLabel" @onchangeTime="onchangeTime" @handleRemoveRecommend="handleRemoveRecommend"
+					@changeGoods="changeGoods"></marketing-setting>
 
-        <!-- 其他设置-->
-        <other-setting
-          v-show="headTab.length === 7 ? currentTab === '7' : currentTab === '6'"
-          :formValidate="formValidate"
-          :customBtn.sync="customBtn"
-          :paramsType="paramsType"
-          :paramsTypeList="paramsTypeList"
-          :protectionList="protectionList"
-          :CustomList="CustomList"
-          @modalPicTap="modalPicTap"
-          @changeParamsType="changeParamsType"
-          @deleteRow="deleteRow"
-          @handleAddParams="handleAddParams"
-          @addProtection="addProtection"
-          @customMessBtn="customMessBtn"
-          @delcustom="delcustom"
-          @addcustom="addcustom"
-        ></other-setting>
+				<!-- 其他设置-->
+				<other-setting v-show="headTab.length === 7 ? currentTab === '7' : currentTab === '6'"
+					:formValidate="formValidate" :customBtn.sync="customBtn" :paramsType="paramsType"
+					:paramsTypeList="paramsTypeList" :protectionList="protectionList" :CustomList="CustomList"
+					@modalPicTap="modalPicTap" @changeParamsType="changeParamsType" @deleteRow="deleteRow"
+					@handleAddParams="handleAddParams" @addProtection="addProtection" @customMessBtn="customMessBtn"
+					@delcustom="delcustom" @addcustom="addcustom"></other-setting>
 
-        <el-form-item>
-          <el-button v-if="currentTab !== '1'" v-db-click @click="upTab">上一步</el-button>
-          <el-button
-            class="submission"
-            v-if="currentTab !== '7' && formValidate.virtual_type == 0"
-            v-db-click
-            @click="downTab"
-            >下一步</el-button
-          >
-          <el-button
-            class="submission"
-            v-if="currentTab !== '6' && formValidate.virtual_type != 0"
-            v-db-click
-            @click="downTab"
-            >下一步</el-button
-          >
-          <el-button
-            type="primary"
-            class="submission"
-            v-db-click
-            @click="handleSubmit('formValidate')"
-            v-if="$route.params.id || currentTab !== '1'"
-            >保存</el-button
-          >
-        </el-form-item>
-      </el-form>
-      <el-dialog :visible.sync="modalPic" width="950px" scrollable title="上传商品图" :close-on-click-modal="false">
-        <uploadPictures
-          :isChoice="isChoice"
-          @getPic="getPic"
-          @getPicD="getPicD"
-          :gridBtn="gridBtn"
-          :gridPic="gridPic"
-          v-if="modalPic"
-        ></uploadPictures>
-      </el-dialog>
-      <el-dialog
-        :visible.sync="addVirtualModel"
-        width="720px"
-        title="添加卡密"
-        :show-close="true"
-        :close-on-click-modal="false"
-        @closed="initVirtualData"
-      >
-        <div class="trip"></div>
-        <div class="type-radio">
-          <el-form label-width="85px">
-            <el-form-item label="卡密类型:">
-              <el-radio-group v-model="disk_type" size="large">
-                <el-radio :label="1">固定卡密</el-radio>
-                <el-radio :label="2">一次性卡密</el-radio>
-              </el-radio-group>
-              <div v-if="disk_type == 1">
-                <div class="stock-disk">
-                  <el-input v-model="disk_info" size="large" type="textarea" :rows="4" placeholder="填写卡密信息" />
-                </div>
-                <div class="stock-input">
-                  <!-- <el-input type="number" v-model="stock" size="large" :min='0' placeholder="填写库存数量">
+				<el-form-item>
+					<el-button v-if="currentTab !== '1'" v-db-click @click="upTab">上一步</el-button>
+					<el-button class="submission" v-if="currentTab !== '7' && formValidate.virtual_type == 0" v-db-click
+						@click="downTab">下一步</el-button>
+					<el-button class="submission" v-if="currentTab !== '6' && formValidate.virtual_type != 0" v-db-click
+						@click="downTab">下一步</el-button>
+					<el-button type="primary" class="submission" v-db-click @click="handleSubmit('formValidate')"
+						v-if="$route.params.id || currentTab !== '1'">保存</el-button>
+				</el-form-item>
+			</el-form>
+			<el-dialog :visible.sync="modalPic" width="950px" scrollable title="上传商品图" :close-on-click-modal="false">
+				<uploadPictures :isChoice="isChoice" @getPic="getPic" @getPicD="getPicD" :gridBtn="gridBtn"
+					:gridPic="gridPic" v-if="modalPic"></uploadPictures>
+			</el-dialog>
+			<el-dialog :visible.sync="addVirtualModel" width="720px" title="添加卡密" :show-close="true"
+				:close-on-click-modal="false" @closed="initVirtualData">
+				<div class="trip"></div>
+				<div class="type-radio">
+					<el-form label-width="85px">
+						<el-form-item label="卡密类型:">
+							<el-radio-group v-model="disk_type" size="large">
+								<el-radio :label="1">固定卡密</el-radio>
+								<el-radio :label="2">一次性卡密</el-radio>
+							</el-radio-group>
+							<div v-if="disk_type == 1">
+								<div class="stock-disk">
+									<el-input v-model="disk_info" size="large" type="textarea" :rows="4"
+										placeholder="填写卡密信息" />
+								</div>
+								<div class="stock-input">
+									<!-- <el-input type="number" v-model="stock" size="large" :min='0' placeholder="填写库存数量">
                     <span slot="append">件</span>
                   </el-input> -->
-                  <el-input-number :controls="false" :max="100000" :min="1" :step="1" :precision="0" v-model="stock" />
-                  <span class="pl10">件</span>
-                </div>
-              </div>
-              <div class="scroll-virtual" v-if="disk_type == 2">
-                <div class="virtual-data mb10" v-for="(item, index) in virtualList" :key="index">
-                  <span class="mr10 virtual-title">卡号{{ index + 1 }}:</span>
-                  <el-input
-                    class="mr10"
-                    type="text"
-                    v-model.trim="item.key"
-                    style="width: 150px"
-                    placeholder="请输入卡号(非必填)"
-                  ></el-input>
-                  <span class="mr10 virtual-title">卡密{{ index + 1 }}:</span>
-                  <el-input
-                    class="mr10"
-                    type="text"
-                    v-model.trim="item.value"
-                    style="width: 150px"
-                    placeholder="请输入卡密"
-                  ></el-input>
-                  <span class="deteal-btn" v-db-click @click="removeVirtual(index)">删除</span>
-                </div>
-              </div>
-              <div class="add-more" v-if="disk_type == 2">
-                <el-button class="h-33" type="primary" v-db-click @click="handleAdd">新增</el-button>
-                <el-upload
-                  class="ml10"
-                  :action="cardUrl"
-                  :data="uploadData"
-                  :headers="header"
-                  :on-success="upFile"
-                  :before-upload="beforeUpload"
-                >
-                  <el-button>导入卡密</el-button>
-                </el-upload>
-              </div>
-            </el-form-item>
-          </el-form>
-        </div>
-        <span slot="footer" class="dialog-footer">
-          <el-button v-db-click @click="closeVirtual">取 消</el-button>
-          <el-button type="primary" v-db-click @click="upVirtual">确 定</el-button>
-        </span>
-      </el-dialog>
-    </el-card>
-    <freightTemplate
-      :template="template"
-      v-on:changeTemplate="changeTemplate"
-      @addSuccess="productGetTemplate"
-      ref="templates"
-    ></freightTemplate>
-    <add-attr ref="addattr" @getList="userSearchs"></add-attr>
-    <coupon-list
-      ref="couponTemplates"
-      @nameId="nameId"
-      :couponids="formValidate.coupon_ids"
-      :updateIds="updateIds"
-      :updateName="updateName"
-    ></coupon-list>
-    <coupon-list ref="goodsCoupon" many="one" :luckDraw="true" @getCouponId="goodsCouponId"></coupon-list>
-    <!-- 生成淘宝京东表单-->
-    <el-dialog
-      :visible.sync="modals"
-      @closed="cancel"
-      class="Box"
-      title="复制淘宝、天猫、京东、苏宁、1688"
-      :close-on-click-modal="false"
-      width="720px"
-    >
-      <tao-bao ref="taobaos" v-if="modals" @on-close="onClose"></tao-bao>
-    </el-dialog>
-    <el-dialog :visible.sync="goods_modals" title="商品列表" footerHide class="paymentFooter" scrollable width="1000px">
-      <goods-list v-if="goods_modals" ref="goodslist" :ischeckbox="true" @getProductId="getProductId"></goods-list>
-    </el-dialog>
-    <!-- 用户标签 -->
-    <el-dialog
-      :visible.sync="labelShow"
-      title="请选择用户标签"
-      :show-close="true"
-      width="540px"
-      :close-on-click-modal="false"
-    >
-      <userLabel ref="userLabel" @activeData="activeData" @close="labelClose"></userLabel>
-    </el-dialog>
-    <!-- 商品标签 -->
-    <el-dialog
-      :visible.sync="tagShow"
-      title="请选择商品标签"
-      :show-close="true"
-      width="540px"
-      :close-on-click-modal="false"
-    >
-      <goodsLabel
-        ref="goodsLabel"
-        :defaultLabelList="labelList"
-        @activeLabel="activeLabel"
-        @close="labelClose"
-      ></goodsLabel>
-    </el-dialog>
-  </div>
+									<el-input-number :controls="false" :max="100000" :min="1" :step="1" :precision="0"
+										v-model="stock" />
+									<span class="pl10">件</span>
+								</div>
+							</div>
+							<div class="scroll-virtual" v-if="disk_type == 2">
+								<div class="virtual-data mb10" v-for="(item, index) in virtualList" :key="index">
+									<span class="mr10 virtual-title">卡号{{ index + 1 }}:</span>
+									<el-input class="mr10" type="text" v-model.trim="item.key" style="width: 150px"
+										placeholder="请输入卡号(非必填)"></el-input>
+									<span class="mr10 virtual-title">卡密{{ index + 1 }}:</span>
+									<el-input class="mr10" type="text" v-model.trim="item.value" style="width: 150px"
+										placeholder="请输入卡密"></el-input>
+									<span class="deteal-btn" v-db-click @click="removeVirtual(index)">删除</span>
+								</div>
+							</div>
+							<div class="add-more" v-if="disk_type == 2">
+								<el-button class="h-33" type="primary" v-db-click @click="handleAdd">新增</el-button>
+								<el-upload class="ml10" :action="cardUrl" :data="uploadData" :headers="header"
+									:on-success="upFile" :before-upload="beforeUpload">
+									<el-button>导入卡密</el-button>
+								</el-upload>
+							</div>
+						</el-form-item>
+					</el-form>
+				</div>
+				<span slot="footer" class="dialog-footer">
+					<el-button v-db-click @click="closeVirtual">取 消</el-button>
+					<el-button type="primary" v-db-click @click="upVirtual">确 定</el-button>
+				</span>
+			</el-dialog>
+		</el-card>
+		<freightTemplate :template="template" v-on:changeTemplate="changeTemplate" @addSuccess="productGetTemplate"
+			ref="templates"></freightTemplate>
+		<add-attr ref="addattr" @getList="userSearchs"></add-attr>
+		<coupon-list ref="couponTemplates" @nameId="nameId" :couponids="formValidate.coupon_ids" :updateIds="updateIds"
+			:updateName="updateName"></coupon-list>
+		<coupon-list ref="goodsCoupon" many="one" :luckDraw="true" @getCouponId="goodsCouponId"></coupon-list>
+		<!-- 生成淘宝京东表单-->
+		<el-dialog :visible.sync="modals" @closed="cancel" class="Box" title="复制淘宝、天猫、京东、苏宁、1688"
+			:close-on-click-modal="false" width="720px">
+			<tao-bao ref="taobaos" v-if="modals" @on-close="onClose"></tao-bao>
+		</el-dialog>
+		<el-dialog :visible.sync="goods_modals" title="商品列表" footerHide class="paymentFooter" scrollable width="1000px">
+			<goods-list v-if="goods_modals" ref="goodslist" :ischeckbox="true"
+				@getProductId="getProductId"></goods-list>
+		</el-dialog>
+		<!-- 用户标签 -->
+		<el-dialog :visible.sync="labelShow" title="请选择用户标签" :show-close="true" width="540px"
+			:close-on-click-modal="false">
+			<userLabel ref="userLabel" @activeData="activeData" @close="labelClose"></userLabel>
+		</el-dialog>
+		<!-- 商品标签 -->
+		<el-dialog :visible.sync="tagShow" title="请选择商品标签" :show-close="true" width="540px"
+			:close-on-click-modal="false">
+			<goodsLabel ref="goodsLabel" :defaultLabelList="labelList" @activeLabel="activeLabel" @close="labelClose">
+			</goodsLabel>
+		</el-dialog>
+	</div>
 </template>
 
 <script>
-import userLabel from '@/components/labelList';
-import useLabel from '@/components/goodsLabel/useLabel';
-import goodsLabel from '@/components/goodsLabel';
-import { mapState } from 'vuex';
-import uploadPictures from '@/components/uploadPictures';
-import freightTemplate from '@/components/freightTemplate';
-import couponList from '@/components/couponList';
-import addAttr from '../productAttr/addAttr';
-import goodsList from '@/components/goodsList/index';
-import taoBao from './taoBao';
-import { userLabelAddApi } from '@/api/user';
-import {
-  productInfoApi,
-  cascaderListApi,
-  productAddApi,
-  generateAttrApi,
-  productGetRuleApi,
-  productGetTemplateApi,
-  productGetTempKeysApi,
-  checkActivityApi,
-  productCache,
-  cacheDelete,
-  uploadType,
-  importCard,
-  productCreateApi,
-  getProductTypeConfig,
-  ruleAddApi,
-  paramListApi,
-  paramInfoApi,
-  productProtectionListApi,
-  productLabelUseListApi,
-} from '@/api/product';
-import Setting from '@/setting';
-import { getCookies } from '@/libs/util';
-import { uploadByPieces } from '@/utils/upload'; //引入uploadByPieces方法
-import { isFileUpload, isVideoUpload, arraysEqual } from '@/utils';
-import checkArray from '@/libs/permission';
-import {
-  GoodsTableHead,
-  VirtualTableHead,
-  VirtualTableHead2,
-  columns2,
-  columns3,
-  CustomList,
-  RuleValidate,
-} from './defaultData.js';
-import BasicInfo from './components/BasicInfo.vue';
-import SpecStock from './components/SpecStock.vue';
-import ProductDetail from './components/ProductDetail.vue';
-import LogisticsSetting from './components/LogisticsSetting.vue';
-import PriceCommission from './components/PriceCommission.vue';
-import MarketingSetting from './components/MarketingSetting.vue';
-import OtherSetting from './components/OtherSetting.vue';
-import { formatRichText } from '@/utils/editorImg';
+	import userLabel from '@/components/labelList';
+	import useLabel from '@/components/goodsLabel/useLabel';
+	import goodsLabel from '@/components/goodsLabel';
+	import {
+		mapState
+	} from 'vuex';
+	import uploadPictures from '@/components/uploadPictures';
+	import freightTemplate from '@/components/freightTemplate';
+	import couponList from '@/components/couponList';
+	import addAttr from '../productAttr/addAttr';
+	import goodsList from '@/components/goodsList/index';
+	import taoBao from './taoBao';
+	import {
+		userLabelAddApi
+	} from '@/api/user';
+	import {
+		productInfoApi,
+		cascaderListApi,
+		productAddApi,
+		generateAttrApi,
+		productGetRuleApi,
+		productGetTemplateApi,
+		productGetTempKeysApi,
+		checkActivityApi,
+		productCache,
+		cacheDelete,
+		uploadType,
+		importCard,
+		productCreateApi,
+		getProductTypeConfig,
+		ruleAddApi,
+		paramListApi,
+		paramInfoApi,
+		productProtectionListApi,
+		productLabelUseListApi,
+	} from '@/api/product';
+	import Setting from '@/setting';
+	import {
+		getCookies
+	} from '@/libs/util';
+	import {
+		uploadByPieces
+	} from '@/utils/upload'; //引入uploadByPieces方法
+	import {
+		isFileUpload,
+		isVideoUpload,
+		arraysEqual
+	} from '@/utils';
+	import checkArray from '@/libs/permission';
+	import {
+		GoodsTableHead,
+		VirtualTableHead,
+		VirtualTableHead2,
+		columns2,
+		columns3,
+		CustomList,
+		RuleValidate,
+	} from './defaultData.js';
+	import BasicInfo from './components/BasicInfo.vue';
+	import SpecStock from './components/SpecStock.vue';
+	import ProductDetail from './components/ProductDetail.vue';
+	import LogisticsSetting from './components/LogisticsSetting.vue';
+	import PriceCommission from './components/PriceCommission.vue';
+	import MarketingSetting from './components/MarketingSetting.vue';
+	import OtherSetting from './components/OtherSetting.vue';
+	import {
+		formatRichText
+	} from '@/utils/editorImg';
 
-export default {
-  name: 'ProductAdd',
-  components: {
-    uploadPictures,
-    freightTemplate,
-    addAttr,
-    couponList,
-    taoBao,
-    goodsList,
-    userLabel,
-    goodsLabel,
-    useLabel,
-    BasicInfo,
-    SpecStock,
-    ProductDetail,
-    LogisticsSetting,
-    PriceCommission,
-    MarketingSetting,
-    OtherSetting,
-  },
-  data() {
-    return {
-      labelShow: false,
-      tagShow: false,
-      dataLabel: [],
-      headTab: [
-        { tit: '基础信息', name: '1' },
-        { tit: '规格库存', name: '2' },
-        { tit: '商品详情', name: '3' },
-        { tit: '物流设置', name: '4' },
-        { tit: '会员价/佣金', name: '5' },
-        { tit: '营销设置', name: '6' },
-        { tit: '其他设置', name: '7' },
-      ],
-      virtual: [
-        { tit: '普通商品', id: 0, tit2: '物流发货' },
-        { tit: '卡密/网盘', id: 1, tit2: '自动发货' },
-        { tit: '优惠券', id: 2, tit2: '自动发货' },
-        { tit: '虚拟商品', id: 3, tit2: '虚拟发货' },
-      ],
-      seletVideo: 0, //选择视频类型
-      customBtn: 0, //自定义留言开关
-      content: '',
-      contents: '',
-      fileUrl: Setting.apiBaseURL + '/file/upload',
-      fileUrl2: Setting.apiBaseURL + '/file/video_upload',
-      cardUrl: Setting.apiBaseURL + '/file/upload/1',
-      upload_type: '', //视频上传类型 1 本地上传 2 3 4 OSS上传
-      uploadData: {}, // 上传参数
-      header: {},
-      type: 0,
-      modals: false,
-      goods_modals: false,
-      spinShow: false,
-      openSubimit: false,
-      virtualList: [
-        {
-          key: '',
-          value: '',
-        },
-      ],
-      // 批量设置表格data
-      oneFormBatch: [
-        {
-          pic: '',
-          price: void 0,
-          cost: void 0,
-          ot_price: void 0,
-          stock: void 0,
-          bar_code: '',
-          bar_code_number: '',
-          weight: void 0,
-          volume: void 0,
-          virtual_list: [],
-        },
-      ],
+	export default {
+		name: 'ProductAdd',
+		components: {
+			uploadPictures,
+			freightTemplate,
+			addAttr,
+			couponList,
+			taoBao,
+			goodsList,
+			userLabel,
+			goodsLabel,
+			useLabel,
+			BasicInfo,
+			SpecStock,
+			ProductDetail,
+			LogisticsSetting,
+			PriceCommission,
+			MarketingSetting,
+			OtherSetting,
+		},
+		data() {
+			return {
+				labelShow: false,
+				tagShow: false,
+				dataLabel: [],
+				headTab: [{
+						tit: '基础信息',
+						name: '1'
+					},
+					{
+						tit: '规格库存',
+						name: '2'
+					},
+					{
+						tit: '商品详情',
+						name: '3'
+					},
+					{
+						tit: '物流设置',
+						name: '4'
+					},
+					{
+						tit: '会员价/佣金',
+						name: '5'
+					},
+					{
+						tit: '营销设置',
+						name: '6'
+					},
+					{
+						tit: '其他设置',
+						name: '7'
+					},
+				],
+				virtual: [{
+						tit: '普通商品',
+						id: 0,
+						tit2: '物流发货'
+					},
+					{
+						tit: '卡密/网盘',
+						id: 1,
+						tit2: '自动发货'
+					},
+					{
+						tit: '优惠券',
+						id: 2,
+						tit2: '自动发货'
+					},
+					{
+						tit: '虚拟商品',
+						id: 3,
+						tit2: '虚拟发货'
+					},
+				],
+				seletVideo: 0, //选择视频类型
+				customBtn: 0, //自定义留言开关
+				content: '',
+				contents: '',
+				fileUrl: Setting.apiBaseURL + '/file/upload',
+				fileUrl2: Setting.apiBaseURL + '/file/video_upload',
+				cardUrl: Setting.apiBaseURL + '/file/upload/1',
+				upload_type: '', //视频上传类型 1 本地上传 2 3 4 OSS上传
+				uploadData: {}, // 上传参数
+				header: {},
+				type: 0,
+				modals: false,
+				goods_modals: false,
+				spinShow: false,
+				openSubimit: false,
+				virtualList: [{
+					key: '',
+					value: '',
+				}, ],
+				// 批量设置表格data
+				oneFormBatch: [{
+					pic: '',
+					price: void 0,
+					cost: void 0,
+					ot_price: void 0,
+					stock: void 0,
+					bar_code: '',
+					bar_code_number: '',
+					weight: void 0,
+					volume: void 0,
+					virtual_list: [],
+				}, ],
 
-      // 规格数据
-      formDynamic: {
-        attrsName: '',
-        attrsVal: '',
-      },
-      disk_type: 1, //卡密类型
-      tabIndex: 0,
-      tabName: '',
-      formDynamicNameData: [],
-      isBtn: false,
-      columns2: columns2,
-      columns3: columns3,
-      columns: [],
-      columnsInstall: [],
-      columnsInstal2: [],
-      gridPic: {
-        xl: 6,
-        lg: 8,
-        md: 12,
-        sm: 12,
-        xs: 12,
-      },
-      gridBtn: {
-        xl: 4,
-        lg: 8,
-        md: 8,
-        sm: 8,
-        xs: 8,
-      },
-      //自定义留言下拉选择
-      CustomList: CustomList,
-      //自定义留言内容
-      currentIndex: 0,
+				// 规格数据
+				formDynamic: {
+					attrsName: '',
+					attrsVal: '',
+				},
+				disk_type: 1, //卡密类型
+				tabIndex: 0,
+				tabName: '',
+				formDynamicNameData: [],
+				isBtn: false,
+				columns2: columns2,
+				columns3: columns3,
+				columns: [],
+				columnsInstall: [],
+				columnsInstal2: [],
+				gridPic: {
+					xl: 6,
+					lg: 8,
+					md: 12,
+					sm: 12,
+					xs: 12,
+				},
+				gridBtn: {
+					xl: 4,
+					lg: 8,
+					md: 8,
+					sm: 8,
+					xs: 8,
+				},
+				//自定义留言下拉选择
+				CustomList: CustomList,
+				//自定义留言内容
+				currentIndex: 0,
 
-      formValidate: {
-        pv: 0,
-        is_share: 0,//是否复购
-        share: 0,
-        is_pack: 0,//是否报单
-        disk_info: '', //卡密类型
-        logistics: ['1'], //选择物流方式
-        freight: 2, //运费设置
-        postage: 0, //设置运费金额
-        recommend: [], //商品推荐
-        presale_day: 1, //预售发货时间-结束
-        presale: false, //预售商品开关
-        is_limit: false,
-        limit_type: 0,
-        limit_num: 0,
-        vip_product: false, //付费会员专属开关
-        custom_form: [], //自定义留言
-        store_name: '',
-        cate_id: [],
-        label_id: [],
-        keyword: '',
-        unit_name: '',
-        store_info: '',
-        image: '',
-        recommend_image: '',
-        slider_image: [],
-        description: '',
-        ficti: 0,
-        give_integral: 0,
-        sort: 0,
-        is_show: 1,
-        is_gift: 0, // 开启送礼品
-        gift_price: 0,
-        is_hot: 0,
-        is_benefit: 0,
-        is_best: 0,
-        is_new: 0,
-        is_good: 0,
-        is_postage: 0,
-        is_sub: [],
-        recommend_list: [],
-        params_list: [], //商品参数
-        virtual_type: 0,
-        // is_sub: 0,
-        id: 0,
-        spec_type: 0,
-        is_virtual: 0,
-        video_link: '',
-        // postage: 0,
-        temp_id: '',
-        attrs: [],
-        items: [
-          {
-            pic: '',
-            price: 0,
-            cost: 0,
-            ot_price: 0,
-            stock: 0,
-            bar_code: '',
-            bar_code_number: '',
-          },
-        ],
-        activity: ['默认', '秒杀', '砍价', '拼团'],
-        couponName: [],
-        header: [],
-        selectRule: '',
-        coupon_ids: [],
-        command_word: '',
-        min_qty: 1,
-        label_list: [],
-        protection_list: [],
-      },
-      ruleList: [],
-      templateList: [],
-      createBnt: true,
-      showIput: false,
-      manyFormValidate: [],
-      // 单规格表格data
-      oneFormValidate: [
-        {
-          pic: '',
-          price: 0,
-          cost: 0,
-          ot_price: 0,
-          stock: 0,
-          bar_code: '',
-          bar_code_number: '',
-          weight: 0,
-          volume: 0,
-          brokerage: 0,
-          brokerage_two: 0,
-          vip_price: 0,
-          virtual_list: [],
-          coupon_id: 0,
-        },
-      ],
-      images: [],
-      imagesTable: '',
-      currentTab: '1',
-      isChoice: '',
-      loading: false,
-      modalPic: false,
-      addVirtualModel: false,
-      template: false,
-      uploadList: [],
-      treeSelect: [],
-      picTit: '',
-      tableIndex: 0,
-      ruleValidate: RuleValidate,
-      manyBrokerage: undefined,
-      manyBrokerageTwo: undefined,
-      manyVipPrice: undefined,
-      manyVipDiscount: undefined,
-      upload: {
-        videoIng: false, // 是否显示进度条;
-      },
-      videoIng: false, // 是否显示进度条;
-      progress: 0, // 进度条默认0
-      stock: 0,
-      disk_info: '',
-      videoLink: '',
-      attrs: [],
-      activity: { 默认: 'red', 秒杀: 'blue', 砍价: 'green', 拼团: 'yellow' },
-      couponName: [],
-      updateIds: [],
-      updateName: [],
-      couponIds: '',
-      couponNames: [],
-      rakeBack: [
-        {
-          title: '一级返佣(元)',
-          slot: 'brokerage',
-          align: 'center',
-          width: 95,
-        },
-        {
-          title: '二级返佣(元)',
-          slot: 'brokerage_two',
-          align: 'center',
-          width: 95,
-        },
-      ],
-      member: [
-        {
-          title: '会员价',
-          slot: 'vip_price',
-          align: 'center',
-          width: 95,
-        },
-        {
-          title: '会员折扣',
-          slot: 'vip_proportion',
-          align: 'center',
-          width: 95,
-        },
-      ],
-      columnsInstalM: [],
-      moveIndex: '',
-      addValue: '',
-      visible: false,
-      typeConfig: [],
-      goodsType: [],
-      paramsTypeList: [],
-      paramsType: null,
-      canSel: true, // 规格图片添加判断
-      changeAttrValue: '', //修改的规格值
-      tableKey: 0,
-      protectionList: [], // 服务保障
-      labelList: [],
-      tileLabelList: [],
-    };
-  },
-  computed: {
-    ...mapState('media', ['isMobile']),
-    labelWidth() {
-      return this.isMobile ? undefined : '120px';
-    },
-    labelPosition() {
-      return this.isMobile ? 'top' : 'right';
-    },
-    labelBottom() {
-      return this.isMobile ? undefined : '15px';
-    },
-  },
-  watch: {
-    typeConfig(val) {
-      if (val.length) {
-        // 对virtual中的id等于val中的id的
-        this.goodsType = this.virtual.filter((item) => {
-          return val.includes(item.id + '');
-        });
-      } else {
-        this.goodsType = this.virtual;
-      }
-    },
-  },
-  beforeRouteUpdate(to, from, next) {
-    this.bus.$emit('onTagsViewRefreshRouterView', this.$route.path);
-    next();
-  },
-  created() {
-    this.columns = this.columns2.slice(0, 8);
-    this.getToken();
-  },
-  async mounted() {
-    if (this.$route.params.id !== '0' && this.$route.params.id) {
-      await this.getInfo();
-    } else if (this.$route.params.id === '0') {
-      this.getProductCache();
-    } else {
-      this.getproductLabelUseListApi();
-    }
-    if (this.$route.query.type) {
-      this.modals = true;
-      this.type = this.$route.query.type;
-    } else {
-      this.type = 0;
-    }
-    this.goodsCategory();
-    this.productGetRule();
-    this.productGetTemplate();
-    this.paramsGetTemplate();
-    this.uploadType();
-    this.productConfig();
-    this.watchActivity();
-    this.getProtectionList();
-  },
-  methods: {
-    getProductCache() {
-      productCache()
-        .then((res) => {
-          let data = res.data.info;
-          this.getproductLabelUseListApi();
+				formValidate: {
+					min_level: 0,
+					pv: 0,
+					is_share: 0, //是否复购
+					share: 0,
+					is_pack: 0, //是否报单
+					disk_info: '', //卡密类型
+					logistics: ['1'], //选择物流方式
+					freight: 2, //运费设置
+					postage: 0, //设置运费金额
+					recommend: [], //商品推荐
+					presale_day: 1, //预售发货时间-结束
+					presale: false, //预售商品开关
+					is_limit: false,
+					limit_type: 0,
+					limit_num: 0,
+					vip_product: false, //付费会员专属开关
+					custom_form: [], //自定义留言
+					store_name: '',
+					cate_id: [],
+					label_id: [],
+					keyword: '',
+					unit_name: '',
+					store_info: '',
+					image: '',
+					recommend_image: '',
+					slider_image: [],
+					description: '',
+					ficti: 0,
+					give_integral: 0,
+					sort: 0,
+					is_show: 1,
+					is_gift: 0, // 开启送礼品
+					gift_price: 0,
+					is_hot: 0,
+					is_benefit: 0,
+					is_best: 0,
+					is_new: 0,
+					is_good: 0,
+					is_postage: 0,
+					is_sub: [],
+					recommend_list: [],
+					params_list: [], //商品参数
+					virtual_type: 0,
+					// is_sub: 0,
+					id: 0,
+					spec_type: 0,
+					is_virtual: 0,
+					video_link: '',
+					// postage: 0,
+					temp_id: '',
+					attrs: [],
+					items: [{
+						pic: '',
+						price: 0,
+						cost: 0,
+						ot_price: 0,
+						stock: 0,
+						bar_code: '',
+						bar_code_number: '',
+					}, ],
+					activity: ['默认', '秒杀', '砍价', '拼团'],
+					couponName: [],
+					header: [],
+					selectRule: '',
+					coupon_ids: [],
+					command_word: '',
+					min_qty: 1,
+					label_list: [],
+					protection_list: [],
+				},
+				ruleList: [],
+				templateList: [],
+				createBnt: true,
+				showIput: false,
+				manyFormValidate: [],
+				// 单规格表格data
+				oneFormValidate: [{
+					pic: '',
+					price: 0,
+					cost: 0,
+					ot_price: 0,
+					stock: 0,
+					bar_code: '',
+					bar_code_number: '',
+					weight: 0,
+					volume: 0,
+					brokerage: 0,
+					brokerage_two: 0,
+					vip_price: 0,
+					virtual_list: [],
+					coupon_id: 0,
+				}, ],
+				images: [],
+				imagesTable: '',
+				currentTab: '1',
+				isChoice: '',
+				loading: false,
+				modalPic: false,
+				addVirtualModel: false,
+				template: false,
+				uploadList: [],
+				treeSelect: [],
+				picTit: '',
+				tableIndex: 0,
+				ruleValidate: RuleValidate,
+				manyBrokerage: undefined,
+				manyBrokerageTwo: undefined,
+				manyVipPrice: undefined,
+				manyVipDiscount: undefined,
+				upload: {
+					videoIng: false, // 是否显示进度条;
+				},
+				videoIng: false, // 是否显示进度条;
+				progress: 0, // 进度条默认0
+				stock: 0,
+				disk_info: '',
+				videoLink: '',
+				attrs: [],
+				activity: {
+					默认: 'red',
+					秒杀: 'blue',
+					砍价: 'green',
+					拼团: 'yellow'
+				},
+				couponName: [],
+				updateIds: [],
+				updateName: [],
+				couponIds: '',
+				couponNames: [],
+				rakeBack: [{
+						title: '一级返佣(元)',
+						slot: 'brokerage',
+						align: 'center',
+						width: 95,
+					},
+					{
+						title: '二级返佣(元)',
+						slot: 'brokerage_two',
+						align: 'center',
+						width: 95,
+					},
+				],
+				member: [{
+						title: '会员价',
+						slot: 'vip_price',
+						align: 'center',
+						width: 95,
+					},
+					{
+						title: '会员折扣',
+						slot: 'vip_proportion',
+						align: 'center',
+						width: 95,
+					},
+				],
+				columnsInstalM: [],
+				moveIndex: '',
+				addValue: '',
+				visible: false,
+				typeConfig: [],
+				goodsType: [],
+				paramsTypeList: [],
+				paramsType: null,
+				canSel: true, // 规格图片添加判断
+				changeAttrValue: '', //修改的规格值
+				tableKey: 0,
+				protectionList: [], // 服务保障
+				labelList: [],
+				tileLabelList: [],
+			};
+		},
+		computed: {
+			...mapState('media', ['isMobile']),
+			labelWidth() {
+				return this.isMobile ? undefined : '120px';
+			},
+			labelPosition() {
+				return this.isMobile ? 'top' : 'right';
+			},
+			labelBottom() {
+				return this.isMobile ? undefined : '15px';
+			},
+		},
+		watch: {
+			typeConfig(val) {
+				if (val.length) {
+					// 对virtual中的id等于val中的id的
+					this.goodsType = this.virtual.filter((item) => {
+						return val.includes(item.id + '');
+					});
+				} else {
+					this.goodsType = this.virtual;
+				}
+			},
+		},
+		beforeRouteUpdate(to, from, next) {
+			this.bus.$emit('onTagsViewRefreshRouterView', this.$route.path);
+			next();
+		},
+		created() {
+			this.columns = this.columns2.slice(0, 8);
+			this.getToken();
+		},
+		async mounted() {
+			if (this.$route.params.id !== '0' && this.$route.params.id) {
+				await this.getInfo();
+			} else if (this.$route.params.id === '0') {
+				this.getProductCache();
+			} else {
+				this.getproductLabelUseListApi();
+			}
+			if (this.$route.query.type) {
+				this.modals = true;
+				this.type = this.$route.query.type;
+			} else {
+				this.type = 0;
+			}
+			this.goodsCategory();
+			this.productGetRule();
+			this.productGetTemplate();
+			this.paramsGetTemplate();
+			this.uploadType();
+			this.productConfig();
+			this.watchActivity();
+			this.getProtectionList();
+		},
+		methods: {
+			getProductCache() {
+				productCache()
+					.then((res) => {
+						let data = res.data.info;
+						this.getproductLabelUseListApi();
 
-          if (!Array.isArray(data)) {
-            let cate_id = data.cate_id.map(Number);
-            let label_id = data.label_id.map(Number);
-            this.attrs = data.items || [];
-            let ids = [];
-            if (data.coupons) {
-              data.coupons.map((item) => {
-                ids.push(item.id);
-              });
-              this.couponName = data.coupons;
-            }
+						if (!Array.isArray(data)) {
+							let cate_id = data.cate_id.map(Number);
+							let label_id = data.label_id.map(Number);
+							this.attrs = data.items || [];
+							let ids = [];
+							if (data.coupons) {
+								data.coupons.map((item) => {
+									ids.push(item.id);
+								});
+								this.couponName = data.coupons;
+							}
 
-            this.formValidate = data;
-            this.dataLabel = data.label_id;
-            this.formValidate.coupon_ids = ids;
-            this.updateIds = ids;
-            this.updateName = data.coupons;
-            this.formValidate.cate_id = cate_id;
-            this.oneFormValidate = data.attrs;
-            this.generateHeader(this.attrs);
-            this.formValidate.logistics = data.logistics || ['1'];
-            this.formValidate.header = [];
-            this.manyFormValidate = data.attrs;
-            this.spec_type = data.spec_type;
-            this.formValidate.is_virtual = data.is_virtual;
-            this.formValidate.custom_form = data.custom_form || [];
-            if (this.formValidate.custom_form.length != 0) {
-              this.customBtn = 1;
-            }
-            this.attrs.map((item) => {
-              if (item.add_pic) this.canSel = false;
-            });
-            this.virtualbtn(data.virtual_type, 1);
-            if (data.spec_type === 0) {
-              this.manyFormValidate = [];
-            } else {
-              this.createBnt = true;
-              this.oneFormValidate = [
-                {
-                  pic: data.image,
-                  price: 0,
-                  cost: 0,
-                  ot_price: 0,
-                  stock: 0,
-                  bar_code: '',
-                  bar_code_number: '',
-                  weight: 0,
-                  volume: 0,
-                  brokerage: 0,
-                  brokerage_two: 0,
-                  vip_price: 0,
-                  virtual_list: [],
-                  coupon_id: 0,
-                },
-              ];
-            }
-            this.watchActivity();
-            this.spinShow = false;
-          }
-        })
-        .catch((err) => {
-          this.$message.error(err.msg);
-        });
-    },
-    getProtectionList() {
-      productProtectionListApi({ page: 0, limit: 0, status: 1 }).then((res) => {
-        this.protectionList = res.data.list;
-      });
-    },
-    getproductLabelUseListApi() {
-      productLabelUseListApi().then((res) => {
-        // 合并数组中所有的list
-        this.tileLabelList = res.data.flatMap((item) => item.list);
-        let labelList = res.data;
-        if (this.formValidate.label_list.length) {
-          this.formValidate.label_list.map((el) => {
-            labelList.map((re) => {
-              re.list.map((label) => {
-                if (label.id === el) {
-                  label.active = true;
-                } else {
-                  label.active = false;
-                }
-              });
-            });
-          });
-        } else {
-          labelList.map((el) => {
-            el.list.map((label) => {
-              label.active = false;
-            });
-          });
-        }
-        this.labelList = labelList;
-      });
-    },
-    addProtection() {
-      this.$router.push({ path: this.$routeProStr + '/product/protection/list' });
-    },
-    productConfig() {
-      getProductTypeConfig().then((res) => {
-        this.typeConfig = res.data;
-      });
-    },
-    beforeUpload(file) {
-      return isFileUpload(file);
-    },
-    // 分片上传
-    videoSaveToUrl(file) {
-      if (isVideoUpload(file)) {
-        uploadByPieces({
-          file: file, // 视频实体
-          pieceSize: 3, // 分片大小
-          success: (data) => {
-            this.formValidate.video_link = data.file_path;
-            this.progress = 100;
-          },
-          error: (e) => {
-            this.$message.error(e.msg);
-          },
-          uploading: (chunk, allChunk) => {
-            this.videoIng = true;
-            let st = Math.floor((chunk / allChunk) * 100);
-            this.progress = st;
-          },
-        });
-      }
-      return false;
-    },
-    // 类型选择/填入内容判断
-    virtualbtn(index, type) {
-      if (type != 1) {
-        if (this.$route.params.id) return this.$message.error('编辑商品不支持切换商品类型');
-        this.formValidate.is_sub = [];
-        let id = this.$route.params.id;
-        if (id) {
-          checkActivityApi(id)
-            .then((res) => {})
-            .catch((res) => {
-              this.formValidate.spec_type = this.spec_type;
-              this.$message.error(res.msg);
-            });
-        } else {
-          if (this.formValidate.spec_type == 1) {
-            this.generate(1);
-          }
-        }
-      }
-      // 定义基础商品和虚拟商品的标签页配置
-      const baseHeadTabs = [
-        { tit: '基础信息', name: '1' },
-        { tit: '规格库存', name: '2' },
-        { tit: '商品详情', name: '3' },
-        { tit: '物流设置', name: '4' },
-        { tit: '会员价/佣金', name: '5' },
-        { tit: '营销设置', name: '6' },
-        { tit: '其他设置', name: '7' },
-      ];
-      const virtualHeadTabs = [
-        { tit: '基础信息', name: '1' },
-        { tit: '规格库存', name: '2' },
-        { tit: '商品详情', name: '3' },
-        { tit: '会员价/佣金', name: '4' },
-        { tit: '营销设置', name: '5' },
-        { tit: '其他设置', name: '6' },
-      ];
+							this.formValidate = data;
+							this.dataLabel = data.label_id;
+							this.formValidate.coupon_ids = ids;
+							this.updateIds = ids;
+							this.updateName = data.coupons;
+							this.formValidate.cate_id = cate_id;
+							this.oneFormValidate = data.attrs;
+							this.generateHeader(this.attrs);
+							this.formValidate.logistics = data.logistics || ['1'];
+							this.formValidate.header = [];
+							this.manyFormValidate = data.attrs;
+							this.spec_type = data.spec_type;
+							this.formValidate.is_virtual = data.is_virtual;
+							this.formValidate.custom_form = data.custom_form || [];
+							if (this.formValidate.custom_form.length != 0) {
+								this.customBtn = 1;
+							}
+							this.attrs.map((item) => {
+								if (item.add_pic) this.canSel = false;
+							});
+							this.virtualbtn(data.virtual_type, 1);
+							if (data.spec_type === 0) {
+								this.manyFormValidate = [];
+							} else {
+								this.createBnt = true;
+								this.oneFormValidate = [{
+									pic: data.image,
+									price: 0,
+									cost: 0,
+									ot_price: 0,
+									stock: 0,
+									bar_code: '',
+									bar_code_number: '',
+									weight: 0,
+									volume: 0,
+									brokerage: 0,
+									brokerage_two: 0,
+									vip_price: 0,
+									virtual_list: [],
+									coupon_id: 0,
+								}, ];
+							}
+							this.watchActivity();
+							this.spinShow = false;
+						}
+					})
+					.catch((err) => {
+						this.$message.error(err.msg);
+					});
+			},
+			getProtectionList() {
+				productProtectionListApi({
+					page: 0,
+					limit: 0,
+					status: 1
+				}).then((res) => {
+					this.protectionList = res.data.list;
+				});
+			},
+			getproductLabelUseListApi() {
+				productLabelUseListApi().then((res) => {
+					// 合并数组中所有的list
+					this.tileLabelList = res.data.flatMap((item) => item.list);
+					let labelList = res.data;
+					if (this.formValidate.label_list.length) {
+						this.formValidate.label_list.map((el) => {
+							labelList.map((re) => {
+								re.list.map((label) => {
+									if (label.id === el) {
+										label.active = true;
+									} else {
+										label.active = false;
+									}
+								});
+							});
+						});
+					} else {
+						labelList.map((el) => {
+							el.list.map((label) => {
+								label.active = false;
+							});
+						});
+					}
+					this.labelList = labelList;
+				});
+			},
+			addProtection() {
+				this.$router.push({
+					path: this.$routeProStr + '/product/protection/list'
+				});
+			},
+			productConfig() {
+				getProductTypeConfig().then((res) => {
+					this.typeConfig = res.data;
+				});
+			},
+			beforeUpload(file) {
+				return isFileUpload(file);
+			},
+			// 分片上传
+			videoSaveToUrl(file) {
+				if (isVideoUpload(file)) {
+					uploadByPieces({
+						file: file, // 视频实体
+						pieceSize: 3, // 分片大小
+						success: (data) => {
+							this.formValidate.video_link = data.file_path;
+							this.progress = 100;
+						},
+						error: (e) => {
+							this.$message.error(e.msg);
+						},
+						uploading: (chunk, allChunk) => {
+							this.videoIng = true;
+							let st = Math.floor((chunk / allChunk) * 100);
+							this.progress = st;
+						},
+					});
+				}
+				return false;
+			},
+			// 类型选择/填入内容判断
+			virtualbtn(index, type) {
+				if (type != 1) {
+					if (this.$route.params.id) return this.$message.error('编辑商品不支持切换商品类型');
+					this.formValidate.is_sub = [];
+					let id = this.$route.params.id;
+					if (id) {
+						checkActivityApi(id)
+							.then((res) => {})
+							.catch((res) => {
+								this.formValidate.spec_type = this.spec_type;
+								this.$message.error(res.msg);
+							});
+					} else {
+						if (this.formValidate.spec_type == 1) {
+							this.generate(1);
+						}
+					}
+				}
+				// 定义基础商品和虚拟商品的标签页配置
+				const baseHeadTabs = [{
+						tit: '基础信息',
+						name: '1'
+					},
+					{
+						tit: '规格库存',
+						name: '2'
+					},
+					{
+						tit: '商品详情',
+						name: '3'
+					},
+					{
+						tit: '物流设置',
+						name: '4'
+					},
+					{
+						tit: '会员价/佣金',
+						name: '5'
+					},
+					{
+						tit: '营销设置',
+						name: '6'
+					},
+					{
+						tit: '其他设置',
+						name: '7'
+					},
+				];
+				const virtualHeadTabs = [{
+						tit: '基础信息',
+						name: '1'
+					},
+					{
+						tit: '规格库存',
+						name: '2'
+					},
+					{
+						tit: '商品详情',
+						name: '3'
+					},
+					{
+						tit: '会员价/佣金',
+						name: '4'
+					},
+					{
+						tit: '营销设置',
+						name: '5'
+					},
+					{
+						tit: '其他设置',
+						name: '6'
+					},
+				];
 
-      switch (index) {
-        case 0: // 普通商品
-          this.formValidate.virtual_type = 0;
-          this.formValidate.is_virtual = 0;
-          this.headTab = baseHeadTabs;
-          break;
+				switch (index) {
+					case 0: // 普通商品
+						this.formValidate.virtual_type = 0;
+						this.formValidate.is_virtual = 0;
+						this.headTab = baseHeadTabs;
+						break;
 
-        case 1: // 卡密/网盘商品
-          this.formValidate.virtual_type = 1;
-          this.formValidate.postage = 0;
-          this.formValidate.is_virtual = 1;
-          this.headTab = virtualHeadTabs;
-          break;
+					case 1: // 卡密/网盘商品
+						this.formValidate.virtual_type = 1;
+						this.formValidate.postage = 0;
+						this.formValidate.is_virtual = 1;
+						this.headTab = virtualHeadTabs;
+						break;
 
-        case 2: // 优惠券商品
-          this.formValidate.virtual_type = 2;
-          this.formValidate.is_virtual = 1;
-          this.headTab = virtualHeadTabs;
-          break;
+					case 2: // 优惠券商品
+						this.formValidate.virtual_type = 2;
+						this.formValidate.is_virtual = 1;
+						this.headTab = virtualHeadTabs;
+						break;
 
-        case 3: // 虚拟商品
-          this.formValidate.virtual_type = 3;
-          this.formValidate.is_virtual = 1;
-          this.headTab = virtualHeadTabs;
-          break;
-      }
-    },
-    // 新增分类
-    addCate() {
-      this.$modalForm(productCreateApi()).then(() => this.goodsCategory());
-    },
-    // 物流方式选择
-    logisticsBtn(e) {
-      this.formValidate.logistics = e;
-    },
-    // 新增标签
-    addLabel() {
-      this.$modalForm(userLabelAddApi(0)).then(() => this.userLabel());
-    },
-    // 选择标签
-    addGoodsTag() {
-      this.tagShow = true;
-    },
-    // 自定义留言 开启关闭
-    customMessBtn(e) {
-      if (!e) {
-        this.formValidate.custom_form = [];
-      }
-      this.customBtn = e;
-    },
-    // 自定义留言 新增表单
-    addcustom() {
-      if (this.formValidate.custom_form.length > 9) {
-        this.$message.warning('最多添加10条');
-      } else {
-        this.formValidate.custom_form.push({
-          title: '',
-          label: 'text',
-          value: '',
-          status: false,
-        });
-      }
-    },
-    // 删除
-    delcustom(index) {
-      this.formValidate.custom_form.splice(index, 1);
-    },
-    // 预售具体日期
-    onchangeTime(e) {
-      this.formValidate.presale_time = e;
-    },
-    // 商品详情
-    getEditorContent(data) {
-      this.content = data;
-    },
-    cancel() {
-      this.modals = false;
-    },
-    // 上传头部token
-    getToken() {
-      this.header['Authori-zation'] = 'Bearer ' + getCookies('token');
-    },
-    // 导入卡密
-    upFile(res) {
-      importCard({ file: res.data.src }).then((res) => {
-        this.virtualList = this.virtualList.concat(res.data);
-      });
-    },
-    //获取视频上传类型
-    uploadType() {
-      uploadType().then((res) => {
-        this.upload_type = res.data.upload_type;
-      });
-    },
-    // 初始化数据展示
-    infoData(data, isCopy) {
-      let cate_id = data.cate_id.map(Number);
-      let label_id = data.label_id.map(Number);
-      this.attrs = data.items || [];
-      let ids = [];
-      data.coupons.map((item) => {
-        ids.push(item.id);
-      });
-      this.formValidate = data;
-      this.seletVideo = data.seletVideo;
-      this.contents = data.description;
-      this.couponName = data.coupons;
-      this.formValidate.coupon_ids = ids;
-      this.updateIds = ids;
-      this.dataLabel = data.label_id;
-      this.updateName = data.coupons;
-      this.virtualbtn(data.virtual_type, 1);
-      this.formValidate.logistics = data.logistics || ['1'];
-      this.formValidate.custom_form = data.custom_form || [];
-      if (this.formValidate.custom_form.length != 0) {
-        this.customBtn = 1;
-      }
-      this.formValidate.cate_id = cate_id;
-      if (data.attr) {
-        this.oneFormValidate = [data.attr];
-        this.oneFormValidate[0].vip_proportion = (
-          (this.oneFormValidate[0].vip_price / this.oneFormValidate[0].price) *
-          100
-        ).toFixed(2);
-      }
-      this.getproductLabelUseListApi();
+					case 3: // 虚拟商品
+						this.formValidate.virtual_type = 3;
+						this.formValidate.is_virtual = 1;
+						this.headTab = virtualHeadTabs;
+						break;
+				}
+			},
+			// 新增分类
+			addCate() {
+				this.$modalForm(productCreateApi()).then(() => this.goodsCategory());
+			},
+			// 物流方式选择
+			logisticsBtn(e) {
+				this.formValidate.logistics = e;
+			},
+			// 新增标签
+			addLabel() {
+				this.$modalForm(userLabelAddApi(0)).then(() => this.userLabel());
+			},
+			// 选择标签
+			addGoodsTag() {
+				this.tagShow = true;
+			},
+			// 自定义留言 开启关闭
+			customMessBtn(e) {
+				if (!e) {
+					this.formValidate.custom_form = [];
+				}
+				this.customBtn = e;
+			},
+			// 自定义留言 新增表单
+			addcustom() {
+				if (this.formValidate.custom_form.length > 9) {
+					this.$message.warning('最多添加10条');
+				} else {
+					this.formValidate.custom_form.push({
+						title: '',
+						label: 'text',
+						value: '',
+						status: false,
+					});
+				}
+			},
+			// 删除
+			delcustom(index) {
+				this.formValidate.custom_form.splice(index, 1);
+			},
+			// 预售具体日期
+			onchangeTime(e) {
+				this.formValidate.presale_time = e;
+			},
+			// 商品详情
+			getEditorContent(data) {
+				this.content = data;
+			},
+			cancel() {
+				this.modals = false;
+			},
+			// 上传头部token
+			getToken() {
+				this.header['Authori-zation'] = 'Bearer ' + getCookies('token');
+			},
+			// 导入卡密
+			upFile(res) {
+				importCard({
+					file: res.data.src
+				}).then((res) => {
+					this.virtualList = this.virtualList.concat(res.data);
+				});
+			},
+			//获取视频上传类型
+			uploadType() {
+				uploadType().then((res) => {
+					this.upload_type = res.data.upload_type;
+				});
+			},
+			// 初始化数据展示
+			infoData(data, isCopy) {
+				let cate_id = data.cate_id.map(Number);
+				let label_id = data.label_id.map(Number);
+				this.attrs = data.items || [];
+				let ids = [];
+				data.coupons.map((item) => {
+					ids.push(item.id);
+				});
+				this.formValidate = data;
+				this.seletVideo = data.seletVideo;
+				this.contents = data.description;
+				this.couponName = data.coupons;
+				this.formValidate.coupon_ids = ids;
+				this.updateIds = ids;
+				this.dataLabel = data.label_id;
+				this.updateName = data.coupons;
+				this.virtualbtn(data.virtual_type, 1);
+				this.formValidate.logistics = data.logistics || ['1'];
+				this.formValidate.custom_form = data.custom_form || [];
+				if (this.formValidate.custom_form.length != 0) {
+					this.customBtn = 1;
+				}
+				this.formValidate.cate_id = cate_id;
+				if (data.attr) {
+					this.oneFormValidate = [data.attr];
+					this.oneFormValidate[0].vip_proportion = (
+						(this.oneFormValidate[0].vip_price / this.oneFormValidate[0].price) *
+						100
+					).toFixed(2);
+				}
+				this.getproductLabelUseListApi();
 
-      this.formValidate.header = [];
-      this.spec_type = data.spec_type;
-      this.formValidate.spec_type = this.spec_type;
-      this.formValidate.is_virtual = data.is_virtual;
-      this.attrs.map((item) => {
-        if (item.add_pic) this.canSel = false;
-      });
-      if (data.spec_type === 0) {
-        this.manyFormValidate = [];
-      } else {
-        this.createBnt = true;
-        this.oneFormValidate = [
-          {
-            pic: '',
-            price: 0,
-            cost: 0,
-            ot_price: 0,
-            stock: 0,
-            bar_code: '',
-            bar_code_number: '',
-            weight: 0,
-            volume: 0,
-            brokerage: 0,
-            brokerage_two: 0,
-            vip_price: 0,
-            virtual_list: [],
-            coupon_id: 0,
-          },
-        ];
+				this.formValidate.header = [];
+				this.spec_type = data.spec_type;
+				this.formValidate.spec_type = this.spec_type;
+				this.formValidate.is_virtual = data.is_virtual;
+				this.attrs.map((item) => {
+					if (item.add_pic) this.canSel = false;
+				});
+				if (data.spec_type === 0) {
+					this.manyFormValidate = [];
+				} else {
+					this.createBnt = true;
+					this.oneFormValidate = [{
+						pic: '',
+						price: 0,
+						cost: 0,
+						ot_price: 0,
+						stock: 0,
+						bar_code: '',
+						bar_code_number: '',
+						weight: 0,
+						volume: 0,
+						brokerage: 0,
+						brokerage_two: 0,
+						vip_price: 0,
+						virtual_list: [],
+						coupon_id: 0,
+					}, ];
 
-        this.generateHeader(this.attrs);
-        this.manyFormValidate = [...this.oneFormBatch, ...data.attrs];
-      }
+					this.generateHeader(this.attrs);
+					this.manyFormValidate = [...this.oneFormBatch, ...data.attrs];
+				}
 
-      setTimeout((e) => {
-        this.checkAllGroup(data.is_sub);
-      }, 1000);
-      this.watchActivity();
-    },
-    //关闭淘宝弹窗并生成数据;
-    onClose(data) {
-      this.modals = false;
-      this.infoData(data, 1);
-    },
+				setTimeout((e) => {
+					this.checkAllGroup(data.is_sub);
+				}, 1000);
+				this.watchActivity();
+			},
+			//关闭淘宝弹窗并生成数据;
+			onClose(data) {
+				this.modals = false;
+				this.infoData(data, 1);
+			},
 
-    checkMove(evt) {
-      this.moveIndex = evt.draggedContext.index;
-    },
-    end() {
-      this.moveIndex = '';
-      this.generate(1);
-    },
-    // 单独设置会员设置
-    checkAllGroupChange(data) {
-      this.checkAllGroup(data);
-    },
-    checkAllGroup(data) {
-      let endLength = this.attrs.length + 3;
-      if (this.formValidate.spec_type === 0) {
-        if (data.length === 2) {
-          this.columnsInstall = this.columns2.slice(0, endLength).concat(this.rakeBack).concat(this.member);
-        } else if (data.indexOf(0) > -1) {
-          this.columnsInstall = this.columns2.slice(0, endLength).concat(this.member);
-        } else if (data.indexOf(1) > -1) {
-          this.columnsInstall = this.columns2.slice(0, endLength).concat(this.rakeBack);
-        } else {
-          this.columnsInstall = this.columns2.slice(0, endLength);
-        }
-      } else {
-        if (data.length === 2) {
-          this.columnsInstal2 = this.columnsInstalM
-            .slice(0, endLength + 1)
-            .concat(this.rakeBack)
-            .concat(this.member);
-        } else if (data.indexOf(0) > -1) {
-          this.columnsInstal2 = this.columnsInstalM.slice(0, endLength).concat(this.member);
-        } else if (data.indexOf(1) > -1) {
-          this.columnsInstal2 = this.columnsInstalM.slice(0, endLength).concat(this.rakeBack);
-        } else {
-          this.columnsInstal2 = this.columnsInstalM.slice(0, endLength);
-        }
-      }
-    },
-    // 添加优惠券
-    addCoupon() {
-      this.$refs.couponTemplates.isTemplate = true;
-      this.$refs.couponTemplates.tableList();
-    },
-    // 规格中优惠券查看
-    see(data, name, index) {
-      this.tabName = name;
-      this.tabIndex = index;
+			checkMove(evt) {
+				this.moveIndex = evt.draggedContext.index;
+			},
+			end() {
+				this.moveIndex = '';
+				this.generate(1);
+			},
+			// 单独设置会员设置
+			checkAllGroupChange(data) {
+				this.checkAllGroup(data);
+			},
+			checkAllGroup(data) {
+				let endLength = this.attrs.length + 3;
+				if (this.formValidate.spec_type === 0) {
+					if (data.length === 2) {
+						this.columnsInstall = this.columns2.slice(0, endLength).concat(this.rakeBack).concat(this.member);
+					} else if (data.indexOf(0) > -1) {
+						this.columnsInstall = this.columns2.slice(0, endLength).concat(this.member);
+					} else if (data.indexOf(1) > -1) {
+						this.columnsInstall = this.columns2.slice(0, endLength).concat(this.rakeBack);
+					} else {
+						this.columnsInstall = this.columns2.slice(0, endLength);
+					}
+				} else {
+					if (data.length === 2) {
+						this.columnsInstal2 = this.columnsInstalM
+							.slice(0, endLength + 1)
+							.concat(this.rakeBack)
+							.concat(this.member);
+					} else if (data.indexOf(0) > -1) {
+						this.columnsInstal2 = this.columnsInstalM.slice(0, endLength).concat(this.member);
+					} else if (data.indexOf(1) > -1) {
+						this.columnsInstal2 = this.columnsInstalM.slice(0, endLength).concat(this.rakeBack);
+					} else {
+						this.columnsInstal2 = this.columnsInstalM.slice(0, endLength);
+					}
+				}
+			},
+			// 添加优惠券
+			addCoupon() {
+				this.$refs.couponTemplates.isTemplate = true;
+				this.$refs.couponTemplates.tableList();
+			},
+			// 规格中优惠券查看
+			see(data, name, index) {
+				this.tabName = name;
+				this.tabIndex = index;
 
-      if (this.formValidate.virtual_type === 1) {
-        if (data.disk_info != '') {
-          this.disk_type = 1;
-          this.disk_info = data.disk_info;
-          this.stock = data.stock;
-        } else if (data.virtual_list.length) {
-          this.disk_type = 2;
-          this.virtualList = data.virtual_list;
-        }
-        this.addVirtualModel = true;
-      } else {
-        this.$refs.goodsCoupon.isTemplate = true;
-        this.$refs.goodsCoupon.tableList(3);
-      }
-    },
-    // 修改分佣比例
-    changeDiscount(index, type = 'manyFormValidate') {
-      // 根据分佣比例 vip_proportion 修改会员价 保留2位小数
-      this[type][index].vip_price = (this[type][index].price * (this[type][index].vip_proportion / 100)).toFixed(2);
-    },
-    // 修改会员价
-    changeVipPrice(index, type = 'manyFormValidate') {
-      // 根据会员价计算出分佣比例
-      this[type][index].vip_proportion = ((this[type][index].vip_price / this[type][index].price) * 100).toFixed(2);
-    },
-    // 添加优惠券
-    addGoodsCoupon(index, name) {
-      this.tabIndex = index;
-      this.tabName = name;
-      this.$refs.goodsCoupon.isTemplate = true;
-      this.$refs.goodsCoupon.tableList(3);
-    },
-    addVirtual(index, name) {
-      this.tabIndex = index;
-      this.tabName = name;
-      this.addVirtualModel = true;
-    },
-    // 提交卡密信息
-    upVirtual() {
-      if (this.disk_type == 2) {
-        for (let i = 0; i < this.virtualList.length; i++) {
-          const element = this.virtualList[i];
-          if (!element.value) {
-            this.$message.error('请输入所有卡密');
-            return;
-          }
-        }
-        this.$set(this[this.tabName][this.tabIndex], 'virtual_list', this.virtualList);
-        this.$set(this[this.tabName][this.tabIndex], 'stock', this.virtualList.length);
-        this.virtualList = [
-          {
-            key: '',
-            value: '',
-          },
-        ];
-        this.$set(this[this.tabName][this.tabIndex], 'disk_info', '');
-      } else {
-        if (!this.disk_info.length) {
-          return this.$message.error('请填写卡密信息');
-        }
-        if (!this.stock) {
-          return this.$message.error('请填写库存数量');
-        }
-        this.$set(this[this.tabName][this.tabIndex], 'stock', Number(this.stock));
-        this.$set(this[this.tabName][this.tabIndex], 'stock', Number(this.stock));
-        this.$set(this[this.tabName][this.tabIndex], 'disk_info', this.disk_info);
-        this.$set(this[this.tabName][this.tabIndex], 'virtual_list', []);
-      }
-      this.addVirtualModel = false;
-      this.closeVirtual();
-    },
-    //  初始化卡密数据信息
-    closeVirtual() {
-      this.addVirtualModel = false;
-      this.virtualList = [
-        {
-          key: '',
-          value: '',
-        },
-      ];
-      this.disk_info = '';
-      this.stock = 0;
-    },
-    //对象数组去重;
-    uniqueArray(arr) {
-      const seen = {};
-      return arr.filter((item) => {
-        const key = JSON.stringify(item); // 使用 JSON.stringify 生成唯一键
-        if (seen[key]) {
-          return false;
-        } else {
-          seen[key] = true;
-          return true;
-        }
-      });
-    },
-    // 获取优惠券id数据
-    nameId(id, names) {
-      this.formValidate.coupon_ids = id;
-      this.couponName = this.uniqueArray(names);
-    },
-    // 获取优惠券信息
-    goodsCouponId(data) {
-      this.$set(this[this.tabName][this.tabIndex], 'coupon_id', data.id);
-      this.$set(this[this.tabName][this.tabIndex], 'coupon_name', data.title);
-      this.$refs.goodsCoupon.isTemplate = false;
-    },
-    handleClose(name) {
-      let index = this.couponName.indexOf(name);
-      this.couponName.splice(index, 1);
-      let couponIds = this.formValidate.coupon_ids;
-      couponIds.splice(index, 1);
-      this.updateIds = couponIds;
-      this.updateName = this.couponName;
-    },
-    // 添加运费模板
-    addTemp() {
-      this.$refs.templates.isTemplate = true;
-    },
-    addVideo() {
-      this.$videoModal((e) => {
-        this.formValidate.video_link = e;
-      });
-    },
-    // 删除视频;
-    delVideo() {
-      this.$set(this.formValidate, 'video_link', '');
-      this.$set(this, 'progress', 0);
-      this.videoIng = false;
-      this.upload.videoIng = false;
-    },
-    zh_uploadFile() {
-      if (this.seletVideo == 1) {
-        this.formValidate.video_link = this.videoLink;
-      } else {
-        this.$refs.refid.click();
-      }
-    },
-    // 上传视频
-    zh_uploadFile_change(evfile) {
-      let suffix = evfile.target.files[0].name.substr(evfile.target.files[0].name.indexOf('.'));
-      if (suffix.indexOf('.mp4') === -1) {
-        return this.$message.error('只能上传MP4文件');
-      }
-      let types = {
-        key: evfile.target.files[0].name,
-        contentType: evfile.target.files[0].type,
-      };
-      productGetTempKeysApi(types)
-        .then((res) => {
-          this.$videoCloud
-            .videoUpload({
-              type: res.data.type,
-              evfile: evfile,
-              res: res,
-              uploading(status, progress) {
-                this.upload.videoIng = status;
-                if (res.status == 200) {
-                  this.progress = 100;
-                }
-              },
-            })
-            .then((res) => {
-              this.formValidate.video_link = res.url;
-              this.$message.success('视频上传成功');
-              this.upload.videoIng = false;
-            })
-            .catch((res) => {
-              this.$message.error(res);
-            });
-        })
-        .catch((res) => {
-          this.$message.error(res.msg);
-        });
-    },
-    // 上一页;
-    upTab() {
-      this.currentTab = (Number(this.currentTab) - 1).toString();
-    },
-    // 下一页;
-    downTab() {
-      this.currentTab = (Number(this.currentTab) + 1).toString();
-    },
-    // 属性弹窗回调函数;
-    userSearchs() {
-      this.productGetRule();
-    },
-    // 添加规则;
-    addRule() {
-      this.$refs.addattr.modal = true;
-    },
-    // 批量设置分佣;
-    brokerageSetUp() {
-      if (this.formValidate.is_sub.indexOf(1) > -1) {
-        if (this.manyBrokerage <= 0 || this.manyBrokerageTwo <= 0) {
-          return this.$message.error('请填写返佣金额后进行批量添加');
-        }
-      } else if (this.formValidate.is_sub.indexOf(0) > -1) {
-        if (this.manyVipPrice <= 0) {
-          return this.$message.error('请填写会员价后进行批量添加');
-        }
-      }
-      if (this.formValidate.is_sub.length === 2) {
-        if (this.manyBrokerage <= 0 || this.manyBrokerageTwo <= 0) {
-          return this.$message.error('请填写完金额后进行批量添加');
-        }
-        if (this.manyVipPrice > 0 && this.manyVipDiscount > 0) {
-          return this.$message.error('会员价和会员折扣只能二选一添加');
-        }
-      }
-      for (let val of this.manyFormValidate) {
-        this.manyBrokerage != undefined && this.$set(val, 'brokerage', this.manyBrokerage);
-        this.manyBrokerageTwo != undefined && this.$set(val, 'brokerage_two', this.manyBrokerageTwo);
-        if (this.manyVipPrice != undefined) {
-          this.$set(val, 'vip_price', this.manyVipPrice);
-          this.$set(val, 'vip_proportion', ((val.vip_price / val.price) * 100).toFixed(2));
-        } else {
-          this.$set(val, 'vip_proportion', this.manyVipDiscount);
-          this.$set(val, 'vip_price', (val.price * (this.manyVipDiscount / 100)).toFixed(2));
-        }
-      }
-    },
-    // 批量设置会员价
-    vipPriceSetUp() {
-      if (this.manyVipPrice <= 0) {
-        return this.$message.error('请填写会员价在进行批量添加');
-      } else {
-        for (let val of this.manyFormValidate) {
-          this.$set(val, 'vip_price', this.manyVipPrice);
-        }
-      }
-    },
-    // 新增卡密
-    handleAdd() {
-      this.virtualList.push({
-        key: '',
-        value: '',
-      });
-    },
-    // 初始化卡密信息
-    initVirtualData(status) {
-      this.virtualList = [
-        {
-          key: '',
-          value: '',
-        },
-      ];
-    },
-    removeVirtual(index) {
-      this.virtualList.splice(index, 1);
-    },
-    // 清空批量规格信息
-    batchDel() {
-      this.oneFormBatch = [
-        {
-          pic: '',
-          price: void 0,
-          cost: void 0,
-          ot_price: void 0,
-          stock: void 0,
-          bar_code: '',
-          bar_code_number: '',
-          weight: void 0,
-          volume: void 0,
-          virtual_list: [],
-        },
-      ];
-    },
-    confirm(name) {
-      this.createBnt = true;
-      this.formValidate.selectRule = name;
-      this.attrs = [];
-      if (this.formValidate.selectRule.trim().length <= 0) {
-        return this.$message.error('请选择属性');
-      }
-      this.ruleList.forEach((item, index) => {
-        if (item.rule_name === this.formValidate.selectRule) {
-          this.attrs = [...item.rule_value];
-        }
-      });
-      this.canSel = true;
-      this.generateAttr(this.attrs);
-    },
-    // 选择规格模板
-    handleCommand(e) {},
-    // 获取商品属性模板;
-    productGetRule() {
-      productGetRuleApi().then((res) => {
-        this.ruleList = res.data;
-      });
-    },
-    // 获取运费模板;
-    productGetTemplate() {
-      productGetTemplateApi().then((res) => {
-        this.templateList = res.data;
-      });
-    },
-    paramsGetTemplate() {
-      paramListApi().then((res) => {
-        this.paramsTypeList = res.data.list;
-      });
-    },
-    changeParamsType(e) {
-      e ? this.getParams(e) : (this.formValidate.params_list = []);
-    },
-    getParams(id) {
-      paramInfoApi(id).then((res) => {
-        this.formValidate.params_list = res.data.value;
-      });
-    },
-    isSubset(arr1, arr2) {
-      // 将数组转换为 Set,以便进行高效的包含检查
-      const set1 = new Set(arr1);
-      const set2 = new Set(arr2);
+				if (this.formValidate.virtual_type === 1) {
+					if (data.disk_info != '') {
+						this.disk_type = 1;
+						this.disk_info = data.disk_info;
+						this.stock = data.stock;
+					} else if (data.virtual_list.length) {
+						this.disk_type = 2;
+						this.virtualList = data.virtual_list;
+					}
+					this.addVirtualModel = true;
+				} else {
+					this.$refs.goodsCoupon.isTemplate = true;
+					this.$refs.goodsCoupon.tableList(3);
+				}
+			},
+			// 修改分佣比例
+			changeDiscount(index, type = 'manyFormValidate') {
+				// 根据分佣比例 vip_proportion 修改会员价 保留2位小数
+				this[type][index].vip_price = (this[type][index].price * (this[type][index].vip_proportion / 100)).toFixed(
+					2);
+			},
+			// 修改会员价
+			changeVipPrice(index, type = 'manyFormValidate') {
+				// 根据会员价计算出分佣比例
+				this[type][index].vip_proportion = ((this[type][index].vip_price / this[type][index].price) * 100).toFixed(
+					2);
+			},
+			// 添加优惠券
+			addGoodsCoupon(index, name) {
+				this.tabIndex = index;
+				this.tabName = name;
+				this.$refs.goodsCoupon.isTemplate = true;
+				this.$refs.goodsCoupon.tableList(3);
+			},
+			addVirtual(index, name) {
+				this.tabIndex = index;
+				this.tabName = name;
+				this.addVirtualModel = true;
+			},
+			// 提交卡密信息
+			upVirtual() {
+				if (this.disk_type == 2) {
+					for (let i = 0; i < this.virtualList.length; i++) {
+						const element = this.virtualList[i];
+						if (!element.value) {
+							this.$message.error('请输入所有卡密');
+							return;
+						}
+					}
+					this.$set(this[this.tabName][this.tabIndex], 'virtual_list', this.virtualList);
+					this.$set(this[this.tabName][this.tabIndex], 'stock', this.virtualList.length);
+					this.virtualList = [{
+						key: '',
+						value: '',
+					}, ];
+					this.$set(this[this.tabName][this.tabIndex], 'disk_info', '');
+				} else {
+					if (!this.disk_info.length) {
+						return this.$message.error('请填写卡密信息');
+					}
+					if (!this.stock) {
+						return this.$message.error('请填写库存数量');
+					}
+					this.$set(this[this.tabName][this.tabIndex], 'stock', Number(this.stock));
+					this.$set(this[this.tabName][this.tabIndex], 'stock', Number(this.stock));
+					this.$set(this[this.tabName][this.tabIndex], 'disk_info', this.disk_info);
+					this.$set(this[this.tabName][this.tabIndex], 'virtual_list', []);
+				}
+				this.addVirtualModel = false;
+				this.closeVirtual();
+			},
+			//  初始化卡密数据信息
+			closeVirtual() {
+				this.addVirtualModel = false;
+				this.virtualList = [{
+					key: '',
+					value: '',
+				}, ];
+				this.disk_info = '';
+				this.stock = 0;
+			},
+			//对象数组去重;
+			uniqueArray(arr) {
+				const seen = {};
+				return arr.filter((item) => {
+					const key = JSON.stringify(item); // 使用 JSON.stringify 生成唯一键
+					if (seen[key]) {
+						return false;
+					} else {
+						seen[key] = true;
+						return true;
+					}
+				});
+			},
+			// 获取优惠券id数据
+			nameId(id, names) {
+				this.formValidate.coupon_ids = id;
+				this.couponName = this.uniqueArray(names);
+			},
+			// 获取优惠券信息
+			goodsCouponId(data) {
+				this.$set(this[this.tabName][this.tabIndex], 'coupon_id', data.id);
+				this.$set(this[this.tabName][this.tabIndex], 'coupon_name', data.title);
+				this.$refs.goodsCoupon.isTemplate = false;
+			},
+			handleClose(name) {
+				let index = this.couponName.indexOf(name);
+				this.couponName.splice(index, 1);
+				let couponIds = this.formValidate.coupon_ids;
+				couponIds.splice(index, 1);
+				this.updateIds = couponIds;
+				this.updateName = this.couponName;
+			},
+			// 添加运费模板
+			addTemp() {
+				this.$refs.templates.isTemplate = true;
+			},
+			addVideo() {
+				this.$videoModal((e) => {
+					this.formValidate.video_link = e;
+				});
+			},
+			// 删除视频;
+			delVideo() {
+				this.$set(this.formValidate, 'video_link', '');
+				this.$set(this, 'progress', 0);
+				this.videoIng = false;
+				this.upload.videoIng = false;
+			},
+			zh_uploadFile() {
+				if (this.seletVideo == 1) {
+					this.formValidate.video_link = this.videoLink;
+				} else {
+					this.$refs.refid.click();
+				}
+			},
+			// 上传视频
+			zh_uploadFile_change(evfile) {
+				let suffix = evfile.target.files[0].name.substr(evfile.target.files[0].name.indexOf('.'));
+				if (suffix.indexOf('.mp4') === -1) {
+					return this.$message.error('只能上传MP4文件');
+				}
+				let types = {
+					key: evfile.target.files[0].name,
+					contentType: evfile.target.files[0].type,
+				};
+				productGetTempKeysApi(types)
+					.then((res) => {
+						this.$videoCloud
+							.videoUpload({
+								type: res.data.type,
+								evfile: evfile,
+								res: res,
+								uploading(status, progress) {
+									this.upload.videoIng = status;
+									if (res.status == 200) {
+										this.progress = 100;
+									}
+								},
+							})
+							.then((res) => {
+								this.formValidate.video_link = res.url;
+								this.$message.success('视频上传成功');
+								this.upload.videoIng = false;
+							})
+							.catch((res) => {
+								this.$message.error(res);
+							});
+					})
+					.catch((res) => {
+						this.$message.error(res.msg);
+					});
+			},
+			// 上一页;
+			upTab() {
+				this.currentTab = (Number(this.currentTab) - 1).toString();
+			},
+			// 下一页;
+			downTab() {
+				this.currentTab = (Number(this.currentTab) + 1).toString();
+			},
+			// 属性弹窗回调函数;
+			userSearchs() {
+				this.productGetRule();
+			},
+			// 添加规则;
+			addRule() {
+				this.$refs.addattr.modal = true;
+			},
+			// 批量设置分佣;
+			brokerageSetUp() {
+				if (this.formValidate.is_sub.indexOf(1) > -1) {
+					if (this.manyBrokerage <= 0 || this.manyBrokerageTwo <= 0) {
+						return this.$message.error('请填写返佣金额后进行批量添加');
+					}
+				} else if (this.formValidate.is_sub.indexOf(0) > -1) {
+					if (this.manyVipPrice <= 0) {
+						return this.$message.error('请填写会员价后进行批量添加');
+					}
+				}
+				if (this.formValidate.is_sub.length === 2) {
+					if (this.manyBrokerage <= 0 || this.manyBrokerageTwo <= 0) {
+						return this.$message.error('请填写完金额后进行批量添加');
+					}
+					if (this.manyVipPrice > 0 && this.manyVipDiscount > 0) {
+						return this.$message.error('会员价和会员折扣只能二选一添加');
+					}
+				}
+				for (let val of this.manyFormValidate) {
+					this.manyBrokerage != undefined && this.$set(val, 'brokerage', this.manyBrokerage);
+					this.manyBrokerageTwo != undefined && this.$set(val, 'brokerage_two', this.manyBrokerageTwo);
+					if (this.manyVipPrice != undefined) {
+						this.$set(val, 'vip_price', this.manyVipPrice);
+						this.$set(val, 'vip_proportion', ((val.vip_price / val.price) * 100).toFixed(2));
+					} else {
+						this.$set(val, 'vip_proportion', this.manyVipDiscount);
+						this.$set(val, 'vip_price', (val.price * (this.manyVipDiscount / 100)).toFixed(2));
+					}
+				}
+			},
+			// 批量设置会员价
+			vipPriceSetUp() {
+				if (this.manyVipPrice <= 0) {
+					return this.$message.error('请填写会员价在进行批量添加');
+				} else {
+					for (let val of this.manyFormValidate) {
+						this.$set(val, 'vip_price', this.manyVipPrice);
+					}
+				}
+			},
+			// 新增卡密
+			handleAdd() {
+				this.virtualList.push({
+					key: '',
+					value: '',
+				});
+			},
+			// 初始化卡密信息
+			initVirtualData(status) {
+				this.virtualList = [{
+					key: '',
+					value: '',
+				}, ];
+			},
+			removeVirtual(index) {
+				this.virtualList.splice(index, 1);
+			},
+			// 清空批量规格信息
+			batchDel() {
+				this.oneFormBatch = [{
+					pic: '',
+					price: void 0,
+					cost: void 0,
+					ot_price: void 0,
+					stock: void 0,
+					bar_code: '',
+					bar_code_number: '',
+					weight: void 0,
+					volume: void 0,
+					virtual_list: [],
+				}, ];
+			},
+			confirm(name) {
+				this.createBnt = true;
+				this.formValidate.selectRule = name;
+				this.attrs = [];
+				if (this.formValidate.selectRule.trim().length <= 0) {
+					return this.$message.error('请选择属性');
+				}
+				this.ruleList.forEach((item, index) => {
+					if (item.rule_name === this.formValidate.selectRule) {
+						this.attrs = [...item.rule_value];
+					}
+				});
+				this.canSel = true;
+				this.generateAttr(this.attrs);
+			},
+			// 选择规格模板
+			handleCommand(e) {},
+			// 获取商品属性模板;
+			productGetRule() {
+				productGetRuleApi().then((res) => {
+					this.ruleList = res.data;
+				});
+			},
+			// 获取运费模板;
+			productGetTemplate() {
+				productGetTemplateApi().then((res) => {
+					this.templateList = res.data;
+				});
+			},
+			paramsGetTemplate() {
+				paramListApi().then((res) => {
+					this.paramsTypeList = res.data.list;
+				});
+			},
+			changeParamsType(e) {
+				e ? this.getParams(e) : (this.formValidate.params_list = []);
+			},
+			getParams(id) {
+				paramInfoApi(id).then((res) => {
+					this.formValidate.params_list = res.data.value;
+				});
+			},
+			isSubset(arr1, arr2) {
+				// 将数组转换为 Set,以便进行高效的包含检查
+				const set1 = new Set(arr1);
+				const set2 = new Set(arr2);
 
-      // 检查 set2 中的每个元素是否都在 set1 中
-      for (let elem of set2) {
-        if (!set1.has(elem)) {
-          return false;
-        }
-      }
-      return true;
-    },
-    // 批量添加
-    batchAdd() {
-      let arr = [];
-      for (let val of this.attrs) {
-        if (this.oneFormBatch[0][val.value]) {
-          arr.push(this.oneFormBatch[0][val.value]);
-        }
-      }
+				// 检查 set2 中的每个元素是否都在 set1 中
+				for (let elem of set2) {
+					if (!set1.has(elem)) {
+						return false;
+					}
+				}
+				return true;
+			},
+			// 批量添加
+			batchAdd() {
+				let arr = [];
+				for (let val of this.attrs) {
+					if (this.oneFormBatch[0][val.value]) {
+						arr.push(this.oneFormBatch[0][val.value]);
+					}
+				}
 
-      // 批量设置商品规格属性
-      const batchFields = [
-        'pic',
-        'price',
-        'cost',
-        'ot_price',
-        'stock',
-        'weight',
-        'volume',
-        'bar_code',
-        'bar_code_number',
-      ];
-      // const defaultFields = ['bar_code', 'bar_code_number'];
+				// 批量设置商品规格属性
+				const batchFields = [
+					'pic',
+					'price',
+					'cost',
+					'ot_price',
+					'stock',
+					'weight',
+					'volume',
+					'bar_code',
+					'bar_code_number',
+				];
+				// const defaultFields = ['bar_code', 'bar_code_number'];
 
-      for (let val of this.manyFormValidate) {
-        const batch = this.oneFormBatch[0];
-        // 如果存在筛选条件且满足条件,或无筛选条件时
-        if (!arr.length || this.isSubset(val.attr_arr, arr)) {
-          // 设置有值的批量字段
-          batchFields.forEach((field) => {
-            if (batch[field] && batch[field] !== undefined) {
-              if (field === 'pic' && batch[field]) {
-                this.$set(val, field, batch[field]);
-              } else if (field != 'pic') {
-                this.$set(val, field, batch[field]);
-              }
-            }
-          });
+				for (let val of this.manyFormValidate) {
+					const batch = this.oneFormBatch[0];
+					// 如果存在筛选条件且满足条件,或无筛选条件时
+					if (!arr.length || this.isSubset(val.attr_arr, arr)) {
+						// 设置有值的批量字段
+						batchFields.forEach((field) => {
+							if (batch[field] && batch[field] !== undefined) {
+								if (field === 'pic' && batch[field]) {
+									this.$set(val, field, batch[field]);
+								} else if (field != 'pic') {
+									this.$set(val, field, batch[field]);
+								}
+							}
+						});
 
-          // 设置默认字段
-          // defaultFields.forEach((field) => {
-          //   this.$set(val, field, batch[field]);
-          // });
-        }
-      }
-    },
-    changeSpecImg(arr, img) {
-      // 判断是否存在规格图
-      let isHas = false;
-      for (let i = 1; i < this.manyFormValidate.length; i++) {
-        let item = this.manyFormValidate[i];
-        if (item.pic && this.isSubset(item.attr_arr, arr)) {
-          isHas = true;
-          break;
-        }
-      }
-      if (isHas) {
-        this.$confirm('可以同步修改下方该规格图片,确定要替换吗?', '提示', {
-          confirmButtonText: '替换',
-          cancelButtonText: '暂不',
-          type: 'warning',
-        })
-          .then(() => {
-            for (let val of this.manyFormValidate) {
-              if (this.isSubset(val.attr_arr, arr)) {
-                this.$set(val, 'pic', img);
-              }
-            }
-          })
-          .catch(() => {});
-      } else {
-        for (let val of this.manyFormValidate) {
-          if (this.isSubset(val.attr_arr, arr)) {
-            this.$set(val, 'pic', img);
-          }
-        }
-      }
-    },
-    // 立即生成
-    generate(type, isCopy, arr) {
-      this.manyFormValidate = [];
-      this.formValidate.header = [];
-    },
-    clearAttr() {
-      this.formDynamic.attrsName = '';
-      this.formDynamic.attrsVal = '';
-    },
+						// 设置默认字段
+						// defaultFields.forEach((field) => {
+						//   this.$set(val, field, batch[field]);
+						// });
+					}
+				}
+			},
+			changeSpecImg(arr, img) {
+				// 判断是否存在规格图
+				let isHas = false;
+				for (let i = 1; i < this.manyFormValidate.length; i++) {
+					let item = this.manyFormValidate[i];
+					if (item.pic && this.isSubset(item.attr_arr, arr)) {
+						isHas = true;
+						break;
+					}
+				}
+				if (isHas) {
+					this.$confirm('可以同步修改下方该规格图片,确定要替换吗?', '提示', {
+							confirmButtonText: '替换',
+							cancelButtonText: '暂不',
+							type: 'warning',
+						})
+						.then(() => {
+							for (let val of this.manyFormValidate) {
+								if (this.isSubset(val.attr_arr, arr)) {
+									this.$set(val, 'pic', img);
+								}
+							}
+						})
+						.catch(() => {});
+				} else {
+					for (let val of this.manyFormValidate) {
+						if (this.isSubset(val.attr_arr, arr)) {
+							this.$set(val, 'pic', img);
+						}
+					}
+				}
+			},
+			// 立即生成
+			generate(type, isCopy, arr) {
+				this.manyFormValidate = [];
+				this.formValidate.header = [];
+			},
+			clearAttr() {
+				this.formDynamic.attrsName = '';
+				this.formDynamic.attrsVal = '';
+			},
 
-    // 删除规格
-    handleRemoveRole(index) {
-      this.attrs.splice(index, 1);
-      this.manyFormValidate.splice(index, 1);
-      if (!this.attrs.length) {
-        this.formValidate.header = [];
-        this.manyFormValidate = [];
-      } else {
-        this.generateAttr(this.attrs);
-      }
-    },
-    // 删除表格中 对应属性
-    delAttrTable(val) {
-      for (let i = 0; i < this.manyFormValidate.length; i++) {
-        let item = this.manyFormValidate[i];
-        if (item.attr_arr && item.attr_arr.includes(val)) {
-          this.manyFormValidate.splice(i, 1);
-          i--;
-        }
-      }
-    },
-    // 删除属性
-    handleRemove2(item, index, val) {
-      // 删除 manyFormValidate中 title = item.value 的属性值
-      item.splice(index, 1);
-      // this.generateAttr(this.attrs);
-      this.delAttrTable(val);
-    },
-    // 新增规格
-    handleAddRole() {
-      let data = {
-        value: this.formDynamic.attrsName,
-        add_pic: 0,
-        detail: [],
-      };
-      this.attrs.push(data);
-    },
-    handleAddParams() {
-      let data = {
-        name: '',
-        value: '',
-      };
-      this.formValidate.params_list.push(data);
-    },
-    handleSaveAsTemplate() {
-      this.$prompt('', '请输入模板名称', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-      })
-        .then(({ value }) => {
-          let spec = this.attrs.map((item) => {
-            return {
-              value: item.value,
-              detail: item.detail.map((e) => e.value),
-            };
-          });
-          let formDynamic = {
-            rule_name: value,
-            spec: spec,
-          };
-          ruleAddApi(formDynamic, 0)
-            .then((res) => {
-              this.$message.success(res.msg);
-              this.productGetRule();
-            })
-            .catch((res) => {
-              this.$message.error(res.msg);
-            });
-        })
-        .catch(() => {});
-    },
-    // 新增一条属性
-    addOneAttr(val, val2) {
-      this.generateAttr(this.attrs, val2);
-    },
-    handleFocus(val) {
-      this.changeAttrValue = val;
-    },
-    handleBlur() {
-      this.changeAttrValue = '';
-    },
-    handleSelImg(item) {
-      this.$imgModal((e) => {
-        item.pic = e.att_dir;
-        this.changeSpecImg([item.value], e.att_dir);
-      });
-    },
-    handleRemoveImg(item) {
-      item.pic = '';
-    },
-    // 规格名称改变
-    attrChangeValue(i, val) {
-      if (val.trim().length && this.attrs[i].detail.length) {
-        this.generateHeader(this.attrs);
-        if (this.manyFormValidate.length) {
-          this.manyFormValidate.map((item, i) => {
-            if (i > 0) {
-              if (Object.keys(item.detail).includes(this.changeAttrValue)) {
-                item.detail[val] = item.detail[this.changeAttrValue];
-                item[val] = item[this.changeAttrValue];
-                delete item.detail[this.changeAttrValue];
-                delete item[this.changeAttrValue];
-              }
-            }
-          });
-          this.changeAttrValue = val;
-        }
-      } else {
-        this.generateAttr(this.attrs);
-      }
-    },
-    // 规格值改变
-    attrDetailChangeValue(val, i) {
-      if (this.manyFormValidate.length) {
-        let key = this.attrs[i].value;
-        this.manyFormValidate.map((item, i) => {
-          if (i > 0) {
-            if (Object.keys(item.detail).includes(key) && item.detail[key] === this.changeAttrValue) {
-              item.detail[key] = val;
-              let index = item.attr_arr.findIndex((item) => item === this.changeAttrValue);
-              item.attr_arr[index] = val;
-            }
-          }
-        });
-        this.changeAttrValue = val;
-      } else {
-        this.generateAttr(this.attrs, 1);
-      }
-    },
-    // 规格图片添加开关
-    addPic(e, i) {
-      if (e) {
-        this.attrs.map((item, ii) => {
-          if (ii !== i) {
-            this.$set(item, 'add_pic', 0);
-          }
-        });
-        this.canSel = false;
-      } else {
-        this.canSel = true;
-      }
-    },
-    // 规格拖拽排序后
-    onMoveSpec() {
-      this.generateAttr(this.attrs);
-    },
-    changeCurrentIndex(i) {
-      this.currentIndex = i;
-    },
-    // 生成商品规格表头
-    generateHeader(data) {
-      let specificationsColumns = data.map((item) => ({
-        title: item.value,
-        key: item.value,
-        minWidth: 140,
-        fixed: 'left',
-      }));
-      let arr;
-      if ([1, 2].includes(Number(this.formValidate.virtual_type))) {
-        arr = [...specificationsColumns, ...VirtualTableHead];
-        // 找到slot 等于 fictitious 将title改为规格名称
-        this.formValidate.header.map((item) => {
-          if (item.slot === 'fictitious') {
-            item.title = this.formValidate.virtual_type == 1 ? '添加卡密/网盘' : '选择优惠券';
-          }
-        });
-      } else if (this.formValidate.virtual_type == 3) {
-        arr = [...specificationsColumns, ...VirtualTableHead2];
-      } else {
-        arr = [...specificationsColumns, ...GoodsTableHead];
-      }
-      this.$set(this.formValidate, 'header', arr);
-      this.tableKey += 1;
-      this.columnsInstalM = arr;
-    },
-    /*
-     * 生成属性
-     * @param {Array} data 规格数据
-     * */
-    generateAttr(data, val) {
-      this.generateHeader(data);
-      const combinations = this.generateCombinations(data);
-      console.log('规格组合总数:' + combinations.length);
-      const virtualType = this.formValidate.virtual_type;
-      // 如果combinations数量超过 500,则分批次生成属性
-      let rows = [];
-      if (combinations.length > 500) {
-        const batchSize = Math.ceil(combinations.length / 500);
-        for (let i = 0; i < combinations.length; i += batchSize) {
-          setTimeout((e) => {
-            let d = this.generateAttrBatch(data, combinations.slice(i, i + batchSize), val);
-            rows = [...rows, ...d];
-            this.manyFormValidate = [...this.oneFormBatch, ...rows];
-          }, 0);
-        }
-      } else {
-        rows = this.generateAttrBatch(data, combinations, val);
-        this.manyFormValidate = [...this.oneFormBatch, ...rows];
-      }
-    },
-    // 生成属性批次
-    generateAttrBatch(data, combinations, val) {
-      const existingItems = this.manyFormValidate.slice(1); // 排除第一项默认数据
+			// 删除规格
+			handleRemoveRole(index) {
+				this.attrs.splice(index, 1);
+				this.manyFormValidate.splice(index, 1);
+				if (!this.attrs.length) {
+					this.formValidate.header = [];
+					this.manyFormValidate = [];
+				} else {
+					this.generateAttr(this.attrs);
+				}
+			},
+			// 删除表格中 对应属性
+			delAttrTable(val) {
+				for (let i = 0; i < this.manyFormValidate.length; i++) {
+					let item = this.manyFormValidate[i];
+					if (item.attr_arr && item.attr_arr.includes(val)) {
+						this.manyFormValidate.splice(i, 1);
+						i--;
+					}
+				}
+			},
+			// 删除属性
+			handleRemove2(item, index, val) {
+				// 删除 manyFormValidate中 title = item.value 的属性值
+				item.splice(index, 1);
+				// this.generateAttr(this.attrs);
+				this.delAttrTable(val);
+			},
+			// 新增规格
+			handleAddRole() {
+				let data = {
+					value: this.formDynamic.attrsName,
+					add_pic: 0,
+					detail: [],
+				};
+				this.attrs.push(data);
+			},
+			handleAddParams() {
+				let data = {
+					name: '',
+					value: '',
+				};
+				this.formValidate.params_list.push(data);
+			},
+			handleSaveAsTemplate() {
+				this.$prompt('', '请输入模板名称', {
+						confirmButtonText: '确定',
+						cancelButtonText: '取消',
+					})
+					.then(({
+						value
+					}) => {
+						let spec = this.attrs.map((item) => {
+							return {
+								value: item.value,
+								detail: item.detail.map((e) => e.value),
+							};
+						});
+						let formDynamic = {
+							rule_name: value,
+							spec: spec,
+						};
+						ruleAddApi(formDynamic, 0)
+							.then((res) => {
+								this.$message.success(res.msg);
+								this.productGetRule();
+							})
+							.catch((res) => {
+								this.$message.error(res.msg);
+							});
+					})
+					.catch(() => {});
+			},
+			// 新增一条属性
+			addOneAttr(val, val2) {
+				this.generateAttr(this.attrs, val2);
+			},
+			handleFocus(val) {
+				this.changeAttrValue = val;
+			},
+			handleBlur() {
+				this.changeAttrValue = '';
+			},
+			handleSelImg(item) {
+				this.$imgModal((e) => {
+					item.pic = e.att_dir;
+					this.changeSpecImg([item.value], e.att_dir);
+				});
+			},
+			handleRemoveImg(item) {
+				item.pic = '';
+			},
+			// 规格名称改变
+			attrChangeValue(i, val) {
+				if (val.trim().length && this.attrs[i].detail.length) {
+					this.generateHeader(this.attrs);
+					if (this.manyFormValidate.length) {
+						this.manyFormValidate.map((item, i) => {
+							if (i > 0) {
+								if (Object.keys(item.detail).includes(this.changeAttrValue)) {
+									item.detail[val] = item.detail[this.changeAttrValue];
+									item[val] = item[this.changeAttrValue];
+									delete item.detail[this.changeAttrValue];
+									delete item[this.changeAttrValue];
+								}
+							}
+						});
+						this.changeAttrValue = val;
+					}
+				} else {
+					this.generateAttr(this.attrs);
+				}
+			},
+			// 规格值改变
+			attrDetailChangeValue(val, i) {
+				if (this.manyFormValidate.length) {
+					let key = this.attrs[i].value;
+					this.manyFormValidate.map((item, i) => {
+						if (i > 0) {
+							if (Object.keys(item.detail).includes(key) && item.detail[key] === this
+								.changeAttrValue) {
+								item.detail[key] = val;
+								let index = item.attr_arr.findIndex((item) => item === this.changeAttrValue);
+								item.attr_arr[index] = val;
+							}
+						}
+					});
+					this.changeAttrValue = val;
+				} else {
+					this.generateAttr(this.attrs, 1);
+				}
+			},
+			// 规格图片添加开关
+			addPic(e, i) {
+				if (e) {
+					this.attrs.map((item, ii) => {
+						if (ii !== i) {
+							this.$set(item, 'add_pic', 0);
+						}
+					});
+					this.canSel = false;
+				} else {
+					this.canSel = true;
+				}
+			},
+			// 规格拖拽排序后
+			onMoveSpec() {
+				this.generateAttr(this.attrs);
+			},
+			changeCurrentIndex(i) {
+				this.currentIndex = i;
+			},
+			// 生成商品规格表头
+			generateHeader(data) {
+				let specificationsColumns = data.map((item) => ({
+					title: item.value,
+					key: item.value,
+					minWidth: 140,
+					fixed: 'left',
+				}));
+				let arr;
+				if ([1, 2].includes(Number(this.formValidate.virtual_type))) {
+					arr = [...specificationsColumns, ...VirtualTableHead];
+					// 找到slot 等于 fictitious 将title改为规格名称
+					this.formValidate.header.map((item) => {
+						if (item.slot === 'fictitious') {
+							item.title = this.formValidate.virtual_type == 1 ? '添加卡密/网盘' : '选择优惠券';
+						}
+					});
+				} else if (this.formValidate.virtual_type == 3) {
+					arr = [...specificationsColumns, ...VirtualTableHead2];
+				} else {
+					arr = [...specificationsColumns, ...GoodsTableHead];
+				}
+				this.$set(this.formValidate, 'header', arr);
+				this.tableKey += 1;
+				this.columnsInstalM = arr;
+			},
+			/*
+			 * 生成属性
+			 * @param {Array} data 规格数据
+			 * */
+			generateAttr(data, val) {
+				this.generateHeader(data);
+				const combinations = this.generateCombinations(data);
+				console.log('规格组合总数:' + combinations.length);
+				const virtualType = this.formValidate.virtual_type;
+				// 如果combinations数量超过 500,则分批次生成属性
+				let rows = [];
+				if (combinations.length > 500) {
+					const batchSize = Math.ceil(combinations.length / 500);
+					for (let i = 0; i < combinations.length; i += batchSize) {
+						setTimeout((e) => {
+							let d = this.generateAttrBatch(data, combinations.slice(i, i + batchSize), val);
+							rows = [...rows, ...d];
+							this.manyFormValidate = [...this.oneFormBatch, ...rows];
+						}, 0);
+					}
+				} else {
+					rows = this.generateAttrBatch(data, combinations, val);
+					this.manyFormValidate = [...this.oneFormBatch, ...rows];
+				}
+			},
+			// 生成属性批次
+			generateAttrBatch(data, combinations, val) {
+				const existingItems = this.manyFormValidate.slice(1); // 排除第一项默认数据
 
-      const rows = combinations.map((combination) => {
-        const row = {
-          attr_arr: combination,
-          detail: {},
-          title: '',
-          key: '',
-          price: 0,
-          pic: '',
-          ot_price: 0,
-          cost: 0,
-          stock: 0,
-          is_show: 1,
-          is_default_select: 0,
-          unique: '',
-          weight: '',
-          volume: '',
-          brokerage: 0,
-          brokerage_two: 0,
-          vip_price: 0,
-          vip_proportion: 0,
-        };
+				const rows = combinations.map((combination) => {
+					const row = {
+						attr_arr: combination,
+						detail: {},
+						title: '',
+						key: '',
+						price: 0,
+						pic: '',
+						ot_price: 0,
+						cost: 0,
+						stock: 0,
+						is_show: 1,
+						is_default_select: 0,
+						unique: '',
+						weight: '',
+						volume: '',
+						brokerage: 0,
+						brokerage_two: 0,
+						vip_price: 0,
+						vip_proportion: 0,
+					};
 
-        // 设置虚拟类型相关属性
-        if (this.formValidate.virtual_type === 1) {
-          row.virtual_list = [];
-          row.disk_info = '';
-        } else if (this.formValidate.virtual_type === 2) {
-          row.coupon_id = 0;
-          row.coupon_name = '';
-        }
+					// 设置虚拟类型相关属性
+					if (this.formValidate.virtual_type === 1) {
+						row.virtual_list = [];
+						row.disk_info = '';
+					} else if (this.formValidate.virtual_type === 2) {
+						row.coupon_id = 0;
+						row.coupon_name = '';
+					}
 
-        // 处理规格属性
-        data.forEach((item, i) => {
-          const value = combination[i];
-          row[item.value] = value;
-          row.title = item.value;
-          row.key = item.value;
-          row.detail[item.value] = value;
+					// 处理规格属性
+					data.forEach((item, i) => {
+						const value = combination[i];
+						row[item.value] = value;
+						row.title = item.value;
+						row.key = item.value;
+						row.detail[item.value] = value;
 
-          // 查找匹配的现有规格项
-          const matchedItem = existingItems.find((item) => item.attr_arr && arraysEqual(item.attr_arr, combination));
+						// 查找匹配的现有规格项
+						const matchedItem = existingItems.find((item) => item.attr_arr && arraysEqual(item
+							.attr_arr, combination));
 
-          if (matchedItem) {
-            Object.assign(row, {
-              price: matchedItem.price,
-              cost: matchedItem.cost,
-              ot_price: matchedItem.ot_price,
-              stock: matchedItem.stock,
-              pic: matchedItem.pic,
-              unique: matchedItem.unique || '',
-              weight: matchedItem.weight || '',
-              volume: matchedItem.volume || '',
-              is_show: matchedItem.is_show || 1,
-              is_default_select: matchedItem.is_default_select || 0,
-              volume: matchedItem.volume || 0,
-              bar_code_number: matchedItem.bar_code_number || 0,
-              is_virtual: matchedItem.is_virtual,
-              brokerage: matchedItem.brokerage,
-              brokerage_two: matchedItem.brokerage_two,
-              vip_price: matchedItem.vip_price,
-              vip_proportion: matchedItem.vip_proportion,
-            });
+						if (matchedItem) {
+							Object.assign(row, {
+								price: matchedItem.price,
+								cost: matchedItem.cost,
+								ot_price: matchedItem.ot_price,
+								stock: matchedItem.stock,
+								pic: matchedItem.pic,
+								unique: matchedItem.unique || '',
+								weight: matchedItem.weight || '',
+								volume: matchedItem.volume || '',
+								is_show: matchedItem.is_show || 1,
+								is_default_select: matchedItem.is_default_select || 0,
+								volume: matchedItem.volume || 0,
+								bar_code_number: matchedItem.bar_code_number || 0,
+								is_virtual: matchedItem.is_virtual,
+								brokerage: matchedItem.brokerage,
+								brokerage_two: matchedItem.brokerage_two,
+								vip_price: matchedItem.vip_price,
+								vip_proportion: matchedItem.vip_proportion,
+							});
 
-            if (this.formValidate.virtual_type === 1) {
-              row.virtual_list = matchedItem.virtual_list;
-              row.disk_info = matchedItem.disk_info;
-            } else if (this.formValidate.virtual_type === 2 && matchedItem.coupon_id) {
-              row.coupon_id = matchedItem.coupon_id;
-              row.coupon_name = matchedItem.coupon_name;
-            }
-          } else if (item.add_pic && combination.includes(val)) {
-            const picItem = item.detail.find((e) => combination.includes(e.value));
-            if (picItem) row.pic = picItem.pic;
-          }
-        });
-        return row;
-      });
-      return rows;
-    },
-    // 切换默认选中规格
-    changeDefaultSelect(e, index) {
-      // 一个开启 其他关闭
-      this.manyFormValidate.map((item, i) => {
-        if (i !== index) {
-          item.is_default_select = 0;
-        }
-      });
-      if (e) this.manyFormValidate[index].is_show = 1;
-    },
-    // 改变是否显示
-    changeDefaultShow(index) {
-      // 如果默认选中开启 则不可隐藏
-      if (this.manyFormValidate[index].is_default_select === 1) {
-        this.manyFormValidate[index].is_show = 1;
-        this.$message.error('默认规格不可隐藏');
-      }
-    },
-    // 生成规格组合
-    generateCombinations(arr, prefix = []) {
-      if (arr.length === 0) {
-        return [prefix];
-      }
-      const [first, ...rest] = arr;
-      return first.detail.flatMap((detail) => this.generateCombinations(rest, [...prefix, detail.value]));
-    },
-    // 添加属性
-    createAttr(num, idx) {
-      if (num) {
-        // 判断是否存在同样熟悉
-        var isExist = this.attrs[idx].detail.some((item) => item.value === num);
-        if (isExist) {
-          this.$message.error('规格值已存在');
-          return;
-        }
-        this.attrs[idx].detail.push({ value: num, pic: '' });
-        if (this.manyFormValidate.length) {
-          this.addOneAttr(this.attrs[idx].value, num);
-        } else {
-          this.generateAttr(this.attrs);
-        }
+							if (this.formValidate.virtual_type === 1) {
+								row.virtual_list = matchedItem.virtual_list;
+								row.disk_info = matchedItem.disk_info;
+							} else if (this.formValidate.virtual_type === 2 && matchedItem.coupon_id) {
+								row.coupon_id = matchedItem.coupon_id;
+								row.coupon_name = matchedItem.coupon_name;
+							}
+						} else if (item.add_pic && combination.includes(val)) {
+							const picItem = item.detail.find((e) => combination.includes(e.value));
+							if (picItem) row.pic = picItem.pic;
+						}
+					});
+					return row;
+				});
+				return rows;
+			},
+			// 切换默认选中规格
+			changeDefaultSelect(e, index) {
+				// 一个开启 其他关闭
+				this.manyFormValidate.map((item, i) => {
+					if (i !== index) {
+						item.is_default_select = 0;
+					}
+				});
+				if (e) this.manyFormValidate[index].is_show = 1;
+			},
+			// 改变是否显示
+			changeDefaultShow(index) {
+				// 如果默认选中开启 则不可隐藏
+				if (this.manyFormValidate[index].is_default_select === 1) {
+					this.manyFormValidate[index].is_show = 1;
+					this.$message.error('默认规格不可隐藏');
+				}
+			},
+			// 生成规格组合
+			generateCombinations(arr, prefix = []) {
+				if (arr.length === 0) {
+					return [prefix];
+				}
+				const [first, ...rest] = arr;
+				return first.detail.flatMap((detail) => this.generateCombinations(rest, [...prefix, detail.value]));
+			},
+			// 添加属性
+			createAttr(num, idx) {
+				if (num) {
+					// 判断是否存在同样熟悉
+					var isExist = this.attrs[idx].detail.some((item) => item.value === num);
+					if (isExist) {
+						this.$message.error('规格值已存在');
+						return;
+					}
+					this.attrs[idx].detail.push({
+						value: num,
+						pic: ''
+					});
+					if (this.manyFormValidate.length) {
+						this.addOneAttr(this.attrs[idx].value, num);
+					} else {
+						this.generateAttr(this.attrs);
+					}
 
-        this.$refs.specStock.$refs['popoverRef_' + idx][0].doClose(); //关闭的
-        this.clearAttr();
-        setTimeout(() => {
-          if (this.$refs.specStock.$refs['popoverRef_' + idx]) {
-            //重点是以下两句
-            this.$refs.specStock.$refs['popoverRef_' + idx][0].doShow(); //打开的
-            //重点是以上两句
-          }
-        }, 20);
-      } else {
-        this.$refs.specStock.$refs['popoverRef_' + idx][0].doClose(); //关闭的
-      }
-    },
-    handleShowPop(index) {
-      this.$refs.specStock.$refs['inputRef_' + index][0].focus();
-    },
-    // 商品分类;
-    goodsCategory() {
-      cascaderListApi(1)
-        .then((res) => {
-          this.treeSelect = res.data;
-        })
-        .catch((res) => {
-          this.$message.error(res.msg);
-        });
-    },
-    // 改变规格
-    changeSpec() {
-      this.formValidate.is_sub = [];
-      let id = this.$route.params.id;
-      if (id) {
-        checkActivityApi(id)
-          .then((res) => {})
-          .catch((res) => {
-            this.formValidate.spec_type = this.spec_type;
-            this.$message.error(res.msg);
-          });
-      }
-    },
-    // 详情
-    getInfo() {
-      this.spinShow = true;
-      productInfoApi(this.$route.params.id)
-        .then(async (res) => {
-          let data = res.data.productInfo;
-          this.infoData(data);
-          this.spinShow = false;
-        })
-        .catch((res) => {
-          this.spinShow = false;
-          this.$message.error(res.msg);
-        });
-    },
-    handleRemove(i) {
-      this.images.splice(i, 1);
-      this.formValidate.slider_image.splice(i, 1);
-      this.oneFormValidate[0].pic = this.formValidate.slider_image[0];
-    },
-    // 关闭图片上传模态框
-    changeCancel(msg) {
-      this.modalPic = false;
-    },
-    // 点击商品图
-    modalPicTap(tit, picTit = '', index = 0) {
-      this.modalPic = true;
-      this.isChoice = tit === 'dan' ? '单选' : '多选';
-      this.picTit = picTit;
-      this.tableIndex = index;
-    },
-    // 获取单张图片信息
-    getPic(pc) {
-      switch (this.picTit) {
-        case 'danFrom':
-          this.formValidate.image = pc.att_dir;
-          if (!this.$route.params.id) {
-            if (this.formValidate.spec_type === 0) {
-              this.oneFormValidate[0].pic = pc.att_dir;
-            } else {
-              this.manyFormValidate.map((item) => {
-                item.pic = pc.att_dir;
-              });
-              this.oneFormBatch[0].pic = pc.att_dir;
-            }
-          }
-          break;
-        case 'danTable':
-          this.oneFormValidate[this.tableIndex].pic = pc.att_dir;
-          break;
-        case 'duopi':
-          this.oneFormBatch[this.tableIndex].pic = pc.att_dir;
-          break;
-        case 'recommend_image':
-          this.formValidate.recommend_image = pc.att_dir;
-          break;
-        default:
-          if (this.manyFormValidate.length) this.manyFormValidate[this.tableIndex].pic = pc.att_dir;
-      }
-      this.modalPic = false;
-    },
-    deleteRow(index) {
-      this.formValidate.params_list.splice(index, 1);
-    },
-    // 获取多张图信息
-    getPicD(pc) {
-      this.images = pc;
-      this.images.map((item) => {
-        this.formValidate.slider_image.push(item.att_dir);
-        this.formValidate.slider_image = this.formValidate.slider_image.splice(0, 10);
-      });
-      this.oneFormValidate[0].pic = this.formValidate.slider_image[0];
-      this.modalPic = false;
-    },
-    // 提交
-    handleSubmit(name) {
-      this.$refs[name].validate((valid) => {
-        if (valid) {
-          this.formValidate.type = this.type;
-          let arr = this.formValidate.spec_type === 0 ? this.oneFormValidate : this.manyFormValidate;
-          let item = JSON.parse(JSON.stringify(arr));
-          if (this.formValidate.spec_type === 1) {
-            if (item.length < 2) return this.$message.warning('商品规格-规格数量最少1个');
-            // 删除第一项
-            item.shift();
-          }
-          for (let i = 0; i < item.length; i++) {
-            if (item[i].stock > 1000000) {
-              return this.$message.error('规格库存-库存超出系统范围(1000000)');
-            }
-          }
-          if (this.formValidate.is_sub[0] === 1) {
-            for (let i = 0; i < item.length; i++) {
-              if (item[i].brokerage === null || item[i].brokerage_two === null) {
-                return this.$message.error('营销设置- 一二级返佣不能为空');
-              }
-            }
-          } else {
-            for (let i = 0; i < item.length; i++) {
-              if (item[i].vip_price === null) {
-                return this.$message.error('营销设置-会员价不能为空');
-              }
-            }
-          }
-          if (this.formValidate.is_sub.length === 2) {
-            for (let i = 0; i < item.length; i++) {
-              if (item[i].brokerage === null || item[i].brokerage_two === null || item[i].vip_price === null) {
-                return this.$message.error('营销设置- 一二级返佣和会员价不能为空');
-              }
-            }
-          }
-          if (this.formValidate.freight == 3 && !this.formValidate.temp_id) {
-            return this.$message.warning('商品信息-运费模板不能为空');
-          }
-          let activeIds = [];
-          this.dataLabel.forEach((item) => {
-            activeIds.push(item.id);
-          });
-          this.formValidate.label_id = activeIds;
-          if (this.openSubimit) return;
-          this.openSubimit = true;
-          this.formValidate.description = formatRichText(this.content);
-          if (this.formValidate.spec_type === 0) {
-            this.formValidate.attrs = item;
-            this.formValidate.header = [];
-            this.formValidate.items = [];
-            this.formValidate.is_copy = 0;
-          } else {
-            this.formValidate.items = this.attrs;
-            this.formValidate.attrs = item;
-            this.formValidate.is_copy = 1;
-          }
-          productAddApi(this.formValidate)
-            .then(async (res) => {
-              this.openSubimit = false;
-              this.$message.success(res.msg);
-              if (this.$route.params.id === '0') {
-                cacheDelete().catch((err) => {
-                  this.$message.error(err.msg);
-                });
-              }
-              setTimeout(() => {
-                this.openSubimit = false;
-                this.$router.push({ path: this.$routeProStr + '/product/product_list' });
-              }, 500);
-            })
-            .catch((res) => {
-              setTimeout((e) => {
-                this.openSubimit = false;
-              }, 1000);
-              this.$message.error(res.msg);
-            });
-        } else {
-          if (!this.formValidate.store_name) {
-            return this.$message.warning('商品信息-商品名称不能为空');
-          } else if (!this.formValidate.cate_id.length) {
-            return this.$message.warning('商品信息-商品分类不能为空');
-          } else if (!this.formValidate.unit_name) {
-            return this.$message.warning('商品信息-商品单位不能为空');
-          } else if (!this.formValidate.slider_image.length) {
-            return this.$message.warning('商品信息-商品轮播图不能为空');
-          } else if (!this.formValidate.logistics.length && !this.formValidate.virtual_type) {
-            return this.$message.warning('物流设置-至少选择一种物流方式');
-          } else if (!this.formValidate.temp_id && this.formValidate.freight == 3) {
-            return this.$message.warning('商品信息-运费模板不能为空');
-          }
-        }
-      });
-    },
-    changeTemplate(msg) {
-      this.template = msg;
-    },
-    // 表单验证
-    validate(prop, status, error) {
-      if (status === false) {
-        this.$message.warning(error);
-      }
-    },
-    // 移动
-    handleDragStart(e, item) {
-      this.dragging = item;
-    },
-    handleDragEnd(e, item) {
-      this.dragging = null;
-    },
-    handleDragOver(e) {
-      e.dataTransfer.dropEffect = 'move';
-    },
-    handleDragEnter(e, item) {
-      e.dataTransfer.effectAllowed = 'move';
-      if (item === this.dragging) {
-        return;
-      }
-      const newItems = [...this.formValidate.slider_image];
-      const src = newItems.indexOf(this.dragging);
-      const dst = newItems.indexOf(item);
-      newItems.splice(dst, 0, ...newItems.splice(src, 1));
-      this.formValidate.slider_image = newItems;
-    },
-    //对象数组去重;
-    unique(arr) {
-      const res = new Map();
-      return arr.filter((arr) => !res.has(arr.product_id) && res.set(arr.product_id, 1));
-    },
-    // 商品id
-    getProductId(data) {
-      this.goods_modals = false;
-      this.formValidate.recommend_list = this.unique(this.formValidate.recommend_list.concat(data));
-    },
-    // 选择推荐商品
-    changeGoods() {
-      this.goods_modals = true;
-      this.$refs.goodslist.getList();
-      this.$refs.goodslist.goodsCategory();
-    },
-    // 选择用户标签
-    activeData(dataLabel) {
-      this.labelShow = false;
-      this.dataLabel = dataLabel;
-    },
-    // 选择商品标签
-    activeLabel(data) {
-      this.tagShow = false;
-      this.formValidate.label_list = Array.from(new Set(data));
-    },
-    // 标签弹窗关闭
-    labelClose() {
-      this.labelShow = false;
-      this.tagShow = false;
-    },
-    // 删除用户标签
-    closeLabel(label) {
-      let index = this.dataLabel.indexOf(this.dataLabel.filter((d) => d.id == label.id)[0]);
-      this.dataLabel.splice(index, 1);
-    },
-    // 打开选择用户标签
-    openLabel(row) {
-      this.labelShow = true;
-    },
-    handleRemoveRecommend(i) {
-      this.formValidate.recommend_list.splice(i, 1);
-    },
-    // 打开的营销活动标签
-    watchActivity() {
-      let marketing = [];
-      // 使用对象映射优化权限判断逻辑
-      const permissionMap = {
-        默认: true,
-        秒杀: 'seckill',
-        砍价: 'bargain',
-        拼团: 'combination',
-      };
-      this.formValidate.activity.forEach((el) => {
-        if (permissionMap[el] === true || (permissionMap[el] && checkArray(permissionMap[el]))) {
-          marketing.push(el);
-        }
-      });
-      this.formValidate.activity = marketing;
-    },
-  },
-};
+					this.$refs.specStock.$refs['popoverRef_' + idx][0].doClose(); //关闭的
+					this.clearAttr();
+					setTimeout(() => {
+						if (this.$refs.specStock.$refs['popoverRef_' + idx]) {
+							//重点是以下两句
+							this.$refs.specStock.$refs['popoverRef_' + idx][0].doShow(); //打开的
+							//重点是以上两句
+						}
+					}, 20);
+				} else {
+					this.$refs.specStock.$refs['popoverRef_' + idx][0].doClose(); //关闭的
+				}
+			},
+			handleShowPop(index) {
+				this.$refs.specStock.$refs['inputRef_' + index][0].focus();
+			},
+			// 商品分类;
+			goodsCategory() {
+				cascaderListApi(1)
+					.then((res) => {
+						this.treeSelect = res.data;
+					})
+					.catch((res) => {
+						this.$message.error(res.msg);
+					});
+			},
+			// 改变规格
+			changeSpec() {
+				this.formValidate.is_sub = [];
+				let id = this.$route.params.id;
+				if (id) {
+					checkActivityApi(id)
+						.then((res) => {})
+						.catch((res) => {
+							this.formValidate.spec_type = this.spec_type;
+							this.$message.error(res.msg);
+						});
+				}
+			},
+			// 详情
+			getInfo() {
+				this.spinShow = true;
+				productInfoApi(this.$route.params.id)
+					.then(async (res) => {
+						let data = res.data.productInfo;
+						this.infoData(data);
+						this.spinShow = false;
+					})
+					.catch((res) => {
+						this.spinShow = false;
+						this.$message.error(res.msg);
+					});
+			},
+			handleRemove(i) {
+				this.images.splice(i, 1);
+				this.formValidate.slider_image.splice(i, 1);
+				this.oneFormValidate[0].pic = this.formValidate.slider_image[0];
+			},
+			// 关闭图片上传模态框
+			changeCancel(msg) {
+				this.modalPic = false;
+			},
+			// 点击商品图
+			modalPicTap(tit, picTit = '', index = 0) {
+				this.modalPic = true;
+				this.isChoice = tit === 'dan' ? '单选' : '多选';
+				this.picTit = picTit;
+				this.tableIndex = index;
+			},
+			// 获取单张图片信息
+			getPic(pc) {
+				switch (this.picTit) {
+					case 'danFrom':
+						this.formValidate.image = pc.att_dir;
+						if (!this.$route.params.id) {
+							if (this.formValidate.spec_type === 0) {
+								this.oneFormValidate[0].pic = pc.att_dir;
+							} else {
+								this.manyFormValidate.map((item) => {
+									item.pic = pc.att_dir;
+								});
+								this.oneFormBatch[0].pic = pc.att_dir;
+							}
+						}
+						break;
+					case 'danTable':
+						this.oneFormValidate[this.tableIndex].pic = pc.att_dir;
+						break;
+					case 'duopi':
+						this.oneFormBatch[this.tableIndex].pic = pc.att_dir;
+						break;
+					case 'recommend_image':
+						this.formValidate.recommend_image = pc.att_dir;
+						break;
+					default:
+						if (this.manyFormValidate.length) this.manyFormValidate[this.tableIndex].pic = pc.att_dir;
+				}
+				this.modalPic = false;
+			},
+			deleteRow(index) {
+				this.formValidate.params_list.splice(index, 1);
+			},
+			// 获取多张图信息
+			getPicD(pc) {
+				this.images = pc;
+				this.images.map((item) => {
+					this.formValidate.slider_image.push(item.att_dir);
+					this.formValidate.slider_image = this.formValidate.slider_image.splice(0, 10);
+				});
+				this.oneFormValidate[0].pic = this.formValidate.slider_image[0];
+				this.modalPic = false;
+			},
+			// 提交
+			handleSubmit(name) {
+				this.$refs[name].validate((valid) => {
+					if (valid) {
+						this.formValidate.type = this.type;
+						let arr = this.formValidate.spec_type === 0 ? this.oneFormValidate : this.manyFormValidate;
+						let item = JSON.parse(JSON.stringify(arr));
+						if (this.formValidate.spec_type === 1) {
+							if (item.length < 2) return this.$message.warning('商品规格-规格数量最少1个');
+							// 删除第一项
+							item.shift();
+						}
+						for (let i = 0; i < item.length; i++) {
+							if (item[i].stock > 1000000) {
+								return this.$message.error('规格库存-库存超出系统范围(1000000)');
+							}
+						}
+						if (this.formValidate.is_sub[0] === 1) {
+							for (let i = 0; i < item.length; i++) {
+								if (item[i].brokerage === null || item[i].brokerage_two === null) {
+									return this.$message.error('营销设置- 一二级返佣不能为空');
+								}
+							}
+						} else {
+							for (let i = 0; i < item.length; i++) {
+								if (item[i].vip_price === null) {
+									return this.$message.error('营销设置-会员价不能为空');
+								}
+							}
+						}
+						if (this.formValidate.is_sub.length === 2) {
+							for (let i = 0; i < item.length; i++) {
+								if (item[i].brokerage === null || item[i].brokerage_two === null || item[i]
+									.vip_price === null) {
+									return this.$message.error('营销设置- 一二级返佣和会员价不能为空');
+								}
+							}
+						}
+						if (this.formValidate.freight == 3 && !this.formValidate.temp_id) {
+							return this.$message.warning('商品信息-运费模板不能为空');
+						}
+						let activeIds = [];
+						this.dataLabel.forEach((item) => {
+							activeIds.push(item.id);
+						});
+						this.formValidate.label_id = activeIds;
+						if (this.openSubimit) return;
+						this.openSubimit = true;
+						this.formValidate.description = formatRichText(this.content);
+						if (this.formValidate.spec_type === 0) {
+							this.formValidate.attrs = item;
+							this.formValidate.header = [];
+							this.formValidate.items = [];
+							this.formValidate.is_copy = 0;
+						} else {
+							this.formValidate.items = this.attrs;
+							this.formValidate.attrs = item;
+							this.formValidate.is_copy = 1;
+						}
+						productAddApi(this.formValidate)
+							.then(async (res) => {
+								this.openSubimit = false;
+								this.$message.success(res.msg);
+								if (this.$route.params.id === '0') {
+									cacheDelete().catch((err) => {
+										this.$message.error(err.msg);
+									});
+								}
+								setTimeout(() => {
+									this.openSubimit = false;
+									this.$router.push({
+										path: this.$routeProStr + '/product/product_list'
+									});
+								}, 500);
+							})
+							.catch((res) => {
+								setTimeout((e) => {
+									this.openSubimit = false;
+								}, 1000);
+								this.$message.error(res.msg);
+							});
+					} else {
+						if (!this.formValidate.store_name) {
+							return this.$message.warning('商品信息-商品名称不能为空');
+						} else if (!this.formValidate.cate_id.length) {
+							return this.$message.warning('商品信息-商品分类不能为空');
+						} else if (!this.formValidate.unit_name) {
+							return this.$message.warning('商品信息-商品单位不能为空');
+						} else if (!this.formValidate.slider_image.length) {
+							return this.$message.warning('商品信息-商品轮播图不能为空');
+						} else if (!this.formValidate.logistics.length && !this.formValidate.virtual_type) {
+							return this.$message.warning('物流设置-至少选择一种物流方式');
+						} else if (!this.formValidate.temp_id && this.formValidate.freight == 3) {
+							return this.$message.warning('商品信息-运费模板不能为空');
+						}
+					}
+				});
+			},
+			changeTemplate(msg) {
+				this.template = msg;
+			},
+			// 表单验证
+			validate(prop, status, error) {
+				if (status === false) {
+					this.$message.warning(error);
+				}
+			},
+			// 移动
+			handleDragStart(e, item) {
+				this.dragging = item;
+			},
+			handleDragEnd(e, item) {
+				this.dragging = null;
+			},
+			handleDragOver(e) {
+				e.dataTransfer.dropEffect = 'move';
+			},
+			handleDragEnter(e, item) {
+				e.dataTransfer.effectAllowed = 'move';
+				if (item === this.dragging) {
+					return;
+				}
+				const newItems = [...this.formValidate.slider_image];
+				const src = newItems.indexOf(this.dragging);
+				const dst = newItems.indexOf(item);
+				newItems.splice(dst, 0, ...newItems.splice(src, 1));
+				this.formValidate.slider_image = newItems;
+			},
+			//对象数组去重;
+			unique(arr) {
+				const res = new Map();
+				return arr.filter((arr) => !res.has(arr.product_id) && res.set(arr.product_id, 1));
+			},
+			// 商品id
+			getProductId(data) {
+				this.goods_modals = false;
+				this.formValidate.recommend_list = this.unique(this.formValidate.recommend_list.concat(data));
+			},
+			// 选择推荐商品
+			changeGoods() {
+				this.goods_modals = true;
+				this.$refs.goodslist.getList();
+				this.$refs.goodslist.goodsCategory();
+			},
+			// 选择用户标签
+			activeData(dataLabel) {
+				this.labelShow = false;
+				this.dataLabel = dataLabel;
+			},
+			// 选择商品标签
+			activeLabel(data) {
+				this.tagShow = false;
+				this.formValidate.label_list = Array.from(new Set(data));
+			},
+			// 标签弹窗关闭
+			labelClose() {
+				this.labelShow = false;
+				this.tagShow = false;
+			},
+			// 删除用户标签
+			closeLabel(label) {
+				let index = this.dataLabel.indexOf(this.dataLabel.filter((d) => d.id == label.id)[0]);
+				this.dataLabel.splice(index, 1);
+			},
+			// 打开选择用户标签
+			openLabel(row) {
+				this.labelShow = true;
+			},
+			handleRemoveRecommend(i) {
+				this.formValidate.recommend_list.splice(i, 1);
+			},
+			// 打开的营销活动标签
+			watchActivity() {
+				let marketing = [];
+				// 使用对象映射优化权限判断逻辑
+				const permissionMap = {
+					默认: true,
+					秒杀: 'seckill',
+					砍价: 'bargain',
+					拼团: 'combination',
+				};
+				this.formValidate.activity.forEach((el) => {
+					if (permissionMap[el] === true || (permissionMap[el] && checkArray(permissionMap[el]))) {
+						marketing.push(el);
+					}
+				});
+				this.formValidate.activity = marketing;
+			},
+		},
+	};
 </script>
 <style lang="scss" scoped>
-@use './productAdd.scss' as *;
-</style>
+	@use './productAdd.scss' as *;
+</style>

+ 18 - 2
src/pages/setting/systemMenus/components/menusFrom.vue

@@ -32,6 +32,19 @@
               </el-input>
             </el-form-item>
           </el-col>
+		  <!-- menu_path -->
+		  <el-col v-bind="grid" v-if="authType">
+		    <el-form-item label="路由:">
+		      <el-input v-model="formValidate.menu_path" placeholder="请选择输入路由" >
+		      </el-input>
+		    </el-form-item>
+		  </el-col>
+		  <el-col v-bind="grid" v-if="authType">
+		    <el-form-item label="权限:">
+		      <el-input v-model="formValidate.unique_auth" placeholder="请选择权限" >
+		      </el-input>
+		    </el-form-item>
+		  </el-col>
           <el-col v-bind="grid" v-if="authType">
             <el-form-item label="排序:">
               <el-input type="number" v-model="formValidate.sort" placeholder="请输入排序" number></el-input>
@@ -40,9 +53,12 @@
           <el-col v-bind="grid">
             <el-form-item label="是否显示:">
               <el-radio-group v-model="formValidate.is_show_path">
-                <el-radio :label="item.value" v-for="(item, i) in isShowPathRadio" :key="i">
-                  <span>{{ item.label }}</span>
+                <el-radio :label="1" >
+                  <span></span>
                 </el-radio>
+				<el-radio :label="0">
+				  <span>否</span>
+				</el-radio>
               </el-radio-group>
             </el-form-item>
           </el-col>

+ 4 - 4
src/pages/setting/systemMenus/index.vue

@@ -16,11 +16,11 @@
           <el-form-item>
             <el-button type="primary" v-db-click @click="getData">查询</el-button>
           </el-form-item>
-          <!-- <el-row >
+          <el-row >
             <el-col v-bind="grid">
               <el-button type="primary" v-db-click @click="menusAdd('添加规则')">添加规则 </el-button>
             </el-col>
-          </el-row> -->
+          </el-row>
         </el-form>
       </div>
     </el-card>
@@ -166,7 +166,7 @@ export default {
         xs: 24,
       },
       roleData: {
-        is_show: 1,
+        is_show:1,
         keyword: '',
         // auth_type: 3,
       },
@@ -300,7 +300,7 @@ export default {
       let data = {
         id: row.id,
         is_show_path: row.is_show_path,
-        is_show: -1,
+        is_show: row.is_show_path,
       };
       isShowApi(data)
         .then(async (res) => {

+ 3 - 3
src/pages/user/list/handle/userEditForm.vue

@@ -119,14 +119,14 @@
               </div>
             </el-form-item>
           </div>
-           <!-- <div class="item lang">
-            <el-form-item label="是否每月返100:">
+           <div class="item lang">
+            <el-form-item label="是否服务中心">
               <el-radio-group v-model="formItem.is_sc" class="form-sty">
                 <el-radio :label="0">否</el-radio>
                 <el-radio :label="1">是</el-radio>
               </el-radio-group>
             </el-form-item>
-          </div> -->
+          </div>
           <div class="item lang">
             <el-form-item label="分销禁用:">
               <el-radio-group v-model="formItem.spread_open" class="form-sty">

+ 4 - 4
src/pages/user/list/handle/userInfo.vue

@@ -46,10 +46,10 @@
     <div class="section">
       <div class="section-hd">用户概况</div>
       <div class="section-bd">
-        <!-- <div class="item">
-          <div>每月发放100:</div>
-          <div class="value">{{ psInfo.is_sc ? '开启' : '关闭' }}</div>
-        </div> -->
+        <div class="item">
+          <div>服务中心:</div>
+          <div class="value">{{ psInfo.is_sc ? '是' : '否' }}</div>
+        </div>
         <div class="item">
           <div>推广资格:</div>
           <div class="value">{{ psInfo.spread_open ? '开启' : '关闭' }}</div>

+ 1312 - 1355
src/pages/user/list/index.vue

@@ -1,245 +1,172 @@
 <template>
-  <div>
-    <el-card :bordered="false" shadow="never" class="ivu-mt" :body-style="{ padding: 0 }">
-      <div class="padding-add">
-        <el-form
-          ref="userFrom"
-          :model="userFrom"
-          label-width="80px"
-          label-position="right"
-          @submit.native.prevent
-          inline
-        >
-          <div class="acea-row search-form" v-if="!collapse">
-            <div>
-              <el-form-item label="用户搜索:" label-for="nickname">
-                <el-input v-model="userFrom.nickname" placeholder="请输入用户" clearable class="form_content_width">
-                  <el-select v-model="field_key" slot="prepend" style="width: 100px">
-                    <el-option value="all" label="全部"></el-option>
-                    <el-option value="uid" label="UID"></el-option>
-                    <el-option value="phone" label="手机号"></el-option>
-                    <el-option value="nickname" label="用户昵称"></el-option>
-                  </el-select>
-                </el-input>
-              </el-form-item>
-              <el-form-item label="用户等级:" label-for="level">
-                <el-select v-model="level" placeholder="请选择用户等级" clearable class="form_content_width">
-                  <el-option value="all" label="全部">全部</el-option>
-                  <el-option
-                    :value="item.id"
-                    v-for="(item, index) in levelList"
-                    :key="index"
-                    :label="item.name"
-                  ></el-option>
-                </el-select>
-              </el-form-item>
-              <el-form-item label="用户分组:">
-                <el-select v-model="group_id" placeholder="请选择用户分组" clearable class="form_content_width">
-                  <el-option value="all" label="全部"></el-option>
-                  <el-option
-                    :value="item.id"
-                    v-for="(item, index) in groupList"
-                    :key="index"
-                    :label="item.group_name"
-                  ></el-option>
-                </el-select>
-              </el-form-item>
-            </div>
-            <el-form-item class="search-form-sub">
-              <el-button type="primary" v-db-click @click="userSearchs">搜索</el-button>
-              <el-button class="ResetSearch" v-db-click @click="reset('userFrom')">重置</el-button>
-              <a class="ivu-ml-8 font12 ml10" v-db-click @click="collapse = !collapse">
-                <template v-if="!collapse"> 展开 <i class="el-icon-arrow-down" /> </template>
-                <template v-else> 收起 <i class="el-icon-arrow-up" /> </template>
-              </a>
-            </el-form-item>
-          </div>
-          <div v-if="collapse" class="acea-row search-form">
-            <div class="search-form-box">
-              <el-form-item label="用户搜索:" label-for="nickname">
-                <el-input v-model="userFrom.nickname" placeholder="请输入用户" clearable class="form_content_width">
-                  <el-select v-model="field_key" slot="prepend" style="width: 100px">
-                    <el-option value="all" label="全部"></el-option>
-                    <el-option value="uid" label="UID"></el-option>
-                    <el-option value="phone" label="手机号"></el-option>
-                    <el-option value="nickname" label="用户昵称"></el-option>
-                  </el-select>
-                </el-input>
-              </el-form-item>
-              <el-form-item label="用户等级:" label-for="level">
-                <el-select v-model="level" placeholder="请选择用户等级" clearable class="form_content_width">
-                  <el-option value="all" label="全部">全部</el-option>
-                  <el-option
-                    :value="item.id"
-                    v-for="(item, index) in levelList"
-                    :key="index"
-                    :label="item.name"
-                  ></el-option>
-                </el-select>
-              </el-form-item>
-              <el-form-item label="用户分组:">
-                <el-select v-model="group_id" placeholder="请选择用户分组" clearable class="form_content_width">
-                  <el-option value="all" label="全部"></el-option>
-                  <el-option
-                    :value="item.id"
-                    v-for="(item, index) in groupList"
-                    :key="index"
-                    :label="item.group_name"
-                  ></el-option>
-                </el-select>
-              </el-form-item>
-              <el-form-item label="分销等级:">
-                <el-select v-model="agent_level" placeholder="请选择分销等级" clearable class="form_content_width">
-                  <el-option value="all" label="全部"></el-option>
-                  <el-option
-                    :value="item.grade"
-                    v-for="(item, index) in membershipList"
-                    :key="index"
-                    :label="item.name"
-                  ></el-option>
-                </el-select>
-              </el-form-item>
-              <el-form-item label="用户标签:" label-for="label_id">
-                <div class="labelInput acea-row row-between-wrapper" v-db-click @click="openSelectLabel">
-                  <div style="width: 222px">
-                    <div v-if="selectDataLabel.length">
-                      <el-tag :closable="false" v-for="(item, index) in selectDataLabel" :key="index" class="mr10">{{
+	<div>
+		<el-card :bordered="false" shadow="never" class="ivu-mt" :body-style="{ padding: 0 }">
+			<div class="padding-add">
+				<el-form ref="userFrom" :model="userFrom" label-width="80px" label-position="right"
+					@submit.native.prevent inline>
+					<div class="acea-row search-form" v-if="!collapse">
+						<div>
+							<el-form-item label="用户搜索:" label-for="nickname">
+								<el-input v-model="userFrom.nickname" placeholder="请输入用户" clearable
+									class="form_content_width">
+									<el-select v-model="field_key" slot="prepend" style="width: 100px">
+										<el-option value="all" label="全部"></el-option>
+										<el-option value="uid" label="UID"></el-option>
+										<el-option value="phone" label="手机号"></el-option>
+										<el-option value="nickname" label="用户昵称"></el-option>
+									</el-select>
+								</el-input>
+							</el-form-item>
+							<el-form-item label="用户等级:" label-for="level">
+								<el-select v-model="level" placeholder="请选择用户等级" clearable class="form_content_width">
+									<el-option value="all" label="全部">全部</el-option>
+									<el-option :value="item.id" v-for="(item, index) in levelList" :key="index"
+										:label="item.name"></el-option>
+								</el-select>
+							</el-form-item>
+							<el-form-item label="用户分组:">
+								<el-select v-model="group_id" placeholder="请选择用户分组" clearable
+									class="form_content_width">
+									<el-option value="all" label="全部"></el-option>
+									<el-option :value="item.id" v-for="(item, index) in groupList" :key="index"
+										:label="item.group_name"></el-option>
+								</el-select>
+							</el-form-item>
+						</div>
+						<el-form-item class="search-form-sub">
+							<el-button type="primary" v-db-click @click="userSearchs">搜索</el-button>
+							<el-button class="ResetSearch" v-db-click @click="reset('userFrom')">重置</el-button>
+							<a class="ivu-ml-8 font12 ml10" v-db-click @click="collapse = !collapse">
+								<template v-if="!collapse"> 展开 <i class="el-icon-arrow-down" /> </template>
+								<template v-else> 收起 <i class="el-icon-arrow-up" /> </template>
+							</a>
+						</el-form-item>
+					</div>
+					<div v-if="collapse" class="acea-row search-form">
+						<div class="search-form-box">
+							<el-form-item label="用户搜索:" label-for="nickname">
+								<el-input v-model="userFrom.nickname" placeholder="请输入用户" clearable
+									class="form_content_width">
+									<el-select v-model="field_key" slot="prepend" style="width: 100px">
+										<el-option value="all" label="全部"></el-option>
+										<el-option value="uid" label="UID"></el-option>
+										<el-option value="phone" label="手机号"></el-option>
+										<el-option value="nickname" label="用户昵称"></el-option>
+									</el-select>
+								</el-input>
+							</el-form-item>
+							<el-form-item label="用户等级:" label-for="level">
+								<el-select v-model="level" placeholder="请选择用户等级" clearable class="form_content_width">
+									<el-option value="all" label="全部">全部</el-option>
+									<el-option :value="item.id" v-for="(item, index) in levelList" :key="index"
+										:label="item.name"></el-option>
+								</el-select>
+							</el-form-item>
+							<el-form-item label="用户分组:">
+								<el-select v-model="group_id" placeholder="请选择用户分组" clearable
+									class="form_content_width">
+									<el-option value="all" label="全部"></el-option>
+									<el-option :value="item.id" v-for="(item, index) in groupList" :key="index"
+										:label="item.group_name"></el-option>
+								</el-select>
+							</el-form-item>
+							<el-form-item label="分销等级:">
+								<el-select v-model="agent_level" placeholder="请选择分销等级" clearable
+									class="form_content_width">
+									<el-option value="all" label="全部"></el-option>
+									<el-option :value="item.grade" v-for="(item, index) in membershipList" :key="index"
+										:label="item.name"></el-option>
+								</el-select>
+							</el-form-item>
+							<el-form-item label="用户标签:" label-for="label_id">
+								<div class="labelInput acea-row row-between-wrapper" v-db-click
+									@click="openSelectLabel">
+									<div style="width: 222px">
+										<div v-if="selectDataLabel.length">
+											<el-tag :closable="false" v-for="(item, index) in selectDataLabel"
+												:key="index" class="mr10">{{
                         item.label_name
                       }}</el-tag>
-                    </div>
-                    <span class="span" v-else>选择用户关联标签</span>
-                  </div>
-                  <div class="ivu-icon ivu-icon-ios-arrow-down"></div>
-                </div>
-              </el-form-item>
-              <el-form-item label="用户身份:">
-                <el-select v-model="userFrom.is_promoter" placeholder="请选择" clearable class="form_content_width">
-                  <el-option value="" label="全部"></el-option>
-                  <el-option value="1" label="推广员"></el-option>
-                  <el-option value="0" label="普通用户"></el-option>
-                </el-select>
-              </el-form-item>
-              <el-form-item label="付费会员:" label-for="isMember">
-                <el-select v-model="userFrom.isMember" placeholder="请选择" clearable class="form_content_width">
-                  <el-option value="" label="全部"></el-option>
-                  <el-option value="1" label="是"></el-option>
-                  <el-option value="0" label="否"></el-option>
-                </el-select>
-              </el-form-item>
-              <el-form-item label="储值余额:" label-for="balance">
-                <el-input
-                  clearable
-                  placeholder="最小值"
-                  v-model="userFrom.balance[0]"
-                  class="form_range_content_width"
-                />
-                ~
-                <el-input
-                  clearable
-                  placeholder="最大值"
-                  v-model="userFrom.balance[1]"
-                  class="form_range_content_width"
-                />
-              </el-form-item>
-              <el-form-item label="积分剩余:" label-for="integral">
-                <el-input
-                  clearable
-                  placeholder="最小值"
-                  v-model="userFrom.integral[0]"
-                  class="form_range_content_width"
-                />
-                ~
-                <el-input
-                  clearable
-                  placeholder="最大值"
-                  v-model="userFrom.integral[1]"
-                  class="form_range_content_width"
-                />
-              </el-form-item>
-              <el-form-item label="上次消费:" label-for="before_pay_time">
-                <el-date-picker
-                  clearable
-                  v-model="before_pay_time"
-                  type="daterange"
-                  :editable="false"
-                  @change="(e) => onchangeTime(e, 'before_pay_time')"
-                  format="yyyy/MM/dd"
-                  value-format="yyyy/MM/dd"
-                  start-placeholder="开始日期"
-                  end-placeholder="结束日期"
-                  :picker-options="pickerOptions"
-                  style="width: 250px"
-                ></el-date-picker>
-              </el-form-item>
-              <el-form-item label="下单次数:" label-for="pay_count">
-                <el-input
-                  clearable
-                  placeholder="最小值"
-                  v-model="userFrom.pay_count_num[0]"
-                  class="form_range_content_width"
-                />
-                ~
-                <el-input
-                  clearable
-                  placeholder="最大值"
-                  v-model="userFrom.pay_count_num[1]"
-                  class="form_range_content_width"
-                />
-              </el-form-item>
-              <el-form-item label="消费金额:" label-for="store_name">
-                <el-input
-                  clearable
-                  placeholder="最小值"
-                  v-model="userFrom.pay_count_money[0]"
-                  class="form_range_content_width"
-                />
-                ~
-                <el-input
-                  clearable
-                  placeholder="最大值"
-                  v-model="userFrom.pay_count_money[1]"
-                  class="form_range_content_width"
-                />
-              </el-form-item>
-              <el-form-item label="充值次数:" label-for="store_name">
-                <el-input
-                  clearable
-                  placeholder="最小值"
-                  v-model="userFrom.recharge_count[0]"
-                  class="form_range_content_width"
-                />
-                ~
-                <el-input
-                  clearable
-                  placeholder="最大值"
-                  v-model="userFrom.recharge_count[1]"
-                  class="form_range_content_width"
-                />
-              </el-form-item>
-              <el-form-item label="访问情况:" label-for="user_time_type">
-                <el-select v-model="user_time_type" placeholder="请选择访问情况" clearable class="form_content_width">
-                  <el-option value="" label="全部"></el-option>
-                  <el-option value="visitno" label="时间段未访问"></el-option>
-                  <el-option value="visit" label="时间段访问过"></el-option>
-                  <el-option value="add_time" label="首次访问"></el-option>
-                </el-select>
-              </el-form-item>
-              <el-form-item label="访问时间:" label-for="user_time" v-if="user_time_type">
-                <el-date-picker
-                  clearable
-                  v-model="timeVal"
-                  type="daterange"
-                  :editable="false"
-                  @change="(e) => onchangeTime(e, 'user_time')"
-                  format="yyyy/MM/dd"
-                  value-format="yyyy/MM/dd"
-                  start-placeholder="开始日期"
-                  end-placeholder="结束日期"
-                  :picker-options="pickerOptions"
-                  style="width: 250px"
-                ></el-date-picker>
-              </el-form-item>
-              <!-- <el-form-item label="地区:" label-for="country">
+										</div>
+										<span class="span" v-else>选择用户关联标签</span>
+									</div>
+									<div class="ivu-icon ivu-icon-ios-arrow-down"></div>
+								</div>
+							</el-form-item>
+							<!-- //performance -->
+							<el-form-item label="用户身份:">
+								<el-select v-model="userFrom.is_promoter" placeholder="请选择" clearable
+									class="form_content_width">
+									<el-option value="" label="全部"></el-option>
+									<el-option value="1" label="推广员"></el-option>
+									<el-option value="0" label="普通用户"></el-option>
+								</el-select>
+							</el-form-item>
+							<el-form-item label="付费会员:" label-for="isMember">
+								<el-select v-model="userFrom.isMember" placeholder="请选择" clearable
+									class="form_content_width">
+									<el-option value="" label="全部"></el-option>
+									<el-option value="1" label="是"></el-option>
+									<el-option value="0" label="否"></el-option>
+								</el-select>
+							</el-form-item>
+							<el-form-item label="储值余额:" label-for="balance">
+								<el-input clearable placeholder="最小值" v-model="userFrom.balance[0]"
+									class="form_range_content_width" />
+								~
+								<el-input clearable placeholder="最大值" v-model="userFrom.balance[1]"
+									class="form_range_content_width" />
+							</el-form-item>
+							<el-form-item label="积分剩余:" label-for="integral">
+								<el-input clearable placeholder="最小值" v-model="userFrom.integral[0]"
+									class="form_range_content_width" />
+								~
+								<el-input clearable placeholder="最大值" v-model="userFrom.integral[1]"
+									class="form_range_content_width" />
+							</el-form-item>
+							<el-form-item label="上次消费:" label-for="before_pay_time">
+								<el-date-picker clearable v-model="before_pay_time" type="daterange" :editable="false"
+									@change="(e) => onchangeTime(e, 'before_pay_time')" format="yyyy/MM/dd"
+									value-format="yyyy/MM/dd" start-placeholder="开始日期" end-placeholder="结束日期"
+									:picker-options="pickerOptions" style="width: 250px"></el-date-picker>
+							</el-form-item>
+							<el-form-item label="下单次数:" label-for="pay_count">
+								<el-input clearable placeholder="最小值" v-model="userFrom.pay_count_num[0]"
+									class="form_range_content_width" />
+								~
+								<el-input clearable placeholder="最大值" v-model="userFrom.pay_count_num[1]"
+									class="form_range_content_width" />
+							</el-form-item>
+							<el-form-item label="消费金额:" label-for="store_name">
+								<el-input clearable placeholder="最小值" v-model="userFrom.pay_count_money[0]"
+									class="form_range_content_width" />
+								~
+								<el-input clearable placeholder="最大值" v-model="userFrom.pay_count_money[1]"
+									class="form_range_content_width" />
+							</el-form-item>
+							<el-form-item label="充值次数:" label-for="store_name">
+								<el-input clearable placeholder="最小值" v-model="userFrom.recharge_count[0]"
+									class="form_range_content_width" />
+								~
+								<el-input clearable placeholder="最大值" v-model="userFrom.recharge_count[1]"
+									class="form_range_content_width" />
+							</el-form-item>
+							<el-form-item label="访问情况:" label-for="user_time_type">
+								<el-select v-model="user_time_type" placeholder="请选择访问情况" clearable
+									class="form_content_width">
+									<el-option value="" label="全部"></el-option>
+									<el-option value="visitno" label="时间段未访问"></el-option>
+									<el-option value="visit" label="时间段访问过"></el-option>
+									<el-option value="add_time" label="首次访问"></el-option>
+								</el-select>
+							</el-form-item>
+							<el-form-item label="访问时间:" label-for="user_time" v-if="user_time_type">
+								<el-date-picker clearable v-model="timeVal" type="daterange" :editable="false"
+									@change="(e) => onchangeTime(e, 'user_time')" format="yyyy/MM/dd"
+									value-format="yyyy/MM/dd" start-placeholder="开始日期" end-placeholder="结束日期"
+									:picker-options="pickerOptions" style="width: 250px"></el-date-picker>
+							</el-form-item>
+							<!-- <el-form-item label="地区:" label-for="country">
                 <el-select
                   v-model="userFrom.country"
                   placeholder="请选择国家"
@@ -261,1160 +188,1190 @@
                   style="width: 250px"
                 ></el-cascader>
               </el-form-item> -->
-            </div>
+						</div>
 
-            <el-form-item class="search-form-sub">
-              <el-button type="primary" label="default" v-db-click @click="userSearchs">搜索</el-button>
-              <el-button class="ResetSearch" v-db-click @click="reset('userFrom')">重置</el-button>
-              <a class="ivu-ml-8 font12 ml10" v-db-click @click="collapse = !collapse">
-                <template v-if="!collapse"> 展开 <i class="el-icon-arrow-down" /> </template>
-                <template v-else> 收起 <i class="el-icon-arrow-up" /> </template>
-              </a>
-            </el-form-item>
-          </div>
-        </el-form>
-      </div>
-    </el-card>
-    <el-card :bordered="false" shadow="never" class="ivu-mt mt16" :body-style="{ padding: '0 20px 20px' }">
-      <el-tabs v-model="userFrom.user_type" @tab-click="onClickTab">
-        <el-tab-pane :label="item.name" :name="item.type" v-for="(item, index) in headeNum" :key="index" />
-      </el-tabs>
-      <el-row :gutter="24" justify="space-between">
-        <el-col :span="24">
-          <el-button v-auth="['admin-user-save']" type="primary" v-db-click @click="edit({ uid: 0 })"
-            >添加用户</el-button
-          >
-          <el-button v-auth="['admin-user-coupon']" v-db-click @click="onSend">发送优惠券</el-button>
-          <el-button
-            v-auth="['admin-wechat-news']"
-            class="greens mr10"
-            v-db-click
-            @click="onSendPic"
-            v-if="userFrom.user_type === 'wechat'"
-          >
-            发送图文消息
-          </el-button>
-          <el-button v-auth="['admin-user-group_set']" v-db-click @click="setGroup">批量设置分组</el-button>
-          <el-button v-auth="['admin-user-set_label']" v-db-click @click="setLabel">批量设置标签</el-button>
-          <el-button class="mr10" v-db-click @click="exportList">导出</el-button>
+						<el-form-item class="search-form-sub">
+							<el-button type="primary" label="default" v-db-click @click="userSearchs">搜索</el-button>
+							<el-button class="ResetSearch" v-db-click @click="reset('userFrom')">重置</el-button>
+							<a class="ivu-ml-8 font12 ml10" v-db-click @click="collapse = !collapse">
+								<template v-if="!collapse"> 展开 <i class="el-icon-arrow-down" /> </template>
+								<template v-else> 收起 <i class="el-icon-arrow-up" /> </template>
+							</a>
+						</el-form-item>
+					</div>
+				</el-form>
+			</div>
+		</el-card>
+		<el-card :bordered="false" shadow="never" class="ivu-mt mt16" :body-style="{ padding: '0 20px 20px' }">
+			<el-tabs v-model="userFrom.user_type" @tab-click="onClickTab">
+				<el-tab-pane :label="item.name" :name="item.type" v-for="(item, index) in headeNum" :key="index" />
+			</el-tabs>
+			<el-row :gutter="24" justify="space-between">
+				<el-col :span="24">
+					<el-button v-auth="['admin-user-save']" type="primary" v-db-click
+						@click="edit({ uid: 0 })">添加用户</el-button>
+					<el-button v-auth="['admin-user-coupon']" v-db-click @click="onSend">发送优惠券</el-button>
+					<el-button v-auth="['admin-wechat-news']" class="greens mr10" v-db-click @click="onSendPic"
+						v-if="userFrom.user_type === 'wechat'">
+						发送图文消息
+					</el-button>
+					<el-button v-auth="['admin-user-group_set']" v-db-click @click="setGroup">批量设置分组</el-button>
+					<el-button v-auth="['admin-user-set_label']" v-db-click @click="setLabel">批量设置标签</el-button>
+					<el-button class="mr10" v-db-click @click="exportList">导出</el-button>
 
-          <!-- <el-button v-auth="['admin-user-synchro']" class="mr20" v-db-click @click="synchro">同步公众号用户</el-button> -->
-        </el-col>
-        <el-col :span="24" class="userAlert" v-if="selectionList.length">
-          <el-alert show-icon>
-            <template slot="title">
-              已选择<i class="userI"> {{ selectionList.length }} </i>项
-            </template>
-          </el-alert>
-        </el-col>
-      </el-row>
-      <el-table
-        :data="userLists"
-        class="mt16"
-        ref="table"
-        highlight-current-row
-        v-loading="loading"
-        empty-text="暂无数据"
-        no-filtered-userFrom-text="暂无筛选结果"
-        @sort-change="sortChanged"
-        @select="handleSelectRow"
-        @select-all="handleSelectAll"
-      >
-        <el-table-column type="expand">
-          <template slot-scope="scope">
-            <expandRow :row="scope.row"></expandRow>
-          </template>
-        </el-table-column>
-        <el-table-column type="selection" :selectable="isSel" width="55"> </el-table-column>
-        <el-table-column label="用户ID" min-width="80">
-          <template slot-scope="scope">
-            <span>{{ scope.row.uid }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="头像" min-width="60">
-          <template slot-scope="scope">
-            <div class="tabBox_img" v-viewer>
-              <img v-lazy="scope.row.avatar" />
-            </div>
-          </template>
-        </el-table-column>
-        <el-table-column label="姓名" min-width="150">
-          <template slot-scope="scope">
-            <div class="acea-row">
-              <i class="el-icon-male" v-show="scope.row.sex === '男'" style="color: #2db7f5; font-size: 15px"></i>
-              <i class="el-icon-female" v-show="scope.row.sex === '女'" style="color: #ed4014; font-size: 15px"></i>
-              <div v-text="scope.row.nickname" class=""></div>
-            </div>
-            <div v-if="scope.row.is_del == 1" style="color: red">用户已注销</div>
-          </template>
-        </el-table-column>
-        <el-table-column label="付费会员" min-width="90">
-          <template slot-scope="scope">
-            <div>{{ scope.row.isMember ? '是' : '否' }}</div>
-          </template>
-        </el-table-column>
-        <el-table-column label="用户等级" min-width="90">
-          <template slot-scope="scope">
-            <div>{{ scope.row.level }}</div>
-          </template>
-        </el-table-column>
-        <el-table-column label="分组" min-width="100">
+					<!-- <el-button v-auth="['admin-user-synchro']" class="mr20" v-db-click @click="synchro">同步公众号用户</el-button> -->
+				</el-col>
+				<el-col :span="24" class="userAlert" v-if="selectionList.length">
+					<el-alert show-icon>
+						<template slot="title">
+							已选择<i class="userI"> {{ selectionList.length }} </i>项
+						</template>
+					</el-alert>
+				</el-col>
+			</el-row>
+			<el-table :data="userLists" class="mt16" ref="table" highlight-current-row v-loading="loading"
+				empty-text="暂无数据" no-filtered-userFrom-text="暂无筛选结果" @sort-change="sortChanged"
+				@select="handleSelectRow" @select-all="handleSelectAll">
+				<el-table-column type="expand">
+					<template slot-scope="scope">
+						<expandRow :row="scope.row"></expandRow>
+					</template>
+				</el-table-column>
+				<el-table-column type="selection" :selectable="isSel" width="55"> </el-table-column>
+				<el-table-column label="用户ID" min-width="80">
+					<template slot-scope="scope">
+						<span>{{ scope.row.uid }}</span>
+					</template>
+				</el-table-column>
+				<el-table-column label="头像" min-width="60">
+					<template slot-scope="scope">
+						<div class="tabBox_img" v-viewer>
+							<img v-lazy="scope.row.avatar" />
+						</div>
+					</template>
+				</el-table-column>
+				<el-table-column label="姓名" min-width="150">
+					<template slot-scope="scope">
+						<div class="acea-row">
+							<i class="el-icon-male" v-show="scope.row.sex === '男'"
+								style="color: #2db7f5; font-size: 15px"></i>
+							<i class="el-icon-female" v-show="scope.row.sex === '女'"
+								style="color: #ed4014; font-size: 15px"></i>
+							<div v-text="scope.row.nickname" class=""></div>
+						</div>
+						<div v-if="scope.row.is_del == 1" style="color: red">用户已注销</div>
+					</template>
+				</el-table-column>
+				<el-table-column label="团队业绩" min-width="90">
+					<template slot-scope="scope">
+						<div>{{ scope.row.performance }}</div>
+					</template>
+				</el-table-column>
+				<el-table-column label="新增业绩" min-width="90">
+					<template slot-scope="scope">
+						<div>{{ scope.row.performance_add}}</div>
+					</template>
+				</el-table-column>
+				<el-table-column label="是否服务中心" min-width="90">
+					<template slot-scope="scope">
+						<div>{{ scope.row.is_sc ? '是' : '否' }}</div>
+					</template>
+				</el-table-column>
+				<el-table-column label="pv值" min-width="90">
+					<template slot-scope="scope">
+						<div>{{ scope.row.pv}}</div>
+					</template>
+				</el-table-column>
+				<el-table-column label="用户等级" min-width="90">
+					<template slot-scope="scope">
+						<div>{{ scope.row.level }}</div>
+					</template>
+				</el-table-column>
+				<!-- <el-table-column label="分组" min-width="100">
           <template slot-scope="scope">
             <div>{{ scope.row.group_id }}</div>
           </template>
-        </el-table-column>
-        <el-table-column label="分销等级" min-width="100">
-          <template slot-scope="scope">
-            <div>{{ scope.row.agent_level_name }}</div>
-          </template>
-        </el-table-column>
-        <el-table-column label="手机号" min-width="100">
-          <template slot-scope="scope">
-            <div>{{ scope.row.phone }}</div>
-          </template>
-        </el-table-column>
-        <el-table-column label="用户类型" min-width="100">
-          <template slot-scope="scope">
-            <div>{{ scope.row.user_type }}</div>
-          </template>
-        </el-table-column>
-        <el-table-column label="上级用户" min-width="100">
-          <template slot-scope="scope">
-            <div>{{ scope.row.spread_uid_nickname }}</div>
-          </template>
-        </el-table-column>
-        <el-table-column label="余额" prop="now_money" min-width="100" :sortable="true">
-          <template slot-scope="scope">
-            <div>{{ scope.row.now_money }}</div>
-          </template>
-        </el-table-column>
-        <el-table-column label="操作" fixed="right" width="120">
-          <template slot-scope="scope">
-            <template v-if="scope.row.is_del != 1">
-              <a v-db-click @click="userDetail(scope.row)">详情</a>
+        </el-table-column> -->
+				<el-table-column label="分销等级" min-width="100">
+					<template slot-scope="scope">
+						<div>{{ scope.row.agent_level_name }}</div>
+					</template>
+				</el-table-column>
+				<el-table-column label="手机号" min-width="100">
+					<template slot-scope="scope">
+						<div>{{ scope.row.phone }}</div>
+					</template>
+				</el-table-column>
+				<el-table-column label="用户类型" min-width="100">
+					<template slot-scope="scope">
+						<div>{{ scope.row.user_type }}</div>
+					</template>
+				</el-table-column>
+				<el-table-column label="上级用户" min-width="100">
+					<template slot-scope="scope">
+						<div>{{ scope.row.spread_uid_nickname }}</div>
+					</template>
+				</el-table-column>
+				<el-table-column label="余额" prop="now_money" min-width="100" :sortable="true">
+					<template slot-scope="scope">
+						<div>{{ scope.row.now_money }}</div>
+					</template>
+				</el-table-column>
+				<el-table-column label="操作" fixed="right" width="120">
+					<template slot-scope="scope">
+						<template v-if="scope.row.is_del != 1">
+							<a v-db-click @click="userDetail(scope.row)">详情</a>
 
-              <el-divider direction="vertical"></el-divider>
-              <el-dropdown size="small" @command="changeMenu(scope.row, $event, scope.$index)" :transfer="true">
-                <span class="el-dropdown-link">更多<i class="el-icon-arrow-down el-icon--right"></i> </span>
-                <el-dropdown-menu slot="dropdown">
-                  <!-- <el-dropdown-item command="1">编辑</el-dropdown-item> -->
-                  <el-dropdown-item command="2">修改余额</el-dropdown-item>
-                  <el-dropdown-item command="8">修改积分</el-dropdown-item>
-                  <el-dropdown-item command="3">赠送会员</el-dropdown-item>
-                  <!--                                <el-dropdown-item command="4" v-if="row.vip_name">清除等级</el-dropdown-item>-->
-                  <el-dropdown-item command="5">设置分组</el-dropdown-item>
-                  <el-dropdown-item command="6">设置标签</el-dropdown-item>
-                  <el-dropdown-item command="7">修改上级推广人</el-dropdown-item>
-                  <el-dropdown-item command="99" v-if="scope.row.spread_uid">清除上级推广人</el-dropdown-item>
-                </el-dropdown-menu>
-              </el-dropdown>
-            </template>
-            <template v-else>
-              <a v-db-click @click="userDetail(scope.row)">详情</a>
-            </template>
-          </template>
-        </el-table-column>
-      </el-table>
+							<el-divider direction="vertical"></el-divider>
+							<el-dropdown size="small" @command="changeMenu(scope.row, $event, scope.$index)"
+								:transfer="true">
+								<span class="el-dropdown-link">更多<i class="el-icon-arrow-down el-icon--right"></i>
+								</span>
+								<el-dropdown-menu slot="dropdown">
+									<!-- <el-dropdown-item command="1">编辑</el-dropdown-item> -->
+									<el-dropdown-item command="2">修改余额</el-dropdown-item>
+									<el-dropdown-item command="8">修改积分</el-dropdown-item>
+									<el-dropdown-item command="3">赠送会员</el-dropdown-item>
+									<!--                                <el-dropdown-item command="4" v-if="row.vip_name">清除等级</el-dropdown-item>-->
+									<el-dropdown-item command="5">设置分组</el-dropdown-item>
+									<el-dropdown-item command="6">设置标签</el-dropdown-item>
+									<el-dropdown-item command="7">修改上级推广人</el-dropdown-item>
+									<el-dropdown-item command="99"
+										v-if="scope.row.spread_uid">清除上级推广人</el-dropdown-item>
+									<!-- <el-dropdown-item command="9">清除分销等级</el-dropdown-item> -->
+								</el-dropdown-menu>
+							</el-dropdown>
+						</template>
+						<template v-else>
+							<a v-db-click @click="userDetail(scope.row)">详情</a>
+						</template>
+					</template>
+				</el-table-column>
+			</el-table>
 
-      <div class="acea-row row-right page">
-        <pagination
-          v-if="total"
-          :total="total"
-          :page.sync="userFrom.page"
-          :limit.sync="userFrom.limit"
-          @pagination="pageChange"
-        />
-      </div>
-    </el-card>
-    <!-- 编辑表单 积分余额-->
-    <edit-from ref="edits" :FromData="FromData" @submitFail="submitFail"></edit-from>
-    <!-- 发送优惠券-->
-    <send-from ref="sends" :userIds="ids.toString()"></send-from>
-    <!-- 会员详情-->
-    <user-details ref="userDetails"></user-details>
-    <!--发送图文消息 -->
-    <el-dialog :visible.sync="modal13" title="发送消息" width="1200px" class="modelBox">
-      <news-category
-        v-if="modal13"
-        :isShowSend="isShowSend"
-        :userIds="ids.toString()"
-        :scrollerHeight="scrollerHeight"
-        :contentTop="contentTop"
-        :contentWidth="contentWidth"
-        :maxCols="maxCols"
-      ></news-category>
-    </el-dialog>
-    <!--修改推广人-->
-    <el-dialog :visible.sync="promoterShow" title="修改推广人" width="540px" :show-close="true">
-      <el-form ref="formInline" :model="formInline" label-width="100px" @submit.native.prevent>
-        <el-form-item v-if="formInline" label="选择推广人:" prop="image">
-          <div class="picBox" v-db-click @click="customer">
-            <div class="pictrue" v-if="formInline.image">
-              <img v-lazy="formInline.image" />
-            </div>
-            <div class="upLoad acea-row row-center-wrapper" v-else>
-              <i class="el-icon-user"></i>
-            </div>
-          </div>
-        </el-form-item>
-      </el-form>
-      <div class="acea-row row-right mt20">
-        <el-button v-db-click @click="cancel('formInline')">取消</el-button>
-        <el-button type="primary" v-db-click @click="putSend('formInline')">提交</el-button>
-      </div>
-    </el-dialog>
-    <el-dialog :visible.sync="customerShow" title="请选择商城用户" :show-close="true" width="1000px">
-      <customerInfo v-if="customerShow" @imageObject="imageObject"></customerInfo>
-    </el-dialog>
-    <el-dialog :visible.sync="labelShow" append-to-body title="请选择用户标签" width="540px" :show-close="true">
-      <userLabel
-        v-if="labelShow"
-        :uid="labelActive.uid"
-        :only_get="!labelActive.uid"
-        @close="labelClose"
-        @activeData="activeData"
-        @onceGetList="onceGetList"
-      ></userLabel>
-    </el-dialog>
-    <el-drawer
-      custom-class="demo-drawer"
-      :visible.sync="modals"
-      :wrapperClosable="false"
-      size="720"
-      title="用户信息填写"
-    >
-      <div class="demo-drawer__content">
-        <userEdit ref="userEdit" v-if="modals" :userData="userData"></userEdit>
-        <div class="fix_footer acea-row row-center">
-          <el-button v-db-click @click="modals = false">取消</el-button>
-          <el-button type="primary" v-db-click @click="setUser">提交</el-button>
-        </div>
-      </div>
-    </el-drawer>
-    <!-- 用户标签 -->
-    <el-dialog
-      :visible.sync="selectLabelShow"
-      append-to-body
-      title="请选择用户标签"
-      width="540px"
-      :show-close="true"
-      :close-on-click-modal="false"
-    >
-      <userLabel
-        v-if="selectLabelShow"
-        :uid="0"
-        ref="userLabel"
-        :only_get="true"
-        :selectDataLabel="selectDataLabel"
-        @activeData="activeSelectData"
-        @close="labelClose"
-      ></userLabel>
-    </el-dialog>
-  </div>
+			<div class="acea-row row-right page">
+				<pagination v-if="total" :total="total" :page.sync="userFrom.page" :limit.sync="userFrom.limit"
+					@pagination="pageChange" />
+			</div>
+		</el-card>
+		<!-- 编辑表单 积分余额-->
+		<edit-from ref="edits" :FromData="FromData" @submitFail="submitFail"></edit-from>
+		<!-- 发送优惠券-->
+		<send-from ref="sends" :userIds="ids.toString()"></send-from>
+		<!-- 会员详情-->
+		<user-details ref="userDetails"></user-details>
+		<!--发送图文消息 -->
+		<el-dialog :visible.sync="modal13" title="发送消息" width="1200px" class="modelBox">
+			<news-category v-if="modal13" :isShowSend="isShowSend" :userIds="ids.toString()"
+				:scrollerHeight="scrollerHeight" :contentTop="contentTop" :contentWidth="contentWidth"
+				:maxCols="maxCols"></news-category>
+		</el-dialog>
+		<!--修改推广人-->
+		<el-dialog :visible.sync="promoterShow" title="修改推广人" width="540px" :show-close="true">
+			<el-form ref="formInline" :model="formInline" label-width="100px" @submit.native.prevent>
+				<el-form-item v-if="formInline" label="选择推广人:" prop="image">
+					<div class="picBox" v-db-click @click="customer">
+						<div class="pictrue" v-if="formInline.image">
+							<img v-lazy="formInline.image" />
+						</div>
+						<div class="upLoad acea-row row-center-wrapper" v-else>
+							<i class="el-icon-user"></i>
+						</div>
+					</div>
+				</el-form-item>
+			</el-form>
+			<div class="acea-row row-right mt20">
+				<el-button v-db-click @click="cancel('formInline')">取消</el-button>
+				<el-button type="primary" v-db-click @click="putSend('formInline')">提交</el-button>
+			</div>
+		</el-dialog>
+		<el-dialog :visible.sync="customerShow" title="请选择商城用户" :show-close="true" width="1000px">
+			<customerInfo v-if="customerShow" @imageObject="imageObject"></customerInfo>
+		</el-dialog>
+		<el-dialog :visible.sync="labelShow" append-to-body title="请选择用户标签" width="540px" :show-close="true">
+			<userLabel v-if="labelShow" :uid="labelActive.uid" :only_get="!labelActive.uid" @close="labelClose"
+				@activeData="activeData" @onceGetList="onceGetList"></userLabel>
+		</el-dialog>
+		<el-drawer custom-class="demo-drawer" :visible.sync="modals" :wrapperClosable="false" size="720" title="用户信息填写">
+			<div class="demo-drawer__content">
+				<userEdit ref="userEdit" v-if="modals" :userData="userData"></userEdit>
+				<div class="fix_footer acea-row row-center">
+					<el-button v-db-click @click="modals = false">取消</el-button>
+					<el-button type="primary" v-db-click @click="setUser">提交</el-button>
+				</div>
+			</div>
+		</el-drawer>
+		<!-- 用户标签 -->
+		<el-dialog :visible.sync="selectLabelShow" append-to-body title="请选择用户标签" width="540px" :show-close="true"
+			:close-on-click-modal="false">
+			<userLabel v-if="selectLabelShow" :uid="0" ref="userLabel" :only_get="true"
+				:selectDataLabel="selectDataLabel" @activeData="activeSelectData" @close="labelClose"></userLabel>
+		</el-dialog>
+	</div>
 </template>
 
 <script>
-import userLabel from '@/components/userLabel';
-import { mapState } from 'vuex';
-import expandRow from './tableExpand.vue';
-import userEdit from './handle/userEdit.vue';
-import {
-  userList,
-  getUserData,
-  isShowApi,
-  editOtherApi,
-  giveLevelApi,
-  userSetGroup,
-  userGroupApi,
-  levelListApi,
-  userSetLabelApi,
-  userLabelApi,
-  userSynchro,
-  getUserSaveForm,
-  giveLevelTimeApi,
-  getUserInfo,
-  setUser,
-  editUser,
-  saveSetLabel,
-} from '@/api/user';
-import { agentSpreadApi } from '@/api/agent';
-import { exportUserList } from '@/api/export';
-import editFrom from '../../../components/from/from';
-import sendFrom from '@/components/sendCoupons/index';
-import userDetails from './handle/userDetails';
-import newsCategory from '@/components/newsCategory/index';
-import customerInfo from '@/components/customerInfo';
-import { cityList } from '@/api/app';
-import { membershipDataListApi } from '@/api/membershipLevel';
+	import userLabel from '@/components/userLabel';
+	import {
+		mapState
+	} from 'vuex';
+	import expandRow from './tableExpand.vue';
+	import userEdit from './handle/userEdit.vue';
+	import {
+		userList,
+		getUserData,
+		isShowApi,
+		editOtherApi,
+		giveLevelApi,
+		userSetGroup,
+		userGroupApi,
+		levelListApi,
+		userSetLabelApi,
+		userLabelApi,
+		userSynchro,
+		getUserSaveForm,
+		giveLevelTimeApi,
+		getUserInfo,
+		setUser,
+		editUser,
+		saveSetLabel,
+	} from '@/api/user';
+	import {
+		agentSpreadApi
+	} from '@/api/agent';
+	import {
+		exportUserList
+	} from '@/api/export';
+	import editFrom from '../../../components/from/from';
+	import sendFrom from '@/components/sendCoupons/index';
+	import userDetails from './handle/userDetails';
+	import newsCategory from '@/components/newsCategory/index';
+	import customerInfo from '@/components/customerInfo';
+	import {
+		cityList
+	} from '@/api/app';
+	import {
+		membershipDataListApi
+	} from '@/api/membershipLevel';
 
-export default {
-  name: 'user_list',
-  components: {
-    expandRow,
-    editFrom,
-    sendFrom,
-    userDetails,
-    newsCategory,
-    customerInfo,
-    userLabel,
-    userEdit,
-  },
-  data() {
-    return {
-      dataLabel: [],
-      selectDataLabel: [],
-      userData: {},
-      modals: false,
-      selectLabelShow: false,
-      labelShow: false,
-      customerShow: false,
-      promoterShow: false,
-      labelActive: {
-        uid: 0,
-      },
-      formInline: {
-        uid: 0,
-        spread_uid: 0,
-        image: '',
-      },
-      pickerOptions: this.$timeOptions,
-      collapse: false,
-      headeNum: [
-        { type: '', name: '全部' },
-        { type: 'wechat', name: '微信公众号' },
-        { type: 'routine', name: '微信小程序' },
-        { type: 'h5', name: 'H5' },
-        { type: 'pc', name: 'PC' },
-        { type: 'app', name: 'APP' },
-      ],
-      address: [],
-      addresData: [],
-      isShowSend: true,
-      modal13: false,
-      maxCols: 4,
-      scrollerHeight: '600',
-      contentTop: '130',
-      contentWidth: '98%',
-      grid: {
-        xl: 6,
-        lg: 6,
-        md: 8,
-        sm: 12,
-        xs: 24,
-      },
-      grid2: {
-        xl: 8,
-        lg: 8,
-        md: 8,
-        sm: 12,
-        xs: 24,
-      },
-      loading: false,
-      total: 0,
-      userFrom: {
-        label_id: '',
-        user_type: '',
-        status: '',
-        sex: '',
-        is_promoter: '',
-        country: '',
-        isMember: '',
-        pay_count_num: ['', ''],
-        balance: ['', ''],
-        integral: ['', ''],
-        pay_count_money: ['', ''],
-        recharge_count: ['', ''],
-        user_time_type: '',
-        user_time: '',
-        before_pay_time: '',
-        nickname: '',
-        province: '',
-        city: '',
-        page: 1,
-        limit: 15,
-        level: '',
-        group_id: '',
-        agent_level: '',
-        field_key: '',
-      },
-      before_pay_time: '',
-      field_key: '',
-      level: '',
-      group_id: '',
-      agent_level: '',
-      label_id: '',
-      user_time_type: '',
-      pay_count: '',
-      userLists: [],
-      FromData: null,
-      selectionList: [],
-      user_ids: '',
-      selectedData: [],
-      timeVal: [],
-      groupList: [],
-      levelList: [],
-      membershipList: [],
-      labelFrom: {
-        page: 1,
-        limit: '',
-      },
-      labelLists: [],
-      selectedIds: [], //选中合并项的id
-      ids: [],
-    };
-  },
-  computed: {
-    ...mapState('media', ['isMobile']),
-  },
-  created() {
-    this.getList();
-    this.getCityList();
-  },
-  mounted() {
-    this.userGroup();
-    this.levelLists();
-    this.membershipDataList();
-    // this.groupLists();
-  },
-  methods: {
-    getCityList() {
-      cityList().then((res) => {
-        this.addresData = res.data;
-      });
-    },
-    setUser() {
-      let data = this.$refs.userEdit.formItem;
-      let ids = [];
-      this.$refs.userEdit.dataLabel.map((i) => {
-        ids.push(i.id);
-      });
-      data.label_id = ids;
-      // if (!data.real_name) return this.$message.warning("请输入真实姓名");
-      // if (!data.phone) return this.$message.warning("请输入手机号");
-      // if (!data.pwd) return this.$message.warning("请输入密码");
-      // if (!data.true_pwd) return this.$message.warning("请输入确认密码");
-      if (data.uid) {
-        editUser(data)
-          .then((res) => {
-            this.modals = false;
-            this.$message.success(res.msg);
-            this.getList();
-          })
-          .catch((err) => {
-            this.$message.error(err);
-          });
-      } else {
-        setUser(data)
-          .then((res) => {
-            this.modals = false;
-            this.$message.success(res.msg);
-            this.getList();
-          })
-          .catch((err) => {
-            this.$message.error(err.msg);
-          });
-      }
-    },
-    onceGetList() {
-      this.labelActive.uid = 0;
-      this.getList();
-    },
-    // 标签弹窗关闭
-    labelClose() {
-      this.labelActive.uid = 0;
-      this.labelShow = false;
-      this.selectLabelShow = false;
-    },
-    // 提交
-    putSend(name) {
-      this.$refs[name].validate((valid) => {
-        if (valid) {
-          if (!this.formInline.spread_uid) {
-            return this.$message.error('请上传用户');
-          }
-          agentSpreadApi(this.formInline)
-            .then((res) => {
-              this.promoterShow = false;
-              this.$message.success(res.msg);
-              this.getList();
-              this.$refs[name].resetFields();
-            })
-            .catch((res) => {
-              this.$message.error(res.msg);
-            });
-        }
-      });
-    },
+	export default {
+		name: 'user_list',
+		components: {
+			expandRow,
+			editFrom,
+			sendFrom,
+			userDetails,
+			newsCategory,
+			customerInfo,
+			userLabel,
+			userEdit,
+		},
+		data() {
+			return {
+				dataLabel: [],
+				selectDataLabel: [],
+				userData: {},
+				modals: false,
+				selectLabelShow: false,
+				labelShow: false,
+				customerShow: false,
+				promoterShow: false,
+				labelActive: {
+					uid: 0,
+				},
+				formInline: {
+					uid: 0,
+					spread_uid: 0,
+					image: '',
+				},
+				pickerOptions: this.$timeOptions,
+				collapse: false,
+				headeNum: [{
+						type: '',
+						name: '全部'
+					},
+					{
+						type: 'wechat',
+						name: '微信公众号'
+					},
+					{
+						type: 'routine',
+						name: '微信小程序'
+					},
+					{
+						type: 'h5',
+						name: 'H5'
+					},
+					{
+						type: 'pc',
+						name: 'PC'
+					},
+					{
+						type: 'app',
+						name: 'APP'
+					},
+				],
+				address: [],
+				addresData: [],
+				isShowSend: true,
+				modal13: false,
+				maxCols: 4,
+				scrollerHeight: '600',
+				contentTop: '130',
+				contentWidth: '98%',
+				grid: {
+					xl: 6,
+					lg: 6,
+					md: 8,
+					sm: 12,
+					xs: 24,
+				},
+				grid2: {
+					xl: 8,
+					lg: 8,
+					md: 8,
+					sm: 12,
+					xs: 24,
+				},
+				loading: false,
+				total: 0,
+				userFrom: {
+					label_id: '',
+					user_type: '',
+					status: '',
+					sex: '',
+					is_promoter: '',
+					country: '',
+					isMember: '',
+					pay_count_num: ['', ''],
+					balance: ['', ''],
+					integral: ['', ''],
+					pay_count_money: ['', ''],
+					recharge_count: ['', ''],
+					user_time_type: '',
+					user_time: '',
+					before_pay_time: '',
+					nickname: '',
+					province: '',
+					city: '',
+					page: 1,
+					limit: 15,
+					level: '',
+					group_id: '',
+					agent_level: '',
+					field_key: '',
+				},
+				before_pay_time: '',
+				field_key: '',
+				level: '',
+				group_id: '',
+				agent_level: '',
+				label_id: '',
+				user_time_type: '',
+				pay_count: '',
+				userLists: [],
+				FromData: null,
+				selectionList: [],
+				user_ids: '',
+				selectedData: [],
+				timeVal: [],
+				groupList: [],
+				levelList: [],
+				membershipList: [],
+				labelFrom: {
+					page: 1,
+					limit: '',
+				},
+				labelLists: [],
+				selectedIds: [], //选中合并项的id
+				ids: [],
+			};
+		},
+		computed: {
+			...mapState('media', ['isMobile']),
+		},
+		created() {
+			this.getList();
+			this.getCityList();
+		},
+		mounted() {
+			this.userGroup();
+			this.levelLists();
+			this.membershipDataList();
+			// this.groupLists();
+		},
+		methods: {
+			getCityList() {
+				cityList().then((res) => {
+					this.addresData = res.data;
+				});
+			},
+			setUser() {
+				let data = this.$refs.userEdit.formItem;
+				let ids = [];
+				this.$refs.userEdit.dataLabel.map((i) => {
+					ids.push(i.id);
+				});
+				data.label_id = ids;
+				// if (!data.real_name) return this.$message.warning("请输入真实姓名");
+				// if (!data.phone) return this.$message.warning("请输入手机号");
+				// if (!data.pwd) return this.$message.warning("请输入密码");
+				// if (!data.true_pwd) return this.$message.warning("请输入确认密码");
+				if (data.uid) {
+					editUser(data)
+						.then((res) => {
+							this.modals = false;
+							this.$message.success(res.msg);
+							this.getList();
+						})
+						.catch((err) => {
+							this.$message.error(err);
+						});
+				} else {
+					setUser(data)
+						.then((res) => {
+							this.modals = false;
+							this.$message.success(res.msg);
+							this.getList();
+						})
+						.catch((err) => {
+							this.$message.error(err.msg);
+						});
+				}
+			},
+			onceGetList() {
+				this.labelActive.uid = 0;
+				this.getList();
+			},
+			// 标签弹窗关闭
+			labelClose() {
+				this.labelActive.uid = 0;
+				this.labelShow = false;
+				this.selectLabelShow = false;
+			},
+			// 提交
+			putSend(name) {
+				this.$refs[name].validate((valid) => {
+					if (valid) {
+						if (!this.formInline.spread_uid) {
+							return this.$message.error('请上传用户');
+						}
+						agentSpreadApi(this.formInline)
+							.then((res) => {
+								this.promoterShow = false;
+								this.$message.success(res.msg);
+								this.getList();
+								this.$refs[name].resetFields();
+							})
+							.catch((res) => {
+								this.$message.error(res.msg);
+							});
+					}
+				});
+			},
 
-    save() {
-      this.modals = true;
+			save() {
+				this.modals = true;
 
-      // this.$modalForm(getUserSaveForm())
-      //   .then(() => {
-      //     this.userFrom.page = 1;
-      //     this.getList();
-      //   })
-      //   .catch((res) => {
-      //     this.$message.error(res.msg);
-      //   });
-    },
-    synchro() {
-      userSynchro()
-        .then((res) => {
-          this.$message.success(res.msg);
-        })
-        .catch((res) => {
-          this.$message.error(res.msg);
-        });
-    },
-    isSel(row) {
-      return !!!row.is_del;
-    },
-    // 分组列表
-    groupLists() {
-      this.loading = true;
-      userLabelApi(this.labelFrom)
-        .then(async (res) => {
-          let data = res.data;
-          this.labelLists = data.list;
-        })
-        .catch((res) => {
-          this.loading = false;
-          this.$message.error(res.msg);
-        });
-    },
-    onClickTab() {
-      this.userFrom.page = 1;
-      this.getList();
-    },
-    userGroup() {
-      let data = {
-        page: 1,
-        limit: '',
-      };
-      userGroupApi(data).then((res) => {
-        this.groupList = res.data.list;
-      });
-    },
-    levelLists() {
-      let data = {
-        page: 1,
-        limit: '',
-        title: '',
-        is_show: 1,
-      };
-      levelListApi(data).then((res) => {
-        this.levelList = res.data.list;
-      });
-    },
-    membershipDataList() {
-      let data = {
-        page: 1,
-        limit: 0,
-        staus: 1,
-      };
-      membershipDataListApi(data).then((res) => {
-        this.membershipList = res.data.list;
-      });
-    },
-    // 批量设置分组;
-    setGroup() {
-      if (this.ids.length === 0) {
-        this.$message.warning('请选择要设置分组的用户');
-      } else {
-        let uids = { uids: this.ids };
-        this.$modalForm(userSetGroup(uids)).then(() => {
-          this.ids = [];
-          this.selectedIds = [];
-          this.getList();
-        });
-      }
-    },
-    // 批量设置标签;
-    setLabel() {
-      if (this.ids.length === 0) {
-        this.$message.warning('请选择要设置标签的用户');
-      } else {
-        let uids = { uids: this.ids };
-        this.labelActive.uid = 0;
-        this.labelShow = true;
-        // this.$modalForm(userSetLabelApi(uids)).then(() =>
-        //   this.$refs.sends.getList()
-        // );
-      }
-    },
-    activeSelectData(data) {
-      this.selectLabelShow = false;
-      this.selectDataLabel = data || [];
-      if (this.selectDataLabel.length) {
-        let activeIds = [];
-        this.selectDataLabel.map((item) => {
-          activeIds.push(item.id);
-        });
-        this.userFrom.label_id = activeIds.join(',');
-        this.getList();
-      } else {
-        this.userFrom.label_id = '';
-      }
-    },
-    handleClose(tag) {
-      let i = this.selectDataLabel.findIndex((item) => item.id === tag.id);
-      if (i !== -1) {
-        this.selectDataLabel.splice(i, 1);
-      }
-      this.$nextTick(() => {
-        if (this.selectDataLabel.length) {
-          let activeIds = [];
-          this.selectDataLabel.map((item) => {
-            activeIds.push(item.id);
-          });
-          this.userFrom.label_id = activeIds.join(',');
-        } else {
-          this.userFrom.label_id = '';
-        }
-      });
-      // this.userSearchs();
-    },
-    // 批量设置标签
-    activeData(data) {
-      let labels = [];
-      if (!data.length) return;
-      data.map((i) => {
-        labels.push(i.id);
-      });
-      saveSetLabel({
-        uids: this.ids.join(','),
-        label_id: labels,
-      }).then((res) => {
-        this.labelShow = false;
-        this.selectedIds = new Set();
-        this.getList();
-        this.$message.success(res.msg);
-      });
-    },
-    //是否为付费会员;
-    changeMember() {
-      this.userFrom.page = 1;
-      this.getList();
-    },
-    // 选择国家
-    changeCountry() {
-      if (this.userFrom.country === 'abroad' || !this.userFrom.country) {
-        this.selectedData = [];
-        this.userFrom.province = '';
-        this.userFrom.city = '';
-        this.address = [];
-      }
-    },
-    // 选择地址
-    handleChange(selectedData) {
-      this.selectedData = selectedData.map((o) => o.label);
-      this.userFrom.province = this.selectedData[0];
-      this.userFrom.city = this.selectedData[1];
-    },
-    // 具体日期
-    onchangeTime(e, type) {
-      this.userFrom[type] = e ? e.join('-') : '';
-    },
-    userDetail(row) {
-      this.$refs.userDetails.modals = true;
-      this.$refs.userDetails.getDetails(row.uid);
-    },
-    // 操作
-    changeMenu(row, name, index) {
-      let uid = [];
-      uid.push(row.uid);
-      let uids = { uids: uid };
-      switch (name) {
-        case '1':
-          this.edit(row);
-          break;
-        case '2':
-          this.getOtherFrom(row.uid, 'money');
-          break;
-        case '3':
-          this.giveLevelTime(row.uid);
-          break;
-        case '4':
-          this.del(row, '清除 【 ' + this.tenText(row.nickname) + ' 】的会员等级', index, 'user');
-          break;
-        case '5':
-          this.$modalForm(userSetGroup(uids)).then(() => this.getList());
-          break;
-        case '6':
-          this.openLabel(row);
-          break;
-        case '7':
-          this.editS(row);
-          break;
-        case '8':
-          this.getOtherFrom(row.uid, 'point');
-          break;
-        default:
-          this.del(row, '解除【 ' + this.tenText(row.nickname) + ' 】的上级推广人', index, 'tuiguang');
-      }
-    },
-    tenText(str) {
-      if (str.length > 10) {
-        //如果字符长度超过10,后面的字符就变成...可自行调整长度和代替字符
-        str = str.substr(0, 10) + '...'; //截取从第一个字符开始,往后取10个字符,剩余的用...代替
-      }
-      return str;
-    },
-    openLabel(row) {
-      this.labelShow = true;
-      this.labelActive.uid = row.uid;
-    },
-    openSelectLabel() {
-      this.selectLabelShow = true;
-    },
-    editS(row) {
-      this.promoterShow = true;
-      this.formInline.uid = row.uid;
-    },
-    customer() {
-      this.customerShow = true;
-    },
-    imageObject(e) {
-      this.customerShow = false;
-      this.formInline.spread_uid = e.uid;
-      this.formInline.image = e.image;
-    },
-    cancel(name) {
-      this.promoterShow = false;
-      this.$refs[name].resetFields();
-      this.formInline = {
-        uid: 0,
-        spread_uid: 0,
-        image: '',
-      };
-    },
-    // 赠送会员等级
-    giveLevel(id) {
-      this.$modalForm(giveLevelApi(id)).then(() => this.getList(1));
+				// this.$modalForm(getUserSaveForm())
+				//   .then(() => {
+				//     this.userFrom.page = 1;
+				//     this.getList();
+				//   })
+				//   .catch((res) => {
+				//     this.$message.error(res.msg);
+				//   });
+			},
+			synchro() {
+				userSynchro()
+					.then((res) => {
+						this.$message.success(res.msg);
+					})
+					.catch((res) => {
+						this.$message.error(res.msg);
+					});
+			},
+			isSel(row) {
+				return !!!row.is_del;
+			},
+			// 分组列表
+			groupLists() {
+				this.loading = true;
+				userLabelApi(this.labelFrom)
+					.then(async (res) => {
+						let data = res.data;
+						this.labelLists = data.list;
+					})
+					.catch((res) => {
+						this.loading = false;
+						this.$message.error(res.msg);
+					});
+			},
+			onClickTab() {
+				this.userFrom.page = 1;
+				this.getList();
+			},
+			userGroup() {
+				let data = {
+					page: 1,
+					limit: '',
+				};
+				userGroupApi(data).then((res) => {
+					this.groupList = res.data.list;
+				});
+			},
+			levelLists() {
+				let data = {
+					page: 1,
+					limit: '',
+					title: '',
+					is_show: 1,
+				};
+				levelListApi(data).then((res) => {
+					this.levelList = res.data.list;
+				});
+			},
+			membershipDataList() {
+				let data = {
+					page: 1,
+					limit: 0,
+					staus: 1,
+				};
+				membershipDataListApi(data).then((res) => {
+					this.membershipList = res.data.list;
+				});
+			},
+			// 批量设置分组;
+			setGroup() {
+				if (this.ids.length === 0) {
+					this.$message.warning('请选择要设置分组的用户');
+				} else {
+					let uids = {
+						uids: this.ids
+					};
+					this.$modalForm(userSetGroup(uids)).then(() => {
+						this.ids = [];
+						this.selectedIds = [];
+						this.getList();
+					});
+				}
+			},
+			// 批量设置标签;
+			setLabel() {
+				if (this.ids.length === 0) {
+					this.$message.warning('请选择要设置标签的用户');
+				} else {
+					let uids = {
+						uids: this.ids
+					};
+					this.labelActive.uid = 0;
+					this.labelShow = true;
+					// this.$modalForm(userSetLabelApi(uids)).then(() =>
+					//   this.$refs.sends.getList()
+					// );
+				}
+			},
+			activeSelectData(data) {
+				this.selectLabelShow = false;
+				this.selectDataLabel = data || [];
+				if (this.selectDataLabel.length) {
+					let activeIds = [];
+					this.selectDataLabel.map((item) => {
+						activeIds.push(item.id);
+					});
+					this.userFrom.label_id = activeIds.join(',');
+					this.getList();
+				} else {
+					this.userFrom.label_id = '';
+				}
+			},
+			handleClose(tag) {
+				let i = this.selectDataLabel.findIndex((item) => item.id === tag.id);
+				if (i !== -1) {
+					this.selectDataLabel.splice(i, 1);
+				}
+				this.$nextTick(() => {
+					if (this.selectDataLabel.length) {
+						let activeIds = [];
+						this.selectDataLabel.map((item) => {
+							activeIds.push(item.id);
+						});
+						this.userFrom.label_id = activeIds.join(',');
+					} else {
+						this.userFrom.label_id = '';
+					}
+				});
+				// this.userSearchs();
+			},
+			// 批量设置标签
+			activeData(data) {
+				let labels = [];
+				if (!data.length) return;
+				data.map((i) => {
+					labels.push(i.id);
+				});
+				saveSetLabel({
+					uids: this.ids.join(','),
+					label_id: labels,
+				}).then((res) => {
+					this.labelShow = false;
+					this.selectedIds = new Set();
+					this.getList();
+					this.$message.success(res.msg);
+				});
+			},
+			//是否为付费会员;
+			changeMember() {
+				this.userFrom.page = 1;
+				this.getList();
+			},
+			// 选择国家
+			changeCountry() {
+				if (this.userFrom.country === 'abroad' || !this.userFrom.country) {
+					this.selectedData = [];
+					this.userFrom.province = '';
+					this.userFrom.city = '';
+					this.address = [];
+				}
+			},
+			// 选择地址
+			handleChange(selectedData) {
+				this.selectedData = selectedData.map((o) => o.label);
+				this.userFrom.province = this.selectedData[0];
+				this.userFrom.city = this.selectedData[1];
+			},
+			// 具体日期
+			onchangeTime(e, type) {
+				this.userFrom[type] = e ? e.join('-') : '';
+			},
+			userDetail(row) {
+				this.$refs.userDetails.modals = true;
+				this.$refs.userDetails.getDetails(row.uid);
+			},
+			// 操作
+			changeMenu(row, name, index) {
+				let uid = [];
+				uid.push(row.uid);
+				let uids = {
+					uids: uid
+				};
+				switch (name) {
+					case '1':
+						this.edit(row);
+						break;
+					case '2':
+						this.getOtherFrom(row.uid, 'money');
+						break;
+					case '3':
+						this.giveLevelTime(row.uid);
+						break;
+					case '4':
+						this.del(row, '清除 【 ' + this.tenText(row.nickname) + ' 】的会员等级', index, 'user');
+						break;
+					case '5':
+						this.$modalForm(userSetGroup(uids)).then(() => this.getList());
+						break;
+					case '6':
+						this.openLabel(row);
+						break;
+					case '7':
+						this.editS(row);
+						break;
+					case '8':
+						this.getOtherFrom(row.uid, 'point');
+						break;
+					case '9':
+						this.dels(row, '清除【 ' + this.tenText(row.nickname) + ' 】的分销等级', index, 'user');
+						break;
+					default:
+						this.del(row, '解除【 ' + this.tenText(row.nickname) + ' 】的上级推广人', index, 'tuiguang');
+				}
+			},
+			tenText(str) {
+				if (str.length > 10) {
+					//如果字符长度超过10,后面的字符就变成...可自行调整长度和代替字符
+					str = str.substr(0, 10) + '...'; //截取从第一个字符开始,往后取10个字符,剩余的用...代替
+				}
+				return str;
+			},
+			openLabel(row) {
+				this.labelShow = true;
+				this.labelActive.uid = row.uid;
+			},
+			openSelectLabel() {
+				this.selectLabelShow = true;
+			},
+			editS(row) {
+				this.promoterShow = true;
+				this.formInline.uid = row.uid;
+			},
+			customer() {
+				this.customerShow = true;
+			},
+			imageObject(e) {
+				this.customerShow = false;
+				this.formInline.spread_uid = e.uid;
+				this.formInline.image = e.image;
+			},
+			cancel(name) {
+				this.promoterShow = false;
+				this.$refs[name].resetFields();
+				this.formInline = {
+					uid: 0,
+					spread_uid: 0,
+					image: '',
+				};
+			},
+			// 赠送会员等级
+			giveLevel(id) {
+				this.$modalForm(giveLevelApi(id)).then(() => this.getList(1));
 
-      // giveLevelApi(id)
-      //   .then(async (res) => {
-      //     if (res.data.status === false) {
-      //       return this.$authLapse(res.data);
-      //     }
+				// giveLevelApi(id)
+				//   .then(async (res) => {
+				//     if (res.data.status === false) {
+				//       return this.$authLapse(res.data);
+				//     }
 
-      //     this.FromData = res.data;
-      //     this.$refs.edits.modals = true;
-      //   })
-      //   .catch((res) => {
-      //     this.$message.error(res.msg);
-      //   });
-    },
-    // 赠送会员等级
-    giveLevelTime(id) {
-      this.$modalForm(giveLevelTimeApi(id)).then(() => this.getList(1));
+				//     this.FromData = res.data;
+				//     this.$refs.edits.modals = true;
+				//   })
+				//   .catch((res) => {
+				//     this.$message.error(res.msg);
+				//   });
+			},
+			// 赠送会员等级
+			giveLevelTime(id) {
+				this.$modalForm(giveLevelTimeApi(id)).then(() => this.getList(1));
 
-      // giveLevelTimeApi(id)
-      //   .then(async (res) => {
-      //     if (res.data.status === false) {
-      //       return this.$authLapse(res.data);
-      //     }
-      //     this.FromData = res.data;
-      //     this.$refs.edits.modals = true;
-      //   })
-      //   .catch((res) => {
-      //     this.$message.error(res.msg);
-      //   });
-    },
-    // 删除
-    del(row, tit, num, name) {
-      let delfromData = {
-        title: tit,
-        num: num,
-        url: name === 'user' ? `user/del_level/${row.uid}` : `agent/stair/delete_spread/${row.uid}`,
-        method: name === 'user' ? 'DELETE' : 'PUT',
-        ids: '',
-        width: 600,
-      };
-      this.$modalSure(delfromData)
-        .then((res) => {
-          this.$message.success(res.msg);
-          this.getList();
-        })
-        .catch((res) => {
-          this.$message.error(res.msg);
-        });
-    },
-    // 清除会员删除成功
-    submitModel() {
-      this.getList();
-    },
-    // 会员列表
-    getList() {
-      // if (this.selectDataLabel.length) {
-      //   let activeIds = [];
-      //   this.selectDataLabel.forEach((item) => {
-      //     activeIds.push(item.id);
-      //   });
-      //   this.userFrom.label_id = activeIds.join(',');
-      // }
-      this.userFrom.user_type = this.userFrom.user_type || '';
-      this.userFrom.status = this.userFrom.status || '';
-      this.userFrom.sex = this.userFrom.sex || '';
-      this.userFrom.is_promoter = this.userFrom.is_promoter || '';
-      this.userFrom.country = this.userFrom.country || '';
-      this.userFrom.pay_count = this.pay_count === 'all' ? '' : this.pay_count;
-      this.userFrom.user_time_type = this.user_time_type === 'all' ? '' : this.user_time_type;
-      this.userFrom.field_key = this.field_key === 'all' ? '' : this.field_key;
-      this.userFrom.level = this.level === 'all' ? '' : this.level;
-      this.userFrom.group_id = this.group_id === 'all' ? '' : this.group_id;
-      this.userFrom.agent_level = this.agent_level === 'all' ? '' : this.agent_level;
-      this.loading = true;
-      userList(this.userFrom)
-        .then(async (res) => {
-          let data = res.data;
-          this.userLists = data.list;
+				// giveLevelTimeApi(id)
+				//   .then(async (res) => {
+				//     if (res.data.status === false) {
+				//       return this.$authLapse(res.data);
+				//     }
+				//     this.FromData = res.data;
+				//     this.$refs.edits.modals = true;
+				//   })
+				//   .catch((res) => {
+				//     this.$message.error(res.msg);
+				//   });
+			},
+			dels(row, tit, num, name) {
+				let delfromData = {
+					title: tit,
+					num: num,
+					url: `agent/level/delLevel/${row.uid}`,
+					method: 'POST',
+					ids: '',
+					width: 600,
+				};
+				this.$modalSure(delfromData)
+					.then((res) => {
+						this.$message.success(res.msg);
+						this.getList();
+					})
+					.catch((res) => {
+						this.$message.error(res.msg);
+					});
+			},
+			// 删除
+			del(row, tit, num, name) {
+				let delfromData = {
+					title: tit,
+					num: num,
+					url: name === 'user' ? `user/del_level/${row.uid}` : `agent/stair/delete_spread/${row.uid}`,
+					method: name === 'user' ? 'DELETE' : 'PUT',
+					ids: '',
+					width: 600,
+				};
+				this.$modalSure(delfromData)
+					.then((res) => {
+						this.$message.success(res.msg);
+						this.getList();
+					})
+					.catch((res) => {
+						this.$message.error(res.msg);
+					});
+			},
+			// 清除会员删除成功
+			submitModel() {
+				this.getList();
+			},
+			// 会员列表
+			getList() {
+				// if (this.selectDataLabel.length) {
+				//   let activeIds = [];
+				//   this.selectDataLabel.forEach((item) => {
+				//     activeIds.push(item.id);
+				//   });
+				//   this.userFrom.label_id = activeIds.join(',');
+				// }
+				this.userFrom.user_type = this.userFrom.user_type || '';
+				this.userFrom.status = this.userFrom.status || '';
+				this.userFrom.sex = this.userFrom.sex || '';
+				this.userFrom.is_promoter = this.userFrom.is_promoter || '';
+				this.userFrom.country = this.userFrom.country || '';
+				this.userFrom.pay_count = this.pay_count === 'all' ? '' : this.pay_count;
+				this.userFrom.user_time_type = this.user_time_type === 'all' ? '' : this.user_time_type;
+				this.userFrom.field_key = this.field_key === 'all' ? '' : this.field_key;
+				this.userFrom.level = this.level === 'all' ? '' : this.level;
+				this.userFrom.group_id = this.group_id === 'all' ? '' : this.group_id;
+				this.userFrom.agent_level = this.agent_level === 'all' ? '' : this.agent_level;
+				this.loading = true;
+				userList(this.userFrom)
+					.then(async (res) => {
+						let data = res.data;
+						this.userLists = data.list;
 
-          this.total = data.count;
-          this.loading = false;
-          this.$nextTick(() => {
-            this.setChecked();
-          });
-        })
-        .catch((res) => {
-          this.loading = false;
-          this.$message.error(res.msg);
-        });
-    },
-    // 用户导出
-    async exportList() {
-      if (this.ids.length) {
-        this.userFrom.ids = this.ids;
-      }
-      this.userFrom.user_type = this.userFrom.user_type || '';
-      this.userFrom.status = this.userFrom.status || '';
-      this.userFrom.sex = this.userFrom.sex || '';
-      this.userFrom.is_promoter = this.userFrom.is_promoter || '';
-      this.userFrom.country = this.userFrom.country || '';
-      this.userFrom.pay_count = this.pay_count === 'all' ? '' : this.pay_count;
-      this.userFrom.user_time_type = this.user_time_type === 'all' ? '' : this.user_time_type;
-      this.userFrom.field_key = this.field_key === 'all' ? '' : this.field_key;
-      this.userFrom.level = this.level === 'all' ? '' : this.level;
-      this.userFrom.group_id = this.group_id === 'all' ? '' : this.group_id;
-      this.userFrom.agent_level = this.agent_level === 'all' ? '' : this.agent_level;
-      let [th, filekey, data, fileName] = [[], [], [], ''];
-      //   let fileName = "";
-      let excelData = JSON.parse(JSON.stringify(this.userFrom));
-      excelData.page = 1;
-      for (let i = 0; i < excelData.page + 1; i++) {
-        let lebData = await this.getExcelData(excelData);
-        if (!fileName) fileName = lebData.filename;
-        if (!filekey.length) {
-          filekey = lebData.fileKey;
-        }
-        if (!th.length) th = lebData.header;
-        if (lebData.export.length) {
-          data = data.concat(lebData.export);
-          excelData.page++;
-        } else {
-          this.$exportExcel(th, filekey, fileName, data);
-          return;
-        }
-      }
-    },
-    getExcelData(excelData) {
-      return new Promise((resolve, reject) => {
-        exportUserList(excelData).then((res) => {
-          resolve(res.data);
-        });
-      });
-    },
-    pageChange() {
-      this.selectionList = [];
-      this.getList();
-    },
+						this.total = data.count;
+						this.loading = false;
+						this.$nextTick(() => {
+							this.setChecked();
+						});
+					})
+					.catch((res) => {
+						this.loading = false;
+						this.$message.error(res.msg);
+					});
+			},
+			// 用户导出
+			async exportList() {
+				if (this.ids.length) {
+					this.userFrom.ids = this.ids;
+				}
+				this.userFrom.user_type = this.userFrom.user_type || '';
+				this.userFrom.status = this.userFrom.status || '';
+				this.userFrom.sex = this.userFrom.sex || '';
+				this.userFrom.is_promoter = this.userFrom.is_promoter || '';
+				this.userFrom.country = this.userFrom.country || '';
+				this.userFrom.pay_count = this.pay_count === 'all' ? '' : this.pay_count;
+				this.userFrom.user_time_type = this.user_time_type === 'all' ? '' : this.user_time_type;
+				this.userFrom.field_key = this.field_key === 'all' ? '' : this.field_key;
+				this.userFrom.level = this.level === 'all' ? '' : this.level;
+				this.userFrom.group_id = this.group_id === 'all' ? '' : this.group_id;
+				this.userFrom.agent_level = this.agent_level === 'all' ? '' : this.agent_level;
+				let [th, filekey, data, fileName] = [
+					[],
+					[],
+					[], ''
+				];
+				//   let fileName = "";
+				let excelData = JSON.parse(JSON.stringify(this.userFrom));
+				excelData.page = 1;
+				for (let i = 0; i < excelData.page + 1; i++) {
+					let lebData = await this.getExcelData(excelData);
+					if (!fileName) fileName = lebData.filename;
+					if (!filekey.length) {
+						filekey = lebData.fileKey;
+					}
+					if (!th.length) th = lebData.header;
+					if (lebData.export.length) {
+						data = data.concat(lebData.export);
+						excelData.page++;
+					} else {
+						this.$exportExcel(th, filekey, fileName, data);
+						return;
+					}
+				}
+			},
+			getExcelData(excelData) {
+				return new Promise((resolve, reject) => {
+					exportUserList(excelData).then((res) => {
+						resolve(res.data);
+					});
+				});
+			},
+			pageChange() {
+				this.selectionList = [];
+				this.getList();
+			},
 
-    // 搜索
-    userSearchs() {
-      this.userFrom.page = 1;
-      this.getList();
-    },
-    // 重置
-    reset(name) {
-      this.userFrom = {
-        label_id: '',
-        status: '',
-        sex: '',
-        is_promoter: '',
-        country: '',
-        isMember: '',
-        pay_count_num: ['', ''],
-        balance: ['', ''],
-        integral: ['', ''],
-        pay_count_money: ['', ''],
-        recharge_count: ['', ''],
-        user_time_type: '',
-        user_time: '',
-        before_pay_time: '',
-        nickname: '',
-        province: '',
-        city: '',
-        page: 1,
-        limit: 15,
-        level: '',
-        group_id: '',
-        agent_level: '',
-        field_key: '',
-        page: 1, // 当前页
-        limit: 20, // 每页显示条数
-      };
-      this.field_key = '';
-      this.level = '';
-      this.group_id = '';
-      this.agent_level = '';
-      this.dataLabel = [];
-      this.selectDataLabel = [];
-      this.user_time_type = '';
-      this.pay_count = '';
-      this.timeVal = [];
-      this.selectedIds = new Set();
-      this.getList();
-    },
-    // 获取编辑表单数据
-    getUserFrom(id) {
-      getUserInfo(id)
-        .then(async (res) => {
-          this.modals = true;
-          this.userData = res.data;
-        })
-        .catch((res) => {
-          this.$message.error(res.msg);
-        });
-    },
-    // 获取积分余额表单
-    getOtherFrom(id, type) {
-      this.$modalForm(editOtherApi(id, type)).then(() => this.getList(1));
-    },
-    // 修改状态
-    onchangeIsShow(row) {
-      let data = {
-        id: row.uid,
-        status: row.status,
-      };
-      isShowApi(data)
-        .then(async (res) => {
-          this.$message.success(res.msg);
-        })
-        .catch((res) => {
-          this.$message.error(res.msg);
-        });
-    },
-    // 点击发送优惠券
-    onSend() {
-      if (this.ids.length === 0) {
-        this.$message.warning('请选择要发送优惠券的用户');
-      } else {
-        this.$refs.sends.modals = true;
-        this.$refs.sends.getList();
-      }
-    },
-    // 发送图文消息
-    onSendPic() {
-      if (this.ids.length === 0) {
-        this.$message.warning('请选择要发送图文消息的用户');
-      } else {
-        this.modal13 = true;
-      }
-    },
-    // 编辑
-    edit(row) {
-      this.getUserFrom(row.uid);
-    },
-    // 修改成功
-    submitFail() {
-      // this.getList();
-    },
-    // 排序
-    sortChanged(e, props, order) {
-      this.userFrom[e.prop] = e.order;
-      this.getList();
-    },
-    //全选和取消全选时触发
-    handleSelectAll(selection) {
-      let ids = [];
-      selection.map((e) => {
-        ids.push(e.uid);
-      });
-      this.selectedIds = ids;
-      this.$nextTick(() => {
-        //确保dom加载完毕
-        this.setChecked();
-      });
-    },
-    //  选中某一行
-    handleSelectRow(selection, row) {
-      let ids = [];
-      selection.map((e) => {
-        ids.push(e.uid);
-      });
-      this.selectedIds = ids;
-      this.$nextTick(() => {
-        //确保dom加载完毕
-        this.setChecked();
-      });
-    },
-    setChecked() {
-      //将new Set()转化为数组
-      this.ids = [...this.selectedIds];
-      // 找到绑定的table的ref对应的dom,找到table的objData对象,objData保存的是当前页的数据
-      let objData = this.$refs.table.objData;
-      for (let index in objData) {
-        if (this.selectedIds.has(objData[index].uid)) {
-          objData[index]._isChecked = true;
-        }
-      }
-    },
-  },
-};
+			// 搜索
+			userSearchs() {
+				this.userFrom.page = 1;
+				this.getList();
+			},
+			// 重置
+			reset(name) {
+				this.userFrom = {
+					label_id: '',
+					status: '',
+					sex: '',
+					is_promoter: '',
+					country: '',
+					isMember: '',
+					pay_count_num: ['', ''],
+					balance: ['', ''],
+					integral: ['', ''],
+					pay_count_money: ['', ''],
+					recharge_count: ['', ''],
+					user_time_type: '',
+					user_time: '',
+					before_pay_time: '',
+					nickname: '',
+					province: '',
+					city: '',
+					page: 1,
+					limit: 15,
+					level: '',
+					group_id: '',
+					agent_level: '',
+					field_key: '',
+					page: 1, // 当前页
+					limit: 20, // 每页显示条数
+				};
+				this.field_key = '';
+				this.level = '';
+				this.group_id = '';
+				this.agent_level = '';
+				this.dataLabel = [];
+				this.selectDataLabel = [];
+				this.user_time_type = '';
+				this.pay_count = '';
+				this.timeVal = [];
+				this.selectedIds = new Set();
+				this.getList();
+			},
+			// 获取编辑表单数据
+			getUserFrom(id) {
+				getUserInfo(id)
+					.then(async (res) => {
+						this.modals = true;
+						this.userData = res.data;
+					})
+					.catch((res) => {
+						this.$message.error(res.msg);
+					});
+			},
+			// 获取积分余额表单
+			getOtherFrom(id, type) {
+				this.$modalForm(editOtherApi(id, type)).then(() => this.getList(1));
+			},
+			// 修改状态
+			onchangeIsShow(row) {
+				let data = {
+					id: row.uid,
+					status: row.status,
+				};
+				isShowApi(data)
+					.then(async (res) => {
+						this.$message.success(res.msg);
+					})
+					.catch((res) => {
+						this.$message.error(res.msg);
+					});
+			},
+			// 点击发送优惠券
+			onSend() {
+				if (this.ids.length === 0) {
+					this.$message.warning('请选择要发送优惠券的用户');
+				} else {
+					this.$refs.sends.modals = true;
+					this.$refs.sends.getList();
+				}
+			},
+			// 发送图文消息
+			onSendPic() {
+				if (this.ids.length === 0) {
+					this.$message.warning('请选择要发送图文消息的用户');
+				} else {
+					this.modal13 = true;
+				}
+			},
+			// 编辑
+			edit(row) {
+				this.getUserFrom(row.uid);
+			},
+			// 修改成功
+			submitFail() {
+				// this.getList();
+			},
+			// 排序
+			sortChanged(e, props, order) {
+				this.userFrom[e.prop] = e.order;
+				this.getList();
+			},
+			//全选和取消全选时触发
+			handleSelectAll(selection) {
+				let ids = [];
+				selection.map((e) => {
+					ids.push(e.uid);
+				});
+				this.selectedIds = ids;
+				this.$nextTick(() => {
+					//确保dom加载完毕
+					this.setChecked();
+				});
+			},
+			//  选中某一行
+			handleSelectRow(selection, row) {
+				let ids = [];
+				selection.map((e) => {
+					ids.push(e.uid);
+				});
+				this.selectedIds = ids;
+				this.$nextTick(() => {
+					//确保dom加载完毕
+					this.setChecked();
+				});
+			},
+			setChecked() {
+				//将new Set()转化为数组
+				this.ids = [...this.selectedIds];
+				// 找到绑定的table的ref对应的dom,找到table的objData对象,objData保存的是当前页的数据
+				let objData = this.$refs.table.objData;
+				for (let index in objData) {
+					if (this.selectedIds.has(objData[index].uid)) {
+						objData[index]._isChecked = true;
+					}
+				}
+			},
+		},
+	};
 </script>
 
 <style scoped lang="scss">
-::v-deep .el-tabs__item {
-  height: 54px !important;
-  line-height: 54px !important;
-}
+	::v-deep .el-tabs__item {
+		height: 54px !important;
+		line-height: 54px !important;
+	}
+
+	.picBox {
+		display: inline-block;
+		cursor: pointer;
+
+		.upLoad {
+			width: 58px;
+			height: 58px;
+			line-height: 58px;
+			border: 1px dotted rgba(0, 0, 0, 0.1);
+			border-radius: 4px;
+			background: rgba(0, 0, 0, 0.02);
+			font-size: 24px;
+			font-weight: 500;
+		}
 
-.picBox {
-  display: inline-block;
-  cursor: pointer;
+		.pictrue {
+			width: 60px;
+			height: 60px;
+			border: 1px dotted rgba(0, 0, 0, 0.1);
+			margin-right: 10px;
 
-  .upLoad {
-    width: 58px;
-    height: 58px;
-    line-height: 58px;
-    border: 1px dotted rgba(0, 0, 0, 0.1);
-    border-radius: 4px;
-    background: rgba(0, 0, 0, 0.02);
-    font-size: 24px;
-    font-weight: 500;
-  }
+			img {
+				width: 100%;
+				height: 100%;
+			}
+		}
+	}
 
-  .pictrue {
-    width: 60px;
-    height: 60px;
-    border: 1px dotted rgba(0, 0, 0, 0.1);
-    margin-right: 10px;
+	.fix_footer {
+		position: fixed;
+		bottom: 0;
+		width: -webkit-fill-available;
+		background: #fff;
+		padding: 20px 0px;
+		box-sizing: border-box;
+		z-index: 100;
+	}
 
-    img {
-      width: 100%;
-      height: 100%;
-    }
-  }
-}
-.fix_footer {
-  position: fixed;
-  bottom: 0;
-  width: -webkit-fill-available;
-  background: #fff;
-  padding: 20px 0px;
-  box-sizing: border-box;
-  z-index: 100;
-}
-.userFrom {
-  ::v-deep .ivu-form-item-content {
-    margin-left: 0px !important;
-  }
-}
+	.userFrom {
+		::v-deep .ivu-form-item-content {
+			margin-left: 0px !important;
+		}
+	}
 
-.userAlert {
-  margin-top: 20px;
-}
+	.userAlert {
+		margin-top: 20px;
+	}
 
-.userI {
-  color: var(--prev-color-primary);
-  font-style: normal;
-}
+	.userI {
+		color: var(--prev-color-primary);
+		font-style: normal;
+	}
 
-img {
-  height: 36px;
-  display: block;
-}
+	img {
+		height: 36px;
+		display: block;
+	}
 
-.tabBox_img {
-  width: 36px;
-  height: 36px;
-  border-radius: 4px;
-  cursor: pointer;
+	.tabBox_img {
+		width: 36px;
+		height: 36px;
+		border-radius: 4px;
+		cursor: pointer;
 
-  img {
-    width: 100%;
-    height: 100%;
-  }
-}
+		img {
+			width: 100%;
+			height: 100%;
+		}
+	}
 
-.tabBox_tit {
-  width: 60%;
-  font-size: 12px !important;
-  margin: 0 2px 0 10px;
-  letter-spacing: 1px;
-  padding: 5px 0;
-  box-sizing: border-box;
-}
+	.tabBox_tit {
+		width: 60%;
+		font-size: 12px !important;
+		margin: 0 2px 0 10px;
+		letter-spacing: 1px;
+		padding: 5px 0;
+		box-sizing: border-box;
+	}
 
-.modelBox {
-  ::v-deep .ivu-modal-body {
-    padding: 0 16px 16px 16px !important;
-  }
-}
+	.modelBox {
+		::v-deep .ivu-modal-body {
+			padding: 0 16px 16px 16px !important;
+		}
+	}
 
-.vipName {
-  color: #dab176;
-}
+	.vipName {
+		color: #dab176;
+	}
 
-.listbox {
-  ::v-deep .ivu-divider-horizontal {
-    margin: 0 !important;
-  }
-}
+	.listbox {
+		::v-deep .ivu-divider-horizontal {
+			margin: 0 !important;
+		}
+	}
 
-.labelInput {
-  width: 250px;
-  border: 1px solid #dcdee2;
-  padding: 0 15px;
-  border-radius: 5px;
-  min-height: 30px;
-  cursor: pointer;
-  font-size: 12px;
+	.labelInput {
+		width: 250px;
+		border: 1px solid #dcdee2;
+		padding: 0 15px;
+		border-radius: 5px;
+		min-height: 30px;
+		cursor: pointer;
+		font-size: 12px;
 
-  .span {
-    color: #c5c8ce;
-  }
+		.span {
+			color: #c5c8ce;
+		}
 
-  .ivu-icon-ios-arrow-down {
-    font-size: 14px;
-    color: #808695;
-  }
-}
+		.ivu-icon-ios-arrow-down {
+			font-size: 14px;
+			color: #808695;
+		}
+	}
 
-.demo-drawer-footer {
-  width: 100%;
-  position: absolute;
-  bottom: 0;
-  left: 0;
-  border-top: 1px solid #e8e8e8;
-  padding: 10px 16px;
-  text-align: right;
-  background: #fff;
-}
+	.demo-drawer-footer {
+		width: 100%;
+		position: absolute;
+		bottom: 0;
+		left: 0;
+		border-top: 1px solid #e8e8e8;
+		padding: 10px 16px;
+		text-align: right;
+		background: #fff;
+	}
 
-.search-form {
-  display: flex;
-  justify-content: space-between;
+	.search-form {
+		display: flex;
+		justify-content: space-between;
 
-  .search-form-box {
-    display: flex;
-    flex-wrap: wrap;
-    flex: 1;
-  }
-}
+		.search-form-box {
+			display: flex;
+			flex-wrap: wrap;
+			flex: 1;
+		}
+	}
 
-.search-form-sub {
-  display: flex;
-}
-</style>
+	.search-form-sub {
+		display: flex;
+	}
+</style>

+ 9 - 0
src/router/modules/finance.js

@@ -80,6 +80,15 @@ export default {
       },
       component: () => import('@/pages/finance/commission/index'),
     },
+	{
+	  path: 'finance/commissions',
+	  name: `${pre}commissionRecords`,
+	  meta: {
+	    auth: ['finance-finance-commissions'],
+	    title: '佣金明细',
+	  },
+	  component: () => import('@/pages/finance/commission/indexs'),
+	},
     {
       path: 'balance/balance',
       name: `${pre}balance`,