Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
1cc03026
Commit
1cc03026
authored
May 12, 2020
by
孙亚楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dd
parent
25f7cfce
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
128 additions
and
0 deletions
+128
-0
xgg-saas-merchant/app/base/service/impl/saas/invoiceSve.js
+10
-0
xgg-saas-merchant/app/base/wxapplet/impl/merchantApplet.js
+37
-0
xgg-saas-merchant/app/front/entry/public/apidoc/applet/order.md
+81
-0
No files found.
xgg-saas-merchant/app/base/service/impl/saas/invoiceSve.js
View file @
1cc03026
...
...
@@ -92,5 +92,14 @@ class InvoiceService extends ServiceBase {
let
rs
=
await
this
.
callms
(
"order"
,
"updateItemInvoice"
,
params
);
return
rs
;
}
/**
*
* @param params
* @returns {Promise<void>}
*/
async
invoiceBycreditCode
(
params
){
return
await
this
.
callms
(
"invoice"
,
"invoiceBycreditCode"
,
params
);
}
}
module
.
exports
=
InvoiceService
;
\ No newline at end of file
xgg-saas-merchant/app/base/wxapplet/impl/merchantApplet.js
View file @
1cc03026
...
...
@@ -16,6 +16,8 @@ class MerchantApplet extends AppletBase {
this
.
merchantId
=
1
;
this
.
businessmenSve
=
system
.
getObject
(
"service.saas.businessmenSve"
);
this
.
tradeSve
=
system
.
getObject
(
"service.trade.tradeSve"
);
this
.
saasInvoiceSve
=
system
.
getObject
(
"service.saas.invoiceSve"
);
}
async
test
(
o
,
obj
,
req
)
{
...
...
@@ -306,6 +308,40 @@ class MerchantApplet extends AppletBase {
}
}
/**
* 发票管理
* @param pobj1
* @param pobj2
* @param req
* @returns {Promise<void>}
*/
async
invoiceBycreditCode
(
pobj1
,
pobj2
,
req
){
let
loginUser
=
await
this
.
getLoginUser
(
pobj2
.
merchant_id
,
pobj2
.
openid
);
pobj2
.
merchant_app_user_id
=
loginUser
.
id
;
pobj2
.
attrs
=
[
"credit_code"
];
if
(
!
pobj2
.
merchant_app_user_id
){
return
system
.
getResult
(
null
,
`登录失效,请重新登录`
);
}
try
{
let
creditCodeArray
=
await
this
.
businessmenSve
.
assorderBusinessmenInfo
(
pobj2
);
if
(
creditCodeArray
.
status
!=
0
){
return
creditCodeArray
;
}
let
creditCodes
=
[];
for
(
let
val
of
creditCodeArray
.
data
)
{
creditCodes
.
push
(
val
.
credit_code
);
}
if
(
!
creditCodes
||
creditCodes
.
length
==
0
){
return
sys
.
getResult
([]);
}
pobj2
.
credit_code_array
=
creditCodes
;
return
await
this
.
saasInvoiceSve
.
invoiceBycreditCode
(
pobj2
);
}
catch
(
e
)
{
console
.
log
(
e
);
return
system
.
getResult
(
null
,
`系统错误`
);
}
}
}
module
.
exports
=
MerchantApplet
;
\ No newline at end of file
xgg-saas-merchant/app/front/entry/public/apidoc/applet/order.md
View file @
1cc03026
...
...
@@ -5,6 +5,7 @@
1.
[
订单详情
](
#orderInfo
)
1.
[
个体户管理/个体户详情
](
#saasorderbusinessmenPage
)
1.
[
转账交易
](
#saasTradeBusinessmenPage
)
1.
[
发票管理
](
#invoiceBycreditCode
)
## **<a name="idNoValid"> 身份证校验</a>**
[
返回到目录
](
#menu
)
##### URL
...
...
@@ -365,6 +366,86 @@
```
## **<a name="invoiceBycreditCode"> 发票管理</a>**
[
返回到目录
](
#menu
)
##### URL
[
/applet/merchantApplet/saasTradeBusinessmenPage
]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
```
javascript
{
"merchant_id"
:
"11249768207001229"
,
"openid"
:
"od1Y85NtLgV1tFdKsPUXV8LhMMzI"
,
"status"
:
"1060"
}
```
#### 返回结果
```
javascript
{
"status"
:
0
,
"msg"
:
"操作成功"
,
"data"
:
[
{
"from_name"
:
"孙亚楠首饰店"
,
"to_name"
:
"大森森金融有限公司"
,
"to_credit_code"
:
"DSSJRC123123"
,
"to_addr"
:
"狗熊岭"
,
"to_mobile"
:
"18833836392"
,
"to_bank"
:
"工商银行"
,
"to_account"
:
"DSSJR"
,
"invoice_time"
:
"2020-05-10 08:00:00"
,
"invoice_img"
:
"https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_wxapplet_1588990656115.jpg"
,
"invoice_amount"
:
1
,
"created_at"
:
"2020-05-09 10:03:21"
,
"status"
:
"1060"
,
"status_name"
:
"已完成"
},
{
"from_name"
:
"孙亚楠首饰店"
,
"to_name"
:
"大森森金融有限公司"
,
"to_credit_code"
:
"DSSJRC123123"
,
"to_addr"
:
"狗熊岭"
,
"to_mobile"
:
"18833836392"
,
"to_bank"
:
"工商银行"
,
"to_account"
:
"DSSJR"
,
"invoice_time"
:
"2020-05-09 08:00:00"
,
"invoice_img"
:
"https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_wxapplet_1589008890884.jpg"
,
"invoice_amount"
:
1
,
"created_at"
:
"2020-05-09 14:58:48"
,
"status"
:
"1060"
,
"status_name"
:
"已完成"
},
{
"from_name"
:
"孙亚楠首饰店"
,
"to_name"
:
"大森森金融有限公司"
,
"to_credit_code"
:
"DSSJRC123123"
,
"to_addr"
:
"狗熊岭"
,
"to_mobile"
:
"18833836392"
,
"to_bank"
:
"工商银行"
,
"to_account"
:
"DSSJR123"
,
"invoice_time"
:
"2020-05-08 08:00:00"
,
"invoice_img"
:
"https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_wxapplet_1588927248512.jpg"
,
"invoice_amount"
:
1
,
"created_at"
:
"2020-05-08 14:34:15"
,
"status"
:
"1060"
,
"status_name"
:
"已完成"
}
],
"bizmsg"
:
"empty"
,
"requestid"
:
"ee8443a2a2c74d88a68275b51c35eec7"
}
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment