|  |  |  | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <div class="layui-col-lg6"> | 
|---|
|  |  |  | <div class="layui-col-lg3"> | 
|---|
|  |  |  | <label class="layui-form-label">是否主推:</label> | 
|---|
|  |  |  | <div class="layui-input-block"> | 
|---|
|  |  |  | <input type="radio" name="isHot" value="1" title="是"  /> | 
|---|
|  |  |  | <input type="radio" name="isHot" value="2" title="否"  checked /> | 
|---|
|  |  |  | <input type="radio" name="isHot" value="1" title="是" /> | 
|---|
|  |  |  | <input type="radio" name="isHot" value="2" title="否" checked /> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <div class="layui-col-lg3"> | 
|---|
|  |  |  | <label class="layui-form-label febs-form-item-require">序号:</label> | 
|---|
|  |  |  | <div class="layui-input-block"> | 
|---|
|  |  |  | <input type="number" name="orderNumber" lay-verify="required" placeholder="" autocomplete="off" class="layui-input"> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | 
|---|
|  |  |  | <label class="layui-form-label febs-form-item-require">重量:</label> | 
|---|
|  |  |  | <div class="layui-input-block"> | 
|---|
|  |  |  | <input type="text" name="goodsWeight"  lay-verify="required" placeholder="" autocomplete="off" class="layui-input"> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <div class="layui-form-mid layui-word-aux">默认单位:克。请填写数字。如:1千克,则填入1000。</div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | 
|---|
|  |  |  | <div class="layui-input-block"> | 
|---|
|  |  |  | <!--                                                <textarea id="lay_edit" lay-verify="goodsDetails" name="goodsDetails" class="layui-textarea"></textarea>--> | 
|---|
|  |  |  | <div style="border: 1px solid #ccc;"> | 
|---|
|  |  |  | <div id="toolbar-container" style="border-bottom: 1px solid #ccc;"></div> | 
|---|
|  |  |  | <div id="editor-container" style="height: 300px;"></div> | 
|---|
|  |  |  | <div id="toolbar-container-good-update" style="border-bottom: 1px solid #ccc;"></div> | 
|---|
|  |  |  | <div id="editor-container-good-update" style="height: 300px;"></div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <div class="layui-form-item"> | 
|---|
|  |  |  | <label class="layui-form-label febs-form-item-require">成本价:</label> | 
|---|
|  |  |  | <div class="layui-input-block"> | 
|---|
|  |  |  | <input type="text" name="costPrice" lay-verify="required" placeholder="" | 
|---|
|  |  |  | autoComplete="off" class="layui-input"> | 
|---|
|  |  |  | <div class="layui-col-lg6"> | 
|---|
|  |  |  | <label class="layui-form-label febs-form-item-require">成本价:</label> | 
|---|
|  |  |  | <div class="layui-input-block"> | 
|---|
|  |  |  | <input type="text" name="costPrice" lay-verify="required" placeholder="" autocomplete="off" class="layui-input"> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <!--                                        <blockquote class="layui-elem-quote blue-border">代理价格</blockquote>--> | 
|---|
|  |  |  | <!--                                        <div class="layui-row layui-col-space10 layui-form-item">--> | 
|---|
|  |  |  | <!--                                            <div class="layui-col-lg6">--> | 
|---|
|  |  |  | <!--                                                <label class="layui-form-label febs-form-item-require">一级价格:</label>--> | 
|---|
|  |  |  | <!--                                                <div class="layui-input-block">--> | 
|---|
|  |  |  | <!--                                                    <input type="text" name="levelOnePrice" lay-verify="required" placeholder="" autocomplete="off" class="layui-input">--> | 
|---|
|  |  |  | <!--                                                </div>--> | 
|---|
|  |  |  | <!--                                            </div>--> | 
|---|
|  |  |  | <!--                                            <div class="layui-col-lg6">--> | 
|---|
|  |  |  | <!--                                                <label class="layui-form-label febs-form-item-require">二级价格:</label>--> | 
|---|
|  |  |  | <!--                                                <div class="layui-input-block">--> | 
|---|
|  |  |  | <!--                                                    <input type="text" name="levelTwoPrice" lay-verify="required" placeholder="" autocomplete="off" class="layui-input">--> | 
|---|
|  |  |  | <!--                                                </div>--> | 
|---|
|  |  |  | <!--                                            </div>--> | 
|---|
|  |  |  | <!--                                        </div>--> | 
|---|
|  |  |  | <!--                                        <div class="layui-row layui-col-space10 layui-form-item">--> | 
|---|
|  |  |  | <!--                                            <div class="layui-col-lg6">--> | 
|---|
|  |  |  | <!--                                                <label class="layui-form-label febs-form-item-require">三级价格:</label>--> | 
|---|
|  |  |  | <!--                                                <div class="layui-input-block">--> | 
|---|
|  |  |  | <!--                                                    <input type="text" name="levelThreePrice" lay-verify="required" placeholder="" autocomplete="off" class="layui-input">--> | 
|---|
|  |  |  | <!--                                                </div>--> | 
|---|
|  |  |  | <!--                                            </div>--> | 
|---|
|  |  |  | <!--                                        </div>--> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <blockquote class="layui-elem-quote blue-border">运费设置</blockquote> | 
|---|
|  |  |  | <div class="layui-form-item"> | 
|---|
|  |  |  | 
|---|
|  |  |  | <label class="layui-form-label febs-form-item-require">邮费模板:</label> | 
|---|
|  |  |  | <div class="layui-input-block"> | 
|---|
|  |  |  | <div id="carriage-rule"></div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <blockquote class="layui-elem-quote blue-border">优惠卷设置</blockquote> | 
|---|
|  |  |  | <div class="layui-form-item coupon-rule"> | 
|---|
|  |  |  | <div class="layui-col-lg6"> | 
|---|
|  |  |  | <label class="layui-form-label febs-form-item-require">优惠卷:</label> | 
|---|
|  |  |  | <div class="layui-input-block"> | 
|---|
|  |  |  | <div id="coupon-rule"></div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | 
|---|
|  |  |  | // initValue(); | 
|---|
|  |  |  | }) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | var couponRule = xmSelect.render({ | 
|---|
|  |  |  | el: '#coupon-rule', | 
|---|
|  |  |  | language: 'zn', | 
|---|
|  |  |  | prop : { | 
|---|
|  |  |  | value : 'id', | 
|---|
|  |  |  | children : 'child' | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | iconfont: { | 
|---|
|  |  |  | parent: 'hidden', | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | // radio: true, | 
|---|
|  |  |  | clickClose: true, | 
|---|
|  |  |  | tree: { | 
|---|
|  |  |  | show: true, | 
|---|
|  |  |  | //非严格模式 | 
|---|
|  |  |  | strict: false, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | data: [] | 
|---|
|  |  |  | }) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | febs.get(ctx + 'admin/goods/couponTreeSet', null, function(res) { | 
|---|
|  |  |  | couponRule.update({ | 
|---|
|  |  |  | data : res.data, | 
|---|
|  |  |  | autoRow: true, | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | initValue(); | 
|---|
|  |  |  | }) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | var carriageRule = xmSelect.render({ | 
|---|
|  |  |  | el: '#carriage-rule', | 
|---|
|  |  |  | language: 'zn', | 
|---|
|  |  |  | 
|---|
|  |  |  | data : res.data, | 
|---|
|  |  |  | autoRow: true, | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | initValue(); | 
|---|
|  |  |  | }) | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | var tableSkuData = []; | 
|---|
|  |  |  | var tableIns = table.render({ | 
|---|
|  |  |  | 
|---|
|  |  |  | ,{field: 'index', title: '序号', width: 70} | 
|---|
|  |  |  | ,{field: 'styleName', title: '样式', edit:'text', width:200} | 
|---|
|  |  |  | ,{field: 'skuName', title: '规格', edit:'text', width:200} | 
|---|
|  |  |  | ,{field: 'sample', title:'样品', width:100} | 
|---|
|  |  |  | ,{field: 'goodsWeight', title: '重量', edit:'text', width:100} | 
|---|
|  |  |  | ,{field: 'presentPrice', title: '现价', edit:'text', width:100} | 
|---|
|  |  |  | ,{field: 'originalPrice', title: '原价', edit:'text', width:100} | 
|---|
|  |  |  | ,{field: 'presentPrice', title: '现价', edit:'text', width:100} | 
|---|
|  |  |  | // ,{field: 'levelOnePrice', title: '一级价格', edit:'text', width:100} | 
|---|
|  |  |  | // ,{field: 'levelTwoPrice', title: '二级价格', edit:'text', width:100} | 
|---|
|  |  |  | // ,{field: 'levelThreePrice', title: '三级价格', edit:'text', width:100} | 
|---|
|  |  |  | ,{field: 'costPrice', title: '成本价', edit:'text', width:100} | 
|---|
|  |  |  | ,{templet: '#tableImgUpload', title: '缩略图', width:150} | 
|---|
|  |  |  | ,{field: 'stock', title: '库存', edit:'text', width:100} | 
|---|
|  |  |  | 
|---|
|  |  |  | "staticProp": goodsInfo.staticProp, | 
|---|
|  |  |  | "originalPrice": goodsInfo.originalPrice, | 
|---|
|  |  |  | "presentPrice": goodsInfo.presentPrice, | 
|---|
|  |  |  | "levelOnePrice": goodsInfo.levelOnePrice, | 
|---|
|  |  |  | "levelTwoPrice": goodsInfo.levelTwoPrice, | 
|---|
|  |  |  | "levelThreePrice": goodsInfo.levelThreePrice, | 
|---|
|  |  |  | "costPrice": goodsInfo.costPrice, | 
|---|
|  |  |  | "isSku": goodsInfo.isSku, | 
|---|
|  |  |  | "thumb": goodsInfo.thumb, | 
|---|
|  |  |  | "carriageType": goodsInfo.carriageType, | 
|---|
|  |  |  | "carriageAmount": goodsInfo.carriageAmount, | 
|---|
|  |  |  | "goodsWeight": goodsInfo.goodsWeight, | 
|---|
|  |  |  | "orderNumber": goodsInfo.orderNumber, | 
|---|
|  |  |  | "thumbs": thumbs | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | var arrCarriageRule = []; | 
|---|
|  |  |  | arrCarriageRule.push(goodsInfo.carriageRuleId) | 
|---|
|  |  |  | carriageRule.setValue(arrCarriageRule); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | couponRule.setValue(goodsInfo.couponIds); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (goodsInfo.isNormal == 2) { | 
|---|
|  |  |  | $(".tc-set").show(); | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | window.editor = E.createEditor({ | 
|---|
|  |  |  | html: goodsInfo.goodsDetails, | 
|---|
|  |  |  | selector: '#editor-container', | 
|---|
|  |  |  | selector: '#editor-container-good-update', | 
|---|
|  |  |  | config : editorConfig, | 
|---|
|  |  |  | mode: 'default' | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | window.toolbar = E.createToolbar({ | 
|---|
|  |  |  | editor, | 
|---|
|  |  |  | selector: '#toolbar-container', | 
|---|
|  |  |  | selector: '#toolbar-container-good-update', | 
|---|
|  |  |  | mode: 'default' | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | form.on('submit(goods-update-form-submit)', function (data) { | 
|---|
|  |  |  | let couponRuleList = couponRule.getValue(); | 
|---|
|  |  |  | if (couponRuleList.length > 0) { | 
|---|
|  |  |  | var couponIds = []; | 
|---|
|  |  |  | layui.each(couponRuleList, function (key, item) { | 
|---|
|  |  |  | couponIds.push(item.id) | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | data.field.couponIds=couponIds; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | data.field.goodsType=1; | 
|---|
|  |  |  | data.field.mailGoodsSkuDto = tableSkuData; | 
|---|
|  |  |  | data.field.delSkuId=delSku; | 
|---|