restore: 恢复橙色逍遥梦UI版本(2ea2860)到主分支
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
374
pages/merchant-regular-dispatch/merchant-regular-dispatch.js
Normal file
374
pages/merchant-regular-dispatch/merchant-regular-dispatch.js
Normal file
@@ -0,0 +1,374 @@
|
||||
// pages/merchant-regular-dispatch/merchant-regular-dispatch.js
|
||||
import { createPage, request } from '../../utils/base-page.js';
|
||||
import {
|
||||
STAFF_API, isStaffMode, refreshStaffContext, getStaffContext,
|
||||
restoreStaffContextAfterAuth, isMerchantPortalUser, staffOrOwner,
|
||||
} from '../../utils/staff-api.js';
|
||||
|
||||
const PAGE_SIZE = 50;
|
||||
|
||||
function apiOk(res) {
|
||||
const code = res && res.data && res.data.code;
|
||||
return code === 200 || code === 0;
|
||||
}
|
||||
|
||||
Page(createPage({
|
||||
data: {
|
||||
sjyue: '0.00',
|
||||
isStaffMode: false,
|
||||
balanceLabel: '可用余额',
|
||||
balanceTip: '派单将从此余额扣除',
|
||||
|
||||
shangpinList: [],
|
||||
selectedTypeId: null,
|
||||
selectedHuiyuanId: null,
|
||||
selectedYaoqiuleixing: null,
|
||||
currentTypeChenghaoList: [],
|
||||
|
||||
dingdanJieshao: '',
|
||||
dingdanBeizhu: '',
|
||||
laobanName: '',
|
||||
waibuDingdanId: '',
|
||||
zhidingUid: '',
|
||||
jiage: '',
|
||||
selectedLabelId: '',
|
||||
selectedLabelName: '',
|
||||
commissionEnabled: false,
|
||||
commissionValue: '',
|
||||
|
||||
showTemplateSheet: false,
|
||||
templateKeyword: '',
|
||||
templateList: [],
|
||||
templatePage: 1,
|
||||
templateHasMore: true,
|
||||
templateLoading: false,
|
||||
|
||||
isLoading: false,
|
||||
isSubmitting: false,
|
||||
},
|
||||
|
||||
async onLoad() {
|
||||
if (wx.getStorageSync('token')) {
|
||||
await restoreStaffContextAfterAuth();
|
||||
}
|
||||
if (!isMerchantPortalUser()) {
|
||||
wx.showToast({ title: '请先成为商家或绑定客服', icon: 'none' });
|
||||
setTimeout(() => wx.navigateBack(), 1500);
|
||||
return;
|
||||
}
|
||||
this.loadShangjiaYue();
|
||||
this.loadShangpinTypes();
|
||||
},
|
||||
|
||||
onShow() {
|
||||
this.loadShangjiaYue();
|
||||
this.registerNotificationComponent();
|
||||
},
|
||||
|
||||
loadShangjiaYue() {
|
||||
const staff = isStaffMode();
|
||||
this.setData({
|
||||
isStaffMode: staff,
|
||||
balanceLabel: staff ? '可用额度' : '可用余额',
|
||||
balanceTip: staff ? '派单将从您的客服额度扣除(需老板先划额度)' : '派单将从此余额扣除',
|
||||
});
|
||||
if (staff) {
|
||||
const ctx = getStaffContext() || {};
|
||||
const wallet = ctx.wallet || {};
|
||||
this.setData({ sjyue: wallet.quota_available || '0.00' });
|
||||
refreshStaffContext(request).then((fresh) => {
|
||||
const w = (fresh && fresh.wallet) || wallet;
|
||||
this.setData({ sjyue: w.quota_available || '0.00' });
|
||||
}).catch(() => {});
|
||||
return;
|
||||
}
|
||||
const app = getApp();
|
||||
const shangjiaData = app.globalData.shangjia || {};
|
||||
this.setData({ sjyue: shangjiaData.sjyue || '0.00' });
|
||||
},
|
||||
|
||||
async loadShangpinTypes() {
|
||||
this.setData({ isLoading: true });
|
||||
const staff = isStaffMode();
|
||||
try {
|
||||
const res = await request({
|
||||
url: staff ? STAFF_API.productTypes : '/dingdan/sjspleixing',
|
||||
method: 'POST',
|
||||
});
|
||||
if (apiOk(res)) {
|
||||
let list = res.data.data || [];
|
||||
if (!Array.isArray(list) && list.list) list = list.list;
|
||||
list.reverse();
|
||||
this.setData({ shangpinList: list, isLoading: false });
|
||||
if (list.length > 0) {
|
||||
this.setSelectedType(list[0]);
|
||||
}
|
||||
} else {
|
||||
throw new Error((res.data && res.data.msg) || '加载失败');
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('加载商品类型失败:', error);
|
||||
this.setData({ isLoading: false });
|
||||
wx.showToast({ title: error.message || '加载类型失败', icon: 'none' });
|
||||
}
|
||||
},
|
||||
|
||||
setSelectedType(item) {
|
||||
this.setData({
|
||||
selectedTypeId: item.id,
|
||||
selectedHuiyuanId: item.huiyuan_id,
|
||||
selectedYaoqiuleixing: item.yaoqiuleixing,
|
||||
currentTypeChenghaoList: item.chenghaoList || [],
|
||||
dingdanJieshao: '',
|
||||
jiage: '',
|
||||
selectedLabelId: '',
|
||||
selectedLabelName: '',
|
||||
commissionEnabled: false,
|
||||
commissionValue: '',
|
||||
});
|
||||
},
|
||||
|
||||
onSelectType(e) {
|
||||
const { item } = e.currentTarget.dataset;
|
||||
this.setSelectedType(item);
|
||||
},
|
||||
|
||||
openTemplateSheet() {
|
||||
if (!this.data.selectedTypeId) {
|
||||
wx.showToast({ title: '请先选择订单类型', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
this.setData({
|
||||
showTemplateSheet: true,
|
||||
templateKeyword: '',
|
||||
templateList: [],
|
||||
templatePage: 1,
|
||||
templateHasMore: true,
|
||||
}, () => this.loadTemplates(true));
|
||||
},
|
||||
|
||||
closeTemplateSheet() {
|
||||
this.setData({ showTemplateSheet: false });
|
||||
},
|
||||
|
||||
onTemplateKeywordInput(e) {
|
||||
this.setData({ templateKeyword: e.detail.value });
|
||||
},
|
||||
|
||||
onTemplateSearch() {
|
||||
this.setData({ templateList: [], templatePage: 1, templateHasMore: true }, () => {
|
||||
this.loadTemplates(true);
|
||||
});
|
||||
},
|
||||
|
||||
onTemplateScrollLower() {
|
||||
const { templateHasMore, templateLoading } = this.data;
|
||||
if (!templateHasMore || templateLoading) return;
|
||||
this.setData({ templatePage: this.data.templatePage + 1 }, () => this.loadTemplates(false));
|
||||
},
|
||||
|
||||
async loadTemplates(reset) {
|
||||
const { selectedTypeId, templatePage, templateKeyword } = this.data;
|
||||
if (!selectedTypeId) return;
|
||||
this.setData({ templateLoading: true });
|
||||
try {
|
||||
const postData = {
|
||||
shangpinTypeId: selectedTypeId,
|
||||
page: templatePage,
|
||||
pageSize: PAGE_SIZE,
|
||||
getType: 1,
|
||||
};
|
||||
if (templateKeyword.trim()) {
|
||||
postData.keyword = templateKeyword.trim();
|
||||
}
|
||||
const res = await request({
|
||||
url: staffOrOwner(STAFF_API.templateList, '/peizhi/sjddmblb'),
|
||||
method: 'POST',
|
||||
data: postData,
|
||||
});
|
||||
if (apiOk(res)) {
|
||||
const data = res.data.data || {};
|
||||
const newTemplates = (data.list || []).map((item) => ({
|
||||
mobanId: item.mobanId || item.id,
|
||||
jieshao: item.jieshao || item.moban_jieshao || '',
|
||||
jiage: item.jiage || item.price || '',
|
||||
labelId: item.labelId || '',
|
||||
labelName: item.labelName || '',
|
||||
commissionEnabled: !!item.commissionEnabled,
|
||||
commissionValue: item.commissionValue || '',
|
||||
}));
|
||||
const merged = reset || templatePage === 1
|
||||
? newTemplates
|
||||
: [...this.data.templateList, ...newTemplates];
|
||||
this.setData({
|
||||
templateList: merged,
|
||||
templateHasMore: data.hasMore !== false && newTemplates.length === PAGE_SIZE,
|
||||
templateLoading: false,
|
||||
});
|
||||
} else {
|
||||
this.setData({ templateLoading: false, templateHasMore: false });
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
this.setData({ templateLoading: false });
|
||||
wx.showToast({ title: '加载模板失败', icon: 'none' });
|
||||
}
|
||||
},
|
||||
|
||||
onSelectTemplate(e) {
|
||||
const { item } = e.currentTarget.dataset;
|
||||
if (!item) return;
|
||||
this.setData({
|
||||
dingdanJieshao: item.jieshao || '',
|
||||
jiage: String(item.jiage || ''),
|
||||
selectedLabelId: item.labelId || '',
|
||||
selectedLabelName: item.labelName || this.getLabelNameById(item.labelId),
|
||||
commissionEnabled: !!item.commissionEnabled,
|
||||
commissionValue: item.commissionValue || '',
|
||||
showTemplateSheet: false,
|
||||
});
|
||||
},
|
||||
|
||||
getLabelNameById(labelId) {
|
||||
if (!labelId) return '';
|
||||
const found = this.data.currentTypeChenghaoList.find((x) => x.id == labelId);
|
||||
return found ? found.mingcheng : '';
|
||||
},
|
||||
|
||||
onDingdanBeizhuInput(e) { this.setData({ dingdanBeizhu: e.detail.value }); },
|
||||
onLaobanNameInput(e) { this.setData({ laobanName: e.detail.value }); },
|
||||
onWaibuDingdanIdInput(e) { this.setData({ waibuDingdanId: e.detail.value }); },
|
||||
onZhidingUidInput(e) { this.setData({ zhidingUid: e.detail.value }); },
|
||||
|
||||
validateForm() {
|
||||
const { selectedTypeId, dingdanJieshao, laobanName, jiage, sjyue } = this.data;
|
||||
if (!selectedTypeId) {
|
||||
wx.showToast({ title: '请选择订单类型', icon: 'none' });
|
||||
return false;
|
||||
}
|
||||
if (!dingdanJieshao.trim()) {
|
||||
wx.showToast({ title: '请选择订单模板', icon: 'none' });
|
||||
return false;
|
||||
}
|
||||
if (!laobanName.trim()) {
|
||||
wx.showToast({ title: '请输入老板游戏昵称', icon: 'none' });
|
||||
return false;
|
||||
}
|
||||
if (!jiage) {
|
||||
wx.showToast({ title: '模板价格无效', icon: 'none' });
|
||||
return false;
|
||||
}
|
||||
const price = parseFloat(jiage);
|
||||
if (isNaN(price) || price < 0.1 || price > 10000) {
|
||||
wx.showToast({ title: '价格需在0.1-10000元之间', icon: 'none' });
|
||||
return false;
|
||||
}
|
||||
const balance = parseFloat(sjyue);
|
||||
if (price > balance) {
|
||||
if (this.data.isStaffMode) {
|
||||
wx.showModal({
|
||||
title: '额度不足',
|
||||
content: `当前可用额度${sjyue}元,需要${jiage}元。请联系商家老板划额度。`,
|
||||
showCancel: false,
|
||||
});
|
||||
} else {
|
||||
wx.showModal({
|
||||
title: '余额不足',
|
||||
content: `当前余额${sjyue}元,需要${jiage}元。请先充值。`,
|
||||
confirmText: '去充值',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
wx.navigateTo({ url: '/pages/merchant-recharge/merchant-recharge' });
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
resetForm() {
|
||||
this.setData({
|
||||
dingdanJieshao: '',
|
||||
dingdanBeizhu: '',
|
||||
laobanName: '',
|
||||
waibuDingdanId: '',
|
||||
zhidingUid: '',
|
||||
jiage: '',
|
||||
selectedLabelId: '',
|
||||
selectedLabelName: '',
|
||||
commissionEnabled: false,
|
||||
commissionValue: '',
|
||||
});
|
||||
if (this.data.shangpinList.length > 0) {
|
||||
this.setSelectedType(this.data.shangpinList[0]);
|
||||
}
|
||||
},
|
||||
|
||||
async onSubmit() {
|
||||
if (this.data.isSubmitting) return;
|
||||
if (!this.validateForm()) return;
|
||||
this.setData({ isSubmitting: true });
|
||||
|
||||
const postData = {
|
||||
shangpinTypeId: this.data.selectedTypeId,
|
||||
huiyuanId: this.data.selectedHuiyuanId,
|
||||
yaoqiuleixing: this.data.selectedYaoqiuleixing,
|
||||
dingdanJieshao: this.data.dingdanJieshao.trim(),
|
||||
dingdanBeizhu: this.data.dingdanBeizhu.trim() || '',
|
||||
laobanName: this.data.laobanName.trim(),
|
||||
zhidingUid: this.data.zhidingUid.trim() || '',
|
||||
waibuDingdanId: this.data.waibuDingdanId.trim() || '',
|
||||
jiage: this.data.jiage,
|
||||
labelId: this.data.selectedLabelId || '',
|
||||
labelName: this.data.selectedLabelName || '',
|
||||
commissionEnabled: this.data.commissionEnabled,
|
||||
commissionValue: this.data.commissionEnabled ? this.data.commissionValue : '',
|
||||
};
|
||||
|
||||
try {
|
||||
const res = await request({
|
||||
url: isStaffMode() ? STAFF_API.orderDispatch : '/dingdan/sjpaifa',
|
||||
method: 'POST',
|
||||
data: postData,
|
||||
});
|
||||
if (res && res.data.code === 200) {
|
||||
wx.showToast({ title: '派单成功', icon: 'success', duration: 2000 });
|
||||
const orderAmount = parseFloat(this.data.jiage);
|
||||
if (this.data.isStaffMode) {
|
||||
this.loadShangjiaYue();
|
||||
} else {
|
||||
const app = getApp();
|
||||
if (app.globalData.shangjia) {
|
||||
const newBalance = parseFloat(app.globalData.shangjia.sjyue || '0') - orderAmount;
|
||||
app.globalData.shangjia.sjyue = newBalance.toFixed(2);
|
||||
app.globalData.shangjia.fadanzong = (parseInt(app.globalData.shangjia.fadanzong || '0') + 1).toString();
|
||||
app.globalData.shangjia.riliushui = (parseFloat(app.globalData.shangjia.riliushui || '0') + orderAmount).toFixed(2);
|
||||
app.globalData.shangjia.yueliushui = (parseFloat(app.globalData.shangjia.yueliushui || '0') + orderAmount).toFixed(2);
|
||||
this.setData({ sjyue: app.globalData.shangjia.sjyue });
|
||||
}
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.resetForm();
|
||||
this.setData({ isSubmitting: false });
|
||||
}, 1500);
|
||||
} else {
|
||||
wx.showModal({
|
||||
title: '派单失败',
|
||||
content: res.data.msg || '请稍后重试',
|
||||
showCancel: false,
|
||||
});
|
||||
this.setData({ isSubmitting: false });
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('派单请求失败:', error);
|
||||
wx.showModal({
|
||||
title: '请求失败',
|
||||
content: error.message || '网络错误,请检查连接',
|
||||
showCancel: false,
|
||||
});
|
||||
this.setData({ isSubmitting: false });
|
||||
}
|
||||
},
|
||||
}));
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"global-notification": "/components/global-notification/global-notification",
|
||||
"popup-notice": "/components/popup-notice/popup-notice",
|
||||
"chenghao-tag": "/components/chenghao-tag/chenghao-tag"
|
||||
},
|
||||
"backgroundTextStyle": "dark",
|
||||
"navigationBarBackgroundColor": "#f7dc51",
|
||||
"navigationBarTitleText": "常规发单",
|
||||
"navigationBarTextStyle": "black",
|
||||
"backgroundColor": "#fff8e1",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
184
pages/merchant-regular-dispatch/merchant-regular-dispatch.wxml
Normal file
184
pages/merchant-regular-dispatch/merchant-regular-dispatch.wxml
Normal file
@@ -0,0 +1,184 @@
|
||||
<!-- pages/merchant-regular-dispatch/merchant-regular-dispatch.wxml -->
|
||||
<view class="page sj-form-theme">
|
||||
<view class="balance-card">
|
||||
<text class="balance-label">{{balanceLabel}}</text>
|
||||
<view class="balance-row">
|
||||
<text class="balance-value">{{sjyue}}</text>
|
||||
<text class="balance-unit">元</text>
|
||||
</view>
|
||||
<text class="balance-tip">{{balanceTip}}</text>
|
||||
</view>
|
||||
|
||||
<view class="card">
|
||||
<view class="card-header">
|
||||
<view class="card-dot"></view>
|
||||
<text class="card-title">选择订单类型</text>
|
||||
</view>
|
||||
<scroll-view class="type-scroll" scroll-x="true" enable-flex>
|
||||
<view
|
||||
class="type-chip {{selectedTypeId === item.id ? 'type-chip--active' : ''}}"
|
||||
wx:for="{{shangpinList}}"
|
||||
wx:key="id"
|
||||
data-id="{{item.id}}"
|
||||
data-item="{{item}}"
|
||||
bindtap="onSelectType"
|
||||
>
|
||||
{{item.jieshao}}
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<view class="card">
|
||||
<view class="card-header">
|
||||
<view class="card-dot"></view>
|
||||
<text class="card-title">选择订单模板</text>
|
||||
</view>
|
||||
|
||||
<view class="field">
|
||||
<view class="field-head">
|
||||
<text class="field-label">订单介绍</text>
|
||||
<text class="field-required">*</text>
|
||||
</view>
|
||||
<view class="field-picker" bindtap="openTemplateSheet">
|
||||
<text class="{{dingdanJieshao ? '' : 'field-picker-ph'}}">{{dingdanJieshao || '点击选择模板'}}</text>
|
||||
<text class="field-picker-arrow">▸</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="field" wx:if="{{dingdanJieshao}}">
|
||||
<view class="field-head">
|
||||
<text class="field-label">订单价格</text>
|
||||
<text class="field-required">*</text>
|
||||
</view>
|
||||
<view class="price-display">
|
||||
<text class="price-prefix">¥</text>
|
||||
<text class="price-value">{{jiage || '0.00'}}</text>
|
||||
</view>
|
||||
<view class="template-meta" wx:if="{{selectedLabelName || commissionEnabled}}">
|
||||
<text class="template-meta-label" wx:if="{{selectedLabelName}}">标签:{{selectedLabelName}}</text>
|
||||
<text class="template-meta-label" wx:if="{{commissionEnabled}}">押金:¥{{commissionValue}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="card">
|
||||
<view class="card-header">
|
||||
<view class="card-dot"></view>
|
||||
<text class="card-title">填写订单信息</text>
|
||||
</view>
|
||||
|
||||
<view class="field">
|
||||
<view class="field-head">
|
||||
<text class="field-label">订单备注</text>
|
||||
<text class="field-optional">选填</text>
|
||||
<text class="field-count">{{dingdanBeizhu.length}}/50</text>
|
||||
</view>
|
||||
<input
|
||||
class="field-input"
|
||||
placeholder="选填,补充其他信息"
|
||||
maxlength="50"
|
||||
value="{{dingdanBeizhu}}"
|
||||
bindinput="onDingdanBeizhuInput"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view class="field">
|
||||
<view class="field-head">
|
||||
<text class="field-label">老板昵称/ID</text>
|
||||
<text class="field-required">*</text>
|
||||
<text class="field-count">{{laobanName.length}}/15</text>
|
||||
</view>
|
||||
<input
|
||||
class="field-input"
|
||||
placeholder="请输入老板昵称或ID"
|
||||
maxlength="15"
|
||||
value="{{laobanName}}"
|
||||
bindinput="onLaobanNameInput"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view class="field">
|
||||
<view class="field-head">
|
||||
<text class="field-label">拼多多订单号</text>
|
||||
<text class="field-optional">选填</text>
|
||||
</view>
|
||||
<input
|
||||
class="field-input"
|
||||
placeholder="外部平台订单号"
|
||||
maxlength="64"
|
||||
value="{{waibuDingdanId}}"
|
||||
bindinput="onWaibuDingdanIdInput"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view class="field">
|
||||
<view class="field-head">
|
||||
<text class="field-label">指定UID</text>
|
||||
<text class="field-optional">选填</text>
|
||||
</view>
|
||||
<input
|
||||
class="field-input"
|
||||
placeholder="指定某位接单员接单"
|
||||
maxlength="10"
|
||||
value="{{zhidingUid}}"
|
||||
bindinput="onZhidingUidInput"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="bottom-space"></view>
|
||||
|
||||
<view class="submit-bar">
|
||||
<view
|
||||
class="submit-btn {{isSubmitting ? 'submit-btn--disabled' : ''}}"
|
||||
bindtap="onSubmit"
|
||||
hover-class="submit-btn--hover"
|
||||
>
|
||||
{{isSubmitting ? '派发中...' : '立即派发'}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="loading-mask" wx:if="{{isLoading}}">
|
||||
<view class="loading-box">
|
||||
<view class="loading-spinner"></view>
|
||||
<text class="loading-text">加载中...</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 模板选择底部弹层 -->
|
||||
<block wx:if="{{showTemplateSheet}}">
|
||||
<view class="sheet-mask" bindtap="closeTemplateSheet"></view>
|
||||
<view class="sheet-panel">
|
||||
<view class="sheet-hd">
|
||||
<text class="sheet-title">选择订单模板</text>
|
||||
<text class="sheet-close" bindtap="closeTemplateSheet">×</text>
|
||||
</view>
|
||||
<view class="sheet-search">
|
||||
<input
|
||||
class="sheet-search-input"
|
||||
placeholder="搜索模板ID/介绍..."
|
||||
value="{{templateKeyword}}"
|
||||
bindinput="onTemplateKeywordInput"
|
||||
bindconfirm="onTemplateSearch"
|
||||
/>
|
||||
<text class="sheet-search-btn" bindtap="onTemplateSearch">搜索</text>
|
||||
</view>
|
||||
<scroll-view class="sheet-list" scroll-y bindscrolltolower="onTemplateScrollLower">
|
||||
<block wx:for="{{templateList}}" wx:key="mobanId">
|
||||
<view class="sheet-item" data-item="{{item}}" bindtap="onSelectTemplate">
|
||||
<view class="sheet-item-intro">{{item.jieshao || '无介绍'}}</view>
|
||||
<view class="sheet-item-row">
|
||||
<chenghao-tag wx:if="{{item.labelName}}" mingcheng="{{item.labelName}}" texiaoJson="{{''}}"/>
|
||||
<text class="sheet-item-price">¥{{item.jiage || '0.00'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="sheet-empty" wx:if="{{!templateLoading && templateList.length === 0}}">暂无模板</view>
|
||||
<view class="sheet-empty" wx:if="{{templateLoading}}">加载中...</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<global-notification id="global-notification" />
|
||||
<popup-notice id="popupNotice" />
|
||||
</view>
|
||||
343
pages/merchant-regular-dispatch/merchant-regular-dispatch.wxss
Normal file
343
pages/merchant-regular-dispatch/merchant-regular-dispatch.wxss
Normal file
@@ -0,0 +1,343 @@
|
||||
@import '../../styles/shangjia-xym-form.wxss';
|
||||
|
||||
page {
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
.balance-row {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
justify-content: center;
|
||||
margin: 12rpx 0 8rpx;
|
||||
}
|
||||
|
||||
.balance-value {
|
||||
font-size: 52rpx;
|
||||
font-weight: 700;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.balance-unit {
|
||||
font-size: 26rpx;
|
||||
margin-left: 6rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.balance-tip {
|
||||
font-size: 20rpx;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.card-dot {
|
||||
width: 8rpx;
|
||||
height: 8rpx;
|
||||
border-radius: 4rpx;
|
||||
margin-right: 12rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.type-scroll {
|
||||
white-space: nowrap;
|
||||
display: flex;
|
||||
padding: 8rpx 0;
|
||||
}
|
||||
|
||||
.field {
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
|
||||
.field:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.field-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.field-label {
|
||||
font-size: 26rpx;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.field-required {
|
||||
font-size: 26rpx;
|
||||
color: #e04040;
|
||||
margin-left: 4rpx;
|
||||
}
|
||||
|
||||
.field-optional {
|
||||
font-size: 20rpx;
|
||||
color: #bbb;
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
|
||||
.field-count {
|
||||
font-size: 20rpx;
|
||||
color: #ccc;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.field-input {
|
||||
width: 100%;
|
||||
height: 76rpx;
|
||||
background: #f7f7f7;
|
||||
border-radius: 12rpx;
|
||||
padding: 0 20rpx;
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
border: 1rpx solid #eee;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.field-readonly {
|
||||
background: #fafafa;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.field-picker {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
min-height: 76rpx;
|
||||
background: #f7f7f7;
|
||||
border-radius: 12rpx;
|
||||
padding: 16rpx 20rpx;
|
||||
border: 1rpx solid #eee;
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.field-picker-ph {
|
||||
color: #bbb;
|
||||
}
|
||||
|
||||
.field-picker-arrow {
|
||||
font-size: 24rpx;
|
||||
color: #ccc;
|
||||
flex-shrink: 0;
|
||||
margin-left: 12rpx;
|
||||
}
|
||||
|
||||
.price-display {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
height: 76rpx;
|
||||
background: #fafafa;
|
||||
border-radius: 12rpx;
|
||||
padding: 0 20rpx;
|
||||
border: 1rpx solid #eee;
|
||||
}
|
||||
|
||||
.price-prefix {
|
||||
font-size: 28rpx;
|
||||
font-weight: 700;
|
||||
color: #e04040;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
|
||||
.price-value {
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
color: #e04040;
|
||||
}
|
||||
|
||||
.template-meta {
|
||||
margin-top: 12rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 12rpx;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.template-meta-label {
|
||||
font-size: 22rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.bottom-space {
|
||||
height: 20rpx;
|
||||
}
|
||||
|
||||
.submit-bar {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: #fff;
|
||||
padding: 16rpx 24rpx;
|
||||
padding-bottom: calc(16rpx + env(safe-area-inset-bottom));
|
||||
border-top: 1rpx solid #f0f0f0;
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
.submit-btn {
|
||||
height: 88rpx;
|
||||
background: #e04040;
|
||||
border-radius: 12rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
color: #fff;
|
||||
letter-spacing: 2rpx;
|
||||
}
|
||||
|
||||
.submit-btn--hover {
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
.submit-btn--disabled {
|
||||
opacity: 0.5;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.loading-mask {
|
||||
position: fixed;
|
||||
top: 0; left: 0; right: 0; bottom: 0;
|
||||
background: rgba(255,255,255,0.8);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 10000;
|
||||
}
|
||||
|
||||
.loading-box {
|
||||
background: #fff;
|
||||
padding: 48rpx 64rpx;
|
||||
border-radius: 16rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
box-shadow: 0 4rpx 20rpx rgba(0,0,0,0.08);
|
||||
}
|
||||
|
||||
.loading-spinner {
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
border: 4rpx solid #eee;
|
||||
border-top-color: #333;
|
||||
border-radius: 50%;
|
||||
animation: spin 0.8s linear infinite;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.loading-text {
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
/* 模板选择底部弹层 */
|
||||
.sheet-mask {
|
||||
position: fixed;
|
||||
top: 0; left: 0; right: 0; bottom: 0;
|
||||
background: rgba(0,0,0,0.45);
|
||||
z-index: 10001;
|
||||
}
|
||||
|
||||
.sheet-panel {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
max-height: 75vh;
|
||||
background: #fff;
|
||||
border-radius: 24rpx 24rpx 0 0;
|
||||
z-index: 10002;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.sheet-hd {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 28rpx 24rpx 16rpx;
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
}
|
||||
|
||||
.sheet-title {
|
||||
font-size: 30rpx;
|
||||
font-weight: 700;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.sheet-close {
|
||||
font-size: 40rpx;
|
||||
color: #999;
|
||||
line-height: 1;
|
||||
padding: 0 8rpx;
|
||||
}
|
||||
|
||||
.sheet-search {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 16rpx 24rpx;
|
||||
background: #f5f5f5;
|
||||
border-radius: 12rpx;
|
||||
padding: 0 16rpx;
|
||||
height: 72rpx;
|
||||
}
|
||||
|
||||
.sheet-search-input {
|
||||
flex: 1;
|
||||
font-size: 26rpx;
|
||||
height: 72rpx;
|
||||
}
|
||||
|
||||
.sheet-search-btn {
|
||||
font-size: 26rpx;
|
||||
color: #e04040;
|
||||
font-weight: 600;
|
||||
padding-left: 16rpx;
|
||||
}
|
||||
|
||||
.sheet-list {
|
||||
flex: 1;
|
||||
min-height: 200rpx;
|
||||
max-height: 50vh;
|
||||
}
|
||||
|
||||
.sheet-item {
|
||||
padding: 24rpx;
|
||||
border-bottom: 1rpx solid #f5f5f5;
|
||||
}
|
||||
|
||||
.sheet-item:active {
|
||||
background: #fafafa;
|
||||
}
|
||||
|
||||
.sheet-item-intro {
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.sheet-item-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.sheet-item-price {
|
||||
font-size: 26rpx;
|
||||
color: #e04040;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.sheet-empty {
|
||||
text-align: center;
|
||||
padding: 60rpx 24rpx;
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
}
|
||||
Reference in New Issue
Block a user