Get the App
SLTechnology News&Howtos  ›  Development  › 

How does JavaScript create an approval page

Shulou Source: shulou.com Published: 2022-06-01 04:46:43 10月02日 Update

This article mainly explains "how to create an approval page for JavaScript". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to create an approval page in JavaScript.

Create an approval page

1. Add the module directory under the src/pages/processCheck directory of the OA frontend project. All approval pages used to store your module. Add the corresponding examination and approval file under the corresponding directory

2. Introduce the page into the to-do list page

The component name of the approval page must be consistent before and after it is always introduced as a component on the taskList page.

3. Jump to the corresponding approval page

Id: corresponding business id

RouteName: corresponds to the name of the page component.

II. Examination and approval page style and approval return function

1. Refer to invoiceApplyAudit style on the approval page.

Page data in dataInfo if there is no data in dataInfo, check whether there is a problem with the init method.

Init () {/ / initialization information

If (this.businessId = ='') {

Return

}

Const url = this.url +'/ business_app_info/business/' + this.businessId

Let fields = XM.ajax.get.call (this, url)

Fields

.then (res = > {

This.dataInfo = res.data.data

This.probableProcess = res.data.probableProcess

This.processInstDetail = res.data.processInstDetail

})

.catch (err = > {

This.$_consoleUtils.err (err)

This.$message.error ('['+ err.status +']'+ err.msg)

})

}

2. The method of approval or return

Check (eCommerce isPass) {/ / agree or disagree

Console.log (this.completeParam)

This.completeParam.businessId = this.businessId

This.completeParam.isRatify = isPass

/ / complete the task according to the process instance id

XM.ajax

.put (this.url +'/ execute', this.completeParam)

.then (res = > {

This.auditResult = res.data.auditResult

This.$message.success (res.msg)

})

.catch (err = > {

This.$_consoleUtils.err (err)

This.$message.error ('['+ err.status +']'+ err.msg)

})

}

At this point, I believe you have a deeper understanding of "how to create an approval page for JavaScript". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Page method catalog component content name data style module learning practical deeper consistent business task information interest front end function instance Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology MariaDB MySQL vpn macOS