📄 mainmenu.mpr
字号:
* *********************************************************
* *
* * 06/18/04 MAINMENU.MPR 14:09:20
* *
* *********************************************************
* *
* * 作者名称
* *
* * 版权所有 (C) 2004 公司名称
* * 地址
* * 城市, 邮编
* * 国家
* *
* * 说明:
* * 此程序由 GENMENU 自动生成。
* *
* *********************************************************
* To attach this menu to your Top-Level form,
* call it from the Init event of the form:
* Syntax: DO <mprname> WITH <oFormRef> [,<cMenuname>|<lRename>][<lUniquePopups>]
* oFormRef - form object reference (THIS)
* cMenuname - name for menu (this is required for Append menus - see below)
* lRename - renames Name property of your form
* lUniquePopups - determines whether to generate unique ids for popup names
* example:
* PROCEDURE Init
* DO mymenu.mpr WITH THIS,.T.
* ENDPROC
* Use the optional 2nd parameter if you plan on running multiple instances
* of your Top-Level form. The preferred method is to create an empty string
* variable and pass it by reference so you can receive the form name after
* the MPR file is run. You can later use this reference to destroy the menu.
* PROCEDURE Init
* LOCAL cGetMenuName
* cGetMenuName = ""
* DO mymenu.mpr WITH THIS, m.cGetMenuName
* ENDPROC
* The logical lRename parameter will change the name property of your
* form to the same name given the menu and may cause conflicts in your
* code if you directly reference the form by name.
* You will also need to remove the menu when the form is destroyed so that it does
* not remain in memory unless you wish to reactivate it later in a new form.
* If you passed the optional lRename parameter as .T. as in the above example,
* you can easily remove the menu in the form's Destroy event as shown below.
* This strategy is ideal when using multiple instances of Top-Level forms.
* example:
* PROCEDURE Destroy
* RELEASE MENU (THIS.Name) EXTENDED
* ENDPROC
* Using Append/Before/After location options:
* You might want to append a menu to an existing Top-Level form by setting
* the Location option in the General Options dialog. In order to do this, you
* must pass the name of the menu in which to attach the new one. The second
* parameter is required here. If you originally created the menu with the lRename
* parameter = .T., then you can update the menu with code similar to the following:
* example:
* DO mymenu2.mpr WITH THISFORM,THISFORM.name
*
* Using lUniquePopups:
* If you are running this menu multiple times in your application, such as in multiple
* instances of the same top-level form, you should pass .T. to the lUniquePopups
* parameter so that unique popup names are generated to avoid possible conflicts.
* example:
* PROCEDURE Init
* DO mymenu.mpr WITH THIS,.T.,.T.
* ENDPROC
*
* Note: Parm4-Parm9 are not reserved and freely available for use with your menu code.
*
LPARAMETERS oFormRef, getMenuName, lUniquePopups, parm4, parm5, parm6, parm7, parm8, parm9
LOCAL cMenuName, nTotPops, a_menupops, cTypeParm2, cSaveFormName
IF TYPE("m.oFormRef") # "O" OR ;
LOWER(m.oFormRef.BaseClass) # 'form' OR ;
m.oFormRef.ShowWindow # 2
MESSAGEBOX([只能从顶层表单调用该菜单。请确认您表单的 ShowWindow 属性已设为 2。阅读此菜单 MPR 文件的头部分,可以获得详细信息。])
RETURN
ENDIF
m.cTypeParm2 = TYPE("m.getMenuName")
m.cMenuName = SYS(2015)
m.cSaveFormName = m.oFormRef.Name
IF m.cTypeParm2 = "C" OR (m.cTypeParm2 = "L" AND m.getMenuName)
m.oFormRef.Name = m.cMenuName
ENDIF
IF m.cTypeParm2 = "C" AND !EMPTY(m.getMenuName)
m.cMenuName = m.getMenuName
ENDIF
DIMENSION a_menupops[5]
IF TYPE("m.lUniquePopups")="L" AND m.lUniquePopups
FOR nTotPops = 1 TO ALEN(a_menupops)
a_menupops[m.nTotPops]= SYS(2015)
ENDFOR
ELSE
a_menupops[1]="工资管理"
a_menupops[2]="入库管理"
a_menupops[3]="销售管理"
a_menupops[4]="查询日明细"
a_menupops[5]="系统管理"
ENDIF
* *********************************************************
* *
* * 菜单定义
* *
* *********************************************************
*
DEFINE MENU (m.cMenuName) IN (m.oFormRef.Name) BAR
DEFINE PAD _19i0uc9cm OF (m.cMenuName) PROMPT "工资管理" COLOR SCHEME 3 ;
SKIP FOR user!="admin"
DEFINE PAD _19i0uc9cs OF (m.cMenuName) PROMPT "入库管理" COLOR SCHEME 3
DEFINE PAD _19i0uc9ct OF (m.cMenuName) PROMPT "销售管理" COLOR SCHEME 3
DEFINE PAD _19i0uc9cu OF (m.cMenuName) PROMPT "系统管理" COLOR SCHEME 3
ON PAD _19i0uc9cm OF (m.cMenuName) ACTIVATE POPUP (a_menupops[1])
ON PAD _19i0uc9cs OF (m.cMenuName) ACTIVATE POPUP (a_menupops[2])
ON PAD _19i0uc9ct OF (m.cMenuName) ACTIVATE POPUP (a_menupops[3])
ON PAD _19i0uc9cu OF (m.cMenuName) ACTIVATE POPUP (a_menupops[5])
DEFINE POPUP (a_menupops[1]) MARGIN RELATIVE SHADOW COLOR SCHEME 4
DEFINE BAR 1 OF (a_menupops[1]) PROMPT "工资维护"
DEFINE BAR 2 OF (a_menupops[1]) PROMPT "工资计算"
DEFINE BAR 3 OF (a_menupops[1]) PROMPT "税率表管理"
ON SELECTION BAR 1 OF (a_menupops[1]) do form geform
ON SELECTION BAR 2 OF (a_menupops[1]) do form gebjsform
ON SELECTION BAR 3 OF (a_menupops[1]) do form slkform
DEFINE POPUP (a_menupops[2]) MARGIN RELATIVE SHADOW COLOR SCHEME 4
DEFINE BAR 1 OF (a_menupops[2]) PROMPT "入库单头管理"
DEFINE BAR 2 OF (a_menupops[2]) PROMPT "入库单明细"
DEFINE BAR 3 OF (a_menupops[2]) PROMPT "商品预警查询"
ON SELECTION BAR 1 OF (a_menupops[2]) do form rkdtform
ON SELECTION BAR 2 OF (a_menupops[2]) do form rkmxform
ON SELECTION BAR 3 OF (a_menupops[2]) do form spyjcx
DEFINE POPUP (a_menupops[3]) MARGIN RELATIVE SHADOW COLOR SCHEME 4
DEFINE BAR 1 OF (a_menupops[3]) PROMPT "现金收款"
DEFINE BAR 2 OF (a_menupops[3]) PROMPT "查询日明细"
DEFINE BAR 3 OF (a_menupops[3]) PROMPT "日销售结帐"
DEFINE BAR 4 OF (a_menupops[3]) PROMPT "查询月明细"
ON SELECTION BAR 1 OF (a_menupops[3]) ;
DO _19i0uc9cv ;
IN LOCFILE("小型超市管理系统\MAINMENU" ,"MPX;MPR|FXP;PRG" ,"WHERE is MAINMENU?")
ON BAR 2 OF (a_menupops[3]) ACTIVATE POPUP (a_menupops[4])
ON SELECTION BAR 3 OF (a_menupops[3]) ;
DO _19i0uc9cw ;
IN LOCFILE("小型超市管理系统\MAINMENU" ,"MPX;MPR|FXP;PRG" ,"WHERE is MAINMENU?")
ON SELECTION BAR 4 OF (a_menupops[3]) do form rxymxform
DEFINE POPUP (a_menupops[4]) MARGIN RELATIVE SHADOW COLOR SCHEME 4
DEFINE BAR 1 OF (a_menupops[4]) PROMPT "销售单据查询"
DEFINE BAR 2 OF (a_menupops[4]) PROMPT "销售单据汇总查询"
ON SELECTION BAR 1 OF (a_menupops[4]) do form rxdjcxform
ON SELECTION BAR 2 OF (a_menupops[4]) do form rxrmxform
DEFINE POPUP (a_menupops[5]) MARGIN RELATIVE SHADOW COLOR SCHEME 4
DEFINE BAR 1 OF (a_menupops[5]) PROMPT "商品编码" ;
SKIP FOR user!="admin"
DEFINE BAR 2 OF (a_menupops[5]) PROMPT "用户管理" ;
SKIP FOR user!="admin"
DEFINE BAR 3 OF (a_menupops[5]) PROMPT "修改口令"
DEFINE BAR 4 OF (a_menupops[5]) PROMPT "更换操作员"
DEFINE BAR 5 OF (a_menupops[5]) PROMPT "退出"
ON SELECTION BAR 1 OF (a_menupops[5]) do form spjbform
ON SELECTION BAR 2 OF (a_menupops[5]) do form userform
ON SELECTION BAR 3 OF (a_menupops[5]) do form editklform
ON SELECTION BAR 4 OF (a_menupops[5]) do form ghuserform
ON SELECTION BAR 5 OF (a_menupops[5]) quit
ACTIVATE MENU (m.cMenuName) NOWAIT
IF m.cTypeParm2 = "C"
m.getMenuName = m.cMenuName
m.oFormRef.Name = m.cSaveFormName
ENDIF
* *********************************************************
* *
* * _19I0UC9CV ON SELECTION BAR 1 OF POPUP 销售管理
* *
* * Procedure Origin:
* *
* * From Menu: MAINMENU.MPR, Record: 15
* * Called By: ON SELECTION BAR 1 OF POPUP 销售管理
* * Prompt: 现金收款
* * Snippet: 1
* *
* *********************************************************
*
PROCEDURE _19i0uc9cv
sele 1
use rxsdtb
set order to dh
locate for xsrq!=date()
if found()
messagebox("还有今天以前没有结帐的数据,请先结帐",16,"操作提示")
use in rxsdtb
retu
endif
go bottom
if eof()
sele 2
use yxsmxb
set order to xsrq
seek date()
if !found()
mdh=1
else
set order to xsrqdh
go bottom
mdh=dh+1
endif
use in yxsmxb
else
mdh=dh+1
endif
insert into rxsdtb value(date(),mdh,m.user)
use in rxsdtb
do form spxsform
retu
* *********************************************************
* *
* * _19I0UC9CW ON SELECTION BAR 3 OF POPUP 销售管理
* *
* * Procedure Origin:
* *
* * From Menu: MAINMENU.MPR, Record: 20
* * Called By: ON SELECTION BAR 3 OF POPUP 销售管理
* * Prompt: 日销售结帐
* * Snippet: 2
* *
* *********************************************************
*
PROCEDURE _19i0uc9cw
msg="日销售数据结帐后不"+chr(13)+chr(27)+"能恢复,是不结帐?"
yn=messagebox(msg,33,"操作提示")
if yn=2
retu
endif
sele 1
use rxsmxb excl
sele 2
use rxsdtb excl
sele 3
use yxsmxb excl
appe from rxsmxb
sele rxsdtb
xsrq_=xsrq
sele yxsmxb
repl all xsrq with xsrq_ for empt(xsrq)
use
sele rxsdtb
zap
use
sele rxsmxb
zap
use
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -