main_gzsz_kqsz.frm
上传用户:wd52qq
上传日期:2022-07-24
资源大小:5366k
文件大小:14k
源码类别:

企业管理

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
  3. Begin VB.Form main_gzsz_kqsz 
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Form1"
  6.    ClientHeight    =   3825
  7.    ClientLeft      =   45
  8.    ClientTop       =   330
  9.    ClientWidth     =   8370
  10.    LinkTopic       =   "Form1"
  11.    MaxButton       =   0   'False
  12.    MinButton       =   0   'False
  13.    ScaleHeight     =   3825
  14.    ScaleWidth      =   8370
  15.    StartUpPosition =   2  '屏幕中心
  16.    Begin VB.CommandButton Command2 
  17.       Caption         =   "取消"
  18.       Height          =   390
  19.       Left            =   5190
  20.       TabIndex        =   10
  21.       Top             =   3225
  22.       Width           =   1575
  23.    End
  24.    Begin VB.CommandButton Command1 
  25.       Caption         =   "保存"
  26.       Height          =   390
  27.       Left            =   3360
  28.       TabIndex        =   9
  29.       Top             =   3225
  30.       Width           =   1575
  31.    End
  32.    Begin TabDlg.SSTab SSTab1 
  33.       Height          =   2925
  34.       Left            =   135
  35.       TabIndex        =   0
  36.       Top             =   120
  37.       Width           =   8025
  38.       _ExtentX        =   14155
  39.       _ExtentY        =   5159
  40.       _Version        =   393216
  41.       TabHeight       =   520
  42.       TabCaption(0)   =   "全勤奖设置"
  43.       TabPicture(0)   =   "main_gzsz_kqsz.frx":0000
  44.       Tab(0).ControlEnabled=   -1  'True
  45.       Tab(0).Control(0)=   "Frame2"
  46.       Tab(0).Control(0).Enabled=   0   'False
  47.       Tab(0).Control(1)=   "Frame1"
  48.       Tab(0).Control(1).Enabled=   0   'False
  49.       Tab(0).ControlCount=   2
  50.       TabCaption(1)   =   "旷工扣款设置"
  51.       TabPicture(1)   =   "main_gzsz_kqsz.frx":001C
  52.       Tab(1).ControlEnabled=   0   'False
  53.       Tab(1).Control(0)=   "Frame4"
  54.       Tab(1).ControlCount=   1
  55.       TabCaption(2)   =   "加班计费设置"
  56.       TabPicture(2)   =   "main_gzsz_kqsz.frx":0038
  57.       Tab(2).ControlEnabled=   0   'False
  58.       Tab(2).Control(0)=   "Frame3"
  59.       Tab(2).ControlCount=   1
  60.       Begin VB.Frame Frame4 
  61.          BorderStyle     =   0  'None
  62.          Height          =   2340
  63.          Left            =   -74880
  64.          TabIndex        =   23
  65.          Top             =   480
  66.          Width           =   7785
  67.          Begin VB.OptionButton optKG 
  68.             Caption         =   "不扣款"
  69.             Height          =   360
  70.             Index           =   0
  71.             Left            =   150
  72.             TabIndex        =   29
  73.             Top             =   375
  74.             Value           =   -1  'True
  75.             Width           =   945
  76.          End
  77.          Begin VB.OptionButton optKG 
  78.             Caption         =   "统一扣款方式    "
  79.             Height          =   360
  80.             Index           =   1
  81.             Left            =   150
  82.             TabIndex        =   28
  83.             Top             =   795
  84.             Width           =   1650
  85.          End
  86.          Begin VB.TextBox txtKGTY 
  87.             Height          =   330
  88.             Left            =   1860
  89.             TabIndex        =   27
  90.             Text            =   "0"
  91.             Top             =   795
  92.             Width           =   990
  93.          End
  94.          Begin VB.OptionButton optKG 
  95.             Caption         =   "核算方式"
  96.             Height          =   360
  97.             Index           =   2
  98.             Left            =   150
  99.             TabIndex        =   26
  100.             Top             =   1245
  101.             Width           =   1170
  102.          End
  103.          Begin VB.TextBox txtKGHS1 
  104.             Height          =   330
  105.             Index           =   0
  106.             Left            =   2535
  107.             TabIndex        =   25
  108.             Text            =   "0"
  109.             Top             =   1245
  110.             Width           =   990
  111.          End
  112.          Begin VB.TextBox txtKGHS1 
  113.             Height          =   330
  114.             Index           =   1
  115.             Left            =   5400
  116.             TabIndex        =   24
  117.             Text            =   "0"
  118.             Top             =   1245
  119.             Width           =   990
  120.          End
  121.          Begin VB.Label lblKGTY 
  122.             BackStyle       =   0  'Transparent
  123.             Caption         =   "元/每天"
  124.             Height          =   255
  125.             Left            =   2910
  126.             TabIndex        =   33
  127.             Top             =   855
  128.             Width           =   900
  129.          End
  130.          Begin VB.Label lblKGHS1 
  131.             BackStyle       =   0  'Transparent
  132.             Caption         =   "基本工资/"
  133.             Height          =   240
  134.             Index           =   0
  135.             Left            =   1620
  136.             TabIndex        =   32
  137.             Top             =   1320
  138.             Width           =   1695
  139.          End
  140.          Begin VB.Label lblKGHS1 
  141.             BackStyle       =   0  'Transparent
  142.             Caption         =   "天(月平均工作天数)*"
  143.             Height          =   240
  144.             Index           =   1
  145.             Left            =   3615
  146.             TabIndex        =   31
  147.             Top             =   1320
  148.             Width           =   1800
  149.          End
  150.          Begin VB.Label lblKGHS1 
  151.             BackStyle       =   0  'Transparent
  152.             Caption         =   "倍"
  153.             Height          =   240
  154.             Index           =   2
  155.             Left            =   6480
  156.             TabIndex        =   30
  157.             Top             =   1320
  158.             Width           =   240
  159.          End
  160.       End
  161.       Begin VB.Frame Frame3 
  162.          BorderStyle     =   0  'None
  163.          Height          =   2355
  164.          Left            =   -74895
  165.          TabIndex        =   11
  166.          Top             =   435
  167.          Width           =   7830
  168.          Begin VB.OptionButton optJB 
  169.             Caption         =   "统一方式"
  170.             Height          =   270
  171.             Index           =   0
  172.             Left            =   180
  173.             TabIndex        =   17
  174.             Top             =   390
  175.             Value           =   -1  'True
  176.             Width           =   1110
  177.          End
  178.          Begin VB.OptionButton optJB 
  179.             Caption         =   "核算方式"
  180.             Height          =   270
  181.             Index           =   1
  182.             Left            =   195
  183.             TabIndex        =   16
  184.             Top             =   930
  185.             Width           =   1095
  186.          End
  187.          Begin VB.TextBox txtJBTY1 
  188.             Height          =   330
  189.             Left            =   1515
  190.             TabIndex        =   15
  191.             Text            =   "0"
  192.             Top             =   360
  193.             Width           =   945
  194.          End
  195.          Begin VB.TextBox txtJBHS1 
  196.             Height          =   330
  197.             Index           =   0
  198.             Left            =   2370
  199.             TabIndex        =   14
  200.             Text            =   "0"
  201.             Top             =   855
  202.             Width           =   480
  203.          End
  204.          Begin VB.TextBox txtJBHS1 
  205.             Height          =   330
  206.             Index           =   1
  207.             Left            =   4635
  208.             TabIndex        =   13
  209.             Text            =   "0"
  210.             Top             =   855
  211.             Width           =   480
  212.          End
  213.          Begin VB.TextBox txtJBHS1 
  214.             Height          =   330
  215.             Index           =   2
  216.             Left            =   6885
  217.             TabIndex        =   12
  218.             Text            =   "0"
  219.             Top             =   855
  220.             Width           =   480
  221.          End
  222.          Begin VB.Label lblJBTY 
  223.             BackStyle       =   0  'Transparent
  224.             Caption         =   "元/每次"
  225.             Height          =   315
  226.             Left            =   2580
  227.             TabIndex        =   22
  228.             Top             =   420
  229.             Width           =   1710
  230.          End
  231.          Begin VB.Label lblJBHS1 
  232.             BackStyle       =   0  'Transparent
  233.             Caption         =   "基本工资/"
  234.             Height          =   225
  235.             Index           =   0
  236.             Left            =   1500
  237.             TabIndex        =   21
  238.             Top             =   930
  239.             Width           =   885
  240.          End
  241.          Begin VB.Label lblJBHS1 
  242.             BackStyle       =   0  'Transparent
  243.             Caption         =   "天(月平均工作天数)/"
  244.             Height          =   225
  245.             Index           =   1
  246.             Left            =   2895
  247.             TabIndex        =   20
  248.             Top             =   930
  249.             Width           =   1785
  250.          End
  251.          Begin VB.Label lblJBHS1 
  252.             BackStyle       =   0  'Transparent
  253.             Caption         =   "小时(每天工作时间)*"
  254.             Height          =   225
  255.             Index           =   2
  256.             Left            =   5145
  257.             TabIndex        =   19
  258.             Top             =   930
  259.             Width           =   1785
  260.          End
  261.          Begin VB.Label lblJBHS1 
  262.             BackStyle       =   0  'Transparent
  263.             Caption         =   "倍"
  264.             Height          =   225
  265.             Index           =   3
  266.             Left            =   7395
  267.             TabIndex        =   18
  268.             Top             =   930
  269.             Width           =   225
  270.          End
  271.       End
  272.       Begin VB.Frame Frame1 
  273.          Height          =   705
  274.          Left            =   120
  275.          TabIndex        =   1
  276.          Top             =   600
  277.          Width           =   7770
  278.          Begin VB.TextBox txtQQ 
  279.             Height          =   330
  280.             Index           =   0
  281.             Left            =   1245
  282.             TabIndex        =   2
  283.             Text            =   "0"
  284.             Top             =   285
  285.             Width           =   1095
  286.          End
  287.          Begin VB.Label lblQQ 
  288.             BackStyle       =   0  'Transparent
  289.             Caption         =   "全勤奖金额:             元"
  290.             Height          =   240
  291.             Index           =   0
  292.             Left            =   150
  293.             TabIndex        =   3
  294.             Top             =   360
  295.             Width           =   2520
  296.          End
  297.       End
  298.       Begin VB.Frame Frame2 
  299.          Height          =   1245
  300.          Left            =   120
  301.          TabIndex        =   4
  302.          Top             =   1185
  303.          Width           =   7770
  304.          Begin VB.TextBox txtQQ 
  305.             Height          =   330
  306.             Index           =   2
  307.             Left            =   1065
  308.             TabIndex        =   8
  309.             Text            =   "0"
  310.             Top             =   735
  311.             Width           =   1095
  312.          End
  313.          Begin VB.TextBox txtQQ 
  314.             Height          =   330
  315.             Index           =   1
  316.             Left            =   600
  317.             TabIndex        =   7
  318.             Text            =   "0"
  319.             Top             =   300
  320.             Width           =   1095
  321.          End
  322.          Begin VB.Label lblQQ 
  323.             BackStyle       =   0  'Transparent
  324.             Caption         =   "出勤              天以上可以领取全勤奖"
  325.             Height          =   225
  326.             Index           =   1
  327.             Left            =   150
  328.             TabIndex        =   6
  329.             Top             =   375
  330.             Width           =   3540
  331.          End
  332.          Begin VB.Label lblQQ 
  333.             BackStyle       =   0  'Transparent
  334.             Caption         =   "迟到或早退             次以上不能领取全勤奖"
  335.             Height          =   225
  336.             Index           =   2
  337.             Left            =   135
  338.             TabIndex        =   5
  339.             Top             =   810
  340.             Width           =   4005
  341.          End
  342.       End
  343.    End
  344. End
  345. Attribute VB_Name = "main_gzsz_kqsz"
  346. Attribute VB_GlobalNameSpace = False
  347. Attribute VB_Creatable = False
  348. Attribute VB_PredeclaredId = True
  349. Attribute VB_Exposed = False
  350. Dim rs As New ADODB.Recordset
  351. Sub GS()
  352.   If optKG(0).Value = True Then KGBH = 0
  353.   If optKG(1).Value = True Then KGBH = 1
  354.   If optKG(2).Value = True Then KGBH = 2
  355.   If optJB(0).Value = True Then JBBH = 0
  356.   If optJB(1).Value = True Then JBBH = 1
  357. End Sub
  358. Private Sub Command1_Click()
  359. '  Dim a
  360. '  rs.Open "考勤表", Cnn, adOpenKeyset, adLockOptimistic
  361. '  If rs.RecordCount > 0 Then
  362. '    a = IIf(rs.Fields("出勤天数") >= txtQQ(1) And rs.Fields("迟到或早退次数") <= txtQQ(2), txtQQ(0), 0)
  363. '  End If
  364. '  rs.Close
  365. '------------------------------------------
  366.   
  367.   Cnn.Execute ("update 工资公式表 set 公式=" + txtQQ(0) + " where 项目名称='全勤奖金额'")
  368.   Cnn.Execute ("update 工资公式表 set 公式=" + txtQQ(1) + " where 项目名称='出勤上限'")
  369.   Cnn.Execute ("update 工资公式表 set 公式=" + txtQQ(2) + " where 项目名称='迟到下限'")
  370.   If optKG(0).Value = True Then
  371.     KGBH = 0
  372.     Cnn.Execute ("update 工资公式表 set 公式=0 where 项目名称='旷工扣款方式编号'")
  373.   End If
  374.   If optKG(1).Value = True Then
  375.     KGBH = 1
  376.     Cnn.Execute ("update 工资公式表 set 公式=1 where 项目名称='旷工扣款方式编号'")
  377.     Cnn.Execute ("update 工资公式表 set 公式=" + txtKGTY + " where 项目名称='旷工扣款'")
  378.   End If
  379.   If optKG(2).Value = True Then
  380.     KGBH = 2
  381.     Cnn.Execute ("update 工资公式表 set 公式=2 where 项目名称='旷工扣款方式编号'")
  382.     Cnn.Execute ("update 工资公式表 set 公式=" + txtKGHS1(0) + " where 项目名称='旷工扣款天数'")
  383.     Cnn.Execute ("update 工资公式表 set 公式=" + txtKGHS1(1) + " where 项目名称='旷工倍数'")
  384.   End If
  385.   If optJB(0).Value = True Then
  386.     JBBH = 0
  387.     Cnn.Execute ("update 工资公式表 set 公式=0 where 项目名称='加班计费方式编号'")
  388.     Cnn.Execute ("update 工资公式表 set 公式=" + txtJBTY1 + " where 项目名称='加班费'")
  389.   End If
  390.   If optJB(1).Value = True Then
  391.     JBBH = 1
  392.     Cnn.Execute ("update 工资公式表 set 公式=1 where 项目名称='加班计费方式编号'")
  393.     Cnn.Execute ("update 工资公式表 set 公式=" + txtJBHS1(0) + " where 项目名称='加班计费天数'")
  394.     Cnn.Execute ("update 工资公式表 set 公式=" + txtJBHS1(1) + " where 项目名称='加班计费小时数'")
  395.     Cnn.Execute ("update 工资公式表 set 公式=" + txtJBHS1(2) + " where 项目名称='加班倍数'")
  396.   End If
  397. End Sub
  398. Private Sub Form_Load()
  399.   
  400.   If optKG(0).Value = True Then KGBH = 0
  401.   If optKG(1).Value = True Then KGBH = 1
  402.   If optKG(2).Value = True Then KGBH = 2
  403.   If optJB(0).Value = True Then JBBH = 0
  404.   If optJB(1).Value = True Then JBBH = 1
  405. End Sub