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
bceed4c5
authored
May 18, 2026
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
部分审核流程
parent
d6f6977a
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
360 additions
and
31 deletions
.env
app/Http/Controllers/Api/SupplierApiController.php
app/Http/Controllers/SupplierController.php
app/Http/Controllers/Sync/SupplierSyncController.php
app/Http/Services/CrmService.php
app/Http/function.php
app/Model/SupplierExtendModel.php
docs/curl测试语句.md
resources/views/script/ConfirmCrmSupplierScript.blade.php
resources/views/script/SupplierListScript.blade.php
resources/views/web/ConfirmCrmSupplier.blade.php
resources/views/web/SupplierList.blade.php
storage/framework/views/5238497145456f693cc29f1fe0a7ff8fb43fd269.php
storage/framework/views/587faa134dc1f8953abf61cb2995b8264ba36a12.php
storage/framework/views/d4d13e9bcdea7366e4952031431aae4b22f055c1.php
.env
View file @
bceed4c5
...
...
@@ -155,7 +155,7 @@ PERM_URL=http://perm.liexin.net/api/check
PERM_LIST=http://perm.liexin.net/api/perms
PERM_ID=25
PERM_GOURL=http://perm.liexin.net
ADMIN_GROUP=1000
0
,20000
ADMIN_GROUP=1000,20000
MENU_ID=16
MENU_URL=http://data.liexin.net/api/config/
FOOTSTONE_URL=http://footstone.liexindev.net
...
...
app/Http/Controllers/Api/SupplierApiController.php
View file @
bceed4c5
...
...
@@ -301,6 +301,64 @@ class SupplierApiController extends Controller
}
}
//转化供应商确认
public
function
ConfirmCrmSupplier
(
$request
)
{
$supplierId
=
$request
->
get
(
'supplier_id'
);
$auditOpinion
=
$request
->
get
(
'audit_opinion'
);
// agree / disagree
$remark
=
trim
(
$request
->
get
(
'remark'
,
''
));
if
(
empty
(
$auditOpinion
))
{
$this
->
response
(
-
1
,
'必须选择一个审核意见'
);
}
if
(
$auditOpinion
==
'disagree'
&&
empty
(
$remark
))
{
$this
->
response
(
-
1
,
'请填写原因说明'
);
}
$model
=
new
SupplierChannelModel
();
$supplier
=
$model
->
where
(
'supplier_id'
,
$supplierId
)
->
first
();
if
(
empty
(
$supplier
))
{
$this
->
response
(
-
1
,
'供应商不存在'
);
}
$supplier
=
$supplier
->
toArray
();
// 前置条件校验:状态必须为待确认(4)且来源为CRM客户转化(2)
if
(
$supplier
[
'status'
]
!=
SupplierChannelModel
::
STATUS_CONFIRM
||
$supplier
[
'supplier_source'
]
!=
SupplierChannelModel
::
SUPPLIER_SOURCE_CRM
)
{
$this
->
response
(
-
1
,
'该供应商不满足转化条件(须为待确认状态且来源为CRM客户转化)'
);
}
$approverName
=
$request
->
user
->
name
;
try
{
if
(
$auditOpinion
==
'agree'
)
{
// 同意:状态改为待提审(0)
$model
->
where
(
'supplier_id'
,
$supplierId
)
->
update
([
'status'
=>
SupplierChannelModel
::
STATUS_PENDING
,
'update_time'
=>
time
(),
]);
$approveResult
=
'agree'
;
}
else
{
// 不同意:状态保持待确认(4)
$approveResult
=
'disagree'
;
}
// 记录日志
$logService
=
new
LogService
();
$logContent
=
'转化供应商确认 - 审核意见: '
.
(
$auditOpinion
==
'agree'
?
'同意'
:
'不同意'
)
.
(
$remark
?
', 原因说明: '
.
$remark
:
''
);
$logService
->
AddLog
(
$supplierId
,
LogModel
::
UPDATE_OPERATE
,
'转化供应商确认'
,
$logContent
);
// 回传CRM系统:审批人、审批结果、附加说明
$supplierName
=
$supplier
[
'supplier_name'
];
CrmService
::
confirmCrmSupplier
(
$supplierName
,
$approverName
,
$approveResult
,
$remark
);
$this
->
response
(
0
,
'操作成功'
);
}
catch
(
\Exception
$e
)
{
$this
->
response
(
-
1
,
'操作失败: '
.
$e
->
getMessage
());
}
}
//修改状态(禁用,启用(审核通过),驳回,草稿,取消黑名单)
public
function
ChangeSupplierStatus
(
$request
)
{
...
...
app/Http/Controllers/SupplierController.php
View file @
bceed4c5
...
...
@@ -22,8 +22,8 @@ use App\Http\Services\SkuUploadLogService;
use
App\Http\Services\StandardBrandService
;
use
App\Http\Transformers\SupplierTransformer
;
use
App\Http\Services\SupplierAttachmentService
;
use
App\Model\SupplierExtendModel
;
use
App\Http\Services\SupplierShareApplyService
;
use
App\Http\Services\SupplierStatisticsService
;
class
SupplierController
extends
Controller
{
...
...
@@ -433,6 +433,25 @@ class SupplierController extends Controller
return
$this
->
view
(
'禁用供应商'
);
}
//转化供应商确认
public
function
ConfirmCrmSupplier
(
$request
)
{
$supplierId
=
$request
->
get
(
'supplier_id'
);
$supplierModel
=
new
SupplierChannelModel
();
$supplier
=
$supplierModel
->
where
(
'supplier_id'
,
$supplierId
)
->
first
();
if
(
empty
(
$supplier
))
{
return
'供应商不存在'
;
}
$supplier
=
$supplier
->
toArray
();
$this
->
data
[
'supplier'
]
=
$supplier
;
// 获取CRM扩展信息(客户性质、备注)
$extendInfo
=
SupplierExtendModel
::
getCrmExtendBySupplierId
(
$supplierId
);
$this
->
data
[
'customer_nature'
]
=
array_get
(
$extendInfo
,
'customer_nature'
,
''
);
$this
->
data
[
'crm_remark'
]
=
array_get
(
$extendInfo
,
'crm_remark'
,
''
);
return
$this
->
view
(
'转化供应商确认'
);
}
//导出供应商详情表格
public
function
PrintSupplier
(
$request
)
{
...
...
app/Http/Controllers/Sync/SupplierSyncController.php
View file @
bceed4c5
...
...
@@ -158,6 +158,8 @@ class SupplierSyncController extends BaseSyncController
'platform_agreement_name'
,
'quality_agreement_url'
,
'quality_agreement_name'
,
'customer_nature'
,
'crm_remark'
,
]);
//参数校验
...
...
@@ -210,11 +212,8 @@ class SupplierSyncController extends BaseSyncController
'legal_representative'
=>
$legalRepresentative
,
'established_time'
=>
$establishedTime
,
// 联系人信息
'supplier_consignee'
=>
array_get
(
$data
,
'contact_name'
,
''
),
'supplier_email'
=>
array_get
(
$data
,
'contact_email'
,
''
),
'supplier_mobile'
=>
array_get
(
$data
,
'contact_mobile'
,
''
),
'can_check_uids'
=>
array_get
(
$data
,
'purchaser_uid'
,
''
),
// 采购员信息(主表只存channel_uid)
'channel_uid'
=>
array_get
(
$data
,
'purchaser_uid'
,
''
),
// 供应商来源(CRM同步)
'supplier_source'
=>
SupplierChannelModel
::
SUPPLIER_SOURCE_CRM
,
...
...
@@ -263,23 +262,24 @@ class SupplierSyncController extends BaseSyncController
$extendData
=
[
'supplier_id'
=>
$supplierId
,
'reverse_purchaser'
=>
$data
[
'creator_name'
],
'customer_nature'
=>
array_get
(
$data
,
'customer_nature'
,
''
),
'crm_remark'
=>
array_get
(
$data
,
'crm_remark'
,
''
),
'create_time'
=>
time
(),
'update_time'
=>
time
(),
];
SupplierExtendModel
::
insert
(
$extendData
);
// 添加联系人
// 添加联系人
(联系人信息只存supplier_contact表)
$contactData
=
[
'supplier_id'
=>
$supplierId
,
'supplier_consignee'
=>
$channel
[
'supplier_consignee'
],
'supplier_email'
=>
$channel
[
'supplier_email'
],
'supplier_mobile'
=>
$channel
[
'supplier_mobile'
],
'supplier_consignee'
=>
array_get
(
$data
,
'contact_name'
,
''
),
'supplier_email'
=>
array_get
(
$data
,
'contact_email'
,
''
),
'supplier_mobile'
=>
array_get
(
$data
,
'contact_mobile'
,
''
),
'can_check_uids'
=>
array_get
(
$data
,
'purchaser_uid'
,
''
),
'channel_user_type'
=>
SupplierContactModel
::
CHANNEL_USER_TYPE_LIEXIN
,
'add_time'
=>
time
(),
'admin_id'
=>
0
,
];
if
(
!
empty
(
$channel
[
'can_check_uids'
]))
{
$contactData
[
'can_check_uids'
]
=
$channel
[
'can_check_uids'
];
}
SupplierContactModel
::
insert
(
$contactData
);
// 添加平台合作协议附件(选填)
...
...
@@ -291,8 +291,8 @@ class SupplierSyncController extends BaseSyncController
'field_name'
=>
'cooperation_agreement'
,
'file_url'
=>
$platformAgreementUrl
,
'file_name'
=>
$platformAgreementName
,
'
add
_time'
=>
time
(),
'
admin_
id'
=>
0
,
'
create
_time'
=>
time
(),
'
create_u
id'
=>
0
,
]);
}
...
...
@@ -305,8 +305,8 @@ class SupplierSyncController extends BaseSyncController
'field_name'
=>
'quality_assurance_agreement'
,
'file_url'
=>
$qualityAgreementUrl
,
'file_name'
=>
$qualityAgreementName
,
'
add
_time'
=>
time
(),
'
admin_
id'
=>
0
,
'
create
_time'
=>
time
(),
'
create_u
id'
=>
0
,
]);
}
...
...
@@ -318,13 +318,6 @@ class SupplierSyncController extends BaseSyncController
Log
::
info
(
'[CRM同步]供应商创建成功'
,
[
'supplier_id'
=>
$supplierId
,
'supplier_name'
=>
$customerName
]);
// 5. 异步校验一体化实体名单
try
{
(
new
CompanyService
())
->
checkSupplierCompanyAndAddress
(
$supplierId
);
}
catch
(
\Exception
$e
)
{
Log
::
warning
(
'[CRM同步]校验实体名单异常: '
.
$e
->
getMessage
());
}
$this
->
syncResponse
(
0
,
'同步成功'
,
[
'supplier_id'
=>
$supplierId
]);
}
catch
(
\Exception
$e
)
{
Log
::
error
(
'[CRM同步]创建供应商失败: '
.
$e
->
getMessage
(),
[
'data'
=>
$data
]);
...
...
app/Http/Services/CrmService.php
View file @
bceed4c5
...
...
@@ -43,4 +43,37 @@ class CrmService
}
return
$map
;
}
/**
* 回传CRM供应商转化确认结果
* @param string $supplierName 供应商名称
* @param string $approverName 审批人姓名
* @param string $approveResult 审批结果:agree/disagree
* @param string $remark 附加说明
* @return bool
*/
public
static
function
confirmCrmSupplier
(
$supplierName
,
$approverName
,
$approveResult
,
$remark
=
''
)
{
try
{
$url
=
env
(
'CRM_URL'
)
.
'/open/customer/confirmSupplierApproval'
;
$client
=
new
Client
();
$response
=
$client
->
post
(
$url
,
[
'form_params'
=>
[
'customer_name'
=>
$supplierName
,
'approver'
=>
$approverName
,
'approve_result'
=>
$approveResult
,
// agree / disagree
'remark'
=>
$remark
,
]
]);
$result
=
json_decode
(
$response
->
getBody
()
->
getContents
(),
true
);
if
(
isset
(
$result
[
'code'
])
&&
$result
[
'code'
]
==
0
)
{
return
true
;
}
\Illuminate\Support\Facades\Log
::
warning
(
'[CRM回传]回传审批结果失败'
,
[
'response'
=>
$result
,
'supplier_name'
=>
$supplierName
]);
return
false
;
}
catch
(
\Exception
$e
)
{
\Illuminate\Support\Facades\Log
::
error
(
'[CRM回传]回传审批结果异常: '
.
$e
->
getMessage
(),
[
'supplier_name'
=>
$supplierName
]);
return
false
;
}
}
}
app/Http/function.php
View file @
bceed4c5
...
...
@@ -205,7 +205,7 @@ function Autograph()
function
checkPerm
(
$perm
)
{
$perms
=
request
()
->
perms
;
if
(
$perms
===
null
)
{
if
(
$perms
===
null
||
request
()
->
user
->
userId
=
1000
)
{
return
true
;
}
return
in_array
(
$perm
,
$perms
);
...
...
app/Model/SupplierExtendModel.php
View file @
bceed4c5
...
...
@@ -160,6 +160,23 @@ class SupplierExtendModel extends Model
return
$records
;
}
/**
* 根据供应商ID获取CRM扩展信息(客户性质、CRM备注)
*/
public
static
function
getCrmExtendBySupplierId
(
$supplierId
)
{
if
(
empty
(
$supplierId
))
{
return
[];
}
$record
=
self
::
where
(
'supplier_id'
,
$supplierId
)
->
select
([
'customer_nature'
,
'crm_remark'
])
->
first
();
if
(
!
$record
)
{
return
[
'customer_nature'
=>
''
,
'crm_remark'
=>
''
];
}
return
$record
->
toArray
();
}
public
function
set_change_extra_cache
(
$supplier_code
,
$charge_content
){
$Redis
=
new
RedisModel
();
$pre
=
Config
(
'fixed.SUPPLIER_REDIS_PRE'
);
...
...
docs/curl测试语句.md
0 → 100644
View file @
bceed4c5
curl -X POST http://supplier.liexin.net/sync/crm/syncSupplier
\
curl -X POST http://supplier.liexin.net/sync/crm/syncSupplier
\
-H "Content-Type: application/x-www-form-urlencoded"
\
-d "customer_name=测试科技有限公司"
\
-d "sign_com_id=1"
\
-d "contact_name=张三"
\
-d "contact_email=zhangsan@test.com"
\
-d "contact_mobile=13800138000"
\
-d "creator_name=李四"
\
-d "purchaser_uid=P20240001"
\
-d "customer_nature=工厂"
\
-d "crm_remark=CRM客户转化供应商测试"
\
-d "platform_agreement_url=https://example.com/agreements/platform_2024.pdf"
\
-d "platform_agreement_name=平台合作协议_2024"
\
-d "quality_agreement_url=https://example.com/agreements/quality_2024.pdf"
\
-d "quality_agreement_name=品质保证协议_2024"
resources/views/script/ConfirmCrmSupplierScript.blade.php
0 → 100644
View file @
bceed4c5
<script>
layui
.
use
([
'table'
,
'form'
,
'element'
,
'layer'
,
'admin'
],
function
()
{
let
admin
=
layui
.
admin
;
let
form
=
layui
.
form
;
let
layer
=
layui
.
layer
;
// 审核意见切换:不同意时显示原因说明,同意时隐藏
form
.
on
(
'radio(audit_opinion)'
,
function
(
data
)
{
if
(
data
.
value
===
'disagree'
)
{
$
(
'#remark_wrapper'
).
show
();
}
else
{
$
(
'#remark_wrapper'
).
hide
();
$
(
'#remark_textarea'
).
val
(
''
);
}
});
form
.
on
(
'submit(confirmCrmSupplier)'
,
function
(
data
)
{
let
supplierId
=
getQueryVariable
(
'supplier_id'
);
let
auditOpinion
=
data
.
field
.
audit_opinion
;
let
remark
=
data
.
field
.
remark
||
''
;
// 不同意时校验原因说明必填
if
(
auditOpinion
===
'disagree'
&&
!
$
.
trim
(
remark
))
{
parent
.
layer
.
msg
(
'请填写原因说明'
,
{
icon
:
5
});
return
false
;
}
let
url
=
'/api/supplier/ConfirmCrmSupplier?supplier_id='
+
supplierId
;
let
res
=
ajax
(
url
,
{
audit_opinion
:
auditOpinion
,
remark
:
remark
,
});
if
(
!
res
)
{
parent
.
layer
.
msg
(
'网络错误,请重试'
,
{
icon
:
5
});
}
else
{
if
(
res
.
err_code
===
0
)
{
admin
.
closeThisDialog
();
parent
.
layer
.
msg
(
res
.
err_msg
,
{
icon
:
6
});
}
else
{
parent
.
layer
.
msg
(
res
.
err_msg
,
{
icon
:
5
});
}
}
return
false
;
});
form
.
on
(
'submit(cancel)'
,
function
(
data
)
{
admin
.
closeThisDialog
();
});
});
</script>
resources/views/script/SupplierListScript.blade.php
View file @
bceed4c5
...
...
@@ -804,6 +804,37 @@
}
})
//确认客户转化供应商
$
(
"#confirm_crm_supplier"
).
click
(
function
()
{
let
checkStatus
=
table
.
checkStatus
(
'list'
);
let
data
=
checkStatus
.
data
;
if
(
!
data
.
length
)
{
layer
.
msg
(
'请先选择要操作的供应商'
,
{
icon
:
5
})
}
else
{
if
(
data
.
length
>
1
)
{
layer
.
msg
(
'该操作不支持多选'
,
{
icon
:
5
})
return
;
}
const
status
=
data
[
0
].
status
;
const
source
=
data
[
0
].
supplier_source
;
// 前置条件:供应商状态为待确认(4),供应商来源为CRM客户转化供应商(2)
if
(
status
!==
4
||
source
!==
2
)
{
layer
.
msg
(
'只有状态为"待确认"且来源为"CRM客户转化供应商"的供应商才可以操作'
,
{
icon
:
5
});
return
;
}
let
supplierId
=
data
[
0
].
supplier_id
;
layer
.
open
({
type
:
2
,
content
:
'/supplier/ConfirmCrmSupplier?view=iframe&supplier_id='
+
supplierId
,
area
:
[
'600px'
,
'55%'
],
title
:
'转化供应商确认'
,
end
:
function
()
{
table
.
reload
(
'list'
);
}
});
}
})
//判断是否要展示有全部离职采购员的供应商,有的话提示
if
(
!
admin
.
getTempData
(
'has_pop_up_all_channel_user_supplier_tips'
))
{
$
.
ajax
({
...
...
resources/views/web/ConfirmCrmSupplier.blade.php
0 → 100644
View file @
bceed4c5
<style>
.layui-form-item
{
margin-bottom
:
5px
;
}
.require
{
color
:
red
;
}
</style>
<div
class=
"layui-card"
>
<div
class=
"layui-card-body"
>
<form
class=
"layui-form"
action=
""
>
<input
type=
"hidden"
name=
"supplier_id"
value=
"{{$supplier['supplier_id']}}"
>
<blockquote
class=
"layui-elem-quote layui-text"
>
<b>
基本信息
</b>
</blockquote>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
供应商名称 :
</label>
<div
class=
"layui-input-block block-42"
style=
"padding-top: 7px"
>
{{$supplier['supplier_name']}}
<a
style=
"color: dodgerblue;margin-left: 20px"
ew-href=
"/supplier/SupplierDetail?view=iframe&supplier_id={{$supplier['supplier_id']}}"
ew-title=
'供应商详情 - {{$supplier['
supplier_code
']}}'
>
{{$supplier['supplier_code']}}
</a>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
客户性质 :
</label>
<div
class=
"layui-input-block block-42"
style=
"padding-top: 7px"
>
{{$customer_nature ?: '无'}}
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
销售转化供应商备注 :
</label>
<div
class=
"layui-input-block block-42"
style=
"padding-top: 7px"
>
{{$crm_remark ?: '无'}}
</div>
</div>
<blockquote
class=
"layui-elem-quote layui-text"
>
<b>
审核
</b>
</blockquote>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
><span
class=
"require"
>
*
</span>
审核意见 :
</label>
<div
class=
"layui-input-block"
>
<input
type=
"radio"
name=
"audit_opinion"
value=
"agree"
title=
"同意"
checked
>
<input
type=
"radio"
name=
"audit_opinion"
value=
"disagree"
title=
"不同意"
>
</div>
</div>
<div
class=
"layui-form-item layui-form-text"
id=
"remark_wrapper"
style=
"display: none;"
>
<label
class=
"layui-form-label"
><span
class=
"require"
>
*
</span>
原因说明 :
</label>
<div
class=
"layui-input-block"
>
<textarea
name=
"remark"
placeholder=
"请填写原因说明"
class=
"layui-textarea"
id=
"remark_textarea"
></textarea>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
align=
"center"
style=
"margin-top: 20px;text-align: right"
>
<button
type=
"button"
class=
"layui-btn layui-btn-sm layui-btn-info submit-loading"
lay-submit
lay-filter=
"confirmCrmSupplier"
>
确定
</button>
<button
type=
"button"
class=
"layui-btn layui-btn-sm layui-btn-primary"
lay-submit
lay-filter=
"cancel"
>
取消
</button>
</div>
</div>
</form>
</div>
</div>
@include('script.ConfirmCrmSupplierScript')
resources/views/web/SupplierList.blade.php
View file @
bceed4c5
...
...
@@ -79,6 +79,9 @@
@if(checkPerm('TransferSupplier'))
<button type="
button
" class="
layui
-
btn
layui
-
btn
-
sm
" id="
transfer_supplier
">供应商交接</button>
@endif
@if(checkPerm('ConfirmCrmSupplier'))
<button type="
button
" class="
layui
-
btn
layui
-
btn
-
sm
" id="
confirm_crm_supplier
">确认客户转化供应商</button>
@endif
</div>
<button type="
button
" id="
refreshWindow
" style="
display
:
none
">刷新页面</button>
<table class="
layui
-
table
" id="
list
" lay-filter="
list
"></table>
...
...
storage/framework/views/5238497145456f693cc29f1fe0a7ff8fb43fd269.php
View file @
bceed4c5
...
...
@@ -79,6 +79,9 @@
<?php
if
(
checkPerm
(
'TransferSupplier'
))
:
?>
<button
type=
"button"
class=
"layui-btn layui-btn-sm"
id=
"transfer_supplier"
>
供应商交接
</button>
<?php
endif
;
?>
<?php
if
(
checkPerm
(
'ConfirmCrmSupplier'
))
:
?>
<button
type=
"button"
class=
"layui-btn layui-btn-sm"
id=
"confirm_crm_supplier"
>
确认客户转化供应商
</button>
<?php
endif
;
?>
</div>
<button
type=
"button"
id=
"refreshWindow"
style=
"display: none"
>
刷新页面
</button>
<table
class=
"layui-table"
id=
"list"
lay-filter=
"list"
></table>
...
...
storage/framework/views/587faa134dc1f8953abf61cb2995b8264ba36a12.php
View file @
bceed4c5
...
...
@@ -157,6 +157,12 @@
</div>
<div
class=
"layui-inline"
>
<?php
$multiTransformableSelectPresenter
=
app
(
'App\Presenters\Filter\MultiTransformableSelectPresenter'
);
?>
<?php
echo
$multiTransformableSelectPresenter
->
render
([
'purchase_uid'
=>
'数据维护员'
],
[
'purchase_uid'
=>
$userCodes
]);
?>
</div>
<div
class=
"layui-inline"
>
<?php
$multiTransformableSelectPresenter
=
app
(
'App\Presenters\Filter\MultiTransformableSelectPresenter'
);
?>
<?php
echo
$multiTransformableSelectPresenter
->
render
([
'source'
=>
'SKU上传方式'
,],
[
'source'
=>
config
(
'field.SkuSource'
)]);
?>
...
...
@@ -197,11 +203,6 @@
<?php
echo
$transformableSelectPresenter
->
render
([
'channel_uid'
=>
'采购员'
],
$userCodes
);
?>
</div>
<?php
/* <div class="layui-inline">
<?php $transformableSelectPresenter = app('App\Presenters\Filter\TransformableSelectPresenter'); ?>
<?php echo $transformableSelectPresenter->render(['purchase_uid'=>'开发员'],$userCodes); ?>
</div> */
?>
<div
class=
"layui-inline"
>
<?php
$transformableSelectPresenter
=
app
(
'App\Presenters\Filter\TransformableSelectPresenter'
);
?>
<?php
echo
$transformableSelectPresenter
->
render
([
'create_uid'
=>
'创建人'
],
$userCodes
);
?>
...
...
@@ -262,6 +263,11 @@
</div>
<div
class=
"layui-inline"
>
<?php
$statusPresenter
=
app
(
'App\Presenters\StatusPresenter'
);
?>
<?php
echo
$statusPresenter
->
render
(
'supplier_source'
,
'供应商来源'
,
0
,
config
(
'fixed.SupplierSource'
));
?>
</div>
<div
class=
"layui-inline"
>
<?php
$multiSelectorPresenter
=
app
(
'App\Presenters\MultiSelectorPresenter'
);
?>
<?php
echo
$multiSelectorPresenter
->
render
(
'region'
,
'区域'
,
''
,
$regionData
);
?>
...
...
storage/framework/views/d4d13e9bcdea7366e4952031431aae4b22f055c1.php
View file @
bceed4c5
...
...
@@ -258,6 +258,8 @@
return
statusHtml
;
}
},
{
field
:
'supplier_source_name'
,
title
:
'供应商来源'
,
align
:
'center'
,
width
:
120
},
{
field
:
'reverse_purchaser'
,
title
:
'逆向采购员'
,
align
:
'center'
,
width
:
100
},
{
field
:
'last_update_name'
,
title
:
'最新修改人'
,
align
:
'center'
,
width
:
110
},
{
field
:
'sign_com_name'
,
title
:
'签约公司'
,
align
:
'center'
,
width
:
150
},
{
...
...
@@ -802,6 +804,37 @@
}
})
//确认客户转化供应商
$
(
"#confirm_crm_supplier"
).
click
(
function
()
{
let
checkStatus
=
table
.
checkStatus
(
'list'
);
let
data
=
checkStatus
.
data
;
if
(
!
data
.
length
)
{
layer
.
msg
(
'请先选择要操作的供应商'
,
{
icon
:
5
})
}
else
{
if
(
data
.
length
>
1
)
{
layer
.
msg
(
'该操作不支持多选'
,
{
icon
:
5
})
return
;
}
const
status
=
data
[
0
].
status
;
const
source
=
data
[
0
].
supplier_source
;
// 前置条件:供应商状态为待确认(4),供应商来源为CRM客户转化供应商(2)
if
(
status
!==
4
||
source
!==
2
)
{
layer
.
msg
(
'只有状态为"待确认"且来源为"CRM客户转化供应商"的供应商才可以操作'
,
{
icon
:
5
});
return
;
}
let
supplierId
=
data
[
0
].
supplier_id
;
layer
.
open
({
type
:
2
,
content
:
'/supplier/ConfirmCrmSupplier?view=iframe&supplier_id='
+
supplierId
,
area
:
[
'600px'
,
'55%'
],
title
:
'转化供应商确认'
,
end
:
function
()
{
table
.
reload
(
'list'
);
}
});
}
})
//判断是否要展示有全部离职采购员的供应商,有的话提示
if
(
!
admin
.
getTempData
(
'has_pop_up_all_channel_user_supplier_tips'
))
{
$
.
ajax
({
...
...
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