Loading…

How to enable and use the order write-off function

#Create an order to indicate that the order can be written off When creating an order interface, you need to specify that the order supports write-off, otherwise the order will not support write-off. To create an order interface, you need to pass the following parameters to specify that the order supports write-off: ```javascript isCanHx: true ``` After specifying this parameter, the system will assign an exclusive write-off code to the generated order. The attribute name of the write-off code is: **hxNumber** # Generate and display the write-off code You can use any third-party component (including Baidu and GitHub) to display the verification code in the previous step wherever you want to display it, and prompt the user to show the verification code to the store clerk for verification (it can be a barcode display, a QR code display, etc., or directly display the verification code text) # Call the write-off interface to complete the write-off In the upper right corner of ["Front-end api interface document"] (#), you can search for "write-off" to find the write-off interface, and then write off by reading the write-off code. # How to enable store administrator authentication By default, any user can call write-off for write-off as long as they know the write-off code. In actual application scenarios, you may not want anyone to be able to write off orders. Orders in any store can only be written off by the administrator of that store. Then you only need to do the following to enable it: ## Enable authentication ![](https://dcdn.it120.cc/yuque/0/2020/png/572726/1608865189908-82b94667-e394-47b9-886b-ffec0485627c.png) ## Bind store administrator ![](https://dcdn.it120.cc/yuque/0/2020/png/572726/1608865270794-138ae678-57df-414c-a79f-df2c7752c30d.png) At this point, only the bound user number can call the write-off interface.