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
170c60cd
Commit
170c60cd
authored
Mar 11, 2020
by
孙亚楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dd
parent
90508b49
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
104 additions
and
23 deletions
+104
-23
xggsve-invoice/app/base/db/impl/invoice/iinvoicestatusDao.js
+10
-0
xggsve-invoice/app/base/db/models/invoice/iinvoice.js
+2
-1
xggsve-invoice/app/base/db/models/invoice/iinvoiceinforeg.js
+13
-13
xggsve-invoice/app/base/db/models/invoice/iinvoicestatus.js
+67
-0
xggsve-invoice/app/base/service/impl/invoice/iinvoiceSve.js
+10
-7
xggsve-invoice/app/base/service/impl/invoice/iinvoiceinforegSve.js
+2
-2
xggsve-invoice/app/base/service/impl/invoice/iinvoicestatusSve.js
+0
-0
No files found.
xggsve-invoice/app/base/db/impl/invoice/iinvoicestatusDao.js
0 → 100644
View file @
170c60cd
const
system
=
require
(
"../../../system"
);
const
Dao
=
require
(
"../../dao.base"
);
class
IInvoicestatusDao
extends
Dao
{
constructor
()
{
super
(
Dao
.
getModelName
(
IInvoicestatusDao
));
}
}
module
.
exports
=
IInvoicestatusDao
;
xggsve-invoice/app/base/db/models/invoice/iinvoice.js
View file @
170c60cd
...
@@ -43,13 +43,14 @@ module.exports = (db, DataTypes) => {
...
@@ -43,13 +43,14 @@ module.exports = (db, DataTypes) => {
mail_mobile
:
{
type
:
DataTypes
.
STRING
(
20
),
allowNull
:
true
,
defaultValue
:
null
,
COMMENT
:
'邮寄电话'
},
mail_mobile
:
{
type
:
DataTypes
.
STRING
(
20
),
allowNull
:
true
,
defaultValue
:
null
,
COMMENT
:
'邮寄电话'
},
mail_to
:
{
type
:
DataTypes
.
STRING
(
20
),
allowNull
:
true
,
defaultValue
:
null
,
COMMENT
:
'邮寄人'
},
mail_to
:
{
type
:
DataTypes
.
STRING
(
20
),
allowNull
:
true
,
defaultValue
:
null
,
COMMENT
:
'邮寄人'
},
statements
:
{
type
:
DataTypes
.
STRING
(
45
),
allowNull
:
true
,
defaultValue
:
null
,
COMMENT
:
'结算单'
},
statements
:
{
type
:
DataTypes
.
STRING
(
45
),
allowNull
:
true
,
defaultValue
:
null
,
COMMENT
:
'结算单'
},
invoice_img
:
{
type
:
DataTypes
.
STRING
(
500
),
allowNull
:
true
,
defaultValue
:
null
},
invoice_img
:
{
type
:
DataTypes
.
STRING
(
500
),
allowNull
:
true
,
defaultValue
:
null
,
COMMENT
:
'发票图片'
},
invoice_deliver_id
:{
type
:
DataTypes
.
STRING
(
32
),
allowNull
:
true
,
defaultValue
:
null
,
comment
:
"交付id i_invoice_deliver 表ID"
},
invoice_deliver_id
:{
type
:
DataTypes
.
STRING
(
32
),
allowNull
:
true
,
defaultValue
:
null
,
comment
:
"交付id i_invoice_deliver 表ID"
},
deliver_id
:{
type
:
DataTypes
.
STRING
(
32
),
allowNull
:
true
,
defaultValue
:
null
,
comment
:
"交付商ID common下的交付商ID"
},
deliver_id
:{
type
:
DataTypes
.
STRING
(
32
),
allowNull
:
true
,
defaultValue
:
null
,
comment
:
"交付商ID common下的交付商ID"
},
bd_id
:{
type
:
DataTypes
.
STRING
(
32
),
allowNull
:
true
,
defaultValue
:
null
,
comment
:
"业务员Id"
},
bd_id
:{
type
:
DataTypes
.
STRING
(
32
),
allowNull
:
true
,
defaultValue
:
null
,
comment
:
"业务员Id"
},
bd_path
:{
type
:
DataTypes
.
STRING
(
200
),
allowNull
:
true
,
defaultValue
:
null
,
comment
:
"业务员权限"
},
bd_path
:{
type
:
DataTypes
.
STRING
(
200
),
allowNull
:
true
,
defaultValue
:
null
,
comment
:
"业务员权限"
},
channel_id
:{
type
:
DataTypes
.
STRING
(
32
),
allowNull
:
true
,
delaultValue
:
''
,
comment
:
"渠道ID"
},
channel_id
:{
type
:
DataTypes
.
STRING
(
32
),
allowNull
:
true
,
delaultValue
:
''
,
comment
:
"渠道ID"
},
product_id
:{
type
:
DataTypes
.
STRING
(
32
),
allowNull
:
true
,
delaultValue
:
''
,
comment
:
"商品ID"
},
product_id
:{
type
:
DataTypes
.
STRING
(
32
),
allowNull
:
true
,
delaultValue
:
''
,
comment
:
"商品ID"
},
status
:
{
type
:
DataTypes
.
INTEGER
,
field
:
'status'
,
allowNull
:
true
,
comment
:
'订单状态 业务进度'
},
created_at
:
{
type
:
DataTypes
.
DATE
,
field
:
'created_at'
,
allowNull
:
false
,
defaultValue
:
DataTypes
.
NOW
},
created_at
:
{
type
:
DataTypes
.
DATE
,
field
:
'created_at'
,
allowNull
:
false
,
defaultValue
:
DataTypes
.
NOW
},
updated_at
:
{
type
:
DataTypes
.
DATE
,
field
:
'updated_at'
,
allowNull
:
false
,
defaultValue
:
DataTypes
.
NOW
},
updated_at
:
{
type
:
DataTypes
.
DATE
,
field
:
'updated_at'
,
allowNull
:
false
,
defaultValue
:
DataTypes
.
NOW
},
deleted_at
:
{
type
:
DataTypes
.
DATE
,
allowNull
:
true
},
deleted_at
:
{
type
:
DataTypes
.
DATE
,
allowNull
:
true
},
...
...
xggsve-invoice/app/base/db/models/invoice/iinvoiceinforeg.js
View file @
170c60cd
...
@@ -4,19 +4,19 @@
...
@@ -4,19 +4,19 @@
*/
*/
module
.
exports
=
function
(
db
,
DataTypes
)
{
module
.
exports
=
function
(
db
,
DataTypes
)
{
return
db
.
define
(
'iinvoiceinforeg'
,
{
return
db
.
define
(
'iinvoiceinforeg'
,
{
invoice_id
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
'订单号'
},
// invoice_id: { type: DataTypes.STRING, allowNull: true, comment: '订单号'
},
deliver_id
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
'交付商id'
},
deliver_id
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
'交付商id'
},
deliver_name
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
'交付商名称'
},
deliver_name
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
'交付商名称'
},
deliver_divide
:
{
type
:
DataTypes
.
BIGINT
,
allowNull
:
true
,
comment
:
'订单分成'
},
deliver_divide
:
{
type
:
DataTypes
.
BIGINT
,
allowNull
:
true
,
comment
:
'订单分成'
},
deliver_mail_addr
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
'交付地址'
},
deliver_mail_addr
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
'交付地址'
},
deliver_mail_to
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
'收件人'
},
deliver_mail_to
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
'收件人'
},
deliver_mail_mobile
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
'联系电话'
},
deliver_mail_mobile
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
'联系电话'
},
audit_content
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
'交付审核内容'
},
audit_content
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
'交付审核内容 /审核备注'
},
deliver_content
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
'交付内容'
},
deliver_content
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
'交付内容'
},
deliver_mail_no
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
'交付商交付快递单号'
},
deliver_mail_no
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
'交付商交付快递单号'
},
deliver_img
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
'交接单'
},
deliver_img
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
comment
:
'交接单'
},
operator_id
:
{
type
:
DataTypes
.
INTEGER
,
allowNull
:
true
,
comment
:
'交付商业务员id'
},
operator_id
:
{
type
:
DataTypes
.
INTEGER
,
allowNull
:
true
,
comment
:
'交付商业务员id'
},
audit_result
:
{
type
:
DataTypes
.
STRING
,
field
:
'audit_result'
,
allowNull
:
true
,
defaultValue
:
''
,
comment
:
'审核结果'
},
created_at
:
{
type
:
DataTypes
.
DATE
,
field
:
'created_at'
,
allowNull
:
false
,
defaultValue
:
DataTypes
.
NOW
},
created_at
:
{
type
:
DataTypes
.
DATE
,
field
:
'created_at'
,
allowNull
:
false
,
defaultValue
:
DataTypes
.
NOW
},
updated_at
:
{
type
:
DataTypes
.
DATE
,
field
:
'updated_at'
,
allowNull
:
false
,
defaultValue
:
DataTypes
.
NOW
},
updated_at
:
{
type
:
DataTypes
.
DATE
,
field
:
'updated_at'
,
allowNull
:
false
,
defaultValue
:
DataTypes
.
NOW
},
deleted_at
:
{
type
:
DataTypes
.
DATE
,
field
:
'deleted_at'
,
allowNull
:
true
},
deleted_at
:
{
type
:
DataTypes
.
DATE
,
field
:
'deleted_at'
,
allowNull
:
true
},
...
...
xggsve-invoice/app/base/db/models/invoice/iinvoicestatus.js
0 → 100644
View file @
170c60cd
const
system
=
require
(
"../../../system"
);
const
settings
=
require
(
"../../../../config/settings"
);
const
uiconfig
=
system
.
getUiConfig2
(
settings
.
appKey
);
const
moment
=
require
(
'moment'
)
/**
* 发表申请表
*/
module
.
exports
=
(
db
,
DataTypes
)
=>
{
return
db
.
define
(
"iinvoicestatus"
,
{
// id: { type: DataTypes.STRING(32), allowNull: true, comment: "" },
channel_id
:
{
type
:
DataTypes
.
STRING
(
32
),
allowNull
:
true
,
defaultValue
:
""
,
COMMENT
:
'渠道id'
},
province
:
{
type
:
DataTypes
.
STRING
(
10
),
allowNull
:
true
,
comment
:
"发票对应省份"
},
invoice_type
:
{
type
:
DataTypes
.
STRING
(
4
),
allowNull
:
true
,
comment
:
'发票类型 10 增值税专用发票 20 增值税普通发票 30 普通发票'
},
invoice_join
:
{
type
:
DataTypes
.
STRING
(
4
),
allowNull
:
true
,
comment
:
'发票联次 10 记账联 20 发票联 30 抵扣联 40 销售方次'
},
invoice_no
:
{
type
:
DataTypes
.
STRING
(
20
),
allowNull
:
true
,
delaultValue
:
""
,
comment
:
"发票代码"
},
invoice_number
:
{
type
:
DataTypes
.
STRING
(
20
),
allowNull
:
true
,
delaultValue
:
""
,
comment
:
"发票号码"
},
invoice_time
:
{
type
:
DataTypes
.
DATE
,
allowNull
:
true
,
delaultValue
:
null
,
comment
:
"开票日期"
},
merchant_id
:
{
type
:
DataTypes
.
STRING
(
32
),
allowNull
:
true
,
defaultValue
:
""
,
COMMENT
:
'购买方商户id'
},
merchant_name
:
{
type
:
DataTypes
.
STRING
(
45
),
allowNull
:
false
,
COMMENT
:
'购买方名称'
},
merchant_credit_code
:
{
type
:
DataTypes
.
STRING
(
45
),
allowNull
:
false
,
COMMENT
:
'购买方纳税人识别号'
},
merchant_addr
:
{
type
:
DataTypes
.
STRING
(
45
),
allowNull
:
false
,
COMMENT
:
'购买方地址'
},
merchant_mobile
:
{
type
:
DataTypes
.
STRING
(
45
),
allowNull
:
false
,
COMMENT
:
'购买方电话'
},
merchant_bank
:
{
type
:
DataTypes
.
STRING
(
45
),
allowNull
:
false
,
COMMENT
:
'购买方开户行'
},
merchant_account
:
{
type
:
DataTypes
.
STRING
(
45
),
allowNull
:
false
,
COMMENT
:
'银行账号'
},
businessmen_type
:
{
type
:
DataTypes
.
STRING
(
4
),
allowNull
:
true
,
defaultValue
:
""
,
COMMENT
:
'销售方类型 10 个体工商户 20 自然人'
},
businessmen_id
:
{
type
:
DataTypes
.
STRING
(
32
),
allowNull
:
false
,
COMMENT
:
'销售商id'
},
businessmen_credit_code
:
{
type
:
DataTypes
.
STRING
(
45
),
allowNull
:
false
,
COMMENT
:
'销售方社会统一信用代码'
},
businessmen_name
:
{
type
:
DataTypes
.
STRING
(
45
),
allowNull
:
true
,
defaultValue
:
""
},
businessmen_addr
:
{
type
:
DataTypes
.
STRING
(
45
),
allowNull
:
false
,
COMMENT
:
'销售方地址'
},
businessmen_mobile
:
{
type
:
DataTypes
.
STRING
(
45
),
allowNull
:
false
,
COMMENT
:
'销售方电话'
},
businessmen_bank
:
{
type
:
DataTypes
.
STRING
(
45
),
allowNull
:
false
,
COMMENT
:
'销售方开户行'
},
businessmen_account
:
{
type
:
DataTypes
.
STRING
(
45
),
allowNull
:
false
,
COMMENT
:
'销售方银行账号'
},
apply_no
:
{
type
:
DataTypes
.
STRING
(
45
),
allowNull
:
true
,
defaultValue
:
""
,
COMMENT
:
'发票申请编号'
},
apply_time
:
{
type
:
DataTypes
.
DATE
,
allowNull
:
true
,
defaultValue
:
null
,
COMMENT
:
'发票申请时间'
},
invoice_amount
:
{
type
:
DataTypes
.
INTEGER
,
allowNull
:
true
,
defaultValue
:
0
,
COMMENT
:
'价税合计总金额'
},
invoice_content
:
{
type
:
DataTypes
.
STRING
(
300
),
allowNull
:
false
,
defaultValue
:
null
,
COMMENT
:
'开票内容'
},
contract
:
{
type
:
DataTypes
.
STRING
(
500
),
allowNull
:
true
,
delaultValue
:
""
,
COMMENT
:
'合同'
},
personal_invoice_tax
:
{
type
:
DataTypes
.
INTEGER
,
allowNull
:
false
,
defaultValue
:
null
,
COMMENT
:
'个税'
},
additional_tax
:
{
type
:
DataTypes
.
INTEGER
,
allowNull
:
false
,
defaultValue
:
null
,
COMMENT
:
'附加税'
},
value_added_tax
:
{
type
:
DataTypes
.
INTEGER
,
allowNull
:
false
,
defaultValue
:
null
,
COMMENT
:
'增值税'
},
mail_addr
:
{
type
:
DataTypes
.
STRING
(
200
),
allowNull
:
true
,
defaultValue
:
null
,
COMMENT
:
'邮寄地址'
},
mail_mobile
:
{
type
:
DataTypes
.
STRING
(
20
),
allowNull
:
true
,
defaultValue
:
null
,
COMMENT
:
'邮寄电话'
},
mail_to
:
{
type
:
DataTypes
.
STRING
(
20
),
allowNull
:
true
,
defaultValue
:
null
,
COMMENT
:
'邮寄人'
},
statements
:
{
type
:
DataTypes
.
STRING
(
45
),
allowNull
:
true
,
defaultValue
:
null
,
COMMENT
:
'结算单'
},
invoice_img
:
{
type
:
DataTypes
.
STRING
(
500
),
allowNull
:
true
,
defaultValue
:
null
},
invoice_deliver_id
:{
type
:
DataTypes
.
STRING
(
32
),
allowNull
:
true
,
defaultValue
:
null
,
comment
:
"交付id i_invoice_deliver 表ID"
},
deliver_id
:{
type
:
DataTypes
.
STRING
(
32
),
allowNull
:
true
,
defaultValue
:
null
,
comment
:
"交付商ID common下的交付商ID"
},
bd_id
:{
type
:
DataTypes
.
STRING
(
32
),
allowNull
:
true
,
defaultValue
:
null
,
comment
:
"业务员Id"
},
bd_path
:{
type
:
DataTypes
.
STRING
(
200
),
allowNull
:
true
,
defaultValue
:
null
,
comment
:
"业务员权限"
},
channel_id
:{
type
:
DataTypes
.
STRING
(
32
),
allowNull
:
true
,
delaultValue
:
''
,
comment
:
"渠道ID"
},
product_id
:{
type
:
DataTypes
.
STRING
(
32
),
allowNull
:
true
,
delaultValue
:
''
,
comment
:
"商品ID"
},
status
:
{
type
:
DataTypes
.
INTEGER
,
field
:
'status'
,
allowNull
:
true
,
comment
:
'订单状态 业务进度'
},
created_at
:
{
type
:
DataTypes
.
DATE
,
field
:
'created_at'
,
allowNull
:
false
,
defaultValue
:
DataTypes
.
NOW
},
updated_at
:
{
type
:
DataTypes
.
DATE
,
field
:
'updated_at'
,
allowNull
:
false
,
defaultValue
:
DataTypes
.
NOW
},
deleted_at
:
{
type
:
DataTypes
.
DATE
,
allowNull
:
true
},
},
{
timestamps
:
false
,
paranoid
:
true
,
tableName
:
'i_invoice'
,
comment
:
'发票表'
,
charset
:
'utf8'
,
collate
:
'utf8_general_ci'
,
version
:
true
});
}
\ No newline at end of file
xggsve-invoice/app/base/service/impl/invoice/iinvoiceSve.js
View file @
170c60cd
...
@@ -128,14 +128,17 @@ class IInvoiceService extends ServiceBase {
...
@@ -128,14 +128,17 @@ class IInvoiceService extends ServiceBase {
_invoice
.
mail_addr
=
this
.
trim
(
params
.
mail_addr
)
||
""
;
_invoice
.
mail_addr
=
this
.
trim
(
params
.
mail_addr
)
||
""
;
try
{
try
{
_invoice
=
await
this
.
dao
.
create
(
_invoice
);
await
this
.
db
.
transaction
(
async
t
=>
{
_invoice
=
await
this
.
dao
.
create
(
_invoice
);
let
processList
=
await
this
.
buildProcess
(
_invoice
.
product_id
)
||
[];
_iinvoiceinforeg
=
await
this
.
iinvoiceinforegDao
.
create
({
id
:
_invoice
.
id
},
t
);
for
(
let
process
of
processList
)
{
let
processList
=
await
this
.
buildProcess
(
_invoice
.
product_id
)
||
[];
process
.
invoice_id
=
_invoice
.
id
;
for
(
let
process
of
processList
)
{
}
process
.
invoice_id
=
_invoice
.
id
;
}
await
this
.
iinvoiceprocessDao
.
model
.
bulkCreate
(
processList
);
});
await
this
.
iinvoiceprocessDao
.
model
.
bulkCreate
(
processList
);
return
system
.
getResult
(
`success`
);
return
system
.
getResult
(
`success`
);
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
error
);
console
.
log
(
error
);
...
...
xggsve-invoice/app/base/service/impl/invoice/iinvoiceinforegSve.js
View file @
170c60cd
...
@@ -8,4 +8,4 @@ class IInvoiceinforegService extends ServiceBase {
...
@@ -8,4 +8,4 @@ class IInvoiceinforegService extends ServiceBase {
}
}
module
.
exports
=
IInvoiceprocessService
;
module
.
exports
=
IInvoiceinforegService
;
\ No newline at end of file
\ No newline at end of file
xggsve-invoice/app/base/service/impl/invoice/iinvoicestatusSve.js
0 → 100644
View file @
170c60cd
This diff is collapsed.
Click to expand it.
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