chore: 优化系统功能与界面体验
- 升级系统版本至1.0.100 - 新增订单详情页物流、资质等信息展示 - 优化师傅报价页收益计算与显示 - 新增企业资质管理模块 - 优化后台标签页管理与交互 - 修复标签解析与地址脱敏问题 - 优化预约时段选择逻辑 - 调整服务类型配置界面布局
这个提交包含在:
@@ -250,10 +250,7 @@ class Appeal extends Backend
|
||||
$appealImages = array_values(array_filter(array_map('trim', explode(',', (string)$row['images']))));
|
||||
$reviewImages = $review ? array_values(array_filter(array_map('trim', explode(',', (string)$review['images'])))) : [];
|
||||
|
||||
$orderStatusMap = [
|
||||
0 => '待支付', 1 => '待接单', 2 => '待上门', 3 => '已到达',
|
||||
4 => '服务中', 5 => '待验收', 6 => '已完成', 9 => '已取消', 10 => '售后/异常'
|
||||
];
|
||||
$orderStatusMap = (new \app\admin\model\Order())->getStatusList();
|
||||
|
||||
$this->view->assign([
|
||||
'row' => $row,
|
||||
|
||||
@@ -33,7 +33,141 @@ class Merchant extends Backend
|
||||
/** 独立展示用户提交的企业资质;审核接口沿用原权限。 */
|
||||
public function certificates()
|
||||
{
|
||||
return $this->view->fetch();
|
||||
$this->request->filter(['strip_tags', 'trim']);
|
||||
$certStatusList = ['pending' => '待审核', 'pass' => '已通过', 'reject' => '已驳回'];
|
||||
if (false === $this->request->isAjax()) {
|
||||
$this->view->assign('certStatusList', $certStatusList);
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
$offset = max(0, (int)$this->request->get('offset', 0));
|
||||
$limit = min(100, max(1, (int)$this->request->get('limit', 20)));
|
||||
$search = trim((string)$this->request->get('search', ''));
|
||||
$sort = (string)$this->request->get('sort', 'id');
|
||||
$order = strtolower((string)$this->request->get('order', 'desc')) === 'asc' ? 'asc' : 'desc';
|
||||
|
||||
$fieldMap = [
|
||||
'id' => 'c.id',
|
||||
'company_name' => 'c.company_name',
|
||||
'license_no' => 'c.license_no',
|
||||
'legal_person' => 'c.legal_person',
|
||||
'verify_status' => 'c.verify_status',
|
||||
'audit_msg' => 'c.audit_msg',
|
||||
'createtime' => 'c.createtime',
|
||||
'updatetime' => 'c.updatetime',
|
||||
'nickname' => 'u.nickname',
|
||||
'mobile' => 'u.mobile',
|
||||
'user_type' => 'u.user_type',
|
||||
];
|
||||
$sortCol = $fieldMap[$sort] ?? 'c.id';
|
||||
|
||||
$filter = json_decode((string)$this->request->get('filter', '{}'), true);
|
||||
$op = json_decode((string)$this->request->get('op', '{}'), true);
|
||||
$filter = is_array($filter) ? $filter : [];
|
||||
$op = is_array($op) ? $op : [];
|
||||
|
||||
$makeQuery = function () use ($search, $filter, $op, $fieldMap) {
|
||||
$query = Db::name('user_enterprise_cert')->alias('c')->join('user u', 'u.id = c.user_id', 'LEFT');
|
||||
if ($search !== '') {
|
||||
$query->where(function ($q) use ($search) {
|
||||
$q->where('c.company_name', 'like', '%' . $search . '%')
|
||||
->whereOr('c.license_no', 'like', '%' . $search . '%')
|
||||
->whereOr('c.legal_person', 'like', '%' . $search . '%')
|
||||
->whereOr('u.nickname', 'like', '%' . $search . '%')
|
||||
->whereOr('u.mobile', 'like', '%' . $search . '%');
|
||||
});
|
||||
}
|
||||
foreach ($filter as $k => $v) {
|
||||
if (!isset($fieldMap[$k]) || $v === '' || $v === null) {
|
||||
continue;
|
||||
}
|
||||
$col = $fieldMap[$k];
|
||||
$sym = strtoupper(trim((string)($op[$k] ?? '=')));
|
||||
if ($sym === 'LIKE') {
|
||||
$query->where($col, 'like', '%' . $v . '%');
|
||||
} elseif ($sym === 'RANGE' && is_string($v) && strpos($v, ' - ') !== false) {
|
||||
[$startStr, $endStr] = explode(' - ', $v, 2);
|
||||
$start = strtotime(trim($startStr));
|
||||
$end = strtotime(trim($endStr));
|
||||
if ($start !== false && $end !== false) {
|
||||
$query->where($col, 'between', [$start, $end]);
|
||||
}
|
||||
} else {
|
||||
$query->where($col, '=', $v);
|
||||
}
|
||||
}
|
||||
return $query;
|
||||
};
|
||||
|
||||
$total = $makeQuery()->count();
|
||||
$rows = $makeQuery()
|
||||
->field('c.*, u.nickname, u.mobile, u.user_type')
|
||||
->order($sortCol, $order)
|
||||
->limit($offset, $limit)
|
||||
->select();
|
||||
|
||||
foreach ($rows as &$row) {
|
||||
$row['license_url'] = !empty($row['license_image']) ? cdnurl($row['license_image'], true) : '';
|
||||
}
|
||||
unset($row);
|
||||
|
||||
return json(['total' => $total, 'rows' => $rows]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 企业资质详情与审核弹窗(待审核时可提交审核结论,已处理时展示只读审核结果)
|
||||
*/
|
||||
public function auditCert($ids = null)
|
||||
{
|
||||
$id = (int)$ids;
|
||||
$row = Db::name('user_enterprise_cert')->alias('c')
|
||||
->join('user u', 'u.id = c.user_id', 'LEFT')
|
||||
->field('c.*, u.nickname, u.mobile, u.user_type')
|
||||
->where('c.id', $id)
|
||||
->find();
|
||||
if (!$row) {
|
||||
$this->error(__('No Results were found'));
|
||||
}
|
||||
|
||||
$canAudit = $this->auth->check('merchant/edit') || $this->auth->check('merchant/auditcert');
|
||||
|
||||
if (false === $this->request->isPost()) {
|
||||
$row['license_url'] = !empty($row['license_image']) ? cdnurl($row['license_image'], true) : '';
|
||||
$this->view->assign('row', $row);
|
||||
$this->view->assign('canAudit', $canAudit);
|
||||
return $this->view->fetch('audit_cert');
|
||||
}
|
||||
|
||||
if (!$canAudit) {
|
||||
$this->error('无权审核企业资质');
|
||||
}
|
||||
|
||||
$params = $this->request->post('row/a', []);
|
||||
$decision = trim((string)($params['verify_status'] ?? ''));
|
||||
$reason = trim((string)($params['audit_msg'] ?? ''));
|
||||
|
||||
if (!in_array($decision, ['pass', 'reject'], true)) {
|
||||
$this->error('请选择审核结论(通过或驳回)');
|
||||
}
|
||||
if ($decision === 'reject' && $reason === '') {
|
||||
$this->error('驳回申请时必须填写驳回原因');
|
||||
}
|
||||
if (mb_strlen($reason) > 500) {
|
||||
$this->error('审核意见不能超过500字');
|
||||
}
|
||||
|
||||
$updated = Db::name('user_enterprise_cert')
|
||||
->where('id', $id)
|
||||
->where('verify_status', 'pending')
|
||||
->update([
|
||||
'verify_status' => $decision,
|
||||
'audit_msg' => $decision === 'reject' ? $reason : '',
|
||||
'updatetime' => time(),
|
||||
]);
|
||||
if (!$updated) {
|
||||
$this->error('申请不存在或已处理,请刷新');
|
||||
}
|
||||
$this->success('审核完成');
|
||||
}
|
||||
|
||||
public function index()
|
||||
|
||||
@@ -241,7 +241,11 @@ class Review extends Backend
|
||||
*/
|
||||
protected function parseTags($raw)
|
||||
{
|
||||
$raw = trim((string)$raw);
|
||||
$raw = trim(html_entity_decode((string)$raw, ENT_QUOTES, 'UTF-8'));
|
||||
// 兼容双重 HTML 转义
|
||||
if (strpos($raw, '"') !== false || strpos($raw, ''') !== false) {
|
||||
$raw = trim(html_entity_decode($raw, ENT_QUOTES, 'UTF-8'));
|
||||
}
|
||||
if ($raw === '') {
|
||||
return [];
|
||||
}
|
||||
@@ -250,6 +254,9 @@ class Review extends Backend
|
||||
if (is_array($arr)) {
|
||||
return array_values(array_filter(array_map('trim', $arr)));
|
||||
}
|
||||
if (preg_match_all('/"([^"]+)"/', $raw, $m) && !empty($m[1])) {
|
||||
return array_values(array_filter(array_map('trim', $m[1])));
|
||||
}
|
||||
}
|
||||
return array_values(array_filter(array_map('trim', explode(',', $raw))));
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ class Showcase extends Backend
|
||||
|
||||
protected function parseTags($raw)
|
||||
{
|
||||
$raw = trim((string)$raw);
|
||||
$raw = trim(html_entity_decode((string)$raw, ENT_QUOTES, 'UTF-8'));
|
||||
if ($raw === '') {
|
||||
return [];
|
||||
}
|
||||
@@ -163,6 +163,10 @@ class Showcase extends Backend
|
||||
if (is_array($arr)) {
|
||||
return array_values(array_filter(array_map('trim', $arr)));
|
||||
}
|
||||
// 兼容非标准 JSON(如空格分隔未加逗号)
|
||||
if (preg_match_all('/"([^"]+)"/', $raw, $m) && !empty($m[1])) {
|
||||
return array_values(array_filter(array_map('trim', $m[1])));
|
||||
}
|
||||
}
|
||||
return array_values(array_filter(array_map('trim', explode(',', $raw))));
|
||||
}
|
||||
|
||||
@@ -75,10 +75,19 @@ class Config extends Backend
|
||||
}
|
||||
$siteList[$v['group']]['list'][] = $value;
|
||||
}
|
||||
$index = 0;
|
||||
$hasActive = false;
|
||||
foreach ($siteList as $k => &$v) {
|
||||
$v['active'] = !$index ? true : false;
|
||||
$index++;
|
||||
if (!$hasActive && !empty($v['list'])) {
|
||||
$v['active'] = true;
|
||||
$hasActive = true;
|
||||
} else {
|
||||
$v['active'] = false;
|
||||
}
|
||||
}
|
||||
unset($v);
|
||||
if (!$hasActive && !empty($siteList)) {
|
||||
$firstKey = array_key_first($siteList);
|
||||
$siteList[$firstKey]['active'] = true;
|
||||
}
|
||||
$this->view->assign('siteList', $siteList);
|
||||
$this->view->assign('typeList', ConfigModel::getTypeList());
|
||||
|
||||
@@ -17,9 +17,33 @@
|
||||
</a>
|
||||
|
||||
<!--如果不想在顶部显示角标,则给ul加上disable-top-badge类即可-->
|
||||
<ul class="nav nav-tabs nav-addtabs disable-top-badge hidden-xs" role="tablist">
|
||||
{$navlist}
|
||||
</ul>
|
||||
<div class="yjyf-tabs-wrap hidden-xs">
|
||||
<button type="button" class="yjyf-tabs-scroll-btn yjyf-tabs-prev hide" title="向左滚动" aria-label="向左滚动">
|
||||
<i class="fa fa-angle-left"></i>
|
||||
</button>
|
||||
<ul class="nav nav-tabs nav-addtabs disable-top-badge hidden-xs" role="tablist">
|
||||
{$navlist}
|
||||
</ul>
|
||||
<button type="button" class="yjyf-tabs-scroll-btn yjyf-tabs-next hide" title="向右滚动" aria-label="向右滚动">
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</button>
|
||||
{if !$Think.config.fastadmin.multiplenav}
|
||||
<div class="dropdown yjyf-tabs-actions">
|
||||
<a href="javascript:;" class="dropdown-toggle yjyf-tabs-action-btn" data-toggle="dropdown" title="标签页管理" aria-expanded="false">
|
||||
<span class="yjyf-tabs-count">1</span>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu-right yjyf-tabs-dropdown">
|
||||
<li class="yjyf-tabs-op"><a href="javascript:;" data-tab-action="refresh"><i class="fa fa-refresh fa-fw"></i> 刷新当前页面</a></li>
|
||||
<li class="yjyf-tabs-op"><a href="javascript:;" data-tab-action="close-current"><i class="fa fa-times fa-fw"></i> 关闭当前标签</a></li>
|
||||
<li class="yjyf-tabs-op"><a href="javascript:;" data-tab-action="close-other"><i class="fa fa-minus-circle fa-fw"></i> 关闭其他标签</a></li>
|
||||
<li class="yjyf-tabs-op"><a href="javascript:;" data-tab-action="close-all"><i class="fa fa-trash-o fa-fw"></i> 关闭全部标签</a></li>
|
||||
<li class="divider"></li>
|
||||
<li class="dropdown-header yjyf-tabs-list-header">已打开页面</li>
|
||||
</ul>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div class="navbar-custom-menu">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
{/if}
|
||||
|
||||
<!-- 现代企业级 SaaS 统一视觉规范样式引擎 -->
|
||||
<link href="__CDN__/assets/css/theme-modern.css?v={$Think.config.site.version|htmlentities}" rel="stylesheet">
|
||||
<link href="__CDN__/assets/css/theme-modern.css?v={$Think.config.site.version|htmlentities}-20261124c" rel="stylesheet">
|
||||
|
||||
<!-- 优匠优服 橙白企业级品牌视觉引擎 -->
|
||||
<link href="__CDN__/assets/css/theme-qibing-orange.css?v={$Think.config.site.version|htmlentities}" rel="stylesheet">
|
||||
<link href="__CDN__/assets/css/theme-qibing-orange.css?v={$Think.config.site.version|htmlentities}-20261124c" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
/* The image viewer sits above existing dialogs and has its own close control. */
|
||||
@@ -60,7 +60,7 @@
|
||||
var require = {
|
||||
config: {$config|json_encode}
|
||||
};
|
||||
require.config.site.version += "-admin-list-20261119";
|
||||
require.config.site.version += "-admin-ui-fix-20261124c";
|
||||
if (require.config.controllername === 'merchant' || require.config.controllername === 'user.user') {
|
||||
require.config.site.version += "-identity-security-20261121";
|
||||
}
|
||||
|
||||
@@ -179,6 +179,12 @@
|
||||
padding: 4px 8px !important;
|
||||
font-size: 12px !important;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.fc-card-box-body .form-horizontal .control-label {
|
||||
white-space: nowrap;
|
||||
min-width: 148px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="panel panel-default panel-intro">
|
||||
@@ -274,13 +280,13 @@
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="row[include_diff_in_commission]" value="1" {if $cfg.include_diff_in_commission == '1'}checked{/if}>
|
||||
<strong class="text-primary"><i class="fa fa-check-circle"></i> 计入平台抽佣</strong>(推荐:按「主单 + 增项」总付款抽成,杜绝师傅与客户故意低报主单逃佣)
|
||||
<strong class="text-primary">计入平台抽佣</strong>(推荐:按「主单 + 增项」总付款抽成,杜绝师傅与客户故意低报主单逃佣)
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio" style="margin-top:8px;">
|
||||
<label>
|
||||
<input type="radio" name="row[include_diff_in_commission]" value="0" {if $cfg.include_diff_in_commission == '0'}checked{/if}>
|
||||
<strong class="text-muted"><i class="fa fa-circle-o"></i> 增项免抽佣</strong>(增项款 100% 归师傅,仅对主单金额按比例扣佣)
|
||||
<strong class="text-muted">增项免抽佣</strong>(增项款 100% 归师傅,仅对主单金额按比例扣佣)
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -451,7 +457,7 @@
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">单笔提现范围:</label>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<div class="fc-inline-range">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">最低 ¥</span>
|
||||
@@ -469,7 +475,7 @@
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">单人单日限制:</label>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<div class="fc-inline-range">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">单日累计最高 ¥</span>
|
||||
|
||||
@@ -100,11 +100,11 @@
|
||||
<div class="panel-body">
|
||||
<div id="myTabContent" class="tab-content">
|
||||
<div class="tab-pane fade active in" id="one">
|
||||
<div class="widget-body no-padding">
|
||||
<div class="widget-body no-padding" style="max-width:100%; overflow-x:auto;">
|
||||
<div id="toolbar" class="toolbar">
|
||||
{:build_toolbar('refresh')}
|
||||
</div>
|
||||
<table id="table" class="table table-striped table-bordered table-hover table-nowrap" width="100%">
|
||||
<table id="table" class="table table-striped table-bordered table-hover" width="100%">
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
@@ -96,6 +96,8 @@
|
||||
font-weight: 500;
|
||||
color: #64748b;
|
||||
margin-bottom: 8px;
|
||||
padding-right: 56px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.kpi-deck-card .kpi-value {
|
||||
font-size: 30px;
|
||||
@@ -112,6 +114,8 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px 10px;
|
||||
font-size: 12px;
|
||||
color: #64748b;
|
||||
}
|
||||
@@ -178,10 +182,11 @@
|
||||
background: #ffffff;
|
||||
border: 1px solid #e2e8f0;
|
||||
border-radius: 10px;
|
||||
padding: 14px;
|
||||
padding: 12px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
text-decoration: none !important;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
@@ -194,22 +199,24 @@
|
||||
.action-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-width: 0;
|
||||
}
|
||||
.action-icon {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 10px;
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 18px;
|
||||
margin-right: 12px;
|
||||
font-size: 15px;
|
||||
margin-right: 10px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.action-text .name {
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
color: #1e293b;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.action-text .sub {
|
||||
font-size: 11px;
|
||||
@@ -217,9 +224,10 @@
|
||||
margin-top: 2px;
|
||||
}
|
||||
.action-num {
|
||||
font-size: 22px;
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
font-variant-numeric: tabular-nums;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* 师傅运力健康监控条 */
|
||||
@@ -248,6 +256,7 @@
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: #64748b;
|
||||
white-space: nowrap;
|
||||
background: #f8fafc;
|
||||
border-bottom: 1px solid #e2e8f0 !important;
|
||||
padding: 10px 14px !important;
|
||||
|
||||
@@ -526,22 +526,26 @@
|
||||
|
||||
{include file="common/script" /}
|
||||
<script type="text/javascript">
|
||||
// 确保在 RequireJS 加载完成后安全绑定,避免全局 $ 未定义
|
||||
if (typeof require === 'function') {
|
||||
require(['jquery'], function ($) {
|
||||
$(document).ajaxComplete(function (event, xhr, settings) {
|
||||
if (settings && settings.url && settings.url.indexOf('login') !== -1) {
|
||||
try {
|
||||
var json = JSON.parse(xhr.responseText);
|
||||
if (json && json.code === 0) {
|
||||
var img = document.querySelector(".captcha-badge-box img");
|
||||
if (img) img.click();
|
||||
}
|
||||
} catch (e) {}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
// 等待 require-backend.js 完成 RequireJS 配置并挂载 jQuery,避免提前 require(['jquery']) 触发 404
|
||||
(function bindLoginCaptchaRefresh() {
|
||||
var timer = setInterval(function () {
|
||||
if (window.jQuery) {
|
||||
clearInterval(timer);
|
||||
window.jQuery(document).ajaxComplete(function (event, xhr, settings) {
|
||||
if (settings && settings.url && settings.url.indexOf('login') !== -1) {
|
||||
try {
|
||||
var json = JSON.parse(xhr.responseText);
|
||||
if (json && json.code === 0) {
|
||||
var img = document.querySelector(".captcha-badge-box img");
|
||||
if (img) img.click();
|
||||
}
|
||||
} catch (e) {}
|
||||
}
|
||||
});
|
||||
}
|
||||
}, 50);
|
||||
setTimeout(function () { clearInterval(timer); }, 10000);
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -37,14 +37,14 @@
|
||||
.md-card-title i { color: #f97316; }
|
||||
.md-card-body { padding: 16px; min-width: 0; }
|
||||
.md-table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
|
||||
.md-table-scroll table { min-width: 560px; }
|
||||
.md-table-scroll table { width: 100%; min-width: 420px; }
|
||||
.md-grid-list { min-width: 0; }
|
||||
.md-item-v { min-width: 0; }
|
||||
.master-detail-container .md-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 0 24px; }
|
||||
@media (max-width: 900px) {
|
||||
@media (max-width: 1100px) {
|
||||
.master-detail-container > .row > .col-sm-6 { width: 100%; float: none; }
|
||||
}
|
||||
@media (max-width: 500px) {
|
||||
@media (max-width: 960px) {
|
||||
.md-grid-list { grid-template-columns: 1fr !important; }
|
||||
.md-grid-list .md-item { grid-column: auto !important; }
|
||||
.md-kpi-grid { flex-wrap: wrap; }
|
||||
|
||||
@@ -0,0 +1,218 @@
|
||||
<style>
|
||||
.cert-license-box { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; padding: 12px; text-align: center; }
|
||||
.cert-license-img { max-width: 100%; max-height: 300px; border-radius: 4px; border: 1px solid #cbd5e1; background: #fff; cursor: pointer; }
|
||||
.cert-license-empty { padding: 36px 0; color: #94a3b8; }
|
||||
.quick-reasons { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
|
||||
.btn-quick-reason { font-size: 12px; padding: 3px 10px; border-radius: 12px; border: 1px dashed #cbd5e1; background: #fff; color: #64748b; cursor: pointer; transition: all 0.2s; }
|
||||
.btn-quick-reason:hover { border-color: #f0710d; color: #f0710d; background: #fff7f0; }
|
||||
</style>
|
||||
|
||||
<form id="audit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
||||
<div class="panel panel-default" style="margin-bottom: 14px;">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title"><i class="fa fa-building-o"></i> 企业资质申报信息(只读核验)</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-4">申请编号:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<p class="form-control-static"><code>#{$row.id}</code></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-4">当前状态:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<p class="form-control-static">
|
||||
{if $row.verify_status == 'pass'}
|
||||
<span class="label label-success">已通过</span>
|
||||
{elseif $row.verify_status == 'reject'/}
|
||||
<span class="label label-danger">已驳回</span>
|
||||
{else/}
|
||||
<span class="label label-warning">待审核</span>
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-4">申请用户:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<p class="form-control-static">
|
||||
<strong>{$row.nickname|default='-'|htmlentities}</strong>
|
||||
{if !empty($row.mobile)}<span class="text-muted">({$row.mobile|htmlentities})</span>{/if}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-4">用户类型:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<p class="form-control-static">
|
||||
{if $row.user_type == 'merchant'}
|
||||
<span class="label label-primary">商家用户</span>
|
||||
{else/}
|
||||
<span class="label label-default">个人用户</span>
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-4">企业名称:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<p class="form-control-static"><strong>{$row.company_name|default='-'|htmlentities}</strong></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-4">法人姓名:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<p class="form-control-static"><strong>{$row.legal_person|default='-'|htmlentities}</strong></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-4">营业执照号:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<p class="form-control-static"><code style="font-size:14px; font-weight:600;">{$row.license_no|default='-'|htmlentities}</code></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-4">提交时间:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<p class="form-control-static text-muted">{$row.createtime|datetime}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" style="margin-bottom:0;">
|
||||
<label class="control-label col-xs-12 col-sm-2">营业执照:</label>
|
||||
<div class="col-xs-12 col-sm-10">
|
||||
<div class="cert-license-box">
|
||||
{if !empty($row.license_url)}
|
||||
<a href="{$row.license_url|htmlentities}" target="_blank" title="点击新窗口查看高清原图">
|
||||
<img class="cert-license-img" src="{$row.license_url|htmlentities}"
|
||||
onerror="this.style.display='none';this.parentNode.nextElementSibling.style.display='block';" />
|
||||
</a>
|
||||
<div class="cert-license-empty" style="display:none;">
|
||||
<i class="fa fa-exclamation-triangle fa-2x text-warning"></i><br>
|
||||
<span>营业执照图片加载失败或文件不存在</span>
|
||||
</div>
|
||||
<div class="help-block" style="margin-bottom:0; margin-top:6px;">点击图片可在新窗口放大核验企业名称、统一社会信用代码与法人信息</div>
|
||||
{else/}
|
||||
<div class="cert-license-empty">
|
||||
<i class="fa fa-picture-o fa-2x"></i><br>
|
||||
<span>未上传营业执照图片</span>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title"><i class="fa fa-gavel"></i> 平台审核结论</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{if $row.verify_status != 'pending'}
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-4">审核结论:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<p class="form-control-static">
|
||||
{if $row.verify_status == 'pass'}
|
||||
<span class="label label-success">审核通过</span>
|
||||
{else/}
|
||||
<span class="label label-danger">已驳回</span>
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-4">处理时间:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<p class="form-control-static text-muted">{$row.updatetime|datetime}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="margin-bottom:0;">
|
||||
<label class="control-label col-xs-12 col-sm-2">审核意见:</label>
|
||||
<div class="col-xs-12 col-sm-10">
|
||||
<p class="form-control-static">{$row.audit_msg|default='-'|htmlentities}</p>
|
||||
</div>
|
||||
</div>
|
||||
{elseif !$canAudit/}
|
||||
<div class="alert alert-info" style="margin-bottom:0;">
|
||||
当前申请处于「待审核」状态,您暂无审核操作权限。
|
||||
</div>
|
||||
{else/}
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">审核结论:</label>
|
||||
<div class="col-xs-12 col-sm-9">
|
||||
<div class="radio">
|
||||
<label for="row[verify_status]-pass" style="margin-right:20px;">
|
||||
<input id="row[verify_status]-pass" name="row[verify_status]" type="radio" value="pass" data-rule="checked" />
|
||||
<span class="text-success"><strong>审核通过</strong></span>
|
||||
</label>
|
||||
<label for="row[verify_status]-reject">
|
||||
<input id="row[verify_status]-reject" name="row[verify_status]" type="radio" value="reject" data-rule="checked" />
|
||||
<span class="text-danger"><strong>驳回申请</strong></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" style="margin-bottom:0;">
|
||||
<label class="control-label col-xs-12 col-sm-2" for="c-audit_msg">审核意见:</label>
|
||||
<div class="col-xs-12 col-sm-9">
|
||||
<textarea id="c-audit_msg" class="form-control" rows="3" name="row[audit_msg]" placeholder="通过可留空;选择驳回时必须填写驳回原因(最多500字)"></textarea>
|
||||
<div class="quick-reasons">
|
||||
<span class="btn-quick-reason" data-text="营业执照照片模糊不清,请重新上传高清完整原件">照片模糊不清</span>
|
||||
<span class="btn-quick-reason" data-text="企业名称与营业执照不一致,请核对后重新提交">企业名称不一致</span>
|
||||
<span class="btn-quick-reason" data-text="营业执照号码填写有误,请核对统一社会信用代码">执照号码有误</span>
|
||||
<span class="btn-quick-reason" data-text="法人姓名与营业执照登记信息不符">法人信息不符</span>
|
||||
<span class="btn-quick-reason" data-text="请上传有效期内且加盖公章或清晰的营业执照正副本">证件无效或已过期</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if $row.verify_status == 'pending' && $canAudit}
|
||||
<div class="form-group layer-footer">
|
||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
|
||||
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</form>
|
||||
@@ -1,8 +1,28 @@
|
||||
<div class="panel panel-default panel-intro">
|
||||
<div class="panel-heading"><strong>企业资质审核</strong><p class="text-muted">个人用户和商家用户均可提交企业资质认证;认证不会改变用户类型。</p></div>
|
||||
<div class="panel-heading">
|
||||
<div class="panel-lead"><em>企业资质审核</em>个人用户和商家用户均可提交企业资质认证;认证不会改变用户类型。</div>
|
||||
<ul class="nav nav-tabs" data-field="verify_status">
|
||||
<li class="{:$Think.get.verify_status === null ? 'active' : ''}"><a href="#t-all" data-value="" data-toggle="tab">全部申请</a></li>
|
||||
{foreach name="certStatusList" item="vo"}
|
||||
<li class="{:$Think.get.verify_status === (string)$key ? 'active' : ''}"><a href="#t-{$key}" data-value="{$key}" data-toggle="tab">{$vo}</a></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<form id="cert-audit-token">{:token()}</form>
|
||||
<div id="certs-toolbar" class="toolbar"><a href="javascript:;" class="btn btn-primary" id="certs-refresh" title="刷新"><i class="fa fa-refresh"></i></a></div>
|
||||
<table id="certs-table" class="table table-striped table-bordered table-hover table-nowrap" data-operate-audit="{:$auth->check('merchant/edit')}" width="100%"></table>
|
||||
<div id="myTabContent" class="tab-content">
|
||||
<div class="tab-pane fade active in" id="one">
|
||||
<div class="widget-body no-padding">
|
||||
<div id="toolbar" class="toolbar">
|
||||
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}"><i class="fa fa-refresh"></i></a>
|
||||
</div>
|
||||
<table id="table" class="table table-striped table-bordered table-hover"
|
||||
data-operate-detail="1"
|
||||
data-operate-audit="{:$auth->check('merchant/edit') || $auth->check('merchant/auditcert') ? '1' : '0'}"
|
||||
width="100%">
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -29,27 +29,27 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">可用角色:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<div class="col-xs-12 col-sm-10">
|
||||
<div class="row">
|
||||
<div class="col-xs-4">
|
||||
<div class="col-xs-12 col-sm-3">
|
||||
<label class="control-label" style="padding-top:0; font-weight:normal;">可作为【主服务项目】:</label>
|
||||
<div class="radio">
|
||||
<label><input name="row[can_be_main]" type="radio" value="1" checked /> 是</label>
|
||||
<label><input name="row[can_be_main]" type="radio" value="0" /> 否</label>
|
||||
<label style="margin-left:8px;"><input name="row[can_be_main]" type="radio" value="0" /> 否</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<div class="col-xs-12 col-sm-3">
|
||||
<label class="control-label" style="padding-top:0; font-weight:normal;">可作为【增项服务】:</label>
|
||||
<div class="radio">
|
||||
<label><input name="row[can_be_addon]" type="radio" value="1" /> 是</label>
|
||||
<label><input name="row[can_be_addon]" type="radio" value="0" checked /> 否</label>
|
||||
<label style="margin-left:8px;"><input name="row[can_be_addon]" type="radio" value="0" checked /> 否</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<label class="control-label" style="padding-top:0; font-weight:normal;">是否【支持一口价】:</label>
|
||||
<div class="radio">
|
||||
<div class="radio" style="white-space:nowrap;">
|
||||
<label><input name="row[support_fixed]" type="radio" value="1" checked /> 支持一口价</label>
|
||||
<label><input name="row[support_fixed]" type="radio" value="0" /> 仅师傅报价</label>
|
||||
<label style="margin-left:10px;"><input name="row[support_fixed]" type="radio" value="0" /> 仅师傅报价</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -63,32 +63,37 @@
|
||||
<h4 class="panel-title"><i class="fa fa-sliders"></i> 排序与启用状态</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">运营配置:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<div class="row">
|
||||
<div class="col-xs-4">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">排序权重</span>
|
||||
<input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number" value="50">
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-4">排序权重:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number" value="50">
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<div class="radio" style="padding-top: 7px;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-4">默认首选:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<div class="radio">
|
||||
<label><input name="row[is_default]" type="radio" value="1" /> 默认首选服务</label>
|
||||
<label><input name="row[is_default]" type="radio" value="0" checked /> 普通服务</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<div class="radio" style="padding-top: 7px;">
|
||||
{foreach name="statusList" item="vo"}
|
||||
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="normal"}checked{/in} /> {$vo}</label>
|
||||
{/foreach}
|
||||
<label style="margin-left:12px;"><input name="row[is_default]" type="radio" value="0" checked /> 普通服务</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">启用状态:</label>
|
||||
<div class="col-xs-12 col-sm-10">
|
||||
<div class="radio">
|
||||
{foreach name="statusList" item="vo"}
|
||||
<label for="row[status]-{$key}" style="margin-right:16px;"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="normal"}checked{/in} /> {$vo}</label>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -29,27 +29,27 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">可用角色:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<div class="col-xs-12 col-sm-10">
|
||||
<div class="row">
|
||||
<div class="col-xs-4">
|
||||
<div class="col-xs-12 col-sm-3">
|
||||
<label class="control-label" style="padding-top:0; font-weight:normal;">可作为【主服务项目】:</label>
|
||||
<div class="radio">
|
||||
<label><input name="row[can_be_main]" type="radio" value="1" {if $row.can_be_main==1}checked{/if} /> 是</label>
|
||||
<label><input name="row[can_be_main]" type="radio" value="0" {if $row.can_be_main==0}checked{/if} /> 否</label>
|
||||
<label style="margin-left:8px;"><input name="row[can_be_main]" type="radio" value="0" {if $row.can_be_main==0}checked{/if} /> 否</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<div class="col-xs-12 col-sm-3">
|
||||
<label class="control-label" style="padding-top:0; font-weight:normal;">可作为【增项服务】:</label>
|
||||
<div class="radio">
|
||||
<label><input name="row[can_be_addon]" type="radio" value="1" {if $row.can_be_addon==1}checked{/if} /> 是</label>
|
||||
<label><input name="row[can_be_addon]" type="radio" value="0" {if $row.can_be_addon==0}checked{/if} /> 否</label>
|
||||
<label style="margin-left:8px;"><input name="row[can_be_addon]" type="radio" value="0" {if $row.can_be_addon==0}checked{/if} /> 否</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<label class="control-label" style="padding-top:0; font-weight:normal;">是否【支持一口价】:</label>
|
||||
<div class="radio">
|
||||
<div class="radio" style="white-space:nowrap;">
|
||||
<label><input name="row[support_fixed]" type="radio" value="1" {if $row.support_fixed==1}checked{/if} /> 支持一口价</label>
|
||||
<label><input name="row[support_fixed]" type="radio" value="0" {if $row.support_fixed==0}checked{/if} /> 仅师傅报价</label>
|
||||
<label style="margin-left:10px;"><input name="row[support_fixed]" type="radio" value="0" {if $row.support_fixed==0}checked{/if} /> 仅师傅报价</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -63,32 +63,37 @@
|
||||
<h4 class="panel-title"><i class="fa fa-sliders"></i> 排序与启用状态</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">运营配置:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<div class="row">
|
||||
<div class="col-xs-4">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">排序权重</span>
|
||||
<input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number" value="{$row.weigh|htmlentities}">
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-4">排序权重:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number" value="{$row.weigh|htmlentities}">
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<div class="radio" style="padding-top: 7px;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-4">默认首选:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<div class="radio">
|
||||
<label><input name="row[is_default]" type="radio" value="1" {if $row.is_default==1}checked{/if} /> 默认首选服务</label>
|
||||
<label><input name="row[is_default]" type="radio" value="0" {if $row.is_default==0}checked{/if} /> 普通服务</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<div class="radio" style="padding-top: 7px;">
|
||||
{foreach name="statusList" item="vo"}
|
||||
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label>
|
||||
{/foreach}
|
||||
<label style="margin-left:12px;"><input name="row[is_default]" type="radio" value="0" {if $row.is_default==0}checked{/if} /> 普通服务</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">启用状态:</label>
|
||||
<div class="col-xs-12 col-sm-10">
|
||||
<div class="radio">
|
||||
{foreach name="statusList" item="vo"}
|
||||
<label for="row[status]-{$key}" style="margin-right:16px;"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -836,6 +836,8 @@ class Home extends Base
|
||||
|
||||
// 支持多商品组合与增项计算(一口价模式下强制从 fa_service 与 fa_service_spec 读取真实价格,严禁采信前端传入 base_price)
|
||||
$base = 0;
|
||||
$goodsAmount = 0.0;
|
||||
$addonAmount = 0.0;
|
||||
$pricedLines = [];
|
||||
$dictionary = null;
|
||||
if (!empty($goodsList) && is_array($goodsList)) {
|
||||
@@ -869,7 +871,13 @@ class Home extends Base
|
||||
$dictionary = $dictionary ?? ProductPricing::dictionary();
|
||||
$line = self::configuredLine($dbSvc, $config, $dictionary, $g, $isFixedLike);
|
||||
$pricedLines[$index] = $line;
|
||||
$base += $line['total_cents'] / 100;
|
||||
$lineTotal = $line['total_cents'] / 100;
|
||||
$itemNum = max(1, (int)($g['num'] ?? $g['goods_num'] ?? 1));
|
||||
$lineGoods = $isFixedLike ? round(((float)($line['base_price'] ?? 0)) * $itemNum, 2) : 0.0;
|
||||
$lineAddon = $isFixedLike ? max(0.0, round($lineTotal - $lineGoods, 2)) : 0.0;
|
||||
$goodsAmount += $lineGoods;
|
||||
$addonAmount += $lineAddon;
|
||||
$base += $lineTotal;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -973,7 +981,9 @@ class Home extends Base
|
||||
}
|
||||
|
||||
$itemNum = isset($g['num']) ? max(1, (int)$g['num']) : (isset($g['goods_num']) ? max(1, (int)$g['goods_num']) : 1);
|
||||
$base += round($itemPrice * $itemNum, 2);
|
||||
$lineGoods = round($itemPrice * $itemNum, 2);
|
||||
$goodsAmount += $lineGoods;
|
||||
$base += $lineGoods;
|
||||
$curAddonsList = !empty($g['extras']) && is_array($g['extras'])
|
||||
? $g['extras']
|
||||
: (!empty($g['addons']) && is_array($g['addons']) ? $g['addons'] : []);
|
||||
@@ -993,13 +1003,18 @@ class Home extends Base
|
||||
} elseif (!$isFixedLike && isset($ex['price'])) {
|
||||
$exPrice = max(0, (float)$ex['price']);
|
||||
}
|
||||
$base += round($exPrice * $exNum, 2);
|
||||
$lineAddon = round($exPrice * $exNum, 2);
|
||||
$addonAmount += $lineAddon;
|
||||
$base += $lineAddon;
|
||||
}
|
||||
}
|
||||
}
|
||||
} elseif ($service && ($config = ProductPricing::read($service))) {
|
||||
$pricedLines[0] = self::configuredLine($service, $config, ProductPricing::dictionary(), $params, $isFixedLike);
|
||||
$base = $pricedLines[0]['total_cents'] / 100;
|
||||
$itemNum = max(1, (int)($params['goods_num'] ?? 1));
|
||||
$goodsAmount = $isFixedLike ? round(((float)($pricedLines[0]['base_price'] ?? 0)) * $itemNum, 2) : 0.0;
|
||||
$addonAmount = $isFixedLike ? max(0.0, round($base - $goodsAmount, 2)) : 0.0;
|
||||
} elseif ($service) {
|
||||
if ($isFixedLike && $service['price_type'] === 'quote') {
|
||||
throw new \InvalidArgumentException('该服务项目不支持一口价模式,请切换为师傅报价或自主定价');
|
||||
@@ -1055,7 +1070,8 @@ class Home extends Base
|
||||
throw new \InvalidArgumentException('该服务项目暂未配置有效一口价,请切换为师傅报价或自主定价');
|
||||
}
|
||||
$goodsNum = isset($params['goods_num']) ? max(1, (int)$params['goods_num']) : 1;
|
||||
$base = round($unitPrice * $goodsNum, 2);
|
||||
$goodsAmount = round($unitPrice * $goodsNum, 2);
|
||||
$base = $goodsAmount;
|
||||
|
||||
$singleAddons = !empty($params['extras']) && is_array($params['extras'])
|
||||
? $params['extras']
|
||||
@@ -1094,7 +1110,9 @@ class Home extends Base
|
||||
} elseif (!$isFixedLike && isset($ex['price'])) {
|
||||
$exPrice = max(0, (float)$ex['price']);
|
||||
}
|
||||
$base += round($exPrice * $exNum, 2);
|
||||
$lineAddon = round($exPrice * $exNum, 2);
|
||||
$addonAmount += $lineAddon;
|
||||
$base += $lineAddon;
|
||||
}
|
||||
}
|
||||
} elseif ($isFixedLike && (!empty($params['is_custom']) || $isStrict || (isset($params['base_price']) && (float)$params['base_price'] > 0))) {
|
||||
@@ -1107,9 +1125,13 @@ class Home extends Base
|
||||
if ($type === 'custom') {
|
||||
// 用户自主定价:出价即订单总价,已包含楼层费/加急费,师傅按此价接单
|
||||
$base = max(0, round((float)$userPrice, 2));
|
||||
$goodsAmount = $base;
|
||||
$addonAmount = 0.0;
|
||||
$total = $base;
|
||||
} elseif ($type === 'quote') {
|
||||
// 师傅报价模式:金额由师傅后续竞价给出,下单时总价与应付为 0
|
||||
$goodsAmount = 0.0;
|
||||
$addonAmount = 0.0;
|
||||
$total = 0;
|
||||
$floorAmount = 0;
|
||||
$urgentAmount = 0;
|
||||
@@ -1148,6 +1170,8 @@ class Home extends Base
|
||||
'lines' => $pricedLines,
|
||||
'price_type' => $type,
|
||||
'user_price' => $type === 'custom' ? round($base, 2) : 0,
|
||||
'goods_amount' => $type === 'quote' ? 0 : round($goodsAmount, 2),
|
||||
'addon_amount' => $type === 'quote' ? 0 : round($addonAmount, 2),
|
||||
'base_amount' => $type === 'quote' ? 0 : round($base, 2),
|
||||
'floor_amount' => round($floorAmount, 2),
|
||||
'urgent_amount' => round($urgentAmount, 2),
|
||||
|
||||
@@ -832,7 +832,10 @@ class Master extends MasterBase
|
||||
}
|
||||
|
||||
$rawAddr = (string)$row['address'];
|
||||
$maskedAddr = preg_replace('/\d+栋|\d+单元|\d+室|\d+号楼/', '**', $rawAddr);
|
||||
$maskedAddr = preg_replace('/\d+号.*|\d+栋.*|\d+单元.*|\d+室.*|\d+楼.*/u', '******', $rawAddr);
|
||||
if ($maskedAddr === $rawAddr && mb_strlen($rawAddr) > 6) {
|
||||
$maskedAddr = mb_substr($rawAddr, 0, mb_strlen($rawAddr) - 4) . '****';
|
||||
}
|
||||
$prefix = trim($row['city'] . $row['district']);
|
||||
if ($prefix !== '' && strpos($maskedAddr, $row['district']) === false && strpos($maskedAddr, $row['city']) === false) {
|
||||
$row['address'] = $prefix . $maskedAddr;
|
||||
@@ -1853,7 +1856,7 @@ class Master extends MasterBase
|
||||
}
|
||||
$list = Db::name('order_quote')->alias('q')
|
||||
->join('order o', 'o.id = q.order_id', 'LEFT')
|
||||
->field('q.*, o.order_no, o.service_name, o.pay_amount as order_amount, o.status as order_status')
|
||||
->field('q.*, o.order_no, o.service_name, o.pay_amount as order_amount, o.status as order_status, o.price_type, o.cat_id, o.urgent, o.commission_rate, o.commission_snapshot')
|
||||
->where('q.master_id', $master['id'])
|
||||
->order('q.id desc')
|
||||
->limit(30)
|
||||
@@ -1862,6 +1865,15 @@ class Master extends MasterBase
|
||||
foreach ($list as &$row) {
|
||||
$row['status_text'] = isset($statusText[$row['status']]) ? $statusText[$row['status']] : $row['status'];
|
||||
$row['amount'] = (float)$row['amount'];
|
||||
$qCalc = CommissionService::calcByOrder([
|
||||
'price_type' => $row['price_type'] ?: 'quote',
|
||||
'cat_id' => (int)($row['cat_id'] ?? 0),
|
||||
'urgent' => (int)($row['urgent'] ?? 0),
|
||||
'commission_rate' => $row['commission_rate'] ?? null,
|
||||
'commission_snapshot' => $row['commission_snapshot'] ?? '',
|
||||
], $row['amount']);
|
||||
$row['master_fee'] = (float)$qCalc['settle_amount'];
|
||||
unset($row['commission_rate'], $row['commission_snapshot']);
|
||||
$row['time_text'] = date('m-d H:i', (int)$row['createtime']);
|
||||
$row['expire_text'] = date('m-d H:i', (int)$row['expire_time']);
|
||||
}
|
||||
@@ -2477,6 +2489,7 @@ class Master extends MasterBase
|
||||
'my_quote' => $myQuote ? [
|
||||
'id' => (int)$myQuote['id'],
|
||||
'amount' => (float)$myQuote['amount'],
|
||||
'master_fee' => (float)CommissionService::calcByOrder($order, (float)$myQuote['amount'])['settle_amount'],
|
||||
'description' => $myQuote['description'],
|
||||
'status' => $myQuote['status'],
|
||||
] : null,
|
||||
|
||||
@@ -4,7 +4,7 @@ return array (
|
||||
'name' => '优匠优服',
|
||||
'beian' => '',
|
||||
'cdnurl' => '',
|
||||
'version' => '1.0.97',
|
||||
'version' => '1.0.100',
|
||||
'timezone' => 'Asia/Shanghai',
|
||||
'forbiddenip' => '',
|
||||
'languages' =>
|
||||
|
||||
@@ -26,7 +26,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'backend/admin-table-layout',
|
||||
[
|
||||
{field: 'index', title: '序号', operate: false, formatter: Table.api.formatter.index, width: '60px'},
|
||||
{field: 'title', title: __('Title')},
|
||||
{field: 'url', title: __('Url'), align: 'left', formatter: Table.api.formatter.url},
|
||||
{field: 'url', title: __('Url'), align: 'left', formatter: Table.api.formatter.url, cellStyle: {css: {'max-width': '220px', 'word-break': 'break-all', 'white-space': 'normal'}}},
|
||||
{field: 'ip', title: __('ip'), formatter:Table.api.formatter.search},
|
||||
{field: 'createtime', title: __('Createtime'), formatter: Table.api.formatter.datetime, operate: 'RANGE', addclass: 'datetimerange', sortable: true},
|
||||
]
|
||||
|
||||
@@ -210,6 +210,165 @@ define(['jquery', 'bootstrap', 'backend', 'addtabs', 'adminlte', 'form'], functi
|
||||
//绑定tabs事件,如果需要点击强制刷新iframe,则请将iframeForceRefresh置为true,iframeForceRefreshTable只强制刷新表格
|
||||
nav.addtabs({iframeHeight: "100%", iframeForceRefresh: false, iframeForceRefreshTable: true, nav: nav});
|
||||
|
||||
if (!multiplenav && $(".yjyf-tabs-wrap").length > 0) {
|
||||
var refreshTabPane = function ($li) {
|
||||
var targetSel = $li.find("a[role='tab']").attr("href");
|
||||
var $iframe = $(targetSel).find("iframe");
|
||||
if ($iframe.length > 0) {
|
||||
$iframe.attr("src", function (i, val) {
|
||||
return val;
|
||||
});
|
||||
}
|
||||
};
|
||||
var closeTabItem = function ($li) {
|
||||
var $close = $li.find(".close-tab");
|
||||
if ($close.length > 0) {
|
||||
$close.trigger("click");
|
||||
}
|
||||
};
|
||||
var runTabAction = function (action, $targetLi) {
|
||||
var $tabs = firstnav.find("> li[role='presentation']");
|
||||
var $current = $targetLi && $targetLi.length ? $targetLi : $tabs.filter(".active").first();
|
||||
if (action === "refresh" && $current.length) {
|
||||
refreshTabPane($current);
|
||||
} else if (action === "close-current" && $current.length) {
|
||||
closeTabItem($current);
|
||||
} else if (action === "close-other" && $current.length) {
|
||||
$tabs.not($current).each(function () {
|
||||
closeTabItem($(this));
|
||||
});
|
||||
} else if (action === "close-left" && $current.length) {
|
||||
$current.prevAll("li[role='presentation']").each(function () {
|
||||
closeTabItem($(this));
|
||||
});
|
||||
} else if (action === "close-right" && $current.length) {
|
||||
$current.nextAll("li[role='presentation']").each(function () {
|
||||
closeTabItem($(this));
|
||||
});
|
||||
} else if (action === "close-all") {
|
||||
$tabs.each(function () {
|
||||
closeTabItem($(this));
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// 右侧标签管理下拉菜单
|
||||
var $tabsDropdown = $(".yjyf-tabs-actions .yjyf-tabs-dropdown");
|
||||
$(".yjyf-tabs-actions").on("show.bs.dropdown", function () {
|
||||
$tabsDropdown.find("> li.yjyf-tabs-item").remove();
|
||||
var $tabs = firstnav.find("> li[role='presentation']");
|
||||
var $active = $tabs.filter(".active").first();
|
||||
$tabsDropdown.find("[data-tab-action='close-current']").parent().toggleClass("disabled", $active.find(".close-tab").length === 0);
|
||||
$tabsDropdown.find("[data-tab-action='close-other']").parent().toggleClass("disabled", $tabs.not($active).filter(function () {
|
||||
return $(this).find(".close-tab").length > 0;
|
||||
}).length === 0);
|
||||
$tabsDropdown.find("[data-tab-action='close-all']").parent().toggleClass("disabled", $tabs.filter(function () {
|
||||
return $(this).find(".close-tab").length > 0;
|
||||
}).length === 0);
|
||||
|
||||
$tabs.each(function () {
|
||||
var $li = $(this);
|
||||
var nodeId = $li.find("a[role='tab']").attr("node-id");
|
||||
var title = $.trim($li.find("a[role='tab']").text());
|
||||
var iconCls = $li.find("a[role='tab'] i").attr("class") || "fa fa-file-o";
|
||||
var isActive = $li.hasClass("active");
|
||||
var canClose = $li.find(".close-tab").length > 0;
|
||||
var $item = $('<li class="yjyf-tabs-item' + (isActive ? ' active' : '') + '"></li>');
|
||||
var $link = $('<a href="javascript:;" data-node-id="' + nodeId + '"><i class="' + iconCls + ' fa-fw"></i><span class="yjyf-tabs-item-title"></span></a>');
|
||||
$link.find(".yjyf-tabs-item-title").text(title);
|
||||
if (canClose) {
|
||||
$link.append('<span class="yjyf-tabs-item-close" title="关闭"><i class="fa fa-times"></i></span>');
|
||||
}
|
||||
$item.append($link);
|
||||
$tabsDropdown.append($item);
|
||||
});
|
||||
});
|
||||
|
||||
$tabsDropdown.on("click", "[data-tab-action]", function (e) {
|
||||
if ($(this).parent().hasClass("disabled")) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
return false;
|
||||
}
|
||||
runTabAction($(this).data("tab-action"));
|
||||
});
|
||||
|
||||
$tabsDropdown.on("click", ".yjyf-tabs-item > a", function (e) {
|
||||
var nodeId = $(this).attr("data-node-id");
|
||||
if ($(e.target).closest(".yjyf-tabs-item-close").length > 0) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
firstnav.find("> li[role='presentation'] a[node-id='" + nodeId + "']").closest("li").find(".close-tab").trigger("click");
|
||||
$(this).closest(".yjyf-tabs-item").remove();
|
||||
return false;
|
||||
}
|
||||
firstnav.find("> li[role='presentation'] a[node-id='" + nodeId + "']").closest("li").trigger("click");
|
||||
});
|
||||
|
||||
// 顶部标签右键快捷菜单
|
||||
var removeContextMenu = function () {
|
||||
$(".addtabs-contextmenu").remove();
|
||||
};
|
||||
firstnav.on("contextmenu", "> li[role='presentation']", function (e) {
|
||||
e.preventDefault();
|
||||
removeContextMenu();
|
||||
var $li = $(this);
|
||||
var canClose = $li.find(".close-tab").length > 0;
|
||||
var hasOther = firstnav.find("> li[role='presentation']").not($li).filter(function () {
|
||||
return $(this).find(".close-tab").length > 0;
|
||||
}).length > 0;
|
||||
var hasLeft = $li.prevAll("li[role='presentation']").filter(function () {
|
||||
return $(this).find(".close-tab").length > 0;
|
||||
}).length > 0;
|
||||
var hasRight = $li.nextAll("li[role='presentation']").filter(function () {
|
||||
return $(this).find(".close-tab").length > 0;
|
||||
}).length > 0;
|
||||
var hasAny = firstnav.find("> li[role='presentation']").filter(function () {
|
||||
return $(this).find(".close-tab").length > 0;
|
||||
}).length > 0;
|
||||
|
||||
var $menu = $('<ul class="addtabs-contextmenu">' +
|
||||
'<li><a href="javascript:;" data-ctx-action="refresh"><i class="fa fa-refresh"></i>刷新当前页</a></li>' +
|
||||
'<li class="divider"></li>' +
|
||||
'<li class="' + (canClose ? '' : 'disabled') + '"><a href="javascript:;" data-ctx-action="close-current"><i class="fa fa-times"></i>关闭当前标签</a></li>' +
|
||||
'<li class="' + (hasOther ? '' : 'disabled') + '"><a href="javascript:;" data-ctx-action="close-other"><i class="fa fa-minus-circle"></i>关闭其他标签</a></li>' +
|
||||
'<li class="' + (hasLeft ? '' : 'disabled') + '"><a href="javascript:;" data-ctx-action="close-left"><i class="fa fa-arrow-left"></i>关闭左侧标签</a></li>' +
|
||||
'<li class="' + (hasRight ? '' : 'disabled') + '"><a href="javascript:;" data-ctx-action="close-right"><i class="fa fa-arrow-right"></i>关闭右侧标签</a></li>' +
|
||||
'<li class="divider"></li>' +
|
||||
'<li class="' + (hasAny ? '' : 'disabled') + '"><a href="javascript:;" data-ctx-action="close-all"><i class="fa fa-trash-o"></i>关闭全部标签</a></li>' +
|
||||
'</ul>');
|
||||
$("body").append($menu);
|
||||
|
||||
var menuW = $menu.outerWidth();
|
||||
var menuH = $menu.outerHeight();
|
||||
var winW = $(window).width();
|
||||
var winH = $(window).height();
|
||||
var left = Math.min(e.clientX, winW - menuW - 8);
|
||||
var top = Math.min(e.clientY, winH - menuH - 8);
|
||||
$menu.css({left: Math.max(8, left) + "px", top: Math.max(8, top) + "px"});
|
||||
|
||||
$menu.on("click", "a[data-ctx-action]", function (ev) {
|
||||
ev.preventDefault();
|
||||
if ($(this).parent().hasClass("disabled")) {
|
||||
return false;
|
||||
}
|
||||
var act = $(this).data("ctx-action");
|
||||
removeContextMenu();
|
||||
runTabAction(act, $li);
|
||||
});
|
||||
});
|
||||
$(document).on("click.yjyfTabsCtx scroll.yjyfTabsCtx", function (e) {
|
||||
if (!$(e.target).closest(".addtabs-contextmenu").length) {
|
||||
removeContextMenu();
|
||||
}
|
||||
});
|
||||
$(document).on("keydown.yjyfTabsCtx", function (e) {
|
||||
if (e.key === "Escape") {
|
||||
removeContextMenu();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if ($("ul.sidebar-menu li.active a").length > 0) {
|
||||
$("ul.sidebar-menu li.active a").trigger("click");
|
||||
} else {
|
||||
|
||||
@@ -86,41 +86,136 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'backend/admin-table-layout',
|
||||
Table.api.bindevent(table);
|
||||
},
|
||||
certificates: function () {
|
||||
var certsTable = $("#certs-table");
|
||||
function auditCert(row, decision, reason) {
|
||||
Fast.api.ajax({url: 'merchant/index', type: 'POST', data: {
|
||||
view: 'audit_cert', id: row.id, decision: decision, audit_msg: reason || '',
|
||||
__token__: $('#cert-audit-token input[name="__token__"]').val()
|
||||
}}, function () { location.reload(); });
|
||||
}
|
||||
certsTable.bootstrapTable({
|
||||
url: 'merchant/index?view=certs', pk: 'id', toolbar: '#certs-toolbar',
|
||||
search: true, searchOnEnterKey: true, searchPlaceholder: '搜索企业名称、证照号码或手机号',
|
||||
commonSearch: false, showExport: false, pagination: true, pageList: [10, 20, 50, 100], sidePagination: 'server', escape: true,
|
||||
responseHandler: function (res) {
|
||||
if (!res || !Array.isArray(res.rows)) { Toastr.error((res && res.msg) || '企业资质列表加载失败'); return {total: 0, rows: []}; }
|
||||
return res;
|
||||
},
|
||||
columns: [[
|
||||
{field: 'id', title: '申请编号', operate: false},
|
||||
{field: 'nickname', title: '用户昵称', operate: false},
|
||||
{field: 'mobile', title: '手机号', operate: false},
|
||||
{field: 'user_type', title: '用户类型', operate: false, formatter: function (v) { return v === 'merchant' ? '商家用户' : '个人用户'; }},
|
||||
{field: 'company_name', title: '企业名称', operate: false},
|
||||
{field: 'license_no', title: '营业执照号码', operate: false},
|
||||
{field: 'legal_person', title: '法人姓名', operate: false},
|
||||
{field: 'license_url', title: '营业执照', operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
|
||||
{field: 'verify_status', title: '审核状态', operate: false, formatter: function (v) { return {pending: '待审核', pass: '已通过', reject: '已驳回'}[v] || ''; }},
|
||||
{field: 'audit_msg', title: '驳回原因', operate: false},
|
||||
{field: 'createtime', title: '提交时间', operate: false, formatter: Table.api.formatter.datetime},
|
||||
{field: 'operate', title: '操作', operate: false, events: {
|
||||
'click .cert-approve': function (e, value, row) { Layer.confirm('确认通过该企业资质认证?', function () { auditCert(row, 'pass', ''); }); },
|
||||
'click .cert-reject': function (e, value, row) { Layer.prompt({title: '请输入驳回原因', formType: 2}, function (reason) { auditCert(row, 'reject', reason); }); }
|
||||
}, formatter: function (value, row) { return row.verify_status === 'pending' && certsTable.data('operate-audit') ? '<a href="javascript:;" class="btn btn-xs btn-success cert-approve">通过</a> <a href="javascript:;" class="btn btn-xs btn-danger cert-reject">驳回</a>' : ''; }}
|
||||
]]
|
||||
Table.api.init({
|
||||
extend: {
|
||||
index_url: 'merchant/certificates' + location.search,
|
||||
audit_url: 'merchant/auditCert',
|
||||
table: 'user_enterprise_cert',
|
||||
}
|
||||
});
|
||||
$('#certs-refresh').on('click', function () { certsTable.bootstrapTable('refresh'); });
|
||||
|
||||
var table = $("#table");
|
||||
var canAudit = Number(table.data('operate-audit')) === 1;
|
||||
|
||||
table.on('post-body.bs.table', function () {
|
||||
$(".btn-audit-cert", this).data("area", ["840px", "86%"]);
|
||||
});
|
||||
|
||||
table.bootstrapTable({
|
||||
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||
pk: 'id',
|
||||
sortName: 'id',
|
||||
sortOrder: 'desc',
|
||||
fixedColumns: false,
|
||||
fixedRightNumber: 0,
|
||||
searchPlaceholder: '搜索企业名称、营业执照号、法人或手机号',
|
||||
columns: [
|
||||
[
|
||||
{field: 'index', title: '序号', operate: false, formatter: Table.api.formatter.index, width: '50px', visible: false},
|
||||
{field: 'id', title: '申请编号', operate: false, visible: false},
|
||||
{
|
||||
field: 'nickname',
|
||||
title: '申请用户',
|
||||
operate: 'LIKE',
|
||||
formatter: function (v, row) {
|
||||
var name = Fast.api.escape(v || '-');
|
||||
var mob = row.mobile ? '<div class="text-muted" style="font-size:12px;">' + Fast.api.escape(row.mobile) + '</div>' : '';
|
||||
return '<div>' + name + '</div>' + mob;
|
||||
}
|
||||
},
|
||||
{field: 'mobile', title: '手机号', operate: 'LIKE', visible: false},
|
||||
{
|
||||
field: 'user_type',
|
||||
title: '用户类型',
|
||||
searchList: {"normal": '个人用户', "merchant": '商家用户'},
|
||||
formatter: function (v) {
|
||||
return v === 'merchant'
|
||||
? '<span class="label label-primary">商家用户</span>'
|
||||
: '<span class="label label-default">个人用户</span>';
|
||||
}
|
||||
},
|
||||
{field: 'company_name', title: '企业名称', operate: 'LIKE', align: 'left'},
|
||||
{field: 'license_no', title: '营业执照号码', operate: 'LIKE'},
|
||||
{field: 'legal_person', title: '法人姓名', operate: 'LIKE', visible: false},
|
||||
{
|
||||
field: 'license_url',
|
||||
title: '营业执照',
|
||||
operate: false,
|
||||
visible: false,
|
||||
events: Table.api.events.image,
|
||||
formatter: function (value, row, index) {
|
||||
if (!value) {
|
||||
return '<span class="text-muted">未上传</span>';
|
||||
}
|
||||
return Table.api.formatter.image.call(this, value, row, index);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'verify_status',
|
||||
title: '审核状态',
|
||||
searchList: {"pending": '待审核', "pass": '已通过', "reject": '已驳回'},
|
||||
formatter: Table.api.formatter.status,
|
||||
custom: {pending: 'warning', pass: 'success', reject: 'danger'}
|
||||
},
|
||||
{
|
||||
field: 'audit_msg',
|
||||
title: '驳回原因',
|
||||
operate: 'LIKE',
|
||||
visible: false,
|
||||
table: table,
|
||||
class: 'autocontent',
|
||||
formatter: Table.api.formatter.content
|
||||
},
|
||||
{field: 'createtime', title: '提交时间', operate: 'RANGE', addclass: 'datetimerange', autocomplete: false, formatter: Table.api.formatter.datetime, width: '140px'},
|
||||
{
|
||||
field: 'operate',
|
||||
title: __('Operate'),
|
||||
width: '85px',
|
||||
table: table,
|
||||
events: Table.api.events.operate,
|
||||
buttons: [
|
||||
{
|
||||
name: 'audit',
|
||||
text: '审核',
|
||||
title: function (row) {
|
||||
return '审核企业资质 - ' + (row.company_name || '');
|
||||
},
|
||||
icon: 'fa fa-gavel',
|
||||
classname: 'btn btn-xs btn-success btn-dialog btn-audit-cert',
|
||||
url: 'merchant/auditCert',
|
||||
visible: function (row) {
|
||||
return canAudit && row.verify_status === 'pending';
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'detail',
|
||||
text: '详情',
|
||||
title: function (row) {
|
||||
return '企业资质详情 - ' + (row.company_name || '');
|
||||
},
|
||||
icon: 'fa fa-eye',
|
||||
classname: 'btn btn-xs btn-info btn-dialog btn-audit-cert',
|
||||
url: 'merchant/auditCert',
|
||||
visible: function (row) {
|
||||
return !canAudit || row.verify_status !== 'pending';
|
||||
}
|
||||
}
|
||||
],
|
||||
formatter: Table.api.formatter.operate
|
||||
}
|
||||
]
|
||||
]
|
||||
});
|
||||
|
||||
Table.api.bindevent(table);
|
||||
},
|
||||
auditcert: function () {
|
||||
$('.btn-quick-reason').on('click', function () {
|
||||
var text = $(this).data('text');
|
||||
$('input[name="row[verify_status]"][value="reject"]').prop('checked', true);
|
||||
$('#c-audit_msg').val(text).focus();
|
||||
});
|
||||
Controller.api.bindevent();
|
||||
},
|
||||
add: function () {
|
||||
Controller.api.bindevent();
|
||||
|
||||
@@ -3,12 +3,22 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'backend/admin-table-layout',
|
||||
function parseTagArr(val) {
|
||||
if (!val) return [];
|
||||
var str = String(val).trim();
|
||||
for (var i = 0; i < 2; i++) {
|
||||
str = str.replace(/&/g, '&').replace(/"/g, '"').replace(/'/g, "'");
|
||||
}
|
||||
str = str.trim();
|
||||
if (!str) return [];
|
||||
if (str.charAt(0) === '[') {
|
||||
try {
|
||||
var parsed = JSON.parse(str);
|
||||
if ($.isArray(parsed)) return parsed;
|
||||
} catch (e) {}
|
||||
var matches = str.match(/"([^"]+)"/g);
|
||||
if (matches && matches.length) {
|
||||
return $.map(matches, function (item) {
|
||||
return item.replace(/^"|"$/g, '');
|
||||
});
|
||||
}
|
||||
}
|
||||
return str.split(',');
|
||||
}
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
<view class="slot-grid">
|
||||
<view
|
||||
class="slot-card clickable-hover"
|
||||
v-for="item in slotList"
|
||||
v-for="item in computedSlots"
|
||||
:key="item.name"
|
||||
:class="{ active: selectedSlot === item.name }"
|
||||
@tap="selectedSlot = item.name"
|
||||
:class="{ active: selectedSlot === item.name && !item.disabled, disabled: item.disabled }"
|
||||
@tap="selectSlot(item)"
|
||||
>
|
||||
<text class="slot-name">{{ item.name }}</text>
|
||||
<text class="slot-range">{{ item.range }}</text>
|
||||
<text class="slot-range">{{ item.disabled ? '已过时段' : item.range }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, watch } from 'vue';
|
||||
import { ref, computed, watch } from 'vue';
|
||||
|
||||
const props = defineProps({
|
||||
visible: { type: Boolean, default: false },
|
||||
@@ -54,36 +54,78 @@
|
||||
const emit = defineEmits(['update:visible', 'confirm']);
|
||||
|
||||
const slotList = [
|
||||
{ name: '上午', range: '07:00~10:59' },
|
||||
{ name: '中午', range: '11:00~13:59' },
|
||||
{ name: '下午', range: '14:00~17:59' },
|
||||
{ name: '晚上', range: '18:00~20:59' }
|
||||
{ name: '上午', range: '07:00~10:59', endHour: 11 },
|
||||
{ name: '中午', range: '11:00~13:59', endHour: 14 },
|
||||
{ name: '下午', range: '14:00~17:59', endHour: 18 },
|
||||
{ name: '晚上', range: '18:00~20:59', endHour: 21 }
|
||||
];
|
||||
|
||||
function formatDateStr(d) {
|
||||
return `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, '0')}-${String(d.getDate()).padStart(2, '0')}`;
|
||||
}
|
||||
|
||||
const now = new Date();
|
||||
const todayStr = `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, '0')}-${String(now.getDate()).padStart(2, '0')}`;
|
||||
const todayStr = formatDateStr(now);
|
||||
const tomorrow = new Date(now.getTime() + 86400000);
|
||||
const tomorrowStr = formatDateStr(tomorrow);
|
||||
|
||||
const selectedDate = ref(todayStr);
|
||||
const selectedSlot = ref('晚上');
|
||||
|
||||
const computedSlots = computed(() => {
|
||||
const curNow = new Date();
|
||||
const curToday = formatDateStr(curNow);
|
||||
const curHour = curNow.getHours();
|
||||
const isToday = selectedDate.value === curToday;
|
||||
return slotList.map((item) => ({
|
||||
...item,
|
||||
disabled: isToday && curHour >= item.endHour
|
||||
}));
|
||||
});
|
||||
|
||||
function ensureValidSelection() {
|
||||
const slots = computedSlots.value;
|
||||
const firstAvailable = slots.find((s) => !s.disabled);
|
||||
if (!firstAvailable) {
|
||||
selectedDate.value = tomorrowStr;
|
||||
selectedSlot.value = '上午';
|
||||
return;
|
||||
}
|
||||
const currentHit = slots.find((s) => s.name === selectedSlot.value);
|
||||
if (!currentHit || currentHit.disabled) {
|
||||
selectedSlot.value = firstAvailable.name;
|
||||
}
|
||||
}
|
||||
|
||||
watch(() => props.visible, (v) => {
|
||||
if (v) {
|
||||
selectedDate.value = props.date || todayStr;
|
||||
selectedSlot.value = props.slot || '晚上';
|
||||
ensureValidSelection();
|
||||
}
|
||||
}, { immediate: true });
|
||||
|
||||
function onDateChange(e) {
|
||||
if (e && e.detail && e.detail.value) {
|
||||
selectedDate.value = e.detail.value;
|
||||
ensureValidSelection();
|
||||
}
|
||||
}
|
||||
|
||||
function selectSlot(item) {
|
||||
if (item.disabled) {
|
||||
uni.showToast({ title: '今日该时段已过,请选择其他时段或明天', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
selectedSlot.value = item.name;
|
||||
}
|
||||
|
||||
function close() {
|
||||
emit('update:visible', false);
|
||||
}
|
||||
|
||||
function handleConfirm() {
|
||||
ensureValidSelection();
|
||||
emit('confirm', {
|
||||
date: selectedDate.value,
|
||||
slot: selectedSlot.value,
|
||||
@@ -181,6 +223,12 @@
|
||||
border-color: #F0710D;
|
||||
}
|
||||
|
||||
.slot-card.disabled {
|
||||
opacity: 0.45;
|
||||
background: #F5F6F8;
|
||||
border-color: #ECECEF;
|
||||
}
|
||||
|
||||
.slot-name {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
|
||||
@@ -11,44 +11,52 @@
|
||||
|
||||
<!-- 费用明细列表(1:1 复刻 frame_006) -->
|
||||
<view class="drawer-body">
|
||||
<!-- 商品总价 -->
|
||||
<view class="fee-row">
|
||||
<text class="fee-label">商品总价</text>
|
||||
<text class="fee-value">¥{{ baseAmount }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 增项服务 -->
|
||||
<view class="fee-row" v-if="Number(addonAmount) > 0">
|
||||
<text class="fee-label">增项服务费</text>
|
||||
<text class="fee-value">¥{{ addonAmount }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 楼层上楼费 -->
|
||||
<view class="fee-row" v-if="Number(floorAmount) > 0">
|
||||
<text class="fee-label">步梯搬运费</text>
|
||||
<text class="fee-value">¥{{ floorAmount }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 加急费 -->
|
||||
<view class="fee-row" v-if="Number(urgentAmount) > 0">
|
||||
<text class="fee-label">加急服务费</text>
|
||||
<text class="fee-value">¥{{ urgentAmount }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 优惠券抵扣(红底白字“券”徽章 + 红色负值,1:1 复刻 frame_006) -->
|
||||
<view class="fee-row" v-if="Number(discountAmount) > 0">
|
||||
<view class="coupon-label-wrap">
|
||||
<view class="quan-badge">券</view>
|
||||
<text class="fee-label">优惠券</text>
|
||||
<template v-if="priceType === 'custom'">
|
||||
<view class="fee-row">
|
||||
<text class="fee-label">我的意向出价</text>
|
||||
<text class="fee-value">¥{{ fmt(baseAmount) }}</text>
|
||||
</view>
|
||||
<text class="fee-value discount">- ¥{{ discountAmount || '0.00' }}</text>
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<!-- 商品基础费 -->
|
||||
<view class="fee-row">
|
||||
<text class="fee-label">商品基础费</text>
|
||||
<text class="fee-value">¥{{ fmt(baseAmount) }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 增项服务 -->
|
||||
<view class="fee-row" v-if="Number(addonAmount) > 0">
|
||||
<text class="fee-label">增项服务费</text>
|
||||
<text class="fee-value">¥{{ fmt(addonAmount) }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 楼层上楼费 -->
|
||||
<view class="fee-row" v-if="Number(floorAmount) > 0">
|
||||
<text class="fee-label">步梯搬运费</text>
|
||||
<text class="fee-value">¥{{ fmt(floorAmount) }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 加急费 -->
|
||||
<view class="fee-row" v-if="Number(urgentAmount) > 0">
|
||||
<text class="fee-label">加急服务费</text>
|
||||
<text class="fee-value">¥{{ fmt(urgentAmount) }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 优惠券抵扣(红底白字“券”徽章 + 红色负值,1:1 复刻 frame_006) -->
|
||||
<view class="fee-row" v-if="Number(discountAmount) > 0">
|
||||
<view class="coupon-label-wrap">
|
||||
<view class="quan-badge">券</view>
|
||||
<text class="fee-label">优惠券</text>
|
||||
</view>
|
||||
<text class="fee-value discount">- ¥{{ fmt(discountAmount) }}</text>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<!-- 应付合计高亮行 -->
|
||||
<view class="fee-divider"></view>
|
||||
<view class="fee-row total-row">
|
||||
<text class="fee-label total-label">应付合计</text>
|
||||
<text class="fee-value total-value">¥{{ payAmount || '0.00' }}</text>
|
||||
<text class="fee-value total-value">¥{{ fmt(payAmount) }}</text>
|
||||
</view>
|
||||
<view class="fee-guarantee-tip">
|
||||
<image class="fgt-ico" src="/static/icons/home-guarantee.svg" mode="aspectFit" />
|
||||
@@ -62,6 +70,7 @@
|
||||
<script setup>
|
||||
defineProps({
|
||||
visible: { type: Boolean, default: false },
|
||||
priceType: { type: String, default: 'fixed' },
|
||||
baseAmount: { type: [Number, String], default: '0.00' },
|
||||
addonAmount: { type: [Number, String], default: '0.00' },
|
||||
floorAmount: { type: [Number, String], default: '0.00' },
|
||||
@@ -72,6 +81,11 @@
|
||||
|
||||
const emit = defineEmits(['update:visible']);
|
||||
|
||||
function fmt(val) {
|
||||
const num = Number(val);
|
||||
return (isNaN(num) ? 0 : num).toFixed(2);
|
||||
}
|
||||
|
||||
function close() {
|
||||
emit('update:visible', false);
|
||||
}
|
||||
|
||||
@@ -81,11 +81,11 @@
|
||||
</view>
|
||||
|
||||
<!-- 官方轮播 Banner (真实 fa_banner 数据驱动,内嵌指示点与右侧行动构图) -->
|
||||
<view class="banner-section banner-reveal" v-else-if="showBanners && banners.length">
|
||||
<view class="banner-section" v-else-if="showBanners && banners.length">
|
||||
<swiper
|
||||
class="banner-swiper"
|
||||
:current="bannerIndex"
|
||||
:autoplay="banners.length > 1"
|
||||
:autoplay="active && banners.length > 1"
|
||||
:interval="4500"
|
||||
:duration="400"
|
||||
circular
|
||||
@@ -650,6 +650,9 @@
|
||||
import { getNavBarMetrics } from '@/utils/system.js';
|
||||
import YjyfRefreshScroll from '@/components/YjyfRefreshScroll.vue';
|
||||
|
||||
defineProps({
|
||||
active: { type: Boolean, default: true }
|
||||
});
|
||||
const emit = defineEmits(['switch-tab']);
|
||||
|
||||
/* ---------- 系统适配:状态栏 / 导航栏高度 ---------- */
|
||||
@@ -1406,7 +1409,6 @@
|
||||
align-items: center;
|
||||
padding: 12rpx 0;
|
||||
box-sizing: border-box;
|
||||
animation: catCellReveal 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
|
||||
}
|
||||
@keyframes catCellReveal {
|
||||
from {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<view class="user-container-page">
|
||||
<!-- 1. 首页 (Tab 0) -->
|
||||
<view class="tab-pane" v-show="activeTab === 0">
|
||||
<UserHomeView ref="homeRef" @switch-tab="onTabChange" />
|
||||
<UserHomeView ref="homeRef" :active="activeTab === 0" @switch-tab="onTabChange" />
|
||||
</view>
|
||||
|
||||
<!-- 2. 订单 (Tab 1) -->
|
||||
|
||||
@@ -577,25 +577,8 @@
|
||||
uni.redirectTo({ url: '/pages/order/quick' });
|
||||
return;
|
||||
}
|
||||
try {
|
||||
const res = await api.serviceDetail(serviceId);
|
||||
svc.value = res && res.detail ? res.detail : null;
|
||||
} catch (e) {
|
||||
svc.value = null;
|
||||
}
|
||||
if (!svc.value) {
|
||||
uni.redirectTo({ url: '/pages/order/quick' });
|
||||
return;
|
||||
}
|
||||
if (svc.value.pricing_revision != null) {
|
||||
uni.redirectTo({ url: `/pages/order/quick?service_id=${serviceId}&cat_id=${svc.value.cat_id}` });
|
||||
return;
|
||||
}
|
||||
goodsGroups.value[0].goods_name = svc.value.name;
|
||||
priceType.value = svc.value.price_type === 'quote' ? 'quote'
|
||||
: (svc.value.price_type === 'range' ? 'custom' : 'fixed');
|
||||
await loadAddress();
|
||||
calc();
|
||||
uni.redirectTo({ url: `/pages/order/quick?service_id=${serviceId}` });
|
||||
return;
|
||||
});
|
||||
|
||||
onUnload(() => {
|
||||
|
||||
@@ -144,6 +144,37 @@
|
||||
<text class="label">订单联系人</text>
|
||||
<text class="value">{{ order.order_contact || (order.contact + ',' + order.mobile) }}</text>
|
||||
</view>
|
||||
<view class="info-item" v-if="order.express_no">
|
||||
<text class="label">物流单号</text>
|
||||
<view class="value-row">
|
||||
<text class="value">{{ order.express_no }}</text>
|
||||
<view class="copy-pill-btn clickable-hover" @tap="copyText(order.express_no)">复制</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-item" v-if="order.express_company">
|
||||
<text class="label">物流公司</text>
|
||||
<text class="value">{{ order.express_company }}</text>
|
||||
</view>
|
||||
<view class="info-item" v-if="order.express_no || order.express_company || Number(order.goods_arrived) === 0">
|
||||
<text class="label">货物状态</text>
|
||||
<text class="value">{{ Number(order.goods_arrived) === 1 ? '已到货' : '未到货' }}</text>
|
||||
</view>
|
||||
<view class="info-item" v-if="order.order_source">
|
||||
<text class="label">订单来源</text>
|
||||
<text class="value">{{ order.order_source }}</text>
|
||||
</view>
|
||||
<view class="info-item" v-if="order.source_order_no">
|
||||
<text class="label">来源订单号</text>
|
||||
<text class="value">{{ order.source_order_no }}</text>
|
||||
</view>
|
||||
<view class="info-item" v-if="order.qual_req">
|
||||
<text class="label">资质要求</text>
|
||||
<text class="value">{{ order.qual_req }}</text>
|
||||
</view>
|
||||
<view class="info-item" v-if="order.master_req">
|
||||
<text class="label">师傅要求</text>
|
||||
<text class="value">{{ order.master_req }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- ==================== 业务联动:服务完工核销码卡片 (待核销/已核销) ==================== -->
|
||||
|
||||
@@ -68,6 +68,9 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="gc-meta">
|
||||
<view class="env-help-box clickable-hover" @tap="showEnvHelp">
|
||||
<image class="eh-icon" src="/static/icons/info-orange.svg" mode="aspectFit" />
|
||||
</view>
|
||||
<text class="gc-group-num">第 {{ idx + 1 }} 组</text>
|
||||
<view class="gc-del-btn clickable-hover" @tap="removeOrResetGroup(idx)">
|
||||
<image class="gc-trash-img" src="/static/icons/trash.svg" mode="aspectFit" />
|
||||
@@ -156,11 +159,6 @@
|
||||
<text class="dc-sub gray">(非必填)</text>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<!-- 4. 紧跟末尾的橙色帮助问号图标 -->
|
||||
<view class="env-help-box clickable-hover" @tap="showEnvHelp">
|
||||
<image class="eh-icon" src="/static/icons/info-orange.svg" mode="aspectFit" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 表单项列表:全部采用抽屉选择 -->
|
||||
@@ -502,12 +500,12 @@
|
||||
<view
|
||||
class="arrived-pill clickable-hover"
|
||||
:class="{ active: form.goods_arrived === 0 }"
|
||||
@tap="form.goods_arrived = 0"
|
||||
@tap="setGoodsArrived(0)"
|
||||
>未到货</view>
|
||||
<view
|
||||
class="arrived-pill clickable-hover"
|
||||
:class="{ active: form.goods_arrived === 1 }"
|
||||
@tap="form.goods_arrived = 1"
|
||||
@tap="setGoodsArrived(1)"
|
||||
>已到货</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -521,7 +519,7 @@
|
||||
<input
|
||||
class="fr-input right-align"
|
||||
v-model="form.order_source"
|
||||
placeholder="输入此订单的来源店铺"
|
||||
placeholder="选择或输入来源店铺"
|
||||
placeholder-style="color: #999999;"
|
||||
@tap.stop
|
||||
/>
|
||||
@@ -654,16 +652,20 @@
|
||||
<!-- 一口价模式 -->
|
||||
<template v-else>
|
||||
<view class="cfc-row">
|
||||
<text class="cfc-label">商品总价</text>
|
||||
<text class="cfc-val">¥{{ amount ? amount.base_amount : '0.00' }}</text>
|
||||
<text class="cfc-label">商品基础费</text>
|
||||
<text class="cfc-val">¥{{ formatMoney(displayGoodsAmount) }}</text>
|
||||
</view>
|
||||
<view class="cfc-row" v-if="amount && amount.floor_amount > 0">
|
||||
<view class="cfc-row" v-if="Number(displayAddonAmount) > 0">
|
||||
<text class="cfc-label">增项服务费</text>
|
||||
<text class="cfc-val">¥{{ formatMoney(displayAddonAmount) }}</text>
|
||||
</view>
|
||||
<view class="cfc-row" v-if="amount && Number(amount.floor_amount) > 0">
|
||||
<text class="cfc-label">步梯搬运费</text>
|
||||
<text class="cfc-val">¥{{ amount.floor_amount }}</text>
|
||||
<text class="cfc-val">¥{{ formatMoney(amount.floor_amount) }}</text>
|
||||
</view>
|
||||
<view class="cfc-row" v-if="isUrgent && amount && amount.urgent_amount > 0">
|
||||
<view class="cfc-row" v-if="isUrgent && amount && Number(amount.urgent_amount) > 0">
|
||||
<text class="cfc-label">加急服务费</text>
|
||||
<text class="cfc-val">¥{{ amount.urgent_amount }}</text>
|
||||
<text class="cfc-val">¥{{ formatMoney(amount.urgent_amount) }}</text>
|
||||
</view>
|
||||
<view class="cfc-row clickable-hover" @tap="openCouponDrawer">
|
||||
<view class="cfc-coupon-left">
|
||||
@@ -671,11 +673,15 @@
|
||||
<text class="cfc-label">优惠券</text>
|
||||
</view>
|
||||
<view class="cfc-coupon-right">
|
||||
<text class="cfc-discount-val" v-if="amount && Number(amount.discount_amount) > 0">-¥{{ amount.discount_amount }}</text>
|
||||
<text class="cfc-discount-val" v-if="amount && Number(amount.discount_amount) > 0">-¥{{ formatMoney(amount.discount_amount) }}</text>
|
||||
<text class="cfc-coupon-placeholder" v-else>{{ selectedCoupon ? selectedCoupon.name : '选择可用优惠券' }}</text>
|
||||
<image class="cfc-arrow" src="/static/icons/arrow-right.svg" mode="aspectFit" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="cfc-row cfc-total-row">
|
||||
<text class="cfc-label cfc-total-label">应付合计</text>
|
||||
<text class="cfc-val highlight">¥{{ formatMoney(amount ? amount.pay_amount : 0) }}</text>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<!-- 底部轻量提示 -->
|
||||
@@ -691,16 +697,26 @@
|
||||
<text class="cpc-title">支付方式</text>
|
||||
</view>
|
||||
|
||||
<!-- 选项一:微信支付(默认优先推荐勾选) -->
|
||||
<!-- 选项一:微信支付(微信小程序推荐,H5端提示仅支持小程序内调起) -->
|
||||
<view class="cpc-item clickable-hover" @tap="selectedPayType = 'wechat'">
|
||||
<view class="cpc-left">
|
||||
<image class="cpc-icon" src="/static/icons/wxpay.svg" mode="aspectFit" />
|
||||
<view class="cpc-meta">
|
||||
<view class="cpc-name-line">
|
||||
<text class="cpc-name">微信支付</text>
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<text class="cpc-rec-badge">推荐</text>
|
||||
<!-- #endif -->
|
||||
<!-- #ifndef MP-WEIXIN -->
|
||||
<text class="cpc-warn-txt">(仅限微信小程序)</text>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<text class="cpc-desc">官方担保 极速退款</text>
|
||||
<!-- #endif -->
|
||||
<!-- #ifndef MP-WEIXIN -->
|
||||
<text class="cpc-desc">当前网页端暂不支持微信收银台,推荐使用余额支付</text>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="cpc-radio-circle" :class="{ on: selectedPayType === 'wechat' }">
|
||||
@@ -782,10 +798,10 @@
|
||||
<view class="s1-main-line">
|
||||
<text class="s1-count">共{{ goodsList.length }}组商品合计</text>
|
||||
<view class="s1-quan-badge" v-if="priceType === 'fixed' && amount && Number(amount.discount_amount) > 0">券</view>
|
||||
<text class="s1-price">¥{{ priceType === 'custom' ? (Number(userPrice) || '0.00') : (amount ? amount.pay_amount : '0.00') }}</text>
|
||||
<text class="s1-price">¥{{ priceType === 'custom' ? formatMoney(userPrice) : formatMoney(amount ? amount.pay_amount : 0) }}</text>
|
||||
</view>
|
||||
<view class="s1-sub-line" v-if="priceType === 'fixed' && amount && Number(amount.discount_amount) > 0">
|
||||
<text class="s1-discount-txt">共减 ¥{{ amount.discount_amount }}</text>
|
||||
<text class="s1-discount-txt">共减 ¥{{ formatMoney(amount.discount_amount) }}</text>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
@@ -844,7 +860,7 @@
|
||||
<template v-else-if="priceType === 'custom'">
|
||||
<view class="s3-top">
|
||||
<text class="s3-count">共{{ goodsList.length }}组 合计:</text>
|
||||
<text class="s3-price">¥{{ Number(userPrice) || 0 }}</text>
|
||||
<text class="s3-price">¥{{ formatMoney(userPrice) }}</text>
|
||||
<view class="s3-detail-pill">
|
||||
<text class="s3-detail-txt">明细</text>
|
||||
<image class="s3-detail-arrow" src="/static/icons/chevron-up-orange.svg" mode="aspectFit" />
|
||||
@@ -857,15 +873,15 @@
|
||||
<template v-else>
|
||||
<view class="s3-top">
|
||||
<text class="s3-count">共{{ goodsList.length }}组 合计:</text>
|
||||
<text class="s3-price">¥{{ amount ? amount.pay_amount : '0.00' }}</text>
|
||||
<text class="s3-price">¥{{ formatMoney(amount ? amount.pay_amount : 0) }}</text>
|
||||
<view class="s3-detail-pill">
|
||||
<text class="s3-detail-txt">明细</text>
|
||||
<image class="s3-detail-arrow" src="/static/icons/chevron-up-orange.svg" mode="aspectFit" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="s3-sub" v-if="amount && Number(amount.discount_amount) > 0">
|
||||
<text class="s3-origin">原价¥{{ amount.total_amount }}</text>
|
||||
<text class="s3-discount">已省¥{{ amount.discount_amount }}</text>
|
||||
<text class="s3-origin">原价¥{{ formatMoney(amount.total_amount) }}</text>
|
||||
<text class="s3-discount">已省¥{{ formatMoney(amount.discount_amount) }}</text>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
@@ -940,12 +956,13 @@
|
||||
<!-- 8. 费用明细抽屉 (对标 frame_006) -->
|
||||
<FeeDetailDrawer
|
||||
:visible="showFeeDrawer"
|
||||
:base-amount="amount ? amount.base_amount : '0.00'"
|
||||
:addon-amount="calculatedAddonAmount"
|
||||
:floor-amount="amount ? amount.floor_amount : '0.00'"
|
||||
:urgent-amount="amount ? amount.urgent_amount : '0.00'"
|
||||
:discount-amount="amount ? amount.discount_amount : '0.00'"
|
||||
:pay-amount="amount ? amount.pay_amount : '0.00'"
|
||||
:price-type="priceType"
|
||||
:base-amount="priceType === 'custom' ? formatMoney(userPrice) : formatMoney(displayGoodsAmount)"
|
||||
:addon-amount="priceType === 'custom' ? '0.00' : formatMoney(displayAddonAmount)"
|
||||
:floor-amount="amount ? formatMoney(amount.floor_amount) : '0.00'"
|
||||
:urgent-amount="amount ? formatMoney(amount.urgent_amount) : '0.00'"
|
||||
:discount-amount="amount ? formatMoney(amount.discount_amount) : '0.00'"
|
||||
:pay-amount="priceType === 'custom' ? formatMoney(userPrice) : formatMoney(amount ? amount.pay_amount : 0)"
|
||||
@update:visible="showFeeDrawer = $event"
|
||||
/>
|
||||
|
||||
@@ -1088,10 +1105,15 @@
|
||||
import { executeOrderWxPay, openOrderPaymentResult } from '@/utils/pay.js';
|
||||
import { isLogin, toLogin } from '@/utils/request.js';
|
||||
|
||||
// 支付方式状态管理(优先默认勾选微信支付)
|
||||
// 支付方式状态管理(小程序端优先默认微信支付;H5端若余额充足优先选中余额支付)
|
||||
const selectedPayType = ref('wechat');
|
||||
const userBalance = ref(0.00);
|
||||
|
||||
function formatMoney(val) {
|
||||
const n = Number(val);
|
||||
return (isNaN(n) ? 0 : n).toFixed(2);
|
||||
}
|
||||
|
||||
const currentPayAmount = computed(() => {
|
||||
if (priceType.value === 'custom') {
|
||||
return Number(userPrice.value) || 0;
|
||||
@@ -1121,6 +1143,11 @@
|
||||
const res = await api.userWallet();
|
||||
if (res && res.balance !== undefined) {
|
||||
userBalance.value = Number(res.balance) || 0;
|
||||
// #ifndef MP-WEIXIN
|
||||
if (isBalanceSufficient.value) {
|
||||
selectedPayType.value = 'balance';
|
||||
}
|
||||
// #endif
|
||||
}
|
||||
} catch (e) {}
|
||||
}
|
||||
@@ -1679,7 +1706,9 @@
|
||||
const parts = [];
|
||||
if (form.demand_same_goods) parts.push('完工过相同商品');
|
||||
if (form.demand_high_rating) parts.push('评分≥4.5');
|
||||
return parts.length ? parts.join('、') : '对师傅的要求';
|
||||
if (!parts.length) return '对师傅的要求';
|
||||
const hrs = Number(form.demand_timeout) || 1;
|
||||
return `${parts.join('、')}(超${hrs}小时自动扩大匹配)`;
|
||||
});
|
||||
|
||||
function handleDemandConfirm(res) {
|
||||
@@ -1718,6 +1747,21 @@
|
||||
return total.toFixed(2);
|
||||
});
|
||||
|
||||
const displayAddonAmount = computed(() => {
|
||||
if (amount.value && amount.value.addon_amount !== undefined) {
|
||||
return Number(amount.value.addon_amount) || 0;
|
||||
}
|
||||
return Number(calculatedAddonAmount.value) || 0;
|
||||
});
|
||||
|
||||
const displayGoodsAmount = computed(() => {
|
||||
if (amount.value && amount.value.goods_amount !== undefined) {
|
||||
return Number(amount.value.goods_amount) || 0;
|
||||
}
|
||||
const base = amount.value ? (Number(amount.value.base_amount) || 0) : 0;
|
||||
return Math.max(0, base - displayAddonAmount.value);
|
||||
});
|
||||
|
||||
// 9. 媒体选择抽屉(支持相册、拍照、从商品图库中选择、从系统图库中选择真实商品图)
|
||||
const showMediaDrawer = ref(false);
|
||||
const mediaTargetType = ref('image'); // 'image' or 'env'
|
||||
@@ -1922,7 +1966,7 @@
|
||||
order_contact_mobile: '',
|
||||
logistics_no: '',
|
||||
logistics_company: '',
|
||||
goods_arrived: 0,
|
||||
goods_arrived: 1,
|
||||
order_source: '',
|
||||
source_order_no: '',
|
||||
qual_req: '',
|
||||
@@ -2005,12 +2049,20 @@
|
||||
const mode = dictDrawer.mode;
|
||||
const kw = (dictDrawer.keyword || '').trim().toLowerCase();
|
||||
if (mode === 'order_source') {
|
||||
return dictOptions.order_sources.map(src => ({
|
||||
key: 'src_' + src,
|
||||
label: src,
|
||||
value: src,
|
||||
active: form.order_source === src
|
||||
}));
|
||||
return [
|
||||
{
|
||||
key: 'src_none',
|
||||
label: '暂不选择(清空)',
|
||||
value: '',
|
||||
active: !form.order_source
|
||||
},
|
||||
...dictOptions.order_sources.map(src => ({
|
||||
key: 'src_' + src,
|
||||
label: src,
|
||||
value: src,
|
||||
active: form.order_source === src
|
||||
}))
|
||||
];
|
||||
}
|
||||
if (mode === 'qual_req') {
|
||||
const items = [
|
||||
@@ -2074,10 +2126,11 @@
|
||||
}
|
||||
|
||||
const contactDisplay = computed(() => {
|
||||
const name = form.order_contact_name || '发单联系人';
|
||||
const mob = form.order_contact_mobile || '';
|
||||
const name = (form.order_contact_name || '发单联系人').trim();
|
||||
const mob = (form.order_contact_mobile || '').trim();
|
||||
if (mob) {
|
||||
const safeMob = mob.length >= 11 ? (mob.slice(0, 7) + '...') : mob;
|
||||
const safeMob = /^1\d{10}$/.test(mob) ? (mob.slice(0, 3) + '****' + mob.slice(7)) : mob;
|
||||
if (name === safeMob || name === mob) return safeMob;
|
||||
return `${name} ${safeMob}`;
|
||||
}
|
||||
return name;
|
||||
@@ -2103,6 +2156,12 @@
|
||||
});
|
||||
}
|
||||
|
||||
const goodsArrivedTouched = ref(false);
|
||||
function setGoodsArrived(val) {
|
||||
goodsArrivedTouched.value = true;
|
||||
form.goods_arrived = val;
|
||||
}
|
||||
|
||||
async function initOrderContactFromProfile() {
|
||||
if (!isLogin()) return;
|
||||
try {
|
||||
@@ -2110,6 +2169,10 @@
|
||||
if (p) {
|
||||
form.order_contact_name = p.nickname || ('用户' + String(p.mobile || '').slice(-4));
|
||||
form.order_contact_mobile = p.mobile || '';
|
||||
if (!goodsArrivedTouched.value) {
|
||||
const isMerchantUser = p.user_type === 'merchant' || Number(p.is_merchant) === 1;
|
||||
form.goods_arrived = isMerchantUser ? 0 : 1;
|
||||
}
|
||||
}
|
||||
} catch (e) {}
|
||||
}
|
||||
@@ -2213,20 +2276,33 @@
|
||||
}
|
||||
const mobileHit = raw.match(/(1[3-9]\d{9})/);
|
||||
if (mobileHit) form.mobile = mobileHit[1];
|
||||
let textLeft = raw.replace(form.mobile, ' ').trim();
|
||||
const nameHit = textLeft.match(/^([^,,\s]{2,4})[,,\s]/);
|
||||
let textLeft = mobileHit ? raw.replace(mobileHit[1], ' ').trim() : raw;
|
||||
const nameHit = textLeft.match(/^([^,,\s]{2,4})[,,\s]+/);
|
||||
if (nameHit) {
|
||||
form.contact = nameHit[1];
|
||||
textLeft = textLeft.replace(nameHit[0], ' ').trim();
|
||||
textLeft = textLeft.slice(nameHit[0].length).trim();
|
||||
}
|
||||
const regHit = textLeft.match(/(.*?[省|市|自治区])\s*(.*?[市|州|地区])?\s*(.*?[区|县|市|旗])?\s*(.*)/);
|
||||
if (regHit) {
|
||||
if (regHit[1]) form.province = regHit[1].trim();
|
||||
if (regHit[2]) form.city = regHit[2].trim();
|
||||
if (regHit[3]) form.district = regHit[3].trim();
|
||||
if (regHit[4]) form.address = regHit[4].trim();
|
||||
} else {
|
||||
form.address = textLeft;
|
||||
let remain = textLeft.replace(/^[,,\s]+/, '');
|
||||
const provMatch = remain.match(/^(北京市|上海市|天津市|重庆市|[^省]+?省|[^自治区]+?自治区|香港特别行政区|澳门特别行政区)\s*/);
|
||||
if (provMatch) {
|
||||
form.province = provMatch[1].trim();
|
||||
remain = remain.slice(provMatch[0].length).trim();
|
||||
}
|
||||
const isDirectCity = /^(北京市|上海市|天津市|重庆市)$/.test(form.province);
|
||||
const cityMatch = remain.match(/^((?:(?![区县旗]).){1,12}?(?:自治州|地区|盟|市))\s*/);
|
||||
if (cityMatch) {
|
||||
form.city = cityMatch[1].trim();
|
||||
remain = remain.slice(cityMatch[0].length).trim();
|
||||
} else if (isDirectCity) {
|
||||
form.city = form.province;
|
||||
}
|
||||
const distMatch = remain.match(/^((?:(?![区县旗]).){1,10}?(?:区|县|旗|市))\s*/);
|
||||
if (distMatch) {
|
||||
form.district = distMatch[1].trim();
|
||||
remain = remain.slice(distMatch[0].length).trim();
|
||||
}
|
||||
if (remain) {
|
||||
form.address = remain;
|
||||
}
|
||||
showStep2Tip.value = false;
|
||||
fetchMasterCount();
|
||||
@@ -2520,6 +2596,21 @@
|
||||
uni.showToast({ title: '图片或视频正在上传中,请稍候', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
// #ifndef MP-WEIXIN
|
||||
const actualPayType = (selectedPayType.value === 'balance' && isBalanceSufficient.value) ? 'balance' : 'wechat';
|
||||
if (priceType.value !== 'quote' && actualPayType === 'wechat' && currentPayAmount.value > 0) {
|
||||
uni.showModal({
|
||||
title: '请在微信小程序内支付',
|
||||
content: isBalanceSufficient.value
|
||||
? '当前网页端暂不支持调起微信收银台,您可以切换“余额支付”直接付款,或前往微信小程序下单。'
|
||||
: '当前网页端暂不支持调起微信收银台且账户余额不足,请前往微信小程序完成微信支付。',
|
||||
showCancel: false,
|
||||
confirmText: '知道了',
|
||||
confirmColor: '#F0710D'
|
||||
});
|
||||
return;
|
||||
}
|
||||
// #endif
|
||||
submitting.value = true;
|
||||
let createdOrderId = 0;
|
||||
try {
|
||||
@@ -4094,6 +4185,22 @@
|
||||
color: #1F1F1F;
|
||||
}
|
||||
|
||||
.cfc-val.highlight {
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
color: #F0710D;
|
||||
}
|
||||
|
||||
.cfc-total-row {
|
||||
margin-top: 8rpx;
|
||||
padding-top: 20rpx;
|
||||
border-top: 1rpx solid #F0F0F2;
|
||||
}
|
||||
|
||||
.cfc-total-label {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.cfc-coupon-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -708,6 +708,11 @@
|
||||
}
|
||||
}
|
||||
};
|
||||
// #ifndef MP-WEIXIN
|
||||
requestingLocation.value = false;
|
||||
uni.navigateTo({ url: '/pages/master/location' });
|
||||
return;
|
||||
// #endif
|
||||
if (hasCoords.value) {
|
||||
options.latitude = Number(coords.value.lat);
|
||||
options.longitude = Number(coords.value.lng);
|
||||
|
||||
@@ -153,8 +153,12 @@
|
||||
<text class="q-state-tag">{{ quoteStatusText(order.my_quote.status) }}</text>
|
||||
</view>
|
||||
<view class="kv-row">
|
||||
<text class="kv-k">我的出价</text>
|
||||
<text class="kv-v price">¥{{ Number(order.my_quote.amount).toFixed(2) }}</text>
|
||||
<text class="kv-k">我的报价</text>
|
||||
<text class="kv-v">¥{{ Number(order.my_quote.amount).toFixed(2) }}</text>
|
||||
</view>
|
||||
<view class="kv-row">
|
||||
<text class="kv-k">预计到手收益</text>
|
||||
<text class="kv-v price">¥{{ Number(order.my_quote.master_fee !== undefined ? order.my_quote.master_fee : order.my_quote.amount).toFixed(2) }}</text>
|
||||
</view>
|
||||
<view class="kv-row" v-if="order.my_quote.description">
|
||||
<text class="kv-k">报价说明</text>
|
||||
@@ -182,7 +186,19 @@
|
||||
</view>
|
||||
<view class="kv-row">
|
||||
<text class="kv-k">业主称呼</text>
|
||||
<text class="kv-v">{{ order.contact }}({{ order.mobile }})</text>
|
||||
<text class="kv-v">{{ order.mobile ? `${order.contact}(${order.mobile})` : order.contact }}</text>
|
||||
</view>
|
||||
<view class="kv-row">
|
||||
<text class="kv-k">货物状态</text>
|
||||
<text class="kv-v">{{ Number(order.goods_arrived) === 1 ? '已到货' : '未到货' }}</text>
|
||||
</view>
|
||||
<view class="kv-row" v-if="order.express_company || order.express_no">
|
||||
<text class="kv-k">物流信息</text>
|
||||
<text class="kv-v">{{ [order.express_company, order.is_my_order ? order.express_no : (order.express_no ? '已填写物流单号(接单后查看)' : '')].filter(Boolean).join(' · ') }}</text>
|
||||
</view>
|
||||
<view class="kv-row" v-if="order.master_req">
|
||||
<text class="kv-k">接单要求</text>
|
||||
<text class="kv-v">{{ order.master_req }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -340,22 +356,6 @@
|
||||
<image class="copy-ico" src="/static/icons/invoice-copy.svg" mode="aspectFit" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="kv-row">
|
||||
<text class="kv-k">订单实付总额</text>
|
||||
<text class="kv-v">¥{{ Number(order.pay_amount || order.total_amount || 0).toFixed(2) }}</text>
|
||||
</view>
|
||||
<view class="kv-row" v-if="Number(order.floor_amount) > 0">
|
||||
<text class="kv-k">含步梯搬运费</text>
|
||||
<text class="kv-v">¥{{ Number(order.floor_amount).toFixed(2) }}</text>
|
||||
</view>
|
||||
<view class="kv-row" v-if="Number(order.urgent_amount) > 0">
|
||||
<text class="kv-k">含加急服务费</text>
|
||||
<text class="kv-v">¥{{ Number(order.urgent_amount).toFixed(2) }}</text>
|
||||
</view>
|
||||
<view class="kv-row">
|
||||
<text class="kv-k">平台技术服务费({{ order.commission_rate !== undefined && order.commission_rate !== null ? Number(order.commission_rate) : 0 }}%)</text>
|
||||
<text class="kv-v muted">-¥{{ Number(order.commission || 0).toFixed(2) }}</text>
|
||||
</view>
|
||||
<view class="kv-row top-border">
|
||||
<text class="kv-k bold">{{ Number(order.settle_status) === 1 ? '实际结算工钱' : '预计结算工钱' }}</text>
|
||||
<text class="kv-v price-lg">¥{{ Number(order.settle_amount || order.master_fee || 0).toFixed(2) }}</text>
|
||||
|
||||
@@ -64,11 +64,12 @@
|
||||
<text class="q-desc" v-if="q.description">报价说明:{{ q.description }}</text>
|
||||
</view>
|
||||
<view class="amt-box">
|
||||
<text class="amt-label">我的出价</text>
|
||||
<text class="amt-label">预计到手</text>
|
||||
<view class="amt-val-row">
|
||||
<text class="amt-symbol">¥</text>
|
||||
<text class="q-amt">{{ Number(q.amount || 0).toFixed(2) }}</text>
|
||||
<text class="q-amt">{{ Number(q.master_fee !== undefined ? q.master_fee : (q.amount || 0)).toFixed(2) }}</text>
|
||||
</view>
|
||||
<text class="q-meta">报价 ¥{{ Number(q.amount || 0).toFixed(2) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
在新工单中引用
屏蔽一个用户