Browse Source

Merge branch 'master' of http://192.168.1.12:3000/maixinrong/measure

TonyKang 8 năm trước cách đây
mục cha
commit
72dc259222
46 tập tin đã thay đổi với 759 bổ sung453 xóa
  1. 329 266
      DataModules/BillsGatherDm.dfm
  2. 18 13
      DataModules/DealPaymentDm.pas
  3. 1 1
      DataModules/PhasePayDm.pas
  4. 20 1
      DataModules/ReportMemoryDm/rmXmjBGLDetailDm.pas
  5. 1 1
      Dprs/CSL/Measure_Cloud.cfg
  6. 6 6
      Dprs/CSL/Measure_Cloud.dof
  7. 4 0
      Dprs/CSL/Measure_Cloud.dpr
  8. BIN
      Dprs/CSL/Measure_Cloud.res
  9. 2 2
      Dprs/Pro/Measure.dof
  10. BIN
      Dprs/Pro/Measure.res
  11. 5 4
      Dprs/Pro/Measure_Cloud.dof
  12. 35 1
      Dprs/Pro/Measure_Cloud.dpr
  13. BIN
      Dprs/Pro/Measure_Cloud.res
  14. 4 3
      Dprs/Pro/Measure_GuangDong.dof
  15. BIN
      Dprs/Pro/Measure_GuangDong.res
  16. 2 2
      Dprs/Pro/Measure_GuangDong_Cloud.dof
  17. 0 1
      Dprs/Pro/Measure_GuangDong_Cloud.dpr
  18. BIN
      Dprs/Pro/Measure_GuangDong_Cloud.res
  19. 2 2
      Dprs/Pro/Measure_GuangDong_TZ.dof
  20. BIN
      Dprs/Pro/Measure_GuangDong_TZ.res
  21. 2 2
      Dprs/Pro/Measure_TZ.dof
  22. BIN
      Dprs/Pro/Measure_TZ.res
  23. 2 2
      Dprs/Trail/Measure.dof
  24. BIN
      Dprs/Trail/Measure.res
  25. 2 2
      Dprs/Trail/Measure_GuangDong.dof
  26. BIN
      Dprs/Trail/Measure_GuangDong.res
  27. 22 0
      Encrypt/EncryptDog.pas
  28. 9 3
      Forms/BatchInsertBillsFrm.pas
  29. 10 10
      Forms/IPFrm.pas
  30. 1 40
      Forms/LoginFrm.pas
  31. 8 2
      Forms/MainFrm.dfm
  32. 1 0
      Forms/MainFrm.pas
  33. 8 6
      Forms/OptionFrm.pas
  34. 66 55
      Forms/ProjectPropertiesFrm.dfm
  35. 3 0
      Forms/ProjectPropertiesFrm.pas
  36. 4 1
      Forms/ReportsFrm.pas
  37. 34 11
      Frames/BillsCompileFme.pas
  38. 20 1
      Frames/BillsGatherFme.dfm
  39. 12 3
      Frames/BillsMeasureFme.pas
  40. 10 0
      Frames/DealPaymentFme.dfm
  41. 39 1
      Frames/DealPaymentFme.pas
  42. 2 0
      Units/DbTreeImport.pas
  43. 1 1
      Units/ProjectCommands.pas
  44. 47 6
      Units/ProjectData.pas
  45. 5 0
      Units/ProjectProperty.pas
  46. 22 4
      Units/UtilMethods.pas

+ 329 - 266
DataModules/BillsGatherDm.dfm

@@ -16,122 +16,146 @@ object BillsGatherData: TBillsGatherData
     FieldListData = {
       0101044E616D6506024944094669656C644E616D650602494408446174615479
       70650203084461746153697A6502040549734B6579080F4E65656450726F6365
-      73734E616D65090001044E616D650609496E646578436F6465094669656C644E
-      616D650609496E646578436F6465084461746154797065020108446174615369
-      7A6502640549734B6579080F4E65656450726F636573734E616D65090001044E
-      616D650606425F436F6465094669656C644E616D650606425F436F6465084461
-      7461547970650201084461746153697A6502320549734B6579080F4E65656450
-      726F636573734E616D65090001044E616D6506044E616D65094669656C644E61
-      6D6506044E616D650844617461547970650218084461746153697A6503C80005
-      49734B6579080F4E65656450726F636573734E616D65090001044E616D650605
-      556E697473094669656C644E616D650605556E69747308446174615479706502
-      18084461746153697A6502140549734B6579080F4E65656450726F636573734E
-      616D65090001044E616D6506055072696365094669656C644E616D6506055072
-      6963650844617461547970650206084461746153697A6502080549734B657908
-      0F4E65656450726F636573734E616D65090001044E616D6506084E6577507269
-      6365094669656C644E616D6506084E6577507269636508446174615479706502
-      06084461746153697A6502080549734B6579080F4E65656450726F636573734E
-      616D65090001044E616D65060C4465616C5175616E74697479094669656C644E
-      616D65060C4465616C5175616E74697479084461746154797065020608446174
-      6153697A6502080549734B6579080F4E65656450726F636573734E616D650900
-      01044E616D65060E4465616C546F74616C5072696365094669656C644E616D65
-      060E4465616C546F74616C507269636508446174615479706502060844617461
-      53697A6502080549734B6579080F4E65656450726F636573734E616D65090001
-      044E616D65060B42474C5175616E74697479094669656C644E616D65060B4247
-      4C5175616E746974790844617461547970650206084461746153697A65020805
-      49734B6579080F4E65656450726F636573734E616D65090001044E616D65060D
-      42474C546F74616C5072696365094669656C644E616D65060D42474C546F7461
-      6C50726963650844617461547970650206084461746153697A6502080549734B
-      6579080F4E65656450726F636573734E616D65090001044E616D650608517561
-      6E74697479094669656C644E616D6506085175616E7469747908446174615479
-      70650206084461746153697A6502080549734B6579080F4E65656450726F6365
-      73734E616D65090001044E616D65060A546F74616C5072696365094669656C64
-      4E616D65060A546F74616C507269636508446174615479706502060844617461
-      53697A6502080549734B6579080F4E65656450726F636573734E616D65090001
-      044E616D65060F4375724465616C5175616E74697479094669656C644E616D65
-      060F4375724465616C5175616E74697479084461746154797065020608446174
-      6153697A6502080549734B6579080F4E65656450726F636573734E616D650900
-      01044E616D6506114375724465616C546F74616C5072696365094669656C644E
-      616D6506114375724465616C546F74616C507269636508446174615479706502
-      06084461746153697A6502080549734B6579080F4E65656450726F636573734E
-      616D65090001044E616D65060D43757251635175616E74697479094669656C64
-      4E616D65060D43757251635175616E7469747908446174615479706502060844
-      61746153697A6502080549734B6579080F4E65656450726F636573734E616D65
-      090001044E616D65060F4375725163546F74616C5072696365094669656C644E
-      616D65060F4375725163546F74616C5072696365084461746154797065020608
-      4461746153697A6502080549734B6579080F4E65656450726F636573734E616D
-      65090001044E616D6506114375724761746865725175616E7469747909466965
-      6C644E616D6506114375724761746865725175616E7469747908446174615479
-      70650206084461746153697A6502080549734B6579080F4E65656450726F6365
-      73734E616D65090001044E616D650613437572476174686572546F74616C5072
-      696365094669656C644E616D650613437572476174686572546F74616C507269
+      73734E616D650909507265636973696F6E02000453697A6502000001044E616D
+      650609496E646578436F6465094669656C644E616D650609496E646578436F64
+      650844617461547970650201084461746153697A6502640549734B6579080F4E
+      65656450726F636573734E616D650909507265636973696F6E02000453697A65
+      02000001044E616D650606425F436F6465094669656C644E616D650606425F43
+      6F64650844617461547970650201084461746153697A6502320549734B657908
+      0F4E65656450726F636573734E616D650909507265636973696F6E0200045369
+      7A6502000001044E616D6506044E616D65094669656C644E616D6506044E616D
+      650844617461547970650218084461746153697A6503C8000549734B6579080F
+      4E65656450726F636573734E616D650909507265636973696F6E02000453697A
+      6502000001044E616D650605556E697473094669656C644E616D650605556E69
+      74730844617461547970650218084461746153697A6502140549734B6579080F
+      4E65656450726F636573734E616D650909507265636973696F6E02000453697A
+      6502000001044E616D6506055072696365094669656C644E616D650605507269
       63650844617461547970650206084461746153697A6502080549734B6579080F
-      4E65656450726F636573734E616D65090001044E616D65060F5072654465616C
-      5175616E74697479094669656C644E616D65060F5072654465616C5175616E74
-      6974790844617461547970650206084461746153697A6502080549734B657908
-      0F4E65656450726F636573734E616D65090001044E616D650611507265446561
-      6C546F74616C5072696365094669656C644E616D6506115072654465616C546F
+      4E65656450726F636573734E616D650909507265636973696F6E02000453697A
+      6502000001044E616D6506084E65775072696365094669656C644E616D650608
+      4E657750726963650844617461547970650206084461746153697A6502080549
+      734B6579080F4E65656450726F636573734E616D650909507265636973696F6E
+      02000453697A6502000001044E616D65060C4465616C5175616E746974790946
+      69656C644E616D65060C4465616C5175616E7469747908446174615479706502
+      06084461746153697A6502080549734B6579080F4E65656450726F636573734E
+      616D650909507265636973696F6E02000453697A6502000001044E616D65060E
+      4465616C546F74616C5072696365094669656C644E616D65060E4465616C546F
       74616C50726963650844617461547970650206084461746153697A6502080549
-      734B6579080F4E65656450726F636573734E616D65090001044E616D65060D50
-      726551635175616E74697479094669656C644E616D65060D5072655163517561
-      6E746974790844617461547970650206084461746153697A6502080549734B65
-      79080F4E65656450726F636573734E616D65090001044E616D65060F50726551
-      63546F74616C5072696365094669656C644E616D65060F5072655163546F7461
-      6C50726963650844617461547970650206084461746153697A6502080549734B
-      6579080F4E65656450726F636573734E616D65090001044E616D650611507265
-      4761746865725175616E74697479094669656C644E616D650611507265476174
-      6865725175616E746974790844617461547970650206084461746153697A6502
-      080549734B6579080F4E65656450726F636573734E616D65090001044E616D65
-      0613507265476174686572546F74616C5072696365094669656C644E616D6506
-      13507265476174686572546F74616C5072696365084461746154797065020608
+      734B6579080F4E65656450726F636573734E616D650909507265636973696F6E
+      02000453697A6502000001044E616D65060B42474C5175616E74697479094669
+      656C644E616D65060B42474C5175616E74697479084461746154797065020608
       4461746153697A6502080549734B6579080F4E65656450726F636573734E616D
-      65090001044E616D65060F4164644465616C5175616E74697479094669656C64
-      4E616D65060F4164644465616C5175616E746974790844617461547970650206
-      084461746153697A6502080549734B6579080F4E65656450726F636573734E61
-      6D65090001044E616D6506114164644465616C546F74616C5072696365094669
-      656C644E616D6506114164644465616C546F74616C5072696365084461746154
-      7970650206084461746153697A6502080549734B6579080F4E65656450726F63
-      6573734E616D65090001044E616D65060D41646451635175616E746974790946
-      69656C644E616D65060D41646451635175616E74697479084461746154797065
-      0206084461746153697A6502080549734B6579080F4E65656450726F63657373
-      4E616D65090001044E616D65060F4164645163546F74616C5072696365094669
-      656C644E616D65060F4164645163546F74616C50726963650844617461547970
+      650909507265636973696F6E02000453697A6502000001044E616D65060D4247
+      4C546F74616C5072696365094669656C644E616D65060D42474C546F74616C50
+      726963650844617461547970650206084461746153697A6502080549734B6579
+      080F4E65656450726F636573734E616D650909507265636973696F6E02000453
+      697A6502000001044E616D6506085175616E74697479094669656C644E616D65
+      06085175616E746974790844617461547970650206084461746153697A650208
+      0549734B6579080F4E65656450726F636573734E616D65090950726563697369
+      6F6E02000453697A6502000001044E616D65060A546F74616C50726963650946
+      69656C644E616D65060A546F74616C5072696365084461746154797065020608
+      4461746153697A6502080549734B6579080F4E65656450726F636573734E616D
+      650909507265636973696F6E02000453697A6502000001044E616D65060F4375
+      724465616C5175616E74697479094669656C644E616D65060F4375724465616C
+      5175616E746974790844617461547970650206084461746153697A6502080549
+      734B6579080F4E65656450726F636573734E616D650909507265636973696F6E
+      02000453697A6502000001044E616D6506114375724465616C546F74616C5072
+      696365094669656C644E616D6506114375724465616C546F74616C5072696365
+      0844617461547970650206084461746153697A6502080549734B6579080F4E65
+      656450726F636573734E616D650909507265636973696F6E02000453697A6502
+      000001044E616D65060D43757251635175616E74697479094669656C644E616D
+      65060D43757251635175616E7469747908446174615479706502060844617461
+      53697A6502080549734B6579080F4E65656450726F636573734E616D65090950
+      7265636973696F6E02000453697A6502000001044E616D65060F437572516354
+      6F74616C5072696365094669656C644E616D65060F4375725163546F74616C50
+      726963650844617461547970650206084461746153697A6502080549734B6579
+      080F4E65656450726F636573734E616D650909507265636973696F6E02000453
+      697A6502000001044E616D6506114375724761746865725175616E7469747909
+      4669656C644E616D6506114375724761746865725175616E7469747908446174
+      61547970650206084461746153697A6502080549734B6579080F4E6565645072
+      6F636573734E616D650909507265636973696F6E02000453697A650200000104
+      4E616D650613437572476174686572546F74616C5072696365094669656C644E
+      616D650613437572476174686572546F74616C50726963650844617461547970
       650206084461746153697A6502080549734B6579080F4E65656450726F636573
-      734E616D65090001044E616D6506114164644761746865725175616E74697479
-      094669656C644E616D6506114164644761746865725175616E74697479084461
-      7461547970650206084461746153697A6502080549734B6579080F4E65656450
-      726F636573734E616D65090001044E616D650613416464476174686572546F74
-      616C5072696365094669656C644E616D650613416464476174686572546F7461
-      6C50726963650844617461547970650206084461746153697A6502080549734B
-      6579080F4E65656450726F636573734E616D65090001044E616D65060F456E64
-      4465616C5175616E74697479094669656C644E616D65060F456E644465616C51
-      75616E746974790844617461547970650206084461746153697A650208054973
-      4B6579080F4E65656450726F636573734E616D65090001044E616D650611456E
+      734E616D650909507265636973696F6E02000453697A6502000001044E616D65
+      060F5072654465616C5175616E74697479094669656C644E616D65060F507265
+      4465616C5175616E746974790844617461547970650206084461746153697A65
+      02080549734B6579080F4E65656450726F636573734E616D6509095072656369
+      73696F6E02000453697A6502000001044E616D6506115072654465616C546F74
+      616C5072696365094669656C644E616D6506115072654465616C546F74616C50
+      726963650844617461547970650206084461746153697A6502080549734B6579
+      080F4E65656450726F636573734E616D650909507265636973696F6E02000453
+      697A6502000001044E616D65060D50726551635175616E74697479094669656C
+      644E616D65060D50726551635175616E74697479084461746154797065020608
+      4461746153697A6502080549734B6579080F4E65656450726F636573734E616D
+      650909507265636973696F6E02000453697A6502000001044E616D65060F5072
+      655163546F74616C5072696365094669656C644E616D65060F5072655163546F
+      74616C50726963650844617461547970650206084461746153697A6502080549
+      734B6579080F4E65656450726F636573734E616D650909507265636973696F6E
+      02000453697A6502000001044E616D6506115072654761746865725175616E74
+      697479094669656C644E616D6506115072654761746865725175616E74697479
+      0844617461547970650206084461746153697A6502080549734B6579080F4E65
+      656450726F636573734E616D650909507265636973696F6E02000453697A6502
+      000001044E616D650613507265476174686572546F74616C5072696365094669
+      656C644E616D650613507265476174686572546F74616C507269636508446174
+      61547970650206084461746153697A6502080549734B6579080F4E6565645072
+      6F636573734E616D650909507265636973696F6E02000453697A650200000104
+      4E616D65060F4164644465616C5175616E74697479094669656C644E616D6506
+      0F4164644465616C5175616E7469747908446174615479706502060844617461
+      53697A6502080549734B6579080F4E65656450726F636573734E616D65090950
+      7265636973696F6E02000453697A6502000001044E616D650611416464446561
+      6C546F74616C5072696365094669656C644E616D6506114164644465616C546F
+      74616C50726963650844617461547970650206084461746153697A6502080549
+      734B6579080F4E65656450726F636573734E616D650909507265636973696F6E
+      02000453697A6502000001044E616D65060D41646451635175616E7469747909
+      4669656C644E616D65060D41646451635175616E746974790844617461547970
+      650206084461746153697A6502080549734B6579080F4E65656450726F636573
+      734E616D650909507265636973696F6E02000453697A6502000001044E616D65
+      060F4164645163546F74616C5072696365094669656C644E616D65060F416464
+      5163546F74616C50726963650844617461547970650206084461746153697A65
+      02080549734B6579080F4E65656450726F636573734E616D6509095072656369
+      73696F6E02000453697A6502000001044E616D65061141646447617468657251
+      75616E74697479094669656C644E616D6506114164644761746865725175616E
+      746974790844617461547970650206084461746153697A6502080549734B6579
+      080F4E65656450726F636573734E616D650909507265636973696F6E02000453
+      697A6502000001044E616D650613416464476174686572546F74616C50726963
+      65094669656C644E616D650613416464476174686572546F74616C5072696365
+      0844617461547970650206084461746153697A6502080549734B6579080F4E65
+      656450726F636573734E616D650909507265636973696F6E02000453697A6502
+      000001044E616D65060F456E644465616C5175616E74697479094669656C644E
+      616D65060F456E644465616C5175616E74697479084461746154797065020608
+      4461746153697A6502080549734B6579080F4E65656450726F636573734E616D
+      650909507265636973696F6E02000453697A6502000001044E616D650611456E
       644465616C546F74616C5072696365094669656C644E616D650611456E644465
       616C546F74616C50726963650844617461547970650206084461746153697A65
-      02080549734B6579080F4E65656450726F636573734E616D65090001044E616D
-      65060D456E6451635175616E74697479094669656C644E616D65060D456E6451
-      635175616E746974790844617461547970650206084461746153697A65020805
-      49734B6579080F4E65656450726F636573734E616D65090001044E616D65060F
-      456E645163546F74616C5072696365094669656C644E616D65060F456E645163
-      546F74616C50726963650844617461547970650206084461746153697A650208
-      0549734B6579080F4E65656450726F636573734E616D65090001044E616D6506
-      11456E644761746865725175616E74697479094669656C644E616D650611456E
-      644761746865725175616E746974790844617461547970650206084461746153
-      697A6502080549734B6579080F4E65656450726F636573734E616D6509000104
-      4E616D650613456E64476174686572546F74616C5072696365094669656C644E
-      616D650613456E64476174686572546F74616C50726963650844617461547970
-      650206084461746153697A6502080549734B6579080F4E65656450726F636573
-      734E616D65090001044E616D6506104465616C5F42474C5175616E7469747909
-      4669656C644E616D6506104465616C5F42474C5175616E746974790844617461
-      547970650206084461746153697A6502080549734B6579080F4E65656450726F
-      636573734E616D65090001044E616D6506124465616C5F42474C546F74616C50
-      72696365094669656C644E616D6506124465616C5F42474C546F74616C507269
-      63650844617461547970650206084461746153697A6502080549734B6579080F
-      4E65656450726F636573734E616D65090001044E616D65060F4465616C5F4247
-      4C50657263656E74094669656C644E616D65060F4465616C5F42474C50657263
-      656E740844617461547970650206084461746153697A6502080549734B657908
-      0F4E65656450726F636573734E616D65090000}
+      02080549734B6579080F4E65656450726F636573734E616D6509095072656369
+      73696F6E02000453697A6502000001044E616D65060D456E6451635175616E74
+      697479094669656C644E616D65060D456E6451635175616E7469747908446174
+      61547970650206084461746153697A6502080549734B6579080F4E6565645072
+      6F636573734E616D650909507265636973696F6E02000453697A650200000104
+      4E616D65060F456E645163546F74616C5072696365094669656C644E616D6506
+      0F456E645163546F74616C507269636508446174615479706502060844617461
+      53697A6502080549734B6579080F4E65656450726F636573734E616D65090950
+      7265636973696F6E02000453697A6502000001044E616D650611456E64476174
+      6865725175616E74697479094669656C644E616D650611456E64476174686572
+      5175616E746974790844617461547970650206084461746153697A6502080549
+      734B6579080F4E65656450726F636573734E616D650909507265636973696F6E
+      02000453697A6502000001044E616D650613456E64476174686572546F74616C
+      5072696365094669656C644E616D650613456E64476174686572546F74616C50
+      726963650844617461547970650206084461746153697A6502080549734B6579
+      080F4E65656450726F636573734E616D650909507265636973696F6E02000453
+      697A6502000001044E616D6506104465616C5F42474C5175616E746974790946
+      69656C644E616D6506104465616C5F42474C5175616E74697479084461746154
+      7970650206084461746153697A6502080549734B6579080F4E65656450726F63
+      6573734E616D650909507265636973696F6E02000453697A6502000001044E61
+      6D6506124465616C5F42474C546F74616C5072696365094669656C644E616D65
+      06124465616C5F42474C546F74616C5072696365084461746154797065020608
+      4461746153697A6502080549734B6579080F4E65656450726F636573734E616D
+      650909507265636973696F6E02000453697A6502000001044E616D65060F4465
+      616C5F42474C50657263656E74094669656C644E616D65060F4465616C5F4247
+      4C50657263656E740844617461547970650206084461746153697A6502080549
+      734B6579080F4E65656450726F636573734E616D650909507265636973696F6E
+      02000453697A6502000000}
   end
   object sdvGclBills: TsdDataView
     Active = False
@@ -270,123 +294,148 @@ object BillsGatherData: TBillsGatherData
     FieldListData = {
       0101044E616D6506024944094669656C644E616D650602494408446174615479
       70650203084461746153697A6502040549734B6579080F4E65656450726F6365
-      73734E616D65090001044E616D65060742696C6C734944094669656C644E616D
-      65060742696C6C7349440844617461547970650203084461746153697A650204
-      0549734B6579080F4E65656450726F636573734E616D65090001044E616D6506
-      0C5472656553657269616C4E6F094669656C644E616D65060C54726565536572
-      69616C4E6F0844617461547970650203084461746153697A6502040549734B65
-      79080F4E65656450726F636573734E616D65090001044E616D65060B52656C61
-      42696C6C734944094669656C644E616D65060B52656C6142696C6C7349440844
-      617461547970650203084461746153697A6502040549734B6579080F4E656564
-      50726F636573734E616D65090001044E616D6506094C656166586D6A49440946
-      69656C644E616D6506094C656166586D6A494408446174615479706502030844
-      61746153697A6502040549734B6579080F4E65656450726F636573734E616D65
-      090001044E616D650607586D6A436F6465094669656C644E616D650607586D6A
-      436F64650844617461547970650201084461746153697A6502320549734B6579
-      080F4E65656450726F636573734E616D65090001044E616D650607586D6A4E61
-      6D65094669656C644E616D650607586D6A4E616D650844617461547970650218
-      084461746153697A6503C8000549734B6579080F4E65656450726F636573734E
-      616D65090001044E616D650608586D6A556E697473094669656C644E616D6506
-      08586D6A556E6974730844617461547970650218084461746153697A65021405
-      49734B6579080F4E65656450726F636573734E616D65090001044E616D65060A
-      4E616D6544616E576569094669656C644E616D65060A4E616D6544616E576569
-      0844617461547970650218084461746153697A6503C8000549734B6579080F4E
-      65656450726F636573734E616D65090001044E616D6506094E616D6546656E42
-      75094669656C644E616D6506094E616D6546656E427508446174615479706502
-      18084461746153697A6503C8000549734B6579080F4E65656450726F63657373
-      4E616D65090001044E616D65060C4E616D6546656E5869616E67094669656C64
-      4E616D65060C4E616D6546656E5869616E670844617461547970650218084461
-      746153697A6503C8000549734B6579080F4E65656450726F636573734E616D65
-      090001044E616D6506084E616D65556E6974094669656C644E616D6506084E61
-      6D65556E69740844617461547970650218084461746153697A6503C800054973
-      4B6579080F4E65656450726F636573734E616D65090001044E616D6506035065
-      67094669656C644E616D65060350656708446174615479706502180844617461
-      53697A6503C8000549734B6579080F4E65656450726F636573734E616D650900
-      01044E616D650608506F736974696F6E094669656C644E616D650608506F7369
-      74696F6E0844617461547970650218084461746153697A6503C8000549734B65
-      79080F4E65656450726F636573734E616D65090001044E616D65060B44726177
-      696E67436F6465094669656C644E616D65060B44726177696E67436F64650844
-      617461547970650218084461746153697A6502320549734B6579080F4E656564
-      50726F636573734E616D65090001044E616D6506085175616E74697479094669
-      656C644E616D6506085175616E74697479084461746154797065020608446174
-      6153697A6502080549734B6579080F4E65656450726F636573734E616D650900
-      01044E616D65060A546F74616C5072696365094669656C644E616D65060A546F
+      73734E616D650909507265636973696F6E02000453697A6502000001044E616D
+      65060742696C6C734944094669656C644E616D65060742696C6C734944084461
+      7461547970650203084461746153697A6502040549734B6579080F4E65656450
+      726F636573734E616D650909507265636973696F6E02000453697A6502000001
+      044E616D65060C5472656553657269616C4E6F094669656C644E616D65060C54
+      72656553657269616C4E6F0844617461547970650203084461746153697A6502
+      040549734B6579080F4E65656450726F636573734E616D650909507265636973
+      696F6E02000453697A6502000001044E616D65060B52656C6142696C6C734944
+      094669656C644E616D65060B52656C6142696C6C734944084461746154797065
+      0203084461746153697A6502040549734B6579080F4E65656450726F63657373
+      4E616D650909507265636973696F6E02000453697A6502000001044E616D6506
+      094C656166586D6A4944094669656C644E616D6506094C656166586D6A494408
+      44617461547970650203084461746153697A6502040549734B6579080F4E6565
+      6450726F636573734E616D650909507265636973696F6E02000453697A650200
+      0001044E616D650607586D6A436F6465094669656C644E616D650607586D6A43
+      6F64650844617461547970650201084461746153697A6502320549734B657908
+      0F4E65656450726F636573734E616D650909507265636973696F6E0200045369
+      7A6502000001044E616D650607586D6A4E616D65094669656C644E616D650607
+      586D6A4E616D650844617461547970650218084461746153697A6503C8000549
+      734B6579080F4E65656450726F636573734E616D650909507265636973696F6E
+      02000453697A6502000001044E616D650608586D6A556E697473094669656C64
+      4E616D650608586D6A556E697473084461746154797065021808446174615369
+      7A6502140549734B6579080F4E65656450726F636573734E616D650909507265
+      636973696F6E02000453697A6502000001044E616D65060A4E616D6544616E57
+      6569094669656C644E616D65060A4E616D6544616E5765690844617461547970
+      650218084461746153697A6503C8000549734B6579080F4E65656450726F6365
+      73734E616D650909507265636973696F6E02000453697A6502000001044E616D
+      6506094E616D6546656E4275094669656C644E616D6506094E616D6546656E42
+      750844617461547970650218084461746153697A6503C8000549734B6579080F
+      4E65656450726F636573734E616D650909507265636973696F6E02000453697A
+      6502000001044E616D65060C4E616D6546656E5869616E67094669656C644E61
+      6D65060C4E616D6546656E5869616E6708446174615479706502180844617461
+      53697A6503C8000549734B6579080F4E65656450726F636573734E616D650909
+      507265636973696F6E02000453697A6502000001044E616D6506084E616D6555
+      6E6974094669656C644E616D6506084E616D65556E6974084461746154797065
+      0218084461746153697A6503C8000549734B6579080F4E65656450726F636573
+      734E616D650909507265636973696F6E02000453697A6502000001044E616D65
+      0603506567094669656C644E616D650603506567084461746154797065021808
+      4461746153697A6503C8000549734B6579080F4E65656450726F636573734E61
+      6D650909507265636973696F6E02000453697A6502000001044E616D65060850
+      6F736974696F6E094669656C644E616D650608506F736974696F6E0844617461
+      547970650218084461746153697A6503C8000549734B6579080F4E6565645072
+      6F636573734E616D650909507265636973696F6E02000453697A650200000104
+      4E616D65060B44726177696E67436F6465094669656C644E616D65060B447261
+      77696E67436F64650844617461547970650218084461746153697A6502320549
+      734B6579080F4E65656450726F636573734E616D650909507265636973696F6E
+      02000453697A6502000001044E616D6506085175616E74697479094669656C64
+      4E616D6506085175616E74697479084461746154797065020608446174615369
+      7A6502080549734B6579080F4E65656450726F636573734E616D650909507265
+      636973696F6E02000453697A6502000001044E616D65060A546F74616C507269
+      6365094669656C644E616D65060A546F74616C50726963650844617461547970
+      650206084461746153697A6502080549734B6579080F4E65656450726F636573
+      734E616D650909507265636973696F6E02000453697A6502000001044E616D65
+      060F4375724465616C5175616E74697479094669656C644E616D65060F437572
+      4465616C5175616E746974790844617461547970650206084461746153697A65
+      02080549734B6579080F4E65656450726F636573734E616D6509095072656369
+      73696F6E02000453697A6502000001044E616D6506114375724465616C546F74
+      616C5072696365094669656C644E616D6506114375724465616C546F74616C50
+      726963650844617461547970650206084461746153697A6502080549734B6579
+      080F4E65656450726F636573734E616D650909507265636973696F6E02000453
+      697A6502000001044E616D65060D43757251635175616E74697479094669656C
+      644E616D65060D43757251635175616E74697479084461746154797065020608
+      4461746153697A6502080549734B6579080F4E65656450726F636573734E616D
+      650909507265636973696F6E02000453697A6502000001044E616D65060F4375
+      725163546F74616C5072696365094669656C644E616D65060F4375725163546F
       74616C50726963650844617461547970650206084461746153697A6502080549
-      734B6579080F4E65656450726F636573734E616D65090001044E616D65060F43
-      75724465616C5175616E74697479094669656C644E616D65060F437572446561
-      6C5175616E746974790844617461547970650206084461746153697A65020805
-      49734B6579080F4E65656450726F636573734E616D65090001044E616D650611
-      4375724465616C546F74616C5072696365094669656C644E616D650611437572
-      4465616C546F74616C5072696365084461746154797065020608446174615369
-      7A6502080549734B6579080F4E65656450726F636573734E616D65090001044E
-      616D65060D43757251635175616E74697479094669656C644E616D65060D4375
-      7251635175616E746974790844617461547970650206084461746153697A6502
-      080549734B6579080F4E65656450726F636573734E616D65090001044E616D65
-      060F4375725163546F74616C5072696365094669656C644E616D65060F437572
+      734B6579080F4E65656450726F636573734E616D650909507265636973696F6E
+      02000453697A6502000001044E616D6506114375724761746865725175616E74
+      697479094669656C644E616D6506114375724761746865725175616E74697479
+      0844617461547970650206084461746153697A6502080549734B6579080F4E65
+      656450726F636573734E616D650909507265636973696F6E02000453697A6502
+      000001044E616D650613437572476174686572546F74616C5072696365094669
+      656C644E616D650613437572476174686572546F74616C507269636508446174
+      61547970650206084461746153697A6502080549734B6579080F4E6565645072
+      6F636573734E616D650909507265636973696F6E02000453697A650200000104
+      4E616D65060F5072654465616C5175616E74697479094669656C644E616D6506
+      0F5072654465616C5175616E7469747908446174615479706502060844617461
+      53697A6502080549734B6579080F4E65656450726F636573734E616D65090950
+      7265636973696F6E02000453697A6502000001044E616D650611507265446561
+      6C546F74616C5072696365094669656C644E616D6506115072654465616C546F
+      74616C50726963650844617461547970650206084461746153697A6502080549
+      734B6579080F4E65656450726F636573734E616D650909507265636973696F6E
+      02000453697A6502000001044E616D65060D50726551635175616E7469747909
+      4669656C644E616D65060D50726551635175616E746974790844617461547970
+      650206084461746153697A6502080549734B6579080F4E65656450726F636573
+      734E616D650909507265636973696F6E02000453697A6502000001044E616D65
+      060F5072655163546F74616C5072696365094669656C644E616D65060F507265
       5163546F74616C50726963650844617461547970650206084461746153697A65
-      02080549734B6579080F4E65656450726F636573734E616D65090001044E616D
-      6506114375724761746865725175616E74697479094669656C644E616D650611
-      4375724761746865725175616E74697479084461746154797065020608446174
-      6153697A6502080549734B6579080F4E65656450726F636573734E616D650900
-      01044E616D650613437572476174686572546F74616C5072696365094669656C
-      644E616D650613437572476174686572546F74616C5072696365084461746154
-      7970650206084461746153697A6502080549734B6579080F4E65656450726F63
-      6573734E616D65090001044E616D65060F5072654465616C5175616E74697479
-      094669656C644E616D65060F5072654465616C5175616E746974790844617461
-      547970650206084461746153697A6502080549734B6579080F4E65656450726F
-      636573734E616D65090001044E616D6506115072654465616C546F74616C5072
-      696365094669656C644E616D6506115072654465616C546F74616C5072696365
+      02080549734B6579080F4E65656450726F636573734E616D6509095072656369
+      73696F6E02000453697A6502000001044E616D65061150726547617468657251
+      75616E74697479094669656C644E616D6506115072654761746865725175616E
+      746974790844617461547970650206084461746153697A6502080549734B6579
+      080F4E65656450726F636573734E616D650909507265636973696F6E02000453
+      697A6502000001044E616D650613507265476174686572546F74616C50726963
+      65094669656C644E616D650613507265476174686572546F74616C5072696365
       0844617461547970650206084461746153697A6502080549734B6579080F4E65
-      656450726F636573734E616D65090001044E616D65060D50726551635175616E
-      74697479094669656C644E616D65060D50726551635175616E74697479084461
-      7461547970650206084461746153697A6502080549734B6579080F4E65656450
-      726F636573734E616D65090001044E616D65060F5072655163546F74616C5072
-      696365094669656C644E616D65060F5072655163546F74616C50726963650844
-      617461547970650206084461746153697A6502080549734B6579080F4E656564
-      50726F636573734E616D65090001044E616D6506115072654761746865725175
-      616E74697479094669656C644E616D6506115072654761746865725175616E74
-      6974790844617461547970650206084461746153697A6502080549734B657908
-      0F4E65656450726F636573734E616D65090001044E616D650613507265476174
-      686572546F74616C5072696365094669656C644E616D65061350726547617468
-      6572546F74616C50726963650844617461547970650206084461746153697A65
-      02080549734B6579080F4E65656450726F636573734E616D65090001044E616D
-      65060F4164644465616C5175616E74697479094669656C644E616D65060F4164
-      644465616C5175616E746974790844617461547970650206084461746153697A
-      6502080549734B6579080F4E65656450726F636573734E616D65090001044E61
-      6D6506114164644465616C546F74616C5072696365094669656C644E616D6506
-      114164644465616C546F74616C50726963650844617461547970650206084461
-      746153697A6502080549734B6579080F4E65656450726F636573734E616D6509
-      0001044E616D65060D41646451635175616E74697479094669656C644E616D65
-      060D41646451635175616E746974790844617461547970650206084461746153
-      697A6502080549734B6579080F4E65656450726F636573734E616D6509000104
+      656450726F636573734E616D650909507265636973696F6E02000453697A6502
+      000001044E616D65060F4164644465616C5175616E74697479094669656C644E
+      616D65060F4164644465616C5175616E74697479084461746154797065020608
+      4461746153697A6502080549734B6579080F4E65656450726F636573734E616D
+      650909507265636973696F6E02000453697A6502000001044E616D6506114164
+      644465616C546F74616C5072696365094669656C644E616D6506114164644465
+      616C546F74616C50726963650844617461547970650206084461746153697A65
+      02080549734B6579080F4E65656450726F636573734E616D6509095072656369
+      73696F6E02000453697A6502000001044E616D65060D41646451635175616E74
+      697479094669656C644E616D65060D41646451635175616E7469747908446174
+      61547970650206084461746153697A6502080549734B6579080F4E6565645072
+      6F636573734E616D650909507265636973696F6E02000453697A650200000104
       4E616D65060F4164645163546F74616C5072696365094669656C644E616D6506
       0F4164645163546F74616C507269636508446174615479706502060844617461
-      53697A6502080549734B6579080F4E65656450726F636573734E616D65090001
-      044E616D6506114164644761746865725175616E74697479094669656C644E61
-      6D6506114164644761746865725175616E746974790844617461547970650206
-      084461746153697A6502080549734B6579080F4E65656450726F636573734E61
-      6D65090001044E616D650613416464476174686572546F74616C507269636509
-      4669656C644E616D650613416464476174686572546F74616C50726963650844
-      617461547970650206084461746153697A6502080549734B6579080F4E656564
-      50726F636573734E616D65090001044E616D65060F456E644465616C5175616E
-      74697479094669656C644E616D65060F456E644465616C5175616E7469747908
-      44617461547970650206084461746153697A6502080549734B6579080F4E6565
-      6450726F636573734E616D65090001044E616D650611456E644465616C546F74
-      616C5072696365094669656C644E616D650611456E644465616C546F74616C50
+      53697A6502080549734B6579080F4E65656450726F636573734E616D65090950
+      7265636973696F6E02000453697A6502000001044E616D650611416464476174
+      6865725175616E74697479094669656C644E616D650611416464476174686572
+      5175616E746974790844617461547970650206084461746153697A6502080549
+      734B6579080F4E65656450726F636573734E616D650909507265636973696F6E
+      02000453697A6502000001044E616D650613416464476174686572546F74616C
+      5072696365094669656C644E616D650613416464476174686572546F74616C50
       726963650844617461547970650206084461746153697A6502080549734B6579
-      080F4E65656450726F636573734E616D65090001044E616D65060D456E645163
-      5175616E74697479094669656C644E616D65060D456E6451635175616E746974
-      790844617461547970650206084461746153697A6502080549734B6579080F4E
-      65656450726F636573734E616D65090001044E616D65060F456E645163546F74
-      616C5072696365094669656C644E616D65060F456E645163546F74616C507269
-      63650844617461547970650206084461746153697A6502080549734B6579080F
-      4E65656450726F636573734E616D65090001044E616D650611456E6447617468
-      65725175616E74697479094669656C644E616D650611456E6447617468657251
-      75616E746974790844617461547970650206084461746153697A650208054973
-      4B6579080F4E65656450726F636573734E616D65090001044E616D650613456E
-      64476174686572546F74616C5072696365094669656C644E616D650613456E64
-      476174686572546F74616C507269636508446174615479706502060844617461
-      53697A6502080549734B6579080F4E65656450726F636573734E616D65090000}
+      080F4E65656450726F636573734E616D650909507265636973696F6E02000453
+      697A6502000001044E616D65060F456E644465616C5175616E74697479094669
+      656C644E616D65060F456E644465616C5175616E746974790844617461547970
+      650206084461746153697A6502080549734B6579080F4E65656450726F636573
+      734E616D650909507265636973696F6E02000453697A6502000001044E616D65
+      0611456E644465616C546F74616C5072696365094669656C644E616D65061145
+      6E644465616C546F74616C507269636508446174615479706502060844617461
+      53697A6502080549734B6579080F4E65656450726F636573734E616D65090950
+      7265636973696F6E02000453697A6502000001044E616D65060D456E64516351
+      75616E74697479094669656C644E616D65060D456E6451635175616E74697479
+      0844617461547970650206084461746153697A6502080549734B6579080F4E65
+      656450726F636573734E616D650909507265636973696F6E02000453697A6502
+      000001044E616D65060F456E645163546F74616C5072696365094669656C644E
+      616D65060F456E645163546F74616C5072696365084461746154797065020608
+      4461746153697A6502080549734B6579080F4E65656450726F636573734E616D
+      650909507265636973696F6E02000453697A6502000001044E616D650611456E
+      644761746865725175616E74697479094669656C644E616D650611456E644761
+      746865725175616E746974790844617461547970650206084461746153697A65
+      02080549734B6579080F4E65656450726F636573734E616D6509095072656369
+      73696F6E02000453697A6502000001044E616D650613456E6447617468657254
+      6F74616C5072696365094669656C644E616D650613456E64476174686572546F
+      74616C50726963650844617461547970650206084461746153697A6502080549
+      734B6579080F4E65656450726F636573734E616D650909507265636973696F6E
+      02000453697A6502000000}
   end
   object sdvDetailGclBills: TsdDataView
     Active = False
@@ -425,6 +474,9 @@ object BillsGatherData: TBillsGatherData
       end
       item
         FieldName = 'Quantity'
+      end
+      item
+        FieldName = 'CurGatherQuantity'
       end>
     OnFilterRecord = sdvDetailGclBillsFilterRecord
     OnGetText = sdvGclBillsGetText
@@ -443,27 +495,32 @@ object BillsGatherData: TBillsGatherData
     FieldListData = {
       0101044E616D6506024944094669656C644E616D650602494408446174615479
       70650203084461746153697A6502040549734B6579080F4E65656450726F6365
-      73734E616D65090001044E616D65060742696C6C734944094669656C644E616D
-      65060742696C6C7349440844617461547970650203084461746153697A650204
-      0549734B6579080F4E65656450726F636573734E616D65090001044E616D6506
-      064465616C4944094669656C644E616D6506064465616C494408446174615479
-      70650203084461746153697A6502040549734B6579080F4E65656450726F6365
-      73734E616D65090001044E616D650606425F436F6465094669656C644E616D65
-      0606425F436F64650844617461547970650201084461746153697A6502320549
-      734B6579080F4E65656450726F636573734E616D65090001044E616D6506044E
-      616D65094669656C644E616D6506044E616D6508446174615479706502180844
-      61746153697A6503C8000549734B6579080F4E65656450726F636573734E616D
-      65090001044E616D650605556E697473094669656C644E616D650605556E6974
-      730844617461547970650218084461746153697A6502140549734B6579080F4E
-      65656450726F636573734E616D65090001044E616D6506055072696365094669
-      656C644E616D6506055072696365084461746154797065020608446174615369
-      7A6502080549734B6579080F4E65656450726F636573734E616D65090001044E
-      616D6506085175616E74697479094669656C644E616D6506085175616E746974
-      790844617461547970650206084461746153697A6502080549734B6579080F4E
-      65656450726F636573734E616D65090001044E616D65060A546F74616C507269
-      6365094669656C644E616D65060A546F74616C50726963650844617461547970
-      650206084461746153697A6502080549734B6579080F4E65656450726F636573
-      734E616D65090000}
+      73734E616D650909507265636973696F6E02000453697A6502000001044E616D
+      65060742696C6C734944094669656C644E616D65060742696C6C734944084461
+      7461547970650203084461746153697A6502040549734B6579080F4E65656450
+      726F636573734E616D650909507265636973696F6E02000453697A6502000001
+      044E616D6506064465616C4944094669656C644E616D6506064465616C494408
+      44617461547970650203084461746153697A6502040549734B6579080F4E6565
+      6450726F636573734E616D650909507265636973696F6E02000453697A650200
+      0001044E616D650606425F436F6465094669656C644E616D650606425F436F64
+      650844617461547970650201084461746153697A6502320549734B6579080F4E
+      65656450726F636573734E616D650909507265636973696F6E02000453697A65
+      02000001044E616D6506044E616D65094669656C644E616D6506044E616D6508
+      44617461547970650218084461746153697A6503C8000549734B6579080F4E65
+      656450726F636573734E616D650909507265636973696F6E02000453697A6502
+      000001044E616D650605556E697473094669656C644E616D650605556E697473
+      0844617461547970650218084461746153697A6502140549734B6579080F4E65
+      656450726F636573734E616D650909507265636973696F6E02000453697A6502
+      000001044E616D6506055072696365094669656C644E616D6506055072696365
+      0844617461547970650206084461746153697A6502080549734B6579080F4E65
+      656450726F636573734E616D650909507265636973696F6E02000453697A6502
+      000001044E616D6506085175616E74697479094669656C644E616D6506085175
+      616E746974790844617461547970650206084461746153697A6502080549734B
+      6579080F4E65656450726F636573734E616D650909507265636973696F6E0200
+      0453697A6502000001044E616D65060A546F74616C5072696365094669656C64
+      4E616D65060A546F74616C507269636508446174615479706502060844617461
+      53697A6502080549734B6579080F4E65656450726F636573734E616D65090950
+      7265636973696F6E02000453697A6502000000}
   end
   object sdvDetailDealBills: TsdDataView
     Active = False
@@ -505,31 +562,37 @@ object BillsGatherData: TBillsGatherData
     FieldListData = {
       0101044E616D6506024944094669656C644E616D650602494408446174615479
       70650203084461746153697A6502040549734B6579080F4E65656450726F6365
-      73734E616D65090001044E616D650609424742696C6C734944094669656C644E
-      616D650609424742696C6C734944084461746154797065020308446174615369
-      7A6502040549734B6579080F4E65656450726F636573734E616D65090001044E
-      616D65060542474C4944094669656C644E616D65060542474C49440844617461
-      547970650203084461746153697A6502040549734B6579080F4E65656450726F
-      636573734E616D65090001044E616D65060742474C436F6465094669656C644E
-      616D65060742474C436F64650844617461547970650218084461746153697A65
-      02320549734B6579080F4E65656450726F636573734E616D65090001044E616D
-      65060742474C4E616D65094669656C644E616D65060742474C4E616D65084461
-      7461547970650218084461746153697A6503C8000549734B6579080F4E656564
-      50726F636573734E616D65090001044E616D65060F42474C417070726F76616C
-      436F6465094669656C644E616D65060F42474C417070726F76616C436F646508
-      44617461547970650218084461746153697A6502320549734B6579080F4E6565
-      6450726F636573734E616D65090001044E616D65060E42474C44726177696E67
-      436F6465094669656C644E616D65060E42474C44726177696E67436F64650844
+      73734E616D650909507265636973696F6E02000453697A6502000001044E616D
+      650609424742696C6C734944094669656C644E616D650609424742696C6C7349
+      440844617461547970650203084461746153697A6502040549734B6579080F4E
+      65656450726F636573734E616D650909507265636973696F6E02000453697A65
+      02000001044E616D65060542474C4944094669656C644E616D65060542474C49
+      440844617461547970650203084461746153697A6502040549734B6579080F4E
+      65656450726F636573734E616D650909507265636973696F6E02000453697A65
+      02000001044E616D65060742474C436F6465094669656C644E616D6506074247
+      4C436F64650844617461547970650218084461746153697A6502320549734B65
+      79080F4E65656450726F636573734E616D650909507265636973696F6E020004
+      53697A6502000001044E616D65060742474C4E616D65094669656C644E616D65
+      060742474C4E616D650844617461547970650218084461746153697A6503C800
+      0549734B6579080F4E65656450726F636573734E616D65090950726563697369
+      6F6E02000453697A6502000001044E616D65060F42474C417070726F76616C43
+      6F6465094669656C644E616D65060F42474C417070726F76616C436F64650844
       617461547970650218084461746153697A6502320549734B6579080F4E656564
-      50726F636573734E616D65090001044E616D6506085175616E74697479094669
-      656C644E616D6506085175616E74697479084461746154797065020608446174
-      6153697A6502080549734B6579080F4E65656450726F636573734E616D650900
-      01044E616D65060A546F74616C5072696365094669656C644E616D65060A546F
-      74616C50726963650844617461547970650206084461746153697A6502080549
-      734B6579080F4E65656450726F636573734E616D65090001044E616D65060742
-      696C6C734944094669656C644E616D65060742696C6C73494408446174615479
-      70650203084461746153697A6502040549734B6579080F4E65656450726F6365
-      73734E616D65090000}
+      50726F636573734E616D650909507265636973696F6E02000453697A65020000
+      01044E616D65060E42474C44726177696E67436F6465094669656C644E616D65
+      060E42474C44726177696E67436F646508446174615479706502180844617461
+      53697A6502320549734B6579080F4E65656450726F636573734E616D65090950
+      7265636973696F6E02000453697A6502000001044E616D6506085175616E7469
+      7479094669656C644E616D6506085175616E7469747908446174615479706502
+      06084461746153697A6502080549734B6579080F4E65656450726F636573734E
+      616D650909507265636973696F6E02000453697A6502000001044E616D65060A
+      546F74616C5072696365094669656C644E616D65060A546F74616C5072696365
+      0844617461547970650206084461746153697A6502080549734B6579080F4E65
+      656450726F636573734E616D650909507265636973696F6E02000453697A6502
+      000001044E616D65060742696C6C734944094669656C644E616D65060742696C
+      6C7349440844617461547970650203084461746153697A6502040549734B6579
+      080F4E65656450726F636573734E616D650909507265636973696F6E02000453
+      697A6502000000}
   end
   object sdvDetailBGLBills: TsdDataView
     Active = False

+ 18 - 13
DataModules/DealPaymentDm.pas

@@ -471,23 +471,28 @@ procedure TDealPaymentData.sdvDealPaymentSetText(var Text: string;
     end;
 
     if AValue.Owner.ValueByName('StopCalc').AsBoolean then
-      fTotalPrice := 0;
-
-    iID := ARecord.ValueByName('ID').AsInteger;
-    if CheckStartedPrice(iID) then
     begin
-      sPreField := StringReplace(AValue.FieldName, 'TotalPrice', 'PreTotalPrice', []);
-      fAllow := GetAllowTotalPrice(iID, fTotalPrice, AValue.Owner.ValueByName(sPreField).AsFloat);
-      Text := FloatToStr(fAllow);
-      if fAllow < fTotalPrice then
-        TipMessage(Format('“%s”已达扣款限额,本期金额计%s。', [Rec.ValueByName('Name').AsString, Text]))
-      else if fAllow > fTotalPrice then
-        TipMessage(Format('“%s”已达计提期限,本期金额计%s。', [Rec.ValueByName('Name').AsString, Text]));
+      fTotalPrice := 0;
+      Text := '';
     end
     else
     begin
-      Text := '';
-      TipMessage(Format('“%s”未达到起扣金额,本期金额计零。', [Rec.ValueByName('Name').AsString]));
+      iID := ARecord.ValueByName('ID').AsInteger;
+      if CheckStartedPrice(iID) then
+      begin
+        sPreField := StringReplace(AValue.FieldName, 'TotalPrice', 'PreTotalPrice', []);
+        fAllow := GetAllowTotalPrice(iID, fTotalPrice, AValue.Owner.ValueByName(sPreField).AsFloat);
+        Text := FloatToStr(fAllow);
+        if fAllow < fTotalPrice then
+          TipMessage(Format('“%s”已达扣款限额,本期金额计%s。', [Rec.ValueByName('Name').AsString, Text]))
+        else if fAllow > fTotalPrice then
+          TipMessage(Format('“%s”已达计提期限,本期金额计%s。', [Rec.ValueByName('Name').AsString, Text]));
+      end
+      else
+      begin
+        Text := '';
+        TipMessage(Format('“%s”未达到起扣金额,本期金额计零。', [Rec.ValueByName('Name').AsString]));
+      end;
     end;
   end;
 

+ 1 - 1
DataModules/PhasePayDm.pas

@@ -170,7 +170,7 @@ begin
   for iIndex := 0 to sddPhasePay.RecordCount - 1 do
   begin
     Rec := sddPhasePay.Records[iIndex];
-    if GetCalcType(Rec.ValueByName('ID').AsInteger) = 0 then
+    if GetCalcType(Rec.ValueByName('ID').AsInteger) in [0, 3] then
       Calculate(Rec.ValueByName('ID').AsInteger);
   end;
   CalculateCurPay;

+ 20 - 1
DataModules/ReportMemoryDm/rmXmjBGLDetailDm.pas

@@ -112,6 +112,25 @@ uses
 
 procedure TrmXmjBGLDetailData.AddBGL(ABGLCode: string;
   AClassNode: TXmjNode);
+
+  function FindBGL(const ABGLCode: string): Boolean;
+  begin
+    with FProjectData.BGLData do
+    begin
+      Result := False;
+      cdsBGL.First;
+      while not cdsBGL.Eof do
+      begin
+        if SameText(cdsBGLCode.AsString, ABGLCode) then
+        begin
+          Result := True;
+          Break;
+        end;
+        cdsBGL.Next;
+      end;
+    end;
+  end;
+
 var
   BGLNode: TBGLNode;
 begin
@@ -122,7 +141,7 @@ begin
     BGLNode.FBGLCode := ABGLCode;
     with FProjectData.BGLData do
     begin
-      if cdsBGL.Locate('Code', ABGLCode, []) then
+      if FindBGL(ABGLCode) then
       begin
         BGLNode.FBGLName := cdsBGLName.AsString;
         BGLNode.FBGLReason := cdsBGLPos_Reason.AsString;

+ 1 - 1
Dprs/CSL/Measure_Cloud.cfg

@@ -35,7 +35,7 @@
 -N"D:\Work\DelphiTemp"
 -LE"c:\program files (x86)\borland\delphi7\Projects\Bpl"
 -LN"c:\program files (x86)\borland\delphi7\Projects\Bpl"
--D_mCloud;_mEncrypt1;_Test;_mLoginNoPW1
+-D_mCloud;_mEncrypt1;_Test;_mLoginNoPW
 -w-UNSAFE_TYPE
 -w-UNSAFE_CODE
 -w-UNSAFE_CAST

+ 6 - 6
Dprs/CSL/Measure_Cloud.dof

@@ -96,7 +96,7 @@ PackageDLLOutputDir=
 PackageDCPOutputDir=
 SearchPath=
 Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;Rave50CLX;Rave50VCL;dclOfficeXP;ZjGridD7;DPanel;ExTree;JimComboBoxs;JimTab;PrintComRep;XPMenu_tom;ZjGridFereD7;ZjCommon;SmartDataSet;ZjGridActns
-Conditionals=_mCloud;_mEncrypt1;_Test;_mLoginNoPW1
+Conditionals=_mCloud;_mEncrypt1;_Test;_mLoginNoPW
 DebugSourceDirs=
 UsePackages=0
 [Parameters]
@@ -115,7 +115,7 @@ AutoIncBuild=1
 MajorVer=3
 MinorVer=1
 Release=3
-Build=1118
+Build=1119
 Debug=0
 PreRelease=0
 Special=0
@@ -126,7 +126,7 @@ CodePage=936
 [Version Info Keys]
 CompanyName=珠海纵横创新软件有限公司
 FileDescription=纵横结算决算计量一体化云版
-FileVersion=3.1.3.1118
+FileVersion=3.1.3.1119
 InternalName=
 LegalCopyright=
 LegalTrademarks=
@@ -135,9 +135,9 @@ ProductName=
 ProductVersion=1.0.0.0
 [HistoryLists\hlConditionals]
 Count=5
-Item0=_mCloud;_mEncrypt1;_Test;_mLoginNoPW1
-Item1=_mCloud1;_mEncrypt1;_Test;_mLoginNoPW1
-Item2=_mCloud;_mEncrypt1;_Test;_mLoginNoPW
+Item0=_mCloud;_mEncrypt1;_Test;_mLoginNoPW
+Item1=_mCloud;_mEncrypt1;_Test;_mLoginNoPW1
+Item2=_mCloud1;_mEncrypt1;_Test;_mLoginNoPW1
 Item3=_mCloud;_mEncrypt1;_Test
 Item4=_mCloud;_mEncrypt;_Test
 [HistoryLists\hlUnitAliases]

+ 4 - 0
Dprs/CSL/Measure_Cloud.dpr

@@ -5,6 +5,7 @@ uses
   ShareMem,
   Forms,
   Controls,
+  HttpApp,
   MainFrm in '..\..\Forms\MainFrm.pas' {MainForm},
   ProjectManagerFme in '..\..\Frames\ProjectManagerFme.pas' {ProjectManagerFrame: TFrame},
   UtilMethods in '..\..\Units\UtilMethods.pas',
@@ -253,6 +254,7 @@ begin
 
       {$IFDEF _mLoginNoPW}
       sName := PHPWeb.GetNameFromURLProtocol(ParamStr(1));
+
       if sName = '' then         // 表示手工运行的
       begin
         Application.MessageBox('请从 项目管理信息平台 打开软件。', '系统提示', MB_OK + MB_ICONINFORMATION);
@@ -263,6 +265,8 @@ begin
         // For Test only!
 //        Application.MessageBox(PChar(ParamStr(1) + #10#13 + sName), '系统提示', MB_OK + MB_ICONINFORMATION);
 //        Application.Terminate;
+        if sName[1] = '%' then
+          sName := UTF8Decode(HttpDecode(sName));
 
         case PHPWeb.Login(sName, '', 2, sInfo, sURL) of
           ltLoginFail:

BIN
Dprs/CSL/Measure_Cloud.res


+ 2 - 2
Dprs/Pro/Measure.dof

@@ -115,7 +115,7 @@ AutoIncBuild=1
 MajorVer=3
 MinorVer=1
 Release=6
-Build=2113
+Build=2136
 Debug=0
 PreRelease=0
 Special=0
@@ -126,7 +126,7 @@ CodePage=936
 [Version Info Keys]
 CompanyName=珠海纵横创新软件有限公司
 FileDescription=纵横结算决算计量一体化专业版
-FileVersion=3.1.6.2113
+FileVersion=3.1.6.2136
 InternalName=
 LegalCopyright=版权所有(C)珠海纵横创新软件有限公司2003-2016
 LegalTrademarks=Measure

BIN
Dprs/Pro/Measure.res


+ 5 - 4
Dprs/Pro/Measure_Cloud.dof

@@ -115,7 +115,7 @@ AutoIncBuild=1
 MajorVer=3
 MinorVer=1
 Release=6
-Build=2113
+Build=2136
 Debug=0
 PreRelease=0
 Special=0
@@ -126,7 +126,7 @@ CodePage=936
 [Version Info Keys]
 CompanyName=珠海纵横创新软件有限公司
 FileDescription=纵横结算决算计量一体化云版
-FileVersion=3.1.6.2113
+FileVersion=3.1.6.2136
 InternalName=
 LegalCopyright=版权所有(C)珠海纵横创新软件有限公司2003-2016
 LegalTrademarks=Measure
@@ -137,9 +137,10 @@ ProductVersion=3.1.6.2
 C:\Program Files (x86)\Borland\Delphi7\Lib\3F\Developer Express Inc\ExpressEditors Library 5\Delphi 7\Bin\dclcxEditorsVCLD7.bpl=ExpressEditors Library 5 (VCL Edition) by Developer Express Inc.
 C:\Program Files (x86)\Borland\Delphi7\Lib\3F\Developer Express Inc\ExpressEditors Library 5\Delphi 7\Bin\dclcxExtEditorsVCLD7.bpl=ExpressExtendedEditors Library 5 (VCL Edition) by Developer Express Inc.
 [HistoryLists\hlConditionals]
-Count=2
+Count=3
 Item0=_mCloud;
-Item1=_mCloud;_mDebugView
+Item1=_mCloud;_mLoginNoPW;
+Item2=_mCloud;_mDebugView
 [HistoryLists\hlUnitAliases]
 Count=1
 Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;

+ 35 - 1
Dprs/Pro/Measure_Cloud.dpr

@@ -203,7 +203,6 @@ uses
   DbTreeImport in '..\..\Units\DbTreeImport.pas',
   DbTreeDm in '..\..\DataModules\DbTreeDm.pas' {DbTreeData: TDataModule},
   DebugUsers in '..\..\Units\DebugUsers.pas',
-  FileDownLoadFrm in '..\..\Forms\FileDownLoadFrm.pas' {FileDownLoadForm},
   OtherMeasurePhaseDm in '..\..\DataModules\OtherMeasurePhaseDm.pas' {OtherMeasurePhaseData: TDataModule},
   OtherMeasureOnceDm in '..\..\DataModules\OtherMeasureOnceDm.pas' {OtherMeasureOnceData: TDataModule},
   OMPhaseRecord in '..\..\Units\DataRecord\OMPhaseRecord.pas',
@@ -218,6 +217,7 @@ uses
 var
   Mutex: THandle;
   IPForm: TIPForm;
+  sInfo, sURL, sName: string;
 
 begin
   Mutex := CreateMutex(nil, True, G_AppHandleName);
@@ -245,11 +245,45 @@ begin
         IPForm.Free;
       end;
 
+      {$IFDEF _mLoginNoPW}
+      sName := PHPWeb.GetNameFromURLProtocol(ParamStr(1));
+      if sName = '' then         // 表示手工运行的
+      begin
+        Application.MessageBox('请从 项目管理信息平台 打开软件。', '系统提示', MB_OK + MB_ICONINFORMATION);
+        Application.Terminate;
+      end
+      else
+      begin
+        // For Test only!
+//        Application.MessageBox(PChar(ParamStr(1) + #10#13 + sName), '系统提示', MB_OK + MB_ICONINFORMATION);
+//        Application.Terminate;
+
+        case PHPWeb.Login(sName, '', 2, sInfo, sURL) of
+          ltLoginFail:
+          begin
+            Application.MessageBox('该用户尚未注册不能登录!', '操作提醒', MB_OK + MB_ICONWARNING);
+            Application.Terminate;
+          end;
+
+          ltDisCon:
+          begin
+            Application.MessageBox('网络错误,请稍后重试!', '操作提醒', MB_OK + MB_ICONWARNING);
+            Application.Terminate;
+          end;
+
+        else
+          ;
+        end;  
+      end;
+
+      {$ELSE}
       if not LoginForm then
       begin
         Application.Terminate;
         Exit;
       end;
+      {$ENDIF}
+      
     {$ENDIF}
 
     if CheckDogExists then

BIN
Dprs/Pro/Measure_Cloud.res


+ 4 - 3
Dprs/Pro/Measure_GuangDong.dof

@@ -115,7 +115,7 @@ AutoIncBuild=1
 MajorVer=3
 MinorVer=1
 Release=6
-Build=2113
+Build=2136
 Debug=0
 PreRelease=0
 Special=0
@@ -126,7 +126,7 @@ CodePage=936
 [Version Info Keys]
 CompanyName=珠海纵横创新软件有限公司
 FileDescription=纵横结算决算计量一体化广东专业版
-FileVersion=3.1.6.2113
+FileVersion=3.1.6.2136
 InternalName=
 LegalCopyright=版权所有(C)珠海纵横创新软件有限公司2003-2016
 LegalTrademarks=Measure
@@ -146,5 +146,6 @@ Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
 Count=1
 Item0=..\..\Dcus
 [HistoryLists\hlOutputDirectorry]
-Count=1
+Count=2
 Item0=D:\SmartCostExe\Measure
+Item1=E:\资料\软件安装文件\纵横结算决算计量一体化软件(专业版)

BIN
Dprs/Pro/Measure_GuangDong.res


+ 2 - 2
Dprs/Pro/Measure_GuangDong_Cloud.dof

@@ -115,7 +115,7 @@ AutoIncBuild=1
 MajorVer=3
 MinorVer=1
 Release=6
-Build=2113
+Build=2136
 Debug=0
 PreRelease=0
 Special=0
@@ -126,7 +126,7 @@ CodePage=936
 [Version Info Keys]
 CompanyName=珠海纵横创新软件有限公司
 FileDescription=纵横结算决算计量一体化广东云版
-FileVersion=3.1.6.2113
+FileVersion=3.1.6.2136
 InternalName=
 LegalCopyright=版权所有(C)珠海纵横创新软件有限公司2003-2016
 LegalTrademarks=Measure

+ 0 - 1
Dprs/Pro/Measure_GuangDong_Cloud.dpr

@@ -203,7 +203,6 @@ uses
   DbTreeImport in '..\..\Units\DbTreeImport.pas',
   DbTreeDm in '..\..\DataModules\DbTreeDm.pas',
   DebugUsers in '..\..\Units\DebugUsers.pas',
-  FileDownLoadFrm in '..\..\Forms\FileDownLoadFrm.pas' {FileDownLoadForm},
   OtherMeasurePhaseDm in '..\..\DataModules\OtherMeasurePhaseDm.pas' {OtherMeasurePhaseData: TDataModule},
   OtherMeasureOnceDm in '..\..\DataModules\OtherMeasureOnceDm.pas' {OtherMeasureOnceData: TDataModule},
   OMPhaseRecord in '..\..\Units\DataRecord\OMPhaseRecord.pas',

BIN
Dprs/Pro/Measure_GuangDong_Cloud.res


+ 2 - 2
Dprs/Pro/Measure_GuangDong_TZ.dof

@@ -115,7 +115,7 @@ AutoIncBuild=0
 MajorVer=3
 MinorVer=1
 Release=6
-Build=2112
+Build=2135
 Debug=0
 PreRelease=0
 Special=0
@@ -126,7 +126,7 @@ CodePage=936
 [Version Info Keys]
 CompanyName=珠海纵横创新软件有限公司
 FileDescription=纵横0号台账广东专业版
-FileVersion=3.1.6.2112
+FileVersion=3.1.6.2135
 InternalName=
 LegalCopyright=版权所有(C)珠海纵横创新软件有限公司2003-2016
 LegalTrademarks=Measure

BIN
Dprs/Pro/Measure_GuangDong_TZ.res


+ 2 - 2
Dprs/Pro/Measure_TZ.dof

@@ -115,7 +115,7 @@ AutoIncBuild=1
 MajorVer=3
 MinorVer=1
 Release=6
-Build=2113
+Build=2136
 Debug=0
 PreRelease=0
 Special=0
@@ -126,7 +126,7 @@ CodePage=936
 [Version Info Keys]
 CompanyName=珠海纵横创新软件有限公司
 FileDescription=纵横0号台账专业版
-FileVersion=3.1.6.2113
+FileVersion=3.1.6.2136
 InternalName=
 LegalCopyright=版权所有(C)珠海纵横创新软件有限公司2003-2016
 LegalTrademarks=Measure

BIN
Dprs/Pro/Measure_TZ.res


+ 2 - 2
Dprs/Trail/Measure.dof

@@ -115,7 +115,7 @@ AutoIncBuild=1
 MajorVer=3
 MinorVer=1
 Release=6
-Build=2113
+Build=2136
 Debug=0
 PreRelease=0
 Special=0
@@ -126,7 +126,7 @@ CodePage=936
 [Version Info Keys]
 CompanyName=珠海纵横创新软件有限公司
 FileDescription=纵横结算决算计量一体化学习版
-FileVersion=3.1.6.2113
+FileVersion=3.1.6.2136
 InternalName=
 LegalCopyright=版权所有(C)珠海纵横创新软件有限公司2003-2016
 LegalTrademarks=Measure

BIN
Dprs/Trail/Measure.res


+ 2 - 2
Dprs/Trail/Measure_GuangDong.dof

@@ -115,7 +115,7 @@ AutoIncBuild=1
 MajorVer=3
 MinorVer=1
 Release=6
-Build=2113
+Build=2136
 Debug=0
 PreRelease=0
 Special=0
@@ -126,7 +126,7 @@ CodePage=936
 [Version Info Keys]
 CompanyName=珠海纵横创新软件有限公司
 FileDescription=纵横结算决算计量一体化广东学习版
-FileVersion=3.1.6.2113
+FileVersion=3.1.6.2136
 InternalName=
 LegalCopyright=版权所有(C)珠海纵横创新软件有限公司2003-2016
 LegalTrademarks=Measure

BIN
Dprs/Trail/Measure_GuangDong.res


+ 22 - 0
Encrypt/EncryptDog.pas

@@ -33,6 +33,28 @@ begin
 
       Exit;
     end;
+
+    CS_EndDate:
+    begin
+      if (CommonMessage(pmtWarning, [pmbOk, pmbCancel],
+      '您的使用时间已到,是否通过注册文件延长使用时间?') = pmOK) then
+      begin
+        if not Authorize then
+        begin
+          Exit;
+        end;
+      end
+      else
+      begin
+        Exit;
+      end;
+    end;
+
+    CS_CloseToLimitDate:
+    begin
+      CommonMessage(pmtHint, [pmbOk], '您的加密锁使用时间即将到期,如需延长使用时间,请联系客服中心。');
+    end;
+
     CS_WantAuthorize:
       bWantAuthorize := True;
   end;

+ 9 - 3
Forms/BatchInsertBillsFrm.pas

@@ -402,12 +402,18 @@ end;
 
 procedure TBatchInsertBillsForm.zgPositionCellTextChanged(Sender: TObject;
   Col, Row: Integer);
+var
+  value: Double;
 begin
   if (Col > 1) and (Row > 0) then
   begin
-    zgPosition.Cells[Col, Row].Value := QuantityRoundTo(
-        StrToFloatDef(zgPosition.Cells[Col, Row].Text, 0));
-    zgPosition.Cells[Col, Row].Align := gaCenterRight;
+    if (TryStrToFloat(zgPosition.Cells[Col, Row].Text, value)) then
+    begin
+      zgPosition.Cells[Col, Row].Value := QuantityRoundTo(Value);
+      zgPosition.Cells[Col, Row].Align := gaCenterRight;
+    end
+    else
+      zgPosition.Cells[Col, Row].Value := '';
   end;
 end;
 

+ 10 - 10
Forms/IPFrm.pas

@@ -64,6 +64,16 @@ begin
   if Pos('http://', sIP) =1 then
     Delete(sIP, 1, 7);
 
+  ini := TIniFile.Create(ExtractFilePath(Application.ExeName) + 'Cloud.ini');
+  try
+    ini.WriteString('URL', 'Server', sIP);
+    ini.WriteString('URL', 'CompanyName', sN);
+    ini.WriteString('URL', 'LoginCloudURL', 'http://' + sIP);
+    PHPWeb.LoginCloudURL := 'http://' + sIP;
+  finally
+    ini.Free;
+  end;
+
   iResult := PHPWeb.ConnectServer(sIP, sN);
   if iResult = 1 then
   begin
@@ -75,16 +85,6 @@ begin
 
     G_Server := sIP;
     G_CompanyName := sN;
-
-    ini := TIniFile.Create(ExtractFilePath(Application.ExeName) + 'Cloud.ini');
-    try
-      ini.WriteString('URL', 'Server', sIP);
-      ini.WriteString('URL', 'CompanyName', sN);
-      ini.WriteString('URL', 'LoginCloudURL', 'http://' + sIP);
-      PHPWeb.LoginCloudURL := 'http://' + sIP;
-    finally
-      ini.Free;
-    end;
   end
   else
   begin

+ 1 - 40
Forms/LoginFrm.pas

@@ -71,8 +71,7 @@ type
 implementation
 
 uses
-  ScUtils, ShellAPI, IniFiles, ScConfig, Md5, PHPWebDm, ConstUnit, DebugUsers,
-  FileDownLoadFrm;
+  ScUtils, ShellAPI, IniFiles, ScConfig, Md5, PHPWebDm, ConstUnit, DebugUsers;
 
 {$R *.dfm}
 
@@ -172,7 +171,6 @@ end;
 
 procedure TLoginFrm.btnLoginClick(Sender: TObject);
 var sInfo, sURL, sMD5PW: string;
-  vFDForm: TFileDownLoadForm;
 begin
   lblHint.Caption := '';
   lblHint.Update;
@@ -208,43 +206,6 @@ begin
       ModalResult := mrNone;
     end;
 
-    ltUpdate:
-  {  begin
-      // 无法对PHP返回的字符串进行排版。这里使用Delphi自身的字符串。
-      sInfo := '尊敬的用户:' + #13#13 +
-               '系统检测出您是通过SmartCost旧版本程序注册了本帐户(' + Trim(cbUser.Text) +
-               '),因系统升级,为保障您的帐户安全和更好的为您服务,' + #13#13 +
-               '我们需要对您的邮箱进行有效性验证,并需要您重置该帐户的密码以保证您的帐号在新程序上能够正常使用。' + #13#13 +
-               '请点击“确定”按钮打开密码重置页面。';
-      Application.MessageBox(PChar(sInfo), '升级提示', MB_OK + MB_ICONINFORMATION);
-      edtPW.SetFocus;
-      edtPW.SelectAll;
-      ModalResult := mrNone;
-
-      Screen.Cursor := crHourGlass;
-      try
-        sURL := ConfigInfo.OldUserResetPwdURL + '?CheckCode=' + sCheckCode;
-        ShellExecute(Application.Handle, 'open', PChar(sURL), nil, nil, SW_SHOWNORMAL);
-      finally
-        Screen.Cursor := crDefault;
-      end;
-    end;   }
-    // 升级
-    begin
-      if Application.MessageBox(PChar(sInfo), '系统提示', MB_OKCANCEL + MB_ICONQUESTION) = ID_OK then
-      begin
-        vFDForm := TFileDownLoadForm.Create(nil);
-        try
-          vFDForm.URL := sURL;
-          vFDForm.ShowModal;
-        finally
-          vFDForm.Free;
-        end;
-      end;
-
-      ModalResult := mrNone;
-    end;
-
     ltIncomplete:
     begin
       Application.MessageBox(PChar(sInfo), '系统提示', MB_OK + MB_ICONINFORMATION);

+ 8 - 2
Forms/MainFrm.dfm

@@ -1,6 +1,6 @@
 object MainForm: TMainForm
-  Left = 479
-  Top = 292
+  Left = 540
+  Top = 329
   Width = 750
   Height = 538
   ActiveControl = jpsMainProjectsManager
@@ -1065,6 +1065,12 @@ object MainForm: TMainForm
       Hint = #20572#29992'/'#21551#29992
       Visible = ivAlways
     end
+    object dxbtnWithoutCalcCurPay: TdxBarButton
+      Caption = #19981#21442#19982#26412#26399#24212#20184#35745#31639
+      Category = 0
+      Hint = #19981#21442#19982#26412#26399#24212#20184#35745#31639
+      Visible = ivAlways
+    end
   end
   object Images: TImageList
     DrawingStyle = dsTransparent

+ 1 - 0
Forms/MainFrm.pas

@@ -159,6 +159,7 @@ type
     dxbtnImportDmf: TdxBarButton;
     actnImportDmf: TAction;
     dxbtnCanCalc: TdxBarButton;
+    dxbtnWithoutCalcCurPay: TdxBarButton;
     procedure FormCreate(Sender: TObject);
     procedure FormDestroy(Sender: TObject);
     procedure jtsProjectsChange(Sender: TObject; NewTab: Integer;

+ 8 - 6
Forms/OptionFrm.pas

@@ -50,15 +50,17 @@ uses
 
 procedure ModifiedOptions;
 var
-  OptionFrom: TOptionForm;
+  OptionForm: TOptionForm;
 begin
-  OptionFrom := TOptionForm.Create(nil);
+  OptionForm := TOptionForm.Create(nil);
   try
-    OptionFrom.Load;
-    if OptionFrom.ShowModal = mrOk then
-      OptionFrom.Save;
+    OptionForm.Load;
+    OptionForm.ClientHeight := 338;
+    OptionForm.ClientWidth := 479;
+    if OptionForm.ShowModal = mrOk then
+      OptionForm.Save;
   finally
-    OptionFrom.Free;
+    OptionForm.Free;
   end;
 end;
 

+ 66 - 55
Forms/ProjectPropertiesFrm.dfm

@@ -225,7 +225,6 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           Width = 438
           Height = 247
           HorzScrollBar.Range = 401
-          VertScrollBar.Position = 789
           VertScrollBar.Range = 1180
           Align = alClient
           AutoScroll = False
@@ -243,7 +242,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           OnVScroll = msbBaseVScroll
           object lblDealInfo: TLabel
             Left = 7
-            Top = -785
+            Top = 4
             Width = 48
             Height = 12
             Caption = #21512#21516#20449#24687
@@ -256,28 +255,28 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object lblBuilder: TLabel
             Left = 34
-            Top = -681
+            Top = 108
             Width = 60
             Height = 12
             Caption = #24314#35774#21333#20301#65306
           end
           object lblConstructor: TLabel
             Left = 34
-            Top = -597
+            Top = 192
             Width = 60
             Height = 12
             Caption = #25215#21253#21333#20301#65306
           end
           object lblSupervisor: TLabel
             Left = 34
-            Top = -513
+            Top = 276
             Width = 60
             Height = 12
             Caption = #30417#29702#21333#20301#65306
           end
           object lblTechParameters: TLabel
             Left = 7
-            Top = -418
+            Top = 371
             Width = 48
             Height = 12
             Caption = #25216#26415#21442#25968
@@ -290,14 +289,14 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object lblLoadLevel: TLabel
             Left = 34
-            Top = -396
+            Top = 393
             Width = 60
             Height = 12
             Caption = #20844#36335#31561#32423#65306
           end
           object lblDealPayTitle: TLabel
             Left = 7
-            Top = -258
+            Top = 531
             Width = 48
             Height = 12
             Caption = #21512#21516#25903#20184
@@ -310,7 +309,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object lblSafeTitel: TLabel
             Left = 7
-            Top = -154
+            Top = 635
             Width = 48
             Height = 12
             Caption = #25991#20214#23433#20840
@@ -323,14 +322,14 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object lblUnlockPassword: TLabel
             Left = 36
-            Top = -130
+            Top = 659
             Width = 84
             Height = 12
             Caption = #35299#38145#33410#28857#23494#30721#65306
           end
           object lblPasswordHint: TLabel
             Left = 128
-            Top = -129
+            Top = 660
             Width = 90
             Height = 12
             Caption = 'lblPasswordHint'
@@ -344,7 +343,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object lblCalcParametersTitel: TLabel
             Left = 7
-            Top = -26
+            Top = 763
             Width = 48
             Height = 12
             Caption = #35745#31639#21442#25968
@@ -357,14 +356,14 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object lblDigit: TLabel
             Left = 36
-            Top = -2
+            Top = 787
             Width = 84
             Height = 12
             Caption = #20445#30041#23567#25968#20301#25968#65306
           end
           object lblDateTime: TLabel
             Left = 7
-            Top = 147
+            Top = 936
             Width = 48
             Height = 12
             Caption = #26102#38388#21442#25968
@@ -377,21 +376,21 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object lblBaseline: TLabel
             Left = 36
-            Top = 170
+            Top = 959
             Width = 60
             Height = 12
             Caption = #36215#22987#26085#26399#65306
           end
           object lblDeadline: TLabel
             Left = 36
-            Top = 194
+            Top = 983
             Width = 60
             Height = 12
             Caption = #25130#27490#26085#26399#65306
           end
           object lblDateHint: TLabel
             Left = 37
-            Top = 215
+            Top = 1004
             Width = 192
             Height = 12
             Caption = #24403#21069#25130#27490#26085#26399' '#65308' '#36215#22987#26085#26399#65292#35831#26680#26597
@@ -404,7 +403,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object pnlDealInfoBar: TPanel
             Left = 62
-            Top = -780
+            Top = 9
             Width = 339
             Height = 2
             BevelOuter = bvLowered
@@ -412,7 +411,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leProjectName: TLabeledEdit
             Left = 33
-            Top = -753
+            Top = 36
             Width = 330
             Height = 18
             Ctl3D = False
@@ -424,7 +423,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leDealName: TLabeledEdit
             Left = 33
-            Top = -713
+            Top = 76
             Width = 152
             Height = 18
             Ctl3D = False
@@ -436,7 +435,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leDealIndex: TLabeledEdit
             Left = 195
-            Top = -713
+            Top = 76
             Width = 80
             Height = 18
             Ctl3D = False
@@ -448,7 +447,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leBName: TLabeledEdit
             Left = 101
-            Top = -666
+            Top = 123
             Width = 261
             Height = 18
             Ctl3D = False
@@ -460,7 +459,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leBLegal: TLabeledEdit
             Left = 101
-            Top = -625
+            Top = 164
             Width = 137
             Height = 18
             Ctl3D = False
@@ -472,7 +471,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leBDate: TLabeledEdit
             Left = 245
-            Top = -625
+            Top = 164
             Width = 119
             Height = 18
             Ctl3D = False
@@ -484,7 +483,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leCName: TLabeledEdit
             Left = 101
-            Top = -582
+            Top = 207
             Width = 262
             Height = 18
             Ctl3D = False
@@ -496,7 +495,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leCLegal: TLabeledEdit
             Left = 101
-            Top = -541
+            Top = 248
             Width = 137
             Height = 18
             Ctl3D = False
@@ -508,7 +507,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leCDate: TLabeledEdit
             Left = 245
-            Top = -541
+            Top = 248
             Width = 119
             Height = 18
             Ctl3D = False
@@ -520,7 +519,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leSName: TLabeledEdit
             Left = 101
-            Top = -498
+            Top = 291
             Width = 262
             Height = 18
             Ctl3D = False
@@ -532,7 +531,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leSLegal: TLabeledEdit
             Left = 101
-            Top = -458
+            Top = 331
             Width = 137
             Height = 18
             Ctl3D = False
@@ -544,7 +543,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leSDate: TLabeledEdit
             Left = 245
-            Top = -458
+            Top = 331
             Width = 119
             Height = 18
             Ctl3D = False
@@ -556,7 +555,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object pnlTechParametersBar: TPanel
             Left = 62
-            Top = -413
+            Top = 376
             Width = 339
             Height = 2
             BevelOuter = bvLowered
@@ -564,7 +563,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leStartPeg: TLabeledEdit
             Left = 34
-            Top = -338
+            Top = 451
             Width = 132
             Height = 18
             Ctl3D = False
@@ -576,7 +575,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leEndPeg: TLabeledEdit
             Left = 176
-            Top = -338
+            Top = 451
             Width = 131
             Height = 18
             Ctl3D = False
@@ -588,7 +587,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leLength: TLabeledEdit
             Left = 34
-            Top = -298
+            Top = 491
             Width = 132
             Height = 18
             Ctl3D = False
@@ -600,7 +599,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leLaneCount: TLabeledEdit
             Left = 176
-            Top = -298
+            Top = 491
             Width = 132
             Height = 18
             Ctl3D = False
@@ -612,7 +611,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object cbLoadLevel: TComboBox
             Left = 34
-            Top = -379
+            Top = 410
             Width = 132
             Height = 20
             Ctl3D = False
@@ -629,7 +628,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object pnlDealPayBar: TPanel
             Left = 62
-            Top = -252
+            Top = 537
             Width = 339
             Height = 2
             BevelOuter = bvLowered
@@ -637,7 +636,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leContractPrice: TLabeledEdit
             Left = 133
-            Top = -237
+            Top = 552
             Width = 117
             Height = 18
             BiDiMode = bdLeftToRight
@@ -655,7 +654,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leStartedSubsist: TLabeledEdit
             Left = 133
-            Top = -210
+            Top = 579
             Width = 118
             Height = 18
             Ctl3D = False
@@ -669,7 +668,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leMaterialSubsist: TLabeledEdit
             Left = 133
-            Top = -184
+            Top = 605
             Width = 119
             Height = 18
             Ctl3D = False
@@ -683,7 +682,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object pnlSafeBar: TPanel
             Left = 62
-            Top = -148
+            Top = 641
             Width = 339
             Height = 2
             BevelOuter = bvLowered
@@ -691,7 +690,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object pnlUnlockPassword: TPanel
             Left = 40
-            Top = -116
+            Top = 673
             Width = 361
             Height = 85
             BevelOuter = bvNone
@@ -919,7 +918,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leDealType: TLabeledEdit
             Left = 283
-            Top = -713
+            Top = 76
             Width = 80
             Height = 18
             Ctl3D = False
@@ -931,7 +930,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object pnlCalcParametersBar: TPanel
             Left = 62
-            Top = -20
+            Top = 769
             Width = 339
             Height = 2
             BevelOuter = bvLowered
@@ -939,7 +938,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leQuantityDigit: TLabeledEdit
             Left = 100
-            Top = 15
+            Top = 804
             Width = 87
             Height = 18
             EditLabel.Width = 36
@@ -951,7 +950,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leTotalPriceDigit: TLabeledEdit
             Left = 264
-            Top = 15
+            Top = 804
             Width = 87
             Height = 18
             EditLabel.Width = 36
@@ -963,7 +962,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object udQuantity: TUpDown
             Left = 187
-            Top = 15
+            Top = 804
             Width = 16
             Height = 18
             Associate = leQuantityDigit
@@ -973,7 +972,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object udTotalPrice: TUpDown
             Left = 351
-            Top = 15
+            Top = 804
             Width = 16
             Height = 18
             Associate = leTotalPriceDigit
@@ -982,7 +981,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object gbPM_Digit: TGroupBox
             Left = 52
-            Top = 94
+            Top = 883
             Width = 349
             Height = 44
             Caption = #20215#24046
@@ -1012,7 +1011,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object pnlDateTime: TPanel
             Left = 62
-            Top = 153
+            Top = 942
             Width = 339
             Height = 2
             BevelOuter = bvLowered
@@ -1020,7 +1019,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object dtpBaseline: TDateTimePicker
             Left = 104
-            Top = 166
+            Top = 955
             Width = 105
             Height = 20
             Date = 0.457352881945553200
@@ -1031,7 +1030,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object dtpDeadline: TDateTimePicker
             Left = 104
-            Top = 190
+            Top = 979
             Width = 105
             Height = 20
             Date = 0.457352881945553200
@@ -1042,7 +1041,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object cbDealPayAloneDigiy: TCheckBox
             Left = 62
-            Top = 42
+            Top = 831
             Width = 131
             Height = 17
             Caption = #21512#21516#25903#20184#21333#29420#35774#32622
@@ -1051,7 +1050,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leDealPayTotalPriceDigit: TLabeledEdit
             Left = 100
-            Top = 66
+            Top = 855
             Width = 87
             Height = 18
             EditLabel.Width = 36
@@ -1063,13 +1062,25 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object udDealPayTotalPriceDigit: TUpDown
             Left = 187
-            Top = 66
+            Top = 855
             Width = 16
             Height = 18
             Associate = leDealPayTotalPriceDigit
             Max = 10
             TabOrder = 37
           end
+          object leDealPhase: TLabeledEdit
+            Left = 177
+            Top = 410
+            Width = 131
+            Height = 18
+            Ctl3D = False
+            EditLabel.Width = 60
+            EditLabel.Height = 12
+            EditLabel.Caption = #21512#21516#24037#26399#65306
+            ParentCtl3D = False
+            TabOrder = 38
+          end
         end
       end
     end

+ 3 - 0
Forms/ProjectPropertiesFrm.pas

@@ -123,6 +123,7 @@ type
     cbReportShowState: TCheckBox;
     edtReportShowStateText: TEdit;
     cbReportShowStageWithoutReply: TCheckBox;
+    leDealPhase: TLabeledEdit;
     procedure btnOkClick(Sender: TObject);
     procedure leContractPriceClick(Sender: TObject);
     procedure msbBaseMouseWheel(Sender: TObject; Shift: TShiftState;
@@ -395,6 +396,7 @@ begin
   leEndPeg.Text := FProjProperties.EndPeg;
   leLength.Text := FloatToStr(FProjProperties.LoadLength);
   leLaneCount.Text := IntToStr(FProjProperties.LaneCount);
+  leDealPhase.Text := FProjProperties.DealPhase;
 end;
 
 procedure TProjectPropertiesForm.SaveDealInfo;
@@ -421,6 +423,7 @@ begin
   FProjProperties.EndPeg := leEndPeg.Text;
   FProjProperties.LoadLength := StrToFloatDef(leLength.Text, 0);
   FProjProperties.LaneCount := StrToIntDef(leLaneCount.Text, 0);
+  FProjProperties.DealPhase := leDealPhase.Text;
 end;
 
 procedure TProjectPropertiesForm.tobtnBaseClick(Sender: TObject);

+ 4 - 1
Forms/ReportsFrm.pas

@@ -13,7 +13,7 @@ uses
   AuditSelectFrm,
   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
   Dialogs, PrintCom, PrintComXML, ExtCtrls, ExTreeView, ImgList,
-  dxBarExtItems, dxBar, ComCtrls, ToolWin, StdCtrls;
+  dxBarExtItems, dxBar, ComCtrls, ToolWin, StdCtrls, Jpeg;
 
 type
   TReportsForm = class(TForm)
@@ -467,11 +467,14 @@ begin
 end;
 
 procedure TReportsForm.xlbPrintCurPageClick(Sender: TObject);
+var
+  img: TJPEGImage;
 begin
   if _IsEncrypt or G_IsCloud then
     PreviewComXML.Print(PreviewBox.Canvas, CurPage, 1)
   else
     TipMessage(GetHintStr, Handle);
+  //PreviewBox.Picture.SaveToFile('E:\1.jpg');
 end;
 
 procedure TReportsForm.xcbStartPageChange(Sender: TObject);

+ 34 - 11
Frames/BillsCompileFme.pas

@@ -91,6 +91,8 @@ type
     procedure ResetAllowInsert(AAllow: Boolean);
 
     function CheckExprsColumn: Boolean;
+    function CheckMemoStrColumn: Boolean;
+
     procedure SetShowDesignQuantity(const Value: Boolean);
     procedure SetShowAlias(const Value: Boolean);
   public
@@ -232,7 +234,6 @@ end;
 
 destructor TBillsCompileFrame.Destroy;
 begin
-
   inherited;
 end;
 
@@ -243,13 +244,20 @@ begin
     dxpmBillsCompile.PopupFromCursorPos
   else
   begin
-    if CheckExprsColumn then
+    if CheckExprsColumn or CheckMemoStrColumn then
       laEdtExprs.Text := zgBillsCompile.CurCell.EditText
     else
       laEdtExprs.Text := '';
-    with stdBillsCompile.DataView do
-      if Assigned(Current) then
-        laEdtExprs.ReadOnly := Current.ValueByName('LockedInfo').AsBoolean;
+    if CheckExprsColumn then
+    begin
+      with stdBillsCompile.DataView do
+        if Assigned(Current) then
+          laEdtExprs.ReadOnly := Current.ValueByName('LockedInfo').AsBoolean;
+    end
+    else if CheckMemoStrColumn then
+    begin
+      laEdtExprs.ReadOnly := False;
+    end;
   end;
 end;
 
@@ -292,7 +300,7 @@ end;
 procedure TBillsCompileFrame.laEdtExprsExit(Sender: TObject);
 begin
   if not TLabeledEdit(Sender).ReadOnly then
-    if CheckExprsColumn then
+    if CheckExprsColumn or CheckMemoStrColumn then
       zgBillsCompile.CurCell.Text := laEdtExprs.Text;
 end;
 
@@ -313,7 +321,7 @@ begin
   begin
     zgBillsCompile.SetFocus;
     if not TLabeledEdit(Sender).ReadOnly then
-      if CheckExprsColumn then
+      if CheckExprsColumn or CheckMemoStrColumn then
         zgBillsCompile.CurCell.Text := laEdtExprs.Text;
   end;
 end;
@@ -681,13 +689,28 @@ end;
 procedure TBillsCompileFrame.zgBillsCompileCellTextChanged(Sender: TObject;
   Col, Row: Integer);
 begin
-  if CheckExprsColumn then
+  if CheckExprsColumn or CheckMemoStrColumn then
     laEdtExprs.Text := zgBillsCompile.CurCell.EditText
   else
     laEdtExprs.Text := '';
-  with stdBillsCompile.DataView do
-    if Assigned(Current) then
-      laEdtExprs.ReadOnly := Current.ValueByName('LockedInfo').AsBoolean;
+  if CheckExprsColumn then
+  begin
+    with stdBillsCompile.DataView do
+      if Assigned(Current) then
+        laEdtExprs.ReadOnly := Current.ValueByName('LockedInfo').AsBoolean;
+  end
+  else if CheckMemoStrColumn then
+  begin
+    laEdtExprs.ReadOnly := False;
+  end;
+end;
+
+function TBillsCompileFrame.CheckMemoStrColumn: Boolean;
+var
+  iCol: Integer;
+begin
+  iCol := zgBillsCompile.CurCol - zgBillsCompile.FixedColCount;
+  Result := (iCol = stdBillsCompile.VisibleCol('MemoStr'));
 end;
 
 end.

+ 20 - 1
Frames/BillsGatherFme.dfm

@@ -128,10 +128,11 @@ object BillsGatherFrame: TBillsGatherFrame
           Height = 172
           Options = [goRangeSelect, goRowSizing, goColSizing, goCellNotMaintainData, goFixedRowShowNo, goFixedColShowNo, goAlwaysShowSelection]
           OptionsEx = []
-          ColCount = 9
+          ColCount = 10
           ShowGridLine = False
           DefaultColWidth = 73
           DefaultFixedColWidth = 25
+          DefaultFixedRowHeight = 35
           Selection.AlphaBlend = False
           Selection.TransparentColor = False
           FrozenCol = 0
@@ -289,6 +290,24 @@ object BillsGatherFrame: TBillsGatherFrame
         ReadOnly = True
       end
       item
+        Title.Caption = #26412#26399#23436#25104#35745#37327#25968#37327
+        Title.CaptionAcrossCols = '1'
+        Title.Font.Charset = GB2312_CHARSET
+        Title.Font.Color = clWindowText
+        Title.Font.Height = -12
+        Title.Font.Name = #23435#20307
+        Title.Font.Style = []
+        Alignment = taRightJustify
+        Font.Charset = GB2312_CHARSET
+        Font.Color = clWindowText
+        Font.Height = -12
+        Font.Name = #23435#20307
+        Font.Style = []
+        FieldName = 'CurGatherQuantity'
+        Width = 80
+        ReadOnly = False
+      end
+      item
         Title.Caption = #21333#20301#24037#31243
         Title.CaptionAcrossCols = '1'
         Title.Font.Charset = GB2312_CHARSET

+ 12 - 3
Frames/BillsMeasureFme.pas

@@ -75,6 +75,7 @@ type
     procedure ShowGridCols(AShow: Boolean; ALeft, ARight: Integer);
 
     function CheckExprsColumn: Boolean;
+    function CheckMemoStrColumn: Boolean;
 
     procedure SetColumnVisible(const AColumn: string; AVisible: Boolean);
     procedure SetAddFieldVisible(AValue: Boolean);
@@ -161,7 +162,7 @@ begin
   end
   else
   begin
-    if CheckExprsColumn then
+    if CheckExprsColumn or CheckMemoStrColumn then
       laEdtExprs.Text := zgBillsMeasure.CurCell.EditText
     else
       laEdtExprs.Text := '';
@@ -183,7 +184,7 @@ begin
   begin
     zgBillsMeasure.SetFocus;
     if not TLabeledEdit(Sender).ReadOnly then
-      if CheckExprsColumn then
+      if CheckExprsColumn or CheckMemoStrColumn then
         zgBillsMeasure.CurCell.Text := laEdtExprs.Text;
   end;
 end;
@@ -191,7 +192,7 @@ end;
 procedure TBillsMeasureFrame.laEdtExprsExit(Sender: TObject);
 begin
   if not TLabeledEdit(Sender).ReadOnly then
-    if CheckExprsColumn then
+    if CheckExprsColumn or CheckMemoStrColumn then
       zgBillsMeasure.CurCell.Text := laEdtExprs.Text;
 end;
 
@@ -739,4 +740,12 @@ begin
   FColVisibleManager.ShowGridCol(AShow, iBegin, iEnd);
 end;
 
+function TBillsMeasureFrame.CheckMemoStrColumn: Boolean;
+var
+  iCol: Integer;
+begin
+  iCol := zgBillsMeasure.CurCol - zgBillsMeasure.FixedColCount;
+  Result := (iCol = stdBillsMeasure.VisibleCol('MemoStr'));
+end;
+
 end.

+ 10 - 0
Frames/DealPaymentFme.dfm

@@ -315,6 +315,11 @@ object DealPaymentFrame: TDealPaymentFrame
         BeginGroup = True
         Item = MainForm.dxbtnCanCalc
         Visible = True
+      end
+      item
+        BeginGroup = True
+        Item = MainForm.dxbtnWithoutCalcCurPay
+        Visible = True
       end>
     UseOwnFont = False
     OnPopup = dxpmDealPaymentPopup
@@ -342,5 +347,10 @@ object DealPaymentFrame: TDealPaymentFrame
       OnExecute = actnCanCalcExecute
       OnUpdate = actnCanCalcUpdate
     end
+    object actnWithoutCalcCurPay: TAction
+      Caption = #19981#21442#19982#26412#26399#24212#20184#35745#31639
+      OnExecute = actnWithoutCalcCurPayExecute
+      OnUpdate = actnWithoutCalcCurPayUpdate
+    end
   end
 end

+ 39 - 1
Frames/DealPaymentFme.pas

@@ -25,6 +25,7 @@ type
     actnCalculatePhasePay: TAction;
     actnSetDealPayPlan: TAction;
     actnCanCalc: TAction;
+    actnWithoutCalcCurPay: TAction;
     procedure zgParameterCellCanEdit(Sender: TObject; const ACoord: TPoint;
       var Allow: Boolean);
     procedure imgHelpClick(Sender: TObject);
@@ -49,6 +50,8 @@ type
     procedure actnSetDealPayPlanUpdate(Sender: TObject);
     procedure actnCanCalcExecute(Sender: TObject);
     procedure actnCanCalcUpdate(Sender: TObject);
+    procedure actnWithoutCalcCurPayExecute(Sender: TObject);
+    procedure actnWithoutCalcCurPayUpdate(Sender: TObject);
   private
     FDealPaymentData: TDealPaymentData;
 
@@ -164,6 +167,7 @@ begin
   SetDxBtnAction(actnCalculatePhasePay, MainForm.dxbtnCalculatePhasePay);
   SetDxBtnAction(actnSetDealPayPlan, MainForm.dxbtnSetDealPayPlan);
   SetDxBtnAction(actnCanCalc, MainForm.dxbtnCanCalc);
+  SetDxBtnAction(actnWithoutCalcCurPay, MainForm.dxbtnWithoutCalcCurPay);
 end;
 
 procedure TDealPaymentFrame.actnCalculatePhasePayExecute(Sender: TObject);
@@ -190,6 +194,8 @@ begin
     // 本期应付
     if Rec.ValueByName('CalcType').AsInteger = 1 then
       AColor := clSkyBlue
+    else if Rec.ValueByName('CalcType').AsInteger = 3 then
+      AColor := $00E6E6E6
     // 本期实付
     //else if Rec.ValueByName('CalcType').AsInteger = 2 then
     else if iCurPhase = 0 then
@@ -323,7 +329,12 @@ procedure TDealPaymentFrame.actnSetDealPayPlanExecute(Sender: TObject);
   function CheckCanPlan(ARec: TsdDataRecord): Boolean;
   begin
     Result := True;
-    if ARec.ValueByName('CalcType').AsInteger <> 0 then
+    if ARec.ValueByName('CalcType').AsInteger = 3 then
+    begin
+      ErrorMessage('"不参与本期应付计算项"不可设置计提期限。');
+      Result := False;
+    end
+    else if ARec.ValueByName('CalcType').AsInteger <> 0 then
     begin
       ErrorMessage('本期应付,本期实付不可设置计提期限。');
       Result := False;
@@ -438,4 +449,31 @@ begin
     TAction(Sender).Caption := '停用';
 end;
 
+procedure TDealPaymentFrame.actnWithoutCalcCurPayExecute(Sender: TObject);
+var
+  Rec, PhaseRec: TsdDataRecord;
+begin
+  Rec := sdDealPayment.DataView.Current;
+  Rec.ValueByName('CalcType').AsInteger := 3;
+
+  if (TProjectData(FDealPaymentData.ProjectData).PhaseData.Active) then
+    TProjectData(FDealPaymentData.ProjectData).PhaseData.PhasePayData.CalculateAll;
+end;
+
+procedure TDealPaymentFrame.actnWithoutCalcCurPayUpdate(Sender: TObject);
+var
+  Rec: TsdDataRecord;
+begin
+  Rec := sdDealPayment.DataView.Current;
+  if not Assigned(Rec) or Rec.ValueByName('PreDefined').AsBoolean or
+    (Rec.ValueByName('CalcType').AsInteger <> 0) or
+    (Rec.ValueByName('Name').AsString = '本期完成计量') then
+  begin
+    TAction(Sender).Visible := False;
+    Exit;
+  end;
+  TAction(Sender).Visible := (TProjectData(FDealPaymentData.ProjectData).PhaseIndex = Rec.ValueByName('CreatePhaseID').AsInteger) and
+    (TProjectData(FDealPaymentData.ProjectData).ValidStageIsRefer or (not TProjectData(FDealPaymentData.ProjectData).StartMeasure));
+end;
+
 end.

+ 2 - 0
Units/DbTreeImport.pas

@@ -74,6 +74,7 @@ begin
     Result.OrgQuantity := ADbNode.Rec.ValueByName('Quantity').AsFloat;
     Result.DgnQuantity1 := ADbNode.Rec.ValueByName('DesignQuantity').AsFloat;
     Result.DgnQuantity2 := ADbNode.Rec.ValueByName('DesignQuantity2').AsFloat;
+    Result.DrawingCode := ADbNode.Rec.ValueByName('DrawingCode').AsString;
 
     for iChild := 0 to ADbNode.ChildCount - 1 do
       AddDbNode(ADbNode.ChildNodes[iChild], Result, nil);
@@ -222,6 +223,7 @@ begin
       Rec.OrgQuantity.AsFloat := vNode.OrgQuantity;
       Rec.DgnQuantity1.AsFloat := vNode.DgnQuantity1;
       Rec.DgnQuantity2.AsFloat := vNode.DgnQuantity2;
+      Rec.DrawingCode.AsString := vNode.DrawingCode;
     end;
   finally
     FProjectData.BillsData.sddBills.EndUpdate;

+ 1 - 1
Units/ProjectCommands.pas

@@ -308,7 +308,7 @@ end;
 function TSubmitProject.ExportTo(AFileName: string): Boolean;
 begin
   FNeedUpdate := True;
-  FProjectData.LockedDataForSubmit;
+  //FProjectData.LockedDataForSubmit;
   Result := inherited ExportTo(AFileName);
 end;
 

+ 47 - 6
Units/ProjectData.pas

@@ -101,6 +101,7 @@ type
     procedure SetStageIndex(const Value: Integer);
     function GetCanInsertNormalBills: Boolean;
     function GetValidStageIsRefer: Boolean;
+    function GetStartMeasure: Boolean;
   public
     constructor Create;
     destructor Destroy; override;
@@ -133,10 +134,10 @@ type
     procedure OpenForReport3(const AFileName: string);
     {OpenForGather: BillsData, BillsMeasureTree, DealPaymentData, BGLData, PhaseData(根据PhaseIndex指定打开)}
     procedure OpenForGather(const AFileName: string; APhaseIndex: Integer = -1);
+    {OpenForSignOnline: BillsData, BillsMeasureTree, PhaseData(根据PhaseIndex指定打开)}
+    procedure OpenForSignOnline(const AFileName: string; APhaseIndex: Integer = -1);
     //-----------------------  End ---后台打开 ------------------------
 
-    // 
-
     procedure SaveDebugFile(const AFileName: string);
     procedure SaveTempDataBaseFile(const AFileName: string);
 
@@ -226,6 +227,7 @@ type
     property StageDataReadOnly: Boolean read GetStageDataReadOnly;
     property PriceMarginReadOnly: Boolean read GetPriceMarginReadOnly;
     property ValidStageIsRefer: Boolean read GetValidStageIsRefer;
+    property StartMeasure: Boolean read GetStartMeasure; 
 
     property CanUnlockInfo: Boolean read FCanUnlockInfo write FCanUnlockInfo;
     property CanInsertNormalBills: Boolean read GetCanInsertNormalBills;
@@ -251,7 +253,8 @@ implementation
 
 uses UtilMethods, Globals, ProjectCommands, sdIDTree, StageDm,
   ZJJLDm, PHPWebDm, XMLDoc, XMLIntf, ConstUnit, PasswordInputFrm,
-  mProgressProFrm, mDataRecord, ConditionalDefines, DbTreeImport;
+  mProgressProFrm, mDataRecord, ConditionalDefines, DbTreeImport,
+  StrUtils;
 
 { TProjectData }
 
@@ -309,7 +312,8 @@ end;
 procedure TProjectData.CreateNewPhase;
 var
   sPhaseFileName: string;
-begin
+begin                       
+  FProjProperties.Save;
   FBillsData.LockedBaseData;
   FProjProperties.PhaseCount := FProjProperties.PhaseCount + 1;
   FProjProperties.AuditStatus := 0;
@@ -914,6 +918,12 @@ procedure TProjectData.CopyPhaseData;
   end;
 
   procedure UpdateZJJLData;
+
+    function EscString(const AStr: string): string;
+    begin
+      Result := AnsiReplaceStr(AStr, '''', '''''');
+    end;
+
   const
     sUpdateSql = 'Update P_ZJJL' +
                  '  Set BGLCode = ''%s'', PegName = ''%s'', FBFXName = ''%s'',' +
@@ -929,8 +939,8 @@ procedure TProjectData.CopyPhaseData;
       while not cdsZJJL.Eof do
       begin
         ZJJLInfoRec := GetInfoRec(cdsZJJLBillsID.AsInteger, cdsZJJLType.AsInteger);
-        sSql := Format(sUpdateSql, [ZJJLInfoRec.BGLCode, ZJJLInfoRec.PegName,
-            ZJJLInfoRec.FBFXName, ZJJLInfoRec.UnitName, ZJJLInfoRec.DrawingCode,
+        sSql := Format(sUpdateSql, [EscString(ZJJLInfoRec.BGLCode), EscString(ZJJLInfoRec.PegName),
+            EscString(ZJJLInfoRec.FBFXName), EscString(ZJJLInfoRec.UnitName), EscString(ZJJLInfoRec.DrawingCode),
             cdsZJJLID.AsInteger]);
         ExecuteSql(sSql);
         cdsZJJL.Next;
@@ -1288,11 +1298,13 @@ procedure TProjectData.ImportCloudTenderFile(const AFileName: string);
     sBillsSql = 'Insert Into Bills (ID, ParentID, NextSiblingID,' +
                 '    Code, B_Code, Name, Units, Alias, Price, NewPrice,' +
                 '    OrgQuantity, OrgTotalPrice, MisQuantity, MisTotalPrice, OthQuantity, OthTotalPrice,' +
+                '    CalcType,' +
                 '    DgnQuantity1, DgnQuantity2,'+
                 '    Peg, DrawingCode, MemoStr, HasBookMark, MarkMemo)'+
                 '  Select ID, ParentID, NextSiblingID,'+
                 '    Code, B_Code, Name, Units, Alias, Price, NewPrice,' +
                 '    OrgQuantity, OrgTotalPrice, MisQuantity, MisTotalPrice, OthQuantity, OthTotalPrice,' +
+                '    CalcType,' +
                 '    DgnQuantity1, DgnQuantity2,'+
                 '    Peg, DrawingCode, MemoStr, HasBookMark, MarkMemo'+
                 '  From Bills In ''%s''';
@@ -2054,4 +2066,33 @@ begin
   Result := PhaseIndex < ProjProperties.PhaseCount;
 end;
 
+procedure TProjectData.OpenForSignOnline(const AFileName: string;
+  APhaseIndex: Integer);
+begin
+  FProjectID := -1;
+  UnZipFile(AFileName, TempPath);
+  FConnection.Open(MainFileName);
+  UpdateProjectDataBase;
+  FProjProperties.Open(FConnection.Connection);
+  UpdateOldData;
+  FBillsData.Open(FConnection.Connection);
+  FBillsCompileData.Open;
+  FDealPaymentData.Open(FConnection.Connection);
+  FBGLData.Open(FConnection.Connection);
+  if ProjProperties.PhaseCount > 0 then
+  begin
+    if (APhaseIndex <= ProjProperties.PhaseCount) and (APhaseIndex > 0) then
+      FPhaseIndex := APhaseIndex
+    else
+      FPhaseIndex := ProjProperties.PhaseCount;
+    FPhaseData.SimpleOpen2(Format('%sPhase%d.dat', [TempPath, FPhaseIndex]));
+  end;
+  FBillsMeasureData.ResetTreeNodeStageRec;
+end;
+
+function TProjectData.GetStartMeasure: Boolean;
+begin
+  Result := ProjProperties.PhaseCount > 0;
+end;
+
 end.

+ 5 - 0
Units/ProjectProperty.pas

@@ -83,6 +83,7 @@ type
     FReportShowState: Boolean;
     FReportShowStateWithoutReply: Boolean;
     FReportShowStateText: string;
+    FDealPhase: string;
 
     function GetBoolPropertyDef(const AName: string; ADef: Boolean): Boolean;
     function GetIntPropertyDef(const AName: string; ADef: Integer): Integer;
@@ -190,6 +191,8 @@ type
     property LoadLength: Double read FLoadLength write FLoadLength;
     // 났돛鑒
     property LaneCount: Integer read FLaneCount write FLaneCount;
+    // 북谿묏퍅
+    property DealPhase: string read FDealPhase write FDealPhase;
 
     {북谿連마}
     property ContractPrice: Double read FContractPrice write SetContractPrice;
@@ -509,6 +512,7 @@ begin
   FEndPeg := GetStrPropertyDef('EndPeg', '');
   FLoadLength := GetFloatPropertyDef('LoadLength', 0);
   FLaneCount := GetIntPropertyDef('LaneCount', 0);
+  FDealPhase := GetStrPropertyDef('DealPhase', '');
 end;
 
 procedure TProjProperties.LoadViewProperties;
@@ -601,6 +605,7 @@ begin
   FPropertyInqurity.Value['EndPeg'] := FEndPeg;
   FPropertyInqurity.Value['LoadLength'] := FLoadLength;
   FPropertyInqurity.Value['LaneCount'] := FLaneCount;
+  FPropertyInqurity.Value['DealPhase'] := FDealPhase;
 end;
 
 procedure TProjProperties.SetAuditCompany(const Value: string);

+ 22 - 4
Units/UtilMethods.pas

@@ -4,7 +4,8 @@ interface
 
 uses
   Controls, ZhAPI, ActnList, ZjIDTree, DB, ZjGridDBA, ZjGrid, Windows, Messages,
-  sdDB, VCLZip, VCLUnZip, Dialogs, Forms, ShlObj, Classes, StrUtils, Math, ADODB;
+  sdDB, VCLZip, VCLUnZip, Dialogs, Forms, ShlObj, Classes, StrUtils, Math, ADODB,
+  IdGlobal;
 
 type
   TBookmarkRefreshEvent = procedure (AExpandFrame: Boolean) of object;
@@ -636,11 +637,11 @@ begin
       else
         sError := Copy(sgs[i], iError, Length(sgs[i])-iError+1);
       if iError = 0 then
-        Result := Result + Format('%4d', [iNum]) + Format('%-3s', [sError])
+        Result := Result + Format('%4d', [iNum]) + Format('%-4s', [sError])
       else if iNum = 0 then
-        Result := Result + '9999' + Format('%3s', [sError])
+        Result := Result + '9999' + Format('%-4s', [sError])
       else
-        Result := Result + Format('%4d', [iNum]) + Format('%-3s', [sError]);
+        Result := Result + Format('%4d', [iNum]) + Format('%-4s', [sError]);
     end;
   finally
     sgs.Free;
@@ -870,13 +871,25 @@ begin
 end;
 
 {Zip}
+function ZipComplete(const AFileName: string): Boolean;
+var
+  iSize1, iSize2: Integer;
+begin
+  iSize1 := FileSizeByName(AFileName);
+  Sleep(200);
+  iSize2 := FileSizeByName(AFileName);
+  Result := iSize1 = iSize2;
+end;
+
 procedure ZipFolder(AFileFolder, AFileName: string);
 var
   sTempFile: string;
   vZip: TVCLZip;
+  iCount: Integer;
 begin
   sTempFile := GetTempFileName;
   vZip := TVCLZip.Create(nil);
+  iCount := 0;
   try
     vZip.FilesList.Clear;
     vZip.ZipName := sTempFile;
@@ -887,6 +900,11 @@ begin
     //vZip.RecreateDirs := True;
     vZip.FilesList.Add(AFileFolder + '\*.*');
     vZip.Zip;
+    while not ZipComplete(sTempFile) and (iCount < 10) do
+    begin
+      Sleep(200);
+      Inc(iCount);
+    end;
     CopyFileOrFolder(sTempFile, AFileName);
   finally
     vZip.Free;