Commit 6640143b by mushishixian

fix

parent 77caa55a
...@@ -118,7 +118,8 @@ class SupplierApiController extends Controller ...@@ -118,7 +118,8 @@ class SupplierApiController extends Controller
if ($validateResult) { if ($validateResult) {
$this->response(-1, $validateResult); $this->response(-1, $validateResult);
} }
$channel = $request->only($this->channelMap); $channelMap = array_merge($this->channelMap, config('field.AttachmentFields'));
$channel = $request->only($channelMap);
$service = new SupplierService(); $service = new SupplierService();
$result = $service->saveSupplier($channel); $result = $service->saveSupplier($channel);
if (!$result) { if (!$result) {
......
...@@ -22,28 +22,29 @@ ...@@ -22,28 +22,29 @@
}); });
upload.render({ upload.render({
elem: '#upload_button' elem: '#upload_button',
, url: '{{config('website.UploadUrl')}}' //改成您自己的上传接口 url: '{{config('website.UploadUrl')}}', //改成您自己的上传接口
, accept: 'file' //文件 accept: 'file', //文件
, field: 'upload' field: 'upload',
, data: { data: {
k1: k1, k1: k1,
k2: k2, k2: k2,
source: 1, source: 1,
cancel_time_verify: 1, cancel_time_verify: 1,
} },
, exts: 'jpg|png|bmp|jpeg|zip|pdf' multiple: true,
, size: 20000 exts: 'jpg|png|bmp|jpeg|zip|pdf',
, before: function () { size: 20000,
before: function () {
} },
, choose: function (obj) { choose: function (obj) {
var files = this.files = obj.pushFile(); var files = this.files = obj.pushFile();
let recentFile = files[Object.keys(files)[Object.keys(files).length - 1]] let recentFile = files[Object.keys(files)[Object.keys(files).length - 1]]
fileName = recentFile.name; fileName = recentFile.name;
loadIndex = layer.load(1); loadIndex = layer.load(1);
} },
, done: function (res, index, upload) { done: function (res, index, upload) {
if (res.code === 200) { if (res.code === 200) {
//动态添加js //动态添加js
let fileTemplateObj = $('#file_template') let fileTemplateObj = $('#file_template')
...@@ -58,7 +59,7 @@ ...@@ -58,7 +59,7 @@
} }
delete this.files[index]; delete this.files[index];
layer.close(loadIndex); layer.close(loadIndex);
} },
}); });
//删除文件操作 //删除文件操作
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment