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
11feddee
authored
Apr 28, 2021
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix
parent
087c79cf
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
52 deletions
app/Http/Services/SupplierService.php
public/plugins/assets/js/common.js
resources/views/script/SupplierListScript.blade.php
resources/views/web.blade.php
app/Http/Services/SupplierService.php
View file @
11feddee
...
...
@@ -122,15 +122,18 @@ class SupplierService
$channel
[
'update_time'
]
=
time
();
$model
->
where
(
'supplier_id'
,
$supplierId
)
->
update
(
$channel
);
$this
->
saveSupplierCode
(
$supplierId
);
//插入系数到redis
$supplierAddressService
=
new
SupplierAddressService
();
$supplierAddressService
->
saveAddress
(
$address
);
//附加费
$extraFaxService
=
new
SupplierExtraFeeService
();
$extraFaxService
->
saveSupplierExtraFee
(
$extraFax
);
//插入系数到redis
$this
->
saveRatioToRedis
(
$supplierId
);
//各种规则
$this
->
saveSkuAuditRulerToRedis
(
$supplierId
,
$channel
[
'sku_audit_ruler'
]);
$this
->
saveSkuUploadRulerToRedis
(
$supplierId
,
$channel
[
'sku_upload_ruler'
]);
//判断是否要移出待跟进
// $this->updateIsFollowUp($supplierId);
}
//重新生成外部显示的编码
$supplierSn
=
$this
->
generateSupplierSn
(
$supplierId
,
$channel
[
'supplier_group'
]);
...
...
@@ -272,7 +275,7 @@ class SupplierService
if
(
$supplier
[
'purchase_uid'
]
!=
$purchaseUid
)
{
$auditService
=
new
SupplierAuditService
();
//还要判断是否为待跟进供应商
if
(
!
$auditService
->
checkIsNeedToFollowUpSupplier
(
$supplierId
))
{
if
(
$auditService
->
checkIsNeedToFollowUpSupplier
(
$supplierId
))
{
$model
->
where
(
'supplier_id'
,
$supplierId
)
->
update
([
'to_follow_up'
=>
1
,
]);
...
...
@@ -293,6 +296,23 @@ class SupplierService
return
$result
;
}
//判断并且修改待跟进
private
function
updateIsFollowUp
(
$supplierId
)
{
$model
=
new
SupplierChannelModel
();
$auditService
=
new
SupplierAuditService
();
//还要判断是否为待跟进供应商
if
(
$auditService
->
checkIsNeedToFollowUpSupplier
(
$supplierId
))
{
$model
->
where
(
'supplier_id'
,
$supplierId
)
->
update
([
'to_follow_up'
=>
1
,
]);
}
else
{
$model
->
where
(
'supplier_id'
,
$supplierId
)
->
update
([
'to_follow_up'
=>
0
,
]);
}
}
//修改is_type
public
function
changeSupplierIsType
(
$supplierId
,
$isType
)
{
...
...
public/plugins/assets/js/common.js
View file @
11feddee
...
...
@@ -75,25 +75,4 @@ function ajax(url, data) {
})
layer
.
closeAll
();
return
result
;
}
//保存需要刷新的页面数据
function
saveRefreshData
(
type
,
supplierId
=
0
)
{
// if (type === 'detail') {
// let data = admin.getTempData("needFreshDetail");
// if (data) {
// data = JSON.parse(data);
// data.push(supplierId);
// data = JSON.stringify(data);
// admin.putTempData("needFreshDetail",data);
// }else{
// admin.putTempData("needFreshDetail",JSON.stringify([supplierId]));
// console.log(admin.getTempData("needFreshDetail"));
// }
//
// }
//
// if (type === 'list') {
// admin.putTempData("needFreshList",1);
// }
}
\ No newline at end of file
resources/views/script/SupplierListScript.blade.php
View file @
11feddee
...
...
@@ -90,6 +90,11 @@
,
page
:
{}
});
//保存需要刷新的页面数据
function
saveRefreshData
(
type
,
supplierId
=
0
)
{
admin
.
putTempData
(
"needFreshDetail_supplier_id="
+
supplierId
,
1
);
}
//新增供应商弹窗
$
(
"#add_supplier"
).
click
(
function
()
{
layer
.
open
({
...
...
@@ -144,7 +149,7 @@
layer
.
msg
(
'请先选择要操作的供应商'
,
{
icon
:
5
})
}
else
{
const
status
=
data
[
0
].
status
;
if
((
status
===
3
||
status
===
2
||
status
===
-
3
))
{
if
((
status
===
3
||
status
===
2
||
status
===
-
2
))
{
let
supplierId
=
data
[
0
].
supplier_id
;
layer
.
open
({
type
:
2
,
...
...
@@ -222,6 +227,7 @@
});
form
.
on
(
'submit(load)'
,
function
(
data
)
{
initCondition
.
source_type
=
whereCondition
.
source_type
;
whereCondition
=
$
.
extend
(
false
,
initCondition
,
data
.
field
);
//执行重载
table
.
reload
(
'list'
,
{
...
...
resources/views/web.blade.php
View file @
11feddee
...
...
@@ -62,36 +62,23 @@
});
admin
.
on
(
'tab'
,
function
(
d
)
{
// $(function () {
// $('#getSupplierListButton').click();
// })
// // d.layId表示当前tab的url
// //判断列表是否需要刷新
if
(
d
.
layId
.
search
(
'SupplierList'
)
!==
-
1
)
{
// alert(123);
// $(function () {
// $('.admin-iframe').contents().find('#getSupplierListButton').click()
// })
setTimeout
(
function
()
{
$
(
'.admin-iframe'
).
contents
().
find
(
'#getSupplierListButton'
).
click
()
},
10
)
}
//判断详情是否需要刷新
if
(
d
.
layId
.
search
(
'SupplierDetail'
)
!==
-
1
)
{
let
vars
=
d
.
layId
.
split
(
"&"
);
let
supplierFlag
=
vars
[
1
];
let
data
=
admin
.
getTempData
(
"needFreshDetail_"
+
supplierFlag
);
if
(
data
)
{
admin
.
refresh
();
admin
.
putTempData
(
"needFreshDetail_"
+
supplierFlag
,
null
);
}
}
// }
// let needFreshList = admin.getTempData("needFreshList");
// if (needFreshList) {
// // admin.putTempData("needFreshList",0)
// console.log("刷新列表")
// // $('#getSupplierListButton').click();
// } else {
// console.log("不刷新列表")
// }
// }
// //判断详情是否需要刷新
// if (d.layId.search('SupplierDetail') !== -1) {
// let data = admin.getTempData("needFreshDetail");
// console.log(data)
// if (data) {
// console.log(data)
// }
// }
// console.log($('.admin-iframe').contents().find('#getSupplierListButton').click());
});
});
</script>
...
...
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