diff --git a/pages/gongdan/create/create.js b/pages/gongdan/create/create.js
index 4554425..95ea80b 100644
--- a/pages/gongdan/create/create.js
+++ b/pages/gongdan/create/create.js
@@ -7,6 +7,7 @@ const TYPES = [
{ value: 3, label: '罚款投诉' },
{ value: 4, label: '管事投诉' },
{ value: 5, label: '被骗投诉' },
+ { value: 6, label: '组长投诉' },
]
Page({
@@ -16,7 +17,16 @@ Page({
order_id: '',
chongzhi_id: '',
fadan_id: '',
- guanshi_id: '',
+ target_user_id: '',
+ target_nicheng: '',
+ canComplainInviter: false,
+ inviterReason: '',
+ humanKefu: {
+ available: false,
+ wechat: '',
+ link: '',
+ tip: '',
+ },
shuoming: '',
images: [],
maxImages: 9,
@@ -30,13 +40,88 @@ Page({
if (q.chongzhi_id) patch.chongzhi_id = decodeURIComponent(q.chongzhi_id)
if (q.fadan_id) patch.fadan_id = decodeURIComponent(q.fadan_id)
if (Object.keys(patch).length) this.setData(patch)
+ this.loadMeta()
},
- onPickType(e) { this.setData({ leixing: Number(e.currentTarget.dataset.v) }) },
+ async loadMeta() {
+ try {
+ const res = await request({ url: '/gongdan/meta/', method: 'GET' })
+ const body = res.data || {}
+ if (!(body.code === 200 || body.code === 0)) return
+ const data = body.data || {}
+ const hk = data.human_kefu || {}
+ this.setData({
+ humanKefu: {
+ available: !!hk.available,
+ wechat: hk.wechat || '',
+ link: hk.link || '',
+ tip: hk.tip || '',
+ },
+ maxImages: data.max_images || 9,
+ })
+ this.applyInviterFromMeta(data.inviter_targets)
+ } catch (e) {
+ // ignore
+ }
+ if (this.data.leixing === 4 || this.data.leixing === 6) {
+ this.loadInviterTarget(this.data.leixing)
+ }
+ },
+
+ applyInviterFromMeta(targets) {
+ if (!targets) return
+ const leixing = this.data.leixing
+ const info = leixing === 4 ? targets.guanshi : (leixing === 6 ? targets.zuzhang : null)
+ if (!info) return
+ this.setData({
+ canComplainInviter: !!info.can_complain,
+ target_user_id: info.user_id || '',
+ target_nicheng: info.nicheng || '',
+ inviterReason: info.reason || '',
+ })
+ },
+
+ async loadInviterTarget(leixing) {
+ try {
+ const res = await request({
+ url: '/gongdan/my-inviter-target/',
+ method: 'POST',
+ data: { leixing },
+ })
+ const body = res.data || {}
+ const info = body.data || {}
+ this.setData({
+ canComplainInviter: !!info.can_complain,
+ target_user_id: info.user_id || '',
+ target_nicheng: info.nicheng || '',
+ inviterReason: info.reason || (body.message || ''),
+ })
+ } catch (e) {
+ this.setData({
+ canComplainInviter: false,
+ target_user_id: '',
+ target_nicheng: '',
+ inviterReason: '无法获取邀请人信息',
+ })
+ }
+ },
+
+ onPickType(e) {
+ const leixing = Number(e.currentTarget.dataset.v)
+ this.setData({
+ leixing,
+ target_user_id: '',
+ target_nicheng: '',
+ canComplainInviter: false,
+ inviterReason: '',
+ })
+ if (leixing === 4 || leixing === 6) {
+ this.loadInviterTarget(leixing)
+ }
+ },
onOrderId(e) { this.setData({ order_id: e.detail.value }) },
onChongzhiId(e) { this.setData({ chongzhi_id: e.detail.value }) },
onFadanId(e) { this.setData({ fadan_id: e.detail.value }) },
- onGuanshiId(e) { this.setData({ guanshi_id: e.detail.value }) },
onShuoming(e) { this.setData({ shuoming: e.detail.value }) },
openMiniKefu() { openCustomerServiceChat() },
@@ -54,7 +139,43 @@ Page({
})
},
- goChongzhiList() { wx.navigateTo({ url: '/pages/gongdan/chongzhi-list/chongzhi-list' }) },
+ openHumanLink() {
+ const link = (this.data.humanKefu.link || '').trim()
+ if (!link) return
+ // 企业微信客服链接优先用官方能力打开
+ const app = getApp()
+ const cfg = app.globalData.kefuConfig || {}
+ if (cfg.enterpriseId && (link.indexOf('work.weixin.qq.com') >= 0 || link.indexOf('kf') >= 0)) {
+ wx.openCustomerServiceChat({
+ extInfo: { url: link },
+ corpId: cfg.enterpriseId,
+ fail: () => {
+ wx.setClipboardData({
+ data: link,
+ success: () => wx.showToast({ title: '链接已复制', icon: 'none' }),
+ })
+ },
+ })
+ return
+ }
+ wx.setClipboardData({
+ data: link,
+ success: () => wx.showToast({ title: '客服链接已复制', icon: 'none' }),
+ })
+ },
+
+ copyHumanWechat() {
+ const wxid = (this.data.humanKefu.wechat || '').trim()
+ if (!wxid) return
+ wx.setClipboardData({
+ data: wxid,
+ success: () => wx.showToast({ title: '微信号已复制', icon: 'success' }),
+ })
+ },
+
+ goChongzhiList() {
+ wx.navigateTo({ url: '/pages/gongdan/chongzhi-list/chongzhi-list?from=complaint' })
+ },
goPenalty() { wx.navigateTo({ url: '/pages/penalty/penalty/penalty' }) },
goMyList() { wx.navigateTo({ url: '/pages/gongdan/list/list' }) },
@@ -81,7 +202,7 @@ Page({
})
},
- uploadOne(filePath) {
+ uploadOne(filePath) {
const app = getApp()
const base = (app.globalData.apiBaseUrl || '').replace(/\/$/, '')
const token = wx.getStorageSync('token') || ''
@@ -121,26 +242,44 @@ Page({
wx.showToast({ title: '请填写投诉说明', icon: 'none' })
return
}
+ if (this.data.leixing === 4 || this.data.leixing === 6) {
+ if (!this.data.canComplainInviter || !this.data.target_user_id) {
+ wx.showToast({
+ title: this.data.inviterReason || '没有邀请人,无法投诉',
+ icon: 'none',
+ })
+ return
+ }
+ }
this.setData({ submitting: true })
try {
+ const payload = {
+ leixing: this.data.leixing,
+ shuoming: this.data.shuoming,
+ order_id: this.data.order_id,
+ chongzhi_id: this.data.chongzhi_id,
+ fadan_id: this.data.fadan_id,
+ images: this.data.images,
+ }
+ if (this.data.leixing === 4) {
+ payload.target_role = 'guanshi'
+ // 后端会强制本人邀请人,这里仅作兼容提交
+ payload.target_user_id = this.data.target_user_id
+ payload.guanshi_id = this.data.target_user_id
+ } else if (this.data.leixing === 6) {
+ payload.target_role = 'zuzhang'
+ payload.target_user_id = this.data.target_user_id
+ }
const res = await request({
url: '/gongdan/create/',
method: 'POST',
- data: {
- leixing: this.data.leixing,
- shuoming: this.data.shuoming,
- order_id: this.data.order_id,
- chongzhi_id: this.data.chongzhi_id,
- fadan_id: this.data.fadan_id,
- guanshi_id: this.data.guanshi_id,
- images: this.data.images,
- },
+ data: payload,
})
const body = res.data || {}
if (body.code === 200 || body.code === 0) {
wx.showToast({ title: '提交成功', icon: 'success' })
setTimeout(() => {
- wx.redirectTo({ url: '/pages/gongdan/list/list' })
+ wx.redirectTo({ url: '/pages/gongdan/list/list?tab=created' })
}, 500)
} else {
wx.showToast({ title: body.message || body.msg || '提交失败', icon: 'none' })
diff --git a/pages/gongdan/create/create.wxml b/pages/gongdan/create/create.wxml
index fef6ca9..f4c0add 100644
--- a/pages/gongdan/create/create.wxml
+++ b/pages/gongdan/create/create.wxml
@@ -1,5 +1,14 @@
-
+
+ 人工客服
+ {{humanKefu.tip}}
+
+ 一键联系客服
+ 复制微信号
+
+ 微信:{{humanKefu.wechat}}
+
+
小程序客服
微信客服
@@ -24,16 +33,21 @@
充值记录ID *
- 去充值记录复制 →
+ 去充值记录选择 →
罚单ID *
去罚款页查看 →
-
- 管事ID(选填)
-
+
+
+ {{leixing==4?'被投诉管事':'被投诉组长'}} *
+
+ 你的邀请人:{{target_nicheng}}
+
+ 仅可投诉本人邀请人,不可选择其他人
+ {{inviterReason || '你没有邀请人,无法发起此类投诉'}}
@@ -52,6 +66,6 @@
-
+
diff --git a/pages/gongdan/create/create.wxss b/pages/gongdan/create/create.wxss
index 4de91e4..282d38c 100644
--- a/pages/gongdan/create/create.wxss
+++ b/pages/gongdan/create/create.wxss
@@ -2,6 +2,13 @@
.cs-bar{display:flex;gap:16rpx;margin-bottom:24rpx}
.cs-btn{flex:1;text-align:center;padding:20rpx 0;border-radius:12rpx;background:#fff;font-size:28rpx;color:#1a1a1a;border:1rpx solid #e5e5e5}
.cs-wx{background:#07c160;color:#fff;border-color:#07c160}
+.cs-card{background:#fff;border-radius:16rpx;padding:24rpx;margin-bottom:20rpx;border:1rpx solid #e8f5ee}
+.cs-title{font-size:30rpx;font-weight:600;color:#1a1a1a;margin-bottom:8rpx}
+.cs-tip{font-size:24rpx;color:#666;margin-bottom:16rpx;line-height:1.5}
+.cs-actions{display:flex;gap:12rpx}
+.cs-actions .cs-btn{flex:1}
+.cs-link{background:#1a1a1a;color:#fff;border-color:#1a1a1a}
+.cs-wechat{margin-top:14rpx;font-size:24rpx;color:#07c160}
.section{background:#fff;border-radius:16rpx;padding:24rpx;margin-bottom:20rpx}
.label{font-size:28rpx;color:#333;margin-bottom:16rpx;font-weight:500}
.req{color:#e54}
@@ -17,4 +24,9 @@
.del{position:absolute;right:0;top:0;width:40rpx;height:40rpx;background:rgba(0,0,0,.55);color:#fff;text-align:center;line-height:40rpx;font-size:28rpx}
.img-add{display:flex;align-items:center;justify-content:center;font-size:64rpx;color:#bbb}
.submit{margin-top:32rpx;background:#1a1a1a;color:#fff;border-radius:12rpx;font-size:30rpx}
+.submit[disabled]{opacity:.45}
.foot-link{text-align:center;margin-top:28rpx;color:#666;font-size:26rpx}
+.picked{display:flex;justify-content:space-between;align-items:center;background:#f7f8fa;border-radius:10rpx;padding:20rpx;margin-bottom:12rpx;font-size:28rpx}
+.picked.fixed{margin-bottom:8rpx}
+.inviter-tip{font-size:22rpx;color:#888;line-height:1.4}
+.inviter-block{background:#fff5f5;color:#c0392b;border-radius:10rpx;padding:20rpx;font-size:26rpx;line-height:1.5}
diff --git a/pages/order-pool/order-pool.js b/pages/order-pool/order-pool.js
index 58c7eb2..b3decf7 100644
--- a/pages/order-pool/order-pool.js
+++ b/pages/order-pool/order-pool.js
@@ -3,6 +3,7 @@ const app = getApp();
import request from '../../utils/request.js';
import PopupService from '../../services/popupService.js';
import { refreshDashouMembership, userHasHuiyuan } from '../../utils/dashou-profile.js';
+import { ensureRoleAgreement } from '../../utils/role-agreement-gate.js';
Page({
data: {
@@ -406,6 +407,9 @@ Page({
return;
}
+ const signed = await ensureRoleAgreement('dashou', 'qiangdan');
+ if (!signed) return;
+
const that = this;
wx.showModal({
title: '确认抢单',
diff --git a/pages/order-pool/order-pool.wxml b/pages/order-pool/order-pool.wxml
index 69d5832..c2ef18c 100644
--- a/pages/order-pool/order-pool.wxml
+++ b/pages/order-pool/order-pool.wxml
@@ -113,6 +113,12 @@
平台订单
+
+
+ 老板自助下单
+ 结算快
+ 价格高
+
@@ -211,7 +217,14 @@
src="{{item.full_tupian_url}}"
mode="aspectFill"
/>
- {{item.sjnicheng || '未知商家'}}
+
+ {{item.sjnicheng || '未知商家'}}
+
+ 成交 {{item.shangjia_deal_stat.deal_rate_text}}
+ 罚款 {{item.shangjia_deal_stat.fine_rate_text}}
+ 均时 {{item.shangjia_deal_stat.avg_deal_hours_text}}
+
+
diff --git a/pages/order-pool/order-pool.wxss b/pages/order-pool/order-pool.wxss
index 1419c14..ec0f693 100644
--- a/pages/order-pool/order-pool.wxss
+++ b/pages/order-pool/order-pool.wxss
@@ -339,6 +339,29 @@
background: rgba(0, 0, 0, 0.04);
border-radius: 20rpx;
}
+
+ .platform-badge-row {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 10rpx;
+ margin: -4rpx 0 16rpx;
+ }
+
+ .platform-badge {
+ font-size: 20rpx;
+ color: #2f6b3a;
+ background: rgba(47, 107, 58, 0.08);
+ border: 1rpx solid rgba(47, 107, 58, 0.16);
+ padding: 4rpx 12rpx;
+ border-radius: 8rpx;
+ line-height: 1.4;
+ }
+
+ .platform-badge.accent {
+ color: #b45309;
+ background: rgba(180, 83, 9, 0.08);
+ border-color: rgba(180, 83, 9, 0.18);
+ }
.zhiding-row {
display: flex;
@@ -444,12 +467,40 @@
border: 2rpx solid rgba(114, 46, 209, 0.15);
box-shadow: 0 6rpx 18rpx rgba(114, 46, 209, 0.12);
object-fit: cover;
+ flex-shrink: 0;
+ }
+
+ .shangjia-meta {
+ flex: 1;
+ min-width: 0;
}
.shangjia-nicheng {
font-size: 28rpx;
color: #333;
font-weight: 600;
+ display: block;
+ }
+
+ .merchant-stat-row {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 8rpx;
+ margin-top: 8rpx;
+ }
+
+ .merchant-stat {
+ font-size: 20rpx;
+ color: #6b5b95;
+ background: rgba(114, 46, 209, 0.08);
+ padding: 2rpx 10rpx;
+ border-radius: 8rpx;
+ line-height: 1.4;
+ }
+
+ .merchant-stat.highlight {
+ color: #0f766e;
+ background: rgba(15, 118, 110, 0.08);
}
.shangjia-jieshao,