Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
liexin_supplier
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d770f77b
authored
Aug 11, 2023
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修改字眼
parent
1b585a74
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
17 deletions
app/Http/Controllers/Api/SupplierAccountApiController.php
app/Http/Controllers/SupplierAccountController.php
app/Http/Controllers/SupplierApplyController.php
app/Http/Services/SupplierApplyService.php
resources/views/script/SupplierAccountListScript.blade.php
resources/views/script/SupplierSubAccountListScript.blade.php
app/Http/Controllers/Api/SupplierAccountApiController.php
View file @
d770f77b
...
@@ -135,7 +135,7 @@ class SupplierAccountApiController extends Controller
...
@@ -135,7 +135,7 @@ class SupplierAccountApiController extends Controller
$this
->
response
(
-
1
,
'禁用失败'
,
$result
);
$this
->
response
(
-
1
,
'禁用失败'
,
$result
);
}
}
//获取
供应商
账号
//获取
芯链
账号
public
function
GetSupplierAccount
(
$request
)
public
function
GetSupplierAccount
(
$request
)
{
{
$id
=
$request
->
input
(
'id'
);
$id
=
$request
->
input
(
'id'
);
...
@@ -143,7 +143,7 @@ class SupplierAccountApiController extends Controller
...
@@ -143,7 +143,7 @@ class SupplierAccountApiController extends Controller
$account
=
SupplierAccountModel
::
where
(
'id'
,
$id
)
->
first
()
->
toArray
();
$account
=
SupplierAccountModel
::
where
(
'id'
,
$id
)
->
first
()
->
toArray
();
$logService
=
new
LogService
();
$logService
=
new
LogService
();
$temp
=
(
$type
==
'mobile'
)
?
'账号'
:
'密码'
;
$temp
=
(
$type
==
'mobile'
)
?
'账号'
:
'密码'
;
$content
=
$request
->
user
->
name
.
' 查看了
供应商
账号的'
.
$temp
;
$content
=
$request
->
user
->
name
.
' 查看了
芯链
账号的'
.
$temp
;
$logService
->
AddLog
(
$account
[
'supplier_id'
],
LogModel
::
VIEW_OPERATE
,
'查看供应商基本资料'
,
$content
);
$logService
->
AddLog
(
$account
[
'supplier_id'
],
LogModel
::
VIEW_OPERATE
,
'查看供应商基本资料'
,
$content
);
$this
->
response
(
0
,
'ok'
,
$account
);
$this
->
response
(
0
,
'ok'
,
$account
);
}
}
...
...
app/Http/Controllers/SupplierAccountController.php
View file @
d770f77b
...
@@ -44,8 +44,8 @@ class SupplierAccountController extends Controller
...
@@ -44,8 +44,8 @@ class SupplierAccountController extends Controller
//操作日志列表
//操作日志列表
public
function
SupplierAccountList
(
$request
)
public
function
SupplierAccountList
(
$request
)
{
{
$this
->
data
[
'title'
]
=
'
供应商
账号列表'
;
$this
->
data
[
'title'
]
=
'
芯链
账号列表'
;
return
$this
->
view
(
'
供应商
账号列表'
);
return
$this
->
view
(
'
芯链
账号列表'
);
}
}
public
function
AddSupplierAccount
(
$request
)
public
function
AddSupplierAccount
(
$request
)
...
@@ -62,8 +62,8 @@ class SupplierAccountController extends Controller
...
@@ -62,8 +62,8 @@ class SupplierAccountController extends Controller
$supplierCodes
[
$supplier
[
'supplier_code'
]]
=
$supplier
[
'supplier_name'
]
.
'('
.
$supplier
[
'supplier_code'
]
.
')'
;
$supplierCodes
[
$supplier
[
'supplier_code'
]]
=
$supplier
[
'supplier_name'
]
.
'('
.
$supplier
[
'supplier_code'
]
.
')'
;
}
}
$this
->
data
[
'supplierCodes'
]
=
$supplierCodes
;
$this
->
data
[
'supplierCodes'
]
=
$supplierCodes
;
$this
->
data
[
'title'
]
=
'添加
供应商
账号'
;
$this
->
data
[
'title'
]
=
'添加
芯链
账号'
;
return
$this
->
view
(
'添加
供应商
账号'
);
return
$this
->
view
(
'添加
芯链
账号'
);
}
}
public
function
UpdateSupplierAccount
(
$request
)
public
function
UpdateSupplierAccount
(
$request
)
...
@@ -83,9 +83,9 @@ class SupplierAccountController extends Controller
...
@@ -83,9 +83,9 @@ class SupplierAccountController extends Controller
$supplierCodes
[
$supplier
[
'supplier_code'
]]
=
$supplier
[
'supplier_name'
]
.
'('
.
$supplier
[
'supplier_code'
]
.
')'
;
$supplierCodes
[
$supplier
[
'supplier_code'
]]
=
$supplier
[
'supplier_name'
]
.
'('
.
$supplier
[
'supplier_code'
]
.
')'
;
}
}
$this
->
data
[
'supplierCodes'
]
=
$supplierCodes
;
$this
->
data
[
'supplierCodes'
]
=
$supplierCodes
;
$this
->
data
[
'title'
]
=
'编辑
供应商
账号'
;
$this
->
data
[
'title'
]
=
'编辑
芯链
账号'
;
$this
->
data
[
'account'
]
=
$account
;
$this
->
data
[
'account'
]
=
$account
;
return
$this
->
view
(
'编辑
供应商
账号'
);
return
$this
->
view
(
'编辑
芯链
账号'
);
}
}
//子账号列表
//子账号列表
...
...
app/Http/Controllers/SupplierApplyController.php
View file @
d770f77b
...
@@ -43,8 +43,8 @@ class SupplierApplyController extends Controller
...
@@ -43,8 +43,8 @@ class SupplierApplyController extends Controller
public
function
SupplierApplyList
(
$request
)
public
function
SupplierApplyList
(
$request
)
{
{
$this
->
data
[
'auditUidList'
]
=
SupplierApplyModel
::
pluck
(
'audit_name'
,
'audit_uid'
)
->
toArray
();
$this
->
data
[
'auditUidList'
]
=
SupplierApplyModel
::
pluck
(
'audit_name'
,
'audit_uid'
)
->
toArray
();
$this
->
data
[
'title'
]
=
'
供应商
账号列表'
;
$this
->
data
[
'title'
]
=
'
芯链
账号列表'
;
return
$this
->
view
(
'
供应商
账号列表'
);
return
$this
->
view
(
'
芯链
账号列表'
);
}
}
public
function
AuditSupplierApply
(
$request
)
public
function
AuditSupplierApply
(
$request
)
...
...
app/Http/Services/SupplierApplyService.php
View file @
d770f77b
...
@@ -89,7 +89,7 @@ class SupplierApplyService
...
@@ -89,7 +89,7 @@ class SupplierApplyService
if
(
$result
)
{
if
(
$result
)
{
if
(
$status
==
SupplierApplyModel
::
STATUS_PASS
)
{
if
(
$status
==
SupplierApplyModel
::
STATUS_PASS
)
{
$existAccount
=
SupplierAccountModel
::
where
(
'supplier_code'
,
$apply
[
'supplier_code'
])
->
exists
();
$existAccount
=
SupplierAccountModel
::
where
(
'supplier_code'
,
$apply
[
'supplier_code'
])
->
exists
();
//如果没有
供应商账号,那么就要新增供应商
账号
//如果没有
芯链账号,那么就要新增芯链
账号
if
(
$existAccount
)
{
if
(
$existAccount
)
{
SupplierAccountModel
::
where
(
'supplier_code'
,
$apply
[
'supplier_code'
])
->
update
([
SupplierAccountModel
::
where
(
'supplier_code'
,
$apply
[
'supplier_code'
])
->
update
([
'mobile'
=>
$apply
[
'mobile'
],
'mobile'
=>
$apply
[
'mobile'
],
...
...
resources/views/script/SupplierAccountListScript.blade.php
View file @
d770f77b
...
@@ -70,9 +70,9 @@
...
@@ -70,9 +70,9 @@
let
checkStatus
=
table
.
checkStatus
(
'supplierAccountList'
);
let
checkStatus
=
table
.
checkStatus
(
'supplierAccountList'
);
let
data
=
checkStatus
.
data
;
let
data
=
checkStatus
.
data
;
if
(
!
data
.
length
)
{
if
(
!
data
.
length
)
{
layer
.
msg
(
'请先选择要操作的
供应商
账号'
,
{
icon
:
5
})
layer
.
msg
(
'请先选择要操作的
芯链
账号'
,
{
icon
:
5
})
}
else
{
}
else
{
layer
.
confirm
(
'确定要启用该
供应商
账号吗?'
,
function
(
index
)
{
layer
.
confirm
(
'确定要启用该
芯链
账号吗?'
,
function
(
index
)
{
let
id
=
data
[
0
].
id
;
let
id
=
data
[
0
].
id
;
let
res
=
ajax
(
'/api/supplier_account/EnableSupplierAccount'
,
{
id
:
id
})
let
res
=
ajax
(
'/api/supplier_account/EnableSupplierAccount'
,
{
id
:
id
})
if
(
res
.
err_code
===
0
)
{
if
(
res
.
err_code
===
0
)
{
...
@@ -91,9 +91,9 @@
...
@@ -91,9 +91,9 @@
let
checkStatus
=
table
.
checkStatus
(
'supplierAccountList'
);
let
checkStatus
=
table
.
checkStatus
(
'supplierAccountList'
);
let
data
=
checkStatus
.
data
;
let
data
=
checkStatus
.
data
;
if
(
!
data
.
length
)
{
if
(
!
data
.
length
)
{
layer
.
msg
(
'请先选择要操作的
供应商
账号'
,
{
icon
:
5
})
layer
.
msg
(
'请先选择要操作的
芯链
账号'
,
{
icon
:
5
})
}
else
{
}
else
{
layer
.
confirm
(
'确定要禁用该
供应商
账号吗?'
,
function
(
index
)
{
layer
.
confirm
(
'确定要禁用该
芯链
账号吗?'
,
function
(
index
)
{
let
id
=
data
[
0
].
id
;
let
id
=
data
[
0
].
id
;
let
res
=
ajax
(
'/api/supplier_account/DisableSupplierAccount'
,
{
id
:
id
})
let
res
=
ajax
(
'/api/supplier_account/DisableSupplierAccount'
,
{
id
:
id
})
if
(
res
.
err_code
===
0
)
{
if
(
res
.
err_code
===
0
)
{
...
@@ -113,7 +113,7 @@
...
@@ -113,7 +113,7 @@
type
:
2
,
type
:
2
,
content
:
'/supplier_account/AddSupplierAccount?view=iframe'
,
content
:
'/supplier_account/AddSupplierAccount?view=iframe'
,
area
:
[
'800px'
,
'600px'
],
area
:
[
'800px'
,
'600px'
],
title
:
'添加
供应商
账号'
,
title
:
'添加
芯链
账号'
,
end
:
function
()
{
end
:
function
()
{
table
.
reload
(
'supplierAccountList'
);
table
.
reload
(
'supplierAccountList'
);
// supplierStatistics();
// supplierStatistics();
...
...
resources/views/script/SupplierSubAccountListScript.blade.php
View file @
d770f77b
...
@@ -146,7 +146,7 @@
...
@@ -146,7 +146,7 @@
type
:
2
,
type
:
2
,
content
:
'/supplier_account/SaveSupplierSubAccount?view=iframe&account_id='
+
getQueryVariable
(
'account_id'
),
content
:
'/supplier_account/SaveSupplierSubAccount?view=iframe&account_id='
+
getQueryVariable
(
'account_id'
),
area
:
[
'70%'
,
'80%'
],
area
:
[
'70%'
,
'80%'
],
title
:
'添加
供应商
账号'
,
title
:
'添加
芯链
账号'
,
end
:
function
()
{
end
:
function
()
{
table
.
reload
(
'supplierSubAccountList'
);
table
.
reload
(
'supplierSubAccountList'
);
}
}
...
...
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