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
e2d190fc
authored
Jun 29, 2022
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修复bug
parent
3605184b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
20 deletions
app/Http/routes.php
resources/views/script/AddSupplierAttachmentScript.blade.php
resources/views/script/supplier/SupplierBaseScript.blade.php
resources/views/web/supplier/SupplierBase.blade.php
app/Http/routes.php
View file @
e2d190fc
...
...
@@ -60,6 +60,5 @@ Route::group(['middleware' => ['external'], 'namespace' => 'Sync'], function ()
});
Route
::
match
([
'get'
,
'post'
],
'/test'
,
function
()
{
$resut
=
json_decode
(
'{"group_code":"G000010","source_sn":0,"company_name":"深圳大事件科技有限公司","init_nature":"原厂","company_nature":"方案商","company_type":2}'
,
true
);
dd
((
new
\App\Http\Services\SyncSupplierService
())
->
syncSupplierToUnitedResult
(
$resut
));
(
new
\App\Http\Services\DataService
())
->
exportSupplierJsonForUnited
();
});
resources/views/script/AddSupplierAttachmentScript.blade.php
View file @
e2d190fc
...
...
@@ -8,19 +8,32 @@
//提交数据
form
.
on
(
'submit(saveSupplierAttachment)'
,
function
(
data
)
{
layer
.
confirm
(
'确定要保存附件信息吗?'
,
function
(
index
)
{
let
res
=
ajax
(
'/api/supplier_attachment/SaveSupplierAttachment'
,
data
.
field
);
if
(
!
res
)
{
layer
.
msg
(
'网络错误,请重试'
,
{
icon
:
6
});
}
else
{
if
(
res
.
err_code
===
0
)
{
admin
.
putTempData
(
"needFreshList"
,
1
);
admin
.
closeThisDialog
();
parent
.
layer
.
msg
(
res
.
err_msg
,
{
icon
:
6
});
}
else
{
parent
.
layer
.
msg
(
res
.
err_msg
,
{
icon
:
5
});
admin
.
showLoading
({
type
:
3
});
$
.
ajax
({
url
:
'/api/supplier_attachment/SaveSupplierAttachment'
,
type
:
'GET'
,
async
:
true
,
data
:
data
.
field
,
dataType
:
'json'
,
timeout
:
20000
,
success
:
function
(
res
)
{
if
(
res
.
err_code
===
0
)
{
admin
.
removeLoading
();
admin
.
putTempData
(
"needFreshList"
,
1
);
admin
.
closeThisDialog
();
parent
.
layer
.
msg
(
res
.
err_msg
,
{
icon
:
6
});
}
else
{
admin
.
removeLoading
();
parent
.
layer
.
msg
(
res
.
err_msg
,
{
icon
:
5
});
}
},
error
:
function
()
{
admin
.
removeLoading
();
parent
.
layer
.
msg
(
'网络错误'
,
{
icon
:
5
});
}
}
return
false
;
});
});
return
false
;
})
...
...
resources/views/script/supplier/SupplierBaseScript.blade.php
View file @
e2d190fc
...
...
@@ -54,15 +54,13 @@
if
(
res
.
err_code
===
-
2
)
{
if
(
!
ignoreCompanyCheck
)
{
layer
.
msg
(
res
.
err_msg
,
{
icon
:
5
});
self
.
after
(
"
<
div
id
=
'supplier_check_tip'
style
=
'margin-top: 5px'
>
" +
"
<
p
style
=
'color: red;'
>
" + res.err_msg + "
<
/p></
div
>
");
self
.
next
(
'#supplier_check_tip'
).
find
(
'p'
).
text
(
res
.
err_msg
);
$
(
'#supplier_name'
).
prop
(
'disabled'
,
false
);
}
}
else
{
//这个code代表供应商名称已经存在,自然要检测
layer
.
msg
(
res
.
err_msg
,
{
icon
:
5
});
self.after("
<
div
id
=
'supplier_check_tip'
style
=
'margin-top: 5px'
>
" +
"
<
p
style
=
'color: red;'
>
" + res.err_msg + "
<
/p></
div
>
");
self
.
next
(
'#supplier_check_tip'
).
find
(
'p'
).
text
(
res
.
err_msg
);
$
(
'#supplier_name'
).
prop
(
'disabled'
,
false
);
}
if
(
!
ignoreCompanyCheck
)
{
...
...
@@ -313,8 +311,7 @@
if
(
ignoreCompanyCheck
)
{
layer
.
msg
(
'公司未进行工商注册'
,
{
icon
:
5
})
}
else
{
$('#supplier_name').after("
<
div
id
=
'supplier_check_tip'
style
=
'margin-top: 5px'
>
" +
"
<
p
style
=
'color: red;'
>
公司未进行工商注册,请修改后重新提交
<
/p></
div
>
"
);
$
(
'#supplier_name'
).
next
(
'#supplier_check_tip'
).
find
(
'p'
).
text
(
'公司未进行工商注册,请修改后重新提交'
);
layer
.
msg
(
'验证失败,公司未进行工商注册,请修改后重新提交'
,
{
icon
:
5
})
resetCompanyInfo
(
supplierName
!==
''
);
}
...
...
resources/views/web/supplier/SupplierBase.blade.php
View file @
e2d190fc
...
...
@@ -59,6 +59,9 @@
@endif"
value=
"{{$supplier['supplier_name'] or ''}}"
@
if
($
supplier
)
disabled
@
endif
>
<div
id=
'supplier_check_tip'
style=
'margin-top: 5px'
>
<p
style=
'color: red;'
></p>
</div>
</div>
</div>
<div
class=
"layui-col-md5"
>
...
...
@@ -68,6 +71,9 @@
<input
type=
"text"
name=
"tax_number"
id=
"tax_number"
placeholder=
"请输入公司税号,选择所在区域才允许输入"
class=
"layui-input layui-disabled"
disabled
value=
"{{$supplier['tax_number'] or ''}}"
>
</div>
<div
id=
'supplier_check_tip'
style=
'margin-top: 5px'
>
<p
style=
'color: red;'
></p>
</div>
</div>
</div>
<div
class=
"layui-col-md2"
style=
"padding-left: 20px"
>
...
...
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