| | |
| | | while (true) |
| | | { |
| | | xstring guid = guids; |
| | | if (guids.find(L",L") >= 0) |
| | | if (guids.find(L",") >= 0) |
| | | { |
| | | guid = guids.left(guids.find(L",L")); |
| | | guids = guids.mid(guids.find(L",L") + 1, 99999); |
| | | guid = guids.left(guids.find(L",")); |
| | | guids = guids.mid(guids.find(L",") + 1, 99999); |
| | | } |
| | | else |
| | | { |
| | |
| | | while (true) |
| | | { |
| | | xstring guid = guids; |
| | | if (guids.find(L",L") >= 0) |
| | | if (guids.find(L",") >= 0) |
| | | { |
| | | guid = guids.left(guids.find(L",L")); |
| | | guids = guids.mid(guids.find(L",L") + 1, 99999); |
| | | guid = guids.left(guids.find(L",")); |
| | | guids = guids.mid(guids.find(L",") + 1, 99999); |
| | | } |
| | | else |
| | | { |
| | |
| | | xstring fstr = L""; |
| | | while (strs != L"") |
| | | { |
| | | int pos = strs.find(L",L"); |
| | | int pos = strs.find(L","); |
| | | if (pos < 0) |
| | | { |
| | | str = strs; |
| | |
| | | if (fstr == L"") |
| | | fstr = GetImageUrl(str); |
| | | else |
| | | fstr += L",L" + GetImageUrl(str); |
| | | fstr += L"," + GetImageUrl(str); |
| | | } |
| | | return fstr; |
| | | } |
| | |
| | | { |
| | | xstring content = L""; |
| | | xstring base = L""; |
| | | base += L"<QuoteNo>" + getBaseItem(cell, L"报价单号:") + L"</QuoteNo>"; |
| | | base += L"<ExpDate>" + getBaseItem(cell, L"报价截止日期:") + L"</ExpDate>"; |
| | | base += L"<PrjName>" + getBaseItem(cell, L"项目名称:") + L"</PrjName>"; |
| | | base += L"<QuoteDate>" + dw_base.GetItemString(1, L"QuoteDate") + L"</QuoteDate>"; |
| | | base += L"<QuoteNo>" + getBaseXmlItem(cell, L"报价单号:") + L"</QuoteNo>"; |
| | | base += L"<ExpDate>" + getBaseXmlItem(cell, L"报价截止日期:") + L"</ExpDate>"; |
| | | base += L"<PrjName>" + getBaseXmlItem(cell, L"项目名称:") + L"</PrjName>"; |
| | | base += L"<QuoteDate>" + dw_base.GetItemXmlString(1, L"QuoteDate") + L"</QuoteDate>"; |
| | | |
| | | int startRow = getItemHeadRow(cell); |
| | | |
| | |
| | | int colSKUID = getItemCol(cell, startRow - 1, L"SKUID"); |
| | | int colSaleRemark = getItemCol(cell, startRow - 1, L"业务To采购备注"); |
| | | |
| | | int colBuyerMOQ = getItemCol(cell, startRow - 1, L"MOQ"); |
| | | int colBuyerRemark = getItemCol(cell, startRow - 1, L"采购To业务备注"); |
| | | int colFactoryImage = getItemCol(cell, startRow - 1, L"工厂图片"); |
| | | int colGWT = getItemCol(cell, startRow - 1, L"毛重,毛重(KG)L"); |
| | | int colNWT = getItemCol(cell, startRow - 1, L"净重,净重(KG)L"); |
| | | int colVolDesc = getItemCol(cell, startRow - 1, L"体积描述,长X宽X高,长X宽X高(CM)L"); |
| | | int colVol = getItemCol(cell, startRow - 1, L"体积,体积(M3)L"); |
| | | int col40HQ = getItemCol(cell, startRow - 1, L"40HQ,QTY(40HQ)L"); |
| | | int colGWT = getItemCol(cell, startRow - 1, L"毛重,毛重(KG)"); |
| | | int colNWT = getItemCol(cell, startRow - 1, L"净重,净重(KG)"); |
| | | int colVolDesc = getItemCol(cell, startRow - 1, L"体积描述,长X宽X高,长X宽X高(CM)"); |
| | | int colVol = getItemCol(cell, startRow - 1, L"体积,体积(M3)"); |
| | | int col40HQ = getItemCol(cell, startRow - 1, L"40HQ,QTY(40HQ)"); |
| | | |
| | | int colSupplier1 = getItemCol(cell, startRow - 1, L"供应商1"); |
| | | int colSupplier = getItemCol(cell, startRow - 1, L"供应商"); |
| | | int colPOPrice1 = getItemCol(cell, startRow - 1, L"价格1"); |
| | | int colPOPrice = getItemCol(cell, startRow - 1, L"价格"); |
| | | |
| | | int colInnerOuter = getItemCol(cell, startRow - 1, L"装箱数(内/外)L"); |
| | | int colInnerOuter = getItemCol(cell, startRow - 1, L"装箱数(内/外)"); |
| | | int colItemQty = getItemCol(cell, startRow - 1, L"数量,Qty"); |
| | | int colPackage = getItemCol(cell, startRow - 1, L"Package,包装方式"); |
| | | int colBuyer = getItemCol(cell, startRow - 1, L"采购人员"); |
| | |
| | | xstring itemStr = L""; |
| | | rowid = getRowID(cell, row); |
| | | itemStr += L"<RowID>" + getRowID(cell, row) + L"</RowID>"; |
| | | itemStr += L"<SKUID>" + cell.GetItemString(row, colSKUID) + L"</SKUID>"; |
| | | itemStr += L"<SKUID>" + cell.GetItemXmlString(row, colSKUID) + L"</SKUID>"; |
| | | itemStr += L"<customer-photo>" + getRowTerm(cell, row, L"customer-photo") + L"</customer-photo>"; |
| | | itemStr += L"<supplier-photo>" + getRowTerm(cell, row, L"supplier-photo") + L"</supplier-photo>"; |
| | | itemStr += L"<customer-photo-url>" + getImageList(getRowTerm(cell, row, L"customer-photo")) + L"</customer-photo-url>"; |
| | | itemStr += L"<supplier-photo-url>" + getImageList(getRowTerm(cell, row, L"supplier-photo")) + L"</supplier-photo-url>"; |
| | | itemStr += L"<ItemNo>" + cell.GetItemString(row, colItemNo) + L"</ItemNo>"; |
| | | itemStr += L"<CustomItemNo>" + cell.GetItemString(row, colCustomerItemNo) + L"</CustomItemNo>"; |
| | | itemStr += L"<ItemName>" + cell.GetItemString(row, colItemName) + L"</ItemName>"; |
| | | itemStr += L"<ItemCName>" + cell.GetItemString(row, colItemCName) + L"</ItemCName>"; |
| | | itemStr += L"<ItemSpec>" + cell.GetItemString(row, colItemSpec) + L"</ItemSpec>"; |
| | | itemStr += L"<CustomerImage>" + cell.GetItemString(row, colCustomerImage) + L"</CustomerImage>"; |
| | | itemStr += L"<BuyerPrice>" + cell.GetItemString(row, colBuyerPrice) + L"</BuyerPrice>"; |
| | | itemStr += L"<SaleRemark>" + cell.GetItemString(row, colSaleRemark) + L"</SaleRemark>"; |
| | | itemStr += L"<ItemNo>" + cell.GetItemXmlString(row, colItemNo) + L"</ItemNo>"; |
| | | itemStr += L"<CustomItemNo>" + cell.GetItemXmlString(row, colCustomerItemNo) + L"</CustomItemNo>"; |
| | | itemStr += L"<ItemName>" + cell.GetItemXmlString(row, colItemName) + L"</ItemName>"; |
| | | itemStr += L"<ItemCName>" + cell.GetItemXmlString(row, colItemCName) + L"</ItemCName>"; |
| | | itemStr += L"<ItemSpec>" + cell.GetItemXmlString(row, colItemSpec) + L"</ItemSpec>"; |
| | | itemStr += L"<CustomerImage>" + cell.GetItemXmlString(row, colCustomerImage) + L"</CustomerImage>"; |
| | | itemStr += L"<BuyerPrice>" + cell.GetItemXmlString(row, colBuyerPrice) + L"</BuyerPrice>"; |
| | | itemStr += L"<SaleRemark>" + cell.GetItemXmlString(row, colSaleRemark) + L"</SaleRemark>"; |
| | | |
| | | itemStr += L"<BuyerRemark>" + cell.GetItemString(row, colBuyerRemark) + L"</BuyerRemark>"; |
| | | itemStr += L"<FactoryImage>" + cell.GetItemString(row, colFactoryImage) + L"</FactoryImage>"; |
| | | itemStr += L"<GWT>" + cell.GetItemString(row, colGWT) + L"</GWT>"; |
| | | itemStr += L"<NWT>" + cell.GetItemString(row, colNWT) + L"</NWT>"; |
| | | itemStr += L"<VolDesc>" + cell.GetItemString(row, colVolDesc) + L"</VolDesc>"; |
| | | itemStr += L"<Vol>" + cell.GetItemString(row, colVol) + L"</Vol>"; |
| | | itemStr += L"<F40HQ>" + cell.GetItemString(row, col40HQ) + L"</F40HQ>"; |
| | | itemStr += L"<Packing>" + cell.GetItemString(row, colInnerOuter) + L"</Packing>"; |
| | | itemStr += L"<Quantity>" + cell.GetItemString(row, colItemQty) + L"</Quantity>"; |
| | | itemStr += L"<Package>" + cell.GetItemString(row, colPackage) + L"</Package>"; |
| | | itemStr += L"<Buyer>" + cell.GetItemString(row, colBuyer) + L"</Buyer>"; |
| | | itemStr += L"<RemarkS>" + cell.GetItemString(row, colRemark) + L"</RemarkS>"; |
| | | itemStr += L"<FOBPrice>" + cell.GetItemString(row, colFOBPrice) + L"</FOBPrice>"; |
| | | itemStr += L"<BuyerMOQ>" + cell.GetItemXmlString(row, colBuyerMOQ) + L"</BuyerMOQ>"; |
| | | itemStr += L"<BuyerRemark>" + cell.GetItemXmlString(row, colBuyerRemark) + L"</BuyerRemark>"; |
| | | itemStr += L"<FactoryImage>" + cell.GetItemXmlString(row, colFactoryImage) + L"</FactoryImage>"; |
| | | itemStr += L"<GWT>" + cell.GetItemXmlString(row, colGWT)+ L"</GWT>"; |
| | | itemStr += L"<NWT>" + cell.GetItemXmlString(row, colNWT) + L"</NWT>"; |
| | | itemStr += L"<VolDesc>" + cell.GetItemXmlString(row, colVolDesc) + L"</VolDesc>"; |
| | | itemStr += L"<Vol>" + cell.GetItemXmlString(row, colVol) + L"</Vol>"; |
| | | itemStr += L"<F40HQ>" + cell.GetItemXmlString(row, col40HQ) + L"</F40HQ>"; |
| | | itemStr += L"<Packing>" + cell.GetItemXmlString(row, colInnerOuter) + L"</Packing>"; |
| | | itemStr += L"<Quantity>" + cell.GetItemXmlString(row, colItemQty) + L"</Quantity>"; |
| | | itemStr += L"<Package>" + cell.GetItemXmlString(row, colPackage) + L"</Package>"; |
| | | itemStr += L"<Buyer>" + cell.GetItemXmlString(row, colBuyer) + L"</Buyer>"; |
| | | itemStr += L"<RemarkS>" + cell.GetItemXmlString(row, colRemark) + L"</RemarkS>"; |
| | | itemStr += L"<FOBPrice>" + cell.GetItemXmlString(row, colFOBPrice) + L"</FOBPrice>"; |
| | | |
| | | |
| | | itemStr += L"<PurchedDate>" + sdate + L"</PurchedDate>"; |
| | |
| | | { |
| | | xstring content = L""; |
| | | xstring base = L""; |
| | | base += L"<QuoteNo>" + getBaseItem(cell, L"报价单号:") + L"</QuoteNo>"; |
| | | base += L"<ExpDate>" + getBaseItem(cell, L"报价截止日期:") + L"</ExpDate>"; |
| | | base += L"<PrjName>" + getBaseItem(cell, L"项目名称:") + L"</PrjName>"; |
| | | base += L"<QuoteDate>" + dw_base.GetItemString(1, L"QuoteDate") + L"</QuoteDate>"; |
| | | base += L"<QuoteNo>" + getBaseXmlItem(cell, L"报价单号:") + L"</QuoteNo>"; |
| | | base += L"<ExpDate>" + getBaseXmlItem(cell, L"报价截止日期:") + L"</ExpDate>"; |
| | | base += L"<PrjName>" + getBaseXmlItem(cell, L"项目名称:") + L"</PrjName>"; |
| | | base += L"<QuoteDate>" + dw_base.GetItemXmlString(1, L"QuoteDate") + L"</QuoteDate>"; |
| | | |
| | | int startRow = getItemHeadRow(cell); |
| | | |
| | |
| | | int colSKUID = getItemCol(cell, startRow - 1, L"SKUID"); |
| | | int colSaleRemark = getItemCol(cell, startRow - 1, L"业务To采购备注"); |
| | | |
| | | int colBuyerMOQ = getItemCol(cell, startRow - 1, L"MOQ"); |
| | | int colBuyerRemark = getItemCol(cell, startRow - 1, L"采购To业务备注"); |
| | | int colFactoryImage = getItemCol(cell, startRow - 1, L"工厂图片"); |
| | | int colGWT = getItemCol(cell, startRow - 1, L"毛重,毛重(KG)L"); |
| | | int colNWT = getItemCol(cell, startRow - 1, L"净重,净重(KG)L"); |
| | | int colVolDesc = getItemCol(cell, startRow - 1, L"体积描述,长X宽X高,长X宽X高(CM)L"); |
| | | int colVol = getItemCol(cell, startRow - 1, L"体积,体积(M3)L"); |
| | | int col40HQ = getItemCol(cell, startRow - 1, L"40HQ,QTY(40HQ)L"); |
| | | int colGWT = getItemCol(cell, startRow - 1, L"毛重,毛重(KG)"); |
| | | int colNWT = getItemCol(cell, startRow - 1, L"净重,净重(KG)"); |
| | | int colVolDesc = getItemCol(cell, startRow - 1, L"体积描述,长X宽X高,长X宽X高(CM)"); |
| | | int colVol = getItemCol(cell, startRow - 1, L"体积,体积(M3)"); |
| | | int col40HQ = getItemCol(cell, startRow - 1, L"40HQ,QTY(40HQ)"); |
| | | |
| | | int colPOPrice = getItemCol(cell, startRow - 1, L"价格"); |
| | | int colSupplier = getItemCol(cell, startRow - 1, L"供应商"); |
| | |
| | | int colBOMType2 = getItemCol(cell, startRow - 1, L"类型2"); |
| | | int colBOMType3 = getItemCol(cell, startRow - 1, L"类型3"); |
| | | |
| | | int colInnerOuter = getItemCol(cell, startRow - 1, L"装箱数(内/外)L"); |
| | | int colInnerOuter = getItemCol(cell, startRow - 1, L"装箱数(内/外)"); |
| | | int colItemQty = getItemCol(cell, startRow - 1, L"数量,Qty"); |
| | | int colPackage = getItemCol(cell, startRow - 1, L"Package,包装方式"); |
| | | int colBuyer = getItemCol(cell, startRow - 1, L"采购人员"); |
| | |
| | | |
| | | xstring itemStr = L""; |
| | | itemStr += L"<RowID>" + getRowID(cell, row) + L"</RowID>"; |
| | | itemStr += L"<SKUID>" + cell.GetItemString(row, colSKUID) + L"</SKUID>"; |
| | | itemStr += L"<SKUID>" + cell.GetItemXmlString(row, colSKUID) + L"</SKUID>"; |
| | | itemStr += L"<customer-photo>" + getRowTerm(cell, row, L"customer-photo") + L"</customer-photo>"; |
| | | itemStr += L"<supplier-photo>" + getRowTerm(cell, row, L"supplier-photo") + L"</supplier-photo>"; |
| | | itemStr += L"<ItemNo>" + cell.GetItemString(row, colItemNo) + L"</ItemNo>"; |
| | | itemStr += L"<CustomItemNo>" + cell.GetItemString(row, colCustomerItemNo) + L"</CustomItemNo>"; |
| | | itemStr += L"<ItemName>" + cell.GetItemString(row, colItemName) + L"</ItemName>"; |
| | | itemStr += L"<ItemCName>" + cell.GetItemString(row, colItemCName) + L"</ItemCName>"; |
| | | itemStr += L"<ItemSpec>" + cell.GetItemString(row, colItemSpec) + L"</ItemSpec>"; |
| | | itemStr += L"<CustomerImage>" + cell.GetItemString(row, colCustomerImage) + L"</CustomerImage>"; |
| | | itemStr += L"<BuyerPrice>" + cell.GetItemString(row, colBuyerPrice) + L"</BuyerPrice>"; |
| | | itemStr += L"<SaleRemark>" + cell.GetItemString(row, colSaleRemark) + L"</SaleRemark>"; |
| | | itemStr += L"<ItemNo>" + cell.GetItemXmlString(row, colItemNo) + L"</ItemNo>"; |
| | | itemStr += L"<CustomItemNo>" + cell.GetItemXmlString(row, colCustomerItemNo) + L"</CustomItemNo>"; |
| | | itemStr += L"<ItemName>" + cell.GetItemXmlString(row, colItemName) + L"</ItemName>"; |
| | | itemStr += L"<ItemCName>" + cell.GetItemXmlString(row, colItemCName) + L"</ItemCName>"; |
| | | itemStr += L"<ItemSpec>" + cell.GetItemXmlString(row, colItemSpec) + L"</ItemSpec>"; |
| | | itemStr += L"<CustomerImage>" + cell.GetItemXmlString(row, colCustomerImage) + L"</CustomerImage>"; |
| | | itemStr += L"<BuyerPrice>" + cell.GetItemXmlString(row, colBuyerPrice) + L"</BuyerPrice>"; |
| | | itemStr += L"<SaleRemark>" + cell.GetItemXmlString(row, colSaleRemark) + L"</SaleRemark>"; |
| | | |
| | | itemStr += L"<BuyerRemark>" + cell.GetItemString(row, colBuyerRemark) + L"</BuyerRemark>"; |
| | | itemStr += L"<FactoryImage>" + cell.GetItemString(row, colFactoryImage) + L"</FactoryImage>"; |
| | | itemStr += L"<GWT>" + cell.GetItemString(row, colGWT) + L"</GWT>"; |
| | | itemStr += L"<NWT>" + cell.GetItemString(row, colNWT) + L"</NWT>"; |
| | | itemStr += L"<VolDesc>" + cell.GetItemString(row, colVolDesc) + L"</VolDesc>"; |
| | | itemStr += L"<Vol>" + cell.GetItemString(row, colVol) + L"</Vol>"; |
| | | itemStr += L"<F40HQ>" + cell.GetItemString(row, col40HQ) + L"</F40HQ>"; |
| | | itemStr += L"<Packing>" + cell.GetItemString(row, colInnerOuter) + L"</Packing>"; |
| | | itemStr += L"<Quantity>" + cell.GetItemString(row, colItemQty) + L"</Quantity>"; |
| | | itemStr += L"<Package>" + cell.GetItemString(row, colPackage) + L"</Package>"; |
| | | itemStr += L"<Buyer>" + cell.GetItemString(row, colBuyer) + L"</Buyer>"; |
| | | itemStr += L"<RemarkS>" + cell.GetItemString(row, colRemark) + L"</RemarkS>"; |
| | | itemStr += L"<FOBPrice>" + cell.GetItemString(row, colFOBPrice) + L"</FOBPrice>"; |
| | | itemStr += L"<BuyerMOQ>" + cell.GetItemXmlString(row, colBuyerMOQ) + L"</BuyerMOQ>"; |
| | | itemStr += L"<BuyerRemark>" + cell.GetItemXmlString(row, colBuyerRemark) + L"</BuyerRemark>"; |
| | | itemStr += L"<FactoryImage>" + cell.GetItemXmlString(row, colFactoryImage) + L"</FactoryImage>"; |
| | | itemStr += L"<GWT>" + cell.GetItemXmlString(row, colGWT) + L"</GWT>"; |
| | | itemStr += L"<NWT>" + cell.GetItemXmlString(row, colNWT) + L"</NWT>"; |
| | | itemStr += L"<VolDesc>" + cell.GetItemXmlString(row, colVolDesc) + L"</VolDesc>"; |
| | | itemStr += L"<Vol>" + cell.GetItemXmlString(row, colVol) + L"</Vol>"; |
| | | itemStr += L"<F40HQ>" + cell.GetItemXmlString(row, col40HQ) + L"</F40HQ>"; |
| | | itemStr += L"<Packing>" + cell.GetItemXmlString(row, colInnerOuter) + L"</Packing>"; |
| | | itemStr += L"<Quantity>" + cell.GetItemXmlString(row, colItemQty) + L"</Quantity>"; |
| | | itemStr += L"<Package>" + cell.GetItemXmlString(row, colPackage) + L"</Package>"; |
| | | itemStr += L"<Buyer>" + cell.GetItemXmlString(row, colBuyer) + L"</Buyer>"; |
| | | itemStr += L"<RemarkS>" + cell.GetItemXmlString(row, colRemark) + L"</RemarkS>"; |
| | | itemStr += L"<FOBPrice>" + cell.GetItemXmlString(row, colFOBPrice) + L"</FOBPrice>"; |
| | | |
| | | itemStr += L"<Supplier>" + cell.GetItemString(row, colSupplier) + L"</Supplier>"; |
| | | itemStr += L"<Supplier1>" + cell.GetItemString(row, colSupplier1) + L"</Supplier1>"; |
| | | itemStr += L"<Supplier2>" + cell.GetItemString(row, colSupplier2) + L"</Supplier2>"; |
| | | itemStr += L"<Supplier3>" + cell.GetItemString(row, colSupplier3) + L"</Supplier3>"; |
| | | itemStr += L"<POPrice>" + cell.GetItemString(row, colPOPrice) + L"</POPrice>"; |
| | | itemStr += L"<POPrice1>" + cell.GetItemString(row, colPOPrice1) + L"</POPrice1>"; |
| | | itemStr += L"<POPrice2>" + cell.GetItemString(row, colPOPrice2) + L"</POPrice2>"; |
| | | itemStr += L"<POPrice3>" + cell.GetItemString(row, colPOPrice3) + L"</POPrice3>"; |
| | | itemStr += L"<Supplier>" + cell.GetItemXmlString(row, colSupplier) + L"</Supplier>"; |
| | | itemStr += L"<Supplier1>" + cell.GetItemXmlString(row, colSupplier1) + L"</Supplier1>"; |
| | | itemStr += L"<Supplier2>" + cell.GetItemXmlString(row, colSupplier2) + L"</Supplier2>"; |
| | | itemStr += L"<Supplier3>" + cell.GetItemXmlString(row, colSupplier3) + L"</Supplier3>"; |
| | | itemStr += L"<POPrice>" + cell.GetItemXmlString(row, colPOPrice) + L"</POPrice>"; |
| | | itemStr += L"<POPrice1>" + cell.GetItemXmlString(row, colPOPrice1) + L"</POPrice1>"; |
| | | itemStr += L"<POPrice2>" + cell.GetItemXmlString(row, colPOPrice2) + L"</POPrice2>"; |
| | | itemStr += L"<POPrice3>" + cell.GetItemXmlString(row, colPOPrice3) + L"</POPrice3>"; |
| | | |
| | | itemStr += L"<BOMType>" + cell.GetItemString(row, colBOMType) + L"</BOMType>"; |
| | | itemStr += L"<BOMType1>" + cell.GetItemString(row, colBOMType1) + L"</BOMType1>"; |
| | | itemStr += L"<BOMType2>" + cell.GetItemString(row, colBOMType2) + L"</BOMType2>"; |
| | | itemStr += L"<BOMType3>" + cell.GetItemString(row, colBOMType2) + L"</BOMType3>"; |
| | | itemStr += L"<BOMType>" + cell.GetItemXmlString(row, colBOMType) + L"</BOMType>"; |
| | | itemStr += L"<BOMType1>" + cell.GetItemXmlString(row, colBOMType1) + L"</BOMType1>"; |
| | | itemStr += L"<BOMType2>" + cell.GetItemXmlString(row, colBOMType2) + L"</BOMType2>"; |
| | | itemStr += L"<BOMType3>" + cell.GetItemXmlString(row, colBOMType2) + L"</BOMType3>"; |
| | | itemStr += L"<PurchedDate>" + sdate + L"</PurchedDate>"; |
| | | itemStr += L"<EnquiryLineID>" + getRowTerm(cell, row, L"EnquiryLineID") + L"</EnquiryLineID>"; |
| | | |
| | |
| | | if (cell.GetItemString(row, colItemName) != L"" || cell.GetItemString(row, colItemSpec) != L"") break; |
| | | if (cell.GetItemString(row, colSupplier) == L"")break; |
| | | xstring extStr = L""; |
| | | extStr += L"<Supplier>" + cell.GetItemString(row, colSupplier) + L"</Supplier>"; |
| | | extStr += L"<Supplier1>" + cell.GetItemString(row, colSupplier1) + L"</Supplier1>"; |
| | | extStr += L"<Supplier2>" + cell.GetItemString(row, colSupplier2) + L"</Supplier2>"; |
| | | extStr += L"<Supplier3>" + cell.GetItemString(row, colSupplier3) + L"</Supplier3>"; |
| | | extStr += L"<POPrice>" + cell.GetItemString(row, colPOPrice) + L"</POPrice>"; |
| | | extStr += L"<POPrice1>" + cell.GetItemString(row, colPOPrice1) + L"</POPrice1>"; |
| | | extStr += L"<POPrice2>" + cell.GetItemString(row, colPOPrice2) + L"</POPrice2>"; |
| | | extStr += L"<POPrice3>" + cell.GetItemString(row, colPOPrice3) + L"</POPrice3>"; |
| | | extStr += L"<Supplier>" + cell.GetItemXmlString(row, colSupplier) + L"</Supplier>"; |
| | | extStr += L"<Supplier1>" + cell.GetItemXmlString(row, colSupplier1) + L"</Supplier1>"; |
| | | extStr += L"<Supplier2>" + cell.GetItemXmlString(row, colSupplier2) + L"</Supplier2>"; |
| | | extStr += L"<Supplier3>" + cell.GetItemXmlString(row, colSupplier3) + L"</Supplier3>"; |
| | | extStr += L"<POPrice>" + cell.GetItemXmlString(row, colPOPrice) + L"</POPrice>"; |
| | | extStr += L"<POPrice1>" + cell.GetItemXmlString(row, colPOPrice1) + L"</POPrice1>"; |
| | | extStr += L"<POPrice2>" + cell.GetItemXmlString(row, colPOPrice2) + L"</POPrice2>"; |
| | | extStr += L"<POPrice3>" + cell.GetItemXmlString(row, colPOPrice3) + L"</POPrice3>"; |
| | | |
| | | extStr += L"<BOMType>" + cell.GetItemString(row, colBOMType) + L"</BOMType>"; |
| | | extStr += L"<BOMType1>" + cell.GetItemString(row, colBOMType1) + L"</BOMType1>"; |
| | | extStr += L"<BOMType2>" + cell.GetItemString(row, colBOMType2) + L"</BOMType2>"; |
| | | extStr += L"<BOMType3>" + cell.GetItemString(row, colBOMType2) + L"</BOMType3>"; |
| | | extStr += L"<BOMType>" + cell.GetItemXmlString(row, colBOMType) + L"</BOMType>"; |
| | | extStr += L"<BOMType1>" + cell.GetItemXmlString(row, colBOMType1) + L"</BOMType1>"; |
| | | extStr += L"<BOMType2>" + cell.GetItemXmlString(row, colBOMType2) + L"</BOMType2>"; |
| | | extStr += L"<BOMType3>" + cell.GetItemXmlString(row, colBOMType2) + L"</BOMType3>"; |
| | | |
| | | itemStr += L"<ExtItem>" + extStr + L"</ExtItem>"; //备用采购信息 |
| | | xstring eid = GetGuid(); |
| | |
| | | |
| | | xaserverarg argx; |
| | | argx.AddArg(L"QuoteNo", dw_base.GetItemString(1, L"QuoteNo")); |
| | | int p1 = argx; |
| | | if (dw_base.GetItemString(1, L"QuoteNo") != L"") |
| | | { |
| | | OpenWindow(L"dev:xpage[xmQuoteBillList.vx]", p1); |
| | | OpenWindow(L"dev:xpage[xmQuoteBillList.vx]", argx); |
| | | } |
| | | if (argx.GetArgString(L"action") != L"ok") return 1; |
| | | |
| | |
| | | return 1; |
| | | } |
| | | |
| | | xstring getBaseXmlItem(xcell dw_cell, xstring colname) |
| | | { |
| | | return xutil::ToXmlText(getBaseItem(dw_cell, colname)); |
| | | } |
| | | |
| | | xstring getBaseItem(xcell dw_cell, xstring colname) |
| | | { |
| | | int row = 0; |
| | |
| | | |
| | | int getItemCol(xcell dw_obj, int row, xstring head) |
| | | { |
| | | xstring fullhead = L",L" + head + L",L"; |
| | | xstring fullhead = L"," + head + L","; |
| | | int headRow = row; |
| | | int colCount = dw_obj.GetValidCol(headRow); |
| | | for (int col = 1; col <= colCount; col++) |
| | | { |
| | | if (fullhead.find(L",L" + dw_obj.GetItemString(headRow, col) + L",L") >= 0) return col; |
| | | if (fullhead.find(L"," + dw_obj.GetItemString(headRow, col) + L",") >= 0) return col; |
| | | } |
| | | return -1; |
| | | } |
| | |
| | | xstring left = str.left(str.find(prop + L":") + prop.length() + 1); |
| | | if (str.find(L";") >= 0) |
| | | right = str.mid(str.find(L";") + 1, 9999); |
| | | else if (str.find(L",L") >= 0) |
| | | right = str.mid(str.find(L",L") + 1, 9999); |
| | | else if (str.find(L",") >= 0) |
| | | right = str.mid(str.find(L",") + 1, 9999); |
| | | str = left + val + L";" + right; |
| | | //alert(str); |
| | | dw_obj.SetItemString(row, 0, str); |
| | |
| | | str = str.mid(str.find(prop + L":") + prop.length() + 1, 9999); |
| | | if (str.find(L";") >= 0) |
| | | str = str.left(str.find(L";")); |
| | | else if (str.find(L",L") >= 0) |
| | | str = str.left(str.find(L",L")); |
| | | else if (str.find(L",") >= 0) |
| | | str = str.left(str.find(L",")); |
| | | return str; |
| | | } |
| | | return L""; |
| | |
| | | str = str.mid(str.find(L"rowid:") + 6, 99999); |
| | | if (str.find(L";") >= 0) |
| | | str = str.left(str.find(L";")); |
| | | else if (str.find(L",L") >= 0) |
| | | str = str.left(str.find(L",L")); |
| | | else if (str.find(L",") >= 0) |
| | | str = str.left(str.find(L",")); |
| | | return str; |
| | | } |
| | | return L""; |
| | |
| | | int colItemSpec = getItemCol(dw_cell, startRow - 1, L"Specifications,规格,产品规格"); |
| | | int colBuyerPrice = getItemCol(dw_cell, startRow - 1, L"采购价,采购价格"); |
| | | |
| | | int colBuyerMOQ = getItemCol(dw_cell, startRow - 1, L"MOQ"); |
| | | int colBuyerRemark = getItemCol(dw_cell, startRow - 1, L"采购To业务备注"); |
| | | int colFactoryImage = getItemCol(dw_cell, startRow - 1, L"工厂图片"); |
| | | int colGWT = getItemCol(dw_cell, startRow - 1, L"毛重,毛重(KG)L"); |
| | | int colNWT = getItemCol(dw_cell, startRow - 1, L"净重,净重(KG)L"); |
| | | int colVolDesc = getItemCol(dw_cell, startRow - 1, L"体积描述,长X宽X高,长X宽X高(CM)L"); |
| | | int colVol = getItemCol(dw_cell, startRow - 1, L"体积,体积(M3)L"); |
| | | int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)L"); |
| | | int colGWT = getItemCol(dw_cell, startRow - 1, L"毛重,毛重(KG)"); |
| | | int colNWT = getItemCol(dw_cell, startRow - 1, L"净重,净重(KG)"); |
| | | int colVolDesc = getItemCol(dw_cell, startRow - 1, L"体积描述,长X宽X高,长X宽X高(CM)"); |
| | | int colVol = getItemCol(dw_cell, startRow - 1, L"体积,体积(M3)"); |
| | | int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)"); |
| | | |
| | | int colSupplier = getItemCol(dw_cell, startRow - 1, L"供应商"); |
| | | int colSupplier1 = getItemCol(dw_cell, startRow - 1, L"供应商1"); |
| | |
| | | |
| | | xstring itemStr = L""; |
| | | itemStr += L"<RowID>" + getRowID(dw_cell, row) + L"</RowID>"; |
| | | itemStr += L"<ItemNo>" + dw_cell.GetItemString(row, colItemNo) + L"</ItemNo>"; |
| | | itemStr += L"<CustomerItemNo>" + dw_cell.GetItemString(row, colCustomerItemNo) + L"</CustomerItemNo>"; |
| | | itemStr += L"<ItemName>" + dw_cell.GetItemString(row, colItemName) + L"</ItemName>"; |
| | | itemStr += L"<ItemCName>" + dw_cell.GetItemString(row, colItemCName) + L"</ItemCName>"; |
| | | itemStr += L"<ItemSpec>" + dw_cell.GetItemString(row, colItemSpec) + L"</ItemSpec>"; |
| | | itemStr += L"<BuyerPrice>" + dw_cell.GetItemString(row, colBuyerPrice) + L"</BuyerPrice>"; |
| | | itemStr += L"<ProductInfo>" + dw_cell.GetItemString(row, colProductInfo) + L"</ProductInfo>"; |
| | | itemStr += L"<ProductInfo1>" + dw_cell.GetItemString(row, colProductInfo1) + L"</ProductInfo1>"; |
| | | itemStr += L"<ItemNo>" + dw_cell.GetItemXmlString(row, colItemNo) + L"</ItemNo>"; |
| | | itemStr += L"<CustomerItemNo>" + dw_cell.GetItemXmlString(row, colCustomerItemNo) + L"</CustomerItemNo>"; |
| | | itemStr += L"<ItemName>" + dw_cell.GetItemXmlString(row, colItemName) + L"</ItemName>"; |
| | | itemStr += L"<ItemCName>" + dw_cell.GetItemXmlString(row, colItemCName) + L"</ItemCName>"; |
| | | itemStr += L"<ItemSpec>" + dw_cell.GetItemXmlString(row, colItemSpec) + L"</ItemSpec>"; |
| | | itemStr += L"<BuyerPrice>" + dw_cell.GetItemXmlString(row, colBuyerPrice) + L"</BuyerPrice>"; |
| | | itemStr += L"<ProductInfo>" + dw_cell.GetItemXmlString(row, colProductInfo) + L"</ProductInfo>"; |
| | | itemStr += L"<ProductInfo1>" + dw_cell.GetItemXmlString(row, colProductInfo1) + L"</ProductInfo1>"; |
| | | |
| | | if (dw_cell.GetItemString(row, colBuyerPrice) == L"") return L"采购价格没有录入"; |
| | | if (dw_cell.GetItemString(row, colGWT) == L"") return L"毛重没有录入"; |
| | |
| | | { |
| | | if (dw_cell.GetItemString(row, colPOPrice1) == L"") return L"采购价格1没有录入"; |
| | | } |
| | | itemStr += L"<BuyerRemark>" + dw_cell.GetItemString(row, colBuyerRemark) + L"</BuyerRemark>"; |
| | | itemStr += L"<FactoryImage>" + dw_cell.GetItemString(row, colFactoryImage) + L"</FactoryImage>"; |
| | | itemStr += L"<GWT>" + dw_cell.GetItemString(row, colGWT) + L"</GWT>"; |
| | | itemStr += L"<NWT>" + dw_cell.GetItemString(row, colNWT) + L"</NWT>"; |
| | | itemStr += L"<VolDesc>" + dw_cell.GetItemString(row, colVolDesc) + L"</VolDesc>"; |
| | | itemStr += L"<Vol>" + dw_cell.GetItemString(row, colVol) + L"</Vol>"; |
| | | itemStr += L"<F40HQ>" + dw_cell.GetItemString(row, col40HQ) + L"</F40HQ>"; |
| | | itemStr += L"<BuyerMOQ>" + dw_cell.GetItemXmlString(row, colBuyerMOQ) + L"</BuyerMOQ>"; |
| | | itemStr += L"<BuyerRemark>" + dw_cell.GetItemXmlString(row, colBuyerRemark) + L"</BuyerRemark>"; |
| | | itemStr += L"<FactoryImage>" + dw_cell.GetItemXmlString(row, colFactoryImage) + L"</FactoryImage>"; |
| | | itemStr += L"<GWT>" + dw_cell.GetItemXmlString(row, colGWT) + L"</GWT>"; |
| | | itemStr += L"<NWT>" + dw_cell.GetItemXmlString(row, colNWT) + L"</NWT>"; |
| | | itemStr += L"<VolDesc>" + dw_cell.GetItemXmlString(row, colVolDesc) + L"</VolDesc>"; |
| | | itemStr += L"<Vol>" + dw_cell.GetItemXmlString(row, colVol) + L"</Vol>"; |
| | | itemStr += L"<F40HQ>" + dw_cell.GetItemXmlString(row, col40HQ) + L"</F40HQ>"; |
| | | |
| | | itemStr += L"<PurchedDate>" + sdate + L"</PurchedDate>"; |
| | | itemStr += L"<EnquiryLineID>" + getRowTerm(dw_cell, row, L"EnquiryLineID") + L"</EnquiryLineID>"; |
| | |
| | | int colItemSpec = getItemCol(dw_cell, startRow - 1, L"Specifications,规格,产品规格"); |
| | | int colBuyer = getItemCol(dw_cell, startRow - 1, L"采购人员"); |
| | | int colPackage = getItemCol(dw_cell, startRow - 1, L"Package,包装方式"); |
| | | int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)L"); |
| | | int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)"); |
| | | |
| | | int colGW = getItemCol(dw_cell, startRow - 1, L"毛重(KG)L"); |
| | | int colNW = getItemCol(dw_cell, startRow - 1, L"净重(KG)L"); |
| | | int colVolDesc = getItemCol(dw_cell, startRow - 1, L"长X宽X高(CM)L"); |
| | | int colGW = getItemCol(dw_cell, startRow - 1, L"毛重(KG)"); |
| | | int colNW = getItemCol(dw_cell, startRow - 1, L"净重(KG)"); |
| | | int colVolDesc = getItemCol(dw_cell, startRow - 1, L"长X宽X高(CM)"); |
| | | |
| | | int colPrice = getItemCol(dw_cell, startRow - 1, L"采购价"); |
| | | |
| | |
| | | xstring itemStr = L""; |
| | | xstring issend = L"1"; |
| | | itemStr += L"<RowID>" + getRowID(dw_cell, row) + L"</RowID>"; |
| | | itemStr += L"<ItemNo>" + dw_cell.GetItemString(row, colItemNo) + L"</ItemNo>"; |
| | | itemStr += L"<ItemName>" + dw_cell.GetItemString(row, colItemName) + L"</ItemName>"; |
| | | itemStr += L"<ItemCName>" + dw_cell.GetItemString(row, colItemCName) + L"</ItemCName>"; |
| | | itemStr += L"<ItemSpec>" + dw_cell.GetItemString(row, colItemSpec) + L"</ItemSpec>"; |
| | | itemStr += L"<ItemNo>" + dw_cell.GetItemXmlString(row, colItemNo) + L"</ItemNo>"; |
| | | itemStr += L"<ItemName>" + dw_cell.GetItemXmlString(row, colItemName) + L"</ItemName>"; |
| | | itemStr += L"<ItemCName>" + dw_cell.GetItemXmlString(row, colItemCName) + L"</ItemCName>"; |
| | | itemStr += L"<ItemSpec>" + dw_cell.GetItemXmlString(row, colItemSpec) + L"</ItemSpec>"; |
| | | itemStr += L"<RowNo>" + xstring(row - startRow + 1) + L"</RowNo>"; |
| | | itemStr += L"<Purchor>" + dw_cell.GetItemString(row, colBuyer) + L"</Purchor>"; |
| | | itemStr += L"<Package>" + dw_cell.GetItemString(row, colPackage) + L"</Package>"; |
| | | itemStr += L"<NWT>" + dw_cell.GetItemString(row, colNW) + L"</NWT>"; |
| | | itemStr += L"<GWT>" + dw_cell.GetItemString(row, colGW) + L"</GWT>"; |
| | | itemStr += L"<VolDesc>" + dw_cell.GetItemString(row, colVolDesc) + L"</VolDesc>"; |
| | | itemStr += L"<Supplier>" + dw_cell.GetItemString(row, colSupplier) + L"</Supplier>"; |
| | | itemStr += L"<BuyPrice>" + dw_cell.GetItemString(row, colPOPrice) + L"</BuyPrice>"; |
| | | itemStr += L"<Supplier1>" + dw_cell.GetItemString(row, colSupplier1) + L"</Supplier1>"; |
| | | itemStr += L"<BuyPrice1>" + dw_cell.GetItemString(row, colPOPrice1) + L"</BuyPrice1>"; |
| | | itemStr += L"<BOMType1>" + dw_cell.GetItemString(row, colBOMType1) + L"</BOMType1>"; |
| | | itemStr += L"<BOMType>" + dw_cell.GetItemString(row, colBOMType) + L"</BOMType>"; |
| | | itemStr += L"<POPrice>" + dw_cell.GetItemString(row, colPrice) + L"</POPrice>"; |
| | | itemStr += L"<ProductInfo>" + dw_cell.GetItemString(row, colProductInfo) + L"</ProductInfo>"; |
| | | itemStr += L"<ProductInfo1>" + dw_cell.GetItemString(row, colProductInfo1) + L"</ProductInfo1>"; |
| | | itemStr += L"<Purchor>" + dw_cell.GetItemXmlString(row, colBuyer) + L"</Purchor>"; |
| | | itemStr += L"<Package>" + dw_cell.GetItemXmlString(row, colPackage) + L"</Package>"; |
| | | itemStr += L"<NWT>" + dw_cell.GetItemXmlString(row, colNW) + L"</NWT>"; |
| | | itemStr += L"<GWT>" + dw_cell.GetItemXmlString(row, colGW) + L"</GWT>"; |
| | | itemStr += L"<VolDesc>" + dw_cell.GetItemXmlString(row, colVolDesc) + L"</VolDesc>"; |
| | | itemStr += L"<Supplier>" + dw_cell.GetItemXmlString(row, colSupplier) + L"</Supplier>"; |
| | | itemStr += L"<BuyPrice>" + dw_cell.GetItemXmlString(row, colPOPrice) + L"</BuyPrice>"; |
| | | itemStr += L"<Supplier1>" + dw_cell.GetItemXmlString(row, colSupplier1) + L"</Supplier1>"; |
| | | itemStr += L"<BuyPrice1>" + dw_cell.GetItemXmlString(row, colPOPrice1) + L"</BuyPrice1>"; |
| | | itemStr += L"<BOMType1>" + dw_cell.GetItemXmlString(row, colBOMType1) + L"</BOMType1>"; |
| | | itemStr += L"<BOMType>" + dw_cell.GetItemXmlString(row, colBOMType) + L"</BOMType>"; |
| | | itemStr += L"<POPrice>" + dw_cell.GetItemXmlString(row, colPrice) + L"</POPrice>"; |
| | | itemStr += L"<ProductInfo>" + dw_cell.GetItemXmlString(row, colProductInfo) + L"</ProductInfo>"; |
| | | itemStr += L"<ProductInfo1>" + dw_cell.GetItemXmlString(row, colProductInfo1) + L"</ProductInfo1>"; |
| | | |
| | | if (dw_cell.GetItemString(row, colBuyer) == L"")issend = L"0"; |
| | | itemStr += L"<IsSend>" + issend + L"</IsSend>"; |
| | |
| | | int colItemSpec = getItemCol(dw_cell, startRow - 1, L"Specifications,规格,产品规格"); |
| | | int colBuyer = getItemCol(dw_cell, startRow - 1, L"采购人员"); |
| | | int colPackage = getItemCol(dw_cell, startRow - 1, L"Package,包装方式"); |
| | | int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)L"); |
| | | int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)"); |
| | | |
| | | int colGW = getItemCol(dw_cell, startRow - 1, L"毛重(KG)L"); |
| | | int colNW = getItemCol(dw_cell, startRow - 1, L"净重(KG)L"); |
| | | int colVolDesc = getItemCol(dw_cell, startRow - 1, L"长X宽X高(CM)L"); |
| | | int colGW = getItemCol(dw_cell, startRow - 1, L"毛重(KG)"); |
| | | int colNW = getItemCol(dw_cell, startRow - 1, L"净重(KG)"); |
| | | int colVolDesc = getItemCol(dw_cell, startRow - 1, L"长X宽X高(CM)"); |
| | | |
| | | int colProductInfo = getItemCol(dw_cell, startRow - 1, L"业务部产品信息"); |
| | | int colProductInfo1 = getItemCol(dw_cell, startRow - 1, L"采购部产品信息"); |
| | |
| | | xstring itemStr = L""; |
| | | xstring issend = L"1"; |
| | | itemStr += L"<RowID>" + getRowID(dw_cell, row) + L"</RowID>"; |
| | | itemStr += L"<ItemNo>" + dw_cell.GetItemString(row, colItemNo) + L"</ItemNo>"; |
| | | itemStr += L"<CustomerItemNo>" + dw_cell.GetItemString(row, colCustomerItemNo) + L"</CustomerItemNo>"; |
| | | itemStr += L"<ItemName>" + dw_cell.GetItemString(row, colItemName) + L"</ItemName>"; |
| | | itemStr += L"<ItemCName>" + dw_cell.GetItemString(row, colItemCName) + L"</ItemCName>"; |
| | | itemStr += L"<ItemSpec>" + dw_cell.GetItemString(row, colItemSpec) + L"</ItemSpec>"; |
| | | itemStr += L"<ItemNo>" + dw_cell.GetItemXmlString(row, colItemNo) + L"</ItemNo>"; |
| | | itemStr += L"<CustomerItemNo>" + dw_cell.GetItemXmlString(row, colCustomerItemNo) + L"</CustomerItemNo>"; |
| | | itemStr += L"<ItemName>" + dw_cell.GetItemXmlString(row, colItemName) + L"</ItemName>"; |
| | | itemStr += L"<ItemCName>" + dw_cell.GetItemXmlString(row, colItemCName) + L"</ItemCName>"; |
| | | itemStr += L"<ItemSpec>" + dw_cell.GetItemXmlString(row, colItemSpec) + L"</ItemSpec>"; |
| | | itemStr += L"<RowNo>" + xstring(row - startRow + 1) + L"</RowNo>"; |
| | | itemStr += L"<Purchor>" + dw_cell.GetItemString(row, colBuyer) + L"</Purchor>"; |
| | | itemStr += L"<Package>" + dw_cell.GetItemString(row, colPackage) + L"</Package>"; |
| | | itemStr += L"<NWT>" + dw_cell.GetItemString(row, colNW) + L"</NWT>"; |
| | | itemStr += L"<GWT>" + dw_cell.GetItemString(row, colGW) + L"</GWT>"; |
| | | itemStr += L"<VolDesc>" + dw_cell.GetItemString(row, colVolDesc) + L"</VolDesc>"; |
| | | itemStr += L"<ProductInfo>" + dw_cell.GetItemString(row, colProductInfo) + L"</ProductInfo>"; |
| | | itemStr += L"<ProductInfo1>" + dw_cell.GetItemString(row, colProductInfo1) + L"</ProductInfo1>"; |
| | | itemStr += L"<Purchor>" + dw_cell.GetItemXmlString(row, colBuyer) + L"</Purchor>"; |
| | | itemStr += L"<Package>" + dw_cell.GetItemXmlString(row, colPackage) + L"</Package>"; |
| | | itemStr += L"<NWT>" + dw_cell.GetItemXmlString(row, colNW) + L"</NWT>"; |
| | | itemStr += L"<GWT>" + dw_cell.GetItemXmlString(row, colGW) + L"</GWT>"; |
| | | itemStr += L"<VolDesc>" + dw_cell.GetItemXmlString(row, colVolDesc) + L"</VolDesc>"; |
| | | itemStr += L"<ProductInfo>" + dw_cell.GetItemXmlString(row, colProductInfo) + L"</ProductInfo>"; |
| | | itemStr += L"<ProductInfo1>" + dw_cell.GetItemXmlString(row, colProductInfo1) + L"</ProductInfo1>"; |
| | | if (dw_cell.GetItemString(row, colBuyer) == L"")issend = L"0"; |
| | | itemStr += L"<IsSend>" + issend + L"</IsSend>"; |
| | | |
| | |
| | | int colItemSpec = getItemCol(dw_cell,startRow - 1,L"Specifications,规格,产品规格"); |
| | | int colBuyer = getItemCol(dw_cell,startRow - 1,L"采购人员"); |
| | | int colPackage = getItemCol(dw_cell,startRow - 1,L"Package,包装方式"); |
| | | int col40HQ= getItemCol(dw_cell,startRow - 1,L"40HQ,QTY(40HQ)L"); |
| | | int col40HQ= getItemCol(dw_cell,startRow - 1,L"40HQ,QTY(40HQ)"); |
| | | int colBuyer = getItemCol(dw_cell,startRow - 1,L"采购人员"); |
| | | |
| | | xstring items=L"<data>"; |
| | |
| | | xstring itemStr = L""; |
| | | xstring issend=L"1"; |
| | | itemStr += L"<RowID>"+getRowID(dw_cell,row)+L"</RowID>"; |
| | | itemStr += L"<ItemNo>"+dw_cell.GetItemString(row, colItemNo)+L"</ItemNo>"; |
| | | itemStr += L"<ItemName>"+dw_cell.GetItemString(row, colItemName)+L"</ItemName>"; |
| | | itemStr += L"<ItemCName>"+dw_cell.GetItemString(row, colItemCName)+L"</ItemCName>"; |
| | | itemStr += L"<ItemSpec>"+dw_cell.GetItemString(row, colItemSpec)+L"</ItemSpec>"; |
| | | itemStr += L"<ItemNo>"+dw_cell.GetItemXmlString(row, colItemNo)+L"</ItemNo>"; |
| | | itemStr += L"<ItemName>"+dw_cell.GetItemXmlString(row, colItemName)+L"</ItemName>"; |
| | | itemStr += L"<ItemCName>"+dw_cell.GetItemXmlString(row, colItemCName)+L"</ItemCName>"; |
| | | itemStr += L"<ItemSpec>"+dw_cell.GetItemXmlString(row, colItemSpec)+L"</ItemSpec>"; |
| | | itemStr += L"<RowNo>"+(row - startRow +1).toString()+L"</RowNo>"; |
| | | itemStr += L"<Purchor>"+dw_cell.GetItemString(row, colBuyer)+L"</Purchor>"; |
| | | itemStr += L"<Package>"+dw_cell.GetItemString(row, colPackage)+L"</Package>"; |
| | | if(dw_cell.GetItemString(row, colBuyer) ==L"")issend=L"0"; |
| | | itemStr += L"<Purchor>"+dw_cell.GetItemXmlString(row, colBuyer)+L"</Purchor>"; |
| | | itemStr += L"<Package>"+dw_cell.GetItemXmlString(row, colPackage)+L"</Package>"; |
| | | if(dw_cell.GetItemXmlString(row, colBuyer) ==L"")issend=L"0"; |
| | | itemStr += L"<IsSend>"+issend+L"</IsSend>"; |
| | | |
| | | items += L"<Item>"+itemStr+L"</Item>"; |
| | |
| | | int colBuyerPrice = getItemCol(dw_cell, startRow - 1, L"采购价,采购价格"); |
| | | int colPurchor = getItemCol(dw_cell, startRow - 1, L"采购员,采购人员"); |
| | | |
| | | int colBuyerMOQ = getItemCol(dw_cell, startRow - 1, L"MOQ"); |
| | | int colBuyerRemark = getItemCol(dw_cell, startRow - 1, L"采购To业务备注"); |
| | | int colFactoryImage = getItemCol(dw_cell, startRow - 1, L"工厂图片"); |
| | | int colGWT = getItemCol(dw_cell, startRow - 1, L"毛重,毛重(KG)L"); |
| | | int colNWT = getItemCol(dw_cell, startRow - 1, L"净重,净重(KG)L"); |
| | | int colVolDesc = getItemCol(dw_cell, startRow - 1, L"体积描述,长X宽X高,长X宽X高(CM)L"); |
| | | int colVol = getItemCol(dw_cell, startRow - 1, L"体积,体积(M3)L"); |
| | | int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)L"); |
| | | int colGWT = getItemCol(dw_cell, startRow - 1, L"毛重,毛重(KG)"); |
| | | int colNWT = getItemCol(dw_cell, startRow - 1, L"净重,净重(KG)"); |
| | | int colVolDesc = getItemCol(dw_cell, startRow - 1, L"体积描述,长X宽X高,长X宽X高(CM)"); |
| | | int colVol = getItemCol(dw_cell, startRow - 1, L"体积,体积(M3)"); |
| | | int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)"); |
| | | |
| | | int colSupplier1 = getItemCol(dw_cell, startRow - 1, L"供应商1"); |
| | | int colPOPrice1 = getItemCol(dw_cell, startRow - 1, L"价格1"); |
| | |
| | | { |
| | | head = dw_cell.GetItemString(row, col); |
| | | if (head == L"Product Name" || head == L"Product Description") namecol = col; |
| | | if (head == L"FOB Price" || head == L"Fob Price" || head == L"FOB Price(USD)L") pricecol = col; |
| | | if (head == L"FOB Price" || head == L"Fob Price" || head == L"FOB Price(USD)") pricecol = col; |
| | | if (head == L"采购To业务备注") purchremarkcol = col; |
| | | if (head == L"采购人员") purchercol = col; |
| | | } |
| | | |
| | | xstring items = GetPurchedItems(); |
| | | xaserverarg arg4 ; |
| | | arg4.setNativePointer(xaserverarg::CreateInstance()); |
| | | |
| | | trace(items); |
| | | arg4.AddArg(L"value", items); |
| | | OpenWindow(L"dev:xpage[QuoteFilePurched.vx]", arg4); |
| | |
| | | //if(dw_cell.GetItemString(row, colItemName)==L"")continue; |
| | | xstring itemStr = L""; |
| | | itemStr += L"<RowID>" + getRowID(dw_cell, row) + L"</RowID>"; |
| | | itemStr += L"<ItemNo>" + dw_cell.GetItemString(row, colItemNo) + L"</ItemNo>"; |
| | | itemStr += L"<ItemName>" + dw_cell.GetItemString(row, colItemName) + L"</ItemName>"; |
| | | itemStr += L"<ItemCName>" + dw_cell.GetItemString(row, colItemCName) + L"</ItemCName>"; |
| | | itemStr += L"<ItemSpec>" + dw_cell.GetItemString(row, colItemSpec) + L"</ItemSpec>"; |
| | | itemStr += L"<BuyerPrice>" + dw_cell.GetItemString(row, colBuyerPrice) + L"</BuyerPrice>"; |
| | | itemStr += L"<ProductInfo>" + dw_cell.GetItemString(row, colProductInfo) + L"</ProductInfo>"; |
| | | itemStr += L"<ProductInfo1>" + dw_cell.GetItemString(row, colProductInfo1) + L"</ProductInfo1>"; |
| | | itemStr += L"<Buyer>" + dw_cell.GetItemString(row, colPurchor) + L"</Buyer>"; |
| | | itemStr += L"<ItemNo>" + dw_cell.GetItemXmlString(row, colItemNo) + L"</ItemNo>"; |
| | | itemStr += L"<ItemName>" + dw_cell.GetItemXmlString(row, colItemName) + L"</ItemName>"; |
| | | itemStr += L"<ItemCName>" + dw_cell.GetItemXmlString(row, colItemCName) + L"</ItemCName>"; |
| | | itemStr += L"<ItemSpec>" + dw_cell.GetItemXmlString(row, colItemSpec) + L"</ItemSpec>"; |
| | | itemStr += L"<BuyerPrice>" + dw_cell.GetItemXmlString(row, colBuyerPrice) + L"</BuyerPrice>"; |
| | | itemStr += L"<ProductInfo>" + dw_cell.GetItemXmlString(row, colProductInfo) + L"</ProductInfo>"; |
| | | itemStr += L"<ProductInfo1>" + dw_cell.GetItemXmlString(row, colProductInfo1) + L"</ProductInfo1>"; |
| | | itemStr += L"<Buyer>" + dw_cell.GetItemXmlString(row, colPurchor) + L"</Buyer>"; |
| | | |
| | | /* |
| | | if(dw_cell.GetItemString(row, colBuyerPrice)==L"") return L"采购价格没有录入"; |
| | |
| | | if(dw_cell.GetItemString(row, colVolDesc)==L"") return L"体积信息没有录入"; |
| | | } |
| | | */ |
| | | itemStr += L"<BuyerRemark>" + dw_cell.GetItemString(row, colBuyerRemark) + L"</BuyerRemark>"; |
| | | itemStr += L"<FactoryImage>" + dw_cell.GetItemString(row, colFactoryImage) + L"</FactoryImage>"; |
| | | itemStr += L"<GWT>" + dw_cell.GetItemString(row, colGWT) + L"</GWT>"; |
| | | itemStr += L"<NWT>" + dw_cell.GetItemString(row, colNWT) + L"</NWT>"; |
| | | itemStr += L"<VolDesc>" + dw_cell.GetItemString(row, colVolDesc) + L"</VolDesc>"; |
| | | itemStr += L"<Vol>" + dw_cell.GetItemString(row, colVol) + L"</Vol>"; |
| | | itemStr += L"<F40HQ>" + dw_cell.GetItemString(row, col40HQ) + L"</F40HQ>"; |
| | | itemStr += L"<BuyerMOQ>" + dw_cell.GetItemXmlString(row, colBuyerMOQ) + L"</BuyerMOQ>"; |
| | | itemStr += L"<BuyerRemark>" + dw_cell.GetItemXmlString(row, colBuyerRemark) + L"</BuyerRemark>"; |
| | | itemStr += L"<FactoryImage>" + dw_cell.GetItemXmlString(row, colFactoryImage) + L"</FactoryImage>"; |
| | | itemStr += L"<GWT>" + dw_cell.GetItemXmlString(row, colGWT) + L"</GWT>"; |
| | | itemStr += L"<NWT>" + dw_cell.GetItemXmlString(row, colNWT) + L"</NWT>"; |
| | | itemStr += L"<VolDesc>" + dw_cell.GetItemXmlString(row, colVolDesc) + L"</VolDesc>"; |
| | | itemStr += L"<Vol>" + dw_cell.GetItemXmlString(row, colVol) + L"</Vol>"; |
| | | itemStr += L"<F40HQ>" + dw_cell.GetItemXmlString(row, col40HQ) + L"</F40HQ>"; |
| | | |
| | | itemStr += L"<PurchedDate>" + sdate + L"</PurchedDate>"; |
| | | itemStr += L"<supplier-photo>" + getRowTerm(dw_cell, row, L"supplier-photo") + L"</supplier-photo>"; |
| | |
| | | int colItemQty = getItemCol(dw_cell, headrow, L"数量,Qty"); |
| | | //int colItemSpec = getItemCol(dw_cell,headrow,L"Specifications,规格,产品规格"); |
| | | int colItemPurchDate = getItemCol(dw_cell, headrow, L"业务发送采购时间"); |
| | | int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)L"); |
| | | int colInnerOuter = getItemCol(dw_cell, startRow - 1, L"装箱数(内/外)L"); |
| | | int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)"); |
| | | int colInnerOuter = getItemCol(dw_cell, startRow - 1, L"装箱数(内/外)"); |
| | | int col = 0; |
| | | int namecol = 0; |
| | | int pricecol = 0; |
| | |
| | | { |
| | | head = dw_cell.GetItemString(row, col); |
| | | if (head == L"Product Name" || head == L"Product Description") namecol = col; |
| | | if (head == L"FOB Price" || head == L"Fob Price" || head == L"FOB Price(USD)L") pricecol = col; |
| | | if (head == L"FOB Price" || head == L"Fob Price" || head == L"FOB Price(USD)") pricecol = col; |
| | | if (head == L"采购To业务备注") purchremarkcol = col; |
| | | if (head == L"采购人员") purchercol = col; |
| | | } |
| | |
| | | |
| | | xstring items = GetPurchItems(); |
| | | xaserverarg arg4 ; |
| | | arg4.setNativePointer(xaserverarg::CreateInstance()); |
| | | |
| | | trace(items); |
| | | arg4.AddArg(L"value", items); |
| | | OpenWindow(L"dev:xpage[QuoteFilePurch.vx]", arg4); |
| | |
| | | int colItemQty = getItemCol(dw_cell, headrow, L"数量,Qty"); |
| | | //int colItemSpec = getItemCol(dw_cell,headrow,L"Specifications,规格,产品规格"); |
| | | int colItemPurchDate = getItemCol(dw_cell, headrow, L"业务发送采购时间"); |
| | | int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)L"); |
| | | int colInnerOuter = getItemCol(dw_cell, startRow - 1, L"装箱数(内/外)L"); |
| | | int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)"); |
| | | int colInnerOuter = getItemCol(dw_cell, startRow - 1, L"装箱数(内/外)"); |
| | | int colSalebackDate = getItemCol(dw_cell, startRow - 1, L"采购提交业务时间"); |
| | | |
| | | int col = 0; |
| | |
| | | { |
| | | head = dw_cell.GetItemString(row, col); |
| | | if (head == L"Product Name" || head == L"Product Description") namecol = col; |
| | | if (head == L"FOB Price" || head == L"Fob Price" || head == L"FOB Price(USD)L") pricecol = col; |
| | | if (head == L"FOB Price" || head == L"Fob Price" || head == L"FOB Price(USD)") pricecol = col; |
| | | if (head == L"采购To业务备注") purchremarkcol = col; |
| | | if (head == L"采购人员") purchercol = col; |
| | | } |
| | |
| | | return 1; |
| | | } |
| | | |
| | | xstring strs = L",L"; |
| | | xstring strs = L","; |
| | | row++; |
| | | |
| | | int colCustomerPhoto = getItemCol(dw_cell, startRow - 1, L"Photo,Customer Photo"); |
| | |
| | | if (str == L"")break; |
| | | |
| | | //ensureRowID(dw_cell,row); |
| | | if (strs.find(L",L" + str + L",L") < 0) |
| | | if (strs.find(L"," + str + L",") < 0) |
| | | { |
| | | if (purcher.selectSingleNode(L"//Name[.='" + str + L"']")) |
| | | { |
| | | strs += str + L",L"; |
| | | strs += str + L","; |
| | | } |
| | | else |
| | | { |
| | |
| | | } |
| | | row++; |
| | | } |
| | | if (strs == L",L") |
| | | if (strs == L",") |
| | | { |
| | | alert(L"请指定采购人员!"); |
| | | return 1; |
| | |
| | | str = dw_cell.GetItemString(row, purchercol); |
| | | if (str == L"")break; |
| | | |
| | | if (strs.find(L",L" + str + L",L") < 0) |
| | | if (strs.find(L"," + str + L",") < 0) |
| | | { |
| | | if (purcher.selectSingleNode(L"//Name[.='" + str + L"']")) |
| | | { |
| | | strs += str + L",L"; |
| | | strs += str + L","; |
| | | } |
| | | else |
| | | { |
| | |
| | | xml x ; |
| | | |
| | | |
| | | if (strs.left(1) == L",L") strs = strs.mid(1, 9999); |
| | | if (strs.right(1) == L",L") strs = strs.left(strs.length() - 1); |
| | | if (strs.left(1) == L",") strs = strs.mid(1, 9999); |
| | | if (strs.right(1) == L",") strs = strs.left(strs.length() - 1); |
| | | |
| | | xstring purchors = strs; |
| | | |
| | | xstring supplier; |
| | | if (strs.find(L",L", 0) > 0) |
| | | if (strs.find(L",", 0) > 0) |
| | | { |
| | | supplier = strs.left(strs.find(L",L", 0)); |
| | | strs = strs.mid(strs.find(L",L", 0) + 1, 9999); |
| | | supplier = strs.left(strs.find(L",", 0)); |
| | | strs = strs.mid(strs.find(L",", 0) + 1, 9999); |
| | | } |
| | | else |
| | | { |
| | |
| | | if (supplier == username) len = 0; |
| | | if (len < 1) |
| | | { |
| | | if (strs.find(L",L", 0) > 0) |
| | | if (strs.find(L",", 0) > 0) |
| | | { |
| | | supplier = strs.left(strs.find(L",L", 0)); |
| | | strs = strs.mid(strs.find(L",L", 0) + 1, 9999); |
| | | supplier = strs.left(strs.find(L",", 0)); |
| | | strs = strs.mid(strs.find(L",", 0) + 1, 9999); |
| | | } |
| | | else |
| | | { |
| | |
| | | |
| | | |
| | | if (SendToPurcher(supplier, cell1.GetData()) == -1) return 1; |
| | | if (strs.find(L",L", 0) > 0) |
| | | if (strs.find(L",", 0) > 0) |
| | | { |
| | | supplier = strs.left(strs.find(L",L", 0)); |
| | | strs = strs.mid(strs.find(L",L", 0) + 1, 9999); |
| | | supplier = strs.left(strs.find(L",", 0)); |
| | | strs = strs.mid(strs.find(L",", 0) + 1, 9999); |
| | | } |
| | | else |
| | | { |
| | |
| | | } |
| | | dw_cell.SetRowColumn(lastrow, 1); |
| | | dw_cell.SetAnchorRowColumn(lastrow, 1); |
| | | SendCtrlCmd(dw_cell, L"xmFormatCellDeleteRow"); |
| | | //SendCtrlCmd(dw_cell, L"xmFormatCellDeleteRow"); //now not direct delete purch next |
| | | drow++; |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | xstring finished = L"1"; |
| | | PUser& user = publiccode::GetUser(); |
| | | xstring myname = user.name; |
| | | for (row = startRow; row <= rowCount; row++) |
| | | { |
| | | if (getRowID(dw_cell, row) == L"") continue; |
| | | if (dw_cell.GetItemString(row, colItemName) == L"")continue; |
| | | if (dw_cell.GetItemString(row, colSalebackDate) == L"") |
| | | { |
| | | xstring purchor = dw_cell.GetItemString(row, purchercol); |
| | | if (purchor != L"" && purchor != myname) continue; //purchnext |
| | | finished = L"0"; |
| | | break; |
| | | } |
| | |
| | | if (0 == 1)OnUpdateEntityFile(); |
| | | OnUpdate(); |
| | | |
| | | if (finished == L"1") |
| | | { |
| | | OnUpdateProcessed(); |
| | | alert(L"xxxxx"); |
| | | } |
| | | if (finished == L"1")OnUpdateProcessed(); |
| | | |
| | | //OnSaveEx(true); |
| | | //alert(L"询价信息已发送给:"+purchors); |
| | |
| | | int colItemQty = getItemCol(dw_cell, headrow, L"数量,Qty"); |
| | | //int colItemSpec = getItemCol(dw_cell,headrow,L"Specifications,规格,产品规格"); |
| | | int colItemPurchDate = getItemCol(dw_cell, headrow, L"业务发送采购时间"); |
| | | int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)L"); |
| | | int colInnerOuter = getItemCol(dw_cell, startRow - 1, L"装箱数(内/外)L"); |
| | | int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)"); |
| | | int colInnerOuter = getItemCol(dw_cell, startRow - 1, L"装箱数(内/外)"); |
| | | |
| | | int col = 0; |
| | | int namecol = 0; |
| | |
| | | { |
| | | head = dw_cell.GetItemString(row, col); |
| | | if (head == L"Product Name" || head == L"Product Description") namecol = col; |
| | | if (head == L"FOB Price" || head == L"Fob Price" || head == L"FOB Price(USD)L") pricecol = col; |
| | | if (head == L"FOB Price" || head == L"Fob Price" || head == L"FOB Price(USD)") pricecol = col; |
| | | if (head == L"采购To业务备注") purchremarkcol = col; |
| | | if (head == L"采购人员") purchercol = col; |
| | | } |
| | |
| | | return 1; |
| | | } |
| | | |
| | | xstring strs = L",L"; |
| | | xstring strs = L","; |
| | | row++; |
| | | |
| | | int colCustomerPhoto = getItemCol(dw_cell, startRow - 1, L"Photo,Customer Photo"); |
| | |
| | | }*/ |
| | | |
| | | ensureRowID(dw_cell, row); |
| | | if (strs.find(L",L" + str + L",L") < 0) |
| | | if (strs.find(L"," + str + L",") < 0) |
| | | { |
| | | if (purcher.selectSingleNode(L"//Name[.='" + str + L"']")) |
| | | { |
| | | strs += str + L",L"; |
| | | strs += str + L","; |
| | | } |
| | | else |
| | | { |
| | |
| | | } |
| | | row++; |
| | | } |
| | | if (strs == L",L") |
| | | if (strs == L",") |
| | | { |
| | | alert(L"找不到采购人员数据!"); |
| | | return 1; |
| | |
| | | |
| | | xstring items = GetPurchItems(); |
| | | xaserverarg arg4 ; |
| | | arg4.setNativePointer(xaserverarg::CreateInstance()); |
| | | |
| | | trace(items); |
| | | arg4.AddArg(L"value", items); |
| | | OpenWindow(L"dev:xpage[QuoteFilePurch.vx]", arg4); |
| | |
| | | xml x ; |
| | | |
| | | |
| | | if (strs.left(1) == L",L") strs = strs.mid(1, 9999); |
| | | if (strs.right(1) == L",L") strs = strs.left(strs.length() - 1); |
| | | if (strs.left(1) == L",") strs = strs.mid(1, 9999); |
| | | if (strs.right(1) == L",") strs = strs.left(strs.length() - 1); |
| | | |
| | | xstring purchors = strs; |
| | | |
| | | xstring supplier; |
| | | if (strs.find(L",L", 0) > 0) |
| | | if (strs.find(L",", 0) > 0) |
| | | { |
| | | supplier = strs.left(strs.find(L",L", 0)); |
| | | strs = strs.mid(strs.find(L",L", 0) + 1, 9999); |
| | | supplier = strs.left(strs.find(L",", 0)); |
| | | strs = strs.mid(strs.find(L",", 0) + 1, 9999); |
| | | } |
| | | else |
| | | { |
| | |
| | | int len = ts.length(); |
| | | if (len < 1) |
| | | { |
| | | if (strs.find(L",L", 0) > 0) |
| | | if (strs.find(L",", 0) > 0) |
| | | { |
| | | supplier = strs.left(strs.find(L",L", 0)); |
| | | strs = strs.mid(strs.find(L",L", 0) + 1, 9999); |
| | | supplier = strs.left(strs.find(L",", 0)); |
| | | strs = strs.mid(strs.find(L",", 0) + 1, 9999); |
| | | } |
| | | else |
| | | { |
| | |
| | | SendCtrlCmd(cell1, L"xmFormatCellInsertCol"); |
| | | SendCtrlCmd(cell1, L"xmFormatCellInsertCol"); |
| | | SendCtrlCmd(cell1, L"xmFormatCellInsertCol"); |
| | | SendCtrlCmd(cell1, L"xmFormatCellInsertCol"); |
| | | SendCtrlCmd(cell1, L"xmFormatCellInsertCol"); |
| | | SendCtrlCmd(cell1, L"xmFormatCellInsertCol"); |
| | | //SendCtrlCmd(cell1, L"xmFormatCellInsertCol"); |
| | | //SendCtrlCmd(cell1, L"xmFormatCellInsertCol"); |
| | | //SendCtrlCmd(cell1, L"xmFormatCellInsertCol"); |
| | | |
| | | cell1.SetItemString(headrow, purchremarkcol + 1, L"供应商"); |
| | | cell1.SetItemString(headrow, purchremarkcol + 2, L"类型"); |
| | | cell1.SetItemString(headrow, purchremarkcol + 3, L"价格"); |
| | | cell1.SetItemString(headrow, purchremarkcol + 4, L"供应商1"); |
| | | cell1.SetItemString(headrow, purchremarkcol + 5, L"类型1"); |
| | | cell1.SetItemString(headrow, purchremarkcol + 6, L"价格1"); |
| | | //cell1.SetItemString(headrow, purchremarkcol + 4, L"供应商1"); |
| | | //cell1.SetItemString(headrow, purchremarkcol + 5, L"类型1"); |
| | | //cell1.SetItemString(headrow, purchremarkcol + 6, L"价格1"); |
| | | |
| | | int colRemark = getItemCol(cell1, headrow, L"Remarks"); |
| | | cell1.SetRowColumn(1, colRemark); |
| | |
| | | } |
| | | |
| | | if (SendToPurcher(supplier, cell1.GetData()) == -1) return 1; |
| | | if (strs.find(L",L", 0) > 0) |
| | | if (strs.find(L",", 0) > 0) |
| | | { |
| | | supplier = strs.left(strs.find(L",L", 0)); |
| | | strs = strs.mid(strs.find(L",L", 0) + 1, 9999); |
| | | supplier = strs.left(strs.find(L",", 0)); |
| | | strs = strs.mid(strs.find(L",", 0) + 1, 9999); |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | trace(L"BusinessItemID:" + id); |
| | | xml x = ViewObject::RetrieveData(L"/sale/data/TO/business/document", L"BusinessItemID", id); |
| | | |
| | | |
| | | BSTR str; |
| | | x.get_xml(str); |
| | | ::SysFreeString(str); |
| | | /* |
| | | xml sheet ; |
| | | sheet.setNativePointer(x.CreateInstance()); |
| | | sheet.loadXML(x.selectSingleNode(L"data/*").xml); |
| | | wangushendi xiuluowushen taigukuangmo |
| | | */ |
| | | |
| | | //trace(x.xml()); |
| | |
| | | { |
| | | int pos = str.find(L";", str.find(tm + L":") + 1); |
| | | if (pos < 0) return 1; |
| | | str = str.left(pos) + L",L" + guid + str.mid(pos, 99999); |
| | | str = str.left(pos) + L"," + guid + str.mid(pos, 99999); |
| | | } |
| | | else |
| | | { |
| | |
| | | if (pos > 0 && str.mid(pos - 1, 1) == L":") |
| | | str = str.left(pos) + guid + str.mid(pos, 99999); |
| | | else |
| | | str = str.left(pos) + L",L" + guid + str.mid(pos, 99999); |
| | | str = str.left(pos) + L"," + guid + str.mid(pos, 99999); |
| | | } |
| | | else |
| | | { |
| | |
| | | while (true) |
| | | { |
| | | count++; |
| | | spos = images.find(L",L", spos + 1); |
| | | spos = images.find(L",", spos + 1); |
| | | if (spos < 0) break; |
| | | } |
| | | trace(L" count:" + xstring(count)); |
| | |
| | | while (true) |
| | | { |
| | | if (i == index) break; |
| | | spos = images.find(L",L", spos + 1); |
| | | spos = images.find(L",", spos + 1); |
| | | if (spos < 0) break; |
| | | i++; |
| | | } |
| | | int epos = images.find(L",L", spos + 1); |
| | | int epos = images.find(L",", spos + 1); |
| | | if (spos >= 0) |
| | | { |
| | | if (epos < 0) |
| | |
| | | |
| | | if (im.GetImageCount() - sindex >= 1) |
| | | { |
| | | if (images.find(L",L") == 0) images = images.mid(1, 9999); |
| | | int pos1 = images.find(L",L"); |
| | | if (images.find(L",") == 0) images = images.mid(1, 9999); |
| | | int pos1 = images.find(L","); |
| | | if (pos1 < 0) pos1 = images.find(L";"); |
| | | xstring id = images; |
| | | if (pos1 >= 0) id = images.left(pos1); |
| | |
| | | return 1; |
| | | } |
| | | |
| | | int GetOpenFileNames(xarray<xstring>& items, xstring initFileName, xstring filter, xstring ext) |
| | | int GetOpenFileNames(xarray<xstring>& items, xstring initFileName, const string filter, xstring ext) |
| | | { |
| | | //xstring path = GetOpenFileName(L"", |
| | | // "JPEG 文件(*.jpg)\0*.jpg;*.jpeg;*.png;*.gif;*.bmp\0全部文件(*.*)\0*.*\0", |
| | |
| | | int nFilterIndex = 1; |
| | | OPENFILENAMEW ofn; |
| | | |
| | | ofn.lStructSize = 88;//sizeof(ofn); |
| | | ofn.lStructSize = sizeof(ofn); |
| | | ofn.hwndOwner = 0; |
| | | ofn.hInstance = 0; |
| | | ofn.lpstrFilter = filter; |
| | |
| | | else |
| | | { |
| | | wchar_t* start = szPath; |
| | | start += pos * 2; |
| | | start += pos;; |
| | | xstring str = start; |
| | | while (true) |
| | | { |
| | | if (str == L"")break; |
| | | items.push_back(path + L"/" + str); |
| | | start += (str.length() + 1) * 2; |
| | | start += (str.length() + 1) ; |
| | | str = start; |
| | | } |
| | | } |
| | |
| | | return 1; |
| | | } |
| | | |
| | | int OnCellItemChanged(TEvent* evt, int p) |
| | | |
| | | int ReCalcPOPrice() |
| | | { |
| | | int startRow = getItemHeadRow(dw_cell); |
| | | if (startRow < 1) return 1; |
| | | startRow++; |
| | | |
| | | int sRow = dw_cell.GetRow(); |
| | | int eRow = dw_cell.GetAnchorRow(); |
| | | int sCol = dw_cell.GetColumn(); |
| | | int eCol = dw_cell.GetAnchorCol(); |
| | | auto Exchange = [](int& first, int& second) |
| | | { |
| | | int tmp = first;first = second;second = tmp; |
| | | }; |
| | | if (sRow > eRow)Exchange(sRow, eRow); |
| | | if (sCol > eCol)Exchange(sCol, eCol); |
| | | |
| | | if (action != L"purch") return 1; |
| | | |
| | | if (sRow < startRow && eRow < startRow) return 1; |
| | | if (sRow < startRow) sRow = startRow; |
| | | int colPrice0 = getItemCol(dw_cell, startRow - 1, L"价格"); |
| | | int colPrice1 = getItemCol(dw_cell, startRow - 1, L"价格1"); |
| | | int colPrice2 = getItemCol(dw_cell, startRow - 1, L"价格2"); |
| | | int colPrice3 = getItemCol(dw_cell, startRow - 1, L"价格3"); |
| | | int colPrice = getItemCol(dw_cell, startRow - 1, L"采购价"); |
| | | int colSKUID = getItemCol(dw_cell, startRow - 1, L"SKUID"); |
| | | bool shouldRedraw = false; |
| | | |
| | | if ((colPrice0 >= sCol && colPrice0 <= eCol) || (colPrice1 >= sCol && colPrice1 <= eCol) |
| | | || (colPrice2 >= sCol && colPrice2 <= eCol) || (colPrice3 >= sCol && colPrice3 <= eCol)) |
| | | { |
| | | for (int row = sRow; row <= eRow; row++) |
| | | { |
| | | if (dw_cell.GetItemString(row, colSKUID) == L"")continue; |
| | | for (int col = sCol; col <= eCol; col++) |
| | | { |
| | | if (colPrice0 == col || colPrice1 == col || colPrice2 == col || colPrice3 == col) |
| | | { |
| | | xstring pricea = L""; |
| | | xstring priceb = L""; |
| | | xstring pricec = L""; |
| | | |
| | | xstring price0 = dw_cell.GetItemString(row, colPrice0); |
| | | xstring price1 = dw_cell.GetItemString(row, colPrice1); |
| | | xstring price2 = L""; |
| | | if (colPrice2 > 0) price2 = dw_cell.GetItemString(row, colPrice2); |
| | | xstring price3 = L""; |
| | | if (colPrice3 > 0) price3 = dw_cell.GetItemString(row, colPrice3); |
| | | |
| | | xstring price = L""; |
| | | |
| | | if (price0 != L"") |
| | | { |
| | | price = price0; |
| | | if (price.find(L"A") < 1 && price.find(L"B") < 1 && price.find(L"C") < 1 && price.find(L"a") < 1 && price.find(L"b") < 1 && price.find(L"b") < 1) |
| | | { |
| | | alert(L"价格中没指定ABC"); |
| | | if (pricea == L"") pricea = price; else pricea += L"+" + price; |
| | | } |
| | | else if (price.find(L"A") > 0 || price.find(L"a") > 0) |
| | | if (pricea == L"") pricea = price; else pricea += L"+" + price; |
| | | else if (price.find(L"B") > 0 || price.find(L"b") > 0) |
| | | if (priceb == L"") priceb = price; else priceb += L"+" + price; |
| | | else if (price.find(L"C") > 0 || price.find(L"c") > 0) |
| | | if (pricec == L"") pricec = price; else pricec += L"+" + price; |
| | | } |
| | | if (price1 != L"") |
| | | { |
| | | price = price1; |
| | | if (price.find(L"A") < 1 && price.find(L"B") < 1 && price.find(L"C") < 1 && price.find(L"a") < 1 && price.find(L"b") < 1 && price.find(L"b") < 1) |
| | | { |
| | | alert(L"价格中没指定ABC"); |
| | | if (pricea == L"") pricea = price; else pricea += L"+" + price; |
| | | } |
| | | else if (price.find(L"A") > 0 || price.find(L"a") > 0) |
| | | if (pricea == L"") pricea = price; else pricea += L"+" + price; |
| | | else if (price.find(L"B") > 0 || price.find(L"b") > 0) |
| | | if (priceb == L"") priceb = price; else priceb += L"+" + price; |
| | | else if (price.find(L"C") > 0 || price.find(L"c") > 0) |
| | | if (pricec == L"") pricec = price; else pricec += L"+" + price; |
| | | } |
| | | if (price2 != L"") |
| | | { |
| | | price = price2; |
| | | if (price.find(L"A") < 1 && price.find(L"B") < 1 && price.find(L"C") < 1 && price.find(L"a") < 1 && price.find(L"b") < 1 && price.find(L"b") < 1) |
| | | { |
| | | alert(L"价格中没指定ABC"); |
| | | if (pricea == L"") pricea = price; else pricea += L"+" + price; |
| | | } |
| | | else if (price.find(L"A") > 0 || price.find(L"a") > 0) |
| | | if (pricea == L"") pricea = price; else pricea += L"+" + price; |
| | | else if (price.find(L"B") > 0 || price.find(L"b") > 0) |
| | | if (priceb == L"") priceb = price; else priceb += L"+" + price; |
| | | else if (price.find(L"C") > 0 || price.find(L"c") > 0) |
| | | if (pricec == L"") pricec = price; else pricec += L"+" + price; |
| | | } |
| | | if (price3 != L"") |
| | | { |
| | | price = price3; |
| | | if (price.find(L"A") < 1 && price.find(L"B") < 1 && price.find(L"C") < 1 && price.find(L"a") < 1 && price.find(L"b") < 1 && price.find(L"b") < 1) |
| | | { |
| | | alert(L"价格中没指定ABC"); |
| | | if (pricea == L"") pricea = price; else pricea += L"+" + price; |
| | | } |
| | | else if (price.find(L"A") > 0 || price.find(L"a") > 0) |
| | | if (pricea == L"") pricea = price; else pricea += L"+" + price; |
| | | else if (price.find(L"B") > 0 || price.find(L"b") > 0) |
| | | if (priceb == L"") priceb = price; else priceb += L"+" + price; |
| | | else if (price.find(L"C") > 0 || price.find(L"c") > 0) |
| | | if (pricec == L"") pricec = price; else pricec += L"+" + price; |
| | | } |
| | | price = pricec; |
| | | if (priceb != L"") |
| | | { |
| | | if (price == L"") |
| | | price = priceb; |
| | | else |
| | | price += L"+" + priceb; |
| | | } |
| | | if (pricea != L"") |
| | | { |
| | | if (price == L"") |
| | | price = pricea; |
| | | else |
| | | price += L"+" + pricea; |
| | | } |
| | | dw_cell.SetItemString(row, colPrice, price); |
| | | shouldRedraw = true; |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if(shouldRedraw)dw_cell.Redraw(); |
| | | return 1; |
| | | } |
| | | |
| | | int OnCellItemChanged(TEvent* evt, LPARAM p) |
| | | { |
| | | CELLNMHDR& hdr = *(CELLNMHDR*)evt->notify.pnmh; |
| | | xstring value = hdr.data; |
| | | int row = hdr.currentrow; |
| | | int col = hdr.currentcol; |
| | | |
| | | |
| | | trace(L"\r\n----row:" + xstring(row) + L"--col:" + xstring(col)); |
| | | trace(L"\r\n----row:" + xstring(row) + L"--col:" + xstring(col)); |
| | | trace(L"\r\n--value:" + dw_cell.GetItemString(row, col) + L"--orig:" + orivalue); |
| | | if (row == ARow && col == ACol && dw_cell.GetItemString(row, col) == orivalue) return 1; |
| | | //if (row == ARow && col == ACol && dw_cell.GetItemString(row, col) == orivalue) return 1; |
| | | trace(L"\r\n--enter:"); |
| | | |
| | | ARow = row; |
| | |
| | | //int colToPODate = getItemCol(dw_cell,startRow - 1,L"业务发送采购时间"); |
| | | |
| | | |
| | | int colVolDesc = getItemCol(dw_cell, startRow - 1, L"体积描述,长X宽X高,长X宽X高(CM)L"); |
| | | int colVol = getItemCol(dw_cell, startRow - 1, L"体积,体积(M3)L"); |
| | | int colQtyPerPack = getItemCol(dw_cell, startRow - 1, L"装箱数(内/外),装箱数(外/内)L"); |
| | | int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)L"); |
| | | int colVolDesc = getItemCol(dw_cell, startRow - 1, L"体积描述,长X宽X高,长X宽X高(CM)"); |
| | | int colVol = getItemCol(dw_cell, startRow - 1, L"体积,体积(M3)"); |
| | | int colQtyPerPack = getItemCol(dw_cell, startRow - 1, L"装箱数(内/外),装箱数(外/内)"); |
| | | int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)"); |
| | | int colSKUID = getItemCol(dw_cell, startRow - 1, L"SKUID"); |
| | | |
| | | int colPONote = getItemCol(dw_cell, startRow - 1, L"采购To业务备注"); |
| | | int colPOPhoto = getItemCol(dw_cell, startRow - 1, L"工厂图片"); |
| | | int colPOPrice = getItemCol(dw_cell, startRow - 1, L"采购价"); |
| | | int colNW = getItemCol(dw_cell, startRow - 1, L"毛重(KG)L"); |
| | | int colGW = getItemCol(dw_cell, startRow - 1, L"净重(KG)L"); |
| | | int colNW = getItemCol(dw_cell, startRow - 1, L"毛重(KG)"); |
| | | int colGW = getItemCol(dw_cell, startRow - 1, L"净重(KG)"); |
| | | int colSKUNo = getItemCol(dw_cell, startRow - 1, L"SKUID,SKUNo"); |
| | | |
| | | if (col == colFOBPrice) |
| | |
| | | if (dw_cell.GetItemString(row, colItemNo) != L"") |
| | | { |
| | | xaserverarg argx ; |
| | | argx.setNativePointer(argx.CreateInstance()); |
| | | |
| | | argx.AddArg(L"GoodsNo", dw_cell.GetItemString(row, colItemNo)); |
| | | OpenWindow(L"dev:xpage[CustomerItemNoList.vx]", argx); |
| | | if (argx.GetArgString(L"action") != L"ok") return 1; |
| | |
| | | /*计算体积*/ |
| | | double v = 0.0; |
| | | xstring desc = dw_cell.GetItemString(row, colVolDesc); |
| | | if (desc.find(L"cm") >= 0) |
| | | if(desc!=L"") |
| | | { |
| | | desc = desc.replace(L"cm", L""); |
| | | dw_cell.SetItemString(row, colVolDesc, desc); |
| | | } |
| | | if (desc.find(L"CM") >= 0) |
| | | { |
| | | desc = desc.replace(L"CM", L""); |
| | | dw_cell.SetItemString(row, colVolDesc, desc); |
| | | } |
| | | if (desc == L"") |
| | | dw_cell.SetItemString(row, colVol, L""); |
| | | else |
| | | { |
| | | v = calcVol(desc) / 1000000.00; |
| | | xstring str = xstring(v); |
| | | if (str.find(L".") >= 0) str = str.left(str.find(L".") + 5); |
| | | dw_cell.SetItemString(row, colVol, str); |
| | | dw_cell.Redraw(); |
| | | } |
| | | |
| | | xstring qtyperPack = dw_cell.GetItemString(row, colQtyPerPack); |
| | | if (qtyperPack != L"") |
| | | { |
| | | xstring qty1 = qtyperPack; |
| | | xstring qty2 = L""; |
| | | double qty = 0.00; |
| | | int pos2 = qtyperPack.find(L"/"); |
| | | if (pos2 >= 0) |
| | | if (desc.find(L"cm") >= 0) |
| | | { |
| | | qty1 = qtyperPack.left(qtyperPack.find(L"/")); |
| | | qty2 = qtyperPack.mid(qtyperPack.find(L"/") + 1, 9999); |
| | | desc = desc.replace(L"cm", L""); |
| | | dw_cell.SetItemString(row, colVolDesc, desc); |
| | | } |
| | | //if(qty1 !=L"") qty = qty1.toDouble(); |
| | | //if(qty2 !=L"") qty = qty*qty2.toDouble(); |
| | | qty = qty2.toDouble(); |
| | | double ttl = 65.0 * qty / v; |
| | | dw_cell.SetItemString(row, col40HQ, xstring((int)ttl)); |
| | | if (desc.find(L"CM") >= 0) |
| | | { |
| | | desc = desc.replace(L"CM", L""); |
| | | dw_cell.SetItemString(row, colVolDesc, desc); |
| | | } |
| | | if (desc == L"") |
| | | dw_cell.SetItemString(row, colVol, L""); |
| | | else |
| | | { |
| | | v = calcVol(desc) / 1000000.00; |
| | | xstring str = xstring(v); |
| | | if (str.find(L".") >= 0) str = str.left(str.find(L".") + 5); |
| | | dw_cell.SetItemString(row, colVol, str); |
| | | dw_cell.Redraw(); |
| | | } |
| | | |
| | | xstring qtyperPack = dw_cell.GetItemString(row, colQtyPerPack); |
| | | if (qtyperPack != L"") |
| | | { |
| | | xstring qty1 = qtyperPack; |
| | | xstring qty2 = L""; |
| | | double qty = 0.00; |
| | | int pos2 = qtyperPack.find(L"/"); |
| | | if (pos2 >= 0) |
| | | { |
| | | qty1 = qtyperPack.left(qtyperPack.find(L"/")); |
| | | qty2 = qtyperPack.mid(qtyperPack.find(L"/") + 1, 9999); |
| | | } |
| | | //if(qty1 !=L"") qty = qty1.toDouble(); |
| | | //if(qty2 !=L"") qty = qty*qty2.toDouble(); |
| | | if (qty2 != L"") |
| | | { |
| | | qty = qty2.toDouble(); |
| | | double ttl = 65.0 * qty / v; |
| | | dw_cell.SetItemString(row, col40HQ, xstring((int)ttl)); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | if (price.find(L"A") < 1 && price.find(L"B") < 1 && price.find(L"C") < 1 && price.find(L"a") < 1 && price.find(L"b") < 1 && price.find(L"b") < 1) |
| | | { |
| | | alert(L"价格中没指定ABC"); |
| | | if (pricea == L"") pricea = price; else pricea += L"+L" + price; |
| | | if (pricea == L"") pricea = price; else pricea += L"+" + price; |
| | | } |
| | | else if (price.find(L"A") > 0 || price.find(L"a") > 0) |
| | | if (pricea == L"") pricea = price; else pricea += L"+L" + price; |
| | | if (pricea == L"") pricea = price; else pricea += L"+" + price; |
| | | else if (price.find(L"B") > 0 || price.find(L"b") > 0) |
| | | if (priceb == L"") priceb = price; else priceb += L"+L" + price; |
| | | if (priceb == L"") priceb = price; else priceb += L"+" + price; |
| | | else if (price.find(L"C") > 0 || price.find(L"c") > 0) |
| | | if (pricec == L"") pricec = price; else pricec += L"+L" + price; |
| | | if (pricec == L"") pricec = price; else pricec += L"+" + price; |
| | | } |
| | | if (price1 != L"") |
| | | { |
| | |
| | | if (price.find(L"A") < 1 && price.find(L"B") < 1 && price.find(L"C") < 1 && price.find(L"a") < 1 && price.find(L"b") < 1 && price.find(L"b") < 1) |
| | | { |
| | | alert(L"价格中没指定ABC"); |
| | | if (pricea == L"") pricea = price; else pricea += L"+L" + price; |
| | | if (pricea == L"") pricea = price; else pricea += L"+" + price; |
| | | } |
| | | else if (price.find(L"A") > 0 || price.find(L"a") > 0) |
| | | if (pricea == L"") pricea = price; else pricea += L"+L" + price; |
| | | if (pricea == L"") pricea = price; else pricea += L"+" + price; |
| | | else if (price.find(L"B") > 0 || price.find(L"b") > 0) |
| | | if (priceb == L"") priceb = price; else priceb += L"+L" + price; |
| | | if (priceb == L"") priceb = price; else priceb += L"+" + price; |
| | | else if (price.find(L"C") > 0 || price.find(L"c") > 0) |
| | | if (pricec == L"") pricec = price; else pricec += L"+L" + price; |
| | | if (pricec == L"") pricec = price; else pricec += L"+" + price; |
| | | } |
| | | if (price2 != L"") |
| | | { |
| | |
| | | if (price.find(L"A") < 1 && price.find(L"B") < 1 && price.find(L"C") < 1 && price.find(L"a") < 1 && price.find(L"b") < 1 && price.find(L"b") < 1) |
| | | { |
| | | alert(L"价格中没指定ABC"); |
| | | if (pricea == L"") pricea = price; else pricea += L"+L" + price; |
| | | if (pricea == L"") pricea = price; else pricea += L"+" + price; |
| | | } |
| | | else if (price.find(L"A") > 0 || price.find(L"a") > 0) |
| | | if (pricea == L"") pricea = price; else pricea += L"+L" + price; |
| | | if (pricea == L"") pricea = price; else pricea += L"+" + price; |
| | | else if (price.find(L"B") > 0 || price.find(L"b") > 0) |
| | | if (priceb == L"") priceb = price; else priceb += L"+L" + price; |
| | | if (priceb == L"") priceb = price; else priceb += L"+" + price; |
| | | else if (price.find(L"C") > 0 || price.find(L"c") > 0) |
| | | if (pricec == L"") pricec = price; else pricec += L"+L" + price; |
| | | if (pricec == L"") pricec = price; else pricec += L"+" + price; |
| | | } |
| | | if (price3 != L"") |
| | | { |
| | |
| | | if (price.find(L"A") < 1 && price.find(L"B") < 1 && price.find(L"C") < 1 && price.find(L"a") < 1 && price.find(L"b") < 1 && price.find(L"b") < 1) |
| | | { |
| | | alert(L"价格中没指定ABC"); |
| | | if (pricea == L"") pricea = price; else pricea += L"+L" + price; |
| | | if (pricea == L"") pricea = price; else pricea += L"+" + price; |
| | | } |
| | | else if (price.find(L"A") > 0 || price.find(L"a") > 0) |
| | | if (pricea == L"") pricea = price; else pricea += L"+L" + price; |
| | | if (pricea == L"") pricea = price; else pricea += L"+" + price; |
| | | else if (price.find(L"B") > 0 || price.find(L"b") > 0) |
| | | if (priceb == L"") priceb = price; else priceb += L"+L" + price; |
| | | if (priceb == L"") priceb = price; else priceb += L"+" + price; |
| | | else if (price.find(L"C") > 0 || price.find(L"c") > 0) |
| | | if (pricec == L"") pricec = price; else pricec += L"+L" + price; |
| | | if (pricec == L"") pricec = price; else pricec += L"+" + price; |
| | | } |
| | | price = pricec; |
| | | if (priceb != L"") |
| | |
| | | if (price == L"") |
| | | price = priceb; |
| | | else |
| | | price += L"+L" + priceb; |
| | | price += L"+" + priceb; |
| | | } |
| | | if (pricea != L"") |
| | | { |
| | | if (price == L"") |
| | | price = pricea; |
| | | else |
| | | price += L"+L" + pricea; |
| | | price += L"+" + pricea; |
| | | } |
| | | dw_cell.SetItemString(row, colPrice, price); |
| | | dw_cell.Redraw(); |
| | |
| | | int colBuyerPrice = getItemCol(dw_cell, startRow - 1, L"采购价,采购价格"); |
| | | int colPackage = getItemCol(dw_cell, startRow - 1, L"Package"); |
| | | int colPurchor = getItemCol(dw_cell, startRow - 1, L"采购员,采购人员"); |
| | | int colQtyPerPack = getItemCol(dw_cell, startRow - 1, L"装箱数(内/外)L"); |
| | | int colQtyPerPack = getItemCol(dw_cell, startRow - 1, L"装箱数(内/外)"); |
| | | int colFOBPrice = getItemCol(dw_cell, startRow - 1, L"FOB Price,FOB Price(USD),Fob Price"); |
| | | int colQuantity = getItemCol(dw_cell, startRow - 1, L"数量,Qty"); |
| | | |
| | | int colBuyerMOQ = getItemCol(dw_cell, startRow - 1, L"MOQ"); |
| | | int colBuyerRemark = getItemCol(dw_cell, startRow - 1, L"采购To业务备注"); |
| | | int colFactoryImage = getItemCol(dw_cell, startRow - 1, L"工厂图片"); |
| | | int colGWT = getItemCol(dw_cell, startRow - 1, L"毛重,毛重(KG)L"); |
| | | int colNWT = getItemCol(dw_cell, startRow - 1, L"净重,净重(KG)L"); |
| | | int colVolDesc = getItemCol(dw_cell, startRow - 1, L"体积描述,长X宽X高,长X宽X高(CM)L"); |
| | | int colVol = getItemCol(dw_cell, startRow - 1, L"体积,体积(M3)L"); |
| | | int colHQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)L"); |
| | | int colGWT = getItemCol(dw_cell, startRow - 1, L"毛重,毛重(KG)"); |
| | | int colNWT = getItemCol(dw_cell, startRow - 1, L"净重,净重(KG)"); |
| | | int colVolDesc = getItemCol(dw_cell, startRow - 1, L"体积描述,长X宽X高,长X宽X高(CM)"); |
| | | int colVol = getItemCol(dw_cell, startRow - 1, L"体积,体积(M3)"); |
| | | int colHQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)"); |
| | | int colSKUNo = getItemCol(dw_cell, startRow - 1, L"SKUID,SKUNo"); |
| | | |
| | | |
| | |
| | | { |
| | | xml xp ; |
| | | xaserverarg arg_pic ; |
| | | arg_pic.setNativePointer(arg_pic.CreateInstance()); |
| | | |
| | | arg_pic.AddArg(L"SKUNo", goodsno); |
| | | |
| | | ximageview im = GetControl(L"frame:im1"); |
| | |
| | | { |
| | | xml xp ; |
| | | xaserverarg arg_pic ; |
| | | arg_pic.setNativePointer(arg_pic.CreateInstance()); |
| | | |
| | | arg_pic.AddArg(L"GoodsNo", goodsno); |
| | | |
| | | ximageview im = GetControl(L"frame:im1"); |
| | |
| | | startRow++; |
| | | int row = dw_cell.GetRow(); |
| | | |
| | | int colPurchPrice = getItemCol(dw_cell, headrow, L"价格"); |
| | | int colPurchPrice1 = getItemCol(dw_cell, headrow, L"价格1"); |
| | | int colPurchPrice2 = getItemCol(dw_cell, headrow, L"价格2"); |
| | | int colPurchPrice3 = getItemCol(dw_cell, headrow, L"价格3"); |
| | | if (colPurchPrice3 > 0) return 1; |
| | | |
| | | if (colPurchPrice2 < 1) |
| | | if (colPurchPrice1 < 1) |
| | | { |
| | | //dw_cell.SetColumnCount(dw_cell.GetColumnCount()+3); |
| | | dw_cell.SetColumnCount(dw_cell.GetColumnCount()+3); |
| | | //dw_cell.SetColumnCount(dw_cell.GetValidCol()+3); |
| | | dw_cell.SetRowColumn(row, colPurchPrice + 1); |
| | | dw_cell.SetAnchorRowColumn(row, colPurchPrice + 1); |
| | | |
| | | SendCtrlCmd(dw_cell, L"xmFormatCellInsertCol"); |
| | | SendCtrlCmd(dw_cell, L"xmFormatCellInsertCol"); |
| | | SendCtrlCmd(dw_cell, L"xmFormatCellInsertCol"); |
| | | |
| | | dw_cell.SetItemString(headrow, colPurchPrice + 1, L"供应商1"); |
| | | dw_cell.SetItemString(headrow, colPurchPrice + 2, L"类型1"); |
| | | dw_cell.SetItemString(headrow, colPurchPrice + 3, L"价格1"); |
| | | dw_cell.SetColumnWidth(colPurchPrice + 2, 0); |
| | | } |
| | | else if (colPurchPrice2 < 1) |
| | | { |
| | | dw_cell.SetColumnCount(dw_cell.GetColumnCount()+3); |
| | | //dw_cell.SetColumnCount(dw_cell.GetValidCol()+3); |
| | | dw_cell.SetRowColumn(row, colPurchPrice1 + 1); |
| | | dw_cell.SetAnchorRowColumn(row, colPurchPrice1 + 1); |
| | |
| | | dw_cell.SetItemString(headrow, colPurchPrice1 + 1, L"供应商2"); |
| | | dw_cell.SetItemString(headrow, colPurchPrice1 + 2, L"类型2"); |
| | | dw_cell.SetItemString(headrow, colPurchPrice1 + 3, L"价格2"); |
| | | dw_cell.SetColumnWidth(colPurchPrice1 + 2, 0); |
| | | } |
| | | else |
| | | else if(colPurchPrice3 < 1) |
| | | { |
| | | //dw_cell.SetColumnCount(dw_cell.GetColumnCount()+3); |
| | | dw_cell.SetColumnCount(dw_cell.GetColumnCount()+3); |
| | | //dw_cell.SetColumnCount(dw_cell.GetValidCol()+3); |
| | | dw_cell.SetRowColumn(row, colPurchPrice2 + 1); |
| | | dw_cell.SetAnchorRowColumn(row, colPurchPrice2 + 1); |
| | |
| | | dw_cell.SetItemString(headrow, colPurchPrice2 + 1, L"供应商3"); |
| | | dw_cell.SetItemString(headrow, colPurchPrice2 + 2, L"类型3"); |
| | | dw_cell.SetItemString(headrow, colPurchPrice2 + 3, L"价格3"); |
| | | dw_cell.SetColumnWidth(colPurchPrice2 + 2, 0); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | int OnDelBOMItem() |
| | | { |
| | | int startRow = getItemHeadRow(dw_cell); |
| | | int headrow = startRow; |
| | | if (startRow < 1) return 1; |
| | | startRow++; |
| | | int row = dw_cell.GetRow(); |
| | | |
| | | int colPurchPrice1 = getItemCol(dw_cell, headrow, L"价格1"); |
| | | int colPurchPrice2 = getItemCol(dw_cell, headrow, L"价格2"); |
| | | int colPurchPrice3 = getItemCol(dw_cell, headrow, L"价格3"); |
| | | if (colPurchPrice3 > 0) |
| | | { |
| | | dw_cell.SetRowColumn(row, colPurchPrice3 - 2); |
| | | dw_cell.SetAnchorRowColumn(row, colPurchPrice3 - 2); |
| | | |
| | | SendCtrlCmd(dw_cell, L"xmFormatCellDeleteCol"); |
| | | SendCtrlCmd(dw_cell, L"xmFormatCellDeleteCol"); |
| | | SendCtrlCmd(dw_cell, L"xmFormatCellDeleteCol"); |
| | | |
| | | dw_cell.SetColumnCount(dw_cell.GetColumnCount() - 3); |
| | | return 1; |
| | | } |
| | | |
| | | if (colPurchPrice2 > 0) |
| | | { |
| | | dw_cell.SetRowColumn(row, colPurchPrice2 -2); |
| | | dw_cell.SetAnchorRowColumn(row, colPurchPrice2 -2); |
| | | |
| | | SendCtrlCmd(dw_cell, L"xmFormatCellDeleteCol"); |
| | | SendCtrlCmd(dw_cell, L"xmFormatCellDeleteCol"); |
| | | SendCtrlCmd(dw_cell, L"xmFormatCellDeleteCol"); |
| | | |
| | | dw_cell.SetColumnCount(dw_cell.GetColumnCount() - 3); |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | if (colPurchPrice1 > 0) |
| | | { |
| | | dw_cell.SetRowColumn(row, colPurchPrice1 - 2); |
| | | dw_cell.SetAnchorRowColumn(row, colPurchPrice1 - 2); |
| | | |
| | | SendCtrlCmd(dw_cell, L"xmFormatCellDeleteCol"); |
| | | SendCtrlCmd(dw_cell, L"xmFormatCellDeleteCol"); |
| | | SendCtrlCmd(dw_cell, L"xmFormatCellDeleteCol"); |
| | | |
| | | dw_cell.SetColumnCount(dw_cell.GetColumnCount() - 3); |
| | | |
| | | return 1; |
| | | } |
| | | return 1; |
| | | } |
| | |
| | | int OnCmdDispatch(xstring comdid) |
| | | { |
| | | if (comdid == L"xmAddBOMItem") return OnAddBOMItem(); |
| | | if (comdid == L"xmDelBOMItem") return OnDelBOMItem(); |
| | | if (comdid == L"xmQuoteBill") |
| | | { |
| | | if (dw_base.GetItemString(1, L"CustomerID") == L"") |
| | |
| | | else if (comdid == L"xmPurched") |
| | | { |
| | | //if(makeMessage(L"/task/quote/purchar/backtosaler")==-1) return 1; |
| | | //dw_cell.SetRowColumn(dw_cell.GetRow(), dw_cell.GetColumn()); |
| | | return OnSaleBack(); |
| | | } |
| | | else if (comdid == L"xmPurch2") |
| | | { |
| | | return OnPurch2(); |
| | | } |
| | | else if (comdid == L"xmPurch") |
| | | { |
| | |
| | | } |
| | | } |
| | | SendCtrlCmd(dw_cell, cmd); |
| | | if (comdid == L"IK_xmEditCut"|| comdid == L"IK_xmEditCut")ReCalcPOPrice(); |
| | | return 1; |
| | | } |
| | | else if (comdid == L"xmFormatCellDeleteRow") |
| | |
| | | if (action == L"purch") |
| | | { |
| | | int crow = dw_cell.GetRow(); |
| | | xstring cmd = comdid.mid(3, comdid.length()); |
| | | if (getRowID(dw_cell, crow) == L"") SendCtrlCmd(dw_cell, cmd); |
| | | if (getRowID(dw_cell, crow) == L"") SendCtrlCmd(dw_cell, comdid); |
| | | return 1; |
| | | } |
| | | return 1; |
| | | } |
| | | return 0; |
| | | } |
| | |
| | | xstring error = x.text(); |
| | | alert(error); |
| | | return -1; |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | int OnPurch2() |
| | | { |
| | | xaserverarg arg; |
| | | arg.AddArg(L"EntityID", entityID); |
| | | OpenWindow(L"dev:xpage[QuoteFilePurch2Select.vx]", arg); |
| | | xstring taskID = arg.GetArgString(L"TaskID"); |
| | | xstring reason = arg.GetArgString(L"Reason"); |
| | | if (taskID != L"") |
| | | { |
| | | ProcessSendMessage(L"/task/quote/repurch", taskID, reason, L"", true); |
| | | } |
| | | return 1; |
| | | } |
| | |
| | | dw_goods.SetItemString(i, L"ItemID", ItemID); |
| | | xstring Item = L"<Item update.new='1' update.modify='1' guid='" + ItemID + L"'>"; |
| | | Item += L"<SKUID>" + ItemID + L"</SKUID>"; |
| | | Item += L"<GoodsNo>" + dw_goods.GetItemString(i, L"GoodsNo") + L"</GoodsNo>"; |
| | | Item += L"<GoodsNo>" + dw_goods.GetItemXmlString(i, L"GoodsNo") + L"</GoodsNo>"; |
| | | xstring SKUNo = GetNo(); |
| | | dw_goods.SetItemString(i, L"SKUNo", SKUNo); |
| | | dw_goods.Redraw(); |
| | |
| | | |
| | | Item += L"<No>" + SKUNo + L"</No>"; |
| | | Item += L"<SKUNo>" + SKUNo + L"</SKUNo>"; |
| | | Item += L"<CName>" + dw_goods.GetItemString(i, L"CName") + L"</CName>"; |
| | | Item += L"<EName>" + dw_goods.GetItemString(i, L"ItemName") + L"</EName>"; |
| | | Item += L"<Packing>" + dw_goods.GetItemString(i, L"Packing") + L"</Packing>"; |
| | | Item += L"<CName>" + dw_goods.GetItemXmlString(i, L"CName") + L"</CName>"; |
| | | Item += L"<EName>" + dw_goods.GetItemXmlString(i, L"ItemName") + L"</EName>"; |
| | | Item += L"<Packing>" + dw_goods.GetItemXmlString(i, L"Packing") + L"</Packing>"; |
| | | |
| | | Item += L"<CategoryID>" + categoryID + L"</CategoryID>"; |
| | | Item += L"<FolderID>" + folderID + L"</FolderID>"; |
| | |
| | | ensureRowID(); |
| | | |
| | | xstring content = dw_cell.GetData(); |
| | | string val = content.c_str(); |
| | | content = content.mid(content.find(L"<xsheet"), 9999999); |
| | | while (true) |
| | | { |
| | |
| | | |
| | | int colSaler = getItemCol(dw_cell, startRow - 1, L"业务员"); |
| | | |
| | | int colVolDesc = getItemCol(dw_cell, startRow - 1, L"体积描述,长X宽X高,长X宽X高(CM)L"); |
| | | int colVol = getItemCol(dw_cell, startRow - 1, L"体积,体积(M3)L"); |
| | | int colQtyPerPack = getItemCol(dw_cell, startRow - 1, L"装箱数(内/外),装箱数(外/内)L"); |
| | | int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)L"); |
| | | int colVolDesc = getItemCol(dw_cell, startRow - 1, L"体积描述,长X宽X高,长X宽X高(CM)"); |
| | | int colVol = getItemCol(dw_cell, startRow - 1, L"体积,体积(M3)"); |
| | | int colQtyPerPack = getItemCol(dw_cell, startRow - 1, L"装箱数(内/外),装箱数(外/内)"); |
| | | int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)"); |
| | | int colSKUID = getItemCol(dw_cell, startRow - 1, L"SKUID"); |
| | | |
| | | int colPONote = getItemCol(dw_cell, startRow - 1, L"采购To业务备注"); |
| | |
| | | |
| | | int colPOPhoto = getItemCol(dw_cell, startRow - 1, L"工厂图片"); |
| | | int colPOPrice = getItemCol(dw_cell, startRow - 1, L"采购价"); |
| | | int colNW = getItemCol(dw_cell, startRow - 1, L"毛重(KG)L"); |
| | | int colGW = getItemCol(dw_cell, startRow - 1, L"净重(KG)L"); |
| | | int colNW = getItemCol(dw_cell, startRow - 1, L"毛重(KG)"); |
| | | int colGW = getItemCol(dw_cell, startRow - 1, L"净重(KG)"); |
| | | int colSKUNo = getItemCol(dw_cell, startRow - 1, L"SKUID,SKUNo"); |
| | | |
| | | int purchremarkcol = getItemCol(dw_cell, startRow - 1, L"采购To业务备注"); |
| | |
| | | else if (col == colTyp1 || col == colTyp || col == colTyp2 || col == colTyp3) |
| | | { |
| | | xstring pitems1 = L""; |
| | | pitems1 += (xstring)L"<row><显示列></显示列><数据列>" |
| | | + L"</数据列></row>"; |
| | | pitems1 += (xstring)L"<row><显示列>成品</显示列><数据列>" |
| | | + L"成品</数据列></row>"; |
| | | pitems1 += (xstring)L"<row><显示列>散货</显示列><数据列>" |
| | |
| | | //int colToPODate = getItemCol(dw_cell,startRow - 1,L"业务发送采购时间"); |
| | | |
| | | |
| | | int colVolDesc = getItemCol(dw_cell, startRow - 1, L"体积描述,长X宽X高,长X宽X高(CM)L"); |
| | | int colVol = getItemCol(dw_cell, startRow - 1, L"体积,体积(M3)L"); |
| | | int colQtyPerPack = getItemCol(dw_cell, startRow - 1, L"装箱数(内/外),装箱数(外/内)L"); |
| | | int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)L"); |
| | | int colVolDesc = getItemCol(dw_cell, startRow - 1, L"体积描述,长X宽X高,长X宽X高(CM)"); |
| | | int colVol = getItemCol(dw_cell, startRow - 1, L"体积,体积(M3)"); |
| | | int colQtyPerPack = getItemCol(dw_cell, startRow - 1, L"装箱数(内/外),装箱数(外/内)"); |
| | | int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)"); |
| | | int colSKUID = getItemCol(dw_cell, startRow - 1, L"SKUID"); |
| | | |
| | | int colPONote = getItemCol(dw_cell, startRow - 1, L"采购To业务备注"); |
| | | int colPOPhoto = getItemCol(dw_cell, startRow - 1, L"工厂图片"); |
| | | int colPOPrice = getItemCol(dw_cell, startRow - 1, L"采购价"); |
| | | int colNW = getItemCol(dw_cell, startRow - 1, L"毛重(KG)L"); |
| | | int colGW = getItemCol(dw_cell, startRow - 1, L"净重(KG)L"); |
| | | int colNW = getItemCol(dw_cell, startRow - 1, L"毛重(KG)"); |
| | | int colGW = getItemCol(dw_cell, startRow - 1, L"净重(KG)"); |
| | | int colSKUNo = getItemCol(dw_cell, startRow - 1, L"SKUID,SKUNo"); |
| | | |
| | | dwhdr.idFrom = 0; |
| | |
| | | if (dw_cell.GetItemString(ARow, colItemNo) != L"") |
| | | { |
| | | xaserverarg argx ; |
| | | argx.setNativePointer(argx.CreateInstance()); |
| | | |
| | | argx.AddArg(L"GoodsNo", dw_cell.GetItemString(ARow, colItemNo)); |
| | | OpenWindow(L"dev:xpage[CustomerItemNoList.vx]", argx); |
| | | if (argx.GetArgString(L"action") != L"ok") |
| | |
| | | else if (col == colTyp1 || col == colTyp) |
| | | { |
| | | xstring pitems1 = L""; |
| | | pitems1 += (xstring)L"<row><显示列></显示列><数据列>" |
| | | + L"</数据列></row>"; |
| | | pitems1 += (xstring)L"<row><显示列>成品</显示列><数据列>" |
| | | + L"成品</数据列></row>"; |
| | | pitems1 += (xstring)L"<row><显示列>散货</显示列><数据列>" |
| | |
| | | { |
| | | alert(L"价格中没指定ABC"); |
| | | } |
| | | price = price0 + L"+L" + price1; |
| | | price = price0 + L"+" + price1; |
| | | } |
| | | dw_cell.SetItemString(ARow, colPrice, price); |
| | | } |
| | |
| | | int colBuyerPrice = getItemCol(dw_cell, startRow - 1, L"采购价,采购价格"); |
| | | int colBuyer = getItemCol(dw_cell, startRow - 1, L"采购人员"); |
| | | |
| | | int colBuyerMOQ = getItemCol(dw_cell, startRow - 1, L"MOQ"); |
| | | int colBuyerRemark = getItemCol(dw_cell, startRow - 1, L"采购To业务备注"); |
| | | int colFactoryImage = getItemCol(dw_cell, startRow - 1, L"工厂图片"); |
| | | int colGWT = getItemCol(dw_cell, startRow - 1, L"毛重,毛重(KG)L"); |
| | | int colNWT = getItemCol(dw_cell, startRow - 1, L"净重,净重(KG)L"); |
| | | int colVolDesc = getItemCol(dw_cell, startRow - 1, L"体积描述,长X宽X高,长X宽X高(CM)L"); |
| | | int colVol = getItemCol(dw_cell, startRow - 1, L"体积,体积(M3)L"); |
| | | int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)L"); |
| | | int colGWT = getItemCol(dw_cell, startRow - 1, L"毛重,毛重(KG)"); |
| | | int colNWT = getItemCol(dw_cell, startRow - 1, L"净重,净重(KG)"); |
| | | int colVolDesc = getItemCol(dw_cell, startRow - 1, L"体积描述,长X宽X高,长X宽X高(CM)"); |
| | | int colVol = getItemCol(dw_cell, startRow - 1, L"体积,体积(M3)"); |
| | | int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)"); |
| | | int colPurchedDate = getItemCol(dw_cell, startRow - 1, L"采购提交业务时间"); |
| | | int colPhoto1 = getItemCol(dw_cell, startRow - 1, L"工厂图片"); |
| | | //int colProductInfo = getItemCol(dw_cell,startRow - 1,L"产品信息"); |
| | |
| | | KXMLDOMElement ele = items.item(i); |
| | | xstring rowid = ele.selectSingleNode(L"RowID").text(); |
| | | xstring BuyerPrice = ele.selectSingleNode(L"BuyerPrice").text(); |
| | | xstring BuyerMOQ = L""; |
| | | xstring BuyerRemark = L""; |
| | | xstring FactoryImage = L""; |
| | | xstring GWT = L""; |
| | |
| | | xstring EnquiryLineID = L""; |
| | | xstring Buyer = L""; |
| | | |
| | | if (ele.selectSingleNode(L"BuyerMOQ")) BuyerMOQ = ele.selectSingleNode(L"BuyerMOQ").text(); |
| | | if (ele.selectSingleNode(L"BuyerRemark")) BuyerRemark = ele.selectSingleNode(L"BuyerRemark").text(); |
| | | if (ele.selectSingleNode(L"FactoryImage"))FactoryImage = ele.selectSingleNode(L"FactoryImage").text(); |
| | | if (ele.selectSingleNode(L"GWT")) GWT = ele.selectSingleNode(L"GWT").text(); |
| | |
| | | if (ele.selectSingleNode(L"Vol")) Vol = ele.selectSingleNode(L"Vol").text(); |
| | | if (ele.selectSingleNode(L"F40HQ")) F40HQ = ele.selectSingleNode(L"F40HQ").text(); |
| | | if (ele.selectSingleNode(L"PurchedDate")) PurchedDate = ele.selectSingleNode(L"PurchedDate").text(); |
| | | trace(L"\r\n******" + PurchedDate); |
| | | //trace(L"\r\n******" + PurchedDate); |
| | | if (ele.selectSingleNode(L"supplier-photo")) supplierphoto = ele.selectSingleNode(L"supplier-photo").text(); |
| | | if (ele.selectSingleNode(L"ProductInfo")) productInfo = ele.selectSingleNode(L"ProductInfo").text(); |
| | | if (ele.selectSingleNode(L"ProductInfo1")) productInfo1 = ele.selectSingleNode(L"ProductInfo1").text(); |
| | |
| | | if (getRowID(dw_cell, row) == rowid) |
| | | { |
| | | dw_cell.SetItemString(row, colBuyerPrice, BuyerPrice); |
| | | dw_cell.SetItemString(row, colBuyerMOQ, BuyerMOQ); |
| | | dw_cell.SetItemString(row, colBuyerRemark, BuyerRemark); |
| | | dw_cell.SetItemString(row, colFactoryImage, FactoryImage); |
| | | dw_cell.SetItemString(row, colGWT, GWT); |
| | |
| | | return 1; |
| | | } |
| | | |
| | | xstring GetTryFirstAttr(xstring str, xstring term) |
| | | { |
| | | xstring foundStr = L" " + term + L"="; |
| | | wchar quote = L'"'; |
| | | int pos = str.find(foundStr); |
| | | if (pos < 0) return L""; |
| | | pos += foundStr.length(); |
| | | while (str.at(pos) == L' ')pos++; |
| | | if (str.at(pos) == L'\'')quote = L'\''; |
| | | int epos = ++pos; |
| | | while (str.at(epos) && str.at(epos) != quote)epos++; |
| | | if (!str.at(epos))return L""; |
| | | return str.mid(pos, epos - pos); |
| | | } |
| | | |
| | | int AdjustView(xcell& dw_cell) |
| | | { |
| | | int startRow = getItemHeadRow(dw_cell); |
| | | |
| | | //没有找到商品行的标题 |
| | | if (startRow < 1) return 0; |
| | | startRow++; |
| | | |
| | | int colItemDesc = getItemCol(dw_cell, startRow - 1, L"产品信息"); |
| | | int colPhoto = getItemCol(dw_cell, startRow - 1, L"Photo"); |
| | | |
| | | bool newItemDesc = false; |
| | | if (colItemDesc < 0) |
| | | { |
| | | dw_cell.SetRowColumn(1, colPhoto+1); |
| | | dw_cell.SetAnchorRowColumn(1, colPhoto+1); |
| | | SendCtrlCmd(dw_cell, L"xmFormatCellInsertCol"); |
| | | |
| | | colItemDesc = colPhoto + 1; |
| | | dw_cell.SetItemString(startRow - 1, colItemDesc, L"产品信息"); |
| | | newItemDesc = true; |
| | | } |
| | | |
| | | if (newItemDesc) |
| | | { |
| | | int colSKUID = getItemCol(dw_cell, startRow - 1, L"SKUID"); |
| | | int colItemNo = getItemCol(dw_cell, startRow - 1, L"我司型号,ItemNo"); |
| | | int colCustomerItemNo = getItemCol(dw_cell, startRow - 1, L"客户型号,Customer ItemNo,Customer Item No"); |
| | | int colItemName = getItemCol(dw_cell, startRow - 1, L"Product Description,Product Name,Item Name"); |
| | | int colItemCName = getItemCol(dw_cell, startRow - 1, L"中文品名"); |
| | | int colItemSpec = getItemCol(dw_cell, startRow - 1, L"Specifications,规格,产品规格"); |
| | | int colBuyerPrice = getItemCol(dw_cell, startRow - 1, L"采购价,采购价格"); |
| | | int colBuyer = getItemCol(dw_cell, startRow - 1, L"采购人员"); |
| | | int colQty = getItemCol(dw_cell, startRow - 1, L"Qty"); |
| | | int colPackage = getItemCol(dw_cell, startRow - 1, L"Package"); |
| | | int colInnerOuter = getItemCol(dw_cell, startRow - 1, L"装箱数(内/外)"); |
| | | |
| | | int colBuyerMOQ = getItemCol(dw_cell, startRow - 1, L"MOQ"); |
| | | int colBuyerRemark = getItemCol(dw_cell, startRow - 1, L"采购To业务备注"); |
| | | int colFactoryImage = getItemCol(dw_cell, startRow - 1, L"工厂图片"); |
| | | int colGWT = getItemCol(dw_cell, startRow - 1, L"毛重,毛重(KG)"); |
| | | int colNWT = getItemCol(dw_cell, startRow - 1, L"净重,净重(KG)"); |
| | | int colVolDesc = getItemCol(dw_cell, startRow - 1, L"体积描述,长X宽X高,长X宽X高(CM)"); |
| | | int colVol = getItemCol(dw_cell, startRow - 1, L"体积,体积(M3)"); |
| | | int col40HQ = getItemCol(dw_cell, startRow - 1, L"40HQ,QTY(40HQ)"); |
| | | int colPurchedDate = getItemCol(dw_cell, startRow - 1, L"采购提交业务时间"); |
| | | int colPhoto1 = getItemCol(dw_cell, startRow - 1, L"工厂图片"); |
| | | int colProductInfo = getItemCol(dw_cell, startRow - 1, L"业务部产品信息"); |
| | | int colProductInfo1 = getItemCol(dw_cell, startRow - 1, L"采购部产品信息"); |
| | | |
| | | int colBOMType = getItemCol(dw_cell, startRow - 1, L"类型"); |
| | | int colBOMType1 = getItemCol(dw_cell, startRow - 1, L"类型1"); |
| | | int colSaler = getItemCol(dw_cell, startRow - 1, L"业务员"); |
| | | int colSaletoBuyerRemark = getItemCol(dw_cell, startRow - 1, L"业务To采购备注"); |
| | | |
| | | int colSupplier1 = getItemCol(dw_cell, startRow - 1, L"供应商1"); |
| | | int colBuyPrice1 = getItemCol(dw_cell, startRow - 1, L"价格1"); |
| | | |
| | | dw_cell.SetColumnWidth(colSKUID, 0); |
| | | dw_cell.SetColumnWidth(colItemNo, 0); |
| | | dw_cell.SetColumnWidth(colCustomerItemNo, 0); |
| | | dw_cell.SetColumnWidth(colItemName, 0); |
| | | dw_cell.SetColumnWidth(colItemCName, 0); |
| | | //dw_cell.SetColumnWidth(colBuyerRemark, 0); |
| | | dw_cell.SetColumnWidth(colPackage, 0); |
| | | dw_cell.SetColumnWidth(colQty, 0); |
| | | dw_cell.SetColumnWidth(col40HQ, 0); |
| | | dw_cell.SetColumnWidth(colInnerOuter, 0); |
| | | dw_cell.SetColumnWidth(colSaler, 0); |
| | | dw_cell.SetColumnWidth(colSaletoBuyerRemark, 0); |
| | | dw_cell.SetColumnWidth(colProductInfo, 0); |
| | | dw_cell.SetColumnWidth(colSaler, 0); |
| | | |
| | | dw_cell.SetColumnWidth(colBOMType, 0); |
| | | dw_cell.SetColumnWidth(colBOMType1, 0); |
| | | |
| | | dw_cell.SetColumnWidth(colItemDesc, 160); |
| | | |
| | | bool bPrice1 = false; |
| | | for (int row = startRow; row <= dw_cell.GetValidRow(); row++) |
| | | { |
| | | if (dw_cell.GetItemString(row, colSKUID) != L"") |
| | | { |
| | | xstring itemDesc = L"SKUID:" + dw_cell.GetItemString(row, colSKUID); |
| | | if (dw_cell.GetItemString(row, colItemNo) != L"") |
| | | itemDesc += L"\r\nItem No: " + dw_cell.GetItemString(row, colItemNo); |
| | | if (dw_cell.GetItemString(row, colItemNo) != L"") |
| | | itemDesc += L"\r\nCustomer Item No: " + dw_cell.GetItemString(row, colCustomerItemNo); |
| | | if (dw_cell.GetItemString(row, colItemName) != L"") |
| | | itemDesc += L"\r\nItem Name:" + dw_cell.GetItemString(row, colItemName); |
| | | if (dw_cell.GetItemString(row, colItemCName) != L"") |
| | | itemDesc += L"\r\n产品名称:" + dw_cell.GetItemString(row, colItemCName); |
| | | |
| | | if (dw_cell.GetItemString(row, colQty) != L"") |
| | | itemDesc += L"\r\n数量:" + dw_cell.GetItemString(row, colQty); |
| | | if (dw_cell.GetItemString(row, colPackage) != L"") |
| | | itemDesc += L"\r\n包装:" + dw_cell.GetItemString(row, colPackage); |
| | | if (dw_cell.GetItemString(row, colInnerOuter) != L"") |
| | | itemDesc += L"\r\n装箱数(内/外):" + dw_cell.GetItemString(row, colInnerOuter); |
| | | |
| | | if (dw_cell.GetItemString(row, colProductInfo) != L"") |
| | | itemDesc += L"\r\n\r\n规格:\r\n" + dw_cell.GetItemString(row, colProductInfo); |
| | | if (dw_cell.GetItemString(row, colSaletoBuyerRemark) != L"") |
| | | itemDesc += L"\r\n\r\n采购要求:\r\n" + dw_cell.GetItemString(row, colSaletoBuyerRemark); |
| | | dw_cell.SetItemString(row, colItemDesc, itemDesc); |
| | | |
| | | if (!bPrice1) |
| | | { |
| | | if (dw_cell.GetItemString(row, colSupplier1) != L"") bPrice1 = true; |
| | | else if (dw_cell.GetItemString(row, colBuyPrice1) != L"") bPrice1 = true; |
| | | } |
| | | } |
| | | } |
| | | if (!bPrice1 && colSupplier1 > 0) |
| | | { |
| | | dw_cell.SetRowColumn(1, colSupplier1); |
| | | dw_cell.SetAnchorRowColumn(1, colSupplier1); |
| | | SendCtrlCmd(dw_cell, L"xmFormatCellDeleteCol"); |
| | | SendCtrlCmd(dw_cell, L"xmFormatCellDeleteCol"); |
| | | SendCtrlCmd(dw_cell, L"xmFormatCellDeleteCol"); |
| | | } |
| | | |
| | | dw_cell.SetRowColumn(1, 1); |
| | | dw_cell.SetAnchorRowColumn(startRow - 2, 1); |
| | | SendCtrlCmd(dw_cell, L"xmEditCopy"); |
| | | |
| | | dw_cell.SetRowColumn(1, colPhoto); |
| | | dw_cell.SetAnchorRowColumn(startRow - 2, colPhoto); |
| | | SendCtrlCmd(dw_cell, L"xmEditPaste"); |
| | | |
| | | dw_cell.SetRowColumn(1, 2); |
| | | dw_cell.SetAnchorRowColumn(startRow - 2, 2); |
| | | SendCtrlCmd(dw_cell, L"xmEditCopy"); |
| | | |
| | | dw_cell.SetRowColumn(1, colPhoto+1); |
| | | dw_cell.SetAnchorRowColumn(startRow - 2, colPhoto+1); |
| | | SendCtrlCmd(dw_cell, L"xmEditPaste"); |
| | | |
| | | int colSaleSendDate = getItemCol(dw_cell, startRow - 1, L"业务发送采购时间"); |
| | | dw_cell.SetItemString(2, colBuyerPrice, L"业务员"); |
| | | dw_cell.SetItemString(3, colBuyerPrice, L"发送日期:"); |
| | | dw_cell.SetItemString(2, colBuyerPrice+1, dw_cell.GetItemString(startRow, colSaler)); |
| | | dw_cell.SetItemString(3, colBuyerPrice+1, dw_cell.GetItemString(startRow, colSaleSendDate)); |
| | | dw_cell.SetColumnWidth(colSaleSendDate, 0); |
| | | |
| | | int colMOQ = getItemCol(dw_cell, startRow - 1, L"MOQ"); |
| | | int colSupplier = getItemCol(dw_cell, startRow - 1, L"供应商"); |
| | | int colBuyPrice = getItemCol(dw_cell, startRow - 1, L"价格"); |
| | | |
| | | dw_cell.SetRowColumn(startRow, colSupplier); |
| | | dw_cell.SetAnchorRowColumn(startRow, colSupplier); |
| | | |
| | | dw_cell.SetColumnWidth(colBuyerPrice, 50); |
| | | dw_cell.SetColumnWidth(colMOQ, 50); |
| | | dw_cell.SetColumnWidth(colBuyPrice, 50); |
| | | } |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | int onload() |
| | | { |
| | | SetArg(); |
| | |
| | | x.loadXML(templ); |
| | | */ |
| | | action = L"purch"; |
| | | |
| | | action = GetTryFirstAttr(templ, L"action"); |
| | | if (action == L"") action = L"purch"; |
| | | entityItemID = GetTryFirstAttr(templ, L"TemplateItemID"); |
| | | if (entityItemID == L"")entityItemID = GetTryFirstAttr(templ, L"ItemID"); |
| | | #if 0 |
| | | if (templ.find(L"action=\"") >= 0) |
| | | { |
| | | action = templ.mid(templ.find(L"action=\"") + 8, templ.find(L"\"", templ.find(L"action=\"") + 8) - (templ.find(L"action=\"") + 8)); |
| | |
| | | entityItemID = templ.mid(templ.find(L" ItemID=\"") + 9, templ.find(L"\"", templ.find(L" ItemID=\"") + 9) - (templ.find(L" ItemID=\"") + 9)); |
| | | } |
| | | } |
| | | |
| | | #endif |
| | | /*action = x.documentElement.getAttribute(L"action"); |
| | | if(action==L"") action=L"purch"; |
| | | entityItemID = x.documentElement.getAttribute(L"TemplateItemID"); |
| | |
| | | { |
| | | xnode anode = GetAgentNode(L"tabheader"); |
| | | anode.SetLayerFlow(0x00000100); |
| | | dw_cell.SetColumnCount(dw_cell.GetValidCol() + 6); |
| | | dw_cell.SetColumnCount(dw_cell.GetValidCol() + 9); |
| | | //dw_cell.SetFixedCols(7); |
| | | AdjustView(dw_cell); |
| | | } |
| | | else |
| | | dw_cell.SetColumnCount(dw_cell.GetValidCol()); |
| | | dw_cell.SetColumnCount(dw_cell.GetValidCol()+3); |
| | | |
| | | //OnRetrieve(); |
| | | |
| | |
| | | if (hasParty(dw_cell.GetItemString(row, colSupplier)) == false) |
| | | { |
| | | itemStr += L"<Item update.new='1' update.modify='1'>"; |
| | | itemStr += L"<Name>" + dw_cell.GetItemString(row, colSupplier) + L"</Name>"; |
| | | itemStr += L"<ShortName>" + dw_cell.GetItemString(row, colSupplier) + L"</ShortName>"; |
| | | itemStr += L"<Name>" + dw_cell.GetItemXmlString(row, colSupplier) + L"</Name>"; |
| | | itemStr += L"<ShortName>" + dw_cell.GetItemXmlString(row, colSupplier) + L"</ShortName>"; |
| | | itemStr += L"</Item>"; |
| | | } |
| | | } |
| | |
| | | if (hasParty(dw_cell.GetItemString(row, colSupplier1)) == false) |
| | | { |
| | | itemStr += L"<Item update.new='1' update.modify='1'>"; |
| | | itemStr += L"<Name>" + dw_cell.GetItemString(row, colSupplier1) + L"</Name>"; |
| | | itemStr += L"<ShortName>" + dw_cell.GetItemString(row, colSupplier1) + L"</ShortName>"; |
| | | itemStr += L"<Name>" + dw_cell.GetItemXmlString(row, colSupplier1) + L"</Name>"; |
| | | itemStr += L"<ShortName>" + dw_cell.GetItemXmlString(row, colSupplier1) + L"</ShortName>"; |
| | | itemStr += L"</Item>"; |
| | | } |
| | | } |
| | |
| | | if (hasParty(dw_cell.GetItemString(row, colSupplier2)) == false) |
| | | { |
| | | itemStr += L"<Item update.new='1' update.modify='1'>"; |
| | | itemStr += L"<Name>" + dw_cell.GetItemString(row, colSupplier2) + L"</Name>"; |
| | | itemStr += L"<ShortName>" + dw_cell.GetItemString(row, colSupplier2) + L"</ShortName>"; |
| | | itemStr += L"<Name>" + dw_cell.GetItemXmlString(row, colSupplier2) + L"</Name>"; |
| | | itemStr += L"<ShortName>" + dw_cell.GetItemXmlString(row, colSupplier2) + L"</ShortName>"; |
| | | itemStr += L"</Item>"; |
| | | } |
| | | } |
| | |
| | | if (hasParty(dw_cell.GetItemString(row, colSupplier3)) == false) |
| | | { |
| | | itemStr += L"<Item update.new='1' update.modify='1'>"; |
| | | itemStr += L"<Name>" + dw_cell.GetItemString(row, colSupplier3) + L"</Name>"; |
| | | itemStr += L"<ShortName>" + dw_cell.GetItemString(row, colSupplier3) + L"</ShortName>"; |
| | | itemStr += L"<Name>" + dw_cell.GetItemXmlString(row, colSupplier3) + L"</Name>"; |
| | | itemStr += L"<ShortName>" + dw_cell.GetItemXmlString(row, colSupplier3) + L"</ShortName>"; |
| | | itemStr += L"</Item>"; |
| | | } |
| | | } |
| | |
| | | |
| | | int LoadPurcher() |
| | | { |
| | | xml purcher ; |
| | | //xml purcher ; |
| | | xaserverarg arg ; |
| | | |
| | | arg.AddArg(L"id", L"采购员"); |