Merge branch 'v5.1.0dev' of https://gitee.com/ZhongBangKeJi/CRMEB into v5.1.0dev

This commit is contained in:
From-wh 2023-06-28 17:32:56 +08:00
commit a5a702820b
12 changed files with 64 additions and 24 deletions

View File

@ -59,15 +59,16 @@ class PublicController
*/
public function scanUpload(Request $request, $upload_type = 0, $type = 0)
{
[$file, $uploadToken] = $request->postMore([
[$file, $uploadToken, $pid] = $request->postMore([
['file', 'file'],
['uploadToken', '']
['uploadToken', ''],
['pid', 0]
], true);
$service = app()->make(SystemAttachmentServices::class);
if ($service->cacheDriver()->get('scan_upload') != $uploadToken) {
return app('json')->fail(410086);
}
$service->upload(0, $file, $upload_type, $type, '', $uploadToken);
$service->upload($pid, $file, $upload_type, $type, '', $uploadToken);
return app('json')->success(100032);
}
}

View File

@ -43,7 +43,8 @@ class SystemAttachment extends AuthController
public function index()
{
$where = $this->request->getMore([
['pid', 0]
['pid', 0],
['real_name', '']
]);
return app('json')->success($this->service->getImageList($where));
}
@ -145,9 +146,12 @@ class SystemAttachment extends AuthController
*/
public function scanUploadQrcode()
{
[$pid] = $this->request->getMore([
['pid', 0]
], true);
$uploadToken = md5(time());
$this->service->cacheDriver()->set('scan_upload', $uploadToken, 600);
$url = sys_config('site_url') . '/app/upload?token=' . $uploadToken;
$url = sys_config('site_url') . '/app/upload?token=' . $uploadToken . '&pid=' . $pid;
return app('json')->success(['url' => $url]);
}

View File

@ -38,15 +38,20 @@ class SystemAttachmentCategory extends AuthController
/**
* 显示资源列表
* @return mixed
* @return \think\Response
* @throws \ReflectionException
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function index()
{
$where = $this->request->getMore([
['name', ''],
['pid', 0]
['pid', 0],
['all', 0]
]);
if ($where['name'] != '') $where['pid'] = '';
if ($where['name'] != '' || $where['all'] == 1) $where['pid'] = '';
return app('json')->success($this->service->getAll($where));
}

View File

@ -63,6 +63,16 @@ class SystemAttachment extends BaseModel
*/
public function searchLikeNameAttr($query, $value)
{
if ($value) $query->where('name','LIKE' ,"$value%");
if ($value) $query->where('name', 'LIKE', "$value%");
}
/**
* real_name模糊搜索
* @param Model $query
* @param $value
*/
public function searchRealNameAttr($query, $value)
{
if ($value != '') $query->where('real_name', 'LIKE', "%$value%");
}
}

View File

@ -2689,7 +2689,7 @@ HTML;
}
//发起取消商家寄件
$res = app()->make(ServeServices::class)->express()->shipmentCancelOrder([
app()->make(ServeServices::class)->express()->shipmentCancelOrder([
'task_id' => $orderInfo->kuaidi_task_id,
'order_id' => $orderInfo->kuaidi_order_id,
'cancel_msg' => $msg,
@ -2717,7 +2717,7 @@ HTML;
$orderInfo->save();
});
return $res;
return true;
}
public function checkSubOrderNotSend(int $pid, int $order_id)

View File

@ -41,14 +41,24 @@ class SystemAttachmentCategoryServices extends BaseServices
* 获取分类列表
* @param array $where
* @return array
* @throws \ReflectionException
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function getAll(array $where)
{
$list = $this->dao->getList($where);
foreach ($list as &$item) {
$item['title'] = $item['name'];
$item['children'] = [];
if ($where['name'] == '' && $this->dao->count(['pid' => $item['id']])) $item['loading'] = false;
if ($where['all'] == 1) {
$list = $this->tidyMenuTier($list);
} else {
foreach ($list as &$item) {
$item['title'] = $item['name'];
if ($where['name'] == '' && $this->dao->count(['pid' => $item['id']])) {
$item['loading'] = false;
$item['children'] = [];
}
}
}
return compact('list');
}
@ -67,7 +77,11 @@ class SystemAttachmentCategoryServices extends BaseServices
if ($menu['pid'] == $pid) {
unset($menusList[$k]);
$menu['children'] = $this->tidyMenuTier($menusList, $menu['id']);
if ($menu['children']) $menu['expand'] = true;
if (count($menu['children'])) {
$menu['expand'] = true;
} else {
unset($menu['children']);
}
$navList[] = $menu;
}
}

View File

@ -157,8 +157,7 @@ class SystemAttachmentServices extends BaseServices
*/
public function move(array $data)
{
$res = $this->dao->move($data);
if (!$res) throw new AdminException(400600);
$this->dao->move($data);
}
/**

View File

@ -414,7 +414,7 @@ class UserBrokerageServices extends BaseServices
} elseif ($extract_type == 'bank') {
$item['extract_type'] = '银行卡';
} else {
$item['extract_type'] = '其他';
$item['extract_type'] = '余额';
}
} else {
$item['extract_type'] = '';

View File

@ -118,7 +118,7 @@ export function onlineUpload(data) {
*/
export function scanUploadCode() {
return request({
url: 'scan_upload/qrcode ',
url: 'file/scan_upload/qrcode ',
method: 'delete'
});
}

View File

@ -62,10 +62,12 @@ export default {
uploading: true,
limit: 20,
loading: false,
pid: 0
};
},
created() {
this.token = this.$route.query.token;
this.pid = this.$route.query.pid;
document.title = '手机端扫码上传';
},
methods: {
@ -117,6 +119,7 @@ export default {
const formData = new FormData();
formData.append('file', file);
formData.append('uploadToken', this.token);
formData.append('pid', this.pid);
scanUpload(formData)
.then((res) => {
if (res.status == 200) {

View File

@ -104,8 +104,8 @@ export default {
nickname: '',
comment: '',
},
product_score: 0,
service_score: 0,
product_score: 5,
service_score: 5,
pics: [],
add_time: '',
};

View File

@ -176,9 +176,13 @@
</button>
</div>
<!-- #endif -->
<view class='wrapper' v-if="isReturen == 1">
<view class='wrapper' v-if="isReturen == 1">
<view class='item acea-row row-between'>
<view>{{$t(`申请理由`)}}:</view>
<view class='conter'>{{orderInfo.refund_reason}}</view>
</view>
<view class='item acea-row row-between'>
<view>{{$t(`申请理由`)}}:</view>
<view>{{$t(`用户备注`)}}:</view>
<view class='conter'>{{orderInfo.refund_explain}}</view>
</view>
<view class='item acea-row row-between'>