Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How does JavaScript create an approval page

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report