Edit.html 22.7 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414
<%include '../../common/__ui/header'%>
<%include '../../common/__partail/ListHeader'%>
<div class="contentpanel">
    <div class="row">
        <div class="col-md-12">
            <form id="basicForm" role="form" class="form-horizontal form-bordered" method="post" action="<%action%>">

                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h4 class="panel-title">基本信息</h4>
                    </div>
                    <div class="panel-body" id="basicInfo">

                    </div>

                    <div class="panel-heading">
                        <h4 class="panel-title">销售属性</h4>
                    </div>
                    <div class="panel-body">
                        <div class="row">
                            <div class="form-group">
                                <label class="col-sm-1 control-label">颜色分类 <span class="red">*</span></label>
                                <div class="col-sm-11">
                                    <%if list%>
	                                    <%each list as item%>
	                                    <button type="button" class="btn btn-default sortadd btn-xs" style="margin-bottom: 5px" data-id="<%item.id%>"><%item.colorName%></button>
	                                    <%/each%>
                                	<%/if%>
                                </div>
                            </div>
                            <div id="basicTable"></div>
                        </div>
                    </div>

                    <input type="hidden" id="isShenHe" value="<%isShenHe%>" />

                    <div class="panel-footer">
                        <div class="row">
                            <div class="col-sm-8 col-sm-offset-2">
                                <a class="btn btn-default" href="/supplier/baseproduct/index">取消</a>
                                <button type="submit" class="btn btn-success mr5" data-loading-text="保存中..." id="btnReview"><%btnText%></button>
                            </div>
                        </div>
                    </div>
                </div>

            </form>
        </div>
    </div>
</div>
<script type="text/template" id="template">
    [[each goodsSizeList as item __index]]
    <div class="form-group">
        <!-- <label class="col-sm-1 red">*</label> -->
        <div class="col-sm-1" style="width: [[item._rowHead[0].width || 'auto']]; padding: 0 5px;">
            <select id="sizeName" class="form-control btn-sort-chima" data-index=[[index]] data-eq=[[__index]] value='[[item.sizeId]]' required placeholder="尺码">
                <option value="[[item.sizeId||'-1']]">[[item.sizeName||'选择尺码']]</option>
            </select>
        </div>
        <div class="col-sm-1" style="width: [[item._rowHead[1].width || 'auto']]; padding: 0 5px;">
            <input class="form-control btn-sort-xiaoshou" value="[[item.salePrice]]" placeholder="默认销售价" data-index=[[index]] data-eq=[[__index]] required match="numbers" type="text"></input>
        </div>
        <div class="col-sm-2" style="width: [[item._rowHead[2].width || 'auto']]; padding: 0 5px;">
            <input class="form-control btn-sort-tiaoma" value="[[item.factoryCode]]" placeholder="条码" data-index=[[index]] data-eq=[[__index]]></input>
        </div>
        <div class="col-sm-2" style="width: [[item._rowHead[3].width || 'auto']]; padding: 0 5px;">
            <input class="form-control btn-sort-nationalCode" value="[[item.nationalCode]]" placeholder="品牌条码" data-index=[[index]] data-eq=[[__index]]></input>
        </div>
        <div class="col-sm-1" style="width: [[item._rowHead[4].width || 'auto']]; padding: 0 5px;">
            <select class="form-control btn-sort-kebu" value="[[item.isSuppled||'Y']]" data-index=[[index]] data-eq=[[__index]]>
                <option value="N">不可补货</option>
                <option value="Y">可补货</option>
            </select>
        </div>
        <div class="col-sm-2" style="width: [[item._rowHead[5].width || 'auto']]; padding: 0 5px;">
            <input class="form-control btn-sort-upmCode" value="[[item.upmCode]]" placeholder="UPC条码" data-index=[[index]] data-eq=[[__index]]></input>
        </div>
        <div class="col-sm-2" style="width: [[item._rowHead[6].width || 'auto']]; padding: 0 5px;">
            <input class="form-control" type="text" value="[[item.balanceTimeStr]]" readonly="readonly" data-index=[[index]] data-eq=[[__index]]>
        </div>
        [[if item.isBonded]]
            <div class="col-sm-1" style="width: [[item._rowHead[7].width || 'auto']]; padding: 0 5px;">
                <input class="form-control sku-input-control" type="text" value="[[item.storageBondedBo.goodsName]]" data-index=[[index]] data-eq=[[__index]] data-key="storageBondedBo.goodsName">
            </div>
            <div class="col-sm-1" style="width: [[item._rowHead[8].width || 'auto']]; padding: 0 5px;">
                <input class="form-control sku-input-control" type="text" value="[[item.storageBondedBo.productRecordcode]]" data-index=[[index]] data-eq=[[__index]] data-key="storageBondedBo.productRecordcode">
            </div>
            <div class="col-sm-1" style="width: [[item._rowHead[9].width || 'auto']]; padding: 0 5px;">
                <input class="form-control sku-input-control" type="text" value="[[item.storageBondedBo.netWeight]]" data-index=[[index]] data-eq=[[__index]] data-key="storageBondedBo.netWeight">
            </div>
            <div class="col-sm-1" style="width: [[item._rowHead[10].width || 'auto']]; padding: 0 5px;">
                <input class="form-control sku-input-control" type="text" value="[[item.storageBondedBo.grossWeight]]" data-index=[[index]] data-eq=[[__index]] data-key="storageBondedBo.grossWeight">
            </div>
        [[/if]]
        <div class="col-sm-1" style="width: 1px;">
            <div style="position: absolute; width: 60px;">
                [[if __index==goodsSizeList.length-1]]
                <button type="button" class="btn btn-info btn-xs btn-sort-add" data-index=[[index]]>+</button>
                [[/if]]
                [[if __index!=0]]
                <button type="button" class="btn btn-info btn-xs btn-sort-remove" data-index=[[index]] data-eq=[[__index]]>-</button>
                [[/if]]
            </div>
        </div>

    </div>
    [[/each]]
</script>

<script type="text/template" id="template2">
    <div class="row">

        <div class="form-group">
            <label class="col-sm-2 control-label">品牌 <span class="red">*</span></label>
            <div class="col-sm-2">
                <select id="brandId" class="form-control" required placeholder="品牌">
                    <option value="[[brandId||'-1']]">[[brandName||'品牌']]</option>
                </select>
            </div>

            <label class="col-sm-2 control-label">管理店铺 <span class="red">*</span></label>
            <div class="col-sm-2">
                <select id="shopId" class="form-control" required placeholder="管理店铺">
                    <option value="[[shopId||'-1']]">[[shopName||'店铺']]</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">供应商</label>
            <div class="col-sm-2">
                <select id="supplierId" class="form-control">
                    <option value="[[supplierId||'-1']]">[[supplierName||'供应商']]</option>
                </select>
                <div class="col-sm-12 control-label red">代销和一件代发需选择供应商</div>
            </div>
            <label class="col-sm-2 control-label">经营模式 <span class="red">*</span></label>
            <div class="col-sm-2">
                <select id="sellType" class="form-control" required placeholder="经营模式" value="[[sellType]]">
                    <option value="-1">经营模式</option>
                    <option value="1">经销</option>
                    <option value="2">代销</option>
                    <option value="3">JIT</option>
                    <option value="4">专营店代销入库</option>
                    <option value="5">专营店代销不入库</option>
                    <option value="10">经销保税</option>
                    <option value="30">一件代发</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">分类 <span class="red">*</span></label>
            <div class="col-sm-4">
                <div id="tree" style="width: 100%"></div>
            </div>
            <span class="showPlatform" style="display: none">
                <label class="col-sm-1 control-label">展示平台</label>
                <div class="col-sm-2 checkbox" style="margin-top: 3px">
                    <label><input disabled="true" type="checkbox" name="appType" value="1" [[appType==1?'checked':'']]>BLK</label>
                    <input type="hidden" id="appType" name="appType" value="[[appType||'0']]" for="checkbox"   />
                </div>
            </span>
            <label class="col-sm-1 control-label">厂家编号</label>
            <div class="col-sm-2">
                <input type="text" id="factoryCode" placeholder="厂家编号" value="[[factoryCode]]" class="form-control"/>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">商品名称 <span class="red">*</span></label>
            <div class="col-sm-10">
                <input type="text" id="productName" class="form-control" value="[[productName]]" placeholder="品牌英文名+性别+最小类目" required/>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">货品年 <span class="red">*</span></label>
            <div class="col-sm-2">
                <select id="goodsYears" class="form-control" value="[[goodsYears||'2019']]">
                    [[each ENUMYEAR as item index]]
                    <option value="[[item.YEAR]]">[[item.YEAR]]</option>
                    [[/each]]
                </select>
            </div>
            <label class="col-sm-1 control-label">货品季 <span class="red">*</span></label>
            <div class="col-sm-2">
                <select id="goodsSeason" class="form-control" value="[[goodsSeason]]">
                    <option value="1"></option>
                    <option value="2"></option>
                    <option value="3"></option>
                    <option value="4"></option>
                    <option value="5">春夏</option>
                    <option value="6">秋冬</option>
                </select>
            </div>
            <label class="col-sm-1 control-label">商品属性 <span class="red">*</span></label>
            <div class="col-sm-2">
                <select id="attribute" class="form-control" value="[[attribute]]">
                    <option value="1">普通商品</option>
                    <option value="2">赠品</option>
                    <option value="3">虚拟商品</option>
                    <option value="4">组合商品</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">品牌上市日期 <span class="red">*</span></label>
            <div class="col-sm-2">
                <input type="text" style="background-color: #fff" id="brandSaleTimeStr" jsaction="date" value="[[brandSaleTimeStr]]" class="form-control" readonly="readonly" required placeholder="品牌上市日期" />
            </div>
            <label class="col-sm-1 control-label">预计上市日期 <span class="red">*</span></label>
            <div class="col-sm-2">
                <input type="text" style="background-color: #fff" id="expectSaleTimeStr" jsaction="date" value="[[expectSaleTimeStr]]" class="form-control" readonly="readonly" required placeholder="预计上市日期" />
            </div>
            <label class="col-sm-1 control-label">品牌经典款 <span class="red">*</span></label>
            <div class="col-sm-2" id="classicDiv">
                <label class="radio-inline">
                    <input type="radio" name="classic" value="1"></label>
                <label class="radio-inline">
                    <input type="radio" name="classic" value="0"></label>
                <input type="hidden" id="classic" name="classic" value="[[classic||'0']]" for="radio" required />
            </div>
        </div>
        <div class="form-group" id="productTagDiv">
            <label class="col-sm-2 control-label">商品话题</label>
            <div class="col-sm-10">
                <input type="text" id="productTag" class="form-control" value="[[productTag]]" readonly="readonly" />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">性别 <span class="red">*</span></label>
            <div class="col-sm-2">
                <label class="radio-inline">
                    <input type="radio" name="gender" value="1"></label>
                <label class="radio-inline">
                    <input type="radio" name="gender" value="2"></label>
                <label class="radio-inline">
                    <input type="radio" name="gender" value="3">通用</label>
                <input type="hidden" id="gender" name="gender" value="[[gender||'1']]" for="radio" required />
            </div>

            <label class="col-sm-1 control-label">年龄层 <span class="red">*</span></label>
            <div class="col-sm-3">
                <label class="radio-inline" style="padding-left: 0">
                    <input type="checkbox" name="ageLevel" value="1">成人</label>
                <label class="radio-inline">
                    <input type="checkbox" name="ageLevel" value="2">大童</label>
                <label class="radio-inline">
                    <input type="checkbox" name="ageLevel" value="3">小童</label>
                <label class="radio-inline">
                    <input type="checkbox" name="ageLevel" value="4">中童</label>
                <label class="radio-inline">
                    <input type="checkbox" name="ageLevel" value="5">幼童</label>
                <input type="hidden" id="ageLevel" name="ageLevel" value="[[ageLevel]]" for="checkbox" placeholder="年龄层" required />
            </div>
        </div>
        <div class="form-group">
            <!-- <label class="col-sm-2 control-label">重点款 <span class="red">*</span></label>
            <div class="col-sm-2">
                <label class="radio-inline">
                    <input type="radio" name="grade" value="1"></label>
                <label class="radio-inline">
                    <input type="radio" name="grade" value="0"></label>
            </div>
            <input type="hidden" id="grade" value="[[grade||'0']]" for="radio" required/>-->
            <label class="col-sm-2 control-label">适销季 <span class="red">*</span></label>
            <div class="col-sm-4">
                <label class="radio-inline">
                    <input type="radio" name="seasons" value="spring">春秋</label>
                <label class="radio-inline">
                    <input type="radio" name="seasons" value="summer"></label>
                <label class="radio-inline">
                    <input type="radio" name="seasons" value="winter"></label>
                <label class="radio-inline">
                    <input type="radio" name="seasons" value="seasons">四季</label>
                <input type="hidden" id="seasons" name="seasons" value="[[seasons||'seasons']]" for="radio" placeholder="适销季" />
            </div>

        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">限量款</label>
            <div class="col-sm-2">
                <label class="radio-inline">
                    <input type="radio" name="isLimited" value="Y"></label>
                <label class="radio-inline">
                    <input type="radio" name="isLimited" value="N"></label>
            </div>
            <input id="isLimited" type="hidden" value="[[isLimited||'N']]" for="radio" />


           <!--  [[if isAuditing==200]]
            <label class="col-sm-2 control-label">是否奥莱</label>
            <div class="col-sm-2">
                <label class="radio-inline">
                    <input type="radio" name="isOutLets" value="Y"></label>
                <label class="radio-inline">
                    <input type="radio" name="isOutLets" value="N"></label>
                <input type="hidden" id="isOutLets"  value="[[isOutLets||'N']]" for="radio" />
            </div>
            [[/if]] -->
        </div>


        [[if isAuditing==200]]
        <div class="form-group">
            <label class="col-sm-2 control-label">是否预售</label>
            <div class="col-sm-2">
                <label class="radio-inline">
                    <input type="radio" name="isAdvance" value="Y"></label>
                <label class="radio-inline">
                    <input type="radio" name="isAdvance" value="N"></label>
                <input type="hidden" id="isAdvance" value="[[isAdvance||'N']]" for="radio" />
            </div>
            <div class="col-sm-6"><span class="red" style="padding-top:3px;">定金预售商品取消预售标时需维护支付尾款时间</span></div>
        </div>
        <!-- 设置预计到货时间、预付定金 -->
        <div id="advanceSettings" style="display:none" class="form-group">
            <label class="col-sm-2 control-label" id="expectArrivalTimeStrTxt">预计到货时间 <span class="red">*</span></label>
            <div class="col-sm-2">
                <input type="text" style="background-color: #fff" id="expectArrivalTimeStr" jsaction="date" value="[[expectArrivalTimeStr]]" class="form-control" readonly="readonly" required placeholder="预计到货时间" />
            </div>

            <label class="col-sm-2 control-label">预付定金 </label>
            <div class="col-sm-2">
                <input type="text" id="deposit" style="background-color: #fff" value="[[deposit]]" class="form-control" placeholder="预付定金">
            </div>
        </div>
        [[/if]]


        <div class="form-group">
            <label class="col-sm-2 control-label">吊牌价 <span class="red">*</span></label>
            <div class="col-sm-2">
                <input type="text" id="retailPriceStr" class="form-control" required value="[[retailPriceStr]]" match="numbers" placeholder="吊牌价" />
            </div>
            <label class="col-sm-1 control-label">销售价 <span class="red">*</span></label>
            <div class="col-sm-2">
                <input type="text" id="salesPriceStr" class="form-control" required value="[[salesPriceStr]]" match="numbers" placeholder="销售价" />
            </div>
        </div>

        <div class="form-group bonded-wrap">
            <label class="col-sm-2 control-label">产销国</label>
            <div class="col-sm-2">
                <input type="text" id="originCountry" class="form-control skn-input-control" value="[[productBondedBo.originCountry]]" data-key="productBondedBo.originCountry"/>
            </div>
            <label class="col-sm-1 control-label skn-input-control">第一单位</label>
            <div class="col-sm-2">
                <input type="text" id="firstUnit" class="form-control skn-input-control" value="[[productBondedBo.firstUnit]]" data-key="productBondedBo.firstUnit"/>
            </div>
            <label class="col-sm-1 control-label">第一数量</label>
            <div class="col-sm-2">
                <input type="text" id="secondUnit" class="form-control skn-input-control" value="[[productBondedBo.firstCount]]" data-key="productBondedBo.firstCount"/>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">申报单位</label>
            <div class="col-sm-2">
                <input type="text" id="declareUnit" class="form-control skn-input-control" value="[[productBondedBo.declareUnit]]" data-key="productBondedBo.declareUnit"/>
            </div>
            <label class="col-sm-2 control-label">商品编码(hscode):</label>
            <div class="col-sm-4">
                <input type="text" id="hsCode" class="form-control skn-input-control" value="[[productBondedBo.hsCode]]" data-key="productBondedBo.hsCode"/>
            </div>
        </div>
    </div>
</script>

<script type="text/template" id="template3">
    <div class="form-group">
        [[if inputType=='checkbox']]
        [[each idNameList as item index ]]
        <label class="radio-inline">
            <input type="checkbox" name="attr_[[__index]]" data-index=[[__index]] class="attr_checkobx_class" value="[[item.id]]">[[item.text]]</label>
        [[/each]]
        <input type="hidden" id="attr_[[__index]]" value="[[__val||'']]"  [[required]] for="checkbox" placeholder="[[attributeName]]"/>
        [[/if]]

        [[if inputType=='radio']]
        [[each idNameList as item index ]]
        <label class="radio-inline">
            <input type="radio" name="attr_[[__index]]" data-index=[[__index]] class="attr_input" value="[[item.id]]">[[item.text]]</label>
        [[/each]]
        <input type="hidden" id="attr_[[__index]]" data-index='[[__index]]' value="[[__val||'']]" [[required]] for="radio" placeholder="[[attributeName]]" />
        [[/if]]

        [[if inputType=='select']]
        <select class="form-control attr_input" style="width: 280px" data-index='[[__index]]' value="[[__val||'']]" [[required]]>
            <option value="">请选择[[attributeName]]</option>
            [[each idNameList as item index ]]
            <option value="[[item.id]]">[[item.text]]</option>
            [[/each]]
        </select>
        [[/if]]

        [[if inputType=='text']]
        <input type="text" class="form-control attr_input" style="width: 280px" data-index='[[__index]]' value="[[val||'']]" [[required]] maxlength='[[maxValueLen]]' placeholder="[[attributeName]]"/>
        [[/if]]
        [[if inputType=='textarea']]
        <textarea class="form-control attr_input" data-index='[[__index]]' [[required]] maxlength='[[maxValueLen]]' placeholder="[[attributeName]]">[[val||'']]</textarea>
        [[/if]]
    </div>
</script>

<script type="text/template" id="colorSelect">
    <select class='form-control colorSelect' style='width: 150px' value="[[colorId]]" data-index="[[__index]]">
        <%if list%>
        <%each list as item%>
        <option value="<%item.id%>"><%item.colorName%></option>
        <%/each%>
        <%/if%>
        </option>
    </select>
    <div class='clearfix'></div>
</script>
<%include '../../common/__ui/footer'%>