HTMLtable 设置表头和列锁定功能

学习来源:http://www.webkaka.com/tutorial/html/2021/0630123/

感谢大神的文章,受益匪浅!

结合大神文章的代码实例,根据自己的情况更改

此功能为CSS样式控制,不需要js。

我的项目中,我将需要锁定的列标签设置为th。

如果有多个列需要锁定,继续在CSS样式中添加相应样式

HTML-table实现表头锁定和列锁定

学习来源:http://www.webkaka.com/tutorial/html/2021/0630123/

1、table要放在指定宽度高度的div中

2、★table的class设置为“tab_DataList_1”

3、★★★将需要锁定的列将td标签设置为th标签,根据要锁定的列继续添加CSS样式


CSS样式
        /* 设置表格属性 */
        .tab_DataList_1 {
            border-collapse:separate;  /* 为表格设置合并边框模型 */
            table-layout: fixed;  /* 设置表格布局算法 */
        }

        /* 设置单元格样式 */
        .tab_DataList_1 th {
            border:#b2c9dd 1px solid;
            border-left:blue 1px solid;
            border-right:blue 1px solid;
        }
        .tab_DataList_1 td {
            border:#b2c9dd 1px solid;
        }

        /* 设置第一行单元格样式 */
        .tab_DataList_1 tr:first-child th {
            position: sticky;
            top: 0;
            z-index: 1;
            background:#d5e3ef;
        }
        .tab_DataList_1 tr:first-child td {
            position: sticky;
            top: 0;
            z-index: 1;
            background:#d5e3ef;
        }

        /* 设置第一行th单元格样式 */
        .tab_DataList_1 tr:first-child th {
            z-index: 3;
        }
                /* 这是父级下第一个需要锁定的列 */
        .tab_DataList_1 tr:first-child th:nth-child(2) {  /* 父级下第几个标签,从1开始 */
            left: 0;
        }
                /* ★★★这是父级下第二个需要锁定的列,其他锁定列继续添加CSS样式★★★ */
        .tab_DataList_1 tr:first-child th:nth-child(4) {  /* 父级下第几个标签,从1开始 */
            left: 232;  /* 前面固定单元格的宽度综合,每有一个单元格再+1为边框宽度 */
        }

        /* 设置非第一行th单元格样式 */
        .tab_DataList_1 tr:not(:first-child) th {
            position: sticky;
            z-index: 1;
            background:white;  /* 若不设置锁定单元格背景色则为透明,可以看到下方的单元格数据 */
        }
                /* 这是父级下第一个需要锁定的列 */
        .tab_DataList_1 tr:not(:first-child) th:nth-child(2) {
            left: 0;
        }
                /* ★★★这是父级下第二个需要锁定的列,其他锁定列继续添加CSS样式★★★ */
        .tab_DataList_1 tr:not(:first-child) th:nth-child(5) {
            left: 232;
        }

        /* 明细表非表头行鼠标指向时行背景色改变 */
        .tab_DataList_1 tr:not(:first-child):hover {
            background:whitesmoke;
        }
        .tab_DataList_1 tr:not(:first-child):hover th {
            background:whitesmoke;
        }


HTML代码(仅供参考):
<div id="gundongdiv" style="OVERFLOW: auto; BORDER-TOP: #b2c9dd 1px solid; HEIGHT: 400px; BORDER-RIGHT: #b2c9dd 1px solid; WIDTH: 1200px !important; BORDER-BOTTOM: #b2c9dd 1px solid; MARGIN-LEFT: auto; BORDER-LEFT: #b2c9dd 1px solid; MARGIN-RIGHT: auto">
                <table width="2365" class="tab_DataList_1" id="tab_cp" style="BORDER-TOP: medium none; BORDER-RIGHT: medium none; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none" border="0" cellspacing="0" cellpadding="0" emptygrid="KeepEmpty" menudock="Left" dynamicarea="1,1">
                    <tbody>
                        <tr class="xtbd">
                            <td width="67" height="34">
                                <aspxform:XCheckBox id="checkboxall" runat="server" Width="27px" XDataBind="allcheck" Text=" " Checked="True"></aspxform:XCheckBox>
                                序号
                            </th>
                            <th width="231">
                                <font color="#b2c9dd">成品名称</font>
                            </th>
                            <td colspan="2">
                                成品编码
                            </td>
                            <th width="116">
                                <font color="red">原厂货号/条码</font>
                            </th>
                            <td width="92" align="center">
                                <p align="center">
                                    产品信息描述
                                </p>
                            </td>
                            <td width="12" align="center" class="xhd">
                                包装描述</td>
                            <td width="30">
                                <p align="center">
                                    单位
                                </p>
                            </td>
                            <td width="100">
                                <p align="center">
                                    <font color="red">数量</font>
                                </p>
                            </td>
                            <td width="72" align="center">
                                执行单价</td>
                            <td width="151" align="center">
                                <font color="#ff0000">单价</font>
                            </td>
                            <td width="72">
                                总价</td>
                            <td width="72" align="center">
                                折扣价</td>
                            <td width="72">
                                <p align="center">
                                    单价
                                </p>
                            </td>
                            <td width="82">
                                总价</td>
                            <td width="101">
                                <p align="center">
                                    单位成本<aspxform:XRequiredFieldValidator id="XRequiredFieldValidator14" runat="server" Width="75px" ForeColor="Red" Display="None" ErrorMessage="请填写单位成本" ControlToValidate="XTextBox7">请填写成本</aspxform:XRequiredFieldValidator>
                                </p>
                            </td>
                            <td width="82" align="center">
                                <font color="red">成本额</font>
                            </td>
                            <td width="186" align="center">
                                中间商</td>
                            <td width="72">
                                单价</td>
                            <td width="83">
                                总价</td>
                            <td width="82" align="center">
                                <font color="red">业务类型</font>
                            </td>
                            <td width="82">
                                <p align="center">
                                    <font color="red">装箱率</font>&nbsp;
                                </p>
                            </td>
                            <td width="42" align="center">
                                辅计量单位</td>
                            <td width="82" align="center">
                                辅数量</td>
                            <td width="24" align="center">
                                <font color="#b2c9dd">客户货号</font>
                            </td>
                            <td width="12" align="center" class="xhd">
                                累计发货量</td>
                            <td width="12" align="center" class="xhd">
                                税率</td>
                            <td width="25">
                                <p align="center">
                                    净重(kg)
                                </p>
                            </td>
                            <td width="25">
                                <p align="center">
                                    毛重(kg)
                                </p>
                            </td>
                            <td width="27">
                                <p align="center">
                                    长(cm)
                                </p>
                            </td>
                            <td width="27">
                                <p align="center">
                                    宽(cm)
                                </p>
                            </td>
                            <td width="27">
                                <p align="center">
                                    高(cm)
                                </p>
                            </td>
                            <td width="68" class="xhd">
                                <aspxform:XTextBox id="XTextBox100" runat="server" XDataBind="BLBPM:A_Sale_T1.BIsLock" HiddenExpress="1" BorderWidth="1" BorderColor="#DCDCDC" width="10%" Visibility="False">是</aspxform:XTextBox>
                                <aspxform:XTextBox id="XTextBox101" runat="server" XDataBind="BLBPM:A_Sale_T1.BClass" HiddenExpress="1" BorderWidth="1" BorderColor="#DCDCDC" width="10%" Visibility="False">公司</aspxform:XTextBox>
                                <aspxform:XTextBox id="XTextBox102" runat="server" XDataBind="BLBPM:A_Sale_T1.BName" HiddenExpress="1" BorderWidth="1" BorderColor="#DCDCDC" width="10%" Visibility="False">博丽玻璃</aspxform:XTextBox>
                            </td>
                        </tr>
                        <tr>
                            <td height="154" align="center">
                                <aspxform:XCheckBox id="XCheckBox1" runat="server" Width="20px" XDataBind="BLBPM:A_Sale_T1.IsChecked" Express="allcheck" Checked="True"></aspxform:XCheckBox>
                                <aspxform:XGridLineNo id="XGridLineNo1" runat="server" Width="50%" BorderWidth="1" TextAlign="Center" BorderStyle="None">1</aspxform:XGridLineNo>
                                <aspxform:XTextBox id="XTextBox131" runat="server" XDataBind="BLBPM:A_Sale_T1.NO" HiddenExpress="1" BorderWidth="1" BorderColor="#DCDCDC" width="100%" Visibility="False"></aspxform:XTextBox>
                            </td>
                            <th>
                                <aspxform:XRequiredFieldValidator id="XRequiredFieldValidator9" runat="server" ForeColor="Red" Display="None" ErrorMessage="请选择成品" ControlToValidate="XTextBox11">R9</aspxform:XRequiredFieldValidator>
                                <aspxform:XLabel id="XLabel32" runat="server" Width="100%" XDataBind="BLBPM:A_Sale_T1.ProductName" FieldName="成品名称" BackColor="Transparent"></aspxform:XLabel>
                            </th>
                            <td width="115">
                                <aspxform:XTextBox id="XTextBox132" runat="server" XDataBind="BLBPM:A_Sale_T1.IsFormOld" HiddenExpress="1" BorderWidth="1" BorderColor="#DCDCDC" width="100%" Visibility="False" BackColor="Transparent"></aspxform:XTextBox>
                                <aspxform:XTextBox id="XTextBox11" runat="server" XDataBind="BLBPM:A_Sale_T1.ProductCode" BorderWidth="1px" BorderColor="Gainsboro" width="100%" Max="0" Min="0" DisableExpress="1" FieldName="成品编码" ValueToDisplayText HiddenInput="False" BackColor="Transparent"></aspxform:XTextBox>
                            </td>
                            <td width="20">
                                <aspxform:XDataBrowserButton id="XDataBrowserButton4" runat="server" Width="20px" HiddenExpress="varFormState=='Edit'||varFormState=='Read'" XClass="YZSoft.Forms.Field.DataBrowserButton" XDataSource="DataSource:BLBPM;TableName:V_ProductFiles_M_NeiMao;Filter:IsDomesticSales->1;OrderBy:InventoryCode" DataMap="newID0->BLBPM:A_Sale_T1.NO;TaskID->BLBPM:A_Sale_T1.PTaskID;InventoryCode->BLBPM:A_Sale_T1.ProductCode;InventoryName->BLBPM:A_Sale_T1.ProductName;iGroupType->BLBPM:A_Sale_T1.cGroupCode;PrimaryName->BLBPM:A_Sale_T1.IUnitName;PrimaryUnit->BLBPM:A_Sale_T1.IUnit;AuxiliaryName->BLBPM:A_Sale_T1.PackingUint;AuxiliaryUnit->BLBPM:A_Sale_T1.IUnit1;PackingRate->BLBPM:A_Sale_T1.PackingRate;TBulk->BLBPM:A_Sale_T1.Tbulk;OriginalArticleNumber->BLBPM:A_Sale_T1.OrArNumber;ExecutionUnitPrice->BLBPM:A_Sale_T1.ExecutionUnitPrice" DisplayColumns="WaterCode:简码,65;InventoryCode:存货编码,125;InventoryName:存货名称,230;OriginalArticleNumber:条码,110;ExecutionUnitPrice:执行单价,70" Text="+" UseSubmitBehavior="False" PopupWndHeight="-1" PopupWndWidth="-1" AppendMode="Append"></aspxform:XDataBrowserButton>
                            </td>
                            <th>
                                <aspxform:XTextBox id="XTextBox94" runat="server" XDataBind="BLBPM:A_Sale_T1.OrArNumber" BorderWidth="1" BorderColor="#DCDCDC" width="100%" DisableExpress="1" FieldName="原厂货号" BackColor="Transparent"></aspxform:XTextBox>
                            </th>
                            <td class="xhd">
                                <aspxform:XLabel id="XLabel24" runat="server" XDataBind="ProDescribe" HiddenExpress="if(Global.StepName=='开始',1,0)" Express="BLBPM:A_Sale_T1.ProDescribe" FieldName="产品描述" BackColor="Transparent"></aspxform:XLabel>
                                <aspxform:XTextBox id="XTextBox16" runat="server" XDataBind="BLBPM:A_Sale_T1.ProDescribe" HiddenExpress="if(Global.StepName=='开始',0,1)" BorderWidth="1px" BorderColor="Gainsboro" width="100%" Max="0" Min="0" FieldName="产品描述" ValueToDisplayText HiddenInput="False" PlaceHolder BackColor="Transparent"></aspxform:XTextBox>
                            </td>
                            <td>
                                <aspxform:XTextBox id="XTextBox122" runat="server" XDataBind="BLBPM:A_Sale_T1.BZDescribe" BorderWidth="1" BorderColor="#DCDCDC" width="100%" FieldName="包装描述" TextMode="MultiLine" BackColor="Transparent"></aspxform:XTextBox>
                            </td>
                            <td align="center">
                                <aspxform:XTextBox id="XTextBox49" runat="server" XDataBind="BLBPM:A_Sale_T1.cGroupCode" HiddenExpress="1" BorderWidth="1px" BorderColor="Gainsboro" width="100%" Visibility="False" Max="0" Min="0" ValueToDisplayText HiddenInput="False" BackColor="Transparent"></aspxform:XTextBox>
                                <aspxform:XTextBox id="XTextBox77" runat="server" XDataBind="BLBPM:A_Sale_T1.IUnitName" BorderWidth="1" BorderColor="#DCDCDC" width="100%" DisableExpress="1" FieldName="单位" TextAlign="Center" BackColor="Transparent"></aspxform:XTextBox>
                                <aspxform:XTextBox id="XTextBox17" runat="server" XDataBind="BLBPM:A_Sale_T1.IUnit" HiddenExpress="1" BorderWidth="1" BorderColor="#DCDCDC" width="100%" Visibility="False" BackColor="Transparent"></aspxform:XTextBox>
                            </td>
                            <td>
                                <aspxform:XRequiredFieldValidator id="XRequiredFieldValidator11" runat="server" ForeColor="Red" Display="None" ErrorMessage="成品数量不能为空" ControlToValidate="XTextBox18">XER</aspxform:XRequiredFieldValidator>
                                <aspxform:XTextBox id="XTextBox18" runat="server" XDataBind="BLBPM:A_Sale_T1.IQuantity" BorderWidth="1" BorderColor="#DCDCDC" width="100%" FieldName="数量" TextAlign="Right" Format="type:currency;.0" BackColor="Transparent"></aspxform:XTextBox>
                                <aspxform:XTextBox id="XTextBox52" runat="server" XDataBind="BLBPM:A_Sale_T1.OrderQuantity" HiddenExpress="1" BorderWidth="1" BorderColor="#DCDCDC" width="100%" Express="if(BLBPM:A_Sale_T1.UnitPrice!=0,BLBPM:A_Sale_T1.IQuantity,0)" DisableExpress="1" FieldName="订单数量" TextAlign="Right" Format="type:currency;.0" BackColor="Transparent">0</aspxform:XTextBox>
                                <aspxform:XTextBox id="XTextBox53" runat="server" XDataBind="BLBPM:A_Sale_T1.GiftsQuantity" HiddenExpress="1" BorderWidth="1" BorderColor="#DCDCDC" Express="if(BLBPM:A_Sale_T1.UnitPrice==0,BLBPM:A_Sale_T1.IQuantity,0)" DisableExpress="1" FieldName="赠品数量" Format="type:currency;.0" BackColor="Transparent"></aspxform:XTextBox>
                            </td>
                            <td align="right">
                                <aspxform:XTextBox id="XTextBox31" runat="server" Width="100%" XDataBind="BLBPM:A_Sale_T1.ExecutionUnitPrice" BorderWidth="1px" BorderColor="Gainsboro" Max="0" Min="0" DisableExpress="1" FieldName="执行单价" ValueToDisplayText HiddenInput="False" PlaceHolder TextAlign="Right" Format="type:currency;.4" BackColor="Transparent"></aspxform:XTextBox>
                            </td>
                            <td>
                                <aspxform:XRequiredFieldValidator id="XRequiredFieldValidator12" runat="server" DisableExpress="1" ForeColor="Red" Display="None" ErrorMessage="输入单价" ControlToValidate="XTextBox29">XER</aspxform:XRequiredFieldValidator>
                                <aspxform:XTextBox id="XTextBox29" runat="server" Width="100%" XDataBind="BLBPM:A_Sale_T1.UnitPrice_Yuan" BorderWidth="1" BorderColor="#DCDCDC" Express="BLBPM:A_Sale_T1.ExecutionUnitPrice" TextAlign="Right" Format="type:currency;.4" BackColor="Transparent"></aspxform:XTextBox>
                            </td>
                            <td>
                                <aspxform:XTextBox id="TB_Amount_Yuan" runat="server" Width="100%" XDataBind="BLBPM:A_Sale_T1.Amount_Yuan" BorderWidth="1" BorderColor="#DCDCDC" Express="BLBPM:A_Sale_T1.IQuantity*BLBPM:A_Sale_T1.UnitPrice_Yuan" DisableExpress="1" ValueToDisplayText TextAlign="Right" Format="type:currency;.4" BackColor="Transparent"></aspxform:XTextBox>
                            </td>
                            <td>
                                <aspxform:XTextBox id="TB_DiscountAmount" runat="server" Width="100%" XDataBind="BLBPM:A_Sale_T1.DiscountAmount" BorderWidth="1" BorderColor="#DCDCDC" Express="BLBPM:A_Sale_M.DiscountAmount_FenTan*BLBPM:A_Sale_T1.Amount_Yuan/BLBPM:A_Sale_M.TotalAmount_Yuan" DisableExpress="1" TextAlign="Right" Format="type:currency;.4" BackColor="Transparent"></aspxform:XTextBox>
                            </td>
                            <td>
                                <aspxform:XTextBox id="XTextBox21" runat="server" XDataBind="BLBPM:A_Sale_T1.Amount" HiddenExpress="1" BorderWidth="1" BorderColor="#DCDCDC" width="100%" Express="BLBPM:A_Sale_T1.IQuantity*BLBPM:A_Sale_T1.UnitPrice" DisableExpress="1" FieldName="总价" TextAlign="Right" Format="type:currency;.4" BackColor="Transparent"></aspxform:XTextBox>
                                <aspxform:XTextBox id="XTextBox20" runat="server" XDataBind="BLBPM:A_Sale_T1.UnitPrice" BorderWidth="1" BorderColor="#DCDCDC" width="100%" Express="BLBPM:A_Sale_T1.Amount2/BLBPM:A_Sale_T1.IQuantity" DisableExpress="1" FieldName="单价" TextAlign="Right" Format="type:number;.4" BackColor="Transparent"></aspxform:XTextBox>
                            </td>
                            <td align="right">
                                <aspxform:XTextBox id="XTextBox70" runat="server" XDataBind="BLBPM:A_Sale_T1.Amount2" BorderWidth="1px" BorderColor="Gainsboro" width="100%" Express="BLBPM:A_Sale_T1.Amount_Yuan-BLBPM:A_Sale_T1.DiscountAmount" Max="0" Min="0" DisableExpress="1" FieldName="总价" ValueToDisplayText HiddenInput="False" PlaceHolder TextAlign="Right" Format="type:currency;.4"></aspxform:XTextBox>
                            </td>
                            <td>
                                <aspxform:XDropDownList id="XDropDownList10" runat="server" HiddenExpress="1" XDataSource="DataSource:BLBPM;ProcedureName:P_GetIPrice_Purchase;Filter:@supplierName->'山东博丽玻璃股份有限公司',@cinvtoryCode->BLBPM:A_Sale_T1.ProductCode" ValueColumn="dj" DisplayColumn="dj" DataMap="dj->BLBPM:A_Sale_T1.ext11" BackColor="Transparent"></aspxform:XDropDownList>
                                <aspxform:XTextBox id="XTextBox7" runat="server" XDataBind="BLBPM:A_Sale_T1.ext11" BorderWidth="1" BorderColor="#DCDCDC" width="100%" FieldName="单位成本" TextAlign="Right" Format="type:currency;.4" BackColor="Transparent"></aspxform:XTextBox>
                            </td>
                            <td>
                                <aspxform:XRequiredFieldValidator id="XRequiredFieldValidator13" runat="server" ForeColor="Red" Display="None" ErrorMessage="请输入成本额" ControlToValidate="XTextBox14">RFV13</aspxform:XRequiredFieldValidator>
                                <aspxform:XTextBox id="XTextBox14" runat="server" XDataBind="BLBPM:A_Sale_T1.CostPrice" BorderWidth="1" BorderColor="#DCDCDC" width="100%" Express="BLBPM:A_Sale_T1.ext11*BLBPM:A_Sale_T1.IQuantity" FieldName="成本额" TextAlign="Right" Format="type:currency;.2" BackColor="Transparent"></aspxform:XTextBox>
                            </td>
                            <td>
                                <aspxform:XDataBrowserButton id="XDataBrowserButton3" runat="server" Width="25px" XDataSource="DataSource:BLBPM;TableName:V_CusSup" DataMap="CustomerCode->BLBPM:A_Sale_T1.ext4;CustomerName->BLBPM:A_Sale_T1.ext5" DisplayColumns="CustomerCode:客户编码,150;CustomerName:客户名称,300;CUstomerAltek:客户简称,100"></aspxform:XDataBrowserButton>
                                <aspxform:XTextBox id="XTextBox26" runat="server" XDataBind="BLBPM:A_Sale_T1.ext4" HiddenExpress="1" BorderWidth="1px" BorderColor="Gainsboro" width="100%" Express="BLBPM:A_Sale_M.ext4" Max="0" Min="0" DisableExpress="1" ValueToDisplayText HiddenInput="False" PlaceHolder BackColor="Transparent"></aspxform:XTextBox>
                                <aspxform:XTextBox id="XTextBox19" runat="server" XDataBind="BLBPM:A_Sale_T1.ext5" BorderWidth="1" BorderColor="#DCDCDC" width="80%" Express="BLBPM:A_Sale_M.ext5" DisableExpress="1" FieldName="中间商" BackColor="Transparent"></aspxform:XTextBox>
                            </td>
                            <td>
                                <aspxform:XTextBox id="XTextBox24" runat="server" XDataBind="BLBPM:A_Sale_T1.ext12" BorderWidth="1" BorderColor="#DCDCDC" width="100%" FieldName="单价" TextAlign="Right" Format="type:currency;.4" BackColor="Transparent"></aspxform:XTextBox>
                            </td>
                            <td>
                                <aspxform:XTextBox id="XTextBox25" runat="server" XDataBind="BLBPM:A_Sale_T1.ext3" BorderWidth="1" BorderColor="#DCDCDC" width="100%" Express="BLBPM:A_Sale_T1.IQuantity*BLBPM:A_Sale_T1.ext12" FieldName="总价" TextAlign="Right" Format="type:currency;.2" BackColor="Transparent"></aspxform:XTextBox>
                            </td>
                            <td>
                                <aspxform:XRequiredFieldValidator id="XRequiredFieldValidator3" runat="server" ForeColor="Red" Display="None" ErrorMessage="请选择业务类型" ControlToValidate="XDropDownList22">RFV3</aspxform:XRequiredFieldValidator>
                                <aspxform:XDropDownList id="XDropDownList22" runat="server" Width="100%" XDataBind="BLBPM:A_Sale_T1.BussinessType" XDataSource="DataSource:BLBPM;TableName:A_BaseData;Filter:IText->'内贸现货',IClassName->'业务流程',IClass->BLBPM:A_Sale_M.SaleType" ValueColumn="IText" DisplayColumn="IText" FieldName="业务类型" BackColor="Transparent" PromptText="请选择..."></aspxform:XDropDownList>
                            </td>
                            <td align="left">
                                <aspxform:XRequiredFieldValidator id="XRequiredFieldValidator7" runat="server" Width="82px" DisableExpress="if(BLBPM:A_Sale_T1.cGroupCode=='0',1,0)" ForeColor="Red" Display="None" ErrorMessage="请输入装箱率。" ControlToValidate="XTextBox22">RFV7</aspxform:XRequiredFieldValidator>
                                <aspxform:XTextBox id="XTextBox50" runat="server" XDataBind="hsl" HiddenExpress="if(BLBPM:A_Sale_T1.cGroupCode=='0',0,1)" BorderWidth="1" BorderColor="LightGray" width="100%" Visibility="False" DisableBehavior="ReadOnly" BackColor="LightGray" ReadOnly="True"></aspxform:XTextBox>
                                <aspxform:XTextBox id="XTextBox22" runat="server" XDataBind="BLBPM:A_Sale_T1.PackingRate" HiddenExpress="if(BLBPM:A_Sale_T1.cGroupCode=='0',1,0)" BorderWidth="1" BorderColor="#DCDCDC" width="100%" FieldName="装箱率" TextAlign="Right" Format="type:number;.2" BackColor="Transparent"></aspxform:XTextBox>
                            </td>
                            <td>
                                <aspxform:XTextBox id="XTextBox51" runat="server" XDataBind="fjldw" HiddenExpress="if(BLBPM:A_Sale_T1.cGroupCode=='0',0,1)" BorderWidth="1" BorderColor="LightGray" width="100%" Visibility="False" DisableBehavior="ReadOnly" BackColor="LightGray" ReadOnly="True"></aspxform:XTextBox>
                                <aspxform:XTextBox id="XTextBox104" style="HEIGHT: 18px; WIDTH: 139px" runat="server" XDataBind="BLBPM:A_Sale_T1.IUnit1" HiddenExpress="1" BorderWidth="1" BorderColor="#DCDCDC" width="100%" FieldName="辅计量单位" BackColor="Transparent"></aspxform:XTextBox>
                                <aspxform:XTextBox id="XTextBox23" runat="server" Height="19px" XDataBind="BLBPM:A_Sale_T1.PackingUint" HiddenExpress="if(BLBPM:A_Sale_T1.cGroupCode=='0',1,0)" BorderWidth="1px" BorderColor="Gainsboro" width="100%" Visibility="False" Max="0" Min="0" DisableExpress="1" ValueToDisplayText HiddenInput="False" TextAlign="Center" BackColor="Transparent"></aspxform:XTextBox>
                            </td>
                            <td align="right">
                                <aspxform:XTextBox id="XTextBox112" runat="server" XDataBind="fsl" HiddenExpress="if(BLBPM:A_Sale_T1.cGroupCode=='0',0,1)" BorderWidth="1" BorderColor="LightGray" width="100%" Visibility="False" DisableBehavior="ReadOnly" BackColor="LightGray" ReadOnly="True"></aspxform:XTextBox>
                                <aspxform:XTextBox id="XTextBox103" runat="server" XDataBind="BLBPM:A_Sale_T1.ICount" HiddenExpress="if(BLBPM:A_Sale_T1.cGroupCode=='0',1,0)" BorderWidth="1" BorderColor="#DCDCDC" width="100%" Express="BLBPM:A_Sale_T1.IQuantity/BLBPM:A_Sale_T1.PackingRate" DisableExpress="1" FieldName="辅数量" TextAlign="Right" Format="type:number;.2" BackColor="Transparent"></aspxform:XTextBox>
                            </td>
                            <td>
                                <aspxform:XRequiredFieldValidator id="XRequiredFieldValidator10" runat="server" ForeColor="Red" Display="None" ErrorMessage="请输入客户货号" ControlToValidate="XTextBox15">R10</aspxform:XRequiredFieldValidator>
                                <aspxform:XTextBox id="XTextBox15" runat="server" XDataBind="BLBPM:A_Sale_T1.NewCusPNumber" BorderWidth="1" BorderColor="#DCDCDC" width="100%" Express="if(BLBPM:A_Sale_M.SaleType=='外贸','',BLBPM:A_Sale_T1.ProductCode)" FieldName="客户货号"></aspxform:XTextBox>
                                <aspxform:XTextBox id="XTextBox141" runat="server" XDataBind="BLBPM:A_Sale_T1.CustomerPNumber" HiddenExpress="1" BorderWidth="1" BorderColor="#DCDCDC" width="100%" Express="javascript('getCusP',BLBPM:A_Sale_T1.NewCusPNumber)" DisableExpress="1"></aspxform:XTextBox>
                            </td>
                            <td align="right" class="xhd">
                                <aspxform:XLabel id="XLabel15" runat="server" Width="100%" XDataBind="BLBPM:A_Sale_T1.Shipment" FieldName="累计发货量" TextAlign="Right" Text="0"></aspxform:XLabel>
                            </td>
                            <td align="center" class="xhd">
                                <aspxform:XDropDownList id="XDropDownList9" runat="server" Width="100%" XDataBind="BLBPM:A_Sale_T1.canshu" HiddenExpress="1" Visibility="False" XDataSource="DataSource:BLBPM;ProcedureName:P_GetStr3_Sale;Filter:@NO->BLBPM:A_Sale_T1.NO,@iquantity->BLBPM:A_Sale_T1.IQuantity,@ptaskID->BLBPM:A_Sale_T1.PTaskID,@supplier->BLBPM:A_Sale_T1.BussinessType,@vNumber->BLBPM:A_Sale_T1.VersionNumber,@isFromOld->BLBPM:A_Sale_T1.IsFormOld,@isChecked->BLBPM:A_Sale_T1.IsChecked" ValueColumn="Column1" DisplayColumn="Column1"></aspxform:XDropDownList>
                                <aspxform:XDropDownList id="XDropDownList12" runat="server" Width="100%" XDataBind="BLBPM:A_Sale_T1.ITax" Express="if(BLBPM:A_Sale_M.SaleType=='内贸',13,0)" XDataSource="DataSource:BLBPM;TableName:A_BaseData;Filter:IClassName->'税率'" ValueColumn="IValue" DisplayColumn="IText" DisableExpress="if(BLBPM:A_Sale_M.SaleType=='内贸',0,1)" FieldName="税率"></aspxform:XDropDownList>
                            </td>
                            <td>
                                <aspxform:XTextBox id="XTextBox85" runat="server" XDataBind="BLBPM:A_Sale_T1.NetWeight" BorderWidth="1" BorderColor="#DCDCDC" width="100%" FieldName="净重" TextAlign="Right" Format="type:currency;.3"></aspxform:XTextBox>
                            </td>
                            <td>
                                <aspxform:XTextBox id="XTextBox126" runat="server" XDataBind="BLBPM:A_Sale_T1.CrossWeight" BorderWidth="1" BorderColor="#DCDCDC" width="100%" FieldName="毛重" TextAlign="Right" Format="type:currency;.3"></aspxform:XTextBox>
                            </td>
                            <td>
                                <aspxform:XTextBox id="XTextBox127" runat="server" XDataBind="BLBPM:A_Sale_T1.ProLong" BorderWidth="1" BorderColor="#DCDCDC" width="100%" FieldName="" TextAlign="Right" Format="type:currency;.3"></aspxform:XTextBox>
                            </td>
                            <td>
                                <aspxform:XTextBox id="XTextBox128" runat="server" XDataBind="BLBPM:A_Sale_T1.ProWide" BorderWidth="1" BorderColor="#DCDCDC" width="100%" FieldName="" TextAlign="Right" Format="type:currency;.3"></aspxform:XTextBox>
                            </td>
                            <td>
                                <aspxform:XTextBox id="XTextBox129" runat="server" XDataBind="BLBPM:A_Sale_T1.ProHigh" BorderWidth="1" BorderColor="#DCDCDC" width="100%" FieldName="" TextAlign="Right" Format="type:currency;.3"></aspxform:XTextBox>
                            </td>
                            <td class="xhd">
                                <aspxform:XLabel id="XLabel3" runat="server" Width="23px" XDataBind="BLBPM:A_Sale_T1.BoxNumber" HiddenExpress="1" Express="BLBPM:A_Sale_T1.IQuantity*BLBPM:A_Sale_T1.PackingRate" Visibility="False" ValueToDisplayText></aspxform:XLabel>
                                <aspxform:XLabel id="XLabel6" runat="server" XDataBind="BLBPM:A_Sale_T1.BoxWeight" HiddenExpress="1" Express="BLBPM:A_Sale_T1.SumBoxWeight/BLBPM:A_Sale_T1.BoxNumber" Visibility="False"></aspxform:XLabel>
                                <aspxform:XLabel id="XLabel7" runat="server" XDataBind="BLBPM:A_Sale_T1.SumBoxWeight" HiddenExpress="1" Express="BLBPM:A_Sale_T1.NetWeight*BLBPM:A_Sale_T1.IQuantity" Visibility="False" ValueToDisplayText Format="type:number;.2"></aspxform:XLabel>
                                <aspxform:XLabel id="XLabel8" runat="server" XDataBind="BLBPM:A_Sale_T1.RoughWeight" HiddenExpress="1" Express="BLBPM:A_Sale_T1.SumRoughWeight/BLBPM:A_Sale_T1.BoxNumber" Visibility="False" Format="type:number;.2"></aspxform:XLabel>
                                <aspxform:XLabel id="XLabel9" runat="server" XDataBind="BLBPM:A_Sale_T1.SumRoughWeight" HiddenExpress="1" Express="BLBPM:A_Sale_T1.CrossWeight*BLBPM:A_Sale_T1.IQuantity" Visibility="False" ValueToDisplayText Format="type:number;.2"></aspxform:XLabel>
                                <aspxform:XLabel id="XLabel10" runat="server" XDataBind="BLBPM:A_Sale_T1.Size" HiddenExpress="1" Express="BLBPM:A_Sale_T1.Tbulk/BLBPM:A_Sale_T1.BoxNumber" Visibility="False" ValueToDisplayText Format="type:number;.2"></aspxform:XLabel>
                                <aspxform:XLabel id="XLabel11" runat="server" XDataBind="BLBPM:A_Sale_T1.SumSize" HiddenExpress="1" Express="BLBPM:A_Sale_T1.Tbulk*BLBPM:A_Sale_T1.IQuantity" Visibility="False" Format="type:number;.2"></aspxform:XLabel>
                                <aspxform:XLabel id="XLabel13" runat="server" XDataBind="BLBPM:A_Sale_T1.Tbulk" HiddenExpress="1" Visibility="False"></aspxform:XLabel>
                                <aspxform:XLabel id="XLabel23" runat="server" XDataBind="BLBPM:A_Sale_T1.VersionNumber" Visibility="False" text="Label"></aspxform:XLabel>
                                <aspxform:XTextBox id="XTextBox4" runat="server" XDataBind="BLBPM:A_Sale_T1.PTaskID" HiddenExpress="1" BorderWidth="1px" BorderColor="Gainsboro" width="20px" Max="0" Min="0" ValueToDisplayText HiddenInput="False"></aspxform:XTextBox>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>

Published by

风君子

独自遨游何稽首 揭天掀地慰生平

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注