产品面板
产品面板本帖最后由 yaojunsong 于 2012-12-25 10:58 编辑
下下面插件代码,即可获得产品面板的视图:
from System import StringComparison
from System import Boolean
from Kingdee.BOS.Core.DynamicForm.PlugIn.ControlModel import *
from System.Collections.Generic import *
from Kingdee.BOS.JSON import *
items = List[ProductEntityBase]()
def AfterBindData(e):
para = JSONObject()
#items = List[ProductEntityBase]()
pageSize = 20
rowcount = 200
pageindex = 3
for i in range(0,pageSize):
item = ProductEntityBase()
item.Index = i
item.Width = 280
item.Height = 230
item.Caption = str(i)+":尼康(NIKON) Coolpix L310 \r\n便携数码相机(1408万像素 3寸屏 21倍光变 25m"
item.Price = 2100+i*100
item.PriceDisplayFormat = "¥###,###,###,##0.00"
item.Quantity = 1000-i*10
item.StockQty = 100000-i*100
item.QuantityMask = "###,###,###,##0.00"
#item.ImageSourceType=1
#item.ImageData="{base64字符串}"
item.ImageSourceType=0
#item.ImageUrl = "http://localhost:1200/images/biz/default/demo/NIKON210.webp"
item.ImageUrl = "images/biz/default/AdImages/adimage1.webp"
item.ButtonCaption = "订购"
if (item.Index % 2 == 0):
item.ButtonCaption = "下架"
item.ButtonDisabled = True
#item.Status = 2
if (item.Index % 3 == 0):
item.ButtonCaption = "缺货"
item.ButtonDisabled = True
#item.Status = 9
items.Add(item)
ppEt = ProductsPanelEntity()
ppEt.items = items
ppEt.rowcount = rowcount
ppEt.PageIndex = pageindex
ppEt.PageSize = pageSize
this.View.GetControl("FProductsPanel").SetData(ppEt)
def ButtonClick(e):
if(e.Key=="FBUTTON"):
item = items[2]
item.Caption = "三星S3"
this.View.GetControl("FProductsPanel").UpdateEntity(2, item)
产品面板的视图:
在Web里面增加两个接口函数,对应Controller和View都PlugIn都加一下,谢谢
// 分组搜索面板事件入口
public void GroupSearchMenuPanelAction(JSONObject para, JSONObject postData)
// 产品面板事件入口
public void ProductsPanelAction(JSONObject para, JSONObject postData)
订购事件,分页功能,分页事件与分页取数,行模式展示,Silverlight下的产品面板以及相应功能的实现 完成,详情请看跟帖。
产品面板
本文2024-09-23 03:48:00发表“云星空知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3cloud-161178.html