A convenient method, device, and storage medium for setting form default values
By using the DropInfo plug-in generated by encapsulated JavaScript scripts in the ERP system, combined with the data table and the default value setting interface, it solves the difficulty of users setting default values on the form, and achieves flexible and convenient default value settings and a good interactive experience.
Patent Information
- Application Number
- CN202210242548.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-11
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2042-03-11
AI Technical Summary
The prior art is difficult to enable different users to flexibly and conveniently set the default values of the service help field on fixed forms or custom extended forms, especially in terms of setting the service field by sub-users and two-level linkage.
By encapsulating the JavaScript script, generate the DropInfo plugin, and bind it to the web form help. Add data tables to store the current system user ID, current operation ID, field name, and field value information, and automatically pop up the default value setting interface according to the user's operations, supporting default value settings for users and two-level linkage business fields.
It realizes that different users can set the default values of the business help field on fixed forms or customized extended forms flexibly and conveniently, and supports the default values of the two-level linkage business field, which is simple to operate, intuitive and has good interactive experience.
Smart Images

Figure CN114880609B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer front-end, and in particular to a method, device, and storage medium for conveniently setting form default values. Background Art
[0002] As the business of various enterprises continues to expand and the business volume continues to increase, enterprise business personnel have to handle a large number of businesses on a daily basis and fill in a large number of business documents in the ERP system. When filling in the business help field information of the form, for some fields that can be fixed or have commonly used business data, there is an urgent need to conveniently set the default values of the form help fields, so as to minimize repeated data input, reduce input costs, improve document preparation efficiency, and improve the interactive experience.
[0003] In the prior art, there are many ways to implement the default value setting of form help. Some systems provide a separate form default value setting function, some systems set the form help data default value through a parameter setting function, some systems provide a default value setting button in the form function toolbar, and some systems provide collections or data hyperlinks to set default values in the data list opened in the business field help.
[0004] Some do not support setting default values for form help fields by user, and different users have different data permissions, making it impossible to provide detailed settings by user. Some do not support the more complex two-level linkage business field default settings. Some settings are not intuitive, difficult to use, and the interactive experience is not friendly. It is impossible to flexibly set field default values or cancel default values on the current business document with one click. Summary of the invention
[0005] The present application provides a method, device, and storage medium for conveniently setting form default values, which solves the technical problem that it is difficult for different users to flexibly set form default values.
[0006] A convenient method for setting form default values, including:
[0007] Generate a DropInfo plug-in by encapsulating the JavaScript script;
[0008] Binding the plug-in to the web form helper;
[0009] Add a data table, and store the current system user ID, current operation ID, field name, and field value information in the data table; the data table includes a primary value field and a secondary value field;
[0010] Obtaining a primary value field and a secondary value field according to the current system user ID, the current operation ID, and the field name, and binding the primary value field to a first-level business field default value, and binding the secondary value field to a second-level business field default value;
[0011] According to the user clicking the business field help in the web form, the default value setting is determined.
[0012] In one embodiment of the present application, the method of generating a DropInfo plug-in by encapsulating a JavaScript script specifically includes: defining properties of the DropInfo plug-in; and defining a callback function of the plug-in.
[0013] In one embodiment of the present application, the method also includes: creating a DropPanel panel object; binding a Web form business help field to a DropInfo plug-in, defining field values, buttons, and a "set default value" button and a "cancel default value" callback function for the corresponding business help field; and calling a server-side component method according to the callback function.
[0014] In one embodiment of the present application, the definition of DropInfo plug-in properties specifically includes: defining the form element to which the modal box is attached, the default width, height, buttons, and style of the prompt box.
[0015] In one embodiment of the present application, the definition of the callback function of the plug-in specifically includes: defining a callback function before the default value panel of the plug-in is opened, a callback function when the default value panel is opened, a callback function after the default value panel is opened, and a callback function for closing the default value panel.
[0016] In one embodiment of the present application, the method also includes: when the system automatically closes the help interface, a default value setting interface pops up above the business field; receiving a user click on Set as Default in the default value setting interface, determining that the data selected in the current business help field is the default value; detecting whether the mouse focus falls on the business help field, and if so, automatically popping up a default value setting interface; receiving a user click on Cancel Default in the default value setting interface to cancel the default value setting.
[0017] In one embodiment of the present application, calling the server component method according to the callback function specifically includes: calling the server method by setting the default value function to store the default value of the current user's specific business field; calling the server method by canceling the default value function to delete the default value storage of the current user's specific business field.
[0018] In an embodiment of the present application, the creating of the DropPanel panel object specifically includes: creating a panel including a content area and a button area.
[0019] A convenient device for setting form default values, comprising:
[0020] at least one processor; and,
[0021] a memory communicatively connected to the at least one processor; wherein,
[0022] The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:
[0023] Generate a DropInfo plug-in by encapsulating the JavaScript script;
[0024] Binding the plug-in to the web form helper;
[0025] Add a data table, and store the current system user ID, current operation ID, field name, and field value information in the data table; the data table includes a primary value field and a secondary value field;
[0026] Obtaining a primary value field and a secondary value field according to the current system user ID, the current operation ID, and the field name, and binding the primary value field to a first-level business field default value, and binding the secondary value field to a second-level business field default value;
[0027] According to the user clicking the business field help in the web form, the default value setting is determined.
[0028] A non-volatile storage medium storing computer executable instructions, wherein the computer executable instructions are configured to:
[0029] Generate a DropInfo plug-in by encapsulating the JavaScript script;
[0030] Binding the plug-in to the web form helper;
[0031] Add a data table, and store the current system user ID, current operation ID, field name, and field value information in the data table; the data table includes a primary value field and a secondary value field;
[0032] Obtaining a primary value field and a secondary value field according to the current system user ID, the current operation ID, and the field name, and binding the primary value field to a first-level business field default value, and binding the secondary value field to a second-level business field default value;
[0033] According to the user clicking the business field help in the web form, the default value setting is determined.
[0034] The present application provides a method, device, and storage medium for conveniently setting form default values, which include at least the following beneficial effects: by installing a plug-in in a web page, it can support users to flexibly and conveniently set default values for business help fields on fixed forms and custom extended forms; by setting a data table, it can support two-level linkage business field default value setting, making user operation simple, intuitive, and interactive The experience is good. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0036] Figure 1 A schematic diagram of the steps of a method for conveniently setting default values of a form provided in an embodiment of the present application;
[0037] Figure 2 A technical architecture diagram of the ERP system form that helps to conveniently set default values provided in the embodiment of the present application. ;
[0038] Figure 3 The form provided in the embodiment of the present application helps to set the default value and cancel the default value effect diagram;
[0039] Figure 4 A structural diagram of a device for conveniently setting default values of a form provided in an embodiment of the present application. DETAILED DESCRIPTION
[0040] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be described clearly and completely in conjunction with the specific embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0041] In response to the problem that the current ERP system forms cannot allow different users to flexibly and conveniently set the default values of business help fields or cancel the default values on fixed forms and custom extended forms, this application encapsulates the JavaScript script into a plug-in, binds it to the form business help field, and combines the background data structure support and business data processing to enable different users to conveniently set the default values of form help fields. After the user selects the business field data, the default value setting interface will automatically pop up for the user to set, and it supports two-level linkage business field default value setting, which is simple to operate, intuitive and visible, and has a good interactive experience. The following is a detailed explanation.
[0042] Figure 1A schematic diagram of a method for conveniently setting a form default value provided in an embodiment of the present application may include the following steps:
[0043] S101: Generate a DropInfo plug-in by encapsulating the JavaScript script.
[0044] In one embodiment of the present application, a JavaScript script is used to encapsulate the web form help into a plug-in. (1) Define the DropInfo plug-in and plug-in properties, define the form elements to which the modal box is attached, the default width, height, buttons, style, etc. of the prompt box. (2) Define the callback function of the plug-in, define the callback function before the default value panel of the plug-in is opened, the callback function when the default value panel is opened, the callback function after the default value panel is opened, the callback function for closing the default value panel, etc. (3) Create a DropPanel panel object: create a panel, including a content area and a button area. (4) Bind the Web form business help field to the DropInfo plug-in, define the field value, button and "set default value" button and "cancel default value" callback function of the corresponding business help field. (5) Call the server-side component method according to the callback function: call the server-side method through the set default value function to store the default value of the current user's specific business field; call the server-side method through the cancel default value function to delete the default value storage of the current user's specific business field.
[0045] S102: Binding the plug-in to the web form helper.
[0046] In one embodiment of the present application, Figure 2 The following is a technical architecture diagram for conveniently setting default values for form help in the ERP system. Create a DropPanel panel through the DropInfo plug-in, bind the plug-in to the web form help, and the user can call the DropInfo plug-in to set or cancel the default value through the web form operation, and then store the user's settings in the database.
[0047] S103: Add a data table, and store the current system user ID, current operation ID, field name, and field value information in the data table; the data table includes a primary value field and a secondary value field.
[0048] Specifically, in order to support the problem of setting default values for business fields based on users and functional operations, a data table is added to store the current system user ID, current operation ID, field name, and field value information. This allows the current system user to set the default value for the business help field in the current functional operation and store the data persistently. The next time a form is filled out, the corresponding field value is obtained based on the current system user ID, current operation ID, and field name and bound to the business field. This can effectively reduce repeated data input and improve form making efficiency.
[0049] The data table structure is as follows:
[0050]
[0051]
[0052] S104: Obtain the primary value field and the secondary value field according to the current system user ID, the current operation ID, and the field name, and bind the primary value field to the first-level business field default value, and bind the secondary value field to the second-level business field default value.
[0053] Specifically, to support the setting of default values for two-level linkage business fields, the default values for the first-level business fields are stored in the primary value fields in the above data tables, and the default values for the second-level business fields are stored in the secondary value fields. For example, for fund center and payment unit, the fund center field is stored in the primary value field after the default value is set, and the payment unit field is stored in the secondary value field after the default value is set. The next time you fill out a form, you can obtain the primary and secondary value field data based on the current system user ID, current operation ID, and field name, bind the primary value field value to the first-level business field, and bind the secondary value field value to the second-level business field, so that the default value setting for two-level linkage business fields can be achieved.
[0054] S105: Determine the default value setting according to the user clicking the business field help in the web form.
[0055] In one embodiment of the present application, after the system automatically closes the help interface, a default value setting interface pops up above the business field; the user clicks Set as Default in the default value setting interface to determine that the data selected in the current business help field is the default value; it is detected whether the mouse focus falls on the business help field, and if so, the default value setting interface pops up automatically; the user clicks Cancel Default in the default value setting interface to cancel the default value setting.
[0056] Specifically, to meet the user's needs for conveniently setting default values, making operations intuitive and visible, and improving the interactive experience.
[0057] like Figure 3The following is the effect diagram of setting and canceling the default value in the form help. The concept of "setting as you select" is reflected in the interactive experience level. It supports users to select and confirm data by opening the business help field, and the default value setting interface will pop up immediately above the business field after the system automatically closes the help interface. When the user clicks [Set as Default], the data selected in the current business help field can be set as the default value. It also supports users to place the mouse focus on the business help field to automatically pop up the default value setting interface for setting the default value. For business help fields with default values set, users place the mouse focus on the field to automatically pop up the default value setting interface, and users can click [Cancel Default] to cancel the default value setting.
[0058] The concept of "highlighting the key points" is reflected at the intuitive display level. The background of the default value setting interface is light blue, and the data set as the default value is displayed in black font with a larger font. The label "Defaulted" is displayed on the right with a blue background and white font, and the words [Set as default] and [Cancel default] are displayed in blue. When the mouse is pointed over, the mouse pointer turns into a small hand, prompting the user to click to operate the setting, which greatly improves the user's operation perception.
[0059] The above is a convenient method for setting default values of a form provided by an embodiment of the present application. Based on the same inventive idea, an embodiment of the present application also provides a corresponding convenient device for setting default values of a form, such as Figure 2 shown.
[0060] This embodiment provides a device for conveniently setting a form default value, including:
[0061] at least one processor; and,
[0062] a memory communicatively connected to at least one processor; wherein,
[0063] The memory stores instructions executable by at least one processor, the instructions being executed by at least one processor to enable the at least one processor to:
[0064] Generate a DropInfo plug-in by encapsulating the JavaScript script;
[0065] Bind the plugin to the web form helper;
[0066] Add a data table and store the current system user ID, current operation ID, field name, and field value information in the data table; the data table includes primary value fields and secondary value fields;
[0067] Get the primary value field and the secondary value field according to the current system user ID, the current operation ID, and the field name, and bind the primary value field to the default value of the first-level business field, and bind the secondary value field to the default value of the second-level business field;
[0068] Determine the default value settings based on user clicks in business field help in web forms.
[0069] Based on the same idea, some embodiments of the present application also provide a medium corresponding to the above method.
[0070] Some embodiments of the present application provide a storage medium for conveniently setting default values of a form, which stores computer executable instructions, and the computer executable instructions are set as follows:
[0071] Generate a DropInfo plug-in by encapsulating the JavaScript script;
[0072] Bind the plugin to the web form helper;
[0073] Add a data table and store the current system user ID, current operation ID, field name, and field value information in the data table; the data table includes primary value fields and secondary value fields;
[0074] Get the primary value field and the secondary value field according to the current system user ID, the current operation ID, and the field name, and bind the primary value field to the default value of the first-level business field, and bind the secondary value field to the default value of the second-level business field;
[0075] Determine the default value settings based on user clicks in business field help in web forms.
[0076] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the method and medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0077] The methods and media provided in the embodiments of the present application correspond one-to-one to the method, and therefore, the methods and media also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the methods and media will not be repeated here.
[0078] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or method including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or method. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or method including the elements.
[0079] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A convenient method for setting form default values, characterized in that: include: Generate a DropInfo plug-in by encapsulating the JavaScript script; Binding the plug-in to the web form helper; Add a data table, and store the current system user ID, current operation ID, field name, and field value information in the data table; the data table includes a primary value field and a secondary value field; Obtaining a primary value field and a secondary value field according to the current system user ID, the current operation ID, and the field name, and binding the primary value field to a first-level business field default value, and binding the secondary value field to a second-level business field default value; Determining a default value setting based on a user clicking on a business field help in the web form; The method of generating a DropInfo plug-in by encapsulating the JavaScript script specifically includes: Define the DropInfo plugin properties; Define the callback function of the plugin; The definition of DropInfo plug-in properties specifically includes: Define the form elements and default width, height, buttons, and styles of the prompt box to which the modal box is attached; The callback function of defining the plug-in specifically includes: Define the callback function before the default value panel of the plug-in is opened, the callback function when the default value panel is opened, the callback function after the default value panel is opened, and the callback function for closing the default value panel; The method further comprises: Create a DropPanel panel object; Bind the Web form business help field to the DropInfo plug-in, define the field value, button, "Set Default Value" button, and "Cancel Default Value" callback function of the corresponding business help field; Call the server component method according to the callback function; The calling of the server component method according to the callback function specifically includes: Call the server method by setting the default value function to store the default value of the current user's specific business field; Call the server method by canceling the default value function to delete the default value storage of the current user's specific business field.
2. The method according to claim 1, characterized in that The method further comprises: When the system automatically closes the help interface, the default value setting interface pops up above the business field; Receive a user click on Set as Default in the default value setting interface to determine that the data selected in the current business help field is the default value; Detect whether the mouse focus is on the business help field. If so, the default value setting interface will pop up automatically; The receiving user clicks Cancel Default in the default value setting interface to cancel the default value setting.
3. The method according to claim 1, characterized in that The creation of the DropPanel panel object specifically includes: Create a panel, including the content area and button area.
4. A device for conveniently setting form default values, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a method for conveniently setting form default values as described in any one of claims 1 to 3.
5. A non-volatile storage medium storing computer executable instructions, characterized in that: The computer executable instructions can execute a method for conveniently setting form default values as described in any one of claims 1 to 3 above.