<div>
    <ul class="tabWarp">
        <li ms-class-1="hover:tab=='tab1'" ms-class-2="normal:tab!='tab1'" val="tab1" ms-click="tabChange">基本信息</li>
        <li ms-class-1="hover:tab=='tab2'" ms-class-2="normal:tab!='tab2'" val="tab2" ms-click="tabChange">产品说明</li>
        <li ms-class-1="hover:tab=='tab3'" ms-class-2="normal:tab!='tab3'" val="tab3" ms-click="tabChange">特供价格</li>
        <li ms-class-1="hover:tab=='tab4'" ms-class-2="normal:tab!='tab4'" val="tab4" ms-click="tabChange">提成设置</li>
    </ul>
</div>
<div id="tab1" ms-visible="tab=='tab1'" class="tabContent2">
    <table cellspacing="0" cellpadding="0" width="100%" border="0" class="commontable">
        <tr>
            <th width="90">销售状态：
            </th>
            <td width="260" align="left">
                <label>
                    <input type="radio" value="1" ms-duplex-text="entity.State" />上架
                </label>
                <label style="margin-left: 10px;">
                    <input type="radio" value="0" ms-duplex-text="entity.State" />下架
                </label>
            </td>
            <th width="110">{{lang.ProductCode}}：
            </th>
            <td width="*" align="left">
                <input type="text" ms-duplex="entity.BarCode" />
            </td>
        </tr>
        <tr>
            <th>{{lang.ProductName}}：
            </th>
            <td align="left">
                <input type="text" id="txtName" ms-duplex="entity.Name" /><span class="must">*</span>
            </td>
            <th>{{lang.ForShort}}：
            </th>
            <td align="left">
                <input type="text" id="txtAbbreviation" ms-duplex="entity.Abbreviation" style="width: 128px;" />
                <a href="javascript:void(0)" ms-click="onNameChange" style="color: #016b96;">自动生成</a>
                <span class="helptip"
                    style="margin-top: 8px;"><a href="#" data-toggle="tooltip" data-placement="top" ms-attr-title="lang.AutoGetShort">&nbsp;&nbsp;</a>
                </span>

            </td>
        </tr>
        <tr>
            <th>{{lang.Category}}：
            </th>
            <td align="left">
                <input type="text" readonly="readonly" ms-duplex="entity.CategoryName" style="width: 130px;" />
                <button type="button" class="myfbt" id="btmSelectCategory" ms-widget='dropDownPCategoryTree,setCategory,setCategoryTreeOpts'>
                    <i class="customer"></i>
                </button>
                <span class="helptip"><a href="#" data-toggle="tooltip" data-placement="top" ms-attr-title="lang.AutoGetBrand">&nbsp;&nbsp; </a></span>
            </td>
            <th>品牌：
            </th>
            <td align="left">
                <input type="text" readonly="readonly" ms-duplex="entity.Brand.Name" style="width: 128px;" />
                <button type="button" class="myfbt" ms-click="selectBrand">
                    <i class="customer"></i>
                </button>
                <span class="helptip" style="margin-left: 0px;"><a href="#" data-toggle="tooltip" data-placement="top" ms-attr-title="lang.AutoGetSupplier">&nbsp;&nbsp; </a></span>
                <div ms-visible="brandPanel" class="dropdownPanel" style="width: 610px; position: absolute;" ms-mousedown="mouseDownBrand">
                    <div>
                        <div class="boxTitlenob" style="margin-left: 0;">
                            <h2>
                                <span class="rseachbox">
                                    <input style="margin-bottom: 0px;" ms-duplex="brandKey" type="text">
                                    <button type="button" class="inputbt" ms-click="searchBrand">
                                    </button>
                                </span>
                                <span style="float: right">
                                    <button type="button" ms-click="closeBrandPanel">{{lang.Close}}</button>
                                    <button type="button" ms-click="clearBrandValue">清空</button></span>
                            </h2>
                        </div>
                        <table id="table3" width="580px" align="center" border="0" cellspacing="1" cellpadding="0" class="tableList">
                            <tbody id="Tbody1">
                                <tr style="cursor: pointer; background-color: rgb(255, 255, 255);">
                                    <td>
                                        <ul class="BrandListUl" ms-each-item="brandList">
                                            <li>
                                                <img ms-src="item.Img" ms-click="clickBrand" ms-attr-key="item.Id" ms-alt="item.Name"></li>

                                        </ul>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <th>{{lang.Standard}}：
            </th>
            <td align="left">
                <input type="text" ms-duplex="entity.Standard" style="width: 206px;" />
            </td>
            <th>{{lang.Supplier|html}}：
            </th>
            <td align="left">
                <input type="hidden" ms-duplex="entity.SuplierIds" />
                <input type="text" ms-duplex="entity.SuplierNames" readonly="readonly" style="width: 128px;" />
                <button type="button" class="myfbt" ms-click="selectSuplier()"><i class="customer"></i></button>
            </td>
        </tr>
        <tr>
            <th>{{lang.Unit}}：
            </th>
            <td align="left">
                <select style="width: 60px;" class="valid" ms-duplex="entity.Units" ms-each-item="units">
                    <option ms-value="item.Id">{{item.Data}}</option>
                </select>
            </td>
            <th>{{lang.Origin}}：
            </th>
            <td align="left">
                <input type="text" ms-duplex="entity.Origin" />
            </td>
        </tr>
        <tr>
            <th>{{lang.Weight}}：
            </th>
            <td align="left">
                <input type="text" style="width: 45px;" ms-duplex="entity.Weight">
                <select style="width: 60px;" class="valid" ms-duplex="entity.UnitOfWeight" ms-each-item="weights">
                    <option ms-value="item.Id">{{item.Data}}</option>
                </select>
            </td>
            <th>当前库存：
            </th>
            <td align="left">{{entity.CurrentStockNum}}
            </td>
        </tr>
        <tr>
            <th><span style="color: #00A000;">标准售价：</span></th>
            <td align="left">
                <div class="input-append">
                    <input type="text" ms-duplex="entity.GeneralCustomerPrice" ms-keyup="syncPrice()" style="width: 80px; font-weight: bold;" ms-class-1="redbg:parseFloat(entity.GeneralCustomerPrice)<parseFloat(entity.LowestPrice)" ms-readonly="!EDITPRICE" />
                    <span class="add-on">{{lang.Yuan}}</span>
                </div>
                <span class="helptip" style="margin-left: 0px;"><a href="#" data-toggle="tooltip" data-placement="top" title="市场零售价">&nbsp;&nbsp; </a></span>
            </td>
            <th>库存报警：</th>
            <td>下限：<input type="text" ms-duplex="entity.LowestStockNum" style="width: 60px;" />
                上限：<input type="text" ms-duplex="entity.HighestStockNum" style="width: 60px;" />
            </td>
        </tr>
        <tr>
            <th style="vertical-align: top;"><span style="color: #ff6a00;">销售最低价：</span></th>
            <td align="left" style="vertical-align: top;">
                <div class="input-append">
                    <input type="text" ms-duplex="entity.LowestPrice" style="width: 80px; font-weight: bold;" ms-readonly="!EDITPRICE" />
                    <span class="add-on">{{lang.Yuan}}</span>
                </div>
                <span class="helptip" style="margin-left: 0px;"><a href="#" data-toggle="tooltip" data-placement="top" title="产品销售时，不得低于此价">&nbsp;&nbsp; </a></span>
            </td>
            <th>是否执行特价：
            </th>
            <td carservicewidth="*" align="left">
                <label>
                    <input type="radio" ms-duplex-text="entity.IsSpecial" value="false" />{{lang.No}}
                </label>
                <label>
                    <input type="radio" ms-duplex-text="entity.IsSpecial" value="true" />{{lang.Yes}}
                </label>
            </td>
        </tr>
        <tr>
            <th>售价级别表：<br />
                <span class="helptip" style="margin-right: 40px;"><a href="#" data-toggle="tooltip" data-placement="top" title="售价级别表在【设置】>【数据字典】-【客户】-【会员级别】里面进行设置">&nbsp;&nbsp;</a></span>
            </th>
            <td align="left" style="vertical-align: top;">
                <table border="0" cellspacing="1" cellpadding="0" class="tableList top10" style="width: 97%; margin-top: 0px;">
                    <tr class="head">
                        <td width="40%" align="center" bgcolor="#FFFFFF" style="text-align: center;">会员等级
                        </td>
                        <td width="60%" align="center" bgcolor="#FFFFFF" style="text-align: center;">会员价格
                        </td>
                    </tr>
                    <tbody>
                        <tr ms-repeat-item="gradePricelist" ms-class-old="$index % 2" ms-class-even="!($index % 2)" ms-hover="hover">
                            <td align="center" bgcolor="#FFFFFF" style="text-align: center;">{{item.MemberGradeDisplay}}
                            </td>
                            <td align="center" bgcolor="#FFFFFF" style="text-align: center;">
                                <div class="input-append">
                                    <input type="text" ms-duplex="item.Prints" style="width: 60px; font-weight: bold;" ms-class-1="redbg:parseFloat(item.Prints)<parseFloat(entity.LowestPrice)" ms-readonly="!EDITPRICE" />
                                    <span class="add-on">{{lang.Yuan}}</span>
                                </div>
                                <span>({{item.Discount/10}}折)</span>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </td>
            <th>&nbsp;</th>
            <td align="left" style="vertical-align: top;">
                <div ms-if="entity.IsSpecial=='true'||entity.IsSpecial==true">
                    <div>
                        特价价格：
                        <div class="input-append">
                            <input type="text" ms-duplex="entity.TeJia" style="width: 63px;" ms-readonly="!EDITPRICE" />
                            <span class="add-on">{{lang.Yuan}}</span>
                        </div>
                    </div>
                    <div>
                        特价期限：<input type="text" style="width: 90px; margin-left: 6px;" ms-duplex="entity.StartDate" readonly="readonly" ms-widget="date,startdateid,startdateOpts" />
                        <span style="margin-left: -18px;">~</span>
                        <input type="text" style="width: 90px;" ms-duplex="entity.EndDate" readonly="readonly" ms-widget="date,enddateid,enddateOpts" />
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <th style="height: 50px;">{{lang.ProductPicture}}：
            </th>
            <td align="left" id="bindFilesView" colspan="3">
                <button class="mybt" type="button" id="btn_upload" ms-click="uploadpicture">{{lang.UploadPicture}}</button>
            </td>
        </tr>
        <tr ms-visible="entity.OriginImg">
            <th>&nbsp;</th>
            <td colspan="3">
                <div id="show_list" style="height: 140px;">
                    <ul style="height: 140px; width: 100%;">
                        <li ms-repeat-item="OriginImgs" style="margin-bottom: 5px;">
                            <div class="img_box">
                                <a ms-href="item" target="_blank">
                                    <img ms-src="item" border="0"></a>
                            </div>
                            <a ms-click="delboximg();" href="javascript:void(0);" ms-attr-index="$index" style="color: #016b96;">删除</a>
                        </li>
                    </ul>
                </div>
            </td>
        </tr>
    </table>
</div>
<div id="tab2" ms-visible="tab=='tab2'" class="tabContent2 min200">
    <table cellspacing="0" cellpadding="0" width="100%" border="0" class="commontable">
        <tr>
            <th carservicewidth="90">{{lang.Instructions}}：
            </th>
            <td width="*" align="left" style="padding: 0 0 10px 0;">
                <textarea id="txtInfo" name="txtInfo"></textarea>
            </td>
        </tr>
        <tr>
            <th>{{lang.AfterService}}：
            </th>
            <td carservicewidth="*" align="left">
                <textarea id="txtAfterService" name="txtAfterService"></textarea>
            </td>
        </tr>
    </table>
</div>
<div id="tab3" ms-visible="tab=='tab3'" class="tabContent2 min200">
    <table width="100%" border="0" cellspacing="1" cellpadding="0" class="tableList bottom10">
        <tr>
            <td colspan="3" bgcolor="#FFFFFF">
                <a href="javascript:void(0)" ms-if="EDITPRICE" ms-click="specialAdd" class="doadd" style="padding-top: 12px;">新增</a>
                <a href="javascript:void(0)" ms-if="EDITPRICE" ms-click="specialDel" class="dodel">删除</a>
            </td>
        </tr>
        <tr class="head">
            <td width="10%" align="center" bgcolor="#FFFFFF">
                <input type="checkbox" ms-duplex-radio="checkallpro" />
            </td>
            <td width="70%" align="center" bgcolor="#FFFFFF">客户名称
            </td>
            <td width="20%" align="center" bgcolor="#FFFFFF">价格
            </td>
        </tr>
        <tbody>
            <tr ms-repeat-item="pro" ms-class-old="$index % 2" ms-class-even="!($index % 2)" ms-hover="hover">
                <td align="center" bgcolor="#FFFFFF">
                    <input type="checkbox" ms-duplex-radio="item.checked" />
                </td>
                <td bgcolor="#FFFFFF">{{item.CustomerDisplay}}
                </td>
                <td align="center" bgcolor="#FFFFFF">
                    <input type="text" ms-duplex="item.Prints" style="width: 80px;" ms-readonly="!EDITPRICE" />
                </td>
            </tr>
        </tbody>
        <tfoot>
            <tr>
                <td colspan="3" ms-widget='paging,upaing2,proptions'></td>
            </tr>
        </tfoot>
    </table>
</div>
<div ms-visible="tab=='tab4'" class="tabContent2 min200">
    <table ms-if="SPECIALPRICE" cellspacing="0" cellpadding="0" width="100%" border="0" class="commontable">
        <tr>
            <th style="width:90px;">{{lang.StockPrice}}：
            </th>
            <td style="width:250px;">
                <div class="input-append">
                    <input type="text" ms-duplex="entity.StockPrice" style="width: 80px; font-weight: bold;" />
                    <span class="add-on">{{lang.Yuan}}</span>
                </div>
                <span class="helptip" title="从供应商处进到的价格">&nbsp;</span>
            </td>
            <th style="width:90px;">提成基准价：
            </th>
            <td align="left">
                <div class="input-append">
                    <input type="text" ms-duplex="entity.RoyaltyPrice" style="width: 80px; font-weight: bold;" />
                    <span class="add-on">{{lang.Yuan}}</span>
                </div>
                <span class="helptip" title="计算提成时的起始价，例：进货价10元，提成基准价20元，销售价50元，如按百分比毛利额10%计提成，则应得提成为（50-20）*10%=3元">&nbsp;</span>
            </td>
        </tr>
        <tr>
            <th>提成办法：</th>
            <td>
                <label>
                    <input ms-duplex-text="entity.RoyaltyType" value="0" type="radio" />
                    按百分比
                </label>
                <label>
                    <input ms-duplex-text="entity.RoyaltyType" value="1" type="radio" />
                    按数量
                </label>
            </td>
            <th>计算方式：</th>
            <td>
                <div ms-if="entity.RoyaltyType==0">
                    <select ms-duplex-text="entity.RoyaltyCompute" style="width:121px;">
                        <option value="0">按销售毛利</option>
                        <option value="1">按销售金额</option>
                    </select>
                    提成
                    <div class="input-append">
                    <input type="text" ms-duplex="entity.RoyaltyValue" style="width: 80px; font-weight: bold;" />
                    <span class="add-on">%</span>
                </div>
                </div>
                <div ms-if="entity.RoyaltyType==1">
                    <select style="width:121px;">
                        <option value="0">每件</option>
                    </select>
                    提成
                    <div class="input-append">
                    <input type="text" ms-duplex="entity.RoyaltyValue" style="width: 80px; font-weight: bold;" />
                    <span class="add-on">{{lang.Yuan}}</span>
                </div>
                </div>
            </td>
        </tr>
    </table>
    <div ms-if="!SPECIALPRICE" style="height:200px;line-height:200px;font-size:18px;text-align:center;">无产品进货价权限</div>
</div>
