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
43b4a8ad
authored
May 28, 2026
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'ysx-CRM转化供应商流程-20260518' into Dev
parents
91cad978
bd1ca49f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
190 additions
and
14 deletions
.codewhale/instructions.md
app/Http/Controllers/Sync/SupplierSyncController.php
resources/views/script/ConfirmCrmSupplierScript.blade.php
.codewhale/instructions.md
0 → 100644
View file @
43b4a8ad
# Project Structure (Auto-generated)
> This file was automatically generated by CodeWhale.
> You can edit or delete it at any time.
**Summary:**
A JavaScript/Node.js project
**Tree:**
```
FILE: .augmentignore
DIR: .codebuddy
DIR: plans
FILE: .codeiumignore
FILE: .cursorignore
FILE: .env
FILE: .env.example
DIR: .git
FILE: COMMIT_EDITMSG
FILE: FETCH_HEAD
FILE: HEAD
FILE: ORIG_HEAD
DIR: branches
FILE: config
FILE: description
DIR: hooks
FILE: index
DIR: info
DIR: logs
DIR: objects
FILE: opencode
FILE: packed-refs
DIR: refs
FILE: .gitattributes
FILE: .gitignore
FILE: .gitmodules
DIR: app
DIR: Console
DIR: Events
DIR: Exceptions
DIR: Http
DIR: Jobs
DIR: Listeners
DIR: Model
DIR: Policies
DIR: Presenters
DIR: Providers
FILE: User.php
DIR: Utils
FILE: artisan
DIR: bootstrap
FILE: app.php
FILE: autoload.php
DIR: cache
FILE: composer.json
FILE: composer.lock
DIR: config
FILE: app.php
FILE: auth.php
FILE: broadcasting.php
FILE: cache.php
FILE: compile.php
FILE: database.php
FILE: dompdf.php
FILE: excel.php
FILE: field.php
FILE: filesystems.php
FILE: fixed.php
FILE: mail.php
FILE: perm.php
FILE: queue.php
FILE: services.php
FILE: session.php
FILE: sync.php
FILE: validate.php
FILE: view.php
FILE: website.php
DIR: database
FILE: .gitignore
DIR: factories
DIR: migrations
DIR: seeds
FILE: test_attachment_audit_flow.sql
DIR: docs
FILE: AttachmentAudit_Module_README.md
FILE: SupplierAuditCenter_Integration.md
FILE: curl测试语句.md
FILE: gulpfile.js
FILE: package.json
FILE: phpunit.xml
DIR: public
FILE: .htaccess
DIR: data
FILE: favicon.ico
DIR: fonts
DIR: images
FILE: index.php
DIR: js
DIR: plugins
FILE: robots.txt
FILE: web.config
FILE: readme.md
DIR: resources
DIR: assets
DIR: lang
DIR: views
FILE: server.php
DIR: tests
FILE: ExampleTest.php
FILE: TestCase.php
DIR: vendor
FILE: autoload.php
DIR: barryvdh
DIR: bin
DIR: classpreloader
DIR: composer
DIR: dnoegel
DIR: doctrine
DIR: dompdf
DIR: fzaninotto
DIR: guzzlehttp
DIR: hamcrest
DIR: jakub-onderka
DIR: jenssegers
DIR: jeremeamia
DIR: kylekatarnls
DIR: laravel
DIR: league
DIR: maatwebsite
DIR: mockery
DIR: mongodb
DIR: monolog
DIR: mtdowling
DIR: nesbot
DIR: nikic
DIR: paragonie
DIR: phenx
DIR: php-amqplib
DIR: phpdocumentor
DIR: phpoffice
DIR: phpspec
DIR: phpunit
DIR: predis
DIR: psr
DIR: psy
DIR: ralouphie
DIR: sabberworm
DIR: sebastian
DIR: swiftmailer
DIR: symfony
DIR: tijsverkoyen
DIR: vladimir-yuldashev
DIR: vlucas
DIR: webmozart
```
\ No newline at end of file
app/Http/Controllers/Sync/SupplierSyncController.php
View file @
43b4a8ad
...
@@ -200,8 +200,11 @@ class SupplierSyncController extends BaseSyncController
...
@@ -200,8 +200,11 @@ class SupplierSyncController extends BaseSyncController
]);
]);
// 然后更新供应商信息
// 然后更新供应商信息
$this
->
updateCrmSupplier
(
$existingSupplier
,
$data
);
$this
->
updateCrmSupplier
(
$existingSupplier
,
$data
);
$this
->
syncResponse
(
0
,
'CRM重新同步,状态已恢复为待确认并更新信息'
,
[
'supplier_id'
=>
$existingSupplier
[
'supplier_id'
]]);
// 重新发起审核流(addApproveForCustomerConvert 内部已处理幂等:旧单据终态时会创建新单据)
LogService
::
AddLog
(
$existingSupplier
[
'supplier_id'
],
LogModel
::
UPDATE_OPERATE
,
'CRM重新同步'
,
'CRM重新同步,状态已恢复为待确认并更新信息'
);
$auditService
=
new
SupplierAuditService
();
$auditService
->
addApproveForCustomerConvert
(
$existingSupplier
[
'supplier_id'
],
$data
[
'apply_uid'
],
'客户转化供应商审核'
);
$this
->
syncResponse
(
0
,
'CRM重新同步,状态已恢复为待确认并更新信息,已重新发起审核'
,
[
'supplier_id'
=>
$existingSupplier
[
'supplier_id'
]]);
LogService
::
AddLog
(
$existingSupplier
[
'supplier_id'
],
LogModel
::
UPDATE_OPERATE
,
'CRM重新同步'
,
'CRM重新同步,状态已恢复为待确认并更新信息,已重新发起审核'
);
}
catch
(
\Exception
$e
)
{
}
catch
(
\Exception
$e
)
{
Log
::
error
(
'[CRM同步]恢复待确认状态并更新失败: '
.
$e
->
getMessage
(),
[
'data'
=>
$data
]);
Log
::
error
(
'[CRM同步]恢复待确认状态并更新失败: '
.
$e
->
getMessage
(),
[
'data'
=>
$data
]);
$this
->
syncResponse
(
-
1
,
'恢复状态并更新失败: '
.
$e
->
getMessage
());
$this
->
syncResponse
(
-
1
,
'恢复状态并更新失败: '
.
$e
->
getMessage
());
...
@@ -538,4 +541,4 @@ class SupplierSyncController extends BaseSyncController
...
@@ -538,4 +541,4 @@ class SupplierSyncController extends BaseSyncController
$this
->
syncResponse
(
-
1
,
'更新失败: '
.
$e
->
getMessage
());
$this
->
syncResponse
(
-
1
,
'更新失败: '
.
$e
->
getMessage
());
}
}
}
}
}
}
\ No newline at end of file
resources/views/script/ConfirmCrmSupplierScript.blade.php
View file @
43b4a8ad
...
@@ -19,17 +19,33 @@
...
@@ -19,17 +19,33 @@
if
(
channelUid
)
{
if
(
channelUid
)
{
requestData
.
channel_uid
=
channelUid
;
requestData
.
channel_uid
=
channelUid
;
}
}
let
res
=
ajax
(
url
,
requestData
);
// loading 效果:禁用按钮,防止重复提交
if
(
!
res
)
{
let
$btn
=
$
(
data
.
elem
);
parent
.
layer
.
msg
(
'网络错误,请重试'
,
{
icon
:
5
});
let
btnText
=
$btn
.
text
();
}
else
{
$btn
.
addClass
(
'layui-btn-disabled'
).
attr
(
'disabled'
,
true
).
text
(
'提交中...'
);
if
(
res
.
err_code
===
0
)
{
$
.
ajax
({
admin
.
closeThisDialog
();
url
:
url
,
parent
.
layer
.
msg
(
res
.
err_msg
,
{
icon
:
6
});
type
:
'post'
,
}
else
{
data
:
requestData
,
parent
.
layer
.
msg
(
res
.
err_msg
,
{
icon
:
5
});
async
:
true
,
dataType
:
'json'
,
timeout
:
30000
,
success
:
function
(
res
)
{
if
(
res
&&
res
.
err_code
===
0
)
{
admin
.
closeThisDialog
();
parent
.
layer
.
msg
(
res
.
err_msg
,
{
icon
:
6
});
}
else
{
parent
.
layer
.
msg
(
res
?
res
.
err_msg
:
'操作失败'
,
{
icon
:
5
});
}
},
error
:
function
()
{
parent
.
layer
.
msg
(
'网络错误,请重试'
,
{
icon
:
5
});
},
complete
:
function
()
{
// 恢复按钮状态
$btn
.
removeClass
(
'layui-btn-disabled'
).
attr
(
'disabled'
,
false
).
text
(
btnText
);
}
}
}
}
);
return
false
;
return
false
;
});
});
...
@@ -37,4 +53,4 @@
...
@@ -37,4 +53,4 @@
admin
.
closeThisDialog
();
admin
.
closeThisDialog
();
});
});
});
});
</script>
</script>
\ No newline at end of file
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