<%@ Page Language="C#" %>
<%@ Register TagPrefix="aspxform" Namespace="XFormDesigner.Framework.Web.UI" Assembly="XFormDesigner.Framework" %>
<script runat="server">

    // Insert page code here
    //

</script>
<html xmlns:xform="xmlns:xform">
<head runat="server">
    <link href="/Oimec/Styles/css/StyleSheet.css" rel="Stylesheet" type="text/css" />
    <title>BPM Form</title> <style>
    BODY {FONT-SIZE: 12px; FONT-FAMILY: verdana}
    TABLE {border-collapse: collapse; FONT-SIZE: 12px; FONT-FAMILY: verdana}
    P {PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-SIZE: 12px; FONT-FAMILY: verdana}
    TD {PADDING-RIGHT: 0px; PADDING-LEFT: 2px; PADDING-BOTTOM: 0px}
    TD.NoPadding {PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px}
    INPUT {HEIGHT: 20px}
    INPUT.UL {BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: #33ff33 1px solid}
    TEXTAREA {FONT-SIZE:12px}
    </style>
    <script>
        function sn(a, b) {
            var state = request("formstate");
            var id = request("key");
            if (a != "" && b != "" && state == "New") {
                {
                    YZSoft.Ajax.request({
                        url: YZSoft.$url('Oimec/ApiServices/MDAPIHandler.ashx'),
                        method: 'POST',
                        params: {
                            method: 'IsProductExist',
                            PrdtModelNo: a//产品型号
                        },
                        success: function (action) {
                            var result = action.result;
                            agent.Eles[document.getElementById("XTextBox1").getAttribute("xform_xele_index")].setValue(result.Value);
                        },
                        failure: function (action) {
                        }
                    });
                }
            }
        }

            function request(paras){
                var url = location.href;
                var paraString = url.substring(url.indexOf("?")+1,url.length).split("&");
                var paraObj = {};
                for(i=0; j=paraString[i]; i++)
                {
                    paraObj[j.substring(0,j.indexOf("=")).toLowerCase()] = j.substring(j.indexOf("=")+1,j.length);
                }
                var returnValue = paraObj[paras.toLowerCase()];
                if(typeof(returnValue)=="undefined")
                {  return "";  }
                else
                {  return returnValue; }
            }

</script>
</head>
<body>
    <form runat="server">
        <table width="1200" align="center" class="head" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td class="logo">
                    </td>
                    <td class="biaoti">
                        <asp:Label id="XLabel2" runat="server" value valuetodisplaytext text="产品主数据"></asp:Label></td>
                    <td class="formno">
                        <%--  <aspxform:XLabel id="XLabel93" runat="server" text="表单号：" ValueToDisplayText Value></aspxform:XLabel>
                        <aspxform:XLabel id="XLabel94" runat="server" text="----自动生成------" ValueToDisplayText Value></aspxform:XLabel>--%></td>
                </tr>
            </tbody>
        </table>
        <br />
        <table align="center" class="table">
            <tbody>
                <tr>
                    <td class="basiclblfirst" style="WIDTH: 10%">
                        <asp:Label id="XLabel19" runat="server" value valuetodisplaytext text="创建用户"></asp:Label></td>
                    <td class="basictextfirst" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox20" runat="server" ValueToDisplayText="TableName:V_Users;FilterColumn:Account;DisplayColumn:DisplayName" XDataBind="DF_PRODUCTS.CreateName" Width="53%" CssClass="text" backColor="#e6f1f8" ReadOnly="True"></aspxform:XTextBox>
                    </td>
                    <td class="basiclblfirst3" style="WIDTH: 10%">
                        <asp:Label id="XLabel49" runat="server" value valuetodisplaytext text="创建日期"></asp:Label></td>
                    <td class="basictextfirst3" style="WIDTH: 35%">
                        <aspxform:XDateTimePicker id="XDateTimePicker4" runat="server" XDataBind="DF_PRODUCTS.CreateDate" Width="46%" CssClass="text" backColor="#e6f1f8" DisplayOnly="True"></aspxform:XDateTimePicker>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <table align="center" class="table">
            <tbody>
                <tr>
                    <td height="24" class="title1" colspan="4">
                        <asp:Label id="XLabel1" runat="server" value valuetodisplaytext text="基本信息"></asp:Label>
                        <aspxform:XTextBox id="XTextBox1" runat="server" ValueToDisplayText Max="0" Min="0" Value Express="javascript('sn',DF_PRODUCTS.PrdtModelNo,DF_PRODUCTS.PrdtName)" width="53px" HiddenInput="True" BorderWidth="1px" BorderColor="Gainsboro"></aspxform:XTextBox>
                        <aspxform:XTextBox id="XTextBox3" runat="server" ValueToDisplayText Width="67px" Max="0" Min="0" Value HiddenInput="True" BorderWidth="1px" BorderColor="Gainsboro">0</aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td class="basiclblfirst" style="WIDTH: 10%">
                        <asp:Label id="XLabel5" runat="server" value valuetodisplaytext text="产品ID" forecolor="Black"></asp:Label></td>
                    <td class="basiclblfirst" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox10" runat="server" XDataBind="DF_PRODUCTS.PrdtID" Width="100px" CssClass="text" backColor="#e6f1f8" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC"></aspxform:XTextBox>
                    </td>
                    <td class="basiclblfirst" style="WIDTH: 10%">
                        <asp:Label id="Label1" runat="server" value valuetodisplaytext text="主物料编号"></asp:Label></td>
                    <td class="basiclblfirst" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox22" runat="server" XDataBind="DF_PRODUCTS.PrdtSAPID" Width="100px" CssClass="text" backColor="#e6f1f8" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC"></aspxform:XTextBox>
                        <aspxform:XDataBrowserButton id="XDataBrowserButton1" runat="server" Width="21px" DisplayColumns="PrdtID:产品BPM编号,100;PrdtName:产品名称,120;PrdtModelNo:产品型号,120;ManufacturerName:厂商名称,150;ProprietarySapID:自营物料SAPID,100;SalesSapID:销售物料SAPID,100" DataMap="PrdtID->DF_PRODUCTS.PrdtSAPID" XDataSource="TableName:V_DF_PRODUCTS_ProductManagement;Filter:PrdtStatus->'公共可用';OrderBy:PrdtID desc"></aspxform:XDataBrowserButton>
                    </td>
                </tr>
                <tr>
                    <td class="basiclblfirst" style="WIDTH: 10%">
                        <asp:Label id="XLabel3" runat="server" value valuetodisplaytext text="转租赁产品SAPID"></asp:Label></td>
                    <td class="basiclblfirst" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox2" runat="server" XDataBind="DF_PRODUCTS.SapID" Width="100px" CssClass="text" BorderWidth="1" BorderColor="#DCDCDC"></aspxform:XTextBox>
                    </td>
                    <td class="basiclblfirst" style="WIDTH: 10%">
                        <asp:Label id="XLabel17" runat="server" value valuetodisplaytext text="自营产品SAPID"></asp:Label></td>
                    <td class="basiclblfirst" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox7" runat="server" XDataBind="DF_PRODUCTS.ProprietarySapID" Width="100px" CssClass="text" BorderWidth="1" BorderColor="#DCDCDC"></aspxform:XTextBox>
                        <aspxform:XTextBox id="XTextBox9" runat="server" XDataBind="DF_PRODUCTS.State" Width="50%" CssClass="text" backColor="#e6f1f8" ReadOnly="True" HiddenInput="True" BorderWidth="1" BorderColor="#DCDCDC">4</aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td class="basiclblfirst" style="WIDTH: 10%">
                        <asp:Label id="XLabel6" runat="server" value valuetodisplaytext text="技术服务SAPID"></asp:Label></td>
                    <td class="basiclblfirst" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox5" runat="server" XDataBind="DF_PRODUCTS.ServicesSapID" Width="100px" CssClass="text" BorderWidth="1" BorderColor="#DCDCDC"></aspxform:XTextBox>
                    </td>
                    <td class="basiclblfirst" style="WIDTH: 10%">
                        <asp:Label id="XLabel4" runat="server" value valuetodisplaytext text="销售产品SAPID"></asp:Label></td>
                    <td class="basiclblfirst" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox6" runat="server" XDataBind="DF_PRODUCTS.SalesSapID" Width="100px" CssClass="text" BorderWidth="1" BorderColor="#DCDCDC"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td class="basiclblfirst" style="WIDTH: 10%">
                        <asp:Label id="XLabel12" runat="server" value valuetodisplaytext text="厂商"></asp:Label>
                        <aspxform:XTextBox id="XTextBox8" runat="server" XDataBind="DF_PRODUCTS.ManufacturerID" Width="8px" HiddenInput="True" BorderWidth="1" BorderColor="#DCDCDC"></aspxform:XTextBox>
                    </td>
                    <td class="basiclblfirst" style="WIDTH: 35%">
                        <aspxform:XDropDownList id="XDropDownList10" runat="server" XDataBind="DF_PRODUCTS.Manufacturer" Width="50%" DataMap="Value->DF_PRODUCTS.ManufacturerID" XDataSource="TableName:V_DF_DataSourceList_changshang;OrderBy:OrderID" DisplayColumn="Name" ValueColumn="ItemID" PromptText="--请选择--">
                            <asp:ListItem>未绑定</asp:ListItem>
                        </aspxform:XDropDownList>
                        <aspxform:XTextBox id="XTextBox11" runat="server" ValueToDisplayText XDataBind="DF_PRODUCTS.OtherManufacturer" Max="0" Min="0" Value width="141px" HiddenInput="False" BorderWidth="1px" BorderColor="Gainsboro" HiddenExpress="DF_PRODUCTS.Manufacturer!=773"></aspxform:XTextBox>
                    </td>
                    <td class="basiclblfirst" style="WIDTH: 10%">
                        <asp:Label id="XLabel7" runat="server" value valuetodisplaytext text="其他服务SAPID"></asp:Label></td>
                    <td class="basiclblfirst" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox4" runat="server" XDataBind="DF_PRODUCTS.OtherSapID" Width="100px" CssClass="text" BorderWidth="1" BorderColor="#DCDCDC"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td class="basiclblfirst" style="WIDTH: 10%">
                        <asp:Label id="XLabel8" runat="server" value valuetodisplaytext text="产品型号"></asp:Label></td>
                    <td class="basiclblfirst" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox12" runat="server" XDataBind="DF_PRODUCTS.PrdtModelNo" Width="50%" BorderWidth="1" BorderColor="#DCDCDC"></aspxform:XTextBox>
                    </td>
                    <td class="basiclblfirst" style="WIDTH: 10%">
                        <asp:Label id="XLabel9" runat="server" value valuetodisplaytext text="产品型号" hiddenexpress="1"></asp:Label></td>
                    <td class="basiclblfirst" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox13" runat="server" XDataBind="DF_PRODUCTS.PrdtModelNos" Width="50%" HiddenInput="True" BorderWidth="1" BorderColor="#DCDCDC"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td class="basiclblfirst" style="WIDTH: 10%">
                        <asp:Label id="XLabel10" runat="server" value valuetodisplaytext text="产品中文名称"></asp:Label></td>
                    <td class="basiclblfirst" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox14" runat="server" XDataBind="DF_PRODUCTS.PrdtName" Width="80%" BorderWidth="1" BorderColor="#DCDCDC"></aspxform:XTextBox>
                    </td>
                    <td class="basiclblfirst" style="WIDTH: 10%">
                        <asp:Label id="XLabel11" runat="server" value valuetodisplaytext text="大类"></asp:Label>
                        <aspxform:XTextBox id="XTextBox19" runat="server" XDataBind="DF_PRODUCTS.Type1ID" Width="8px" HiddenInput="True" BorderWidth="1" BorderColor="#DCDCDC"></aspxform:XTextBox>
                    </td>
                    <td class="basiclblfirst" style="WIDTH: 35%">
                        <aspxform:XDropDownList id="XDropDownList4" runat="server" XDataBind="DF_PRODUCTS.Type1" Width="50%" DataMap="ItemID->da;Value->DF_PRODUCTS.Type1ID" XDataSource="TableName:V_DF_DF_DataSourceList_dalei" DisplayColumn="Name" ValueColumn="ItemID" PromptText="--请选择--">
                            <asp:ListItem>未绑定</asp:ListItem>
                        </aspxform:XDropDownList>
                        <aspxform:XTextBox id="XTextBox15" runat="server" ValueToDisplayText XDataBind="da" Max="0" Min="0" Value width="95px" HiddenInput="True" BorderWidth="1px" BorderColor="Gainsboro" BorderStyle="Dotted"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td class="basiclblfirst" style="WIDTH: 10%">
                        <asp:Label id="XLabel14" runat="server" value valuetodisplaytext text="产品英文名称"></asp:Label></td>
                    <td class="basiclblfirst" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox16" runat="server" XDataBind="DF_PRODUCTS.PrdtEngDes" Width="80%" BorderWidth="1" BorderColor="#DCDCDC"></aspxform:XTextBox>
                    </td>
                    <td class="basiclblfirst" style="WIDTH: 10%">
                        <asp:Label id="XLabel15" runat="server" value valuetodisplaytext text="中类"></asp:Label>
                        <aspxform:XTextBox id="XTextBox21" runat="server" XDataBind="DF_PRODUCTS.Type2ID" Width="8px" HiddenInput="True" BorderWidth="1" BorderColor="#DCDCDC"></aspxform:XTextBox>
                    </td>
                    <td class="basiclblfirst" style="WIDTH: 35%">
                        <aspxform:XDropDownList id="XDropDownList5" runat="server" XDataBind="DF_PRODUCTS.Type2" Width="50%" DataMap="ItemID->zhong;Value->DF_PRODUCTS.Type2ID" XDataSource="TableName:V_DF_DF_DataSourceList_zhonglei;Filter:LdType->da" DisplayColumn="Name" ValueColumn="ItemID" PromptText="--请选择--">
                            <asp:ListItem>未绑定</asp:ListItem>
                        </aspxform:XDropDownList>
                        <aspxform:XTextBox id="XTextBox17" runat="server" ValueToDisplayText XDataBind="zhong" Max="0" Min="0" Value width="95px" HiddenInput="True" BorderWidth="1px" BorderColor="Gainsboro" BorderStyle="Dotted"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td class="basiclblfirst" style="WIDTH: 10%">
                        <asp:Label id="XLabel13" runat="server" value valuetodisplaytext text="产品状态"></asp:Label></td>
                    <td class="basiclblfirst" style="WIDTH: 35%">
                        <aspxform:XDropDownList id="XDropDownList9" runat="server" XDataBind="DF_PRODUCTS.PrdtStatus" Width="30%" XDataSource="TableName:V_DF_DataSourceList_chanpingzhuangtai;Filter:LdValue->DF_PRODUCTS.State" DisplayColumn="Name" ValueColumn="ItemID">
                            <asp:ListItem>未绑定</asp:ListItem>
                        </aspxform:XDropDownList>
                    </td>
                    <td class="basiclblfirst" style="WIDTH: 10%">
                        <asp:Label id="XLabel16" runat="server" value valuetodisplaytext text="自定义分类"></asp:Label></td>
                    <td class="basiclblfirst" style="WIDTH: 35%">
                        <aspxform:XDropDownList id="XDropDownList6" runat="server" XDataBind="DF_PRODUCTS.Type4" Width="50%" XDataSource="TableName:V_DF_DataSourceList_chanpinfenleiqita" DisplayColumn="Name" ValueColumn="ItemID" PromptText="--请选择--">
                            <asp:ListItem>未绑定</asp:ListItem>
                        </aspxform:XDropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="basiclblfirst" style="WIDTH: 10%">
                        <asp:Label id="Label2" runat="server" value valuetodisplaytext text="特殊发运说明"></asp:Label></td>
                    <td class="basiclblfirst" style="WIDTH: 35%">
                        <aspxform:XCheckBoxList id="XCheckBoxList1" runat="server" XDataBind="DF_PRODUCTS.ShippingRequirements">
                            <asp:ListItem>带电池</asp:ListItem>
                            <asp:ListItem>带液体</asp:ListItem>
                            <asp:ListItem>带粉末状</asp:ListItem>
                            <asp:ListItem>需要特殊发运（防震、防倾斜）</asp:ListItem>
                        </aspxform:XCheckBoxList>
                    </td>
                    <td class="basiclblfirst" style="WIDTH: 10%">
                        <asp:Label id="Label3" runat="server" value valuetodisplaytext text="原产国"></asp:Label></td>
                    <td class="basiclblfirst" style="WIDTH: 35%">
                        <aspxform:XDropDownList id="XDropDownList1" runat="server" XDataBind="DF_PRODUCTS.OriginCountry" Width="50%" XDataSource="TableName:DF_DataSourceList;Filter:Type->'原产国'" DisplayColumn="Name" ValueColumn="Name" PromptText="--请选择--">
                            <asp:ListItem>未绑定</asp:ListItem>
                        </aspxform:XDropDownList>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <table width="1200" align="center" class="table">
            <tbody>
                <tr>
                    <td class="title1">
                        <asp:Label id="XLabel22" runat="server" value valuetodisplaytext text="备注"></asp:Label></td>
                </tr>
                <tr>
                    <td class="tds1" style="BORDER-RIGHT: #93a1ae 1px solid; TEXT-ALIGN: center">
                        <aspxform:XTextBox id="XTextBox18" runat="server" ValueToDisplayText XDataBind="DF_PRODUCTS.Remark" Width="100%" CssClass="text" Max="0" Min="0" Value HiddenInput="False" BorderWidth="1px" TextMode="MultiLine" Height="76px"></aspxform:XTextBox>
                    </td>
                </tr>
            </tbody>
        </table>
        <table width="1200" align="center" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td height="22">
                        &nbsp;<aspxform:XRequiredFieldValidator id="XRequiredFieldValidator1" runat="server" ControlToValidate="XTextBox6" ValidationGroup="YZZ11" ErrorMessage="请填写具体厂商" DisableExpress="DF_PRODUCTS.Manufacturer!=773||DF_PRODUCTS.OtherManufacturer!=''"></aspxform:XRequiredFieldValidator>
                        <aspxform:XCompareValidator id="XCompareValidator1" runat="server" ControlToValidate="XTextBox1" ValidationGroup="YZZ11" ErrorMessage="数据库已存在！" ControlToCompare="XTextBox3"></aspxform:XCompareValidator>
                    </td>
                    <td>
                    </td>
                </tr>
            </tbody>
        </table>
    </form>
</body>
</html>
