cmy 5 miesięcy temu
rodzic
commit
876d343449

+ 2 - 2
.env.dev

@@ -4,7 +4,7 @@ VUE_APP_ENV='dev'
 # 页面 title
 VUE_APP_TITLE=百达福生
 # socket 系统长连接地址
-VUE_APP_WS_ADMIN_URL='ws://dbyt.qiniu1314.com/ws'
+VUE_APP_WS_ADMIN_URL='ws://www.baidafusheng.com/ws'
 # 接口请求地址
-VUE_APP_API_URL='https://dbyt.qiniu1314.com/adminapi'
+VUE_APP_API_URL='https://www.baidafusheng.com/adminapi'
 

BIN
public/favicon.ico


+ 8 - 0
src/api/product.js

@@ -810,3 +810,11 @@ export function allSystemForm() {
     });
 }
 
+export function productBindLevel(data) {
+    return request({
+        url: `/product/product/bind`,
+        method: 'post',
+		data,
+    });
+}
+

+ 33 - 0
src/api/store.js

@@ -627,3 +627,36 @@ export function cascaderList (type) {
 }
 
 
+/**
+ * @description 门店申请列表
+ * @param {Number} param id {Number} 
+ */
+ export function getApplyList(data) {
+    return request({
+        url: `/supplier/merchant/apply/list`,
+        method: 'get',
+		params: data
+    })
+};
+
+/**
+ * @description 门店审核表单 和供货商共用接口
+ * @param {Number} param id {Number}
+ */
+ export function getVerifyForm(id) {
+    return request({
+        url: `/supplier/apply/verify/form/${id}`,
+        method: 'get'
+    })
+};
+
+/**
+ * @description 门店备注表单 和供货商共用接口
+ * @param {Number} param id {Number}
+ */
+ export function getMarkForm(id) {
+    return request({
+        url: `/supplier/apply/mark/form/${id}`,
+        method: 'get'
+    })
+};

+ 1960 - 1995
src/pages/product/productList/index.vue

@@ -1,151 +1,80 @@
 <template>
-  <!-- 商品-商品列表 -->
-  <div class="article-manager">
-    <Card :bordered="false" dis-hover class="ivu-mt" :padding="0">
-      <div class="new_card_pd">
-        <Alert
-            v-if="alertShow"
-            banner
-            closable
-            type="warning"
-            class="ivu-mt"
-            @on-close="closeAlert"
-        >
-          <router-link :to="`${roterPre}/product/add_product/0`"
-          >您有未完成的商品添加操作,点击此处可继续添加操作?</router-link
-          >
-        </Alert>
-        <Alert show-icon closable>
-          温馨提示:1.新增商品时可选统一规格或者多规格,满足商品不同销售属性场景;2.商品销售状态分为销售中且库存足够时才可下单购买
-        </Alert>
-        <!-- 条件筛选 -->
-        <Form
-            ref="artFrom"
-            inline
-            :model="artFrom"
-            :label-width="96"
-            :label-position="labelPosition"
-            @submit.native.prevent
-        >
-          <FormItem label="商品分类:" prop="cate_id">
-            <el-cascader
-                placeholder="请选择商品分类"
-                class="input-add"
-                size="mini"
-                v-model="artFrom.cate_id"
-                :options="data1"
-                :props="props"
-                @change="userSearchs"
-                filterable
-                clearable
-            >
-            </el-cascader>
-          </FormItem>
-          <FormItem label="供应商:" prop="pid" label-for="pid">
-            <Select
-                v-model="artFrom.supplier_id"
-                @on-change="userSearchs"
-                clearable
-                class="input-add"
-            >
-              <Option
-                  v-for="item in supplierList"
-                  :value="item.id"
-                  :key="item.id"
-              >{{ item.supplier_name }}</Option
-              >
-            </Select>
-          </FormItem>
-          <FormItem label="选择门店:">
-            <Select
-                v-model="artFrom.store_id"
-                clearable
-                filterable
-                @on-change="userSearchs"
-                class="input-add"
-            >
-              <Option v-for="item in staffData" :value="item.id" :key="item.id"
-              >{{ item.name }}
-              </Option>
-            </Select>
-          </FormItem>
-          <FormItem label="商品品牌:" prop="brand_id">
-            <Cascader
-                :data="brandData"
-                placeholder="请选择商品品牌"
-                change-on-select
-                v-model="artFrom.brand_id"
-                filterable
-                class="input-add"
-                @on-change="userSearchs"
-            ></Cascader>
-          </FormItem>
-          <FormItem label="商品标签:" prop="store_label_id" class="labelClass">
-            <div class="acea-row row-middle">
-              <div class="labelInput acea-row row-between-wrapper" @click="openGoodsLabel">
-                <div style="width: 90%;">
-                  <div v-if="goodsDataLabel.length">
-                    <Tag closable v-for="(item,index) in goodsDataLabel" :key="index" @on-close="closeStoreLabel(item)">{{item.label_name}}</Tag>
-                  </div>
-                  <span class="span" v-else>选择商品标签</span>
-                </div>
-                <div class="iconfont iconxiayi"></div>
-              </div>
-            </div>
-          </FormItem>
-          <FormItem label="商品搜索:" label-for="store_name">
-            <Input
-                placeholder="请输入商品名称,关键字,ID"
-                v-model="artFrom.store_name"
-                class="input-add"
-            />
-            <Button type="primary" @click="userSearchs">查询</Button>
-          </FormItem>
-        </Form>
-      </div>
-    </Card>
-    <Card :bordered="false" dis-hover class="ivu-mt">
-      <!-- 相关操作 -->
-      <div class="new_tab">
-        <Tabs v-model="artFrom.type" @on-click="onClickTab">
-          <TabPane
-              :label="item.name + ' (' + item.count + ')'"
-              :name="item.type.toString()"
-              v-for="(item, index) in headeNum"
-              :key="index"
-          />
-        </Tabs>
-      </div>
-      <div class="acea-row row-between-wrapper">
-        <div class="Button">
-          <router-link
-              v-auth="['product-product-save']"
-              :to="`${roterPre}/product/add_product`"
-          ><Button type="primary" class="bnt mr15"
-          >添加商品</Button
-          ></router-link
-          >
-          <Button
-              v-auth="['product-crawl-save']"
-              type="success"
-              class="bnt mr15"
-              @click="onCopy"
-          >商品采集</Button
-          >
-          <Upload
-              ref="upload"
-              v-if="openErp"
-              :show-upload-list="false"
-              :action="erpUrl"
-              :before-upload="beforeUpload"
-              :headers="header"
-              :on-success="upFile"
-              :format="['xlsx']"
-              :on-format-error="handleFormatError"
-          >
-            <Button>导入ERP商品</Button>
-          </Upload>
-          <!-- <Tooltip
+	<!-- 商品-商品列表 -->
+	<div class="article-manager">
+		<Card :bordered="false" dis-hover class="ivu-mt" :padding="0">
+			<div class="new_card_pd">
+				<Alert v-if="alertShow" banner closable type="warning" class="ivu-mt" @on-close="closeAlert">
+					<router-link :to="`${roterPre}/product/add_product/0`">您有未完成的商品添加操作,点击此处可继续添加操作?</router-link>
+				</Alert>
+				<Alert show-icon closable>
+					温馨提示:1.新增商品时可选统一规格或者多规格,满足商品不同销售属性场景;2.商品销售状态分为销售中且库存足够时才可下单购买
+				</Alert>
+				<!-- 条件筛选 -->
+				<Form ref="artFrom" inline :model="artFrom" :label-width="96" :label-position="labelPosition"
+					@submit.native.prevent>
+					<FormItem label="商品分类:" prop="cate_id">
+						<el-cascader placeholder="请选择商品分类" class="input-add" size="mini" v-model="artFrom.cate_id"
+							:options="data1" :props="props" @change="userSearchs" filterable clearable>
+						</el-cascader>
+					</FormItem>
+					<FormItem label="供应商:" prop="pid" label-for="pid">
+						<Select v-model="artFrom.supplier_id" @on-change="userSearchs" clearable class="input-add">
+							<Option v-for="item in supplierList" :value="item.id" :key="item.id">
+								{{ item.supplier_name }}</Option>
+						</Select>
+					</FormItem>
+					<FormItem label="选择门店:">
+						<Select v-model="artFrom.store_id" clearable filterable @on-change="userSearchs"
+							class="input-add">
+							<Option v-for="item in staffData" :value="item.id" :key="item.id">{{ item.name }}
+							</Option>
+						</Select>
+					</FormItem>
+					<FormItem label="商品品牌:" prop="brand_id">
+						<Cascader :data="brandData" placeholder="请选择商品品牌" change-on-select v-model="artFrom.brand_id"
+							filterable class="input-add" @on-change="userSearchs"></Cascader>
+					</FormItem>
+					<FormItem label="商品标签:" prop="store_label_id" class="labelClass">
+						<div class="acea-row row-middle">
+							<div class="labelInput acea-row row-between-wrapper" @click="openGoodsLabel">
+								<div style="width: 90%;">
+									<div v-if="goodsDataLabel.length">
+										<Tag closable v-for="(item,index) in goodsDataLabel" :key="index"
+											@on-close="closeStoreLabel(item)">{{item.label_name}}</Tag>
+									</div>
+									<span class="span" v-else>选择商品标签</span>
+								</div>
+								<div class="iconfont iconxiayi"></div>
+							</div>
+						</div>
+					</FormItem>
+					<FormItem label="商品搜索:" label-for="store_name">
+						<Input placeholder="请输入商品名称,关键字,ID" v-model="artFrom.store_name" class="input-add" />
+						<Button type="primary" @click="userSearchs">查询</Button>
+					</FormItem>
+				</Form>
+			</div>
+		</Card>
+		<Card :bordered="false" dis-hover class="ivu-mt">
+			<!-- 相关操作 -->
+			<div class="new_tab">
+				<Tabs v-model="artFrom.type" @on-click="onClickTab">
+					<TabPane :label="item.name + ' (' + item.count + ')'" :name="item.type.toString()"
+						v-for="(item, index) in headeNum" :key="index" />
+				</Tabs>
+			</div>
+			<div class="acea-row row-between-wrapper">
+				<div class="Button">
+					<!-- <router-link v-auth="['product-product-save']" :to="`${roterPre}/product/add_product`"><Button
+							type="primary" class="bnt mr15">添加商品</Button></router-link> -->
+					<!-- <Button v-auth="['product-crawl-save']" type="success" class="bnt mr15"
+						@click="onCopy">商品采集</Button> -->
+					<Upload ref="upload" v-if="openErp" :show-upload-list="false" :action="erpUrl"
+						:before-upload="beforeUpload" :headers="header" :on-success="upFile" :format="['xlsx']"
+						:on-format-error="handleFormatError">
+						<Button>导入ERP商品</Button>
+					</Upload>
+					<!-- <Tooltip
             content="本页至少选中一项"
             :disabled="!!checkUidList.length && isAll==0"
           >
@@ -157,1860 +86,1896 @@
               >配送方式</Button
             >
           </Tooltip> -->
-          <Tooltip
-              content="本页至少选中一项"
-              :disabled="!!checkUidList.length && isAll==0"
-          >
-            <Button
-                v-auth="['product-product-product_show']"
-                class="bnt mr15"
-                :disabled="!checkUidList.length && isAll==0"
-                @click="onDismount"
-                v-show="artFrom.type === '1'"
-            >批量下架</Button
-            >
-          </Tooltip>
-          <Tooltip
-              content="本页至少选中一项"
-              :disabled="!!checkUidList.length && isAll==0"
-          >
-            <Button
-                v-auth="['product-product-product_show']"
-                class="bnt mr15"
-                :disabled="!checkUidList.length && isAll==0"
-                @click="onShelves"
-                v-show="artFrom.type === '2'"
-            >批量上架</Button
-            >
-          </Tooltip>
-          <Tooltip
-              content="本页至少选中一项"
-              :disabled="!!checkUidList.length && isAll==0"
-          >
-            <Button
-                v-auth="['export-storeProduct']"
-                class="export mr15"
-                :disabled="!checkUidList.length && isAll==0"
-                @click="exports"
-            >导出</Button
-            >
-          </Tooltip>
-          <Tooltip
-              content="本页至少选中一项"
-              :disabled="!!checkUidList.length && isAll==0"
-          >
-            <Button
-                v-auth="['product-product-product_show']"
-                class="bnt"
-                :disabled="!checkUidList.length && isAll==0"
-                @click="openBatch"
-            >批量设置</Button
-            >
-          </Tooltip>
-        </div>
-        <div>
-          <Button v-if="openErp" class="bnt mr15" @click="frontDownload"
-          >下载erp商品模板</Button
-          >
-        </div>
-      </div>
-      <!-- 商品列表表格 -->
-      <vxe-table
-          ref="xTable"
-          class="mt25"
-          :loading="loading"
-          row-id="id"
-          :expand-config="{accordion: true}"
-          :checkbox-config="{reserve: true}"
-          @checkbox-all="checkboxAll"
-          @checkbox-change="checkboxItem"
-          :data="tableList">
-        <vxe-column type="" width="0" v-show="artFrom.type == 1 || artFrom.type == 2"></vxe-column>
-        <vxe-column type="expand" width="35" v-if="artFrom.type == 1 || artFrom.type == 2">
-          <template #content="{ row }">
-            <div class="tdinfo">
-              <Row class="expand-row">
-                <Col span="8">
-                  <span class="expand-key">商品分类:</span>
-                  <span class="expand-value">{{ row.cate_name }}</span>
-                </Col>
-                <Col span="8">
-                  <span class="expand-key">商品市场价格:</span>
-                  <span class="expand-value">{{ row.ot_price }}</span>
-                </Col>
-                <Col span="8">
-                  <span class="expand-key">成本价:</span>
-                  <span class="expand-value">{{ row.cost }}</span>
-                </Col>
-              </Row>
-              <Row class="expand-row">
-                <Col span="8">
-                  <span class="expand-key">收藏:</span>
-                  <span class="expand-value">{{ row.collect }}</span>
-                </Col>
-                <Col span="8">
-                  <span class="expand-key">虚拟销量:</span>
-                  <span class="expand-value">{{ row.ficti }} {{name}}</span>
-                </Col>
-                <Col span="8" v-show="row.is_verify === -1">
-                  <span class="expand-key">审核未通过原因:</span>
-                  <span class="expand-value">{{ row.refusal }}</span>
-                </Col>
-                <Col span="8" v-show="row.is_verify === -2">
-                  <span class="expand-key">强制下架原因:</span>
-                  <span class="expand-value">{{ row.refusal }}</span>
-                </Col>
-              </Row>
-            </div>
-          </template>
-        </vxe-column>
-        <vxe-column type="checkbox" width="100">
-          <template #header>
-            <div>
-              <Dropdown transfer @on-click="allPages">
-                <a href="javascript:void(0)" class="acea-row row-middle">
-                  <span>全选({{isAll==1?(total-checkUidList.length):checkUidList.length}})</span>
-                  <Icon type="ios-arrow-down"></Icon>
-                </a>
-                <template #list>
-                  <DropdownMenu>
-                    <DropdownItem name="0">当前页</DropdownItem>
-                    <DropdownItem name="1">所有页</DropdownItem>
-                  </DropdownMenu>
-                </template>
-              </Dropdown>
-            </div>
-          </template>
-        </vxe-column>
-        <vxe-column field="id" title="商品ID" width="60"></vxe-column>
-        <vxe-column field="image" title="商品图" width="60">
-          <template v-slot="{ row }">
-            <viewer>
-              <div class="tabBox_img">
-                <img v-lazy="row.image" />
-              </div>
-            </viewer>
-          </template>
-        </vxe-column>
-        <vxe-column field="store_name" title="商品名称" min-width="250">
-          <template v-slot="{ row }">
-            <Tooltip
-			    :transfer="true"
-                theme="dark"
-                max-width="300"
-                :delay="600"
-                :content="row.store_name"
-            >
-              <div class="line2">{{ row.store_name }}</div>
-            </Tooltip>
-          </template>
-        </vxe-column>
-        <vxe-column field="plate_name" title="商品来源" min-width="150"></vxe-column>
-        <vxe-column field="product_type" title="商品类型" min-width="100">
-          <template v-slot="{ row }">
-            <span v-if="row.product_type == 0">普通商品</span>
-            <span v-if="row.product_type == 1">卡密商品</span>
-            <span v-if="row.product_type == 3">虚拟商品</span>
-            <span v-if="row.product_type == 4">次卡商品</span>
-          </template>
-        </vxe-column>
-        <vxe-column field="price" title="商品售价" min-width="90"></vxe-column>
-        <vxe-column field="sales" title="销量" min-width="90"></vxe-column>
-        <vxe-column field="stock" title="库存" min-width="80" v-show="artFrom.type != 6"></vxe-column>
-        <vxe-column field="sort" title="排序" min-width="70"></vxe-column>
-        <vxe-column field="state" title="状态" width="120">
-          <template v-slot="{ row }">
-            <i-switch
-                v-model="row.is_show"
-                :value="row.is_show"
-                :true-value="1"
-                :false-value="0"
-                :disabled="artFrom.type == 6 || row.is_verify != 1 ? true : false"
-                @on-change="changeSwitch(row)"
-                size="large"
-            >
-              <span slot="open">上架</span>
-              <span slot="close">下架</span>
-            </i-switch>
-            <div v-if="row.auto_off_time" class="style-add">
-              定时下架:<br />{{ row.auto_off_time | timeFormat }}
-            </div>
-          </template>
-        </vxe-column>
-        <vxe-column field="action" title="操作" align="center" width="220" fixed="right">
-          <template #default="{ row, rowIndex }">
-            <a @click="details(row.id)">详情</a>
-            <Divider type="vertical" />
-            <a @click="edit(row)">编辑</a>
-            <Divider type="vertical" />
-            <a @click="lookGoods(row.id)">预览</a>
-            <Divider type="vertical" />
-            <a v-if="artFrom.type === '0'" @click="auditGoods(row)">审核</a>
-            <Divider v-if="artFrom.type === '0'" type="vertical" />
-            <template>
-              <Dropdown
-                  @on-click="changeMenu(row, $event, rowIndex)"
-                  :transfer="true"
-              >
-                <a href="javascript:void(0)" class="acea-row row-middle">
-                  <span>更多</span>
-                  <Icon type="ios-arrow-down"></Icon>
-                </a>
-                <DropdownMenu slot="list">
-                  <DropdownItem name="1">查看评论</DropdownItem>
-                  <DropdownItem name="2" v-if="artFrom.type === '6'"
-                  >恢复商品</DropdownItem
-                  >
-                  <DropdownItem name="3"  v-if="artFrom.type !== '6' && row.type==0">移到回收站</DropdownItem>
-                  <DropdownItem
-                      name="4"
-                      v-if="row.product_type != 1 && openErp == false"
-                  >库存管理</DropdownItem
-                  >
-                  <DropdownItem
-                      name="5"
-                      v-if="artFrom.type === '1' || artFrom.type === '2'"
-                  >强制下架</DropdownItem
-                  >
-                  <DropdownItem name="6">复制商品</DropdownItem>
-                </DropdownMenu>
-              </Dropdown>
-            </template>
-          </template>
-        </vxe-column>
-      </vxe-table>
-      <vxe-pager class="mt20" border size="medium" :page-size="artFrom.limit" :current-page="artFrom.page" :total="total"
-                 :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Total']" @page-change="pageChange">
-      </vxe-pager>
-      <!--      <div class="acea-row row-right page">-->
-      <!--        <Page-->
-      <!--          :total="total"-->
-      <!--          :current="artFrom.page"-->
-      <!--          show-elevator-->
-      <!--          show-total-->
-      <!--          @on-change="pageChange"-->
-      <!--          :page-size="artFrom.limit"-->
-      <!--        />-->
-      <!--      </div>-->
-      <attribute
-          :attrTemplate="attrTemplate"
-          v-on:changeTemplate="changeTemplate"
-      ></attribute>
-    </Card>
-    <!-- 生成淘宝京东表单-->
-    <Modal
-        v-model="modals"
-        :z-index="100"
-        class="Box"
-        scrollable
-        footer-hide
-        closable
-        title="复制淘宝、天猫、京东、苏宁、1688"
-        :mask-closable="false"
-        width="1200"
-        height="500"
-    >
-      <tao-bao ref="taobaos" v-if="modals" @on-close="onClose"></tao-bao>
-    </Modal>
-    <!-- 配送方式 -->
-    <Modal
-        v-model="modalsType"
-        scrollable
-        title="配送方式"
-        :closable="false"
-        class-name="vertical-center-modal"
-    >
-      <Form :label-width="90" @submit.native.prevent>
-        <FormItem label="配送方式:" class="deliveryStyle" required>
-          <CheckboxGroup v-model="delivery_type">
-            <Checkbox label="1">快递</Checkbox>
-            <!-- <Checkbox label="3">门店配送</Checkbox> -->
-            <Checkbox label="2">自提</Checkbox>
-          </CheckboxGroup>
-        </FormItem>
-      </Form>
-      <div slot="footer">
-        <Button type="primary" @click="putDelivery">提交</Button>
-        <Button @click="cancelDelivery">取消</Button>
-      </div>
-    </Modal>
-    <!-- 商品弹窗 -->
-    <div v-if="isProductBox">
-      <div class="bg" @click.stop="isProductBox = false"></div>
-      <goodsDetail :goodsId="goodsId" :product="1"></goodsDetail>
-    </div>
-    <stockEdit ref="stock" @stockChange="stockChange"></stockEdit>
-    <!-- 商品详情 -->
-    <productDetails :visible.sync="detailsVisible" :product-id="productId" @saved="getDataList"></productDetails>
-    <!-- 批量设置 -->
-    <Modal v-model="batchModal" title="批量设置" width="750" class-name="batch-modal" @on-visible-change="batchVisibleChange">
-      <Alert show-icon>每次只能修改一项,如需修改多项,请多次操作。</Alert>
-      <Row type="flex" align="middle">
-        <Col span="5">
-          <Menu :active-name="menuActive" width="auto" @on-select="menuSelect">
-            <MenuItem :name="1">商品分类</MenuItem>
-            <MenuItem :name="2">商品标签</MenuItem>
-            <MenuItem :name="3">物流设置</MenuItem>
-            <MenuItem :name="8">运费设置</MenuItem>
-            <MenuItem :name="4">购买即送</MenuItem>
-            <MenuItem :name="5">关联用户标签</MenuItem>
-            <MenuItem :name="6">活动推荐</MenuItem>
-            <MenuItem :name="7">自定义留言</MenuItem>
-          </Menu>
-        </Col>
-        <Col span="19">
-          <Form :model="batchData" :label-width="122">
-            <FormItem v-if="menuActive === 1" label="商品分类:">
-              <el-cascader
-                  v-model="batchData.cate_id"
-                  :options="data1"
-                  :props="props"
-                  size="small"
-                  filterable
-                  clearable
-                  :class="{ single: !batchData.cate_id.length }"
-              >
-              </el-cascader>
-            </FormItem>
-            <FormItem v-if="menuActive === 2" label="商品标签:">
-              <div class="select-tag" @click="openStoreLabel">
-                <div v-if="storeDataLabel.length">
-                  <Tag v-for="item in storeDataLabel" :key="item.id" closable @on-close="tagClose(item.id)">{{ item.label_name }}</Tag>
-                </div>
-                <span v-else class="placeholder">请选择</span>
-                <Icon type="ios-arrow-down" />
-              </div>
-            </FormItem>
-            <FormItem v-if="menuActive === 3" label="物流方式:">
-              <CheckboxGroup v-model="batchData.delivery_type" size="small">
-                <Checkbox :label="1">快递</Checkbox>
-                <Checkbox :label="3">门店配送</Checkbox>
-                <Checkbox :label="2">自提</Checkbox>
-              </CheckboxGroup>
-            </FormItem>
-            <FormItem v-if="menuActive === 8" label="运费设置:">
-              <RadioGroup v-model="batchData.freight">
-                <Radio :label="1">包邮</Radio>
-                <Radio :label="2">固定邮费</Radio>
-                <Radio :label="3">运费模板</Radio>
-              </RadioGroup>
-            </FormItem>
-            <FormItem v-if="menuActive === 8 && batchData.freight === 2">
-              <div class="input-number">
-                <InputNumber v-model="batchData.postage" :min="0"></InputNumber>
-                <span class="suffix">元</span>
-              </div>
-            </FormItem>
-            <FormItem v-if="menuActive === 8 && batchData.freight === 3">
-              <Select v-model="batchData.temp_id">
-                <Option v-for="item in templateList" :key="item.id" :value="item.id">{{ item.name }}</Option>
-              </Select>
-            </FormItem>
-            <FormItem v-if="menuActive === 4" label="购买送积分:">
-              <InputNumber v-model="batchData.give_integral" :min="0"></InputNumber>
-            </FormItem>
-            <FormItem v-if="menuActive === 4" label="购买送优惠券:">
-              <div class="select-tag" @click="addCoupon">
-                <div v-if="couponName.length">
-                  <Tag v-for="item in couponName" :key="item.id" closable @on-close="handleClose(item)">{{ item.title }}</Tag>
-                </div>
-                <span v-else class="placeholder">请选择</span>
-                <Icon type="ios-arrow-down" />
-              </div>
-            </FormItem>
-            <FormItem v-if="menuActive === 5" label="关联用户标签:">
-              <div class="select-tag" @click="openLabel">
-                <div v-if="dataLabel.length">
-                  <Tag v-for="item in dataLabel" :key="item.id" closable @on-close="tagClose(item.id)">{{ item.label_name }}</Tag>
-                </div>
-                <span v-else class="placeholder">请选择</span>
-                <Icon type="ios-arrow-down" />
-              </div>
-            </FormItem>
-            <FormItem v-if="menuActive === 6" label="商品推荐:">
-              <CheckboxGroup v-model="batchData.recommend" size="small">
-                <Checkbox label="is_hot">热卖单品</Checkbox>
-                <Checkbox label="is_benefit">促销单品</Checkbox>
-                <Checkbox label="is_best">精品推荐</Checkbox>
-                <Checkbox label="is_new">首发新品</Checkbox>
-                <Checkbox label="is_good">优品推荐</Checkbox>
-              </CheckboxGroup>
-            </FormItem>
-            <FormItem v-if="menuActive === 7" label="自定义留言:">
-              <i-switch v-model="customBtn" size="large" @on-change="customMessBtn">
-                <span slot="open">开启</span>
-                <span slot="close">关闭</span>
-              </i-switch>
-              <div class="mt10" v-if="customBtn">
-                <Select
-                    v-model="batchData.system_form_id"
-                    filterable
-                    placeholder="请选择"
-                    @on-change="changeForm"
-                >
-                  <Option
-                      v-for="(item, index) in formList"
-                      :value="item.id"
-                      :key="item.id"
-                  >{{ item.name }}</Option
-                  >
-                </Select>
-              </div>
-              <div v-if="customBtn && batchData.system_form_id">
-                <Table border :columns="formColumns" :data="formTypeList" ref="table" class="customTab" width="100%" max-height="260">
-                  <template slot-scope="{ row }" slot="require">
-                    <span>{{row.require?'必填':'不必填'}}</span>
-                  </template>
-                </Table>
-              </div>
-            </FormItem>
-<!--            <template v-if="menuActive === 7">-->
-<!--              <FormItem v-for="(item, index) in batchData.custom_form" :key="item.key">-->
-<!--                <Row :gutter="8">-->
-<!--                  <Col span="7">-->
-<!--                    <Input v-model="item.title" :placeholder="`留言标题${index + 1}`"></Input>-->
-<!--                  </Col>-->
-<!--                  <Col span="9">-->
-<!--                    <Select v-model="item.label">-->
-<!--                      <Option v-for="option in customList" :key="option.value" :value="option.value">{{ option.label }}</Option>-->
-<!--                    </Select>-->
-<!--                  </Col>-->
-<!--                  <Col span="5">-->
-<!--                    <Checkbox v-model="item.status" :true-value="1" :false-value="0">必填</Checkbox>-->
-<!--                  </Col>-->
-<!--                  <Col span="3">-->
-<!--                    <Button type="text" size="small" @click="delForm(item)">删除</Button>-->
-<!--                  </Col>-->
-<!--                </Row>-->
-<!--              </FormItem>-->
-<!--            </template>-->
-<!--            <FormItem v-if="menuActive === 7 && customBtn">-->
-<!--              <Button v-show="batchData.custom_form.length < 10" type="text" icon="md-add" size="small" @click="addForm">添加表单</Button>-->
-<!--              <div>用户下单时需填写的信息,最多可设置10条</div>-->
-<!--            </FormItem>-->
-          </Form>
-        </Col>
-      </Row>
-      <div slot="footer">
-        <Button @click="cancelBatch">取消</Button>
-        <Button type="primary" @click="saveBatch">保存</Button>
-      </div>
-    </Modal>
-    <!-- 用户标签 -->
-    <Modal
-        v-model="labelShow"
-        scrollable
-        title="选择用户标签"
-        :closable="true"
-        width="540"
-        :footer-hide="true"
-        :mask-closable="false"
-    >
-      <userLabel ref="userLabel" @activeData="activeData" @close="labelClose"></userLabel>
-    </Modal>
-    <!-- 商品标签 -->
-    <Modal
-        v-model="storeLabelShow"
-        scrollable
-        title="选择商品标签"
-        :closable="true"
-        width="540"
-        :footer-hide="true"
-        :mask-closable="false"
-    >
-      <storeLabelList ref="storeLabel" @activeData="activeStoreData" @close="storeLabelClose"></storeLabelList>
-    </Modal>
-    <coupon-list
-        ref="couponTemplates"
-        @nameId="nameId"
-        :couponids="coupon_ids"
-        :updateIds="updateIds"
-        :updateName="updateName"
-    ></coupon-list>
-  </div>
+					<Tooltip content="本页至少选中一项" :disabled="!!checkUidList.length && isAll==0">
+						<Button v-auth="['product-product-product_show']" class="bnt mr15"
+							:disabled="!checkUidList.length && isAll==0" @click="onDismount"
+							v-show="artFrom.type === '1'">批量下架</Button>
+					</Tooltip>
+					<Tooltip content="本页至少选中一项" :disabled="!!checkUidList.length && isAll==0">
+						<Button v-auth="['product-product-product_show']" class="bnt mr15"
+							:disabled="!checkUidList.length && isAll==0" @click="onShelves"
+							v-show="artFrom.type === '2'">批量上架</Button>
+					</Tooltip>
+					<Tooltip content="本页至少选中一项" :disabled="!!checkUidList.length && isAll==0">
+						<Button v-auth="['export-storeProduct']" class="export mr15"
+							:disabled="!checkUidList.length && isAll==0" @click="exports">导出</Button>
+					</Tooltip>
+					<Tooltip content="本页至少选中一项" :disabled="!!checkUidList.length && isAll==0">
+						<Button v-auth="['product-product-product_show']" class="bnt"
+							:disabled="!checkUidList.length && isAll==0" @click="openBatch">批量设置</Button>
+					</Tooltip>
+				</div>
+				<div>
+					<Button v-if="openErp" class="bnt mr15" @click="frontDownload">下载erp商品模板</Button>
+				</div>
+			</div>
+			<!-- 商品列表表格 -->
+			<vxe-table ref="xTable" class="mt25" :loading="loading" row-id="id" :expand-config="{accordion: true}"
+				:checkbox-config="{reserve: true}" @checkbox-all="checkboxAll" @checkbox-change="checkboxItem"
+				:data="tableList">
+				<vxe-column type="" width="0" v-show="artFrom.type == 1 || artFrom.type == 2"></vxe-column>
+				<vxe-column type="expand" width="35" v-if="artFrom.type == 1 || artFrom.type == 2">
+					<template #content="{ row }">
+						<div class="tdinfo">
+							<Row class="expand-row">
+								<Col span="8">
+								<span class="expand-key">商品分类:</span>
+								<span class="expand-value">{{ row.cate_name }}</span>
+								</Col>
+								<Col span="8">
+								<span class="expand-key">商品市场价格:</span>
+								<span class="expand-value">{{ row.ot_price }}</span>
+								</Col>
+								<Col span="8">
+								<span class="expand-key">成本价:</span>
+								<span class="expand-value">{{ row.cost }}</span>
+								</Col>
+							</Row>
+							<Row class="expand-row">
+								<Col span="8">
+								<span class="expand-key">收藏:</span>
+								<span class="expand-value">{{ row.collect }}</span>
+								</Col>
+								<Col span="8">
+								<span class="expand-key">虚拟销量:</span>
+								<span class="expand-value">{{ row.ficti }} {{name}}</span>
+								</Col>
+								<Col span="8" v-show="row.is_verify === -1">
+								<span class="expand-key">审核未通过原因:</span>
+								<span class="expand-value">{{ row.refusal }}</span>
+								</Col>
+								<Col span="8" v-show="row.is_verify === -2">
+								<span class="expand-key">强制下架原因:</span>
+								<span class="expand-value">{{ row.refusal }}</span>
+								</Col>
+							</Row>
+						</div>
+					</template>
+				</vxe-column>
+				<vxe-column type="checkbox" width="100">
+					<template #header>
+						<div>
+							<Dropdown transfer @on-click="allPages">
+								<a href="javascript:void(0)" class="acea-row row-middle">
+									<span>全选({{isAll==1?(total-checkUidList.length):checkUidList.length}})</span>
+									<Icon type="ios-arrow-down"></Icon>
+								</a>
+								<template #list>
+									<DropdownMenu>
+										<DropdownItem name="0">当前页</DropdownItem>
+										<DropdownItem name="1">所有页</DropdownItem>
+									</DropdownMenu>
+								</template>
+							</Dropdown>
+						</div>
+					</template>
+				</vxe-column>
+				<vxe-column field="id" title="商品ID" width="60"></vxe-column>
+				<vxe-column field="image" title="商品图" width="60">
+					<template v-slot="{ row }">
+						<viewer>
+							<div class="tabBox_img">
+								<img v-lazy="row.image" />
+							</div>
+						</viewer>
+					</template>
+				</vxe-column>
+				<vxe-column field="store_name" title="商品名称" min-width="250">
+					<template v-slot="{ row }">
+						<Tooltip :transfer="true" theme="dark" max-width="300" :delay="600" :content="row.store_name">
+							<div class="line2">{{ row.store_name }}</div>
+						</Tooltip>
+					</template>
+				</vxe-column>
+				<vxe-column field="plate_name" title="商品来源" min-width="150"></vxe-column>
+				<vxe-column field="plate_name" title="绑定货架" min-width="150">
+					<template v-slot="{ row }">
+						<span v-for="it in tabList" v-if="row.agent_level==it.id">{{it.name}}</span>
+					</template>
+				</vxe-column>
+				<vxe-column field="product_type" title="商品类型" min-width="100">
+					<template v-slot="{ row }">
+						<span v-if="row.product_type == 0">普通商品</span>
+						<span v-if="row.product_type == 1">卡密商品</span>
+						<span v-if="row.product_type == 3">虚拟商品</span>
+						<span v-if="row.product_type == 4">次卡商品</span>
+					</template>
+				</vxe-column>
+				<vxe-column field="price" title="商品售价" min-width="90"></vxe-column>
+				<vxe-column field="sales" title="销量" min-width="90"></vxe-column>
+				<vxe-column field="stock" title="库存" min-width="80" v-show="artFrom.type != 6"></vxe-column>
+				<vxe-column field="sort" title="排序" min-width="70"></vxe-column>
+				<vxe-column field="state" title="状态" width="120">
+					<template v-slot="{ row }">
+						<i-switch v-model="row.is_show" :value="row.is_show" :true-value="1" :false-value="0"
+							:disabled="artFrom.type == 6 || row.is_verify != 1 ? true : false"
+							@on-change="changeSwitch(row)" size="large">
+							<span slot="open">上架</span>
+							<span slot="close">下架</span>
+						</i-switch>
+						<div v-if="row.auto_off_time" class="style-add">
+							定时下架:<br />{{ row.auto_off_time | timeFormat }}
+						</div>
+					</template>
+				</vxe-column>
+				<vxe-column field="action" title="操作" align="center" width="220" fixed="right">
+					<template #default="{ row, rowIndex }">
+						<a @click="details(row.id)">详情</a>
+						<Divider type="vertical" />
+						<a @click="edit(row)">编辑</a>
+						<Divider type="vertical" />
+						<a @click="lookGoods(row.id)">预览</a>
+						<Divider type="vertical" />
+						<a v-if="artFrom.type === '0'" @click="auditGoods(row)">审核</a>
+						<Divider v-if="artFrom.type === '0'" type="vertical" />
+						<template>
+							<Dropdown @on-click="changeMenu(row, $event, rowIndex)" :transfer="true">
+								<a href="javascript:void(0)" class="acea-row row-middle">
+									<span>更多</span>
+									<Icon type="ios-arrow-down"></Icon>
+								</a>
+								<DropdownMenu slot="list">
+									<DropdownItem name="7">修改货架</DropdownItem>
+									<DropdownItem name="1">查看评论</DropdownItem>
+									<DropdownItem name="2" v-if="artFrom.type === '6'">恢复商品</DropdownItem>
+									<DropdownItem name="3" v-if="artFrom.type !== '6' && row.type==0">移到回收站
+									</DropdownItem>
+									<DropdownItem name="4" v-if="row.product_type != 1 && openErp == false">库存管理
+									</DropdownItem>
+									<DropdownItem name="5" v-if="artFrom.type === '1' || artFrom.type === '2'">强制下架
+									</DropdownItem>
+									<DropdownItem name="6">复制商品</DropdownItem>
+								</DropdownMenu>
+							</Dropdown>
+						</template>
+					</template>
+				</vxe-column>
+			</vxe-table>
+			<vxe-pager class="mt20" border size="medium" :page-size="artFrom.limit" :current-page="artFrom.page"
+				:total="total" :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Total']"
+				@page-change="pageChange">
+			</vxe-pager>
+			<!--      <div class="acea-row row-right page">-->
+			<!--        <Page-->
+			<!--          :total="total"-->
+			<!--          :current="artFrom.page"-->
+			<!--          show-elevator-->
+			<!--          show-total-->
+			<!--          @on-change="pageChange"-->
+			<!--          :page-size="artFrom.limit"-->
+			<!--        />-->
+			<!--      </div>-->
+			<attribute :attrTemplate="attrTemplate" v-on:changeTemplate="changeTemplate"></attribute>
+		</Card>
+		<!-- 生成淘宝京东表单-->
+		<Modal v-model="modals" :z-index="100" class="Box" scrollable footer-hide closable title="复制淘宝、天猫、京东、苏宁、1688"
+			:mask-closable="false" width="1200" height="500">
+			<tao-bao ref="taobaos" v-if="modals" @on-close="onClose"></tao-bao>
+		</Modal>
+		<!-- 配送方式 -->
+		<Modal v-model="modalsType" scrollable title="配送方式" :closable="false" class-name="vertical-center-modal">
+			<Form :label-width="90" @submit.native.prevent>
+				<FormItem label="配送方式:" class="deliveryStyle" required>
+					<CheckboxGroup v-model="delivery_type">
+						<Checkbox label="1">快递</Checkbox>
+						<!-- <Checkbox label="3">门店配送</Checkbox> -->
+						<Checkbox label="2">自提</Checkbox>
+					</CheckboxGroup>
+				</FormItem>
+			</Form>
+			<div slot="footer">
+				<Button type="primary" @click="putDelivery">提交</Button>
+				<Button @click="cancelDelivery">取消</Button>
+			</div>
+		</Modal>
+		<!-- 商品弹窗 -->
+		<div v-if="isProductBox">
+			<div class="bg" @click.stop="isProductBox = false"></div>
+			<goodsDetail :goodsId="goodsId" :product="1"></goodsDetail>
+		</div>
+		<stockEdit ref="stock" @stockChange="stockChange"></stockEdit>
+		<!-- 商品详情 -->
+		<productDetails :visible.sync="detailsVisible" :product-id="productId" @saved="getDataList"></productDetails>
+		<!-- 批量设置 -->
+		<Modal v-model="batchModal" title="批量设置" width="750" class-name="batch-modal"
+			@on-visible-change="batchVisibleChange">
+			<Alert show-icon>每次只能修改一项,如需修改多项,请多次操作。</Alert>
+			<Row type="flex" align="middle">
+				<Col span="5">
+				<Menu :active-name="menuActive" width="auto" @on-select="menuSelect">
+					<MenuItem :name="1">商品分类</MenuItem>
+					<MenuItem :name="2">商品标签</MenuItem>
+					<MenuItem :name="3">物流设置</MenuItem>
+					<MenuItem :name="8">运费设置</MenuItem>
+					<MenuItem :name="4">购买即送</MenuItem>
+					<MenuItem :name="5">关联用户标签</MenuItem>
+					<MenuItem :name="6">活动推荐</MenuItem>
+					<MenuItem :name="7">自定义留言</MenuItem>
+				</Menu>
+				</Col>
+				<Col span="19">
+				<Form :model="batchData" :label-width="122">
+					<FormItem v-if="menuActive === 1" label="商品分类:">
+						<el-cascader v-model="batchData.cate_id" :options="data1" :props="props" size="small" filterable
+							clearable :class="{ single: !batchData.cate_id.length }">
+						</el-cascader>
+					</FormItem>
+					<FormItem v-if="menuActive === 2" label="商品标签:">
+						<div class="select-tag" @click="openStoreLabel">
+							<div v-if="storeDataLabel.length">
+								<Tag v-for="item in storeDataLabel" :key="item.id" closable
+									@on-close="tagClose(item.id)">{{ item.label_name }}</Tag>
+							</div>
+							<span v-else class="placeholder">请选择</span>
+							<Icon type="ios-arrow-down" />
+						</div>
+					</FormItem>
+					<FormItem v-if="menuActive === 3" label="物流方式:">
+						<CheckboxGroup v-model="batchData.delivery_type" size="small">
+							<Checkbox :label="1">快递</Checkbox>
+							<Checkbox :label="3">门店配送</Checkbox>
+							<Checkbox :label="2">自提</Checkbox>
+						</CheckboxGroup>
+					</FormItem>
+					<FormItem v-if="menuActive === 8" label="运费设置:">
+						<RadioGroup v-model="batchData.freight">
+							<Radio :label="1">包邮</Radio>
+							<Radio :label="2">固定邮费</Radio>
+							<Radio :label="3">运费模板</Radio>
+						</RadioGroup>
+					</FormItem>
+					<FormItem v-if="menuActive === 8 && batchData.freight === 2">
+						<div class="input-number">
+							<InputNumber v-model="batchData.postage" :min="0"></InputNumber>
+							<span class="suffix">元</span>
+						</div>
+					</FormItem>
+					<FormItem v-if="menuActive === 8 && batchData.freight === 3">
+						<Select v-model="batchData.temp_id">
+							<Option v-for="item in templateList" :key="item.id" :value="item.id">{{ item.name }}
+							</Option>
+						</Select>
+					</FormItem>
+					<FormItem v-if="menuActive === 4" label="购买送积分:">
+						<InputNumber v-model="batchData.give_integral" :min="0"></InputNumber>
+					</FormItem>
+					<FormItem v-if="menuActive === 4" label="购买送优惠券:">
+						<div class="select-tag" @click="addCoupon">
+							<div v-if="couponName.length">
+								<Tag v-for="item in couponName" :key="item.id" closable @on-close="handleClose(item)">
+									{{ item.title }}</Tag>
+							</div>
+							<span v-else class="placeholder">请选择</span>
+							<Icon type="ios-arrow-down" />
+						</div>
+					</FormItem>
+					<FormItem v-if="menuActive === 5" label="关联用户标签:">
+						<div class="select-tag" @click="openLabel">
+							<div v-if="dataLabel.length">
+								<Tag v-for="item in dataLabel" :key="item.id" closable @on-close="tagClose(item.id)">
+									{{ item.label_name }}</Tag>
+							</div>
+							<span v-else class="placeholder">请选择</span>
+							<Icon type="ios-arrow-down" />
+						</div>
+					</FormItem>
+					<FormItem v-if="menuActive === 6" label="商品推荐:">
+						<CheckboxGroup v-model="batchData.recommend" size="small">
+							<Checkbox label="is_hot">热卖单品</Checkbox>
+							<Checkbox label="is_benefit">促销单品</Checkbox>
+							<Checkbox label="is_best">精品推荐</Checkbox>
+							<Checkbox label="is_new">首发新品</Checkbox>
+							<Checkbox label="is_good">优品推荐</Checkbox>
+						</CheckboxGroup>
+					</FormItem>
+					<FormItem v-if="menuActive === 7" label="自定义留言:">
+						<i-switch v-model="customBtn" size="large" @on-change="customMessBtn">
+							<span slot="open">开启</span>
+							<span slot="close">关闭</span>
+						</i-switch>
+						<div class="mt10" v-if="customBtn">
+							<Select v-model="batchData.system_form_id" filterable placeholder="请选择"
+								@on-change="changeForm">
+								<Option v-for="(item, index) in formList" :value="item.id" :key="item.id">
+									{{ item.name }}</Option>
+							</Select>
+						</div>
+						<div v-if="customBtn && batchData.system_form_id">
+							<Table border :columns="formColumns" :data="formTypeList" ref="table" class="customTab"
+								width="100%" max-height="260">
+								<template slot-scope="{ row }" slot="require">
+									<span>{{row.require?'必填':'不必填'}}</span>
+								</template>
+							</Table>
+						</div>
+					</FormItem>
+					<!--            <template v-if="menuActive === 7">-->
+					<!--              <FormItem v-for="(item, index) in batchData.custom_form" :key="item.key">-->
+					<!--                <Row :gutter="8">-->
+					<!--                  <Col span="7">-->
+					<!--                    <Input v-model="item.title" :placeholder="`留言标题${index + 1}`"></Input>-->
+					<!--                  </Col>-->
+					<!--                  <Col span="9">-->
+					<!--                    <Select v-model="item.label">-->
+					<!--                      <Option v-for="option in customList" :key="option.value" :value="option.value">{{ option.label }}</Option>-->
+					<!--                    </Select>-->
+					<!--                  </Col>-->
+					<!--                  <Col span="5">-->
+					<!--                    <Checkbox v-model="item.status" :true-value="1" :false-value="0">必填</Checkbox>-->
+					<!--                  </Col>-->
+					<!--                  <Col span="3">-->
+					<!--                    <Button type="text" size="small" @click="delForm(item)">删除</Button>-->
+					<!--                  </Col>-->
+					<!--                </Row>-->
+					<!--              </FormItem>-->
+					<!--            </template>-->
+					<!--            <FormItem v-if="menuActive === 7 && customBtn">-->
+					<!--              <Button v-show="batchData.custom_form.length < 10" type="text" icon="md-add" size="small" @click="addForm">添加表单</Button>-->
+					<!--              <div>用户下单时需填写的信息,最多可设置10条</div>-->
+					<!--            </FormItem>-->
+				</Form>
+				</Col>
+			</Row>
+			<div slot="footer">
+				<Button @click="cancelBatch">取消</Button>
+				<Button type="primary" @click="saveBatch">保存</Button>
+			</div>
+		</Modal>
+		<!-- 用户标签 -->
+		<Modal v-model="labelShow" scrollable title="选择用户标签" :closable="true" width="540" :footer-hide="true"
+			:mask-closable="false">
+			<userLabel ref="userLabel" @activeData="activeData" @close="labelClose"></userLabel>
+		</Modal>
+		<!-- 商品标签 -->
+		<Modal v-model="storeLabelShow" scrollable title="选择商品标签" :closable="true" width="540" :footer-hide="true"
+			:mask-closable="false">
+			<storeLabelList ref="storeLabel" @activeData="activeStoreData" @close="storeLabelClose"></storeLabelList>
+		</Modal>
+		<coupon-list ref="couponTemplates" @nameId="nameId" :couponids="coupon_ids" :updateIds="updateIds"
+			:updateName="updateName"></coupon-list>
+		<Modal v-model="openLevel" scrollable footer-hide closable title="绑定货架" :z-index="1" width="700"
+			@on-cancel="openLevel=false">
+			<div class="article-manager">
+				<Card :bordered="false" dis-hover>
+					<Form ref="levelChange" :model="formItem" @submit.native.prevent>
+						<Row type="flex" :gutter="24">
+							<Col span="24">
+							<Col>
+							<FormItem label="门店货架:" prop="agent_level" label-for="agent_level">
+								<Select v-model="formItem.agent_level" placeholder="请选择" clearable class="input-add">
+									<Option :value="0">未绑定</Option>
+									<Option v-for="item in tabList" :value="item.id">{{item.name}}</Option>
+								</Select>
+							</FormItem>
+							</Col>
+							</Col>
+						</Row>
+						<Row style="justify-content: space-around;">
+							<Col>
+							<Button type="primary" class="btn" @click="handleSubmit()">修改</Button>
+							</Col>
+						</Row>
+					</Form>
+				</Card>
+			</div>
+		</Modal>
+	</div>
 </template>
 
 <script>
-import goodsDetail from "@/pages/kefu/pc/components/goods_detail";
-import stockEdit from "../components/stockEdit.vue";
-import expandRow from "./tableExpand.vue";
-import productDetails from '../components/productDetails.vue';
-import storeLabelList from "@/components/storeLabelList";
-import userLabel from "@/components/labelList";
-import couponList from "@/components/couponList";
-import attribute from "./attribute";
-import toExcel from "../../../utils/Excel.js";
-import { mapState } from "vuex";
-import taoBao from "./taoBao";
-import dayjs from "dayjs";
-import Setting from "@/setting";
-import util from "@/libs/util";
-import { staffListInfo } from "@/api/store";
-import {
-  getGoodHeade,
-  getGoods,
-  PostgoodsIsShow,
-  treeListApi,
-  productShowApi,
-  productUnshowApi,
-  storeProductApi,
-  cascaderListApi,
-  productCache,
-  cacheDelete,
-  setDeliveryType,
-  productReviewApi,
-  forcedRemovalApi,
-  batchProcess,
-  productGetTemplateApi,
-  brandList,
-  allSystemForm
-} from '@/api/product';
-import { systemFormInfo } from '@/api/setting'
-import { getSupplierList } from "@/api/supplier";
-import { erpConfig, erpProduct } from "@/api/erp";
-import exportExcel from "@/utils/newToExcel.js";
-
-export default {
-  name: "product_productList",
-  components: { expandRow, attribute, taoBao, goodsDetail, stockEdit, productDetails, storeLabelList, userLabel, couponList },
-  filters: {
-    timeFormat: (value) => dayjs(value * 1000).format("YYYY-MM-DD HH:mm"),
-  },
-  computed: {
-    ...mapState("admin/layout", ["isMobile"]),
-    ...mapState("admin/userLevel", ["categoryId"]),
-    labelWidth() {
-      return this.isMobile ? undefined : 75;
-    },
-    labelPosition() {
-      return this.isMobile ? "top" : "right";
-    },
-  },
-  data() {
-    return {
-      formTypeList: [],
-      formColumns: [
-        {
-          title: '表单标题',
-          key: 'title',
-          // align:'center',
-          minWidth: 100
-        },
-        {
-          title: '表单类型',
-          key: 'name',
-          // align:'center',
-          minWidth: 100
-        },
-        {
-          title: '是否必填',
-          slot: 'require',
-          // align:'center',
-          minWidth: 100
-        }
-      ],
-      roterPre: Setting.roterPre,
-      supplierList: [],
-      header: {}, //请求头部信息
-      erpUrl: Setting.apiBaseURL + "/file/upload/1",
-      template: false,
-      modals: false,
-      modalsType: false,
-      delivery_type: [],
-      grid: {
-        xl: 7,
-        lg: 8,
-        md: 12,
-        sm: 24,
-        xs: 24,
-      },
-      // 订单列表
-      orderData: {
-        page: 1,
-        limit: 10,
-        type: 6,
-        status: "",
-        time: "",
-        real_name: "",
-        store_id: "",
-      },
-      artFrom: {
-        page: 1,
-        limit: 15,
-        cate_id: "",
-        type: "1",
-        store_name: "",
-        excel: 0,
-        supplier_id: "",
-        store_id:"",
-        brand_id:[],
-        store_label_id:[]
-      },
-      list: [],
-      tableList: [],
-      headeNum: [],
-      treeSelect: [],
-      isProductBox: false,
-      loading: false,
-      data: [],
-      total: 0,
-      props: { emitPath: false, multiple: true, checkStrictly: true },
-      attrTemplate: false,
-      ids: [],
-      display: "none",
-      formSelection: [],
-      selectionCopy: [],
-      checkBox: false,
-      isAll: 0,
-      data1: [],
-      value1: [],
-      alertShow: false,
-      goodsId: "",
-      columns3: [],
-      openErp: false,
-      // activeKey:1
-      productId: 0,
-      detailsVisible: false,
-      batchModal: false,
-      menuActive: 1,
-      storeLabelShow: false,
-      storeDataLabel: [],
-      labelShow: false,
-      dataLabel: [],
-      coupon_ids: [],
-      updateIds: [],
-      updateName: [],
-      couponName: [],
-      //自定义留言下拉选择
-      customList: [
-        {
-          value: "text",
-          label: "文本框",
-        },
-        {
-          value: "number",
-          label: "数字",
-        },
-        {
-          value: "email",
-          label: "邮件",
-        },
-        {
-          value: "data",
-          label: "日期",
-        },
-        {
-          value: "time",
-          label: "时间",
-        },
-        {
-          value: "id",
-          label: "身份证",
-        },
-        {
-          value: "phone",
-          label: "手机号",
-        },
-        {
-          value: "img",
-          label: "图片",
-        },
-      ],
-      customBtn: false,
-      batchData: {
-        system_form_id:0,//自定义表单id
-        cate_id: [],
-        store_label_id: [],
-        delivery_type: [],
-        freight: 1,
-        postage: 0,
-        temp_id: 0,
-        give_integral: 0,
-        coupon_ids: [],
-        label_id: [],
-        recommend: [],
-        custom_form: []
-      },
-      templateList: [],
-      brandData:[],
-      goodsDataLabel:[],
-      isLabel:0,
-      checkUidList:[],
-      isCheckBox: false,
-      staffData:[],
-      formList:[]
-    };
-  },
-  watch: {
-    $route() {
-      if (this.$route.fullPath === "/product/product_list?type=5") {
-        this.getPath();
-      }
-    },
-    formSelection(value) {
-      // this.checkBox = value.length === this.tableList.length;
-    },
-    tableList: {
-      deep: true,
-      handler(value) {
-        value.forEach((item) => {
-          this.formSelection.forEach((itm) => {
-            if (itm.id === item.id) {
-              item.checkBox = true;
-            }
-          });
-        });
-        const arr = this.tableList.filter((item) => item.checkBox);
-        if (this.tableList.length) {
-          this.checkBox = this.tableList.length === arr.length;
-        } else {
-          this.checkBox = false;
-        }
-      },
-    },
-    storeDataLabel(value) {
-      this.batchData.store_label_id = value.map(item => item.id);
-      this.artFrom.store_label_id = value.map(item => item.id);
-    },
-    couponName(value) {
-      this.batchData.coupon_ids = value.map(item => item.id);
-    },
-    dataLabel(value) {
-      this.batchData.label_id = value.map(item => item.id);
-    },
-    'batchData.system_form_id'(value){
-      this.customBtn = !!value;
-    },
-    'batchData.freight'(value) {
-      switch (value) {
-        case 1:
-          this.batchData.postage = 0;
-          this.batchData.temp_id = 0;
-          break;
-        case 2:
-          this.batchData.temp_id = 0;
-          break;
-        case 3:
-          this.batchData.postage = 0;
-          break;
-      }
-    }
-  },
-  created() {
-    this.getToken();
-    this.staffList();
-    productCache()
-        .then((res) => {
-          const info = res.data.info;
-          if (!Array.isArray(info)) {
-            this.alertShow = true;
-          }
-        })
-        .catch((err) => {
-          this.$Message.error(err.msg);
-        });
-    this.getErpConfig();
-    this.getBrandList();
-    this.allFormList();
-  },
-  mounted() {
-    this.goodsCategory();
-    this.getSupplierList();
-    if (this.$route.fullPath === "/product/product_list?type=5") {
-      this.getPath();
-    } else {
-      this.getDataList();
-    }
-    // this.getDataList();
-    this.productGetTemplate();
-    this.goodHeade();
-  },
-  activated(e) {
-    this.getDataList();
-    this.goodHeade();
-  },
-  beforeRouteEnter(to, from, next) {
-    next((vm) => {
-      if (from.path.indexOf("/product/add_product") != -1) {
-        document.documentElement.scrollTop = to.meta.scollTopPosition;
-      }else{
-		if(vm.artFrom.page != 1 || vm.artFrom.cate_id != "" || vm.artFrom.type != "1" || vm.artFrom.store_name != ""
-		|| vm.artFrom.supplier_id != "" || vm.artFrom.brand_id.length !=0 || vm.goodsDataLabel.length !=0){
-			vm.artFrom = {
-				page: 1,
-				limit: 15,
-				cate_id: "",
-				type: "1",
-				store_name: "",
-				excel: 0,
-				supplier_id: "",
-				store_id:"",
-				brand_id:[],
-				store_label_id:[]
+	import goodsDetail from "@/pages/kefu/pc/components/goods_detail";
+	import stockEdit from "../components/stockEdit.vue";
+	import expandRow from "./tableExpand.vue";
+	import productDetails from '../components/productDetails.vue';
+	import storeLabelList from "@/components/storeLabelList";
+	import userLabel from "@/components/labelList";
+	import couponList from "@/components/couponList";
+	import attribute from "./attribute";
+	import toExcel from "../../../utils/Excel.js";
+	import {
+		mapState
+	} from "vuex";
+	import taoBao from "./taoBao";
+	import dayjs from "dayjs";
+	import Setting from "@/setting";
+	import util from "@/libs/util";
+	import {
+		staffListInfo
+	} from "@/api/store";
+	import {
+		getGoodHeade,
+		getGoods,
+		PostgoodsIsShow,
+		treeListApi,
+		productShowApi,
+		productUnshowApi,
+		storeProductApi,
+		cascaderListApi,
+		productCache,
+		cacheDelete,
+		setDeliveryType,
+		productReviewApi,
+		forcedRemovalApi,
+		batchProcess,
+		productGetTemplateApi,
+		brandList,
+		allSystemForm,
+		productBindLevel
+	} from '@/api/product';
+	import {
+		systemFormInfo
+	} from '@/api/setting'
+	import {
+		getSupplierList
+	} from "@/api/supplier";
+	import {
+		erpConfig,
+		erpProduct
+	} from "@/api/erp";
+	import {
+	  membershipDataListApi,
+	} from "@/api/membershipLevel";
+	import exportExcel from "@/utils/newToExcel.js";
+
+	export default {
+		name: "product_productList",
+		components: {
+			expandRow,
+			attribute,
+			taoBao,
+			goodsDetail,
+			stockEdit,
+			productDetails,
+			storeLabelList,
+			userLabel,
+			couponList
+		},
+		filters: {
+			timeFormat: (value) => dayjs(value * 1000).format("YYYY-MM-DD HH:mm"),
+		},
+		computed: {
+			...mapState("admin/layout", ["isMobile"]),
+			...mapState("admin/userLevel", ["categoryId"]),
+			labelWidth() {
+				return this.isMobile ? undefined : 75;
+			},
+			labelPosition() {
+				return this.isMobile ? "top" : "right";
+			},
+		},
+		data() {
+			return {
+				// 门店弹窗Start
+				tabList:[],
+				formItem: {
+					id: '',
+					agent_level: ''
+				},
+				openLevel: false,
+				// 门店修改弹窗End
+				formTypeList: [],
+				formColumns: [{
+						title: '表单标题',
+						key: 'title',
+						// align:'center',
+						minWidth: 100
+					},
+					{
+						title: '表单类型',
+						key: 'name',
+						// align:'center',
+						minWidth: 100
+					},
+					{
+						title: '是否必填',
+						slot: 'require',
+						// align:'center',
+						minWidth: 100
+					}
+				],
+				roterPre: Setting.roterPre,
+				supplierList: [],
+				header: {}, //请求头部信息
+				erpUrl: Setting.apiBaseURL + "/file/upload/1",
+				template: false,
+				modals: false,
+				modalsType: false,
+				delivery_type: [],
+				grid: {
+					xl: 7,
+					lg: 8,
+					md: 12,
+					sm: 24,
+					xs: 24,
+				},
+				// 订单列表
+				orderData: {
+					page: 1,
+					limit: 10,
+					type: 6,
+					status: "",
+					time: "",
+					real_name: "",
+					store_id: "",
+				},
+				artFrom: {
+					page: 1,
+					limit: 15,
+					cate_id: "",
+					type: "1",
+					store_name: "",
+					excel: 0,
+					supplier_id: "",
+					store_id: "",
+					brand_id: [],
+					store_label_id: []
+				},
+				list: [],
+				tableList: [],
+				headeNum: [],
+				treeSelect: [],
+				isProductBox: false,
+				loading: false,
+				data: [],
+				total: 0,
+				props: {
+					emitPath: false,
+					multiple: true,
+					checkStrictly: true
+				},
+				attrTemplate: false,
+				ids: [],
+				display: "none",
+				formSelection: [],
+				selectionCopy: [],
+				checkBox: false,
+				isAll: 0,
+				data1: [],
+				value1: [],
+				alertShow: false,
+				goodsId: "",
+				columns3: [],
+				openErp: false,
+				// activeKey:1
+				productId: 0,
+				detailsVisible: false,
+				batchModal: false,
+				menuActive: 1,
+				storeLabelShow: false,
+				storeDataLabel: [],
+				labelShow: false,
+				dataLabel: [],
+				coupon_ids: [],
+				updateIds: [],
+				updateName: [],
+				couponName: [],
+				//自定义留言下拉选择
+				customList: [{
+						value: "text",
+						label: "文本框",
+					},
+					{
+						value: "number",
+						label: "数字",
+					},
+					{
+						value: "email",
+						label: "邮件",
+					},
+					{
+						value: "data",
+						label: "日期",
+					},
+					{
+						value: "time",
+						label: "时间",
+					},
+					{
+						value: "id",
+						label: "身份证",
+					},
+					{
+						value: "phone",
+						label: "手机号",
+					},
+					{
+						value: "img",
+						label: "图片",
+					},
+				],
+				customBtn: false,
+				batchData: {
+					system_form_id: 0, //自定义表单id
+					cate_id: [],
+					store_label_id: [],
+					delivery_type: [],
+					freight: 1,
+					postage: 0,
+					temp_id: 0,
+					give_integral: 0,
+					coupon_ids: [],
+					label_id: [],
+					recommend: [],
+					custom_form: []
+				},
+				templateList: [],
+				brandData: [],
+				goodsDataLabel: [],
+				isLabel: 0,
+				checkUidList: [],
+				isCheckBox: false,
+				staffData: [],
+				formList: []
+			};
+		},
+		watch: {
+			$route() {
+				if (this.$route.fullPath === "/product/product_list?type=5") {
+					this.getPath();
+				}
+			},
+			formSelection(value) {
+				// this.checkBox = value.length === this.tableList.length;
+			},
+			tableList: {
+				deep: true,
+				handler(value) {
+					value.forEach((item) => {
+						this.formSelection.forEach((itm) => {
+							if (itm.id === item.id) {
+								item.checkBox = true;
+							}
+						});
+					});
+					const arr = this.tableList.filter((item) => item.checkBox);
+					if (this.tableList.length) {
+						this.checkBox = this.tableList.length === arr.length;
+					} else {
+						this.checkBox = false;
+					}
+				},
+			},
+			storeDataLabel(value) {
+				this.batchData.store_label_id = value.map(item => item.id);
+				this.artFrom.store_label_id = value.map(item => item.id);
+			},
+			couponName(value) {
+				this.batchData.coupon_ids = value.map(item => item.id);
+			},
+			dataLabel(value) {
+				this.batchData.label_id = value.map(item => item.id);
+			},
+			'batchData.system_form_id'(value) {
+				this.customBtn = !!value;
+			},
+			'batchData.freight'(value) {
+				switch (value) {
+					case 1:
+						this.batchData.postage = 0;
+						this.batchData.temp_id = 0;
+						break;
+					case 2:
+						this.batchData.temp_id = 0;
+						break;
+					case 3:
+						this.batchData.postage = 0;
+						break;
+				}
 			}
-			vm.goodsDataLabel = []
-			let that = vm;
-			setTimeout(function(){
-			  that.userSearchs();
-			},500)
-		}
-	  }
-    });
-  },
-  beforeRouteLeave(to, from, next) {
-    if (from.meta.keepAlive) {
-      from.meta.scollTopPosition = document.documentElement.scrollTop;
-    }
-    next();
-  },
-  methods: {
-	allReset(){
-		this.isAll = 0;
-		this.isCheckBox = false;
-		this.$refs.xTable.setAllCheckboxRow(false);
-		this.checkUidList = [];
-	},
-    changeForm(e){
-      this.getSystemFormInfo(e,{type:1});
-    },
-    getSystemFormInfo(e,data){
-      systemFormInfo(e,data).then(res=>{
-        this.formTypeList = res.data.info;
-      }).catch(err=>{
-        this.$Message.error(err.msg);
-      })
-    },
-    allFormList(){
-      allSystemForm().then(res=>{
-        this.formList = res.data;
-      }).catch(err=>{
-        this.$Message.error(err.msg);
-      })
-    },
-    checkboxItem(e){
-      let id = parseInt(e.rowid);
-      let index = this.checkUidList.indexOf(id);
-      if(index !== -1){
-        this.checkUidList = this.checkUidList.filter((item)=> item !== id);
-      }else{
-		this.checkUidList.push(id);
-      }
-    },
-    checkboxAll(){
-      // 获取选中当前值
-      let obj2 = this.$refs.xTable.getCheckboxRecords(true);
-      // 获取之前选中值
-      let obj = this.$refs.xTable.getCheckboxReserveRecords(true);
-	  if(this.isAll == 0 && this.checkUidList.length <= obj.length && !this.isCheckBox){
-	  	 obj = [];
-	  }
-      obj = obj.concat(obj2);
-      let ids = [];
-      obj.forEach((item)=>{
-        ids.push(parseInt(item.id))
-      })
-      this.checkUidList = ids;
-      if(!obj2.length){
-        this.isCheckBox = false;
-      }
-    },
-    allPages(e){
-      this.isAll = e;
-      if(e==0){
-        this.$refs.xTable.toggleAllCheckboxRow();
-        // this.checkboxAll();
-      }else{
-        if(!this.isCheckBox){
-          this.$refs.xTable.setAllCheckboxRow(true);
-          this.isCheckBox = true;
-          this.isAll = 1;
-        }else{
-          this.$refs.xTable.setAllCheckboxRow(false);
-          this.isCheckBox = false;
-          this.isAll = 0;
-        }
-        this.checkUidList = []
-      }
-    },
-    closeStoreLabel(label){
-      let index = this.goodsDataLabel.indexOf(this.goodsDataLabel.filter(d=>d.id == label.id)[0]);
-      this.goodsDataLabel.splice(index,1);
-      // 商品标签id
-      let storeActiveIds = [];
-      this.goodsDataLabel.forEach((item)=>{
-        storeActiveIds.push(item.id)
-      });
-      this.artFrom.store_label_id = storeActiveIds;
-      this.userSearchs();
-    },
-    // 品牌列表
-    getBrandList(){
-      brandList().then(res=>{
-        this.brandData = res.data
-      }).catch(err=>{
-        this.$Message.error(err.msg);
-      })
-    },
-    //获取供应商列表;
-    getSupplierList() {
-      getSupplierList()
-          .then(async (res) => {
-            this.supplierList = res.data;
-          })
-          .catch((res) => {
-            this.$Message.error(res.msg);
-          });
-    },
-    // 审核
-    auditGoods (row) {
-      this.$modalForm(productReviewApi(row.id)).then(() => {
-        this.getDataList();
-        this.goodHeade();
-      })
-    },
-    // 强制下架
-    forcedRemoval (row) {
-      this.$modalForm(forcedRemovalApi(row.id)).then(() => this.getDataList())
-    },
-    frontDownload() {
-      let a = document.createElement("a"); //创建一个<a></a>标签
-      a.href = "/statics/ERP商品导入模板.xlsx"; // 给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
-      a.download = "ERP商品导入模板.xlsx"; //设置下载文件文件名,这里加上.xlsx指定文件类型,pdf文件就指定.fpd即可
-      a.style.display = "none"; // 障眼法藏起来a标签
-      document.body.appendChild(a); // 将a标签追加到文档对象中
-      a.click(); // 模拟点击了a标签,会触发a标签的href的读取,浏览器就会自动下载了
-      a.remove(); // 一次性的,用完就删除a标签
-    },
-    handleFormatError(file) {
-      return this.$Message.error("必须上传xlsx格式文件");
-    },
-    // 上传头部token
-    getToken() {
-      this.header["Authori-zation"] = "Bearer " + util.cookies.get("token");
-    },
-    upFile(res) {
-      erpProduct({ path: res.data.src })
-          .then((res) => {
-            this.$Message.success(res.msg);
-            this.getDataList();
-          })
-          .catch((err) => {
-            return this.$Message.error(err.msg);
-          });
-    },
-    beforeUpload() {
-      let promise = new Promise((resolve) => {
-        this.$nextTick(function () {
-          resolve(true);
-        });
-      });
-      return promise;
-    },
-    //erp配置
-    getErpConfig() {
-      erpConfig()
-          .then((res) => {
-            this.openErp = res.data.open_erp;
-          })
-          .catch((err) => {
-            this.$Message.error(err.msg);
-          });
-    },
-    stockChange(stock) {
-      this.tableList.forEach((item) => {
-        if (this.goodsId == item.id) {
-          item.stock = stock;
-        }
-      });
-    },
-    // 库存管理
-    stockControl(row) {
-      this.goodsId = row.id;
-      this.$refs.stock.modals = true;
-      this.$refs.stock.productAttrs(row);
-    },
-    cancelDelivery() {
-      this.modalsType = false;
-      this.delivery_type = [];
-    },
-    deliveryType() {
-      this.modalsType = true;
-    },
-    putDelivery() {
-      if (this.delivery_type.length === 0) {
-        this.$Message.error("请选择要配送的商品");
-      } else {
-        let data = {
-          all: this.isAll,
-          delivery_type: this.delivery_type,
-          ids:this.checkUidList
-        };
-        // if (this.isAll == 0) {
-        //   data.ids = this.checkUidList;
-        // }
-        setDeliveryType(data)
-            .then((res) => {
-              this.$Message.success(res.msg);
-              this.modalsType = false;
-              this.delivery_type = [];
-              this.isAll = 0;
-              this.getDataList();
-            })
-            .catch((res) => {
-              this.$Message.error(res.msg);
-            });
-      }
-    },
-    // 商品详情
-    lookGoods(id) {
-      this.goodsId = id;
-      this.isProductBox = true;
-    },
-    closeAlert() {
-      cacheDelete()
-          .then((res) => {
-            this.$Message.success(res.msg);
-          })
-          .catch((err) => {
-            this.$Message.error(err.msg);
-          });
-    },
-    getPath() {
-      this.columns2 = [...this.columns];
-      if (name !== "1" && name !== "2") {
-        this.columns2.shift();
-      }
-      this.artFrom.page = 1;
-      this.artFrom.type = this.$route.query.type.toString();
-      this.getDataList();
-    },
-    changeMenu(row, name, index) {
-      switch (name) {
-        case "1":
-          this.$router.push({ path: this.roterPre + "/product/product_reply/" + row.id });
-          break;
-        case "2":
-          this.del(row, "恢复商品", index, name);
-          break;
-        case "3":
-          this.del(row, "移入回收站", index, name);
-          break;
-        case "4":
-          this.stockControl(row);
-          break;
-        case "5":
-          this.$modalForm(forcedRemovalApi(row.id)).then(() => {
-            this.getDataList();
-            this.goodHeade();
-          })
-          break;
-        case "6":
-          this.$router.push({ path: this.roterPre + "/product/add_product/", query: { copy: row.id } });
-          break;
-      }
-    },
-    // 数据导出;
-    async exports() {
-      let [th, filekey, data, fileName] = [[], [], [], ""];
-      let formValidate = this.artFrom;
-      let excelData = {};
-      excelData.ids = this.checkUidList.join();
-      if (this.isAll == 1) {
-        excelData.cate_id = formValidate.cate_id;
-        excelData.type = formValidate.type;
-        excelData.store_name = formValidate.store_name;
-      }
-      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 {
-          exportExcel(th, filekey, fileName, data);
-          return;
-        }
-      }
-    },
-    getExcelData(excelData) {
-      return new Promise((resolve, reject) => {
-        storeProductApi(excelData).then((res) => {
-          return resolve(res.data);
-        });
-      });
-    },
-    changeTemplate(e) {
-      // this.template = e;
-    },
-    freight() {
-      this.$refs.template.isTemplate = true;
-    },
-    // 批量上架
-    onShelves() {
-      if (this.isAll != 1 && this.checkUidList.length === 0) {
-        this.$Message.warning("请选择要上架的商品");
-      } else {
-        let data = {
-          all: this.isAll,
-          ids: this.checkUidList
-        };
-        if (this.isAll == 1) {
-          data.where = {
-            cate_id: this.artFrom.cate_id,
-            excel: this.artFrom.excel,
-            store_name: this.artFrom.store_name,
-            type: this.artFrom.type,
-          };
-        }
-        productShowApi(data)
-            .then((res) => {
-              this.$Message.success(res.msg);
-              this.goodHeade();
-              this.getDataList();
-			  this.allReset();
-            })
-            .catch((res) => {
-              this.$Message.error(res.msg);
-            });
-      }
-    },
-    // 批量下架
-    onDismount() {
-      if (this.isAll != 1 && this.checkUidList.length === 0) {
-        this.$Message.warning("请选择要下架的商品");
-      } else {
-        let data = {
-          all: this.isAll,
-          ids:this.checkUidList
-        };
-        if (this.isAll == 1) {
-          data.where = {
-            cate_id: this.artFrom.cate_id,
-            excel: this.artFrom.excel,
-            store_name: this.artFrom.store_name,
-            type: this.artFrom.type,
-          };
-        }
-        productUnshowApi(data)
-            .then((res) => {
-              this.$Message.success(res.msg);
-              this.goodHeade();
-              this.getDataList();
-			  this.allReset();
-            })
-            .catch((res) => {
-              this.$Message.error(res.msg);
-            });
-      }
-    },
-    // 添加淘宝商品成功
-    onClose() {
-      this.modals = false;
-    },
-    // 复制淘宝
-    onCopy() {
-      this.$router.push({
-        path: this.roterPre + "/product/add_product",
-        query: { type: -1 },
-      });
-      // this.modals = true;
-    },
-    // tab选择
-    onClickTab(name) {
-      this.allReset();
-      this.artFrom.type = name;
-      // this.columns2 = [...this.columns];
-      // if (name !== "1" && name !== "2") {
-      //   this.columns2.shift();
-      // }
-      // let obj = [...this.columns];
-      // obj.shift();
-      // obj.splice(8, 1);
-      // this.columns3 = obj;
-      // this.checkBox = false;
-      this.artFrom.page = 1;
-      this.getDataList();
-	  this.goodHeade();
-    },
-    // 下拉树
-    handleCheckChange(data) {
-      let value = "";
-      let title = "";
-      this.list = [];
-      this.artFrom.cate_id = 0;
-      data.forEach((item, index) => {
-        value += `${item.id},`;
-        title += `${item.title},`;
-      });
-      value = value.substring(0, value.length - 1);
-      title = title.substring(0, title.length - 1);
-      this.list.push({
-        value,
-        title,
-      });
-      this.artFrom.cate_id = value;
-      this.getDataList();
-    },
-    // 获取商品表单头数量
-    goodHeade() {
-      // let data = {
-      //   store_name: this.artFrom.store_name,
-      //   cate_id: this.artFrom.cate_id || "",
-      //   supplier_id: this.artFrom.supplier_id || "",
-      //   store_id: this.artFrom.store_id || "",
-      //   brand_id: this.artFrom.brand_id || [],
-      //   store_label_id: this.artFrom.store_label_id || []
-      // };
-      getGoodHeade(this.artFrom)
-          .then((res) => {
-            this.headeNum = res.data.list;
-          })
-          .catch((res) => {
-            this.$Message.error(res.msg);
-          });
-    },
-    // 商品分类;
-    goodsCategory() {
-      // treeListApi(1).then(res => {
-      //     this.treeSelect = res.data;
-      // }).catch(res => {
-      //     this.$Message.error(res.msg);
-      // })
-      cascaderListApi(1)
-          .then((res) => {
-            this.data1 = res.data;
-          })
-          .catch((res) => {
-            this.$Message.error(res.msg);
-          });
-    },
-    // 商品列表;
-    getDataList() {
-      this.loading = true;
-      this.artFrom.cate_id = this.artFrom.cate_id || "";
-      getGoods(this.artFrom)
-          .then((res) => {
-            let data = res.data;
-            this.tableList = data.list;
-            this.total = data.count;
-            this.loading = false;
-            this.$nextTick(function(){
-              if (this.isAll == 1) {
-                if(this.isCheckBox){
-                  this.$refs.xTable.setAllCheckboxRow(true);
-                }else{
-                  this.$refs.xTable.setAllCheckboxRow(false);
-                }
-              }else{
+		},
+		created() {
+			this.getVipList();
+			this.getToken();
+			this.staffList();
+			productCache()
+				.then((res) => {
+					const info = res.data.info;
+					if (!Array.isArray(info)) {
+						this.alertShow = true;
+					}
+				})
+				.catch((err) => {
+					this.$Message.error(err.msg);
+				});
+			this.getErpConfig();
+			this.getBrandList();
+			this.allFormList();
+		},
+		mounted() {
+			this.goodsCategory();
+			this.getSupplierList();
+			if (this.$route.fullPath === "/product/product_list?type=5") {
+				this.getPath();
+			} else {
+				this.getDataList();
+			}
+			// this.getDataList();
+			this.productGetTemplate();
+			this.goodHeade();
+		},
+		activated(e) {
+			this.getDataList();
+			this.goodHeade();
+		},
+		beforeRouteEnter(to, from, next) {
+			next((vm) => {
+				if (from.path.indexOf("/product/add_product") != -1) {
+					document.documentElement.scrollTop = to.meta.scollTopPosition;
+				} else {
+					if (vm.artFrom.page != 1 || vm.artFrom.cate_id != "" || vm.artFrom.type != "1" || vm.artFrom
+						.store_name != "" ||
+						vm.artFrom.supplier_id != "" || vm.artFrom.brand_id.length != 0 || vm.goodsDataLabel
+						.length != 0) {
+						vm.artFrom = {
+							page: 1,
+							limit: 15,
+							cate_id: "",
+							type: "1",
+							store_name: "",
+							excel: 0,
+							supplier_id: "",
+							store_id: "",
+							brand_id: [],
+							store_label_id: []
+						}
+						vm.goodsDataLabel = []
+						let that = vm;
+						setTimeout(function() {
+							that.userSearchs();
+						}, 500)
+					}
+				}
+			});
+		},
+		beforeRouteLeave(to, from, next) {
+			if (from.meta.keepAlive) {
+				from.meta.scollTopPosition = document.documentElement.scrollTop;
+			}
+			next();
+		},
+		methods: {
+			// 获取门店等级
+			getVipList(){
+				const that = this;
+				  membershipDataListApi({})
+				    .then(({data}) => {
+				      that.tabList = data.list;
+				    })
+				    .catch((res) => {
+				      that.$Message.error(res.msg);
+				    });
+			},
+			// 提交修改门店等级
+			handleSubmit() {
+				this.$refs.levelChange.validate((valid) => {
+					if (valid) {
+						productBindLevel(this.formItem).then(async res => {
+							this.$Message.success(res.msg);
+							this.openLevel = false;
+							this.userSearchs();
+						}).catch(res => {
+							this.$Message.error(res.msg);
+						})
+					} else {
+						return false;
+					}
+				})
+			},
+			allReset() {
+				this.isAll = 0;
+				this.isCheckBox = false;
+				this.$refs.xTable.setAllCheckboxRow(false);
+				this.checkUidList = [];
+			},
+			changeForm(e) {
+				this.getSystemFormInfo(e, {
+					type: 1
+				});
+			},
+			getSystemFormInfo(e, data) {
+				systemFormInfo(e, data).then(res => {
+					this.formTypeList = res.data.info;
+				}).catch(err => {
+					this.$Message.error(err.msg);
+				})
+			},
+			allFormList() {
+				allSystemForm().then(res => {
+					this.formList = res.data;
+				}).catch(err => {
+					this.$Message.error(err.msg);
+				})
+			},
+			checkboxItem(e) {
+				let id = parseInt(e.rowid);
+				let index = this.checkUidList.indexOf(id);
+				if (index !== -1) {
+					this.checkUidList = this.checkUidList.filter((item) => item !== id);
+				} else {
+					this.checkUidList.push(id);
+				}
+			},
+			checkboxAll() {
+				// 获取选中当前值
+				let obj2 = this.$refs.xTable.getCheckboxRecords(true);
+				// 获取之前选中值
 				let obj = this.$refs.xTable.getCheckboxReserveRecords(true);
-				if(!this.checkUidList.length || this.checkUidList.length <= obj.length){
-				  this.$refs.xTable.setAllCheckboxRow(false);
+				if (this.isAll == 0 && this.checkUidList.length <= obj.length && !this.isCheckBox) {
+					obj = [];
+				}
+				obj = obj.concat(obj2);
+				let ids = [];
+				obj.forEach((item) => {
+					ids.push(parseInt(item.id))
+				})
+				this.checkUidList = ids;
+				if (!obj2.length) {
+					this.isCheckBox = false;
+				}
+			},
+			allPages(e) {
+				this.isAll = e;
+				if (e == 0) {
+					this.$refs.xTable.toggleAllCheckboxRow();
+					// this.checkboxAll();
+				} else {
+					if (!this.isCheckBox) {
+						this.$refs.xTable.setAllCheckboxRow(true);
+						this.isCheckBox = true;
+						this.isAll = 1;
+					} else {
+						this.$refs.xTable.setAllCheckboxRow(false);
+						this.isCheckBox = false;
+						this.isAll = 0;
+					}
+					this.checkUidList = []
+				}
+			},
+			closeStoreLabel(label) {
+				let index = this.goodsDataLabel.indexOf(this.goodsDataLabel.filter(d => d.id == label.id)[0]);
+				this.goodsDataLabel.splice(index, 1);
+				// 商品标签id
+				let storeActiveIds = [];
+				this.goodsDataLabel.forEach((item) => {
+					storeActiveIds.push(item.id)
+				});
+				this.artFrom.store_label_id = storeActiveIds;
+				this.userSearchs();
+			},
+			// 品牌列表
+			getBrandList() {
+				brandList().then(res => {
+					this.brandData = res.data
+				}).catch(err => {
+					this.$Message.error(err.msg);
+				})
+			},
+			//获取供应商列表;
+			getSupplierList() {
+				getSupplierList()
+					.then(async (res) => {
+						this.supplierList = res.data;
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+			// 审核
+			auditGoods(row) {
+				this.$modalForm(productReviewApi(row.id)).then(() => {
+					this.getDataList();
+					this.goodHeade();
+				})
+			},
+			// 强制下架
+			forcedRemoval(row) {
+				this.$modalForm(forcedRemovalApi(row.id)).then(() => this.getDataList())
+			},
+			frontDownload() {
+				let a = document.createElement("a"); //创建一个<a></a>标签
+				a.href = "/statics/ERP商品导入模板.xlsx"; // 给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
+				a.download = "ERP商品导入模板.xlsx"; //设置下载文件文件名,这里加上.xlsx指定文件类型,pdf文件就指定.fpd即可
+				a.style.display = "none"; // 障眼法藏起来a标签
+				document.body.appendChild(a); // 将a标签追加到文档对象中
+				a.click(); // 模拟点击了a标签,会触发a标签的href的读取,浏览器就会自动下载了
+				a.remove(); // 一次性的,用完就删除a标签
+			},
+			handleFormatError(file) {
+				return this.$Message.error("必须上传xlsx格式文件");
+			},
+			// 上传头部token
+			getToken() {
+				this.header["Authori-zation"] = "Bearer " + util.cookies.get("token");
+			},
+			upFile(res) {
+				erpProduct({
+						path: res.data.src
+					})
+					.then((res) => {
+						this.$Message.success(res.msg);
+						this.getDataList();
+					})
+					.catch((err) => {
+						return this.$Message.error(err.msg);
+					});
+			},
+			beforeUpload() {
+				let promise = new Promise((resolve) => {
+					this.$nextTick(function() {
+						resolve(true);
+					});
+				});
+				return promise;
+			},
+			//erp配置
+			getErpConfig() {
+				erpConfig()
+					.then((res) => {
+						this.openErp = res.data.open_erp;
+					})
+					.catch((err) => {
+						this.$Message.error(err.msg);
+					});
+			},
+			stockChange(stock) {
+				this.tableList.forEach((item) => {
+					if (this.goodsId == item.id) {
+						item.stock = stock;
+					}
+				});
+			},
+			// 库存管理
+			stockControl(row) {
+				this.goodsId = row.id;
+				this.$refs.stock.modals = true;
+				this.$refs.stock.productAttrs(row);
+			},
+			cancelDelivery() {
+				this.modalsType = false;
+				this.delivery_type = [];
+			},
+			deliveryType() {
+				this.modalsType = true;
+			},
+			putDelivery() {
+				if (this.delivery_type.length === 0) {
+					this.$Message.error("请选择要配送的商品");
+				} else {
+					let data = {
+						all: this.isAll,
+						delivery_type: this.delivery_type,
+						ids: this.checkUidList
+					};
+					// if (this.isAll == 0) {
+					//   data.ids = this.checkUidList;
+					// }
+					setDeliveryType(data)
+						.then((res) => {
+							this.$Message.success(res.msg);
+							this.modalsType = false;
+							this.delivery_type = [];
+							this.isAll = 0;
+							this.getDataList();
+						})
+						.catch((res) => {
+							this.$Message.error(res.msg);
+						});
+				}
+			},
+			// 商品详情
+			lookGoods(id) {
+				this.goodsId = id;
+				this.isProductBox = true;
+			},
+			closeAlert() {
+				cacheDelete()
+					.then((res) => {
+						this.$Message.success(res.msg);
+					})
+					.catch((err) => {
+						this.$Message.error(err.msg);
+					});
+			},
+			getPath() {
+				this.columns2 = [...this.columns];
+				if (name !== "1" && name !== "2") {
+					this.columns2.shift();
+				}
+				this.artFrom.page = 1;
+				this.artFrom.type = this.$route.query.type.toString();
+				this.getDataList();
+			},
+			changeMenu(row, name, index) {
+				switch (name) {
+					case "1":
+						this.$router.push({
+							path: this.roterPre + "/product/product_reply/" + row.id
+						});
+						break;
+					case "2":
+						this.del(row, "恢复商品", index, name);
+						break;
+					case "3":
+						this.del(row, "移入回收站", index, name);
+						break;
+					case "4":
+						this.stockControl(row);
+						break;
+					case "5":
+						this.$modalForm(forcedRemovalApi(row.id)).then(() => {
+							this.getDataList();
+							this.goodHeade();
+						})
+						break;
+					case "6":
+						this.$router.push({
+							path: this.roterPre + "/product/add_product/",
+							query: {
+								copy: row.id
+							}
+						});
+						break;
+					case "7":
+						this.formItem.id = row.id;
+						this.formItem.agent_level = row.agent_level;
+						this.openLevel = true;
+						break;
 				}
-              }
-            })
-          })
-          .catch((res) => {
-            this.loading = false;
-            this.$Message.error(res.msg);
-          });
-    },
-    pageChange(currentPage) {
-      this.artFrom.page = currentPage.currentPage;
-      this.getDataList();
-      // this.$refs.table.clearCurrentRow();
-    },
-    // cascaderSearchs(value, selectedData) {
-    //   this.artFrom.cate_id = value[value.length - 1];
-    //   this.userSearchs();
-    // },
-    // 表格搜索
-    userSearchs(e) {
-      this.allReset();
-      this.artFrom.page = 1;
-      this.formSelection = [];
-      this.goodHeade();
-      this.getDataList();
-    },
-    // 上下架
-    changeSwitch(row) {
-      PostgoodsIsShow(row.id, row.is_show)
-          .then((res) => {
-            this.$Message.success(res.msg);
-            this.goodHeade();
-            this.getDataList();
-			this.allReset();
-          })
-          .catch((res) => {
-            this.$Message.error(res.msg);
-            this.goodHeade();
-            this.getDataList();
-          });
-    },
-    // 数据导出;
-    exportData: function () {
-      let th = [
-        "商品名称",
-        "商品简介",
-        "商品分类",
-        "价格",
-        "库存",
-        "销量",
-        "收藏人数",
-      ];
-      let filterVal = [
-        "store_name",
-        "store_info",
-        "cate_name",
-        "price",
-        "stock",
-        "sales",
-        "collect",
-      ];
-      this.where.page = "nopage";
-      getGoods(this.where).then((res) => {
-        let data = res.data.map((v) => filterVal.map((k) => v[k]));
-        let fileTime = Date.parse(new Date());
-        let [fileName, fileType, sheetName] = [
-          "商户数据_" + fileTime,
-          "xlsx",
-          "商户数据",
-        ];
-        toExcel({ th, data, fileName, fileType, sheetName });
-      });
-    },
-    // 属性弹出;
-    attrTap() {
-      this.attrTemplate = true;
-    },
-    changeTemplate(msg) {
-      this.attrTemplate = msg;
-    },
-    // 编辑
-    edit(row) {
-      this.$router.push({ path: this.roterPre + "/product/add_product/" + row.id });
-    },
-    // 确认
-    del(row, tit, num, name) {
-      let delfromData = {
-        title: tit,
-        num: num,
-        url: `product/product/${row.id}`,
-        method: "DELETE",
-        ids: "",
-        tips: `确定要移${ name == 2 ? '出' : '入' }回收站吗?`,
-      };
-      this.$modalSure(delfromData)
-          .then((res) => {
-            this.$Message.success(res.msg);
-            this.tableList.splice(num, 1);
-            this.goodHeade();
-			this.allReset();
-          })
-          .catch((res) => {
-            this.$Message.error(res.msg);
-          });
-    },
-    // 删除成功
-    // submitModel () {
-    //     this.tableList.splice(this.delfromData.num, 1);
-    //     this.goodHeade();
-    // }
-    staffList() {
-      staffListInfo()
-          .then((res) => {
-            this.staffData = res.data;
-          })
-          .catch((err) => {
-            this.$Message.error(err.msg);
-          });
-    },
-    // 商品详情
-    details(id) {
-      this.productId = id;
-      this.detailsVisible = true;
-    },
-    openBatch() {
-      this.isLabel = 0;
-      this.batchModal = true;
-    },
-    menuSelect(name) {
-      this.menuActive = name;
-    },
-    activeStoreData(storeDataLabel){
-      this.storeLabelShow = false;
-      if(this.isLabel){
-        this.goodsDataLabel = storeDataLabel;
-        // 商品标签id
-        let storeActiveIds = [];
-        storeDataLabel.forEach((item)=>{
-          storeActiveIds.push(item.id)
-        });
-        this.artFrom.store_label_id = storeActiveIds;
-        this.userSearchs();
-      }else{
-        this.storeDataLabel = storeDataLabel;
-      }
-    },
-    // 标签弹窗关闭
-    storeLabelClose() {
-      this.storeLabelShow = false;
-    },
-    openStoreLabel(row) {
-      this.storeLabelShow = true;
-      this.$refs.storeLabel.storeLabel(JSON.parse(JSON.stringify(this.storeDataLabel)));
-    },
-    openGoodsLabel(row){
-      this.storeLabelShow = true;
-      this.$refs.storeLabel.storeLabel(JSON.parse(JSON.stringify(this.goodsDataLabel)));
-      this.isLabel = 1;
-    },
-    tagClose(id) {
-      if (this.menuActive == 2) {
-        let index = this.storeDataLabel.findIndex(item => item.id === id);
-        this.storeDataLabel.splice(index, 1);
-      } else {
-        let index = this.dataLabel.findIndex(item => item.id === id);
-        this.dataLabel.splice(index, 1);
-      }
-    },
-    activeData(dataLabel){
-      this.labelShow = false;
-      this.dataLabel = dataLabel;
-    },
-    // 标签弹窗关闭
-    labelClose() {
-      this.labelShow = false;
-    },
-    openLabel() {
-      this.labelShow = true;
-      this.$refs.userLabel.userLabel(JSON.parse(JSON.stringify(this.dataLabel)));
-    },
-    // 添加优惠券
-    addCoupon() {
-      this.$refs.couponTemplates.isTemplate = true;
-      this.$refs.couponTemplates.tableList();
-    },
-    nameId(id, names) {
-      this.coupon_ids = id;
-      this.couponName = this.unique(names);
-    },
-    handleClose(name) {
-      let index = this.couponName.indexOf(name);
-      this.couponName.splice(index, 1);
-      let couponIds = this.coupon_ids;
-      couponIds.splice(index, 1);
-      this.updateIds = couponIds;
-      this.updateName = this.couponName;
-    },
-    //对象数组去重;
-    unique(arr) {
-      const res = new Map();
-      return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1));
-    },
-    // 添加表单
-    addForm() {
-      this.batchData.custom_form.push({
-        key: Date.now(),
-        title: '',
-        label: '',
-        status: 0
-      });
-    },
-    // 删除表单
-    delForm(item) {
-      let index = this.batchData.custom_form.findIndex(val => val === item);
-      if (index !== -1) {
-        this.batchData.custom_form.splice(index, 1);
-      }
-    },
-    cancelBatch() {
-      this.batchModal = false;
-    },
-    saveBatch() {
-      if(this.customBtn && this.batchData.system_form_id == 0){
-        return this.$Message.warning('请选择自定义表单模板');
-      }
-      let data = {
-        type: this.menuActive,
-        ids: this.checkUidList,
-        all: this.isAll,
-        where: this.artFrom,
-        data: this.batchData,
-      };
-      batchProcess(data).then(res => {
-        this.$Message.success(res.msg);
-        this.batchModal = false;
-      }).catch(res => {
-        this.$Message.error(res.msg);
-      });
-    },
-    // 获取运费模板;
-    productGetTemplate() {
-      productGetTemplateApi().then((res) => {
-        this.templateList = res.data;
-      });
-    },
-    customMessBtn(e) {
-      if (!e) {
-        this.batchData.system_form_id = 0;
-      }
-    },
-    batchVisibleChange() {
-      this.batchData = {
-        cate_id: [],
-        store_label_id: [],
-        delivery_type: [],
-        freight: 1,
-        postage: 0,
-        temp_id: 0,
-        give_integral: 0,
-        coupon_ids: [],
-        label_id: [],
-        recommend: [],
-        custom_form: [],
-        system_form_id: 0
-      };
-      this.storeDataLabel = [];
-      this.couponName = [];
-      this.dataLabel = [];
-      this.menuActive = 1;
-    }
-  },
-};
+			},
+			// 数据导出;
+			async exports() {
+				let [th, filekey, data, fileName] = [
+					[],
+					[],
+					[], ""
+				];
+				let formValidate = this.artFrom;
+				let excelData = {};
+				excelData.ids = this.checkUidList.join();
+				if (this.isAll == 1) {
+					excelData.cate_id = formValidate.cate_id;
+					excelData.type = formValidate.type;
+					excelData.store_name = formValidate.store_name;
+				}
+				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 {
+						exportExcel(th, filekey, fileName, data);
+						return;
+					}
+				}
+			},
+			getExcelData(excelData) {
+				return new Promise((resolve, reject) => {
+					storeProductApi(excelData).then((res) => {
+						return resolve(res.data);
+					});
+				});
+			},
+			changeTemplate(e) {
+				// this.template = e;
+			},
+			freight() {
+				this.$refs.template.isTemplate = true;
+			},
+			// 批量上架
+			onShelves() {
+				if (this.isAll != 1 && this.checkUidList.length === 0) {
+					this.$Message.warning("请选择要上架的商品");
+				} else {
+					let data = {
+						all: this.isAll,
+						ids: this.checkUidList
+					};
+					if (this.isAll == 1) {
+						data.where = {
+							cate_id: this.artFrom.cate_id,
+							excel: this.artFrom.excel,
+							store_name: this.artFrom.store_name,
+							type: this.artFrom.type,
+						};
+					}
+					productShowApi(data)
+						.then((res) => {
+							this.$Message.success(res.msg);
+							this.goodHeade();
+							this.getDataList();
+							this.allReset();
+						})
+						.catch((res) => {
+							this.$Message.error(res.msg);
+						});
+				}
+			},
+			// 批量下架
+			onDismount() {
+				if (this.isAll != 1 && this.checkUidList.length === 0) {
+					this.$Message.warning("请选择要下架的商品");
+				} else {
+					let data = {
+						all: this.isAll,
+						ids: this.checkUidList
+					};
+					if (this.isAll == 1) {
+						data.where = {
+							cate_id: this.artFrom.cate_id,
+							excel: this.artFrom.excel,
+							store_name: this.artFrom.store_name,
+							type: this.artFrom.type,
+						};
+					}
+					productUnshowApi(data)
+						.then((res) => {
+							this.$Message.success(res.msg);
+							this.goodHeade();
+							this.getDataList();
+							this.allReset();
+						})
+						.catch((res) => {
+							this.$Message.error(res.msg);
+						});
+				}
+			},
+			// 添加淘宝商品成功
+			onClose() {
+				this.modals = false;
+			},
+			// 复制淘宝
+			onCopy() {
+				this.$router.push({
+					path: this.roterPre + "/product/add_product",
+					query: {
+						type: -1
+					},
+				});
+				// this.modals = true;
+			},
+			// tab选择
+			onClickTab(name) {
+				this.allReset();
+				this.artFrom.type = name;
+				// this.columns2 = [...this.columns];
+				// if (name !== "1" && name !== "2") {
+				//   this.columns2.shift();
+				// }
+				// let obj = [...this.columns];
+				// obj.shift();
+				// obj.splice(8, 1);
+				// this.columns3 = obj;
+				// this.checkBox = false;
+				this.artFrom.page = 1;
+				this.getDataList();
+				this.goodHeade();
+			},
+			// 下拉树
+			handleCheckChange(data) {
+				let value = "";
+				let title = "";
+				this.list = [];
+				this.artFrom.cate_id = 0;
+				data.forEach((item, index) => {
+					value += `${item.id},`;
+					title += `${item.title},`;
+				});
+				value = value.substring(0, value.length - 1);
+				title = title.substring(0, title.length - 1);
+				this.list.push({
+					value,
+					title,
+				});
+				this.artFrom.cate_id = value;
+				this.getDataList();
+			},
+			// 获取商品表单头数量
+			goodHeade() {
+				// let data = {
+				//   store_name: this.artFrom.store_name,
+				//   cate_id: this.artFrom.cate_id || "",
+				//   supplier_id: this.artFrom.supplier_id || "",
+				//   store_id: this.artFrom.store_id || "",
+				//   brand_id: this.artFrom.brand_id || [],
+				//   store_label_id: this.artFrom.store_label_id || []
+				// };
+				getGoodHeade(this.artFrom)
+					.then((res) => {
+						this.headeNum = res.data.list;
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+			// 商品分类;
+			goodsCategory() {
+				// treeListApi(1).then(res => {
+				//     this.treeSelect = res.data;
+				// }).catch(res => {
+				//     this.$Message.error(res.msg);
+				// })
+				cascaderListApi(1)
+					.then((res) => {
+						this.data1 = res.data;
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+			// 商品列表;
+			getDataList() {
+				this.loading = true;
+				this.artFrom.cate_id = this.artFrom.cate_id || "";
+				getGoods(this.artFrom)
+					.then((res) => {
+						let data = res.data;
+						this.tableList = data.list;
+						this.total = data.count;
+						this.loading = false;
+						this.$nextTick(function() {
+							if (this.isAll == 1) {
+								if (this.isCheckBox) {
+									this.$refs.xTable.setAllCheckboxRow(true);
+								} else {
+									this.$refs.xTable.setAllCheckboxRow(false);
+								}
+							} else {
+								let obj = this.$refs.xTable.getCheckboxReserveRecords(true);
+								if (!this.checkUidList.length || this.checkUidList.length <= obj.length) {
+									this.$refs.xTable.setAllCheckboxRow(false);
+								}
+							}
+						})
+					})
+					.catch((res) => {
+						this.loading = false;
+						this.$Message.error(res.msg);
+					});
+			},
+			pageChange(currentPage) {
+				this.artFrom.page = currentPage.currentPage;
+				this.getDataList();
+				// this.$refs.table.clearCurrentRow();
+			},
+			// cascaderSearchs(value, selectedData) {
+			//   this.artFrom.cate_id = value[value.length - 1];
+			//   this.userSearchs();
+			// },
+			// 表格搜索
+			userSearchs(e) {
+				this.allReset();
+				this.artFrom.page = 1;
+				this.formSelection = [];
+				this.goodHeade();
+				this.getDataList();
+			},
+			// 上下架
+			changeSwitch(row) {
+				PostgoodsIsShow(row.id, row.is_show)
+					.then((res) => {
+						this.$Message.success(res.msg);
+						this.goodHeade();
+						this.getDataList();
+						this.allReset();
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+						this.goodHeade();
+						this.getDataList();
+					});
+			},
+			// 数据导出;
+			exportData: function() {
+				let th = [
+					"商品名称",
+					"商品简介",
+					"商品分类",
+					"价格",
+					"库存",
+					"销量",
+					"收藏人数",
+				];
+				let filterVal = [
+					"store_name",
+					"store_info",
+					"cate_name",
+					"price",
+					"stock",
+					"sales",
+					"collect",
+				];
+				this.where.page = "nopage";
+				getGoods(this.where).then((res) => {
+					let data = res.data.map((v) => filterVal.map((k) => v[k]));
+					let fileTime = Date.parse(new Date());
+					let [fileName, fileType, sheetName] = [
+						"商户数据_" + fileTime,
+						"xlsx",
+						"商户数据",
+					];
+					toExcel({
+						th,
+						data,
+						fileName,
+						fileType,
+						sheetName
+					});
+				});
+			},
+			// 属性弹出;
+			attrTap() {
+				this.attrTemplate = true;
+			},
+			changeTemplate(msg) {
+				this.attrTemplate = msg;
+			},
+			// 编辑
+			edit(row) {
+				this.$router.push({
+					path: this.roterPre + "/product/add_product/" + row.id
+				});
+			},
+			// 确认
+			del(row, tit, num, name) {
+				let delfromData = {
+					title: tit,
+					num: num,
+					url: `product/product/${row.id}`,
+					method: "DELETE",
+					ids: "",
+					tips: `确定要移${ name == 2 ? '出' : '入' }回收站吗?`,
+				};
+				this.$modalSure(delfromData)
+					.then((res) => {
+						this.$Message.success(res.msg);
+						this.tableList.splice(num, 1);
+						this.goodHeade();
+						this.allReset();
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+			// 删除成功
+			// submitModel () {
+			//     this.tableList.splice(this.delfromData.num, 1);
+			//     this.goodHeade();
+			// }
+			staffList() {
+				staffListInfo()
+					.then((res) => {
+						this.staffData = res.data;
+					})
+					.catch((err) => {
+						this.$Message.error(err.msg);
+					});
+			},
+			// 商品详情
+			details(id) {
+				this.productId = id;
+				this.detailsVisible = true;
+			},
+			openBatch() {
+				this.isLabel = 0;
+				this.batchModal = true;
+			},
+			menuSelect(name) {
+				this.menuActive = name;
+			},
+			activeStoreData(storeDataLabel) {
+				this.storeLabelShow = false;
+				if (this.isLabel) {
+					this.goodsDataLabel = storeDataLabel;
+					// 商品标签id
+					let storeActiveIds = [];
+					storeDataLabel.forEach((item) => {
+						storeActiveIds.push(item.id)
+					});
+					this.artFrom.store_label_id = storeActiveIds;
+					this.userSearchs();
+				} else {
+					this.storeDataLabel = storeDataLabel;
+				}
+			},
+			// 标签弹窗关闭
+			storeLabelClose() {
+				this.storeLabelShow = false;
+			},
+			openStoreLabel(row) {
+				this.storeLabelShow = true;
+				this.$refs.storeLabel.storeLabel(JSON.parse(JSON.stringify(this.storeDataLabel)));
+			},
+			openGoodsLabel(row) {
+				this.storeLabelShow = true;
+				this.$refs.storeLabel.storeLabel(JSON.parse(JSON.stringify(this.goodsDataLabel)));
+				this.isLabel = 1;
+			},
+			tagClose(id) {
+				if (this.menuActive == 2) {
+					let index = this.storeDataLabel.findIndex(item => item.id === id);
+					this.storeDataLabel.splice(index, 1);
+				} else {
+					let index = this.dataLabel.findIndex(item => item.id === id);
+					this.dataLabel.splice(index, 1);
+				}
+			},
+			activeData(dataLabel) {
+				this.labelShow = false;
+				this.dataLabel = dataLabel;
+			},
+			// 标签弹窗关闭
+			labelClose() {
+				this.labelShow = false;
+			},
+			openLabel() {
+				this.labelShow = true;
+				this.$refs.userLabel.userLabel(JSON.parse(JSON.stringify(this.dataLabel)));
+			},
+			// 添加优惠券
+			addCoupon() {
+				this.$refs.couponTemplates.isTemplate = true;
+				this.$refs.couponTemplates.tableList();
+			},
+			nameId(id, names) {
+				this.coupon_ids = id;
+				this.couponName = this.unique(names);
+			},
+			handleClose(name) {
+				let index = this.couponName.indexOf(name);
+				this.couponName.splice(index, 1);
+				let couponIds = this.coupon_ids;
+				couponIds.splice(index, 1);
+				this.updateIds = couponIds;
+				this.updateName = this.couponName;
+			},
+			//对象数组去重;
+			unique(arr) {
+				const res = new Map();
+				return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1));
+			},
+			// 添加表单
+			addForm() {
+				this.batchData.custom_form.push({
+					key: Date.now(),
+					title: '',
+					label: '',
+					status: 0
+				});
+			},
+			// 删除表单
+			delForm(item) {
+				let index = this.batchData.custom_form.findIndex(val => val === item);
+				if (index !== -1) {
+					this.batchData.custom_form.splice(index, 1);
+				}
+			},
+			cancelBatch() {
+				this.batchModal = false;
+			},
+			saveBatch() {
+				if (this.customBtn && this.batchData.system_form_id == 0) {
+					return this.$Message.warning('请选择自定义表单模板');
+				}
+				let data = {
+					type: this.menuActive,
+					ids: this.checkUidList,
+					all: this.isAll,
+					where: this.artFrom,
+					data: this.batchData,
+				};
+				batchProcess(data).then(res => {
+					this.$Message.success(res.msg);
+					this.batchModal = false;
+				}).catch(res => {
+					this.$Message.error(res.msg);
+				});
+			},
+			// 获取运费模板;
+			productGetTemplate() {
+				productGetTemplateApi().then((res) => {
+					this.templateList = res.data;
+				});
+			},
+			customMessBtn(e) {
+				if (!e) {
+					this.batchData.system_form_id = 0;
+				}
+			},
+			batchVisibleChange() {
+				this.batchData = {
+					cate_id: [],
+					store_label_id: [],
+					delivery_type: [],
+					freight: 1,
+					postage: 0,
+					temp_id: 0,
+					give_integral: 0,
+					coupon_ids: [],
+					label_id: [],
+					recommend: [],
+					custom_form: [],
+					system_form_id: 0
+				};
+				this.storeDataLabel = [];
+				this.couponName = [];
+				this.dataLabel = [];
+				this.menuActive = 1;
+			}
+		},
+	};
 </script>
 <style scoped lang="stylus">
-.customTab{
-  margin-top 20px;
-  /deep/.ivu-table-header thead tr th{
-    padding 0 10px !important
-    .ivu-table-cell{
-      padding 5px 0 !important
-    }
-  }
-  /deep/.ivu-table td{
-    height 30px !important;
-    padding 0 10px !important;
-    .ivu-table-cell{
-      padding 2px 0 !important;
-    }
-  }
-}
-/deep/.el-cascader .el-cascader__search-input{
-  font-size: 12px !important;
-}
-/deep/.ivu-dropdown-item{
-  font-size: 12px!important;
-}
-/deep/.vxe-table--render-default .vxe-cell{
-  font-size: 12px;
-}
-.tdinfo{
-  margin-left: 75px;
-  margin-top: 16px;
-}
-.expand-row{
-  margin-bottom: 16px;
-  font-size: 12px;
-}
-/deep/.ivu-checkbox-wrapper{
-  font-size: 12px;
-}
-.labelClass{
-  /deep/.ivu-form-item-content{
-    line-height: unset;
-  }
-}
-.labelInput{
-  border: 1px solid #dcdee2;
-  width :250px;
-  padding: 0 5px;
-  border-radius: 5px;
-  min-height: 30px;
-  cursor: pointer;
-  .span{
-    color: #c5c8ce;
-  }
-  .iconxiayi{
-    font-size: 12px
-  }
-}
-
-.input-add {
-  width: 250px;
-  margin-right: 14px;
-}
-
-.style-add {
-  margin-top: 10px;
-  line-height: 1.2;
-}
-
-.line2 {
-  max-height: 40px;
-}
-
-.bg {
-  z-index: 100;
-  position: fixed;
-  left: 0;
-  top: 0;
-  width: 100%;
-  height: 100%;
-  background: rgba(0, 0, 0, 0.5);
-}
-
-.deliveryStyle /deep/.ivu-checkbox-wrapper {
-  margin-right: 14px;
-}
-
-.Button /deep/.ivu-upload {
-  width: 105px;
-  display: inline-block;
-  margin-right: 10px;
-}
-
-/deep/.ivu-modal-mask {
-  z-index: 999 !important;
-}
-
-/deep/.ivu-modal-wrap {
-  z-index: 999 !important;
-}
-
-/deep/.ivu-alert {
-  margin-bottom: 20px;
-}
-
-.Box {
-  >>> .ivu-modal-body {
-    height: 700px;
-    overflow: auto;
-  }
-}
-
-.tabBox_img {
-  width: 40px;
-  height: 40px;
-  border-radius: 4px;
-  cursor: pointer;
-
-  img {
-    width: 100%;
-    height: 100%;
-  }
-}
-
-/deep/.ivu-table-cell-expand-expanded {
-  margin-top: -6px;
-  margin-right: 33px;
-  transition: none;
-
-  .ivu-icon {
-    vertical-align: 2px;
-  }
-}
-
-/deep/.ivu-table-header {
-  // overflow visible
-}
-
-/deep/.ivu-table th {
-  overflow: visible;
-}
-
-/deep/.select-item:hover {
-  background-color: #f3f3f3;
-}
-
-/deep/.select-on {
-  display: block;
-}
-
-/deep/.select-item.on {
-  /* background: #f3f3f3; */
-}
-
-.new_tab {
-  >>>.ivu-tabs-nav .ivu-tabs-tab {
-    padding: 4px 16px 20px !important;
-    font-weight: 500;
-  }
-}
-.select-tag {
-  position: relative;
-  min-height: 32px;
-  padding: 0 24px 0 4px;
-  border: 1px solid #dcdee2;
-  border-radius: 4px;
-  line-height: normal;
-  user-select: none;
-  cursor: pointer;
-
-  &:hover {
-    border-color: #57a3f3;
-  }
-
-  .ivu-icon {
-    position: absolute;
-    top: 50%;
-    right: 8px;
-    line-height: 1;
-    transform: translateY(-50%);
-    font-size: 14px;
-    color: #808695;
-    transition: all .2s ease-in-out;
-  }
-
-  .ivu-tag {
-    position: relative;
-    max-width: 99%;
-    height: 24px;
-    margin: 3px 4px 3px 0;
-    line-height: 22px;
-  }
-
-  .placeholder {
-    display: block;
-    height: 30px;
-    line-height: 30px;
-    color: #c5c8ce;
-    font-size: 14px;
-    overflow: hidden;
-    text-overflow: ellipsis;
-    white-space: nowrap;
-    padding-left: 4px;
-    padding-right: 22px;
-  }
-}
-.input-number {
-  position: relative;
-  display: inline-block;
-  vertical-align: middle;
-
-  >>> .ivu-input-number-handler-wrap {
-    right: 32px;
-  }
-
-  .ivu-input-number {
-    width: 144px;
-    margin-right: 32px;
-  }
-
-  .suffix {
-    position: absolute;
-    top: 0;
-    right: 0;
-    z-index: 1;
-    width: 32px;
-    height: 100%;
-    text-align: center;
-  }
-}
-.ivu-checkbox-wrapper, .ivu-radio-wrapper {
-  margin-right: 30px;
-}
-
->>> .batch-modal {
-  .ivu-modal-body {
-    padding: 0;
-  }
-
-  .ivu-alert {
-    margin: 12px 24px;
-  }
-
-  .ivu-col-span-5 {
-    flex: none;
-    width: 130px;
-  }
-
-  .ivu-col-span-19 {
-    padding-right: 37px;
-  }
-
-  .ivu-input-number {
-    width: 100%;
-  }
-
-  .ivu-menu-light.ivu-menu-vertical .ivu-menu-item-active:not(.ivu-menu-submenu) {
-    z-index: auto;
-  }
-
-  .ivu-menu-light.ivu-menu-vertical .ivu-menu-item-active:not(.ivu-menu-submenu):after {
-    right: auto;
-    left: 0;
-  }
-
-  .el-cascader {
-    width: 100%;
-  }
-
-  .ivu-btn-text {
-    color: #2D8CF0;
-  }
-
-  .ivu-btn-text:focus {
-    box-shadow: none;
-  }
-
-  .ivu-menu-item {
-    padding-right: 0;
-  }
-}
-
->>>.el-cascader {
-  &.el-cascader--small {
-    vertical-align: bottom;
-    line-height: 30px;
-  }
-
-  &.single {
-    .el-input__inner {
-      height: 32px !important;
-    }
-  }
-
-  .el-input__inner {
-    padding-left: 7px;
-    font-size: 14px;
-  }
-
-  .el-cascader__search-input {
-    margin-left: 9px;
-    font-size: 14px;
-  }
-
-  .el-input__suffix {
-    right: 4px;
-  }
-
-  .el-input__icon {
-    color: #808695;
-	font-weight:bold;
-	font-size: 12px;
-    // display: inline-block;
-    // font-family: "Ionicons" !important;
-    // speak: none;
-    // font-style: normal;
-    // font-weight: normal;
-    // font-variant: normal;
-    // text-transform: none;
-    // text-rendering: optimizeLegibility;
-    // line-height: 1;
-    // -webkit-font-smoothing: antialiased;
-    // -moz-osx-font-smoothing: grayscale;
-    // vertical-align: -0.125em;
-    // text-align: center;
-    // line-height: 32px;
-  }
-
-  // .el-icon-arrow-down:before {
-  //   content: "\F116";
-  // }
-}
+	.customTab {
+		margin-top: 20px;
+
+		/deep/.ivu-table-header thead tr th {
+			padding: 0 10px !important;
+
+			.ivu-table-cell {
+				padding: 5px 0 !important;
+			}
+		}
+
+		/deep/.ivu-table td {
+			height: 30px !important;
+			padding: 0 10px !important;
+
+			.ivu-table-cell {
+				padding: 2px 0 !important;
+			}
+		}
+	}
+
+	/deep/.el-cascader .el-cascader__search-input {
+		font-size: 12px !important;
+	}
+
+	/deep/.ivu-dropdown-item {
+		font-size: 12px !important;
+	}
+
+	/deep/.vxe-table--render-default .vxe-cell {
+		font-size: 12px;
+	}
+
+	.tdinfo {
+		margin-left: 75px;
+		margin-top: 16px;
+	}
+
+	.expand-row {
+		margin-bottom: 16px;
+		font-size: 12px;
+	}
+
+	/deep/.ivu-checkbox-wrapper {
+		font-size: 12px;
+	}
+
+	.labelClass {
+		/deep/.ivu-form-item-content {
+			line-height: unset;
+		}
+	}
+
+	.labelInput {
+		border: 1px solid #dcdee2;
+		width: 250px;
+		padding: 0 5px;
+		border-radius: 5px;
+		min-height: 30px;
+		cursor: pointer;
+
+		.span {
+			color: #c5c8ce;
+		}
+
+		.iconxiayi {
+			font-size: 12px
+		}
+	}
+
+	.input-add {
+		width: 250px;
+		margin-right: 14px;
+	}
+
+	.style-add {
+		margin-top: 10px;
+		line-height: 1.2;
+	}
+
+	.line2 {
+		max-height: 40px;
+	}
+
+	.bg {
+		z-index: 100;
+		position: fixed;
+		left: 0;
+		top: 0;
+		width: 100%;
+		height: 100%;
+		background: rgba(0, 0, 0, 0.5);
+	}
+
+	.deliveryStyle /deep/.ivu-checkbox-wrapper {
+		margin-right: 14px;
+	}
+
+	.Button /deep/.ivu-upload {
+		width: 105px;
+		display: inline-block;
+		margin-right: 10px;
+	}
+
+	/deep/.ivu-modal-mask {
+		z-index: 999 !important;
+	}
+
+	/deep/.ivu-modal-wrap {
+		z-index: 999 !important;
+	}
+
+	/deep/.ivu-alert {
+		margin-bottom: 20px;
+	}
+
+	.Box {
+		>>>.ivu-modal-body {
+			height: 700px;
+			overflow: auto;
+		}
+	}
+
+	.tabBox_img {
+		width: 40px;
+		height: 40px;
+		border-radius: 4px;
+		cursor: pointer;
+
+		img {
+			width: 100%;
+			height: 100%;
+		}
+	}
+
+	/deep/.ivu-table-cell-expand-expanded {
+		margin-top: -6px;
+		margin-right: 33px;
+		transition: none;
+
+		.ivu-icon {
+			vertical-align: 2px;
+		}
+	}
+
+	/deep/.ivu-table-header {
+		// overflow visible
+	}
+
+	/deep/.ivu-table th {
+		overflow: visible;
+	}
+
+	/deep/.select-item:hover {
+		background-color: #f3f3f3;
+	}
+
+	/deep/.select-on {
+		display: block;
+	}
+
+	/deep/.select-item.on {
+		/* background: #f3f3f3; */
+	}
+
+	.new_tab {
+		>>>.ivu-tabs-nav .ivu-tabs-tab {
+			padding: 4px 16px 20px !important;
+			font-weight: 500;
+		}
+	}
+
+	.select-tag {
+		position: relative;
+		min-height: 32px;
+		padding: 0 24px 0 4px;
+		border: 1px solid #dcdee2;
+		border-radius: 4px;
+		line-height: normal;
+		user-select: none;
+		cursor: pointer;
+
+		&:hover {
+			border-color: #57a3f3;
+		}
+
+		.ivu-icon {
+			position: absolute;
+			top: 50%;
+			right: 8px;
+			line-height: 1;
+			transform: translateY(-50%);
+			font-size: 14px;
+			color: #808695;
+			transition: all .2s ease-in-out;
+		}
+
+		.ivu-tag {
+			position: relative;
+			max-width: 99%;
+			height: 24px;
+			margin: 3px 4px 3px 0;
+			line-height: 22px;
+		}
+
+		.placeholder {
+			display: block;
+			height: 30px;
+			line-height: 30px;
+			color: #c5c8ce;
+			font-size: 14px;
+			overflow: hidden;
+			text-overflow: ellipsis;
+			white-space: nowrap;
+			padding-left: 4px;
+			padding-right: 22px;
+		}
+	}
+
+	.input-number {
+		position: relative;
+		display: inline-block;
+		vertical-align: middle;
+
+		>>>.ivu-input-number-handler-wrap {
+			right: 32px;
+		}
+
+		.ivu-input-number {
+			width: 144px;
+			margin-right: 32px;
+		}
+
+		.suffix {
+			position: absolute;
+			top: 0;
+			right: 0;
+			z-index: 1;
+			width: 32px;
+			height: 100%;
+			text-align: center;
+		}
+	}
+
+	.ivu-checkbox-wrapper,
+	.ivu-radio-wrapper {
+		margin-right: 30px;
+	}
+
+	>>>.batch-modal {
+		.ivu-modal-body {
+			padding: 0;
+		}
+
+		.ivu-alert {
+			margin: 12px 24px;
+		}
+
+		.ivu-col-span-5 {
+			flex: none;
+			width: 130px;
+		}
+
+		.ivu-col-span-19 {
+			padding-right: 37px;
+		}
+
+		.ivu-input-number {
+			width: 100%;
+		}
+
+		.ivu-menu-light.ivu-menu-vertical .ivu-menu-item-active:not(.ivu-menu-submenu) {
+			z-index: auto;
+		}
+
+		.ivu-menu-light.ivu-menu-vertical .ivu-menu-item-active:not(.ivu-menu-submenu):after {
+			right: auto;
+			left: 0;
+		}
+
+		.el-cascader {
+			width: 100%;
+		}
+
+		.ivu-btn-text {
+			color: #2D8CF0;
+		}
+
+		.ivu-btn-text:focus {
+			box-shadow: none;
+		}
+
+		.ivu-menu-item {
+			padding-right: 0;
+		}
+	}
+
+	>>>.el-cascader {
+		&.el-cascader--small {
+			vertical-align: bottom;
+			line-height: 30px;
+		}
+
+		&.single {
+			.el-input__inner {
+				height: 32px !important;
+			}
+		}
+
+		.el-input__inner {
+			padding-left: 7px;
+			font-size: 14px;
+		}
+
+		.el-cascader__search-input {
+			margin-left: 9px;
+			font-size: 14px;
+		}
+
+		.el-input__suffix {
+			right: 4px;
+		}
+
+		.el-input__icon {
+			color: #808695;
+			font-weight: bold;
+			font-size: 12px;
+			// display: inline-block;
+			// font-family: "Ionicons" !important;
+			// speak: none;
+			// font-style: normal;
+			// font-weight: normal;
+			// font-variant: normal;
+			// text-transform: none;
+			// text-rendering: optimizeLegibility;
+			// line-height: 1;
+			// -webkit-font-smoothing: antialiased;
+			// -moz-osx-font-smoothing: grayscale;
+			// vertical-align: -0.125em;
+			// text-align: center;
+			// line-height: 32px;
+		}
+
+		// .el-icon-arrow-down:before {
+		//   content: "\F116";
+		// }
+	}
 </style>

+ 518 - 404
src/pages/store/components/addStore.vue

@@ -1,232 +1,282 @@
 <template>
-    <div>
-        <Modal v-model="isTemplate" scrollable  footer-hide closable :title="title"  :z-index="1" width="700" @on-cancel="cancel">
-            <div class="article-manager">
-                <Card :bordered="false" dis-hover>
-                    <Form ref="formItem" :model="formItem" :label-width="labelWidth" :label-position="labelPosition" :rules="ruleValidate" @submit.native.prevent>
-                        <Row type="flex" :gutter="24">
+	<div>
+		<Modal v-model="isTemplate" scrollable footer-hide closable :title="title" :z-index="1" width="700"
+			@on-cancel="cancel">
+			<div class="article-manager">
+				<Card :bordered="false" dis-hover>
+					<Form ref="formItem" :model="formItem" :label-width="labelWidth" :label-position="labelPosition"
+						:rules="ruleValidate" @submit.native.prevent>
+						<Row type="flex" :gutter="24">
 							<Col span="24" v-if="openErp">
-								<Col v-bind="grid">
-									<FormItem label="erp门店:" prop="erp_shop_id">
-										<Button @click="tapErp">{{formItem.erp_shop_id?formItem.erp_shop_id:"请选择erp门店"}}</Button>
-									</FormItem>
-								</Col>
+							<Col v-bind="grid">
+							<FormItem label="erp门店:" prop="erp_shop_id">
+								<Button
+									@click="tapErp">{{formItem.erp_shop_id?formItem.erp_shop_id:"请选择erp门店"}}</Button>
+							</FormItem>
+							</Col>
+							</Col>
+							<Col span="24">
+							<Col v-bind="grid">
+							<FormItem label="门店照片:" prop="image">
+								<div class="picBox" @click="modalPicTap('单选')">
+									<div class="pictrue" v-if="formItem.image"><img v-lazy="formItem.image"></div>
+									<div class="upLoad" v-else>
+										<div class="iconfont">+</div>
+									</div>
+								</div>
+							</FormItem>
+							</Col>
+							</Col>
+							<Col span="24">
+							<Col v-bind="grid">
+							<FormItem label="门店分类:" prop="cate_id" label-for="cate_id">
+								<Cascader :data="treeSelect" placeholder="请选择门店分类" change-on-select
+									v-model="formItem.cate_id" filterable></Cascader>
+							</FormItem>
+							</Col>
 							</Col>
 							<Col span="24">
-							    <Col v-bind="grid">
-							        <FormItem label="门店照片:" prop="image">
-							            <div class="picBox" @click="modalPicTap('单选')">
-							                <div class="pictrue" v-if="formItem.image"><img v-lazy="formItem.image"></div>
-							                <div class="upLoad" v-else>
-												<div class="iconfont">+</div>
-							                </div>
-							            </div>
-							        </FormItem>
-							    </Col>
-							</Col>
-              <Col span="24">
-                 <Col v-bind="grid" >
-                    <FormItem label="门店分类:" prop="cate_id" label-for="cate_id">
-                      <Cascader
-                          :data="treeSelect"
-                          placeholder="请选择门店分类"
-                          change-on-select
-                          v-model="formItem.cate_id"
-                          filterable
-                      ></Cascader>
-                    </FormItem>
-                 </Col>
-              </Col>
+							<Col v-bind="grid">
+							<FormItem label="门店货架:" prop="agent_level" label-for="agent_level">
+								<Select
+								        v-model="formItem.agent_level"
+								        placeholder="请选择"
+								        clearable
+								        class="input-add"
+								>
+								    <Option v-for="item in tabList" :value="item.id">{{item.name}}</Option>
+								</Select>
+							</FormItem>
+							</Col>
+							</Col>
+							<Col span="24" v-if="formItem.id == 0">
+							<Col v-bind="grid">
+							<FormItem label="管理员账号:" prop="store_account" label-for="store_account">
+								<Input v-model="formItem.store_account" placeholder="请输入管理员账号" />
+							</FormItem>
+							</Col>
+							</Col>
 							<Col span="24" v-if="formItem.id == 0">
-							    <Col v-bind="grid" >
-							        <FormItem label="管理员账号:" prop="store_account" label-for="store_account">
-							            <Input v-model="formItem.store_account"  placeholder="请输入管理员账号"/>
-							        </FormItem>
-							    </Col>
-							</Col>
-							<Col span="24"  v-if="formItem.id == 0">
-							    <Col v-bind="grid">
-							        <FormItem label="管理员密码:" prop="store_password" label-for="store_password">
-							            <Input type="password" v-model="formItem.store_password"  placeholder="请输入管理员密码"/>
-							        </FormItem>
-							    </Col>
-							</Col>
-                            <Col span="24">
-                                <Col v-bind="grid">
-                                    <FormItem label="门店名称:" prop="name" label-for="name">
-                                        <Input v-model="formItem.name"  maxlength="20" show-word-limit  placeholder="请输入门店名称"/>
-                                    </FormItem>
-                                </Col>
-                            </Col>
-                            <Col span="24">
-                            	<Col v-bind="grid">
-                            		<FormItem label="门店简介:" label-for="introduction">
-                            			<Input v-model="formItem.introduction"  maxlength="100" show-word-limit :rows="4" :autosize="{maxRows:4,minRows: 4}" type="textarea"   placeholder="请输入门店简介"s/>
-                            		</FormItem>
-                            	</Col>
-                            </Col>
-                            <Col span="24">
-                                <Col v-bind="grid">
-                                    <FormItem label="门店手机号:" label-for="phone" prop="phone">
-                                        <Input v-model="formItem.phone"  placeholder="请输入门店手机号"/>
-                                    </FormItem>
-                                </Col>
-                            </Col>
+							<Col v-bind="grid">
+							<FormItem label="管理员密码:" prop="store_password" label-for="store_password">
+								<Input type="password" v-model="formItem.store_password" placeholder="请输入管理员密码" />
+							</FormItem>
+							</Col>
+							</Col>
+							<Col span="24">
+							<Col v-bind="grid">
+							<FormItem label="门店名称:" prop="name" label-for="name">
+								<Input v-model="formItem.name" maxlength="20" show-word-limit placeholder="请输入门店名称" />
+							</FormItem>
+							</Col>
+							</Col>
+							<Col span="24">
+							<Col v-bind="grid">
+							<FormItem label="门店简介:" label-for="introduction">
+								<Input v-model="formItem.introduction" maxlength="100" show-word-limit :rows="4"
+									:autosize="{maxRows:4,minRows: 4}" type="textarea" placeholder="请输入门店简介" s />
+							</FormItem>
+							</Col>
+							</Col>
+							<Col span="24">
+							<Col v-bind="grid">
+							<FormItem label="门店手机号:" label-for="phone" prop="phone">
+								<Input v-model="formItem.phone" placeholder="请输入门店手机号" />
+							</FormItem>
+							</Col>
+							</Col>
+							<Col span="24">
+							<Col v-bind="grid">
+							<FormItem label="营业状态:" label-for="is_show" prop="is_show">
+								<Switch size="large" v-model="formItem.is_show" :false-value="0" :true-value="1">
+									<span slot="open" :true-value="1">开启</span>
+									<span slot="close" :false-value="0">关闭</span>
+								</Switch>
+							</FormItem>
+							</Col>
+							</Col>
 							<Col span="24">
-								<Col v-bind="grid">
-									<FormItem label="营业状态:" label-for="is_show" prop="is_show">
-										<Switch size="large" v-model="formItem.is_show" :false-value="0" :true-value="1">
-											<span slot="open" :true-value="1">开启</span>
-											<span slot="close" :false-value="0">关闭</span>
-										</Switch>
-									</FormItem>
-								</Col>
+							<Col v-bind="grid" v-if="formItem.is_show == 1">
+							<FormItem label="营业时间:" label-for="day_time" prop="day_time">
+								<TimePicker type="timerange" @on-change="onchangeTime" v-model="formItem.day_time"
+									format="HH:mm:ss" :value="formItem.day_time" placement="bottom-end"
+									placeholder="请选择营业时间" class="inputW"></TimePicker>
+							</FormItem>
+							</Col>
 							</Col>
 							<Col span="24">
-								<Col v-bind="grid" v-if="formItem.is_show == 1">
-									<FormItem label="营业时间:" label-for="day_time"  prop="day_time">
-										<TimePicker type="timerange" @on-change="onchangeTime" v-model="formItem.day_time"  format="HH:mm:ss" :value="formItem.day_time" placement="bottom-end" placeholder="请选择营业时间" class="inputW" ></TimePicker>
-									</FormItem>
-								</Col>
-							</Col>
-              <Col span="24">
-                <Col v-bind="grid">
-                  <FormItem label="门店类型:">
-                    <RadioGroup v-model="formItem.type">
-                      <Radio :label="1">
-                        <Icon type="social-apple"></Icon>
-                        <span>自营</span>
-                      </Radio>
-                      <Radio :label="2">
-                        <Icon type="social-android"></Icon>
-                        <span>加盟</span>
-                      </Radio>
-                    </RadioGroup>
-                    <div class="tips">自营店不支持自主上传商品,加盟店有自主上传商品的权限</div>
-                  </FormItem>
-                </Col>
-              </Col>
+							<Col v-bind="grid">
+							<FormItem label="门店类型:">
+								<RadioGroup v-model="formItem.type">
+									<Radio :label="1">
+										<Icon type="social-apple"></Icon>
+										<span>自营</span>
+									</Radio>
+									<Radio :label="2">
+										<Icon type="social-android"></Icon>
+										<span>加盟</span>
+									</Radio>
+								</RadioGroup>
+								<div class="tips">自营店不支持自主上传商品,加盟店有自主上传商品的权限</div>
+							</FormItem>
+							</Col>
+							</Col>
+							<Col span="24" v-if="formItem.type==2">
+							<Col v-bind="grid">
+							<FormItem label="商品免审:" label-for="product_verify_status" prop="product_verify_status">
+								<Switch size="large" v-model="formItem.product_verify_status" :false-value="0"
+									:true-value="1">
+									<span slot="open" :true-value="1">开启</span>
+									<span slot="close" :false-value="0">关闭</span>
+								</Switch>
+							</FormItem>
+							</Col>
+							</Col>
 							<Col span="24" v-if="formItem.type==2">
-								<Col v-bind="grid">
-									<FormItem label="商品免审:" label-for="product_verify_status" prop="product_verify_status">
-										<Switch size="large" v-model="formItem.product_verify_status" :false-value="0" :true-value="1">
-											<span slot="open" :true-value="1">开启</span>
-											<span slot="close" :false-value="0">关闭</span>
-										</Switch>
-									</FormItem>
-								</Col>
-							</Col>
-              <Col span="24" v-if="formItem.type==2">
-                <Col v-bind="grid">
-                  <FormItem label="自主添加商品:" label-for="product_status" prop="product_status">
-                    <Switch size="large" v-model="formItem.product_status" :false-value="0" :true-value="1">
-                      <span slot="open" :true-value="1">开启</span>
-                      <span slot="close" :false-value="0">关闭</span>
-                    </Switch>
-                  </FormItem>
-                </Col>
-              </Col>
+							<Col v-bind="grid">
+							<FormItem label="自主添加商品:" label-for="product_status" prop="product_status">
+								<Switch size="large" v-model="formItem.product_status" :false-value="0" :true-value="1">
+									<span slot="open" :true-value="1">开启</span>
+									<span slot="close" :false-value="0">关闭</span>
+								</Switch>
+							</FormItem>
+							</Col>
+							</Col>
+							<Col span="24">
+							<Col v-bind="grid">
+							<FormItem label="到店自提:" label-for="mention" prop="mention">
+								<Switch size="large" v-model="formItem.is_store" :false-value="0" :true-value="1">
+									<span slot="open" :true-value="1">开启</span>
+									<span slot="close" :false-value="0">关闭</span>
+								</Switch>
+							</FormItem>
+							</Col>
+							</Col>
+							<Col span="24">
+							<Col v-bind="grid">
+							<FormItem label="门店地址:" label-for="address" prop="address">
+								<Cascader :data="addresData" :load-data="loadData" v-model="formItem.addressSelect"
+									@on-change="addchack" class="inputW"></Cascader>
+							</FormItem>
+							</Col>
+							</Col>
 							<Col span="24">
-								<Col v-bind="grid">
-									<FormItem label="到店自提:" label-for="mention" prop="mention">
-										<Switch size="large" v-model="formItem.is_store" :false-value="0" :true-value="1">
-											<span slot="open" :true-value="1">开启</span>
-											<span slot="close" :false-value="0">关闭</span>
-										</Switch>
-									</FormItem>
-								</Col>
-							</Col>
-                            <Col span="24">
-                            	<Col v-bind="grid">
-                            		<FormItem label="门店地址:" label-for="address" prop="address">
-                            			<Cascader :data="addresData" :load-data="loadData" v-model="formItem.addressSelect" @on-change="addchack" class="inputW"></Cascader>
-                            		</FormItem>
-                            	</Col>
-                            </Col>
+							<Col v-bind="grid">
+							<FormItem required label="配送范围(半径):" label-for="valid_range" prop="valid_range">
+								<InputNumber :min="0.01" :max="100000" v-model="formItem.valid_range"
+									:formatter="value => `${formItem.valid_range}`"
+									:parser="value => value.replace('%', '')" style="width: 90px;"></InputNumber><span
+									class="ml10">km</span>
+							</FormItem>
+							</Col>
+							</Col>
 							<Col span="24">
-								<Col v-bind="grid">
-									<FormItem required label="配送范围(半径):" label-for="valid_range" prop="valid_range">
-										<InputNumber :min="0.01" :max="100000" v-model="formItem.valid_range" :formatter="value => `${formItem.valid_range}`" :parser="value => value.replace('%', '')" style="width: 90px;"></InputNumber><span class="ml10">km</span>
-									</FormItem>
-								</Col>
-							</Col>
-                            <Col span="24">
-                            	<Col v-bind="grid">
-                            		<FormItem label="门店详细地址:" label-for="detailed_address" prop="detailed_address">
-                            			<Input search enter-button="查找位置" v-model="formItem.detailed_address"  placeholder="输入地址(包含城市名称,否则会影响搜索精度)" class="inputW" @on-search="onSearch" />
-                            		  <!-- 提示:定位地址后,手动补充完详细地址,禁止再次点击查找 -->
-									</FormItem>
-                            	</Col>
-                            </Col>
+							<Col v-bind="grid">
+							<FormItem label="门店详细地址:" label-for="detailed_address" prop="detailed_address">
+								<Input search enter-button="查找位置" v-model="formItem.detailed_address"
+									placeholder="输入地址(包含城市名称,否则会影响搜索精度)" class="inputW" @on-search="onSearch" />
+								<!-- 提示:定位地址后,手动补充完详细地址,禁止再次点击查找 -->
+							</FormItem>
+							</Col>
+							</Col>
 							<Col span="24" v-if="isApi || add">
-								<Maps v-if="mapKey" ref="mapChild" class="map-sty" :mapKey="mapKey" :lat="Number(formItem.latitude || 34.34127)" :lon="Number(formItem.longitude || 108.93984)" :address="formItem.detailed_address" @getCoordinates="getCoordinates" />
-							</Col>
-                          <Col span="24" class="mt20" v-if="!formItem.id">
-                            <Col v-bind="grid">
-                              <FormItem label="同步商品:">
-                                <RadioGroup v-model="formItem.applicable_type">
-                                  <Radio :label="1">
-                                    <Icon type="social-apple"></Icon>
-                                    <span>全部商品</span>
-                                  </Radio>
-                                  <Radio :label="2">
-                                    <Icon type="social-android"></Icon>
-                                    <span>部分商品</span>
-                                  </Radio>
-                                </RadioGroup>
-                              </FormItem>
-                            </Col>
-                          </Col>
-                          <Col span="24" v-if="!formItem.id && formItem.applicable_type == 2" >
-                          <FormItem label="选择商品:" label-for="product_id" prop="">
-                            <div class="box">
-                              <div class="box-item" v-for="(item,index) in goodsList" :key="index">
-                                <img :src="item.image" alt="">
-                                <Icon class="icon" type="ios-close-circle" size="20" @click="bindDelete(index)" />
-                              </div>
-                              <div class="upload-box" @click="modals = true"><Icon type="ios-camera-outline" size="36" /></div>
-                            </div>
-                          </FormItem>
-                        </Col>
-                        </Row>
-                        <Row style="justify-content: space-around;">
-                            <Col>
-                                <Button type="primary" class="btn" @click="handleSubmit('formItem')">{{formItem.id!=0?'修改':'提交'}}</Button>
-                            </Col>
-                        </Row>
-                        <Spin size="large" fix v-if="spinShow"></Spin>
-                    </Form>
-                </Card>
+							<Maps v-if="mapKey" ref="mapChild" class="map-sty" :mapKey="mapKey"
+								:lat="Number(formItem.latitude || 34.34127)"
+								:lon="Number(formItem.longitude || 108.93984)" :address="formItem.detailed_address"
+								@getCoordinates="getCoordinates" />
+							</Col>
+							<Col span="24" class="mt20" v-if="!formItem.id">
+							<Col v-bind="grid">
+							<FormItem label="同步商品:">
+								<RadioGroup v-model="formItem.applicable_type">
+									<Radio :label="1">
+										<Icon type="social-apple"></Icon>
+										<span>全部商品</span>
+									</Radio>
+									<Radio :label="2">
+										<Icon type="social-android"></Icon>
+										<span>部分商品</span>
+									</Radio>
+								</RadioGroup>
+							</FormItem>
+							</Col>
+							</Col>
+							<Col span="24" v-if="!formItem.id && formItem.applicable_type == 2">
+							<FormItem label="选择商品:" label-for="product_id" prop="">
+								<div class="box">
+									<div class="box-item" v-for="(item,index) in goodsList" :key="index">
+										<img :src="item.image" alt="">
+										<Icon class="icon" type="ios-close-circle" size="20"
+											@click="bindDelete(index)" />
+									</div>
+									<div class="upload-box" @click="modals = true">
+										<Icon type="ios-camera-outline" size="36" />
+									</div>
+								</div>
+							</FormItem>
+							</Col>
+						</Row>
+						<Row style="justify-content: space-around;">
+							<Col>
+							<Button type="primary" class="btn"
+								@click="handleSubmit('formItem')">{{formItem.id!=0?'修改':'提交'}}</Button>
+							</Col>
+						</Row>
+						<Spin size="large" fix v-if="spinShow"></Spin>
+					</Form>
+				</Card>
 
-                <Modal v-model="modalPic" width="960px" scrollable  footer-hide closable title='上传提货点logo' :mask-closable="false" :z-index="1">
-                    <uploadPictures :isChoice="isChoice" @getPic="getPic" :gridBtn="gridBtn" :gridPic="gridPic" v-if="modalPic"></uploadPictures>
-                </Modal>
-				<Modal v-model="modalErp" width="700px" scrollable  footer-hide closable title='erp门店' :mask-closable="false" :z-index="1">
+				<Modal v-model="modalPic" width="960px" scrollable footer-hide closable title='上传提货点logo'
+					:mask-closable="false" :z-index="1">
+					<uploadPictures :isChoice="isChoice" @getPic="getPic" :gridBtn="gridBtn" :gridPic="gridPic"
+						v-if="modalPic"></uploadPictures>
+				</Modal>
+				<Modal v-model="modalErp" width="700px" scrollable footer-hide closable title='erp门店'
+					:mask-closable="false" :z-index="1">
 					<erpList ref="refErp" @getProductId="getProductId"></erpList>
 				</Modal>
-            </div>
-        </Modal>
-        <Modal v-model="modals" title="商品列表"  class="paymentFooter" scrollable width="900" :footer-hide="true">
-          <goods-list ref="goodslist"  @getProductId="getGoodsId" v-if="modals" :ischeckbox="true" :isLive="true" :storeType="1"></goods-list>
-        </Modal>
-    </div>
+			</div>
+		</Modal>
+		<Modal v-model="modals" title="商品列表" class="paymentFooter" scrollable width="900" :footer-hide="true">
+			<goods-list ref="goodslist" @getProductId="getGoodsId" v-if="modals" :ischeckbox="true" :isLive="true"
+				:storeType="1"></goods-list>
+		</Modal>
+	</div>
 </template>
 
 <script>
 	// import { keyApi} from '@/api/setting';
-  import goodsList from '@/components/goodsList'
-	import { keyApi, storeGetInfoApi, cityApi, storeUpdateApi, cascaderList } from '@/api/store';
-	import { erpConfig } from "@/api/erp";
+	import goodsList from '@/components/goodsList'
+	import {
+		keyApi,
+		storeGetInfoApi,
+		cityApi,
+		storeUpdateApi,
+		cascaderList
+	} from '@/api/store';
+	import {
+		erpConfig
+	} from "@/api/erp";
 	// import { keyApi, storeUpdateApi, storeGetInfoApi, cityApi } from '@/api/setting';
-	import { mapState } from 'vuex';
+	import {
+		mapState
+	} from 'vuex';
 	import uploadPictures from '@/components/uploadPictures';
 	import erpList from './erpList.vue';
-	import Maps from '@/components/map/map.vue'
+	import Maps from '@/components/map/map.vue';
+	import {
+	  membershipDataListApi,
+	} from "@/api/membershipLevel";
 	export default {
 		name: 'systemStore',
-		components: { uploadPictures,Maps,erpList,goodsList },
-		props: { },
-		data () {
+		components: {
+			uploadPictures,
+			Maps,
+			erpList,
+			goodsList
+		},
+		props: {},
+		data() {
 			let validatePhone = (rule, value, callback) => {
 				if (!value) {
 					return callback(new Error('请填写手机号'));
@@ -251,19 +301,20 @@
 				}
 			};
 			return {
-        goodsList:[],
-        modals:false,
-        treeSelect:[],
-				modalErp:false,
-				openErp:false,
+				goodsList: [],
+				modals: false,
+				treeSelect: [],
+				modalErp: false,
+				openErp: false,
 				isTemplate: false,
 				title: '',
 				formItem: {
-          product_id:[],
-          cate_id:[],
+					product_id: [],
+					cate_id: [],
 					id: 0,
 					erp_shop_id: 0,
 					store_account: '',
+					agent_level:1,
 					store_password: '',
 					image: '',
 					name: '',
@@ -274,58 +325,78 @@
 					is_store: 0,
 					address: '',
 					detailed_address: '',
-					latitude:'',
-					longitude:'',
-					province:0,
-					city:0,
-					area:0,
-					street:0,
-					addressSelect:[],
-					valid_range:0,
-					product_verify_status:0,
-          product_status:1,
-          type:1,
-          applicable_type:1
+					latitude: '',
+					longitude: '',
+					province: 0,
+					city: 0,
+					area: 0,
+					street: 0,
+					addressSelect: [],
+					valid_range: 0,
+					product_verify_status: 0,
+					product_status: 1,
+					type: 1,
+					applicable_type: 1
 				},
 				spinShow: false,
 				addresData: [],
 				ruleValidate: {
-					name: [
-						{ required: true, message: '请输入门店名称', trigger: 'blur' }
-					],
-					erp_shop_id: [
-						{ required: true, validator: validateErp, trigger: 'change' }
-					],
-					store_account: [
-						{ required: true, message: '请输入管理员账号', trigger: 'blur' }
-					],
-					store_password: [
-						{ required: true, message: '请输入管理员密码', trigger: 'blur' }
-					],
-					address: [
-						{ required: true, message: '请选择门店地址', trigger: 'change' }
-					],
-					day_time: [ 
-						{required: true,type: "array", message: "请选择营业时间",trigger: "change"},
-						{validator(rule, value, callback, source, options) 
-							{
+					name: [{
+						required: true,
+						message: '请输入门店名称',
+						trigger: 'blur'
+					}],
+					erp_shop_id: [{
+						required: true,
+						validator: validateErp,
+						trigger: 'change'
+					}],
+					store_account: [{
+						required: true,
+						message: '请输入管理员账号',
+						trigger: 'blur'
+					}],
+					store_password: [{
+						required: true,
+						message: '请输入管理员密码',
+						trigger: 'blur'
+					}],
+					address: [{
+						required: true,
+						message: '请选择门店地址',
+						trigger: 'change'
+					}],
+					day_time: [{
+							required: true,
+							type: "array",
+							message: "请选择营业时间",
+							trigger: "change"
+						},
+						{
+							validator(rule, value, callback, source, options) {
 								if (value[0] === "") {
-								callback("时间不能为空");
+									callback("时间不能为空");
 								}
-							 callback();//这个一定要有。不然无法验证通过
+								callback(); //这个一定要有。不然无法验证通过
 							}
 						}
-				    ],//TimePicker-timerange,自定义的
+					], //TimePicker-timerange,自定义的
 
-					phone: [
-						{ required: true, validator: validatePhone, trigger: 'blur' }
-					],
-					detailed_address: [
-						{ required: true, message: '请输入详细地址', trigger: 'blur' }
-					],
-					image: [
-						{ required: true, validator: validateUpload, trigger: 'change' }
-					]
+					phone: [{
+						required: true,
+						validator: validatePhone,
+						trigger: 'blur'
+					}],
+					detailed_address: [{
+						required: true,
+						message: '请输入详细地址',
+						trigger: 'blur'
+					}],
+					image: [{
+						required: true,
+						validator: validateUpload,
+						trigger: 'change'
+					}]
 				},
 				mapKey: '',
 				grid: {
@@ -351,84 +422,100 @@
 				},
 				modalPic: false,
 				isChoice: '单选',
-				pid:0,
-				isApi:0,
-				add:0
+				pid: 0,
+				isApi: 0,
+				add: 0,
+				// 门店等级
+				tabList:[],
 			}
 		},
-		created () {
-      this.goodsCategory();
+		created() {
+			this.goodsCategory();
 			this.getErpConfig();
+			this.getVipList();
 			this.getKey();
 			// this.getInfo();
-			let data = {pid:0}
+			let data = {
+				pid: 0
+			}
 			this.cityInfo(data);
 		},
 		computed: {
 			...mapState('admin/layout', [
 				'isMobile'
 			]),
-			labelWidth () {
+			labelWidth() {
 				return this.isMobile ? undefined : 120;
 			},
-			labelPosition () {
+			labelPosition() {
 				return this.isMobile ? 'top' : 'right';
 			}
 		},
-		mounted: function () {},
+		mounted: function() {},
 		methods: {
-      //对象数组去重;
-      unique(arr) {
-        const res = new Map();
-        return arr.filter((arr) => !res.has(arr.product_id) && res.set(arr.product_id, 1))
-      },
-      getGoodsId (data) {
-        let list = this.goodsList.concat(data);
-        let uni = this.unique(list);
-        this.goodsList = uni;
-        this.$nextTick(res=>{
-          setTimeout(()=>{
-            this.modals = false
-          },300)
-        })
-      },
-      bindDelete (index) {
-        this.goodsList.splice(index, 1)
-      },
-      // 门店分类;
-      goodsCategory () {
-        cascaderList(1).then(res => {
-          this.treeSelect = res.data;
-        }).catch(res => {
-          this.$Message.error(res.msg);
-        })
-      },
-			getProductId(id){
+			getVipList(){
+				console.log("111")
+				const that = this;
+				  membershipDataListApi({})
+				    .then(({data}) => {
+				      that.tabList = data.list;
+				    })
+				    .catch((res) => {
+				      that.$Message.error(res.msg);
+				    });
+			},
+			//对象数组去重;
+			unique(arr) {
+				const res = new Map();
+				return arr.filter((arr) => !res.has(arr.product_id) && res.set(arr.product_id, 1))
+			},
+			getGoodsId(data) {
+				let list = this.goodsList.concat(data);
+				let uni = this.unique(list);
+				this.goodsList = uni;
+				this.$nextTick(res => {
+					setTimeout(() => {
+						this.modals = false
+					}, 300)
+				})
+			},
+			bindDelete(index) {
+				this.goodsList.splice(index, 1)
+			},
+			// 门店分类;
+			goodsCategory() {
+				cascaderList(1).then(res => {
+					this.treeSelect = res.data;
+				}).catch(res => {
+					this.$Message.error(res.msg);
+				})
+			},
+			getProductId(id) {
 				this.formItem.erp_shop_id = id;
 				this.modalErp = false;
 				this.$refs.formItem.validateField("erp_shop_id");
 			},
-			tapErp(){
+			tapErp() {
 				this.$refs.refErp.currentid = this.formItem.erp_shop_id;
 				this.modalErp = true;
 				this.$refs.formItem.validateField("erp_shop_id");
 			},
-			getErpConfig(){
-				erpConfig().then(res=>{
+			getErpConfig() {
+				erpConfig().then(res => {
 					this.openErp = res.data.open_erp;
-				}).catch(err=>{
+				}).catch(err => {
 					this.$Message.error(err.msg);
 				})
 			},
-			clearFrom () {
-          this.goodsList = [];
-			    this.formItem = {
-          cate_id: [],
+			clearFrom() {
+				this.goodsList = [];
+				this.formItem = {
+					cate_id: [],
 					id: 0,
 					store_account: '',
 					store_password: "",
 					image: '',
-					erp_shop_id:0,
+					erp_shop_id: 0,
 					name: '',
 					introduction: '',
 					phone: '',
@@ -437,49 +524,51 @@
 					is_store: 0,
 					address: '',
 					detailed_address: '',
-					latitude:'',
-					longitude:'',
-					province:0,
-					city:0,
-					area:0,
-					street:0,
-					addressSelect:[],
-					valid_range:0,
-          product_verify_status:0,
-          product_status:1,
-          type:1,
-          applicable_type:1
+					latitude: '',
+					longitude: '',
+					province: 0,
+					city: 0,
+					area: 0,
+					street: 0,
+					addressSelect: [],
+					valid_range: 0,
+					product_verify_status: 0,
+					product_status: 1,
+					type: 1,
+					applicable_type: 1
 				}
 				this.add = 0;
 				this.isApi = 0;
 			},
-			cancel () {
+			cancel() {
 				this.isTemplate = false;
-			    // this.$refs['formItem'].resetFields();
-			    this.clearFrom();
+				// this.$refs['formItem'].resetFields();
+				this.clearFrom();
 			},
-			addchack(e,selectedData){
-				e.forEach((i,index)=>{
-					if(index==0){
+			addchack(e, selectedData) {
+				e.forEach((i, index) => {
+					if (index == 0) {
 						this.formItem.province = i
-					}else if(index==1){
+					} else if (index == 1) {
 						this.formItem.city = i
-					}else if(index==2){
+					} else if (index == 2) {
 						this.formItem.area = i
-					}else {
+					} else {
 						this.formItem.street = i
 					}
 				})
 				this.formItem.address = (selectedData.map(o => o.label)).join("/");
 			},
-			cityInfo(data){
-				cityApi(data).then(res=>{
+			cityInfo(data) {
+				cityApi(data).then(res => {
 					this.addresData = res.data
 				})
 			},
 			loadData(item, callback) {
 				item.loading = true;
-				cityApi({pid:item.value}).then(res=>{
+				cityApi({
+					pid: item.value
+				}).then(res => {
 					item.children = res.data;
 					item.loading = false;
 					callback();
@@ -489,22 +578,22 @@
 			getCoordinates(data) {
 				this.formItem.latitude = data.location.lat || 34.34127
 				this.formItem.longitude = data.location.lng || 108.93984
-				if(this.isApi){
+				if (this.isApi) {
 					// // this.formItem.detailed_address = data.address
 					let components = data.addressComponents;
-					if(this.formItem.detailed_address.indexOf(components.street) == -1){
-						this.formItem.detailed_address = data.address+(components.town?components.town:'');
+					if (this.formItem.detailed_address.indexOf(components.street) == -1) {
+						this.formItem.detailed_address = data.address + (components.town ? components.town : '');
 					}
 				}
 			},
 			// 查找位置
 			onSearch() {
-				if(this.$refs.mapChild){
+				if (this.$refs.mapChild) {
 					this.$refs.mapChild.searchKeyword(this.formItem.detailed_address)
 				}
 			},
 			// key值
-			getKey () {
+			getKey() {
 				keyApi().then(res => {
 					this.mapKey = res.data.key
 				}).catch(res => {
@@ -512,12 +601,12 @@
 				})
 			},
 			// 详情
-			getInfo (id) {
-			    let that = this;
-          that.$refs['formItem'].resetFields();
-			    that.formItem.id = id;
-			    that.spinShow = true;
-			    storeGetInfoApi(id).then(res => {
+			getInfo(id) {
+				let that = this;
+				that.$refs['formItem'].resetFields();
+				that.formItem.id = id;
+				that.spinShow = true;
+				storeGetInfoApi(id).then(res => {
 					this.isApi = 1;
 					let addressSelect = [];
 					this.formItem = res.data.info;
@@ -526,59 +615,59 @@
 					a.push(res.data.info.day_start)
 					a.push(res.data.info.day_end)
 					this.formItem.day_time = a
-					if(res.data.info.province){
+					if (res.data.info.province) {
 						addressSelect.push(res.data.info.province)
 					}
-					if(res.data.info.city){
+					if (res.data.info.city) {
 						addressSelect.push(res.data.info.city)
 					}
-					if(res.data.info.area){
+					if (res.data.info.area) {
 						addressSelect.push(res.data.info.area)
 					}
-					if(res.data.info.street){
+					if (res.data.info.street) {
 						addressSelect.push(res.data.info.street)
 					}
-					this.$set(this.formItem,'valid_range',(this.formItem.valid_range)/1000)
+					this.$set(this.formItem, 'valid_range', (this.formItem.valid_range) / 1000)
 					this.formItem.addressSelect = addressSelect;
 					this.onSearch();
 					that.spinShow = false;
-				}).catch(function (res) {
+				}).catch(function(res) {
 					that.spinShow = false;
 					that.$Message.error(res.msg);
 				})
 			},
 			// 选择图片
-			modalPicTap () {
+			modalPicTap() {
 				this.modalPic = true;
 				this.$refs.formItem.validateField("image")
 			},
 			// 选中图片
-			getPic (pc) {
+			getPic(pc) {
 				this.formItem.image = pc.att_dir;
 				this.modalPic = false;
 				this.$refs.formItem.validateField("image")
 			},
 			// 营业时间
-			onchangeTime (e) {
+			onchangeTime(e) {
 				this.formItem.day_time = e;
 			},
 			// 提交
-			handleSubmit (name) {
+			handleSubmit(name) {
 				this.$refs[name].validate((valid) => {
 					if (valid) {
-						if(this.formItem.day_time[0] == ''){
+						if (this.formItem.day_time[0] == '') {
 							this.formItem.day_time = ['00:00:00', '23:59:59']
 						}
-						if(this.formItem.valid_range == ''||this.formItem.valid_range<0){
+						if (this.formItem.valid_range == '' || this.formItem.valid_range < 0) {
 							return this.$Message.error('请输入有效的门店范围');
 						}
-            let product_id = []
-            this.goodsList.forEach(item=>{
-              product_id.push(item.product_id)
-            })
-            this.formItem.product_id = product_id;
-            // this.formItem.valid_range = this.formItem.valid_range/1000
-						storeUpdateApi(this.formItem.id,this.formItem).then(async res => {
+						let product_id = []
+						this.goodsList.forEach(item => {
+							product_id.push(item.product_id)
+						})
+						this.formItem.product_id = product_id;
+						// this.formItem.valid_range = this.formItem.valid_range/1000
+						storeUpdateApi(this.formItem.id, this.formItem).then(async res => {
 							this.$Message.success(res.msg);
 							this.isTemplate = false;
 							this.$parent.getList();
@@ -591,95 +680,120 @@
 						return false;
 					}
 				})
-				
+
 			}
 		}
 	}
 </script>
 
 <style scoped lang="stylus">
-.tips {
-  display: inline-bolck;
-  font-size: 12px;
-  font-weight: 400;
-  color: #999;
-}
-.box{
-  display flex
-  flex-wrap wrap
-  .box-item{
-    position relative
-    margin-right 20px
-    width 60px
-    height 60px
-    margin-bottom 10px
-    img{
-      width 100%
-      height 100%
-    }
-    .icon{
-      position absolute;
-      top:-10px;
-      right -10px;
-    }
-  }
-  .upload-box{
-    width 60px
-    height 60px
-    margin-bottom 10px
-    display flex
-    align-items center
-    justify-content center
-    background #ccc
-  }
-}
+	.tips {
+		display: inline-bolck;
+		font-size: 12px;
+		font-weight: 400;
+		color: #999;
+	}
+
+	.box {
+		display flex;
+		flex-wrap wrap;
+
+		.box-item {
+			position relative;
+			margin-right 20px;
+			width 60px;
+			height 60px;
+			margin-bottom 10px;
+
+			img {
+				width 100%;
+				height 100%;
+			}
+
+			.icon {
+				position absolute;
+				top: -10px;
+				right -10px;
+			}
+		}
+
+		.upload-box {
+			width 60px;
+			height 60px;
+			margin-bottom 10px;
+			display flex;
+			align-items center;
+			justify-content center;
+			background #ccc;
+		}
+	}
+
 	.map-sty {
 		width: 90%;
 		text-align: right;
 		margin: 0 0 0 10%;
 	}
-	/deep/.ivu-card-body{
-		padding 16px 0 0 0!important;
+
+	/deep/.ivu-card-body {
+		padding 16px 0 0 0 !important;
 	}
-	.footer{
+
+	.footer {
 		width 100%;
 		height 50px;
 		box-shadow: 0px -2px 4px 0px rgba(0, 0, 0, 0.05);
 		margin-top 50px;
 	}
-.btn /deep/.ivu-btn-primary{
+
+	.btn /deep/.ivu-btn-primary {
 		width 86px;
 	}
-	.btn{
+
+	.btn {
 		margin-top: 20px;
 	}
-	.inputW{
+
+	.inputW {
 		width 400px;
 	}
-	.ivu-mt{
+
+	.ivu-mt {
 		min-width 580px;
 	}
-	.picBox
+
+	.picBox {
+
 		display: inline-block;
 		cursor: pointer;
-		.upLoad
+
+		.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
+		}
+
+		.pictrue {
+
 			width: 60px;
 			height: 60px;
 			border: 1px dotted rgba(0, 0, 0, 0.1);
 			margin-right: 10px;
-			img
+
+			img {
+
 				width: 100%;
 				height: 100%;
-		.iconfont
+			}
+		}
+
+		.iconfont {
 			color: #CCCCCC;
 			font-size 26px;
 			text-align center
-			
-</style>
+		}
+	}
+</style>

+ 263 - 0
src/pages/store/storeApply/list.vue

@@ -0,0 +1,263 @@
+<template>
+	<div>
+		<Card :bordered="false" dis-hover class="ivu-mt" :padding="0">
+		    <div class="new_card_pd">
+		        <Form
+		                ref="formValidate"
+		                inline
+		                :model="formValidate"
+		                :label-width="labelWidth"
+		                :label-position="labelPosition"
+		                @submit.native.prevent
+		        >
+					<FormItem label="时间选择:" >
+					  <Date-picker
+						:editable="false"
+						:clearable="true"
+						@on-change="onchangeTime"
+						:value="timeVal"
+						format="yyyy/MM/dd HH:mm:ss"
+						type="datetimerange"
+						placement="bottom-start"
+						placeholder="选择时间"
+						class="input-add mr20"
+						:options="options"
+					  ></Date-picker>
+					</FormItem>
+		            <FormItem label="审核状态:">
+		                <Select
+		                        v-model="formValidate.status"
+		                        placeholder="请选择"
+		                        clearable
+		                        class="input-add"
+								@on-change="userSearchs"
+		                >
+		                    <Option value="0">未处理</Option>
+		                    <Option value="1">已通过</Option>
+							<Option value="2">未通过</Option>
+		                </Select>
+		            </FormItem>
+		            <FormItem label="门店:">
+		                <Input
+		                        v-model="formValidate.keyword"
+		                        placeholder="请输入门店/ID"
+		                         class="input-add mr14"
+		                />
+		                <Button class="mr14" @click="userSearchs" type="primary">查询</Button>
+						<Button @click="reset">重置</Button>
+		            </FormItem>
+		        </Form>
+		    </div>
+		</Card>
+		<Card :bordered="false" dis-hover class="ivu-mt">
+		  <Table
+		      class="mt25"
+		      ref="table"
+		      :columns="columns"
+		      :data="tableList"
+		      :loading="loading"
+		      highlight-row
+		      no-data-text="暂无数据"
+		      no-filtered-data-text="暂无筛选结果"
+		  >
+		    <template slot-scope="{ row }" slot="images">
+				<div class="acea-row row-middle">
+					<div class="tabBox" v-viewer v-for="(item, index) in row.images" :key="index">
+						<div class="pictrue">
+							<img :src="item"/>
+						</div>
+					</div>
+				</div>
+		    </template>
+			<template slot-scope="{ row }" slot="status">	
+				<Tag color="default" size="medium" v-if="row.status == 0">{{row.status_name}}</Tag>
+				<Tag color="green" size="medium" v-else-if="row.status == 1">{{row.status_name}}</Tag>
+				<Tag color="red" size="medium" v-else="row.status == 2">{{row.status_name}}</Tag>
+			</template>
+			<template slot-scope="{ row }" slot="mark">
+				{{row.mark||'-'}}
+			</template>
+		    <template slot-scope="{ row, index }" slot="action">
+		      <a @click="verify(row)" v-if="row.status == 0">审核</a>
+		      <Divider type="vertical" v-if="row.status == 0" />
+			  <a @click="mask(row)">备注</a>
+			  <Divider type="vertical" />
+		      <a @click="del(row, '删除入住申请', index)">删除</a>
+		    </template>
+		  </Table>
+		  <div class="acea-row row-right page">
+		    <Page
+		        :total="total"
+		        :current="formValidate.page"
+		        show-elevator
+		        show-total
+		        @on-change="pageChange"
+		        :page-size="formValidate.limit"
+		    />
+		  </div>
+		</Card>
+	</div>
+</template>
+
+<script>
+	import { mapState } from "vuex";
+	import timeOptions from "@/utils/timeOptions";
+	import { getApplyList, getVerifyForm, getMarkForm } from "@/api/store";
+	export default {
+		data(){
+			return{
+				loading: false, 
+				options: timeOptions,
+				timeVal: [],
+				formValidate:{
+					page: 1,
+					limit: 20,
+					data:'',
+					status:'',
+					keyword:''
+				},
+				total:0,
+				tableList:[],
+				columns: [
+				  {
+				    title: "ID",
+				    key: "id",
+				    width: 80,
+				  },
+				  {
+				    title: "供应商名称",
+				    key: "system_name",
+				    minWidth: 150,
+				  },
+				  {
+				    title: "联系人姓名",
+				    key: "name",
+				    minWidth: 90,
+				  },
+				  {
+				    title: "联系方式",
+				    key: "phone",
+				    minWidth: 90,
+				  },
+				  {
+				    title: "申请时间",
+				    key: "add_time",
+				    minWidth: 150,
+				  },
+				  {
+				    title: "资质图片",
+				    slot: "images",
+				    minWidth: 200,
+				  },
+				  {
+				    title: "状态",
+				    slot: "status",
+				    minWidth: 100,
+				  },
+				  {
+				    title: "备注",
+				    slot: "mark",
+				    minWidth: 100,
+				  },
+				  {
+				    title: "操作",
+				    slot: "action",
+				    fixed: "right",
+				    width: 140,
+				  },
+				],
+			}
+		},
+		computed: {
+		  ...mapState("admin/layout", ["isMobile"]),
+		  labelWidth() {
+		    return this.isMobile ? undefined : 96;
+		  },
+		  labelPosition() {
+		    return this.isMobile ? "top" : "right";
+		  },
+		},
+		created(){
+			this.getList();
+		},
+		mounted(){},
+		methods:{
+			verify(row){
+				this.$modalForm(getVerifyForm(row.id)).then(() => this.getList());
+			},
+			mask(row){
+				this.$modalForm(getMarkForm(row.id)).then(() => this.getList());
+			},
+			// 删除
+			del (row, tit, num) {
+			    let delfromData = {
+			        title: tit,
+			        num: num,
+			        url: `/supplier/apply/del/${row.id}`,
+			        method: 'DELETE',
+			        ids: ''
+			    };
+			    this.$modalSure(delfromData).then((res) => {
+			        this.$Message.success(res.msg);
+			        this.tableList.splice(num, 1);
+			        if (!this.tableList.length) {
+			          this.formValidate.page =
+			              this.formValidate.page == 1 ? 1 : this.formValidate.page - 1;
+			        }
+			        this.getList();
+			    }).catch(res => {
+			        this.$Message.error(res.msg);
+			    });
+			},
+			userSearchs(){
+				this.formValidate.page = 1;
+				this.getList();
+			},
+			reset(){
+				this.formValidate = {
+				  page: 1,
+				  limit: 20,
+				  data:'',
+				  status:'',
+				  keyword:''
+				};
+				this.timeVal = [];
+				this.getList();
+			},
+			pageChange (index) {
+			    this.formValidate.page = index;
+			    this.getList();
+			},
+			// 具体日期
+			onchangeTime(e) {
+			  this.timeVal = e;
+			  this.formValidate.data = this.timeVal[0] ? this.timeVal.join("-") : "";
+			  this.formValidate.page = 1;
+			  this.getList();
+			},
+			getList(){
+				getApplyList(this.formValidate).then(res=>{
+					let data = res.data;
+					this.tableList = data.list;
+					this.total = data.count;
+				}).catch(err=>{
+					this.$Message.error(err.msg);
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="stylus">
+	.tabBox{
+		margin: 2.5px 5px 2.5px 0;
+		.pictrue{
+			width: 40px;
+			height: 40px;
+			img{
+				width: 100%;
+				height: 100%;
+			}
+		}
+	}
+</style>

+ 1 - 1
src/router/modules/setting.js

@@ -160,7 +160,7 @@ export default {
             name: `${pre}membershipLevel`,
             meta: {
                 ...meta,
-                title: '分销等级'
+                title: '门店货架'
             },
             component: () => import('@/pages/setting/membershipLevel/index')
         },

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

@@ -21,6 +21,15 @@ export default {
 			},
 			component: () => import('@/pages/store/base/index')
 		},
+		{
+			path:'apply/list',
+			name: `${pre}applyList`,
+			meta: {
+				auth: ['store-apply-list'],
+				title: '门店审核'
+			},
+			component: () => import('@/pages/store/storeApply/list')
+		},
 		{
 			path: 'category/index',
 			name: `${pre}category`,