| | |
| | | { |
| | | if (row < 1) row = dwc_list.GetRow(); |
| | | if (row < 1 || row > dwc_list.GetRowCount()) return 1; |
| | | KXMLDOMElement e = g_xdoc_shoppingcart.getRowElement(L"data/Item", row); |
| | | KXMLDOMElement e = dwc_list.GetRowElement(row); |
| | | return e; |
| | | } |
| | | |
| | |
| | | xs.SetContent(html); |
| | | xs.Redraw(); |
| | | |
| | | xstring skuno = g_xdoc_product.getData(0, L"data/Item", row, L"SKUNo"); |
| | | xstring skuno = dw_list.GetItemString(row, L"SKUNo"); |
| | | OnShowImage(skuno); |
| | | |
| | | return 1; |
| | |
| | | xs.SetContent(html); |
| | | xs.Redraw(); |
| | | |
| | | xstring skuno = g_xdoc_shoppingcart.getData(0, L"data/Item", row, L"No"); |
| | | xstring skuno = dwc_list.GetItemString(row, L"No"); |
| | | //alert(skuno); |
| | | OnShowImage(skuno); |
| | | |
| | |
| | | int MB_OKCANCEL = 1; |
| | | int MB_ICONQUESTION = 32; |
| | | if (MessageBoxW(GetHWND(), L"确认删除指定的项,删除后将不能恢复?", L"提示", MB_OKCANCEL | MB_ICONQUESTION) != IDOK) return 1; |
| | | xstring id = g_xdoc_product.getData(0, L"data/Item", row, L"@guid"); |
| | | xstring id = dw_list.GetGuid(row); |
| | | |
| | | if (ProductLibraryView::DeleteItem(id) == 1) dw_list.DeleteRow(0); |
| | | return 1; |
| | |
| | | |
| | | xstring makeHtml(int row) |
| | | { |
| | | xstring id = g_xdoc_product.getData(0, L"data/Item", row, L"@guid"); |
| | | xstring id = dw_list.GetItemString(row, L"@guid"); |
| | | xml x = GetGoodsPropList(id); |
| | | xml x1 = GetGoodsPropListEx(id); |
| | | |
| | |
| | | { |
| | | name = fieldsEx.item(i).selectSingleNode(L"@name").text(); |
| | | label = fieldsEx.item(i).selectSingleNode(L"@label").text(); |
| | | ls_item += L"<td>" + label + L"</td>" + L"<td style='text-align:center'>" + g_xdoc_product.getData(0, L"data/Item", row, name) + L"</td>"; |
| | | ls_item += L"<td>" + label + L"</td>" + L"<td style='text-align:center'>" + dw_list.GetItemString(row, name.c_str()); + L"</td>"; |
| | | cnt++; |
| | | i++; |
| | | if (i == len)break; |
| | |
| | | if (i >= len)count = 2; |
| | | continue; |
| | | } |
| | | else if (g_xdoc_product.getData(0, L"data/Item", row, name) == L"") |
| | | else if (dw_list.GetItemString(row, name.c_str()) == L"") |
| | | { |
| | | KXMLDOMNodeList options = fields.item(i).selectNodes(L"item"); |
| | | int tlen = options.length(); |
| | |
| | | } |
| | | else |
| | | { |
| | | ls_item = L"<td>" + label + L"</td>" + L"<td>" + g_xdoc_product.getData(0, L"data/Item", row, name) + L"</td>"; |
| | | ls_item = L"<td>" + label + L"</td>" + L"<td>" + dw_list.GetItemString(row, name.c_str()) + L"</td>"; |
| | | count++; |
| | | } |
| | | i++; |
| | |
| | | html += L"<div ><span style='margin-left:8px;margin-right:16px;font-weight:400;font-size:10pt' >" + dw_list.GetItemString(row, L"PackTerm") + L"</span></div>"; |
| | | } |
| | | |
| | | if (g_xdoc_product.getData(0, L"data/Item", row, L"Remark") != L"") |
| | | if (dw_list.GetItemString(row, L"Remark") != L"") |
| | | { |
| | | //html += L"<div style='height:12px'/>"; |
| | | html += L"<div ><span style='font-weight:700;width:50;font-size:10pt' >备注:</span></div>"; |
| | | html += L"<div ><span style='margin-left:8px;margin-right:16px;font-weight:400;font-size:10pt' >" + g_xdoc_product.getData(0, L"data/Item", row, L"Remark") + L"</span></div>"; |
| | | html += L"<div ><span style='margin-left:8px;margin-right:16px;font-weight:400;font-size:10pt' >" + dw_list.GetItemString(row, L"Remark") + L"</span></div>"; |
| | | } |
| | | |
| | | html += L"<div style='height:24px'/>"; |
| | |
| | | if (i == 0) |
| | | html += L"<td rowspan='" + xstring(len) + L"'>" + No + L"</td><td >" + label + L"</td><td >" + L"</td>"; |
| | | else |
| | | html += L"<td >" + label + L"</td><td >" + g_xdoc_shoppingcart.getData(0, L"data/Item", row, name) + L"</td>"; |
| | | html += L"<td >" + label + L"</td><td >" + dwc_list.GetItemString( row, name.c_str()) + L"</td>"; |
| | | html += L"</tr>"; |
| | | } |
| | | |
| | | html += L"<tr>"; |
| | | html += L"<td rowspan='3'>" + g_xdoc_shoppingcart.getData(0, L"data/Item", row, L"PackCode") + L"</td><td >包装方式</td><td >" + |
| | | g_xdoc_shoppingcart.getData(0, L"data/Item", row, L"CPack") + L"</td>"; |
| | | html += L"<td rowspan='3'>" + dwc_list.GetItemString( row, L"PackCode") + L"</td><td >包装方式</td><td >" + |
| | | dwc_list.GetItemString( row, L"CPack") + L"</td>"; |
| | | html += L"</tr>"; |
| | | html += L"<tr height='48'>"; |
| | | html += L"<td >包装要求</td><td >" + g_xdoc_shoppingcart.getData(0, L"data/Item", row, L"PackQualityTerm") + L"</td>"; |
| | | html += L"<td >包装要求</td><td >" + dwc_list.GetItemString( row, L"PackQualityTerm") + L"</td>"; |
| | | html += L"</tr>"; |
| | | html += L"<tr>"; |
| | | html += L"<td >侧唛</td><td ></td>"; |
| | | html += L"</tr>"; |
| | | |
| | | html += L"<tr height='72'>"; |
| | | html += L"<td>" + g_xdoc_shoppingcart.getData(0, L"data/Item", row, L"QualityCode") + L"</td><td >质量要求</td><td >" + |
| | | g_xdoc_shoppingcart.getData(0, L"data/Item", row, L"QualityTerm") + L"</td>"; |
| | | html += L"<td>" + dwc_list.GetItemString( row, L"QualityCode") + L"</td><td >质量要求</td><td >" + |
| | | dwc_list.GetItemString( row, L"QualityTerm") + L"</td>"; |
| | | html += L"</tr>"; |
| | | |
| | | html += L"</table>"; |
| | |
| | | return 1; |
| | | } |
| | | |
| | | int Up(xstring name) { |
| | | LPCTSTR Up(xstring name) { |
| | | //int ret1 = 3; |
| | | xstring str = name.mid(0, 2); |
| | | str = str.toUpper(); |
| | | //alert(str); |
| | | int ret1 = xaserver::UploadFile(L"product" + str, name + L".jpg", GetHWND(), L"", false); |
| | | LPCTSTR ret1 = xaserver::UploadFile((L"product" + str).c_str(), (name + L".jpg").c_str(), GetHWND(), L"", false); |
| | | |
| | | //trace(ret1); |
| | | return ret1; |
| | | } |
| | | |
| | | int OnAddImage() { |
| | | int row = dw_list.GetNextSelectRow(1); |
| | | if (row < 1) row = dw_list.GetRow(); |
| | | if (row < 1 || row > dw_list.GetRowCount()) return 0; |
| | | KXMLDOMElement e = g_xdoc_product.getRowElement(L"data/Item", row); |
| | | KXMLDOMElement e = dw_list.GetRowElement(row); |
| | | //KXMLDOMElement e = dw_list.GetRowElement(row); |
| | | //alert(e.xml); |
| | | xstring id = g_xdoc_product.getData(0, L"data/Item", row, L"@guid"); |
| | | xstring id = dw_list.GetItemString(row, L"@guid"); |
| | | //alert(id); |
| | | int ret1 = Up(id); |
| | | xstring ret1 = Up(id); |
| | | //alert(ret1.toString()); |
| | | if (ret1 == -1) |
| | | if (ret1 == L"- 1") |
| | | return -1; |
| | | if (ret1 == 0) |
| | | if (ret1 == L"0") |
| | | { |
| | | alert(L"上传图片失败"); |
| | | return -1; |
| | |
| | | |
| | | //GoodsLib:GetList($parent) goodslib.object.xq |
| | | // 图片名加入数据库 |
| | | xstring path = L"data/Item"; |
| | | g_xdoc_product.xdoc.SetXPath(path); |
| | | g_xdoc_product.setItem(path, row, L"ImgName", id + L".jpg"); |
| | | KXMLDOMElement e1 = g_xdoc_product.getRowElement(L"data/Item", row); |
| | | dw_list.SetItemString( row, L"ImgName", id + L".jpg"); |
| | | KXMLDOMElement e1 = dw_list.GetRowElement(row); |
| | | xstring val = e1.xml(); //g_xdoc_product.GetContent(); |
| | | //trace(val); |
| | | xml x ; |
| | |
| | | int row = dw_list.GetNextSelectRow(1); |
| | | if (row < 1) row = dw_list.GetRow(); |
| | | if (row < 1 || row > dw_list.GetRowCount()) return 0; |
| | | KXMLDOMElement e1 = g_xdoc_product.getRowElement(L"data/Item", row); |
| | | KXMLDOMElement e1 = dw_list.GetRowElement(row); |
| | | xstring val = e1.xml(); |
| | | xml x ; |
| | | |
| | |
| | | int row = dw_list.GetNextSelectRow(1); |
| | | if (row < 1) row = dw_list.GetRow(); |
| | | if (row < 1 || row > dw_list.GetRowCount()) return 0; |
| | | KXMLDOMElement e = g_xdoc_product.getRowElement(L"data/Item", row); |
| | | KXMLDOMElement e = dw_list.GetRowElement(row); |
| | | //KXMLDOMElement e = dw_list.GetRowElement(row); |
| | | //alert(e.xml); |
| | | xstring id = g_xdoc_product.getData(0, L"data/Item", row, L"@guid"); |
| | | xstring id = dw_list.GetItemString(row, L"@guid"); |
| | | |
| | | int pr = g_xdoc_product; |
| | | OpenWindow(L"dev:xpage[PictureView.Product3.vx]", pr); |
| | | OpenWindow(L"dev:xpage[PictureView.Product3.vx]", (LPARAM) & dw_list); |
| | | |
| | | return 1; |
| | | } |
| | |
| | | int ItemMaint() |
| | | { |
| | | HTREEITEM hItem = tv_folder.GetSelectedItem(); |
| | | KXMLDOMElement& e = tv_folder.GetItemData(hItem); |
| | | KXMLDOMElement e = tv_folder.GetItemData(hItem); |
| | | //xstring no = e.getAttribute(L"no"); |
| | | //if(no==L"") return 1; |
| | | xstring guid = e.getAttribute(L"guid"); |
| | |
| | | } |
| | | */ |
| | | |
| | | int pr = g_xdoc_product; |
| | | OpenWindow(L"dev:xpage[ProductLibraryItemMaint3.vx]", pr); |
| | | OpenWindow(L"dev:xpage[ProductLibraryItemMaint3.vx]", (LPARAM)&dw_list); |
| | | |
| | | return 1; |
| | | } |
| | |
| | | |
| | | HTREEITEM hItem = tv_folder.GetSelectedItem(); |
| | | |
| | | KXMLDOMElement& e = tv_folder.GetItemData(hItem); |
| | | KXMLDOMElement e = tv_folder.GetItemData(hItem); |
| | | |
| | | |
| | | //alert(e.xml); |
| | |
| | | dw_list.Redraw(); |
| | | impStr = L""; |
| | | |
| | | SendMessage(hObject, 0x401, (LPARAM)ls_nos, 0); |
| | | SendMessage(hObject, 0x401, (LPARAM)ls_nos.c_str(), 0); |
| | | alert(L"转入完成!"); |
| | | return 1; |
| | | } |
| | |
| | | } |
| | | else if (comdid == L"xmCarGoodsMaint") |
| | | { |
| | | OpenWindow(L"dev:xpage[ShoppingCartProductMaint.vx]", trust(g_xdoc_shoppingcart as int)); |
| | | OpenWindow(L"dev:xpage[ShoppingCartProductMaint.vx]",(LPARAM) & dwc_list); |
| | | return 1; |
| | | } |
| | | else if (comdid == L"xmCarMaint") |
| | |
| | | } |
| | | else if (comdid == L"xmPropConfigure") |
| | | { |
| | | #ifdef spending |
| | | int r = cast(g_xdoc_product.getData(L"data/Item", L"@guid") as int); |
| | | OpenWindow(L"dev:xpage[Product.ItemProp.Maint.vx]", r); |
| | | #endif |
| | | return 1; |
| | | } |
| | | else if (comdid == L"xmRertieve") |
| | |
| | | HTREEITEM hItem1 = tv_folder.GetSelectedItem(); |
| | | KXMLDOMElement e2 = tv_folder.GetItemData(hItem1); |
| | | xstring no1 = e2.getAttribute(L"no"); |
| | | xml x2 = vcontrol::RetrieveData(L"/sale/data/SO/goods/usergoods/listex1", L"parent", no1); |
| | | g_xdoc_product.Retrieve(x2); |
| | | dwc_list.PostRetrieve(); |
| | | dw_list.PostRetrieve(); |
| | | xml x2 = ViewObject::RetrieveData(L"/sale/data/SO/goods/usergoods/listex1", L"parent", no1); |
| | | dw_list.Retrieve(x2); |
| | | |
| | | return 1; |
| | | } |
| | |
| | | xstring html = L"<data>"; |
| | | while (xrow > 0) |
| | | { |
| | | KXMLDOMElement e = g_xdoc_product.getRowElement(L"data/Item", xrow); |
| | | KXMLDOMElement e = dw_list.GetRowElement(xrow); |
| | | goodsid = ProductLibraryView::GetElementString(e, L"@guid"); |
| | | html += L"<item goodid='" + goodsid + L"' id ='" + ProductLibraryView::GetGuid() + L"'/>"; |
| | | xrow = dw_list.GetNextSelectRow(xrow + 1); |
| | |
| | | int len = nlist.length(); |
| | | for (int i = 0; i < len; i++) |
| | | { |
| | | KXMLDOMElement& e = *new KXMLDOMElement(nlist.item(i)); |
| | | KXMLDOMElement e = nlist.item(i); |
| | | xstring name = e.getAttribute(L"CName"); |
| | | xstring no = e.getAttribute(L"CategoryNo"); |
| | | xstring label = no.trim() + L" " + name; |
| | | |
| | | HTREEITEM h = tv_folder.InsertChildItem(hItem, label, (LPARAM)&e, 15); |
| | | HTREEITEM h = tv_folder.InsertChildItem(hItem, label, e, 15); |
| | | xstring child = e.getAttribute(L"Childs"); |
| | | if (child == L"") |
| | | tv_folder.SetItemChild(h, 1); |
| | |
| | | if (len > 0) tv_folder.SetItemChild(hItem, 1); |
| | | for (int i = 0; i < len; i++) |
| | | { |
| | | KXMLDOMElement& e = *new KXMLDOMElement(nlist.item(i)); |
| | | KXMLDOMElement e = nlist.item(i); |
| | | xstring name = e.getAttribute(L"name"); |
| | | HTREEITEM h = tv_folder.InsertChildItem(hItem, name, (LPARAM)&e, image); |
| | | HTREEITEM h = tv_folder.InsertChildItem(hItem, name, e, image); |
| | | ExpandCatChildFolder(h, e, 35); |
| | | } |
| | | return 1; |
| | | } |
| | | int MakeGoodCarFolderItem(HTREEITEM hItem) |
| | | { |
| | | xml x = ShoppingCartView::GetRoleList(); |
| | | //xml x = ShoppingCartView::GetRoleList(CustomerID); |
| | | xml x = ShoppingCartView::GetRoleListForSO(CustomerID); |
| | | if (!x) return 0; |
| | | KXMLDOMNodeList nlist = x.selectNodes(L"/data/item"); |
| | | int len = nlist.length(); |
| | | for (int i = 0; i < len; i++) |
| | | { |
| | | KXMLDOMElement& e = *new KXMLDOMElement(nlist.item(i)); |
| | | KXMLDOMElement e = nlist.item(i); |
| | | xstring name = e.getAttribute(L"name"); |
| | | HTREEITEM h = tv_folder.InsertChildItem(hItem, name, (LPARAM)&e, 35); |
| | | HTREEITEM h = tv_folder.InsertChildItem(hItem, name, e, 35); |
| | | ExpandCatChildFolder(h, e, 35); |
| | | } |
| | | return 1; |
| | |
| | | |
| | | xcontrol query = GetControl(L"sl_search"); |
| | | xstring queryString = query.GetText(); |
| | | xshtml xs; |
| | | xshtml xs = GetControl(L"html_detail"); |
| | | if (name == L"购物车") |
| | | { |
| | | if (agentFor != L"goodscar")SwitchLayer(L"goodscarsheet", L"sheetframe"); |
| | |
| | | dwc_list.openUrl(L"/sale/view/ProductLibrary/template/cart/goodssolist"); |
| | | } |
| | | dwc_list.SetReadOnly(true); |
| | | g_xdoc_shoppingcart.Retrieve(ShoppingCartView::GetGoodsList(str, queryString)); |
| | | dwc_list.Retrieve(ShoppingCartView::GetGoodsList(str, queryString)); |
| | | |
| | | } |
| | | else if (e1.getAttribute(L"categoryid") != L"") |
| | | else if ((xstring)e1.getAttribute(L"categoryid") != L"") |
| | | { |
| | | xstring categoryid = e1.getAttribute(L"categoryid"); |
| | | dwc_list.SetDataObject(ProductLibraryView::GetMaintListForm3(categoryid).GetXmlDoc()); |
| | | dwc_list.SetDataObject(ProductLibraryView::GetMaintListForm3(categoryid)); |
| | | dwc_list.SetReadOnly(true); |
| | | |
| | | g_xdoc_shoppingcart.Retrieve(ProductLibraryView::GetMaintList3(categoryid, queryString, L"")); |
| | | dwc_list.Retrieve(ProductLibraryView::GetMaintList3(categoryid, queryString, L"")); |
| | | } |
| | | else |
| | | { |
| | | |
| | | dwc_list.openUrl(L"/sale/view/ProductLibrary/template/cart/goodslist"); |
| | | dwc_list.SetReadOnly(true); |
| | | g_xdoc_shoppingcart.Retrieve(ShoppingCartView::GetGoodsList(selectname, queryString)); |
| | | dwc_list.Retrieve(ShoppingCartView::GetGoodsList(selectname, queryString)); |
| | | } |
| | | dwc_list.PostRetrieve(); |
| | | dwc_list.Redraw(); |
| | | |
| | | if (dwc_list.GetRowCount() >= 0) |
| | | { |
| | | xshtml xs = GetControl(L"html_detail"); |
| | | |
| | | xs.SetContent(makeGoodscarHtml(1)); |
| | | } |
| | | else |
| | |
| | | xs = GetControl(L"html_detail"); |
| | | xs.SetContent(L"<html><body/></html>"); |
| | | } |
| | | xs.Redraw(); |
| | | if(xs)xs.Redraw(); |
| | | } |
| | | } |
| | | else |
| | |
| | | dw_list = GetControl(L"dw_list"); |
| | | dw_list.SetReadOnly(true); |
| | | |
| | | g_xdoc_product.Retrieve(ProductLibraryView::GetMaintList3(no, queryString, L"")); |
| | | dw_list.PostRetrieve(); |
| | | dw_list.Retrieve(ProductLibraryView::GetMaintList3(no, queryString, L"")); |
| | | dw_list.Redraw(); |
| | | |
| | | if (dw_list.GetRowCount() >= 0) |
| | | { |
| | | xs = GetControl(L"html_detail"); |
| | | xs.SetContent(makeHtml(1)); |
| | | } |
| | | else |
| | | { |
| | | xs = GetControl(L"html_detail"); |
| | | xs.SetContent(L"<html/>"); |
| | | } |
| | | xs.Redraw(); |
| | | xutil::RestoreCursor(hCursor); |
| | | } |
| | | } |
| | |
| | | int len = nlist.length(); |
| | | for (int i = 0; i < len; i++) |
| | | { |
| | | KXMLDOMElement& e = *new KXMLDOMElement(nlist.item(i)); |
| | | KXMLDOMElement e = nlist.item(i); |
| | | xstring name = e.getAttribute(L"cname"); |
| | | xstring sImage = e.getAttribute(L"image"); |
| | | int image = 15; |
| | | //if(sImage) image = sImage.toInt(); |
| | | HTREEITEM h = tv_folder.InsertChildItem(hItem, name, (LPARAM)&e, image); |
| | | HTREEITEM h = tv_folder.InsertChildItem(hItem, name, e, image); |
| | | tv_folder.SetItemChild(h, 1); |
| | | ExpandChildFolder(h, e); |
| | | } |
| | |
| | | int row = hdr.row; |
| | | xstring col = hdr.colname; |
| | | |
| | | xstring str = dwc_list.GetItemString(row, L"QuoteLineID"); |
| | | KXMLDOMElement e = dwc_list.GetRowElement(row); |
| | | xstring str; |
| | | if (e.selectSingleNode(L"QuoteLineID")) |
| | | str = e.selectSingleNode(L"QuoteLineID").text(); |
| | | //xstring str = dwc_list.GetItemString(row, L"QuoteLineID"); |
| | | if (str != L"") |
| | | str = L"ql:" + str; |
| | | else if (dwc_list.GetItemString(row, L"SKUNo") != L"") |
| | |
| | | else |
| | | str = dwc_list.GetItemString(row, L"No"); |
| | | |
| | | if (dwc_list.IsRowSelected(row) & 0xff) |
| | | if (dwc_list.IsRowSelected(row)) |
| | | { |
| | | //will unselect |
| | | impStr = impStr.replace(L" " + str, L""); |