订单到处增加自定义表单内容,优化客服

This commit is contained in:
evoxwht 2023-05-10 15:01:34 +08:00
parent eceaacc7dc
commit 8dc2e603a9
3 changed files with 25 additions and 3 deletions

View File

@ -86,4 +86,20 @@ class StoreServiceDao extends BaseDao
return $this->getModel()->whereNotIn('uid', $where['notUid'])->update($data);
}
/**
* 统计数量
* @param array $where
* @param bool $search
* @return int
* @throws \ReflectionException
* @author 吴汐
* @email 442384644@qq.com
* @date 2023/05/10
*/
public function count($where = [], $search = true)
{
return $this->search($where, false)->when(isset($where['noId']), function ($query) use ($where) {
$query->whereNotIn('uid', $where['noId']);
})->count();
}
}

View File

@ -74,7 +74,7 @@ class ExportServices extends BaseServices
*/
public function exportOrderList($where)
{
$header = ['订单号', '收货人姓名', '收货人电话', '收货地址', '商品信息', '总价格', '实际支付', '支付状态', '支付时间', '订单状态', '下单时间', '用户备注'];
$header = ['订单号', '收货人姓名', '收货人电话', '收货地址', '商品信息', '总价格', '实际支付', '支付状态', '支付时间', '订单状态', '下单时间', '用户备注', '表单信息'];
$filename = '订单列表_' . date('YmdHis', time());
$export = $fileKey = [];
/** @var StoreOrderServices $orderServices */
@ -127,6 +127,11 @@ class ExportServices extends BaseServices
} else if ($item['paid'] == 1 && $item['refund_status'] == 2) {
$item['status_name'] = '已退款';
}
$custom_form = '';
foreach ($item['custom_form'] as $custom_form_value) {
$custom_form .= $custom_form_value['title'] . ':' . $custom_form_value['value'] . ';';
}
$goodsName = [];
foreach ($item['_info'] as $value) {
$_info = $value['cart_info'];
@ -157,6 +162,7 @@ class ExportServices extends BaseServices
'status_name' => $item['status_name'] ?? '未知状态',
'add_time' => $item['add_time'],
'mark' => $item['mark'],
'custom_form' => $custom_form,
];
$export[] = $one_data;
if ($i == 0) {

View File

@ -18,7 +18,7 @@ const resolve = (dir) => {
// 例如:https://www.foobar.com/my-app/
// 需要将它改为'/my-app/'
// iview-admin线上演示打包路径: https://file.iviewui.com/admin-dist/
// const BASE_URL = process.env.NODE_ENV === 'production' ? '/' : '/';
const BASE_URL = process.env.NODE_ENV === 'production' ? '/' : '/';
const env = process.env.NODE_ENV;
module.exports = {
// Project deployment base
@ -31,7 +31,7 @@ module.exports = {
outputDir: Setting.outputDir,
runtimeCompiler: true,
productionSourceMap: false, //关闭生产环境下的SourceMap映射文件
baseUrl: '/',
baseUrl: BASE_URL,
// tweak internal webpack configuration.
// see https://github.com/vuejs/vue-cli/blob/dev/docs/webpack.md
// 如果你不需要使用eslint,把lintOnSave设为false即可