Commit 50a5c0d5 by mushishixian

fix

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