| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377 |
- <%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/View.master" AutoEventWireup="true" CodeFile="GoGetOrder.aspx.cs" Inherits="EOrder_GoGetOrder" %>
- <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
- <script src="../js/plugins/jquery.fileDownload.js"></script>
- <script type="text/javascript">
- var tradeData = null;
- var orderData = null;
- var productData = null;
- var _select_ProductId = "";
- var _select_ProName = "";
- var _select_Mat = "";
- var _select_Cra = ""
- var _matBtnList = [];
- var _craBtnList = [];
-
- $(function () {
- console.log("xxxxx", productData);
- if (tradeData != null && tradeData.length > 0) {
- var tData = tradeData[0];
- orderData = tData;
- $("#id_detailMemo").html("<div style='display:flex;flex-direction:row;'><div>订单号:" + tData.ctid + "</div> <div style='margin-left:50px;'>店铺:" + tData.seller_nick + " </div><div style='margin-left:50px;'> 旺旺:" + tData.buyer_nick+"</div></div>");
- }
- if (productData != null) {
- var pHtml = "";
- for (var pItem of productData) {
- pHtml += ("<button id=\"id_pro_" + pItem.ID + "\" class=\"pbtn\" onclick=\"onProCheckedChanged('" + pItem.ID + "')\" >" + pItem.PType + "</button>");
- }
- $("#id_product").html(pHtml);
- }
-
- });
- function onProCheckedChanged(checkID) {
- checkedProduct(checkID);
- }
- function checkedProduct(pID) {
- for (var pItem of productData) {
- $("#id_pro_" + pItem.ID).removeClass("pbtn_sel");
- if (pItem.ID == pID) {
- _select_ProductId = pItem.ID;
- _select_ProName = pItem.PType;
- $("#id_pro_" + pItem.ID).addClass("pbtn_sel");
- setMaterial(pItem.PMaterial, pItem.PCraft);
- }
- }
- }
- function setMaterial(material, craft) {
- var matList = material.split(';');
- var craList = craft.split(';');
- $("#id_material").html("");
- $("#id_craft").html("");
- _craBtnList = [];
- _matBtnList = [];
- var marId = 0;
- if (matList.length > 0) {
- var mHtml = "";
- for (var pItem of matList) {
- if (pItem.length > 0) {
- mHtml += ("<button id=\"id_mat_" + marId + "\" class=\"pbtn\" onclick=\"onMatCheckedChanged('" + pItem + "'," + marId + ")\" >" + pItem + "</button>");
- _matBtnList.push("id_mat_" + marId);
- }
- marId++;
- }
- $("#id_material").html(mHtml);
- }
- var craftId = 0;
- if (craList.length > 0) {
- var cHtml = "";
- for (var pItem of craList) {
- if (pItem.length > 0) {
- cHtml += ("<button id=\"id_cra_" + craftId + "\" class=\"pbtn\" onclick=\"onCraCheckedChanged('" + pItem + "'," + craftId + ")\" >" + pItem + "</button>");
- _craBtnList.push("id_cra_" + craftId);
- }
- craftId++;
- }
- $("#id_craft").html(cHtml);
- }
- }
- function onMatCheckedChanged(mat, matId) {
- for (var btn of _matBtnList) {
- $("#" + btn).removeClass("pbtn_sel");
- }
- $("#id_mat_" + matId).addClass("pbtn_sel");
- _select_Mat = mat;
- }
- function onCraCheckedChanged(cra, craId) {
- for (var btn of _craBtnList) {
- $("#" + btn).removeClass("pbtn_sel");
- }
- $("#id_cra_" + craId).addClass("pbtn_sel");
- _select_Cra = cra;
- }
- function setFileName() {
- var long = $("#txtLong").val();
- var width = $("#txtWidth").val();
- var height = $("#txtHeight").val();
- var psize = "";
- if (long.length > 0) {
- psize += long;
- }
- if (width.length > 0) {
- if (psize.length > 0) {
- psize += "x";
- }
- psize += width;
- }
- if (height.length > 0) {
- if (psize.length > 0) {
- psize += "x";
- }
- psize += height;
- }
- if (psize.length > 0) {
- psize += "mm";
- }
- var pcount = $("#txtCount").val();
- var filename = "("+orderData.ctid + ")-" + psize + "-" + pcount + "-" + _select_ProName + _select_Mat + _select_Cra + "-" + orderData.buyer_nick + "-" + orderData.receiver_state;
- mini.get("txtSellerMemo").setValue(filename);
- }
- function professionChanged(e){
- var id = mini.get("txtProfession").getValue();
- mini.get("txtSmallPro").setValue("");
- var url = "../handler/sync.ashx?t=get_small_profession&pid=" + id
- mini.get("txtSmallPro").setUrl(url);
- mini.get("txtSmallPro").select(0);
- }
- function saveGetOrderFn() {
- var parms = new Object();
- parms.ctid = orderData.ctid;
- parms.productId = _select_ProductId;
- parms.material = _select_Mat;
- parms.craft = _select_Cra;
- parms.sellerMemo = mini.get("txtSellerMemo").getValue();
- parms.otherMemo = mini.get("txtOtherMemo").getValue();
- parms.urgency = $("#txtUrgency")[0].checked ? "1" : "0";
- parms.wechat = $("#txtWechat")[0].checked ? "1" : "0";
- parms.command = $("#txtCommand")[0].checked ? "1" : "0";
- parms.pprofession = mini.get("txtProfession").getValue();
- parms.profession = mini.get("txtSmallPro").getValue();
- postAjax("getmyorder_from_init", parms, function (data) {
- resultShow(data, "grid.reload()");
- closeFn("save");
- });
-
- }
- function cancelGetOrderFn() {
- closeFn();
- }
-
- </script>
- <style type="text/css">
- .win_tb {
- width: 96%;
- margin-left: auto;
- margin-right: auto;
- margin-top: 10px;
- background-color: #dedede;
- }
- .pbtn_content{
- width:90%;
- }
- .pbtn{
- width:auto;
- text-align:center;
- min-width:50px;
- height:25px;
- line-height:25px;
- margin-left:15px;
- margin-top:10px;
- border:1px solid gray;
- padding-left:5px;
- padding-right:5px;
- }
- .pbtn_sel{
- width:auto;
- text-align:center;
- background-color:Highlight;
- color:white;
- min-width:50px;
- height:25px;
- line-height:25px;
- margin-left:15px;
- margin-top:10px;
- border:1px solid gray;
- padding-left:5px;
- padding-right:5px;
- }
- .win_tb td {
- height: 36px;
- background-color: #fff;
- font-size: 14px;
- padding: 5px;
- }
- .win_tb input[type=text] {
- width: 90%;
- height: 24px;
- font-size: 14px;
- }
- .win_tb input[type=checkbox] {
- width: 18px;
- height: 18px;
- }
- .win_tb select {
- font-size: 14px;
- height: 30px;
- padding: 0px 5px;
- }
- .win_tb .td1 {
- color: #666;
- background-color: #F8F8F8;
- text-align: center;
- }
- .win_tb .td2 {
- }
- .word_tui {
- border-radius: 50%;
- background-color: red;
- color: white;
- font-size: 14px;
- text-align: center;
- padding: 3px;
- margin-left: 5px;
- }
- .word_shou {
- background-color: saddlebrown;
- }
- .word_green {
- background-color: forestgreen;
- }
- .state_word{
- width:70px;
- text-align:center;
- padding:3px 6px;
- text-align:center;
- font-weight:bold;
- color:white;
- background-color:forestgreen;
- }
- .mini-grid-cell-nowrap {
- overflow: hidden;
- /* white-space: nowrap;
- text-overflow: ellipsis; */
- word-break: keep-all;
- word-wrap: break-word;
- white-space: normal;
- }
- .mini-tab-text{
- padding:4px;
- }
- .order-info{
- font-size:14px;
- width:98%;
- margin:0px auto;
- }
- .order-info fieldset{
- border: solid 1px #dedede; padding: 3px;
- margin-bottom:10px;
- color:#666;
- line-height:25px;
- }
- .order-detail{
- font-size:14px;
- width:98%;
- margin:0px auto;
- }
- .order-detail fieldset{
- border: solid 1px #dedede;
- padding: 3px;
- margin-bottom:10px;
- color:#666;
- line-height:25px;
- }
- .mini-tabs-scrollCt{
- border:0px;
- margin-top:5px;
- }
- /*.win_tb input{height:20px;}
- .win_tb .td1{height:35px;width:120px;font-size:12px;text-align:center;}
- .win_tb .td2{height:35px;width:280px;font-size:12pt;padding-left:5px;text-align:left;}*/
- </style>
- </asp:Content>
- <asp:Content ID="Content2" ContentPlaceHolderID="btn" runat="Server">
- <div style="width: 100%;">
- <div class="order-info">
- <fieldset>
- <legend>基本信息</legend>
- <div style="padding: 5px;" id="id_detailMemo">
- </div>
- </fieldset>
- <fieldset>
- <legend>文件名(产品规格)</legend>
- <div style="display: flex; flex-direction: column;">
- <div style="display: flex; flex-direction: row; border-bottom: 1px solid gray; padding-bottom: 15px;">
- <div style="width: 5%;">产品:</div>
- <div style="width: 94%;" id="id_product">
- </div>
- </div>
- <div style="display: flex; flex-direction: row; border-bottom: 1px solid gray; padding-bottom: 15px;">
- <div style="width: 5%;">材质:</div>
- <div style="width: 94%;" id="id_material">
- </div>
- </div>
- <div style="display: flex; flex-direction: row;border-bottom: 1px solid gray; padding-bottom: 15px;">
- <div style="width: 5%;">工艺:</div>
- <div style="width: 94%;" id="id_craft">
- </div>
- </div>
- </div>
- <div style="display: flex; flex-direction: column;">
- <div style="margin-top:6px;margin-bottom:10px;">
- <span style="width: 5%;">尺寸:</span><span>长</span><input style="width:50px; height:20px;" type="text" id="txtLong" /><span>宽</span><input style="width:50px; height:20px;" type="text" id="txtWidth" /><span>高</span><input style="width:50px; height:20px;" type="text" id="txtHeight" /><span>mm</span>
- <span style="width: 5%;margin-left:15px;">数量:</span><input style="height:20px;" type="text" id="txtCount" />
- </div>
- <div style="display:flex;flex-direction:column;">
- <span style="width: 100%;">产品规格(文件名)</span>
- <div>
- <textarea id="txtSellerMemo" class="mini-textarea" style="width: 60%; height: 60px;"></textarea>
- <textarea id="txtOtherMemo" class="mini-textarea" emptyText="请输入额外的备注" style="width: 20%; height: 60px;"></textarea>
- <a class="mini-button mini-button-info" style="margin-left:10px;margin-bottom:5px;" iconcls="icon-edit" onclick="setFileName">生成文件名</a>
- </div>
-
- </div>
-
- </div>
-
- </fieldset>
- <fieldset>
- <legend>特殊标记</legend>
- <div style="padding: 5px;">
- <span>是否加急</span>
- <input type="checkbox" id="txtUrgency" />
- <span style="margin-left:15px;">微信单</span>
- <input type="checkbox" id="txtWechat" />
- <span style="margin-left:15px;">推购单</span>
- <input type="checkbox" id="txtCommand" />
- <span style="margin-left:15px;">大行业</span>
- <input id="txtProfession" class="mini-combobox" style="width: 150px;" textfield="name" valuefield="id" onvaluechanged="professionChanged" url="../handler/sync.ashx?t=get_erp_profession" shownullitem="true" />
- <span>小行业</span>
- <input id="txtSmallPro" class="mini-combobox" style="width: 150px;" textfield="name" valuefield="id" />
- </div>
- </fieldset>
- <a class="mini-button mini-button-success" style="margin-left:40%; margin-top:15px;margin-bottom:15px;" iconcls="icon-ok" onclick="saveGetOrderFn">领单</a>
- <a class="mini-button mini-button-danger" style="margin-left:20px;margin-top:15px; margin-bottom:15px;" iconcls="icon-cancel" onclick="cancelGetOrderFn">取消</a>
- </div>
-
- </div>
- </asp:Content>
|