把你做好的庫連數據打包放上來,即datas整個文件夾。
授人以渔,不授人以鱼。
*------------------------- * 初始化收料輸入表格 *------------------------- PROCEDURE Grid1.Init LOCAL laColumns[10,5] laColumns[ 1,1] = "材料分類" laColumns[ 1,2] = "收料表.材料分類" laColumns[ 1,3] = 80 laColumns[ 2,1] = "名稱型號" laColumns[ 2,2] = "" laColumns[ 2,3] = 120 laColumns[ 3,1] = "計量單位" laColumns[ 3,2] = "" laColumns[ 3,3] = 80 laColumns[ 4,1] = "實收數量" laColumns[ 4,2] = "收料表.實收數量" laColumns[ 4,3] = 80 laColumns[ 4,4] = "9,999.99" laColumns[ 4,5] = "9,999.99" laColumns[ 5,1] = "購入單價" laColumns[ 5,2] = "收料表.購入單價" laColumns[ 5,3] = 80 laColumns[ 5,4] = "9,999.99" laColumns[ 5,5] = "9,999.99" laColumns[ 6,1] = "購入金額" laColumns[ 6,2] = "ROUND(收料表.實收數量 * 收料表.購入單價, 2)" laColumns[ 6,3] = 80 laColumns[ 6,4] = "9,999,999.99" laColumns[ 7,1] = "標準單價" laColumns[ 7,2] = "收料表.標準單價" laColumns[ 7,3] = 80 laColumns[ 7,4] = "9,999.99" laColumns[ 7,5] = "9,999.99" laColumns[ 8,1] = "標準金額" laColumns[ 8,2] = "ROUND(收料表.實收數量 * 收料表.標準單價, 2)" laColumns[ 8,3] = 80 laColumns[ 8,4] = "9,999,999.99" laColumns[ 9,1] = "差價" laColumns[ 9,2] = "ROUND(收料表.實收數量 * (收料表.標準單價 - 收料表.購入單價), 2)" laColumns[ 9,3] = 80 laColumns[ 6,4] = "9,999,999.99" laColumns[10,1] = "保管地點" laColumns[10,2] = "收料表.保管地點" laColumns[10,3] = 80 WITH This .Set_Columns(@laColumns, "收料表") .Columns(2).ReadOnly = .T. .Columns(3).ReadOnly = .T. ENDWITH ENDPROC
[此贴子已经被作者于2016-1-1 14:11编辑过]