Commit 50a5c0d5 by mushishixian

fix

parent 6cbd7e3e
Showing with 3 additions and 3 deletions
...@@ -42,7 +42,7 @@ class DataService ...@@ -42,7 +42,7 @@ class DataService
$names[] = $name; $names[] = $name;
} }
$names = implode('|', $names); $names = implode('|', $names);
$result[] = ['name' => $item['supplier_name'], 'value' => $names]; $result[] = ['name' => '"'.$item['supplier_name'].'"', 'value' => $names,'code'=>$item['supplier_code']];
} }
// 需要导出的内容 // 需要导出的内容
...@@ -53,9 +53,9 @@ class DataService ...@@ -53,9 +53,9 @@ class DataService
// 拼接文件信息,这里注意两点 // 拼接文件信息,这里注意两点
// 1、字段与字段之间用逗号分隔开 // 1、字段与字段之间用逗号分隔开
// 2、行与行之间需要换行符 // 2、行与行之间需要换行符
$fileData = $this->utfToGbk('姓名, 采购') . "\n"; $fileData = $this->utfToGbk('编码, 姓名, 采购') . "\n";
foreach ($result as $value) { foreach ($result as $value) {
$temp = $value['name'] . ',' . $temp = $value['code'] . ',' . $value['name'] . ',' .
$value['value']; $value['value'];
$fileData .= $this->utfToGbk($temp) . "\n"; $fileData .= $this->utfToGbk($temp) . "\n";
} }
......
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