



<div class="create_all">
    <div class="title_btn">


        <div class="grid_title">
            <div class="grid_title1 fl">
            </div>
            <div class="title_con fl">
                <h2> 新建商品 </h2>
            </div>
            <div class="grid_title2 fl">
            </div>
        </div>
        <div class="btn_01" style="float:right;">
            <ul id="createConfig" style="position:absolute;z-index:2;">
                <li ng-repeat="element in createConfigElements">
                    <input type='checkbox' class='occ' id='__oc{{element.item.ID}}' ng-checked="element.select" />  {{element.item.pName}}
                </li>
            </ul>
            <input type="button" value="createConfig" id="createConfigButton" ng-click="createConfig();" />



            <a class="fs14" href="javascript:void(0);" id="submitEdit" ng-click="doSubmit();"> 提 交 </a>     <a class="fs14" href="javascript:void(0);" ng-click="closeDialog();" id="close"> 关 闭 </a>
        </div>

    </div>


    <div class="grid_24 clearfix">


        <div id="CreateWindow_main" name="CreateWindow_main" class="createTable clearfix" cellpadding="3" cellspacing="3">


            <dl id="crv" class="complexcreate">
                <dd ng-repeat="element in elements" class="dd_{{element.p.pTypeId}}">
                    <div ng-if="(element.p.pTypeId == 5||element.p.pTypeId == 3||element.p.pTypeId == 4) && element.p.categoryId == categoryId">
                        <span>{{element.p.pName}}: </span>
                        <input tag='edit' type='text' id='__c{{element.p.ID}}' name='__c{{element.p.ID}}' unq="{{element.p.isUnique}}" req="{{element.p.required}}" vad='{{element.p.validator}}' />
                        <i ng-show="element.p.required"> R  </i> <i ng-show="element.p.isUnique"> U </i>
                    </div>


                    <div ng-if="(element.p.pTypeId == 5||element.p.pTypeId == 3||element.p.pTypeId == 4) && element.p.categoryId != categoryId">
                        <span>{{element.p.pName}}: </span>
                        <input type="text" name="view__j{{element.p.ID}}" id='view__j{{element.p.ID}}'  /><input tag="edit" type="hidden" name="__j{{element.p.ID}}" id="__j{{element.p.ID}}" />    
                        
                        <a style="color:blue"  href="javascript:void(0);"  ng-click="openSelect(element.p);"  >选择</a>
                    </div>



                    <div ng-if="element.p.pTypeId == 2 || element.p.pTypeId == 12">
                        <span>{{element.p.pName}}: </span>    <select id='__c{{element.p.ID}}' name='__c{{element.p.ID}}' tag="edit">
                            <option ng-repeat="obj in element.s" value="{{obj.value}}"> {{obj.label}} </option>
                        </select>
                    </div>

                    <div ng-if="element.p.pTypeId == 19">
                        <span>{{element.p.pName}}: </span>    <select multiselectdropdown multiple="multiple" type="user" id='__c{{element.p.ID}}' name='__c{{element.p.ID}}'></select>
                    </div>

                    <div ng-if="element.p.pTypeId == 20">
                        <span>{{element.p.pName}}: </span>    <select multiselectdropdown multiple="multiple" type="data" id='__c{{element.p.ID}}' name='__c{{element.p.ID}}' val="{{element.v}}"></select>
                    </div>



                    <div ng-if="element.p.pTypeId == 1||element.p.pTypeId == 21">
                        <span>{{element.p.pName}}: </span>    <input type="checkbox" id='__c{{element.p.ID}}' name='__c{{element.p.ID}}' tag="edit" />
                    </div>

                    <div ng-if="element.p.pTypeId == 6">
                        <span>{{element.p.pName}}: </span>    <input datepick class="date-pick" type="text" id='__c{{element.p.ID}}' name='__c{{element.p.ID}}' tag="edit" />
                    </div>

                    <div ng-if="element.p.pTypeId == 7">
                        <span>{{element.p.pName}}: </span>    <textarea editorc tag='edit' id='__c{{element.p.ID}}' name='__c{{element.p.ID}}'   class='jqtxt'></textarea>
                    </div>



                    <div ng-if="element.p.pTypeId == 11">
                        <span>{{element.p.pName}}: </span>    <div attachment ng-model="element" id='__img{{element.p.ID}}' class='holder' ng-model="element">
                            <ul></ul>
                        </div><input type='hidden' id='__c{{element.p.ID}}' name="__c{{element.p.ID}}" value="" tag="edit" />
                    </div>

                    <div ng-if="element.p.pTypeId == 10">
                        <span>{{element.p.pName}}: </span>    <div attachments ng-model="element" id='__img{{element.p.ID}}' class='holder'>
                            <ul></ul>
                        </div> <input type='hidden' id='__c{{element.p.ID}}' name="__c{{element.p.ID}}" tag="edit" />
                    </div>
                </dd>


            </dl>


            <div class="list_search fl opendiv">

                <dl id="search" class="fl">

                    <dd ng-repeat="element in searchElements" ng-show="searchElements.length">

                        <div ng-if="element.pTypeId == 5||element.pTypeId == 7">
                            <span class="lab_01"> {{element.pName }}:</span> <input id="__c{{element.ID}}" name="__c{{element.ID}}" tag="edit" />
                        </div>

                        <div ng-if="element.pTypeId == 1">
                            <span class="lab_01"> {{element.pName }}:</span> <input type="checkbox" id="__c{{element.ID}}" name="__c{{element.ID}}" tag="edit" />
                        </div>

                        <div ng-if="element.pTypeId == 3||element.pTypeId == 4">
                            <span class="lab_01"> {{element.pName }}:</span>
                            <input type="text" class="two_text" id="__c{{element.ID}}x1" name="__c{{element.ID}}x1" tag="edit" vad="{{element.validator}}" />
                            <input type="text" class="two_text" id="__c{{element.ID}}x2" name="__c{{element.ID}}x2" tag="edit" vad="{{element.validator}}" />
                        </div>


                        <div ng-if="element.pTypeId == 6">
                            <span class="lab_01"> {{element.pName }}:</span>
                            <input datepick class="date-pick two_text" type="text" id="__c{{element.ID}}x1" name="__c{{element.ID}}x1" tag="edit" />
                            <input datepick class="date-pick two_text" type="text" id="__c{{element.ID}}x2" name="__c{{element.ID}}x2" tag="edit" />
                        </div>

                        <div ng-if="element.pTypeId == 2||element.pTypeId == 13||element.pTypeId == 20">
                            <span class="lab_01"> {{element.pName }}:</span>
                            <select multiselectdropdown type="data" multiple="multiple" id="__c{{element.ID}}" name="__c{{element.ID}}"></select>
                        </div>

                        <div ng-if="element.pTypeId == 12||element.pTypeId == 19">
                            <span class="lab_01"> {{element.pName }}:</span>
                            <select multiselectdropdown type="user" multiple="multiple" id="__c{{element.ID}}" name="__c{{element.ID}}"></select>
                        </div>

                        <div ng-if="element.pTypeId == 16">
                            <span class="lab_01"> {{element.pName }}:</span>
                            <select id="__c{{element.ID}}_o" name="__c{{element.ID}}_o" tag="edit">  <option value="1">=</option><option value="3">&gt;</option><option value="2">&lt;</option> <option value="5">包含(in)</option></select>  <input placeholder="编号" class="two_text" tag="edit"  type="text" id="__c{{element.ID}}" name="__c{{element.ID}}" /> <a href="javascript:void(0);" style="color:#808080" ng-click="dosm();">扫码</a> <div id="saomadiv">         <textarea id="idlist" rows="8" cols="30"></textarea>         <br />         <table><tr><td><input id="saomasubmit" type="button" value="提交" ng-click="saomasubmit();" /> </td>         <td>          <input type="button" id="saomacancel" value="取消" ng-click="saomacancel();" /> </td>         </tr></table>       </div>
                        </div>

                        <div ng-if="element.pTypeId == 18">
                            <span class="lab_01"> {{element.pName }}:</span>
                            <input type="checkbox" tag="edit" id="__c{{element.ID}}" name="__c{{element.ID}}" />  <input placeholder="根节点" type="text" tag="edit" id="__c{{element.ID}}x1" name="__c{{element.ID}}x1" class="two_text" />   <input class="two_text" placeholder="深度" type="text" tag="edit" id="__c{{element.ID}}x2" name="__c{{element.ID}}x2" />
                        </div>
                    </dd>


                    <dd><input type='button' value=" 查 询 " id="searchSubmit" class="two_text" ng-click="searchSubmit();" /> </dd><dd><input type='button' value=" 展开 " id="openSearch" ng-click="openSearch();" class="two_text" /> </dd>
                </dl>
            </div>


            <div style="width:100%;float:right;">
                <input id="rowcount" type="hidden" value="0" />

                <input type="button" value="添加"  ng-click="addChild();" />

                <div id="sublist">

                    <table id="sub" class="childTable" style="width:100%" tag="table_{{subPageId}}">
                        <tr><th ng-repeat="element in subElements">
                          <span ng-if="element.pTypeId != 16">  {{element.pName}} </span>
                            </th><th>操作</th></tr>

                        <tr class="hide" >

                            <td ng-repeat="element in subElements">
                                <div ng-if="element.pTypeId == 2 || element.pTypeId == 13" > <select multiselectdropdown tag="edit" type="element" name="__c{{element.ID}}"></select> </div>
                                <div ng-if="element.pTypeId == 1||element.pTypeId == 21">  <input type="checkbox" name="__c{{element.ID}}" tag="edit" /> </div>
                                <div ng-if="element.pTypeId == 12"> <select multiselectdropdown tag="edit" type="user" name="__c{{element.ID}}"></select> </div>
                                <div ng-if="element.pTypeId == 6">  <input datepick class="date-pick" type="text" name="__c{{element.ID}}" tag="edit" /> </div>
                                <div ng-if="element.pTypeId == 3||element.pTypeId == 4||element.pTypeId == 7"><input tag='edit' type='text' name='__c{{element.ID}}' vad="{{element.validator}}" /></div>
                                <div ng-if="element.pTypeId == 5 && element.categoryId==subCategoryId"><input tag='edit' type='text' name='__c{{element.ID}}' vad="{{element.validator}}" /></div>
                                <div ng-if="element.pTypeId == 5 && element.categoryId!=subCategoryId">
                                    <input type="text" name="view__j{{element.ID}}" disabled="disabled" /><input tag="edit"  type="hidden" name="__j{{element.ID}}" />
                                </div>
                            </td>
                            <td> <a style="color:blue;" href="javascript:void(0);"  class="remove" >删除</a></td>
                        </tr>

                    </table>

                </div>
            </div>


        </div>
    </div>
</div>



<div id="bottom"></div>