|  |  |  | 
|---|
|  |  |  | </el-radio-group> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | <el-col :offset="2" :span="10"> | 
|---|
|  |  |  | <el-form-item prop="carUseCount" label-width="120px" label="最大使用次数" v-if="form.isCourse=='Y'"> | 
|---|
|  |  |  | <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-date-picker> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | <el-col :offset="2" :span="5"> | 
|---|
|  |  |  | <el-form-item label="购买有效期"> | 
|---|
|  |  |  | <el-col  :span="6"> | 
|---|
|  |  |  | <el-form-item label=""> | 
|---|
|  |  |  | <el-input v-model="form.buyDateNum"></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | <el-col :span="12"> | 
|---|
|  |  |  | <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-form-item> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | <el-col :offset="1" :span="5"> | 
|---|
|  |  |  | <el-form-item label="消耗有效期"> | 
|---|
|  |  |  | <el-col  :span="6"> | 
|---|
|  |  |  | <el-input v-model="form.useDateNum"></el-input> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | <el-col  :span="12"> | 
|---|
|  |  |  | <el-select v-model="form.useDateUnit" placeholder="请选择"> | 
|---|
|  |  |  | </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" | 
|---|
|  |  |  | 
|---|
|  |  |  | :value="item.value"> | 
|---|
|  |  |  | </el-option> | 
|---|
|  |  |  | </el-select> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </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"> | 
|---|
|  |  |  | 
|---|
|  |  |  | var app = new Vue({ | 
|---|
|  |  |  | el: '#app', | 
|---|
|  |  |  | data: { | 
|---|
|  |  |  | payMethodList : ['1', '2', '3'], | 
|---|
|  |  |  | dateList : [{value : 'Y', label : '年'}, {value : 'M', label : '月'}, { value : 'D' , label : '日' }], | 
|---|
|  |  |  | selectTreeParam: { | 
|---|
|  |  |  | holder: '请选择商品类型', | 
|---|
|  |  |  | 
|---|
|  |  |  | cardAssembles: [], | 
|---|
|  |  |  | //充值卡绑定产品分类 | 
|---|
|  |  |  | isCourse: 'N', | 
|---|
|  |  |  | isInfinite : 'N', | 
|---|
|  |  |  | carIsAll: '否', | 
|---|
|  |  |  | useDateNum : '', | 
|---|
|  |  |  | buyDateNum : '', | 
|---|
|  |  |  | payMethods : '', | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | submitUrl: '/admin/shoppinggoods/addShoppingGoods', | 
|---|
|  |  |  | modifySubmitUrl: '/admin/shoppinggoods/modifyShoppingGoods', | 
|---|
|  |  |  | 
|---|
|  |  |  | isCourse: [{required: true, message: '请选择套餐类型', trigger: 'change'}], | 
|---|
|  |  |  | sealPice: [{required: true, message: '请填写售价', trigger: 'blur'}], | 
|---|
|  |  |  | timeLength: [{required: true, message: '请填写服务时长', trigger: 'blur'}], | 
|---|
|  |  |  | isNum : [{ type : 'number', message: '请输入数字', trigger: 'blur' }], | 
|---|
|  |  |  | }, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | 
|---|
|  |  |  | _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()) { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | if (valid) { | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if ( _this.form.goodType == '套餐' && _this.form.isCourse == 'Y' && !_this.form.carUseCount) { | 
|---|
|  |  |  | if ( _this.form.goodType == '套餐' && _this.form.isCourse == 'Y' && _this.form.isInfinite == 'N' && !_this.form.carUseCount) { | 
|---|
|  |  |  | this.$message.error('请输入套餐最大使用次数!'); | 
|---|
|  |  |  | _this.submiting = false; | 
|---|
|  |  |  | return false; | 
|---|
|  |  |  | 
|---|
|  |  |  | 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); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }, | 
|---|