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
51f527e2
authored
Aug 12, 2025
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'ysx-SKU上传同步芯链选项交互优化&新建供应商期货默认项更改-20250804' into Dev
parents
e5cece4e
6c7e7096
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
68 additions
and
37 deletions
app/Http/Controllers/Api/SupplierApiController.php
app/Http/Controllers/Api/SupplierReceiptApiController.php
app/Http/Controllers/SupplierReceiptController.php
app/Http/Services/SupplierService.php
config/validate.php
resources/views/script/AddSupplierReceiptScript.blade.php
resources/views/web/AddSupplier.blade.php
app/Http/Controllers/Api/SupplierApiController.php
View file @
51f527e2
...
...
@@ -158,6 +158,7 @@ class SupplierApiController extends Controller
'nation_id'
,
'intermediary_bank'
,
'sign_com_id'
,
'receipt_nation_id'
,
]);
$channel
=
$request
->
only
(
$channelMap
);
...
...
app/Http/Controllers/Api/SupplierReceiptApiController.php
View file @
51f527e2
...
...
@@ -69,7 +69,7 @@ class SupplierReceiptApiController extends Controller
$receipt
[
'account_adderss'
]
=
empty
(
$receipt
[
'account_adderss'
])
?
' '
:
$receipt
[
'account_adderss'
];
if
(
$receipt
[
'receipt_type'
]
==
1
)
{
$receipt
[
'swift_code'
]
=
''
;
$receipt
[
'nation_id'
]
=
0
;
//
$receipt['nation_id'] = 0;
}
$receiptId
=
$request
->
get
(
'receipt_id'
);
$supplierId
=
$request
->
get
(
'supplier_id'
);
...
...
app/Http/Controllers/SupplierReceiptController.php
View file @
51f527e2
...
...
@@ -46,7 +46,7 @@ class SupplierReceiptController extends Controller
public
function
AddSupplierReceipt
(
$request
)
{
$this
->
data
[
'title'
]
=
'添加供应商银行'
;
$this
->
data
[
'nationList'
]
=
NationModel
::
pluck
(
'name_cn'
,
'nation_id'
)
->
toArray
();
$this
->
data
[
'nationList'
]
=
NationModel
::
getNationList
();
$this
->
data
[
'internationalCodeList'
]
=
NationModel
::
getNationList
();
return
$this
->
view
(
'添加供应商银行'
);
}
...
...
@@ -59,7 +59,7 @@ class SupplierReceiptController extends Controller
$model
=
new
SupplierReceiptModel
();
$this
->
data
[
'receipt'
]
=
$model
->
where
(
'receipt_id'
,
$receiptId
)
->
first
()
->
toArray
();
}
$this
->
data
[
'nationList'
]
=
NationModel
::
pluck
(
'name_cn'
,
'nation_id'
)
->
toArray
();
$this
->
data
[
'nationList'
]
=
NationModel
::
getNationList
();
$this
->
data
[
'title'
]
=
'修改供应商银行'
;
$this
->
data
[
'view'
]
=
'AddSupplierReceipt'
;
$this
->
data
[
'internationalCodeList'
]
=
NationModel
::
getNationList
();
...
...
app/Http/Services/SupplierService.php
View file @
51f527e2
...
...
@@ -152,10 +152,12 @@ class SupplierService
'account_adderss'
,
'certificate'
,
'swift_code'
,
'nation_id'
,
'
receipt_
nation_id'
,
'intermediary_bank'
,
];
$receiptData
=
array_only
(
$channel
,
$receiptField
);
$receiptData
[
'nation_id'
]
=
$channel
[
'receipt_nation_id'
];
unset
(
$receiptData
[
'receipt_nation_id'
]);
$channel
=
array_except
(
$channel
,
$receiptField
);
//先去插入到channel表
...
...
@@ -896,7 +898,7 @@ class SupplierService
public
function
getInitSkuUploadRuler
()
{
return
'{"allow_stock_lte_0":0,"allow_moq_lte_0":0,"allow_stock_lt_moq":0,"allow_price_null":0,"futures_allow_stock_lte_0":
1,"futures_allow_moq_lte_0":0,"futures_allow_price_null":1
}'
;
return
'{"allow_stock_lte_0":0,"allow_moq_lte_0":0,"allow_stock_lt_moq":0,"allow_price_null":0,"futures_allow_stock_lte_0":
0,"futures_allow_moq_lte_0":0,"futures_allow_price_null":0
}'
;
}
//修改供应商名称
...
...
config/validate.php
View file @
51f527e2
...
...
@@ -60,9 +60,9 @@ return [
'sign_com_id'
=>
'签约公司id'
,
'sign_com_name'
=>
'签约公司名称'
,
'sku_optional_batch_text'
=>
'SKU可选批次'
,
'nation_id'
=>
'国家/地区'
,
'pay_type_name'
=>
'付款周期'
,
'pay_type_value'
=>
'付款周期值'
,
'pay_type_extra'
=>
'付款周期类型'
,
'nation_id'
=>
'国家/地区'
,
]
];
resources/views/script/AddSupplierReceiptScript.blade.php
View file @
51f527e2
...
...
@@ -2,28 +2,34 @@
<
script
>
document
.
addEventListener
(
'alpine:init'
,
()
=>
{
Alpine
.
data
(
'receiptForm'
,
()
=>
({
receiptType
:
$
(
'#receipt_type'
)
.
val
()
,
init
()
{
receiptType
:
$
(
'#receipt_type'
)
.
val
()
,
init
()
{
let
g
=
this
;
layui
.
use
([
'form'
,
'upload'
,
'admin'
],
function
()
{
layui
.
use
([
'form'
,
'upload'
,
'admin'
],
function
()
{
const
form
=
layui
.
form
const
upload
=
layui
.
upload
;
const
admin
=
layui
.
admin
;
//提交数据
form
.
on
(
'submit(addSupplierReceipt)'
,
function
(
data
)
{
form
.
on
(
'submit(addSupplierReceipt)'
,
function
(
data
)
{
// layer.confirm('确定要保存银行信息吗?一旦保存,该供应商就会再次进入审核阶段', function (index) {
layer
.
confirm
(
'确定要保存银行信息吗?'
,
function
(
index
)
{
layer
.
confirm
(
'确定要保存银行信息吗?'
,
function
(
index
)
{
let
res
=
ajax
(
'/api/supplier_receipt/AddSupplierReceipt'
,
data
.
field
);
if
(
!
res
)
{
layer
.
msg
(
'网络错误,请重试'
,
{
icon
:
6
});
layer
.
msg
(
'网络错误,请重试'
,
{
icon
:
6
});
}
else
{
if
(
res
.
err_code
===
0
)
{
admin
.
putTempData
(
"needFreshList"
,
1
);
admin
.
closeThisDialog
();
parent
.
layer
.
msg
(
res
.
err_msg
,
{
icon
:
6
});
parent
.
layer
.
msg
(
res
.
err_msg
,
{
icon
:
6
});
}
else
{
parent
.
layer
.
msg
(
res
.
err_msg
,
{
icon
:
5
});
parent
.
layer
.
msg
(
res
.
err_msg
,
{
icon
:
5
});
}
}
return
false
;
...
...
@@ -31,44 +37,59 @@
return
false
;
})
form
.
on
(
'radio(receipt_type)'
,
function
(
data
)
{
form
.
on
(
'radio(receipt_type)'
,
function
(
data
)
{
g
.
receiptType
=
data
.
value
;
if
(
data
.
value
===
'1'
)
{
$
(
'#bank_address_require_span'
)
.
hide
();
$
(
'#nation_id'
)
.
val
(
'36'
);
$
(
'#nation_id'
)
.
attr
(
'disabled'
,
true
);
$
(
'#nation_id'
)
.
addClass
(
'layui-disabled'
);
form
.
render
(
'select'
);
disableNationId
();
}
else
{
$
(
'#nation_id'
)
.
val
(
''
);
$
(
'#nation_id'
)
.
attr
(
'disabled'
,
false
);
$
(
'#nation_id'
)
.
removeClass
(
'layui-disabled'
);
form
.
render
(
'select'
);
enableNationId
();
}
});
if
(
g
.
receiptType
===
'1'
)
{
disableNationId
();
}
else
{
enableNationId
();
}
function
disableNationId
()
{
$
(
'#nation_id'
)
.
val
(
36
);
form
.
render
(
'select'
);
$
(
'#nation_id'
)
.
attr
(
'disabled'
,
true
);
$
(
'#nation_id'
)
.
addClass
(
'layui-disabled'
);
form
.
render
(
'select'
);
}
function
enableNationId
()
{
$
(
'#nation_id'
)
.
attr
(
'disabled'
,
false
);
$
(
'#nation_id'
)
.
removeClass
(
'layui-disabled'
);
form
.
render
(
'select'
);
}
//图片上传
upload
.
render
({
elem
:
'.upload-img'
,
url
:
UploadImgUrl
,
field
:
'upload'
,
data
:
{
k1
:
k1
,
k2
:
k2
,
source
:
1
,
cancel_time_verify
:
1
,
}
k1
:
k1
,
k2
:
k2
,
source
:
1
,
cancel_time_verify
:
1
,
}
,
accept
:
'file'
,
exts
:
'jpg|png|bmp|jpeg|zip|pdf'
,
size
:
20000
,
before
:
function
(
obj
)
{
,
before
:
function
(
obj
)
{
layer
.
msg
(
'加载中'
,
{
icon
:
16
,
shade
:
0.01
});
let
item
=
this
.
item
;
//预读本地文件示例,不支持ie8
obj
.
preview
(
function
(
index
,
file
,
result
)
{
obj
.
preview
(
function
(
index
,
file
,
result
)
{
// if (file.type.indexOf('image') !== -1){
// $('#' + item.attr('preview')).attr('src', result); //图片链接(base64)
// }else{
...
...
@@ -76,20 +97,26 @@
// }
});
}
,
done
:
function
(
res
)
{
,
done
:
function
(
res
)
{
if
(
res
.
code
===
200
)
{
layer
.
msg
(
'上传成功'
,
{
icon
:
6
});
layer
.
msg
(
'上传成功'
,
{
icon
:
6
});
let
item
=
this
.
item
;
$
(
'#'
+
item
.
attr
(
'data-obj'
))
.
val
(
res
.
data
[
0
]);
$
(
'#certificate_url'
)
.
text
(
res
.
data
[
0
]);
return
false
;
}
else
{
layer
.
msg
(
'上传失败,'
+
res
.
message
,
{
icon
:
5
});
layer
.
msg
(
'上传失败,'
+
res
.
message
,
{
icon
:
5
});
return
false
;
}
}
,
error
:
function
(
res
)
{
layer
.
msg
(
'上传失败:'
+
res
.
message
,
{
icon
:
5
});
,
error
:
function
(
res
)
{
layer
.
msg
(
'上传失败:'
+
res
.
message
,
{
icon
:
5
});
return
false
;
}
});
...
...
@@ -97,4 +124,5 @@
}
}));
});
</
script
>
resources/views/web/AddSupplier.blade.php
View file @
51f527e2
...
...
@@ -348,9 +348,9 @@
</div>
</div>
<div
class=
"layui-col-md4"
>
<div
class=
"layui-form-item"
id=
"nation_id_div"
>
<div
class=
"layui-form-item"
id=
"
receipt_
nation_id_div"
>
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('nation_id','国家/地区 : ',0,
{!! $statusPresenter->render('
receipt_
nation_id','国家/地区 : ',0,
$nationList,['required'=>true]) !!}
</div>
</div>
...
...
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