<!DOCTYPE HTML> 
 | 
<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml"> 
 | 
<head> 
 | 
    <meta charset="utf-8"> 
 | 
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> 
 | 
    <meta name="renderer" content="webkit|ie-comp|ie-stand"> 
 | 
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
 | 
    <meta name="viewport" 
 | 
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/> 
 | 
    <meta http-equiv="Cache-Control" content="no-siteapp"/> 
 | 
    <!-- 本框架基本脚本和样式 --> 
 | 
    <script type="text/javascript" th:src="@{/js/systools/MBaseVue.js}"></script> 
 | 
    <link rel="stylesheet" th:href="@{/plugin/element-ui/index.css}"> 
 | 
    <link th:href="@{/css/styleOne/style.min.css}" rel="stylesheet" type="text/css"/> 
 | 
  
 | 
    <!-- 富文本编辑器 --> 
 | 
    <script type="text/javascript" charset="utf-8" 
 | 
            th:src="@{/plugin/beditor/ueditor.config.js}"></script> 
 | 
    <script type="text/javascript" charset="utf-8" 
 | 
            th:src="@{/plugin/beditor/ueditor.all.js}"> 
 | 
    </script> 
 | 
    <script type="text/javascript" charset="utf-8" 
 | 
            th:src="@{/plugin/beditor/lang/zh-cn/zh-cn.js}"></script> 
 | 
  
 | 
  
 | 
    <style> 
 | 
        .unitbox .el-col { 
 | 
            margin-left: 5px; 
 | 
  
 | 
        } 
 | 
  
 | 
  
 | 
  
 | 
        .measureInput { 
 | 
            width: 150px; 
 | 
        } 
 | 
  
 | 
        .tabs { 
 | 
            margin-bottom: 80px; 
 | 
        } 
 | 
  
 | 
  
 | 
    </style> 
 | 
</head> 
 | 
<body> 
 | 
<div class="ibox-content" id="app" v-cloak @click="hidePanel"> 
 | 
    <el-form :model="form" :rules="rules" ref="form" label-width="100px" class="demo-form"> 
 | 
  
 | 
        <el-tabs class="tabs" type="card" v-model="activeName" @tab-click="handleClick"> 
 | 
            <el-tab-pane label="基础资料" name="tab1"> 
 | 
  
 | 
                <p class="el-big-title">基础资料</p> 
 | 
                <el-row> 
 | 
                    <el-col :span="10"> 
 | 
                        <el-form-item label="商品名称" prop="name"> 
 | 
                            <el-input v-model="form.name"></el-input> 
 | 
                        </el-form-item> 
 | 
                    </el-col> 
 | 
                    <el-col :offset="2" :span="10" > 
 | 
                        <el-form-item label="商品编码" prop="code"> 
 | 
                            <el-input v-model="form.code"></el-input> 
 | 
                        </el-form-item> 
 | 
                    </el-col> 
 | 
                </el-row> 
 | 
                <el-row> 
 | 
                    <el-col :span="10"> 
 | 
                        <el-form-item label="商品分类" prop="cateId"> 
 | 
                            <treeselect v-model="form.cateId" 
 | 
                                        :multiple="false" 
 | 
                                        :normalizer="normalizer" 
 | 
                                        :options="shoppingGoodscategoryTreeData" 
 | 
                                        placeholder="请选择商品分类"/> 
 | 
                        </el-form-item> 
 | 
                    </el-col> 
 | 
  
 | 
                    <el-col :offset="2" :span="10" v-if="form.goodType=='家居产品'"> 
 | 
                        <el-form-item label="库存分类" prop="goodsSortId"> 
 | 
                            <treeselect v-model="form.goodsSortId" 
 | 
                                        :multiple="false" 
 | 
                                        :normalizer="normalizerGoodsTyps" 
 | 
                                        :options="goodsTypsTreeData" 
 | 
                                        placeholder="请选择库存分类"/> 
 | 
                        </el-form-item> 
 | 
                    </el-col> 
 | 
  
 | 
  
 | 
                </el-row> 
 | 
                <el-row> 
 | 
                    <el-col :span="10" v-if="form.goodType=='家居产品'"> 
 | 
                        <el-form-item label="规格" class="unitbox" prop="unit"> 
 | 
  
 | 
                            <el-col :span="2" style="text-align: center"> 
 | 
                                <span>一</span> 
 | 
                            </el-col> 
 | 
                            <el-col :span="5"> 
 | 
  
 | 
                                <el-form-item label="" prop="unit"> 
 | 
                                    <el-select v-model="form.unit" filterable placeholder="件单位"> 
 | 
                                        <el-option 
 | 
                                                v-for="item in unitList" 
 | 
                                                :key="item.name" 
 | 
                                                :label="item.name" 
 | 
                                                :value="item.name"> 
 | 
                                        </el-option> 
 | 
                                    </el-select> 
 | 
                                </el-form-item> 
 | 
                            </el-col> 
 | 
                            <el-col :span="2" style="text-align: center"> 
 | 
                                <span>等于</span> 
 | 
                            </el-col> 
 | 
                            <el-col :span="5"> 
 | 
                                <el-form-item label="" prop="volume"> 
 | 
                                    <el-input v-model="form.volume"></el-input> 
 | 
                                </el-form-item> 
 | 
                            </el-col> 
 | 
                            <el-col :span="5"> 
 | 
                                <el-form-item label="" prop="measure"> 
 | 
                                    <el-select v-model="form.measure" filterable placeholder="容量单位"> 
 | 
                                        <el-option 
 | 
                                                v-for="item in measureList" 
 | 
                                                :key="item.name" 
 | 
                                                :label="item.name" 
 | 
                                                :value="item.name"> 
 | 
                                        </el-option> 
 | 
                                    </el-select> 
 | 
                                </el-form-item> 
 | 
                            </el-col> 
 | 
                        </el-form-item> 
 | 
                    </el-col> 
 | 
  
 | 
                    <el-col :offset="2" :span="10" v-if="form.goodType=='家居产品'"> 
 | 
                        <el-form-item label="条形码"> 
 | 
                            <el-input v-model="form.goodsNo"></el-input> 
 | 
                        </el-form-item> 
 | 
                    </el-col> 
 | 
  
 | 
                </el-row> 
 | 
  
 | 
                <el-row> 
 | 
                    <el-col :span="10"> 
 | 
                        <el-form-item label="成本价"> 
 | 
                            <el-input v-model="form.price"></el-input> 
 | 
                        </el-form-item> 
 | 
                    </el-col> 
 | 
  
 | 
                    <el-col :offset="2" :span="10" v-if="form.goodType=='家居产品'"> 
 | 
                        <el-form-item label="批发价"> 
 | 
                            <el-input v-model="form.wholesale"></el-input> 
 | 
                        </el-form-item> 
 | 
                    </el-col> 
 | 
  
 | 
                    <el-col :offset="2" :span="10" v-if="form.goodType=='项目'"> 
 | 
                        <el-form-item label="服务时长" prop="timeLength"> 
 | 
                            <el-input v-model="form.timeLength"> 
 | 
                                <template slot="append">分钟</template> 
 | 
                            </el-input> 
 | 
                        </el-form-item> 
 | 
                    </el-col> 
 | 
  
 | 
                </el-row> 
 | 
  
 | 
  
 | 
                <el-row v-if="form.goodType=='家居产品'"> 
 | 
                    <el-col :span="10"> 
 | 
                        <el-form-item label="往来单位"> 
 | 
                            <el-select v-model="form.supplierId" filterable placeholder="请选择往来单位"> 
 | 
                                <el-option 
 | 
                                        v-for="item in supplierList" 
 | 
                                        :key="item.id" 
 | 
                                        :label="item.supplName" 
 | 
                                        :value="item.id"> 
 | 
                                </el-option> 
 | 
                            </el-select> 
 | 
                        </el-form-item> 
 | 
                    </el-col> 
 | 
                    <el-col :offset="2" :span="10"> 
 | 
                        <el-form-item label="库存警戒值"> 
 | 
                            <el-input v-model="form.alarmNum"></el-input> 
 | 
                        </el-form-item> 
 | 
                    </el-col> 
 | 
                </el-row> 
 | 
  
 | 
  
 | 
                <el-row v-if="form.goodType=='套餐'"> 
 | 
                    <el-col :span="10"> 
 | 
                        <el-form-item label="套餐类型" prop="isCourse"> 
 | 
                            <el-radio-group v-model="form.isCourse"> 
 | 
                                <el-radio label="N">固定套餐(会员可以消费套餐内项目的固定次数)</el-radio> 
 | 
                                <el-radio label="Y">任选套餐(设定一个套餐总次数,会员可在次数内消费套餐中任意项目)</el-radio> 
 | 
                            </el-radio-group> 
 | 
                        </el-form-item> 
 | 
                    </el-col> 
 | 
                    <el-col :offset="2" :span="3"> 
 | 
                        <el-form-item label="是否无限次数" v-if="form.isCourse=='Y'"> 
 | 
                            <el-radio-group v-model="form.isInfinite"> 
 | 
                                <el-radio label="N">否</el-radio> 
 | 
                                <el-radio label="Y">是</el-radio> 
 | 
                            </el-radio-group> 
 | 
                        </el-form-item> 
 | 
                    </el-col> 
 | 
                    <el-col :offset="1" :span="5"> 
 | 
                        <el-form-item prop="carUseCount" label-width="120px" label="最大使用次数" v-if="form.isCourse=='Y' && form.isInfinite=='N'"> 
 | 
                            <el-input v-model="form.carUseCount"></el-input> 
 | 
                        </el-form-item> 
 | 
                    </el-col> 
 | 
                </el-row> 
 | 
  
 | 
                <el-row v-if="form.goodType=='充值卡'"> 
 | 
                    <el-col :span="10"> 
 | 
                        <el-form-item label="充值卡使用范围" label-width="150px" prop="isCourse"> 
 | 
                            <el-radio-group v-model="form.carIsAll"> 
 | 
                                <el-radio label="是">所有产品</el-radio> 
 | 
                                <el-radio label="否">部分产品(设置部分产品则充值卡内的金额只能消费指定范围的产品)</el-radio> 
 | 
                            </el-radio-group> 
 | 
                        </el-form-item> 
 | 
                    </el-col> 
 | 
                    <el-col :offset="2" :span="10"> 
 | 
                        <el-form-item label-width="120px" label="最大使用次数"> 
 | 
                            <el-input v-model="form.carUseCount"></el-input> 
 | 
                        </el-form-item> 
 | 
                    </el-col> 
 | 
                </el-row> 
 | 
  
 | 
  
 | 
                <p class="el-big-title">销售设置</p> 
 | 
  
 | 
                <el-row> 
 | 
                    <el-col :span="10"> 
 | 
  
 | 
                        <el-form-item v-if="form.goodType!='充值卡'" label="销售价" prop="sealPice"> 
 | 
                            <el-input v-model="form.sealPice"> 
 | 
                                <template slot="append">元</template> 
 | 
                            </el-input> 
 | 
                        </el-form-item> 
 | 
                        <el-form-item v-if="form.goodType=='充值卡'" label="充值金额" prop="sealPice"> 
 | 
                            <el-input v-model="form.sealPice"> 
 | 
                                <template slot="append">元</template> 
 | 
                            </el-input> 
 | 
                        </el-form-item> 
 | 
  
 | 
                    </el-col> 
 | 
                    <el-col :offset="2" :span="10"> 
 | 
                        <el-form-item label="是否赠送"> 
 | 
                            <el-radio-group v-model="form.isPresent"> 
 | 
                                <el-radio label="否">不可以赠送</el-radio> 
 | 
                                <el-radio label="是">可以赠送</el-radio> 
 | 
                            </el-radio-group> 
 | 
                        </el-form-item> 
 | 
                    </el-col> 
 | 
                </el-row> 
 | 
                <el-row v-if="form.goodType=='充值卡'"> 
 | 
                    <el-col :span="10"> 
 | 
                        <el-form-item label="赠送金额"> 
 | 
                            <el-input v-model="form.referencePice"> 
 | 
                                <template slot="append">元</template> 
 | 
                            </el-input> 
 | 
                        </el-form-item> 
 | 
                    </el-col> 
 | 
                </el-row> 
 | 
  
 | 
                <el-row> 
 | 
                    <el-col :span="10"> 
 | 
                        <el-form-item label="上架状态"> 
 | 
                            <el-radio-group v-model="form.staus"> 
 | 
                                <el-radio label="上架"></el-radio> 
 | 
                                <el-radio label="下架"></el-radio> 
 | 
                            </el-radio-group> 
 | 
                        </el-form-item> 
 | 
                    </el-col> 
 | 
  
 | 
                </el-row> 
 | 
  
 | 
  
 | 
            </el-tab-pane> 
 | 
            <el-tab-pane label="关联产品设置" name="tab2"> 
 | 
  
 | 
                <p class="el-big-msg" v-if="form.goodType=='家居产品'">家居产品不需要设置关联产品</p> 
 | 
  
 | 
                <!-- 项目绑定产品 --> 
 | 
                <div class="mixSearchBox" v-if="form.goodType=='项目'"> 
 | 
                    <p class="el-big-title">项目消耗产品设置</p> 
 | 
                    <div class="listenDiv"> 
 | 
                    <!-- 搜索框 --> 
 | 
                    <el-input class="searchInput" @input="searchGoods()" v-model="queryKey" 
 | 
                              placeholder="搜索添加产品"></el-input> 
 | 
                    <el-button icon="el-icon-search" type="primary" @click="searchGoods()">搜索</el-button> 
 | 
                    <div class="searchResultTable" v-show="showSearchTable"> 
 | 
                        <!-- 搜索加载数据表格 --> 
 | 
                        <el-table 
 | 
                                v-loading="loading" 
 | 
                                element-loading-text="拼命加载中" 
 | 
                                element-loading-spinner="el-icon-loading" 
 | 
                                element-loading-background="rgba(0, 0, 0, 0.8)" 
 | 
                                :max-height="400" 
 | 
                                @selection-change="handleSelectionChange" 
 | 
                                :data="searchTableData" 
 | 
                                style="width: 100%"> 
 | 
                            <el-table-column 
 | 
                                    type="selection" 
 | 
                                    width="50"> 
 | 
                            </el-table-column> 
 | 
                            <el-table-column 
 | 
                                    prop="code" 
 | 
                                    label="产品编号" 
 | 
                                    width="100"> 
 | 
                            </el-table-column> 
 | 
  
 | 
                            <el-table-column 
 | 
                                    prop="name" 
 | 
                                    width="280" 
 | 
                                    label="产品名称"> 
 | 
                            </el-table-column> 
 | 
  
 | 
                            <el-table-column 
 | 
                                    prop="sealPice" 
 | 
                                    label="售价"> 
 | 
                            </el-table-column> 
 | 
                            <el-table-column 
 | 
                                    prop="goodType" 
 | 
                                    label="类型"> 
 | 
                            </el-table-column> 
 | 
                            <el-table-column 
 | 
                                    prop="cateName" 
 | 
                                    label="分类"> 
 | 
                            </el-table-column> 
 | 
                            <el-table-column 
 | 
                                    prop="address" 
 | 
                                    label="操作"> 
 | 
                                <template slot-scope="scope"> 
 | 
                                    <el-button type="primary" 
 | 
                                               size="mini" 
 | 
                                               @click="handleEdit(scope.$index, scope.row)">选择 
 | 
                                    </el-button> 
 | 
                                </template> 
 | 
                            </el-table-column> 
 | 
                        </el-table> 
 | 
                        <el-row class="btn-box" > 
 | 
                            <el-button  size="mini" type="danger" @click="closeXm()">关闭</el-button> 
 | 
                        <el-button  size="mini" type="primary" @click="chouseGoods()">确认</el-button> 
 | 
  
 | 
                        </el-row> 
 | 
                    </div> 
 | 
                    </div> 
 | 
                    <el-row class="mt-20 mb-20"> 
 | 
                        <el-col :span="20"> 
 | 
                            <el-table 
 | 
                                    border 
 | 
                                    :height="500" 
 | 
                                    :data="form.assembleGoods" 
 | 
                                    style="width: 100%"> 
 | 
                                <el-table-column 
 | 
                                        type="index" 
 | 
                                        width="50"> 
 | 
                                </el-table-column> 
 | 
                                <el-table-column 
 | 
                                        prop="shoppingGoods.code" 
 | 
                                        label="产品编号" 
 | 
                                        width="100"> 
 | 
                                </el-table-column> 
 | 
  
 | 
                                <el-table-column 
 | 
                                        prop="shoppingGoods.name" 
 | 
                                        width="280" 
 | 
                                        label="产品名称"> 
 | 
                                </el-table-column> 
 | 
                                <el-table-column 
 | 
                                        label="容量"> 
 | 
                                    <template slot-scope="scope"> 
 | 
                                        {{ scope.row.shoppingGoods.volume }}{{ scope.row.shoppingGoods.measure }} 
 | 
                                    </template> 
 | 
                                </el-table-column> 
 | 
                                <el-table-column 
 | 
                                        label="推荐用量"> 
 | 
                                    <template slot-scope="scope"> 
 | 
                                        <el-input class="measureInput" v-model="scope.row.total"> 
 | 
                                            <template slot="append" >{{ scope.row.shoppingGoods.measure }}</template> 
 | 
                                        </el-input> 
 | 
  
 | 
                                    </template> 
 | 
                                </el-table-column> 
 | 
                                <el-table-column 
 | 
                                        prop="address" 
 | 
                                        label="操作"> 
 | 
                                    <template slot-scope="scope"> 
 | 
                                        <el-button type="danger" 
 | 
                                                   size="mini" 
 | 
                                                   @click="removeItem(scope.$index, scope.row)">删除 
 | 
                                        </el-button> 
 | 
                                    </template> 
 | 
                                </el-table-column> 
 | 
                            </el-table> 
 | 
                        </el-col> 
 | 
                    </el-row> 
 | 
                </div> 
 | 
                <!-- 项目绑定产品end --> 
 | 
  
 | 
                <!-- 套餐绑定项目 --> 
 | 
                <div class="mixSearchBox" v-if="form.goodType=='套餐'"> 
 | 
                    <p class="el-big-title">套餐项目权益<code>(设置此套餐支持的服务项目和可用次数)</code></p> 
 | 
                    <div class="listenDiv"> 
 | 
                    <!-- 搜索框 --> 
 | 
                    <el-input class="searchInput" @input="searchProjInfo()" v-model="queryKey_taocan" 
 | 
                              placeholder="搜索添加项目"></el-input> 
 | 
                    <el-button icon="el-icon-search" type="primary" @click="searchProjInfo()">搜索</el-button> 
 | 
                    <div class="searchResultTable" v-show="showSearchTable_taocan"> 
 | 
                        <!-- 搜索加载数据表格 --> 
 | 
                        <el-table 
 | 
                                v-loading="loading_taocan" 
 | 
                                element-loading-text="拼命加载中" 
 | 
                                element-loading-spinner="el-icon-loading" 
 | 
                                element-loading-background="rgba(0, 0, 0, 0.8)" 
 | 
                                :max-height="400" 
 | 
                                :data="searchTableData_taocan" 
 | 
                                style="width: 100%"> 
 | 
                            <el-table-column 
 | 
                                    prop="code" 
 | 
                                    label="产品编号" 
 | 
                                    width="100"> 
 | 
                            </el-table-column> 
 | 
  
 | 
                            <el-table-column 
 | 
                                    prop="name" 
 | 
                                    width="280" 
 | 
                                    label="产品名称"> 
 | 
                            </el-table-column> 
 | 
  
 | 
                            <el-table-column 
 | 
                                    prop="sealPice" 
 | 
                                    label="售价"> 
 | 
                            </el-table-column> 
 | 
                            <el-table-column 
 | 
                                    prop="goodType" 
 | 
                                    label="类型"> 
 | 
                            </el-table-column> 
 | 
                            <el-table-column 
 | 
                                    prop="cateName" 
 | 
                                    label="分类"> 
 | 
                            </el-table-column> 
 | 
                            <el-table-column 
 | 
                                    prop="address" 
 | 
                                    label="操作"> 
 | 
                                <template slot-scope="scope"> 
 | 
                                    <el-button type="primary" 
 | 
                                               size="mini" 
 | 
                                               @click="handleEdit_taocan(scope.$index, scope.row)">选择 
 | 
                                    </el-button> 
 | 
                                </template> 
 | 
                            </el-table-column> 
 | 
                        </el-table> 
 | 
                    </div> 
 | 
                    </div> 
 | 
                    <el-row class="mt-20 mb-20"> 
 | 
                        <el-col :span="20"> 
 | 
                            <el-table 
 | 
                                    border 
 | 
                                    :height="500" 
 | 
                                    :data="form.assembleProj" 
 | 
                                    style="width: 100%"> 
 | 
                                <el-table-column 
 | 
                                        type="index" 
 | 
                                        width="50"> 
 | 
                                </el-table-column> 
 | 
                                <el-table-column 
 | 
                                        prop="shoppingGoods.code" 
 | 
                                        label="产品编号" 
 | 
                                        width="100"> 
 | 
                                </el-table-column> 
 | 
  
 | 
                                <el-table-column 
 | 
                                        prop="shoppingGoods.name" 
 | 
                                        width="280" 
 | 
                                        label="产品名称"> 
 | 
                                </el-table-column> 
 | 
  
 | 
                                <el-table-column 
 | 
                                        label="次数"> 
 | 
                                    <template slot-scope="scope"> 
 | 
                                        <el-input v-model="scope.row.total"></el-input> 
 | 
                                    </template> 
 | 
                                </el-table-column> 
 | 
                                <el-table-column 
 | 
                                        label="单次扣款"> 
 | 
                                    <template slot-scope="scope"> 
 | 
                                        <el-input v-model="scope.row.price"></el-input> 
 | 
                                    </template> 
 | 
                                </el-table-column> 
 | 
                                <el-table-column> 
 | 
                                    <template slot="header" slot-scope="scope"> 
 | 
                                        <el-tooltip content="会员每消费一次扣除可以扣除总次数几次" placement="top"> 
 | 
                                            <span>单次扣减次数<i class="el-icon-question"></i></span> 
 | 
                                        </el-tooltip> 
 | 
                                    </template> 
 | 
  
 | 
                                    <template slot-scope="scope"> 
 | 
                                        <el-input v-model="scope.row.deductionNum"></el-input> 
 | 
                                    </template> 
 | 
                                </el-table-column> 
 | 
                                <el-table-column 
 | 
                                        prop="address" 
 | 
                                        label="操作"> 
 | 
                                    <template slot-scope="scope"> 
 | 
                                        <el-button type="danger" 
 | 
                                                   size="mini" 
 | 
                                                   @click="removeItem_taocan(scope.$index, scope.row)">删除 
 | 
                                        </el-button> 
 | 
                                    </template> 
 | 
                                </el-table-column> 
 | 
                            </el-table> 
 | 
                        </el-col> 
 | 
                    </el-row> 
 | 
                </div> 
 | 
                <!-- 套餐绑定项目end --> 
 | 
  
 | 
  
 | 
                <!-- 套餐绑定产品 --> 
 | 
                <div class="mixSearchBox" v-if="form.goodType=='套餐'"> 
 | 
                    <p class="el-big-title">套餐产品权益<code>(设置此套餐中包含的家居产品)</code></p> 
 | 
                    <div class="listenDiv"> 
 | 
                    <!-- 搜索框 --> 
 | 
                    <el-input class="searchInput" @input="searchJJGoods()" v-model="queryKey_jjcp" 
 | 
                              placeholder="搜索添加项目"></el-input> 
 | 
                    <el-button icon="el-icon-search" type="primary" @click="searchJJGoods()">搜索</el-button> 
 | 
                    <div class="searchResultTable" v-show="showSearchTable_jjcp"> 
 | 
                        <!-- 搜索加载数据表格 --> 
 | 
                        <el-table 
 | 
                                v-loading="loading_taocan" 
 | 
                                element-loading-text="拼命加载中" 
 | 
                                element-loading-spinner="el-icon-loading" 
 | 
                                element-loading-background="rgba(0, 0, 0, 0.8)" 
 | 
                                :max-height="400" 
 | 
                                :data="searchTableData_jjcp" 
 | 
                                style="width: 100%"> 
 | 
                            <el-table-column 
 | 
                                    prop="code" 
 | 
                                    label="产品编号" 
 | 
                                    width="100"> 
 | 
                            </el-table-column> 
 | 
  
 | 
                            <el-table-column 
 | 
                                    prop="name" 
 | 
                                    width="280" 
 | 
                                    label="产品名称"> 
 | 
                            </el-table-column> 
 | 
  
 | 
                            <el-table-column 
 | 
                                    prop="sealPice" 
 | 
                                    label="售价"> 
 | 
                            </el-table-column> 
 | 
                            <el-table-column 
 | 
                                    prop="goodType" 
 | 
                                    label="类型"> 
 | 
                            </el-table-column> 
 | 
                            <el-table-column 
 | 
                                    prop="cateName" 
 | 
                                    label="分类"> 
 | 
                            </el-table-column> 
 | 
                            <el-table-column 
 | 
                                    prop="address" 
 | 
                                    label="操作"> 
 | 
                                <template slot-scope="scope"> 
 | 
                                    <el-button type="primary" 
 | 
                                               size="mini" 
 | 
                                               @click="handleEdit_jjcp(scope.$index, scope.row)">选择 
 | 
                                    </el-button> 
 | 
                                </template> 
 | 
                            </el-table-column> 
 | 
                        </el-table> 
 | 
                    </div> 
 | 
                    </div> 
 | 
                    <el-row class="mt-20 mb-20"> 
 | 
                        <el-col :span="20"> 
 | 
                            <el-table 
 | 
                                    border 
 | 
                                    :height="500" 
 | 
                                    :data="form.assembleGoods" 
 | 
                                    style="width: 100%"> 
 | 
                                <el-table-column 
 | 
                                        type="index" 
 | 
                                        width="50"> 
 | 
                                </el-table-column> 
 | 
                                <el-table-column 
 | 
                                        prop="shoppingGoods.code" 
 | 
                                        label="产品编号" 
 | 
                                        width="100"> 
 | 
                                </el-table-column> 
 | 
  
 | 
                                <el-table-column 
 | 
                                        prop="shoppingGoods.name" 
 | 
                                        width="280" 
 | 
                                        label="产品名称"> 
 | 
                                </el-table-column> 
 | 
                                <el-table-column 
 | 
                                        prop="shoppingGoods.cateName" 
 | 
                                        width="280" 
 | 
                                        label="商品分类"> 
 | 
                                </el-table-column> 
 | 
  
 | 
                                <el-table-column 
 | 
                                        label="产品数量"> 
 | 
                                    <template slot-scope="scope"> 
 | 
                                        <el-input v-model="scope.row.total"></el-input> 
 | 
                                    </template> 
 | 
                                </el-table-column> 
 | 
                                <el-table-column 
 | 
                                        prop="address" 
 | 
                                        label="操作"> 
 | 
                                    <template slot-scope="scope"> 
 | 
                                        <el-button type="danger" 
 | 
                                                   size="mini" 
 | 
                                                   @click="removeItem(scope.$index, scope.row)">删除 
 | 
                                        </el-button> 
 | 
                                    </template> 
 | 
                                </el-table-column> 
 | 
                            </el-table> 
 | 
                        </el-col> 
 | 
                    </el-row> 
 | 
                </div> 
 | 
                <!-- 套餐绑定产品end --> 
 | 
  
 | 
                <!-- 卡项绑定产品 --> 
 | 
                <div class="mixSearchBox" v-if="form.goodType=='充值卡'"> 
 | 
                    <p class="el-big-title">卡项产品权益<code>(设置此卡项可以消费的产品范围)</code></p> 
 | 
  
 | 
                    <el-row> 
 | 
                        <el-col :span="5"> 
 | 
                            <h4>按分类设置</h4> 
 | 
                            <el-tree 
 | 
                                    :data="shoppingGoodscategoryTreeData" 
 | 
                                    :default-checked-keys="defaultCates" 
 | 
                                    ref="tree" 
 | 
                                    :default-expand-all="true" 
 | 
                                    show-checkbox 
 | 
                                    node-key="id" 
 | 
                                    :props="defaultProps"> 
 | 
                            </el-tree> 
 | 
                        </el-col> 
 | 
                        <el-col :offset="2" :span="17"> 
 | 
                            <div class="listenDiv"> 
 | 
                            <!-- 搜索框 --> 
 | 
                            <el-input class="searchInput" @input="searchCardGoods()" v-model="queryKey_card" 
 | 
                                      placeholder="搜索添加商品"></el-input> 
 | 
                            <el-button icon="el-icon-search" type="primary" @click="searchCardGoods()">搜索</el-button> 
 | 
                            <div class="searchResultTable" v-show="showSearchTable_card"> 
 | 
                                <!-- 搜索加载数据表格 --> 
 | 
                                <el-table 
 | 
                                        v-loading="loading_taocan" 
 | 
                                        element-loading-text="拼命加载中" 
 | 
                                        element-loading-spinner="el-icon-loading" 
 | 
                                        element-loading-background="rgba(0, 0, 0, 0.8)" 
 | 
                                        :max-height="400" 
 | 
                                        :data="searchTableData_card" 
 | 
                                        style="width: 100%"> 
 | 
                                    <el-table-column 
 | 
                                            prop="code" 
 | 
                                            label="产品编号" 
 | 
                                            width="100"> 
 | 
                                    </el-table-column> 
 | 
  
 | 
                                    <el-table-column 
 | 
                                            prop="name" 
 | 
                                            width="280" 
 | 
                                            label="产品名称"> 
 | 
                                    </el-table-column> 
 | 
  
 | 
                                    <el-table-column 
 | 
                                            prop="sealPice" 
 | 
                                            label="售价"> 
 | 
                                    </el-table-column> 
 | 
                                    <el-table-column 
 | 
                                            prop="goodType" 
 | 
                                            label="类型"> 
 | 
                                    </el-table-column> 
 | 
                                    <el-table-column 
 | 
                                            prop="cateName" 
 | 
                                            label="分类"> 
 | 
                                    </el-table-column> 
 | 
                                    <el-table-column 
 | 
                                            prop="address" 
 | 
                                            label="操作"> 
 | 
                                        <template slot-scope="scope"> 
 | 
                                            <el-button type="primary" 
 | 
                                                       size="mini" 
 | 
                                                       @click="handleEdit_card(scope.$index, scope.row)">选择 
 | 
                                            </el-button> 
 | 
                                        </template> 
 | 
                                    </el-table-column> 
 | 
                                </el-table> 
 | 
                            </div> 
 | 
                            </div> 
 | 
  
 | 
                            <el-row class="mt-20 mb-20"> 
 | 
                                <el-col :span="20"> 
 | 
                                    <el-table 
 | 
                                            border 
 | 
                                            :height="500" 
 | 
                                            :data="form.cardAssembles" 
 | 
                                            style="width: 100%"> 
 | 
                                        <el-table-column 
 | 
                                                type="index" 
 | 
                                                width="50"> 
 | 
                                        </el-table-column> 
 | 
                                        <el-table-column 
 | 
                                                prop="shoppingGoods.code" 
 | 
                                                label="产品编号" 
 | 
                                                width="100"> 
 | 
                                        </el-table-column> 
 | 
  
 | 
                                        <el-table-column 
 | 
                                                prop="shoppingGoods.name" 
 | 
                                                width="280" 
 | 
                                                label="产品名称"> 
 | 
                                        </el-table-column> 
 | 
                                        <el-table-column 
 | 
                                                prop="shoppingGoods.cateName" 
 | 
                                                width="280" 
 | 
                                                label="商品分类"> 
 | 
                                        </el-table-column> 
 | 
                                        <el-table-column 
 | 
                                                prop="address" 
 | 
                                                label="操作"> 
 | 
                                            <template slot-scope="scope"> 
 | 
                                                <el-button type="danger" 
 | 
                                                           size="mini" 
 | 
                                                           @click="removeItem_card(scope.$index, scope.row)">删除 
 | 
                                                </el-button> 
 | 
                                            </template> 
 | 
                                        </el-table-column> 
 | 
                                    </el-table> 
 | 
                                </el-col> 
 | 
                            </el-row> 
 | 
                        </el-col> 
 | 
                    </el-row> 
 | 
  
 | 
  
 | 
                </div> 
 | 
                <!-- 卡项绑定产品end --> 
 | 
  
 | 
  
 | 
                <!-- 综合卡绑定产品 --> 
 | 
                <div class="mixSearchBox" v-if="form.goodType=='综合卡'"> 
 | 
                    <p class="el-big-title">综合卡<code>(综合卡绑定的产品)</code></p> 
 | 
  
 | 
                    <el-row> 
 | 
                        <el-col :span="17"> 
 | 
                            <div class="listenDiv"> 
 | 
                            <!-- 搜索框 --> 
 | 
                            <el-input class="searchInput" @input="searchZhkGoods()" v-model="queryKey_zhk" 
 | 
                                      placeholder="搜索添加商品"></el-input> 
 | 
                            <el-button icon="el-icon-search" type="primary" @click="searchZhkGoods()">搜索</el-button> 
 | 
                            <div class="searchResultTable" v-show="showSearchTable_zhk"> 
 | 
                                <!-- 搜索加载数据表格 --> 
 | 
                                <el-table 
 | 
                                        v-loading="loading_zhk" 
 | 
                                        element-loading-text="拼命加载中" 
 | 
                                        element-loading-spinner="el-icon-loading" 
 | 
                                        element-loading-background="rgba(0, 0, 0, 0.8)" 
 | 
                                        :max-height="400" 
 | 
                                        :data="searchTableData_zhk" 
 | 
                                        style="width: 100%"> 
 | 
                                    <el-table-column 
 | 
                                            prop="code" 
 | 
                                            label="产品编号" 
 | 
                                            width="100"> 
 | 
                                    </el-table-column> 
 | 
  
 | 
                                    <el-table-column 
 | 
                                            prop="name" 
 | 
                                            width="280" 
 | 
                                            label="产品名称"> 
 | 
                                    </el-table-column> 
 | 
  
 | 
                                    <el-table-column 
 | 
                                            prop="sealPice" 
 | 
                                            label="售价"> 
 | 
                                    </el-table-column> 
 | 
                                    <el-table-column 
 | 
                                            prop="goodType" 
 | 
                                            label="类型"> 
 | 
                                    </el-table-column> 
 | 
                                    <el-table-column 
 | 
                                            prop="cateName" 
 | 
                                            label="分类"> 
 | 
                                    </el-table-column> 
 | 
                                    <el-table-column 
 | 
                                            prop="address" 
 | 
                                            label="操作"> 
 | 
                                        <template slot-scope="scope"> 
 | 
                                            <el-button type="primary" 
 | 
                                                       size="mini" 
 | 
                                                       @click="handleEdit_zhk(scope.$index, scope.row)">选择 
 | 
                                            </el-button> 
 | 
                                        </template> 
 | 
                                    </el-table-column> 
 | 
                                </el-table> 
 | 
                            </div> 
 | 
                            </div> 
 | 
                            <el-row class="mt-20 mb-20"> 
 | 
                                <el-col :span="20"> 
 | 
                                    <el-table 
 | 
                                            border 
 | 
                                            :height="500" 
 | 
                                            :data="form.assembleGoods" 
 | 
                                            style="width: 100%"> 
 | 
                                        <el-table-column 
 | 
                                                type="index" 
 | 
                                                width="50"> 
 | 
                                        </el-table-column> 
 | 
                                        <el-table-column 
 | 
                                                prop="shoppingGoods.code" 
 | 
                                                label="产品编号" 
 | 
                                                width="100"> 
 | 
                                        </el-table-column> 
 | 
  
 | 
                                        <el-table-column 
 | 
                                                prop="shoppingGoods.name" 
 | 
                                                width="280" 
 | 
                                                label="产品名称"> 
 | 
                                        </el-table-column> 
 | 
                                        <el-table-column 
 | 
                                                prop="shoppingGoods.cateName" 
 | 
                                                width="280" 
 | 
                                                label="商品分类"> 
 | 
                                        </el-table-column> 
 | 
                                        <el-table-column 
 | 
                                                label="产品数量"> 
 | 
                                            <template slot-scope="scope"> 
 | 
                                                <el-input v-model="scope.row.total"></el-input> 
 | 
                                            </template> 
 | 
                                        </el-table-column> 
 | 
                                        <el-table-column 
 | 
                                                prop="address" 
 | 
                                                label="操作"> 
 | 
                                            <template slot-scope="scope"> 
 | 
                                                <el-button type="danger" 
 | 
                                                           size="mini" 
 | 
                                                           @click="removeItem(scope.$index, scope.row)">删除 
 | 
                                                </el-button> 
 | 
                                            </template> 
 | 
                                        </el-table-column> 
 | 
                                    </el-table> 
 | 
                                </el-col> 
 | 
                            </el-row> 
 | 
                        </el-col> 
 | 
                    </el-row> 
 | 
  
 | 
  
 | 
                </div> 
 | 
                <!-- 综合卡绑定产品end --> 
 | 
  
 | 
  
 | 
            </el-tab-pane> 
 | 
            <el-tab-pane label="描述设置" name="tab3"> 
 | 
  
 | 
                <p class="el-big-title">产品图片</p> 
 | 
                <el-row class="mb-20"> 
 | 
                    <el-col :span="20"> 
 | 
                        <el-upload 
 | 
                                action="/admin/multipleUploadFile/doUpload" 
 | 
                                :file-list="fileList" 
 | 
                                list-type="picture-card" 
 | 
                                :on-preview="handlePictureCardPreview" 
 | 
                                :on-remove="handleRemove" 
 | 
                                :on-success="handleUploadSuccess" 
 | 
                        > 
 | 
                            <i class="el-icon-plus"></i> 
 | 
                        </el-upload> 
 | 
                        <el-dialog :visible.sync="dialogVisible"> 
 | 
                            <img width="100%" :src="dialogImageUrl" alt=""> 
 | 
                        </el-dialog> 
 | 
                    </el-col> 
 | 
                </el-row> 
 | 
  
 | 
  
 | 
                <p class="el-big-title">商品详情</p> 
 | 
                <script style="width: 100%; height: 500px" id="description" name="description" 
 | 
                        type="text/plain"></script> 
 | 
  
 | 
            </el-tab-pane> 
 | 
            <el-tab-pane label="高级设置" name="tab4"> 
 | 
  
 | 
                <el-row> 
 | 
                    <el-col :span="10"> 
 | 
                        <el-form-item label="最大销售数量"> 
 | 
                            <el-input v-model="form.carMaxSaleCount"></el-input> 
 | 
                        </el-form-item> 
 | 
                    </el-col> 
 | 
                    <el-col :offset="2" :span="10"> 
 | 
                        <el-form-item label="每人限购次数"> 
 | 
                            <el-input v-model="form.isOnce"></el-input> 
 | 
                        </el-form-item> 
 | 
                    </el-col> 
 | 
                </el-row> 
 | 
                <el-row> 
 | 
                    <el-col :span="10"> 
 | 
                        <el-form-item label="自动下架时间"> 
 | 
                            <el-date-picker 
 | 
                                    v-model="form.saleOffTime" 
 | 
                                    type="date" 
 | 
                                    placeholder="选择日期"> 
 | 
                            </el-date-picker> 
 | 
                        </el-form-item> 
 | 
                    </el-col> 
 | 
                </el-row> 
 | 
                <el-row v-if="form.goodType!='家居产品'"> 
 | 
                    <el-form-item label="购买有效期"> 
 | 
                        <el-col  :span="4"> 
 | 
                            <el-form-item label="" prop="isNum"> 
 | 
                                <el-input v-model.number="form.buyDateNum"></el-input> 
 | 
                            </el-form-item> 
 | 
                        </el-col> 
 | 
                        <el-col :span="2"> 
 | 
                            <el-form-item lable=""> 
 | 
                                <el-select v-model="form.buyDateUnit" placeholder="请选择"> 
 | 
                                    <el-option 
 | 
                                            v-for="item in dateList" 
 | 
                                            :key="item.value" 
 | 
                                            :label="item.label" 
 | 
                                            :value="item.value"> 
 | 
                                    </el-option> 
 | 
                                </el-select> 
 | 
                            </el-form-item> 
 | 
                        </el-col> 
 | 
                        <el-col :span="6" style="margin-left: 10px; color: #C0C4CC;"> 
 | 
                            <span>用户从购买日开始计算多长时间自动失效</span> 
 | 
                        </el-col> 
 | 
                    </el-form-item> 
 | 
                </el-row> 
 | 
                <el-row v-if="form.goodType!='家居产品'"> 
 | 
                    <el-form-item label="消耗有效期"> 
 | 
                        <el-col  :span="4"> 
 | 
                            <el-form-item label="" prop="isNum"> 
 | 
                                <el-input v-model.number="form.useDateNum"></el-input> 
 | 
                            </el-form-item> 
 | 
                        </el-col> 
 | 
                        <el-col  :span="2"> 
 | 
                            <el-select v-model="form.useDateUnit" placeholder="请选择"> 
 | 
                                <el-option 
 | 
                                        v-for="item in dateList" 
 | 
                                        :key="item.value" 
 | 
                                        :label="item.label" 
 | 
                                        :value="item.value"> 
 | 
                                </el-option> 
 | 
                            </el-select> 
 | 
                        </el-col> 
 | 
                        <el-col :span="6" style="margin-left: 10px; color: #C0C4CC;"> 
 | 
                            <span>用户从第一次使用后开始计算多长时间自动生效</span> 
 | 
                        </el-col> 
 | 
                    </el-form-item> 
 | 
                </el-row> 
 | 
                <el-row v-if="form.goodType!='家居产品'"> 
 | 
                    <el-form-item label="统一到期时间"> 
 | 
                        <el-col :span="6"> 
 | 
                            <el-date-picker 
 | 
                                    v-model="form.invalidTime" 
 | 
                                    type="date" 
 | 
                                    placeholder="选择日期"> 
 | 
                            </el-date-picker> 
 | 
                        </el-col> 
 | 
                        <el-col :span="10" style="margin-left: 10px; color: #C0C4CC;"> 
 | 
                            <span>在指定日期所有购买过本商品的统一失效,且在统一失效时间之后产品会自动下架</span> 
 | 
                        </el-col> 
 | 
                    </el-form-item> 
 | 
                </el-row> 
 | 
                <p class="el-big-title">支付方式</p> 
 | 
                <el-row> 
 | 
                    <el-col :offset="1"> 
 | 
                        <el-checkbox-group v-model="payMethodList"> 
 | 
                            <el-checkbox label="1">充值本金</el-checkbox> 
 | 
                            <el-checkbox label="2">赠送金额</el-checkbox> 
 | 
                            <el-checkbox label="3">积分</el-checkbox> 
 | 
                        </el-checkbox-group> 
 | 
                    </el-col> 
 | 
                </el-row> 
 | 
                <el-row v-if="shopInfo.shopType==1"> 
 | 
                    <el-col :span="10"> 
 | 
                        <p class="el-big-title">产品可用门店<code>不选默认为所有门店可用</code></p> 
 | 
                        <el-select :multiple="true"  v-model="form.useShop" > 
 | 
                            <el-option 
 | 
                                    v-for="item in shopList" 
 | 
                                    :key="item.id" 
 | 
                                    :label="item.shopName" 
 | 
                                    :value="item.id"> 
 | 
                            </el-option> 
 | 
                        </el-select> 
 | 
                    </el-col> 
 | 
                </el-row> 
 | 
            </el-tab-pane> 
 | 
        </el-tabs> 
 | 
        <el-form-item class="foot_bar"> 
 | 
            <el-button :loading="submiting" type="primary" @click="submitForm('form')" v-if="albleEdit" >保存</el-button> 
 | 
            <el-button @click="closeFram()">关闭</el-button> 
 | 
        </el-form-item> 
 | 
    </el-form> 
 | 
</div> 
 | 
</body> 
 | 
<script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script> 
 | 
<script type="text/javascript" th:src="@{/js/plugin/jquery.query.js}"></script> 
 | 
<script type="text/javascript" th:src="@{/js/systools/AjaxProxyVue.js}"></script> 
 | 
<script type="text/javascript" th:src="@{/js/plugin/vue.js}"></script> 
 | 
<script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script> 
 | 
<script src="https://cdn.jsdelivr.net/npm/@riophae/vue-treeselect@^0.4.0/dist/vue-treeselect.umd.min.js"></script> 
 | 
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@riophae/vue-treeselect@^0.4.0/dist/vue-treeselect.min.css"> 
 | 
  
 | 
  
 | 
<script> 
 | 
    var id = $.query.get("id"); 
 | 
    var goodType = $.query.get("goodType"); 
 | 
  
 | 
    //百度编辑器 
 | 
    var ue = {}; 
 | 
    //校验方法 
 | 
    var ValidatorFactory = { 
 | 
        validateUseCount: function (rule, value, callback) { 
 | 
  
 | 
  
 | 
        } 
 | 
    }; 
 | 
  
 | 
    Vue.component('ValidatorFactory', ValidatorFactory); 
 | 
    Vue.component('treeselect', VueTreeselect.Treeselect) 
 | 
  
 | 
    var app = new Vue({ 
 | 
        el: '#app', 
 | 
        data: { 
 | 
            payMethodList : ['1', '2', '3'], 
 | 
            dateList : [{value : 'Y', label : '年'}, {value : 'M', label : '月'}, { value : 'D' , label : '日' }], 
 | 
            selectTreeParam: { 
 | 
                holder: '请选择商品类型', 
 | 
                treeData: [], 
 | 
                defaultCheckedKeys: [], 
 | 
                nodeKey: 'id', 
 | 
                defaultProps: { 
 | 
                    children: 'children', 
 | 
                    label: 'name' 
 | 
                }, 
 | 
            }, 
 | 
            //是否可以编辑 
 | 
            albleEdit:true, 
 | 
            //当前门店信息 
 | 
            shopInfo: {}, 
 | 
            //所有非总部门店列表 
 | 
            shopList:[], 
 | 
  
 | 
            /*****项目表格数据*********/ 
 | 
            //搜索关键词 
 | 
            queryKey: '', 
 | 
            //是否展示搜索表格 
 | 
            showSearchTable: false, 
 | 
            //搜索表格数据 
 | 
            searchTableData: [], 
 | 
            //表格加载效果 
 | 
            loading: false, 
 | 
            /******项目表格数据END********/ 
 | 
  
 | 
  
 | 
            /******套餐表格数据********/ 
 | 
            //搜索关键词 
 | 
            queryKey_taocan: '', 
 | 
            //是否展示搜索表格 
 | 
            showSearchTable_taocan: false, 
 | 
            //搜索表格数据 
 | 
            searchTableData_taocan: [], 
 | 
            //表格加载效果 
 | 
            loading_taocan: false, 
 | 
            /******套餐表格数据END********/ 
 | 
  
 | 
            /******套餐家居产品表格数据********/ 
 | 
            //搜索关键词 
 | 
            queryKey_jjcp: '', 
 | 
            //是否展示搜索表格 
 | 
            showSearchTable_jjcp: false, 
 | 
            //搜索表格数据 
 | 
            searchTableData_jjcp: [], 
 | 
            //表格加载效果 
 | 
            loading_jjcp: false, 
 | 
            /******套餐家居产品表格数据END********/ 
 | 
  
 | 
            /******充值卡产品表格数据********/ 
 | 
            //搜索关键词 
 | 
            queryKey_card: '', 
 | 
            //是否展示搜索表格 
 | 
            showSearchTable_card: false, 
 | 
            //搜索表格数据 
 | 
            searchTableData_card: [], 
 | 
            //表格加载效果 
 | 
            loading_card: false, 
 | 
            /******充值卡表格数据END********/ 
 | 
  
 | 
            /******综合卡产品表格数据********/ 
 | 
            //搜索关键词 
 | 
            queryKey_zhk: '', 
 | 
            //是否展示搜索表格 
 | 
            showSearchTable_zhk: false, 
 | 
            //搜索表格数据 
 | 
            searchTableData_zhk: [], 
 | 
            //表格加载效果 
 | 
            loading_zhk: false, 
 | 
            /******综合卡表格数据END********/ 
 | 
  
 | 
  
 | 
  
 | 
            //默认充值卡选中项 
 | 
            defaultCates: [], 
 | 
  
 | 
            //是否提交完 
 | 
            submiting: false, 
 | 
  
 | 
            activeName: 'tab1', 
 | 
            //充值卡树形展示商品分类 
 | 
            shoppingGoodscategoryTreeData: [], 
 | 
            defaultProps: { 
 | 
                children: 'children', 
 | 
                label: 'name' 
 | 
            }, 
 | 
  
 | 
  
 | 
            //库存分类 
 | 
            goodsTypsTreeData: [], 
 | 
            //单位数据字典 
 | 
            unitList: [], 
 | 
            //容量数据字典 
 | 
            measureList: [], 
 | 
            //往来单位列表 
 | 
            supplierList: [], 
 | 
  
 | 
            //产品主图上传相关变量 
 | 
            dialogImageUrl: '', 
 | 
            dialogVisible: false, 
 | 
            fileList: [{}], 
 | 
  
 | 
            //表单数据 
 | 
            form: { 
 | 
                isPresent: '否', 
 | 
                staus: '上架', 
 | 
                //产品组合 
 | 
                assembleGoods: [], 
 | 
                //项目组合 
 | 
                assembleProj: [], 
 | 
                //充值卡绑定 
 | 
                cardAssembles: [], 
 | 
                //充值卡绑定产品分类 
 | 
                isCourse: 'N', 
 | 
                isInfinite : 'N', 
 | 
                carIsAll: '否', 
 | 
                useDateNum : '', 
 | 
                buyDateNum : '', 
 | 
                payMethods : '', 
 | 
            }, 
 | 
            submitUrl: '/admin/shoppinggoods/addShoppingGoods', 
 | 
            modifySubmitUrl: '/admin/shoppinggoods/modifyShoppingGoods', 
 | 
            //校验规则 
 | 
            rules: { 
 | 
                name: [{required: true, message: '请输入商品名称', trigger: 'blur'}], 
 | 
                code: [{required: true, message: '请输入商品编码', trigger: 'blur'}], 
 | 
                cateId: [{required: true, message: '请选择商品分类', trigger: 'blur'}], 
 | 
                goodsSortId: [{required: true, message: '请选择库存分类', trigger: 'blur'}], 
 | 
                unit: [{required: true, message: '请填写规格', trigger: 'change'}], 
 | 
                volume: [{required: true, message: '请填写容量', trigger: 'blur'}], 
 | 
                measure: [{required: true, message: '请填写单位', trigger: 'change'}], 
 | 
                isCourse: [{required: true, message: '请选择套餐类型', trigger: 'change'}], 
 | 
                sealPice: [{required: true, message: '请填写售价', trigger: 'blur'}], 
 | 
                timeLength: [{required: true, message: '请填写服务时长', trigger: 'blur'}], 
 | 
                isNum : [{ type : 'number', message: '请输入数字', trigger: 'blur' }], 
 | 
            }, 
 | 
  
 | 
        }, 
 | 
  
 | 
        /** 
 | 
         * 初始化数据表 
 | 
         */ 
 | 
        created: function () { 
 | 
            let _this = this; 
 | 
            this.getShoppinggoodscategory(); 
 | 
            this.getGoodstype(); 
 | 
            this.getDictionary(); 
 | 
            this.getShopInfo(); 
 | 
            if(goodType=='家居产品'){ 
 | 
                this.getSupplierList(); 
 | 
            } 
 | 
            //初始化编辑器 
 | 
            ue = UE.getEditor('description'); 
 | 
            if (id) { 
 | 
                ue.ready(function () { 
 | 
                    //加载产品信息 
 | 
                    _this.loadShoppingGoodsInfo(id); 
 | 
                }) 
 | 
                //修改提交地址 
 | 
                this.submitUrl = this.modifySubmitUrl; 
 | 
            } else { 
 | 
                this.form.goodType = goodType; 
 | 
            } 
 | 
        }, 
 | 
  
 | 
        methods: { 
 | 
  
 | 
            /** 
 | 
             * 商品分类树形组件格式化 
 | 
             */ 
 | 
            normalizer(node) { 
 | 
                return { 
 | 
                    id: node.id, 
 | 
                    label: node.name, 
 | 
                    children: node.children, 
 | 
                } 
 | 
            }, 
 | 
  
 | 
            /** 
 | 
             * 库存分类树形组件格式化 
 | 
             */ 
 | 
            normalizerGoodsTyps(node) { 
 | 
                return { 
 | 
                    id: node.id, 
 | 
                    label: node.typeName, 
 | 
                    children: node.children, 
 | 
                } 
 | 
            }, 
 | 
  
 | 
  
 | 
            /** 
 | 
             * 搜索套餐绑定的项目信息 
 | 
             * */ 
 | 
            searchProjInfo() { 
 | 
                let _this = this; 
 | 
                if (this.queryKey_taocan && this.queryKey_taocan.trim().length > 0) { 
 | 
                    this.showSearchTable_taocan = true; 
 | 
                    this.loading_taocan = true; 
 | 
                    AjaxProxy.requst({ 
 | 
                        app: _this, 
 | 
                        contentType: 'application/x-www-form-urlencoded', 
 | 
                        data: {name: _this.queryKey_taocan, goodType: '项目',limit:10000}, 
 | 
                        url: basePath + "/admin/shoppinggoods/showList", 
 | 
                        callback: function (data) { 
 | 
                            _this.searchTableData_taocan = data.rows; 
 | 
                            _this.loading_taocan = false; 
 | 
                        } 
 | 
                    }); 
 | 
                } else { 
 | 
                    this.showSearchTable_taocan = false; 
 | 
                } 
 | 
            }, 
 | 
  
 | 
            /** 
 | 
             * 搜索套餐绑定的项目信息 
 | 
             * */ 
 | 
            searchJJGoods() { 
 | 
                let _this = this; 
 | 
                if (this.queryKey_jjcp && this.queryKey_jjcp.trim().length > 0) { 
 | 
                    this.showSearchTable_jjcp = true; 
 | 
                    this.loading_jjcp = true; 
 | 
                    AjaxProxy.requst({ 
 | 
                        app: _this, 
 | 
                        contentType: 'application/x-www-form-urlencoded', 
 | 
                        data: {name: _this.queryKey_jjcp, goodType: '家居产品',limit:10000}, 
 | 
                        url: basePath + "/admin/shoppinggoods/showList", 
 | 
                        callback: function (data) { 
 | 
                            _this.searchTableData_jjcp = data.rows; 
 | 
                            _this.loading_jjcp = false; 
 | 
                        } 
 | 
                    }); 
 | 
                } else { 
 | 
                    this.showSearchTable_jjcp = false; 
 | 
                } 
 | 
            }, 
 | 
            /** 
 | 
             * 搜索综合卡绑定的项目信息 
 | 
             * */ 
 | 
            searchZhkGoods() { 
 | 
                let _this = this; 
 | 
                if (this.queryKey_zhk && this.queryKey_zhk.trim().length > 0) { 
 | 
                    this.showSearchTable_zhk = true; 
 | 
                    this.loading_zhk = true; 
 | 
                    AjaxProxy.requst({ 
 | 
                        app: _this, 
 | 
                        contentType: 'application/x-www-form-urlencoded', 
 | 
                        data: {name: _this.queryKey_zhk,queryNoGoodsype:'综合卡',limit:10000}, 
 | 
                        url: basePath + "/admin/shoppinggoods/showList", 
 | 
                        callback: function (data) { 
 | 
                            _this.searchTableData_zhk = data.rows; 
 | 
                            _this.loading_zhk = false; 
 | 
                        } 
 | 
                    }); 
 | 
                } else { 
 | 
                    this.showSearchTable_zhk = false; 
 | 
                } 
 | 
            }, 
 | 
  
 | 
            /** 
 | 
             * 选择套餐产品 
 | 
             * */ 
 | 
            handleEdit_jjcp(index, row) { 
 | 
                let assembleGoods = this.form.assembleGoods; 
 | 
                if (!assembleGoods) { 
 | 
                    assembleGoods = new Array(); 
 | 
                    this.form.assembleGoods = assembleGoods; 
 | 
                } 
 | 
                //是否已经被选择了 
 | 
                let selected = false; 
 | 
                this.form.assembleGoods.forEach(item => { 
 | 
                    if (item.shoppingGoods.id == row.id) { 
 | 
                        selected = true; 
 | 
                        return; 
 | 
                    } 
 | 
                }); 
 | 
                if (!selected) { 
 | 
                    this.form.assembleGoods.push({ 
 | 
                        assembleGoodId: row.id, 
 | 
                        total: 1, 
 | 
                        shoppingGoods: row 
 | 
                    }); 
 | 
                } 
 | 
                // this.showSearchTable_jjcp = false; 
 | 
            }, 
 | 
            /** 
 | 
             * 选择综合卡产品 
 | 
             * */ 
 | 
            handleEdit_zhk(index, row) { 
 | 
                let assembleGoods = this.form.assembleGoods; 
 | 
                if (!assembleGoods) { 
 | 
                    assembleGoods = new Array(); 
 | 
                    this.form.assembleGoods = assembleGoods; 
 | 
                } 
 | 
                //是否已经被选择了 
 | 
                let selected = false; 
 | 
                this.form.assembleGoods.forEach(item => { 
 | 
                    if (item.shoppingGoods.id == row.id) { 
 | 
                        selected = true; 
 | 
                        return; 
 | 
                    } 
 | 
                }); 
 | 
                if (!selected) { 
 | 
                    this.form.assembleGoods.push({ 
 | 
                        assembleGoodId: row.id, 
 | 
                        total: 1, 
 | 
                        shoppingGoods: row 
 | 
                    }); 
 | 
                } 
 | 
                // this.showSearchTable_zhk = false; 
 | 
            }, 
 | 
  
 | 
  
 | 
            /** 
 | 
             * 搜索项目绑定的产品信息 
 | 
             */ 
 | 
            searchGoods() { 
 | 
                let _this = this; 
 | 
                if (this.queryKey && this.queryKey.trim().length > 0) { 
 | 
                    this.showSearchTable = true; 
 | 
                    this.loading = true; 
 | 
                    AjaxProxy.requst({ 
 | 
                        app: _this, 
 | 
                        contentType: 'application/x-www-form-urlencoded', 
 | 
                        data: {name: _this.queryKey, goodType: '家居产品',limit:10000}, 
 | 
                        url: basePath + "/admin/shoppinggoods/showList", 
 | 
                        callback: function (data) { 
 | 
                            _this.searchTableData = data.rows; 
 | 
                            _this.loading = false; 
 | 
                        } 
 | 
                    }); 
 | 
                } else { 
 | 
                    this.showSearchTable = false; 
 | 
                } 
 | 
            }, 
 | 
  
 | 
  
 | 
            /** 
 | 
             * 搜索套餐绑定的项目信息 
 | 
             * */ 
 | 
            searchCardGoods() { 
 | 
                let _this = this; 
 | 
                if (this.queryKey_card && this.queryKey_card.trim().length > 0) { 
 | 
                    this.showSearchTable_card = true; 
 | 
                    this.loading_card = true; 
 | 
                    AjaxProxy.requst({ 
 | 
                        app: _this, 
 | 
                        contentType: 'application/x-www-form-urlencoded', 
 | 
                        data: {name: _this.queryKey_card, limit: 10000}, 
 | 
                        url: basePath + "/admin/shoppinggoods/showList", 
 | 
                        callback: function (data) { 
 | 
                            _this.searchTableData_card = data.rows; 
 | 
                            _this.loading_card = false; 
 | 
                        } 
 | 
                    }); 
 | 
                } else { 
 | 
                    this.showSearchTable_card = false; 
 | 
                } 
 | 
            }, 
 | 
  
 | 
            /** 
 | 
             * 选择充值卡产品 
 | 
             * */ 
 | 
            handleEdit_card(index, row) { 
 | 
  
 | 
                let cardAssembles = this.form.cardAssembles; 
 | 
                if (!cardAssembles) { 
 | 
                    cardAssembles = new Array(); 
 | 
                    this.form.cardAssembles = cardAssembles; 
 | 
                } 
 | 
                //是否已经被选择了 
 | 
                let selected = false; 
 | 
                cardAssembles.forEach(item => { 
 | 
                    if (item.goodsId == row.id) { 
 | 
                        selected = true; 
 | 
                        return; 
 | 
                    } 
 | 
                }); 
 | 
                if (!selected) { 
 | 
                    this.form.cardAssembles.push({ 
 | 
                        goodsId: row.id, 
 | 
                        shoppingGoods: row, 
 | 
                        type: '商品' 
 | 
                    }); 
 | 
                } 
 | 
                // this.showSearchTable_card = false; 
 | 
            }, 
 | 
  
 | 
  
 | 
            /** 
 | 
             * 删除组合产品 
 | 
             */ 
 | 
            removeItem_card(index, row) { 
 | 
                this.form.cardAssembles.splice(index, 1); 
 | 
            }, 
 | 
  
 | 
            /** 
 | 
             * 删除组合产品 
 | 
             */ 
 | 
            removeItem(index, row) { 
 | 
                this.form.assembleGoods.splice(index, 1); 
 | 
            }, 
 | 
            /** 
 | 
             * 删除套餐绑定项目 
 | 
             */ 
 | 
            removeItem_taocan(index, row) { 
 | 
                this.form.assembleProj.splice(index, 1); 
 | 
            }, 
 | 
  
 | 
            /** 
 | 
             * 项目选择家居产品 
 | 
             * */ 
 | 
            handleEdit(index, row) { 
 | 
                let assembleGoods = this.form.assembleGoods; 
 | 
                if (!assembleGoods) { 
 | 
                    assembleGoods = new Array(); 
 | 
                    this.form.assembleGoods = assembleGoods; 
 | 
                } 
 | 
                //是否已经被选择了 
 | 
                let selected = false; 
 | 
                this.form.assembleGoods.forEach(item => { 
 | 
                    if (item.shoppingGoods.id == row.id) { 
 | 
                        selected = true; 
 | 
                        return; 
 | 
                    } 
 | 
                }); 
 | 
                if (!selected) { 
 | 
                    this.form.assembleGoods.push({ 
 | 
                        total: 1, 
 | 
                        assembleGoodId: row.id, 
 | 
                        shoppingGoods: row 
 | 
                    }); 
 | 
                } 
 | 
                // this.showSearchTable = false; 
 | 
  
 | 
            }, 
 | 
            //点击多选 
 | 
            handleSelectionChange(val){ 
 | 
                this.multipleSelection = val; 
 | 
            }, 
 | 
            closeXm(){ 
 | 
                this.showSearchTable = false; 
 | 
            }, 
 | 
            //确认多选 
 | 
            chouseGoods(){ 
 | 
                let assembleGoods = this.form.assembleGoods; 
 | 
                if (!assembleGoods) { 
 | 
                    assembleGoods = new Array(); 
 | 
                    this.form.assembleGoods = assembleGoods; 
 | 
                } 
 | 
  
 | 
                for(let i=0;i<this.multipleSelection.length;i++){ 
 | 
                    var row=this.multipleSelection[i]; 
 | 
                    //是否已经被选择了 
 | 
                    let selected = false; 
 | 
                    this.form.assembleGoods.forEach(item => { 
 | 
                        if (item.shoppingGoods.id == row.id) { 
 | 
                            selected = true; 
 | 
                            return; 
 | 
                        } 
 | 
                    }); 
 | 
                    if (!selected) { 
 | 
                        this.form.assembleGoods.push({ 
 | 
                            total: 1, 
 | 
                            assembleGoodId: row.id, 
 | 
                            shoppingGoods: row 
 | 
                        }); 
 | 
                    } 
 | 
                } 
 | 
                this.showSearchTable = false; 
 | 
            }, 
 | 
  
 | 
  
 | 
            /** 
 | 
             * 套餐选择产品 
 | 
             * */ 
 | 
            handleEdit_taocan(index, row) { 
 | 
                let assembleProj = this.form.assembleProj; 
 | 
                if (!assembleProj) { 
 | 
                    assembleProj = new Array(); 
 | 
                    this.form.assembleProj = assembleProj; 
 | 
                } 
 | 
                //是否已经被选择了 
 | 
                let selected = false; 
 | 
                this.form.assembleProj.forEach(item => { 
 | 
                    if (item.shoppingGoods.id == row.id) { 
 | 
                        selected = true; 
 | 
                        return; 
 | 
                    } 
 | 
                }); 
 | 
                if (!selected) { 
 | 
                    //设置默认值 
 | 
                    this.form.assembleProj.push({ 
 | 
                        total: 1, 
 | 
                        deductionNum: 1, 
 | 
                        price: row.sealPice, 
 | 
                        assembleGoodId: row.id, 
 | 
                        shoppingGoods: row 
 | 
                    }); 
 | 
                } 
 | 
                // this.showSearchTable_taocan = false; 
 | 
            }, 
 | 
  
 | 
  
 | 
            handleClick(tab, event) { 
 | 
                console.log(tab, event); 
 | 
            }, 
 | 
  
 | 
            /** 
 | 
             * 提交表单 
 | 
             * */ 
 | 
            submitForm(formName) { 
 | 
                this.submiting = true; 
 | 
  
 | 
                let _this = this; 
 | 
  
 | 
                if (this.fileList.length > 0) { 
 | 
                    this.form.img = this.fileList[0].url; 
 | 
                } 
 | 
  
 | 
                this.form.description = ue.getContent(); 
 | 
  
 | 
                if (_this.form.goodType == '充值卡') { 
 | 
                    //获取充值卡绑定的分类 
 | 
                    this.buildCardAssembleCates(); 
 | 
                } 
 | 
                if(_this.form.useShop){ 
 | 
                    _this.form.useShop=_this.form.useShop.join(","); 
 | 
                } 
 | 
  
 | 
                if (_this.payMethodList.length != 0) { 
 | 
                    _this.form.payMethods = this.payMethodList.join(","); 
 | 
                } else { 
 | 
                    _this.form.payMethods = ''; 
 | 
                } 
 | 
  
 | 
                if (this.validFormData()) { 
 | 
  
 | 
                    this.$refs[formName].validate((valid) => { 
 | 
  
 | 
                        if (valid) { 
 | 
  
 | 
  
 | 
                            if ( _this.form.goodType == '套餐' && _this.form.isCourse == 'Y' && _this.form.isInfinite == 'N' && !_this.form.carUseCount) { 
 | 
                                this.$message.error('请输入套餐最大使用次数!'); 
 | 
                              _this.submiting = false; 
 | 
                                return false; 
 | 
                            } 
 | 
  
 | 
  
 | 
                            AjaxProxy.requst({ 
 | 
                                app: _this, 
 | 
                                data: _this.form, 
 | 
                                url: basePath + _this.submitUrl, 
 | 
                                callback: function (data) { 
 | 
                                    _this.$message({ 
 | 
                                        message: data.info, 
 | 
                                        duration: 1000, 
 | 
                                        type: 'success', 
 | 
                                        onClose: function () { 
 | 
                                            _this.submiting = false; 
 | 
                                            _this.closeFram(); 
 | 
                                        } 
 | 
                                    }); 
 | 
                                    parent.myGrid.serchData(); 
 | 
                                }, 
 | 
                                fail: function () { 
 | 
                                    _this.submiting = false; 
 | 
                                } 
 | 
                            }); 
 | 
                        } else { 
 | 
                            this.$message.error('提交数据有误,请核对后再提交!'); 
 | 
                            this.activeName = 'tab1'; 
 | 
                            _this.submiting = false; 
 | 
                            return false; 
 | 
                        } 
 | 
                    }); 
 | 
                } else { 
 | 
                    _this.submiting = false; 
 | 
                } 
 | 
            }, 
 | 
  
 | 
  
 | 
            /** 
 | 
             *  验证表单中的信息,这是关联验证 
 | 
             * */ 
 | 
            validFormData() { 
 | 
                let form = this.form; 
 | 
                if (form.goodType == '套餐') { 
 | 
                    if (form.assembleProj.length < 1) { 
 | 
                        this.$message.error('套餐产品至少需要绑定一个项目'); 
 | 
                        this.activeName = 'tab2'; 
 | 
                        this.submiting = false; 
 | 
                        return false; 
 | 
                    } 
 | 
                } else if (form.goodType == '充值卡' && form.carIsAll == '否') { 
 | 
                    if (form.cardAssembles.length < 1) { 
 | 
                        this.$message.error('充值卡至少绑定一个产品'); 
 | 
                        this.activeName = 'tab2'; 
 | 
                        this.submiting = false; 
 | 
                        return false; 
 | 
                    } 
 | 
                } else if (form.goodType == '综合卡') { 
 | 
                    if (form.assembleGoods.length < 1) { 
 | 
                        this.$message.error('综合卡至少绑定一个产品'); 
 | 
                        this.activeName = 'tab2'; 
 | 
                        this.submiting = false; 
 | 
                        return false; 
 | 
                    } 
 | 
                } 
 | 
                return true; 
 | 
            }, 
 | 
  
 | 
            /** 
 | 
             * 加载产品信息 
 | 
             * */ 
 | 
            loadShoppingGoodsInfo(id) { 
 | 
                let _this = this; 
 | 
                AjaxProxy.requst({ 
 | 
                    app: _this, 
 | 
                    url: basePath + '/admin/shoppinggoods/findShoppingGoods?id=' + id, 
 | 
                    callback: function (data) { 
 | 
                        _this.form = data.rows[0]; 
 | 
                        if (_this.form.description) { 
 | 
                            console.log(_this.form.description); 
 | 
                            ue.setContent(_this.form.description, true); 
 | 
                        } 
 | 
                        _this.form.useShop=MTools.strToArray(_this.form.useShop,",",true); 
 | 
                        _this.payMethodList = MTools.strToArray(_this.form.payMethods,",",false); 
 | 
                        _this.fileList[0].url = _this.form.img; 
 | 
                        _this.defaultCates = data.mapInfo.cates; 
 | 
                        _this.userAdbleEdit(); 
 | 
  
 | 
                        //如果是总产品加载总部分类信息 
 | 
                        _this.getShoppinggoodscategory(1); 
 | 
                        _this.getGoodstype(1); 
 | 
                    } 
 | 
                }); 
 | 
            }, 
 | 
  
 | 
            /** 
 | 
             * 判断用户是否可以编辑产品 
 | 
             */ 
 | 
            userAdbleEdit(){ 
 | 
                console.log(this.form.id, 
 | 
                    this.shopInfo.shopType, 
 | 
                    this.shopInfo.id, 
 | 
                    this.form.shopId) 
 | 
  
 | 
                if(this.form.id 
 | 
                    && this.shopInfo.shopType!=1 
 | 
                    && this.shopInfo.id!=this.form.shopId){ 
 | 
                            this.albleEdit=false; 
 | 
                    } 
 | 
  
 | 
            }, 
 | 
            /** 
 | 
             * 获取商品分类 
 | 
             * isZb 1 表示加载总部分类信息 
 | 
             */ 
 | 
            getShoppinggoodscategory(isZb) { 
 | 
  
 | 
                let url = '/admin/shoppinggoodscategory/all'; 
 | 
  
 | 
                let _this = this; 
 | 
  
 | 
                let shopId=null; 
 | 
                if(_this.form){ 
 | 
                    shopId=_this.form.shopId; 
 | 
                } 
 | 
                console.log("shopId",shopId); 
 | 
  
 | 
                AjaxProxy.requst({ 
 | 
                    app: _this, 
 | 
                    contentType: 'application/x-www-form-urlencoded', 
 | 
                    url: basePath +url, 
 | 
                    data:{shopId:shopId}, 
 | 
                    callback: function (data) { 
 | 
                        _this.shoppingGoodscategoryTreeData = MTools.createTreeModel(data.rows); 
 | 
                        _this.selectTreeParam.treeData = _this.shoppingGoodscategoryTreeData; 
 | 
                    } 
 | 
                }); 
 | 
            }, 
 | 
  
 | 
            /** 
 | 
             * 获取库存分类 
 | 
             * isZb 1 表示加载总部分类信息 
 | 
             */ 
 | 
            getGoodstype(isZb) { 
 | 
                let _this = this; 
 | 
                let url = '/admin/goodstype/all'; 
 | 
  
 | 
  
 | 
                let shopId=null; 
 | 
                if(_this.form){ 
 | 
                    shopId=_this.form.shopId; 
 | 
                } 
 | 
  
 | 
                AjaxProxy.requst({ 
 | 
                    app: _this, 
 | 
                    contentType: 'application/x-www-form-urlencoded', 
 | 
                    data:{shopId:shopId}, 
 | 
                    url: basePath + url, 
 | 
                    callback: function (data) { 
 | 
                        _this.goodsTypsTreeData = MTools.createTreeModel(data.rows); 
 | 
                    } 
 | 
                }); 
 | 
            }, 
 | 
            /** 
 | 
             * 获取当前门店信息 
 | 
             * */ 
 | 
            getShopInfo() { 
 | 
                let _this = this; 
 | 
                AjaxProxy.requst({ 
 | 
                    app: _this, 
 | 
                    url: basePath + '/hiveErp/shopInfo/findMyShop', 
 | 
                    callback: function (data) { 
 | 
                        _this.shopInfo = data.rows[0]; 
 | 
                        _this.userAdbleEdit(); 
 | 
  
 | 
                    } 
 | 
                }); 
 | 
                AjaxProxy.requst({ 
 | 
                    app: _this, 
 | 
                    url: basePath + '/hiveErp/shopInfo/findShops', 
 | 
                    callback: function (data) { 
 | 
                        _this.shopList = data.rows; 
 | 
                    } 
 | 
                }); 
 | 
            }, 
 | 
            /** 
 | 
             * 获取数据字典 
 | 
             */ 
 | 
            getDictionary() { 
 | 
                let _this = this; 
 | 
                AjaxProxy.requst({ 
 | 
                    app: _this, 
 | 
                    data: {type: '存货单位'}, 
 | 
                    url: basePath + '/admin/dataDictionary/v2/showDataDictionary', 
 | 
                    callback: function (data) { 
 | 
                        _this.unitList = data.rows; 
 | 
                    } 
 | 
                }); 
 | 
                AjaxProxy.requst({ 
 | 
                    app: _this, 
 | 
                    data: {type: '计量单位'}, 
 | 
                    url: basePath + '/admin/dataDictionary/v2/showDataDictionary', 
 | 
                    callback: function (data) { 
 | 
                        _this.measureList = data.rows; 
 | 
                    } 
 | 
                }); 
 | 
  
 | 
            }, 
 | 
            /** 
 | 
             * 加载往来单位 
 | 
             */ 
 | 
            getSupplierList() { 
 | 
                let _this = this; 
 | 
                AjaxProxy.requst({ 
 | 
                    app: _this, 
 | 
                    url: basePath + '/admin/supplier/all', 
 | 
                    callback: function (data) { 
 | 
                        _this.supplierList = data.rows; 
 | 
                        _this.form.supplierId = data.rows[0].id; 
 | 
                    } 
 | 
                }); 
 | 
            }, 
 | 
            /** 
 | 
             * 删除上传图片 
 | 
             */ 
 | 
            handleRemove(file, fileList) { 
 | 
                var list = this.fileList; 
 | 
                for (let i = 0; i < list.length; i++) { 
 | 
                    if (list[i].url == file.url) { 
 | 
                        list.splice(i, 1); 
 | 
                        break; 
 | 
                    } 
 | 
                } 
 | 
                this.fileList = list; 
 | 
                console.log(list); 
 | 
  
 | 
            }, 
 | 
  
 | 
            handlePictureCardPreview(file) { 
 | 
                this.dialogImageUrl = file.url; 
 | 
                this.dialogVisible = true; 
 | 
            }, 
 | 
  
 | 
            handleUploadSuccess(response, file, fileList) { 
 | 
                this.fileList.push({name: response.fileName, url: response.path}); 
 | 
                console.log(this.fileList); 
 | 
            }, 
 | 
  
 | 
            closeFram: function () { 
 | 
                parent.layer.close(parent.layer.getFrameIndex(window.name)); 
 | 
            }, 
 | 
  
 | 
            /** 
 | 
             * 把充值卡绑定分类数据修改数据结构为后台需要的结构 
 | 
             */ 
 | 
            buildCardAssembleCates() { 
 | 
                let cates = this.$refs.tree.getCheckedNodes(); 
 | 
                if (cates.length > 0) { 
 | 
                    let cardAssembles = this.form.cardAssembles; 
 | 
                    if (!cardAssembles) { 
 | 
                        cardAssembles = new Array(); 
 | 
                    } 
 | 
                    cates.forEach(item => { 
 | 
                        cardAssembles.push({ 
 | 
                            cateId: item.id, 
 | 
                            type: '分类' 
 | 
                        }); 
 | 
                    }); 
 | 
                } 
 | 
            }, 
 | 
            hidePanel : function (event) { 
 | 
                let _this = this; 
 | 
                let searchBox = document.getElementsByClassName("listenDiv"); 
 | 
                if (searchBox &&  searchBox.length != 0) { 
 | 
                    if(searchBox.length > 1) { 
 | 
                        if (_this.showSearchTable_taocan) { 
 | 
                            if (!searchBox[0].contains(event.target)) { 
 | 
                                _this.showSearchTable_taocan = false; 
 | 
                            } 
 | 
                        } 
 | 
  
 | 
                        if (_this.showSearchTable_jjcp) { 
 | 
                            if (!searchBox[1].contains(event.target)) { 
 | 
                                _this.showSearchTable_jjcp = false; 
 | 
                            } 
 | 
                        } 
 | 
                    } else { 
 | 
  
 | 
                        if (!searchBox[0].contains(event.target)) { 
 | 
                            _this.showSearchTable = false; 
 | 
                            _this.showSearchTable_card = false; 
 | 
                            _this.showSearchTable_zhk = false; 
 | 
                        } 
 | 
  
 | 
                    } 
 | 
                } 
 | 
            } 
 | 
        } 
 | 
  
 | 
    }) 
 | 
</script> 
 | 
  
 | 
</body> 
 | 
</html> 
 |