Commit 58c6fc5d by 前端

Merge branch 'SAAS+V5.8.1' into 'saas+v5.8.2'

上线合并

See merge request !529
2 parents 1fcd8916 5eeef210
...@@ -220,18 +220,6 @@ Page({ ...@@ -220,18 +220,6 @@ Page({
type: 'input', type: 'input',
maxlength: 36 maxlength: 36
}, },
{
key: 'returnSummary',
label: '回单摘要',
required: false,
fullWidth: false,
switchKey: 'returnSummarySwitch',
remarkKey: 'returnSummaryRemark',
targetKey: 'returnSummarySwitch',
placeholder: '请输入回单摘要',
type: 'switchInput',
maxlength: 35
}
], ],
formFields3: [ formFields3: [
{ {
...@@ -1121,13 +1109,11 @@ Page({ ...@@ -1121,13 +1109,11 @@ Page({
return return
} }
} }
for (const field of formFields2) { if (Number(formData.returnSummarySwitch) === 1) {
if (field.type === 'switchInput' && Number(formData[field.switchKey]) === 1) { const remark = (formData.returnSummaryRemark || '').trim()
const remark = (formData[field.remarkKey] || '').trim() if (!remark) {
if (!remark) { wx.$util.showToast('请填写回单摘要')
wx.$util.showToast(`请填写${field.label}`) return
return
}
} }
} }
const phoneRex = /^[1]([3-9])[0-9]{9}$/ const phoneRex = /^[1]([3-9])[0-9]{9}$/
......
...@@ -201,13 +201,8 @@ page { ...@@ -201,13 +201,8 @@ page {
margin-right: 8rpx; margin-right: 8rpx;
} }
} }
&.switch-input-row { &.switch-only-row {
flex-shrink: 0; flex-shrink: 0;
gap: 24rpx;
.switch-input-field {
width: 320rpx;
text-align: right;
}
} }
} }
.form-textarea { .form-textarea {
...@@ -223,6 +218,36 @@ page { ...@@ -223,6 +218,36 @@ page {
} }
} }
} }
.return-summary {
padding: 28rpx 32rpx;
.return-summary-row {
width: 100%;
}
.return-summary-label {
color: #292D33;
.requiredLabel {
margin-left: 8rpx;
color: #F24724;
font-weight: 400;
}
}
.return-summary-input-wrap {
margin-top: 16rpx;
}
.return-summary-input-box {
width: 100%;
background: #f4f5f7;
border-radius: 16rpx;
padding: 24rpx;
box-sizing: border-box;
}
.return-summary-input {
width: 100%;
text-align: left;
height: 40rpx;
line-height: 40rpx;
}
}
.upload-container { .upload-container {
.form-item { .form-item {
background: #ffffff; background: #ffffff;
...@@ -382,6 +407,10 @@ page { ...@@ -382,6 +407,10 @@ page {
box-sizing: border-box; box-sizing: border-box;
font-size: 28rpx; font-size: 28rpx;
color: #292D33; color: #292D33;
.break-word {
word-break: break-all;
white-space: normal;
}
.mb-24 { .mb-24 {
margin-bottom: 24rpx; margin-bottom: 24rpx;
} }
......
...@@ -197,31 +197,9 @@ ...@@ -197,31 +197,9 @@
<view class="form-item flex align-center justify-between"> <view class="form-item flex align-center justify-between">
<view class="form-label"> <view class="form-label">
{{item.label}} {{item.label}}
<text wx:if="{{item.type === 'switchInput' ? formData[item.switchKey] == 1 : item.required}}" class="requiredLabel">*</text> <text wx:if="{{item.required}}" class="requiredLabel">*</text>
</view>
<view wx:if="{{item.type === 'switchInput'}}" class="form-value switch-input-row flex align-center">
<van-switch
checked="{{formData[item.switchKey]}}"
active-value="{{1}}"
inactive-value="{{0}}"
active-color="#347BFF"
inactive-color="#D0D2D6"
size="24px"
bind:change="handleReturnSummarySwitchChange"
data-switch-key="{{item.switchKey}}"
/>
<input
wx:if="{{formData[item.switchKey] == 1}}"
value="{{formData[item.remarkKey]}}"
placeholder="{{item.placeholder || '请输入'}}"
placeholder-class="placeholder"
maxlength="{{item.maxlength}}"
bindinput="handleInput"
data-field="{{item.remarkKey}}"
class="form-input switch-input-field"
/>
</view> </view>
<view wx:else class="form-value"> <view class="form-value">
<input value="{{formData[item.key]}}" <input value="{{formData[item.key]}}"
placeholder="{{item.placeholder || '请输入'}}" placeholder="{{item.placeholder || '请输入'}}"
placeholder-class="placeholder" placeholder-class="placeholder"
...@@ -288,6 +266,40 @@ ...@@ -288,6 +266,40 @@
</view> </view>
</view> </view>
</view> </view>
<view class="box-radio" style="padding: 32rpx 0;">
<!-- 回单摘要 -->
<view class="return-summary">
<view class="return-summary-row flex align-center justify-between">
<view class="return-summary-label">
回单摘要
<text wx:if="{{formData.returnSummarySwitch == 1}}" class="requiredLabel">*</text>
</view>
<van-switch
checked="{{formData.returnSummarySwitch}}"
active-value="{{1}}"
inactive-value="{{0}}"
active-color="#347BFF"
inactive-color="#D0D2D6"
size="24px"
bind:change="handleReturnSummarySwitchChange"
data-switch-key="returnSummarySwitch"
/>
</view>
<view wx:if="{{formData.returnSummarySwitch == 1}}" class="return-summary-input-wrap">
<view class="return-summary-input-box">
<input
value="{{formData.returnSummaryRemark}}"
placeholder="请输入回单摘要"
placeholder-class="placeholder"
maxlength="35"
bindinput="handleInput"
data-field="returnSummaryRemark"
class="return-summary-input"
/>
</view>
</view>
</view>
</view>
<view class="box-radio" style="padding: 0;"> <view class="box-radio" style="padding: 0;">
<!-- 随车材料 --> <!-- 随车材料 -->
<view class="upload-container"> <view class="upload-container">
...@@ -491,7 +503,7 @@ ...@@ -491,7 +503,7 @@
</view> </view>
<view class="flex align-center mb-24"> <view class="flex align-center mb-24">
<view class="title-label-see">回单摘要</view> <view class="title-label-see">回单摘要</view>
<view>{{ formData.returnSummaryRemark || '-' }}</view> <view class="flex-1 break-word">{{ formData.returnSummaryRemark || '-' }}</view>
</view> </view>
<view class="flex {{formData.payerBankCardUrl ? 'mb-24' : ''}}" wx:if="{{formData.payerIdCardFrontUrl || formData.payerIdCardBackUrl}}"> <view class="flex {{formData.payerBankCardUrl ? 'mb-24' : ''}}" wx:if="{{formData.payerIdCardFrontUrl || formData.payerIdCardBackUrl}}">
<view class="title-label-see">身份证</view> <view class="title-label-see">身份证</view>
......
...@@ -226,6 +226,7 @@ Page({ ...@@ -226,6 +226,7 @@ Page({
}, },
input(e) { input(e) {
let { value } = e.detail let { value } = e.detail
value = wx.$util.replaceEmoji(value)
this.setData({ this.setData({
keyword: value keyword: value
}) })
......
// tabWorkOrder/components/applyRefundBtn/applyRefundBtn.js // tabWorkOrder/components/applyRefundBtn/applyRefundBtn.js
import api from '~/api/api' import api from "~/api/api";
import qs from "~/utils/lib/qs";
Component({ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
*/ */
properties: { properties: {
orderInfo: Object, orderInfo: Object,
showRefundBtn: Boolean, showRefundBtn: Boolean,
updateFlag: Boolean updateFlag: Boolean,
}, },
/** /**
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {
moreSelectData: [], moreSelectData: [],
showSelect: false, showSelect: false,
moreSelectIndex: null, moreSelectIndex: null,
areaOperationsFlag: false areaOperationsFlag: false,
}, },
/** /**
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
// 点击更多按钮 // 点击更多按钮
selectTap() { selectTap() {
let { orderInfo } = this.data let { orderInfo } = this.data;
let allOptions = [] let allOptions = [];
if (orderInfo.selectPayType == 2) { if (orderInfo.selectPayType == 2) {
// 门店收款订单查询退款可展示按钮 // 门店收款订单查询退款可展示按钮
allOptions = ['标记退款', '退款详情'] allOptions = ["标记退款", "退款详情"];
// 查询订单可展示按钮 // 查询订单可展示按钮
api.getMoreBtnAPI({ orderCode: orderInfo.orderCode }).then(res => { api.getMoreBtnAPI({ orderCode: orderInfo.orderCode }).then((res) => {
let { code, data } = res let { code, data } = res;
if (code == 0) { if (code == 0) {
this.setData({ this.setData({
moreSelectData: this.filterMoreSelectData( moreSelectData: this.filterMoreSelectData(data.refundApplyButton, data.refundApplyDetailButton, allOptions, 1),
data.refundApplyButton, showSelect: !this.data.showSelect,
data.refundApplyDetailButton, });
allOptions, }
1 });
), } else {
showSelect: !this.data.showSelect allOptions = ["申请退款", "退款详情"];
}) // 查询订单可展示按钮
} api.getMoreBtnAPI({ orderCode: orderInfo.orderCode }).then((res) => {
}) let { code, data } = res;
} else { if (code == 0) {
allOptions = ['申请退款', '退款详情'] this.setData({
// 查询订单可展示按钮 moreSelectData: this.filterMoreSelectData(data.refundApplyButton, data.refundApplyDetailButton, allOptions, 2),
api.getMoreBtnAPI({ orderCode: orderInfo.orderCode }).then(res => { showSelect: !this.data.showSelect,
let { code, data } = res });
if (code == 0) { }
this.setData({ });
moreSelectData: this.filterMoreSelectData( }
data.refundApplyButton, },
data.refundApplyDetailButton,
allOptions,
2
),
showSelect: !this.data.showSelect
})
}
})
}
},
filterMoreSelectData( filterMoreSelectData(refundApplyButton, refundApplyDetailButton, allOptions, num) {
refundApplyButton, const buttonType = num === 2 ? "申请退款" : "标记退款";
refundApplyDetailButton, const conditions = {
allOptions, [buttonType]: refundApplyButton === "Y",
num 退款详情: refundApplyDetailButton === "Y",
) { };
const buttonType = num === 2 ? '申请退款' : '标记退款' return allOptions.filter((option) => conditions[option]);
const conditions = { },
[buttonType]: refundApplyButton === 'Y',
退款详情: refundApplyDetailButton === 'Y'
}
return allOptions.filter(option => conditions[option])
},
closeSelect() { closeSelect() {
this.setData({ this.setData({
showSelect: false, showSelect: false,
moreSelectIndex: null moreSelectIndex: null,
}) });
}, },
tapConstruction() { tapConstruction() {
this.closeSelect() this.closeSelect();
let thisPage = wx.$router.getPageInstance() let thisPage = wx.$router.getPageInstance();
thisPage.setData({ thisPage.setData({
sublistVisible: true sublistVisible: true,
}) });
}, },
optionTap(e) { optionTap(e) {
let { index, item } = e.currentTarget.dataset let { index, item } = e.currentTarget.dataset;
let { orderInfo } = this.data let { orderInfo } = this.data;
let userInfo = wx.$util.getUserInfo() let userInfo = wx.$util.getUserInfo();
if (item == '申请退款' || item == '标记退款') { if (item == "申请退款" || item == "标记退款") {
// 申请退款点击埋点 // 申请退款点击埋点
if (item == '申请退款') if (item == "申请退款") wx.$track.setTrackData(0, "apply_refund_page", {}, "", 1);
wx.$track.setTrackData(0, 'apply_refund_page', {}, '', 1) // 退款申请时区域运营查询
// 退款申请时区域运营查询 api.areaSupervisionExistsAPI({
api merchantId: userInfo.shopMerchantId,
.areaSupervisionExistsAPI({ sceneType: userInfo.sceneType,
merchantId: userInfo.shopMerchantId, }).then((res) => {
sceneType: userInfo.sceneType let { code, data, message } = res;
}) if (code == 0) {
.then(res => { if (!data) {
let { code, data, message } = res return this.setData({
if (code == 0) { areaOperationsFlag: true,
if (!data) { showSelect: !this.data.showSelect,
return this.setData({ });
areaOperationsFlag: true, } else {
showSelect: !this.data.showSelect wx.navigateTo({
}) url:
} else { "/tabWorkOrder/pages/refundApply/refundApply?" +
wx.navigateTo({ qs.stringify({
url: `/tabWorkOrder/pages/refundApply/refundApply?orderCode=${ orderCode: orderInfo.orderCode,
orderInfo.orderCode shopMerchantName: orderInfo.merchantName,
}&shopMerchantName=${orderInfo.merchantName}&shopMerchantId=${ shopMerchantId: orderInfo.merchantId,
orderInfo.merchantId refundPayType: orderInfo.selectPayType == 2 ? 2 : 1,
}&refundPayType=${orderInfo.selectPayType == 2 ? 2 : 1}` refundName: orderInfo.customerName,
}) }),
this.closeSelect() });
} this.closeSelect();
} else { }
return wx.$util.showToast(message) } else {
} return wx.$util.showToast(message);
}) }
} else { });
// 退款详情点击埋点 } else {
if (orderInfo?.selectPayType != 2) // 退款详情点击埋点
wx.$track.setTrackData(0, 'refund_detail_page', {}, '', 1) if (orderInfo?.selectPayType != 2) wx.$track.setTrackData(0, "refund_detail_page", {}, "", 1);
// 点击退款详情,判断是否存在多条退款申请记录,存在跳转列表页,不存在直接跳转详情页 // 点击退款详情,判断是否存在多条退款申请记录,存在跳转列表页,不存在直接跳转详情页
api api.getRefundDetailListAPI({ orderCode: orderInfo.orderCode }).then((res) => {
.getRefundDetailListAPI({ orderCode: orderInfo.orderCode }) let { code, data } = res;
.then(res => { if (code == 0) {
let { code, data } = res if (data?.length > 1) {
if (code == 0) { wx.navigateTo({
if (data?.length > 1) { url: `/tabWorkOrder/pages/refundDetailList/refundDetailList?orderCode=${orderInfo.orderCode}`,
wx.navigateTo({ });
url: `/tabWorkOrder/pages/refundDetailList/refundDetailList?orderCode=${orderInfo.orderCode}` } else if (data.length == 1) {
}) wx.navigateTo({
} else if (data.length == 1) { url: `/tabWorkOrder/pages/refundApply/refundApply?applyCode=${data[0].applyCode}&refundPayType=${orderInfo.selectPayType == 2 ? 2 : 1}`,
wx.navigateTo({ });
url: `/tabWorkOrder/pages/refundApply/refundApply?applyCode=${ }
data[0].applyCode this.closeSelect();
}&refundPayType=${orderInfo.selectPayType == 2 ? 2 : 1}` }
}) });
} }
this.closeSelect()
}
})
}
this.setData({ this.setData({
moreSelectIndex: index moreSelectIndex: index,
// showSelect: !this.data.showSelect // showSelect: !this.data.showSelect
}) });
}, },
closeModal() { closeModal() {
this.setData({ this.setData({
areaOperationsFlag: false areaOperationsFlag: false,
}) });
} },
} },
}) });
...@@ -1357,7 +1357,7 @@ Page({ ...@@ -1357,7 +1357,7 @@ Page({
if (orderObj.orderType !== undefined && orderObj.orderType !== null) { if (orderObj.orderType !== undefined && orderObj.orderType !== null) {
orderObj.djOrderType = orderObj.orderType orderObj.djOrderType = orderObj.orderType
} else { } else {
orderObj.djOrderType = 0 orderObj.djOrderType = 1
} }
} }
......
...@@ -86,7 +86,7 @@ BaseStrategy.prototype.commonHandle = function (res) { ...@@ -86,7 +86,7 @@ BaseStrategy.prototype.commonHandle = function (res) {
// 1. 兼容初始化字段默认值 // 1. 兼容初始化字段默认值
if (res.djOrderType === undefined || res.djOrderType === null) { if (res.djOrderType === undefined || res.djOrderType === null) {
res.djOrderType = res.djOrderType =
res.orderType !== undefined && res.orderType !== null ? res.orderType : 0 res.orderType !== undefined && res.orderType !== null ? res.orderType : 1
} }
if (res.discountType === undefined || res.discountType === null) if (res.discountType === undefined || res.discountType === null)
res.discountType = 3 res.discountType = 3
......
import api from "~/utils/request/request.js"; import api from "~/utils/request/request.js";
module.exports = { module.exports = {
// 退款申请流程状态栏
getRefundStatusAPI(data) {
return api.post('dj.api.smartcarlife.refundApplyRecord.audit.select', data)
},
// 标记订单子订单详情查询
getSubOrderInfoAPI(data) {
return api.post('dj.api.smartcarlife.goodsOrder.goodsSubOrder.list', data)
},
// 退款详情明细查询
getRefundDetailInfoAPI(data) {
return api.post('dj.api.smartcarlife.refundApplyRecord.detail.select', data)
},
// 发起退款申请
applyRefundAPI(data) {
return api.post('dj.api.smartcarlife.refundApplyRecord.add', data)
},
// 退款审核
auditRefundAllpyAPI(data) {
return api.post('dj.api.smartcarlife.refundApplyRecord.audit.update', data)
},
// 根据主订单号获取退款成功记录
getRefundLogByOrderCodeAPI(data) {
return api.post('dj.api.smartcarlife.refundApplyRecord.refundedGoodsOrder.list', data)
},
// 门店收款订单标记退款
markAsRefundedAPI(data) {
return api.post('dj.api.smartcarlife.refundApplyRecord.offlinePay.add', data)
}
}
\ No newline at end of file \ No newline at end of file
// 退款申请流程状态栏
getRefundStatusAPI(data) {
return api.post("dj.api.smartcarlife.refundApplyRecord.audit.select", data);
},
// 标记订单子订单详情查询
getSubOrderInfoAPI(data) {
return api.post("dj.api.smartcarlife.goodsOrder.goodsSubOrder.list", data);
},
// 退款详情明细查询
getRefundDetailInfoAPI(data) {
return api.post("dj.api.smartcarlife.refundApplyRecord.detail.select", data);
},
// 发起退款申请
applyRefundAPI(data) {
return api.post("dj.api.smartcarlife.refundApplyRecord.add", data);
},
// 退款审核
auditRefundAllpyAPI(data) {
return api.post("dj.api.smartcarlife.refundApplyRecord.audit.update", data);
},
// 根据主订单号获取退款成功记录
getRefundLogByOrderCodeAPI(data) {
return api.post("dj.api.smartcarlife.refundApplyRecord.refundedGoodsOrder.list", data);
},
// 门店收款订单标记退款
markAsRefundedAPI(data) {
return api.post("dj.api.smartcarlife.refundApplyRecord.offlinePay.add", data);
},
};
// tabWorkOrder/pages/refundApply/components/dialogInput.js
const EDIT_ICON = "/tabWorkOrder/images/editIcon.png";
Component({
properties: {
name: {
type: String,
value: "",
},
label: {
type: String,
value: "",
},
value: {
type: String,
value: "",
observer(nextValue) {
this.syncLocalValue(nextValue);
},
},
compareValue: {
type: String,
value: "",
observer(nextValue) {
this.syncCompareValue(nextValue);
},
},
placeholder: {
type: String,
value: "点击输入",
},
defaultTips: {
type: String,
value: "姓名自动带入工单完整姓名,如需修改可点击编辑",
},
warningTips: {
type: String,
value: "收款人与工单车主姓名不一致,若不一致请提供收款人付款凭证(如微信截图)",
},
tips: {
type: String,
value: "",
},
required: {
type: Boolean,
value: false,
},
disabled: {
type: Boolean,
value: false,
},
showBorder: {
type: Boolean,
value: true,
},
showEditIcon: {
type: Boolean,
value: true,
},
maxlength: {
type: Number,
value: 50,
},
type: {
type: String,
value: "text",
},
},
data: {
popupVisible: false,
localValue: "",
tempValue: "",
editBaseValue: "",
hasConfirmedEdit: false,
showChangedTips: false,
dialogValueChanged: false,
editIcon: EDIT_ICON,
},
lifetimes: {
attached() {
this.syncLocalValue(this.data.value);
this.syncCompareValue(this.data.compareValue);
},
},
methods: {
syncLocalValue(value) {
const normalizedValue = this.normalizeValue(value);
this.setData({
localValue: normalizedValue,
showChangedTips: this.data.hasConfirmedEdit ? normalizedValue !== this.data.editBaseValue : false,
});
},
normalizeValue(value) {
return value === undefined || value === null ? "" : String(value);
},
syncCompareValue(compareValue) {
const normalizedCompareValue = this.normalizeValue(compareValue);
this.setData({
editBaseValue: normalizedCompareValue,
showChangedTips: this.data.hasConfirmedEdit ? this.data.localValue !== normalizedCompareValue : false,
dialogValueChanged: this.data.popupVisible && this.data.tempValue !== normalizedCompareValue,
});
},
buildDetail(value) {
return {
name: this.data.name,
label: this.data.label,
value,
};
},
handleActivateEdit() {
if (this.data.disabled) return;
this.setData({
popupVisible: true,
tempValue: this.data.localValue,
dialogValueChanged: this.data.localValue !== this.data.editBaseValue,
});
this.triggerEvent("edit", this.buildDetail(this.data.localValue));
},
handleEditIconTap() {
this.handleActivateEdit();
},
handleDialogInput(e) {
const value = this.normalizeValue(e.detail.value);
this.setData({
tempValue: value,
dialogValueChanged: value !== this.data.editBaseValue,
});
},
noScroll() {},
handleClosePopup() {
this.setData({
popupVisible: false,
tempValue: this.data.localValue,
dialogValueChanged: false,
});
},
handleConfirmChange() {
const value = this.normalizeValue(this.data.tempValue).trim();
if (this.data.required && !value) {
const message = `${this.data.label || "当前字段"}不能为空`;
if (wx?.$util?.showToast) {
wx.$util.showToast(message);
} else {
wx.showToast({
title: message,
icon: "none",
});
}
return;
}
this.setData({
popupVisible: false,
hasConfirmedEdit: true,
localValue: value,
tempValue: value,
showChangedTips: value !== this.data.editBaseValue,
// Keep the dialog warning state until the popup fully closes
// to avoid a visual flicker on the confirm click.
dialogValueChanged: value !== this.data.editBaseValue,
});
this.triggerEvent("confirm", this.buildDetail(value));
},
},
});
{
"component": true,
"usingComponents": {
"van-dialog": "@vant/weapp/dialog/index",
"van-icon": "@vant/weapp/icon/index"
}
}
/* tabWorkOrder/pages/refundApply/components/dialogInput.wxss */
.dialog-input {
padding: var(--fontSize24) var(--fontSize40);
background: #ffffff;
box-sizing: border-box;
&--border {
border-bottom: 1px solid #eff0f2;
}
&__content {
display: flex;
flex-direction: column;
}
&__title {
display: flex;
align-items: center;
margin-bottom: var(--fontSize12);
}
&__label {
color: #292d33;
font-size: var(--fontSize28);
line-height: var(--fontSize40);
}
&__required {
margin-left: var(--fontSize8);
color: #f00;
font-size: var(--fontSize20);
line-height: 1;
}
&__field {
display: flex;
align-items: center;
height: var(--fontSize72);
padding: 0 var(--fontSize24);
border: 1px solid #eff0f2;
border-radius: var(--fontSize16);
background: #ffffff;
box-sizing: border-box;
}
&__field--disabled {
background: #f7f8fa;
}
&__text {
flex: 1;
min-width: 0;
color: #292d33;
font-size: var(--fontSize28);
line-height: var(--fontSize40);
}
&__text {
display: block;
line-height: var(--fontSize72);
word-break: break-all;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
&__text--placeholder {
color: #999ea8;
}
&__placeholder {
color: #999ea8;
font-size: var(--fontSize28);
}
&__icon {
width: var(--fontSize32);
height: var(--fontSize32);
margin-left: var(--fontSize12);
flex-shrink: 0;
}
&__tips {
margin-top: var(--fontSize12);
color: #999ea8;
font-size: var(--fontSize24);
font-weight: 400;
line-height: var(--fontSize32);
}
&__dialog-title {
padding: 0 0 var(--fontSize40);
color: #292d33;
font-size: var(--fontSize32);
font-weight: 500;
line-height: var(--fontSize48);
text-align: center;
}
&__dialog-body {
padding: var(--fontSize48);
border-top: 1px solid #ebedf0;
border-bottom: 1px solid #ebedf0;
}
&__dialog-form {
display: flex;
flex-direction: column;
gap: var(--fontSize12);
}
&__dialog-label-row {
display: flex;
align-items: center;
gap: var(--fontSize8);
}
&__dialog-label {
color: #292d33;
font-size: var(--fontSize28);
line-height: var(--fontSize40);
}
&__dialog-required {
color: #ef4444;
font-size: var(--fontSize20);
line-height: 1;
}
&__dialog-input-wrap {
display: flex;
align-items: center;
height: var(--fontSize72);
padding: 0 var(--fontSize24);
background: #ffffff;
border: 1px solid #eff0f2;
border-radius: var(--fontSize16);
box-sizing: border-box;
}
&__dialog-input {
width: 100%;
height: 100%;
color: #292d33;
font-size: var(--fontSize28);
line-height: var(--fontSize72);
}
&__dialog-alert {
display: flex;
align-items: flex-start;
padding: var(--fontSize10) var(--fontSize24);
background: #fff7ed;
border-radius: var(--fontSize12);
box-sizing: border-box;
}
&__outer-alert {
margin-top: var(--fontSize12);
}
&__dialog-alert-icon {
position: relative;
width: var(--fontSize28);
height: var(--fontSize28);
margin-right: var(--fontSize8);
flex-shrink: 0;
border-radius: 50%;
background: #f59e0b;
}
&__dialog-alert-line {
position: absolute;
top: 6px;
left: 50%;
width: 2px;
height: 8px;
background: #ffffff;
border-radius: 1px;
transform: translateX(-50%);
}
&__dialog-alert-dot {
position: absolute;
bottom: 5px;
left: 50%;
width: 3px;
height: 3px;
background: #ffffff;
border-radius: 50%;
transform: translateX(-50%);
}
&__dialog-alert-text {
flex: 1;
flex-shrink: 0;
color: #f59e0b;
font-size: var(--fontSize24);
line-height: var(--fontSize32);
word-break: break-all;
margin-left: var(--fontSize8);
}
&__dialog-footer-btn {
flex: 1;
flex-shrink: 0;
height: var(--fontSize96);
color: #3b82f6;
font-size: var(--fontSize32);
font-weight: 500;
line-height: var(--fontSize96);
text-align: center;
}
&__dialog-footer-btn--close {
color: #292d33;
font-weight: 400;
}
}
<view class="dialog-input {{ showBorder ? 'dialog-input--border' : '' }}">
<view class="dialog-input__content">
<view class="dialog-input__title">
<text class="dialog-input__label">{{ label }}</text><text wx:if="{{ required }}" class="dialog-input__required">*</text>
</view>
<view class="dialog-input__field {{ disabled ? 'dialog-input__field--disabled' : '' }}">
<text class="dialog-input__text {{ !localValue ? 'dialog-input__text--placeholder' : '' }}">{{ localValue || placeholder }}</text>
<image wx:if="{{ showEditIcon && !disabled }}"
class="dialog-input__icon"
src="{{ editIcon }}"
mode="aspectFit"
catchtap="handleEditIconTap" />
</view>
<view wx:if="{{ showChangedTips && warningTips }}"
class="dialog-input__dialog-alert dialog-input__outer-alert">
<van-icon name="warning" color="#FF9D0A" /><text class="dialog-input__dialog-alert-text">{{ warningTips }}</text>
</view>
<text wx:else class="dialog-input__tips">{{ defaultTips }}</text>
</view>
</view>
<van-dialog use-slot
use-title-slot
use-confirm-button-slot
use-cancel-button-slot
show-cancel-button
show="{{ popupVisible }}"
width="var(--fontSize622)"
custom-class="dialog-input__van-dialog"
lock-scroll
catchtouchmove="noScroll"
close-on-click-overlay="{{ false }}"
bind:close="handleClosePopup">
<view slot="title" class="dialog-input__dialog-title">
修改{{ label }}
</view>
<view class="dialog-input__dialog-body">
<view class="dialog-input__dialog-form">
<view class="dialog-input__dialog-label-row">
<text class="dialog-input__dialog-label">{{ label }}</text><text wx:if="{{ required }}" class="dialog-input__dialog-required">*</text>
</view>
<view class="dialog-input__dialog-input-wrap">
<input class="dialog-input__dialog-input"
type="{{ type }}"
value="{{ tempValue }}"
maxlength="{{ maxlength }}"
placeholder="{{ placeholder }}"
placeholder-class="dialog-input__placeholder"
focus
bindinput="handleDialogInput"
always-embed />
</view>
<view wx:if="{{ dialogValueChanged && warningTips }}"
class="dialog-input__dialog-alert">
<van-icon name="warning" color="#FF9D0A" /><text class="dialog-input__dialog-alert-text">{{ warningTips }}</text>
</view>
</view>
</view>
<view slot="cancel-button"
class="dialog-input__dialog-footer-btn dialog-input__dialog-footer-btn--close"
bindtap="handleClosePopup">
关闭
</view>
<view slot="confirm-button"
class="dialog-input__dialog-footer-btn"
bindtap="handleConfirmChange">
确认修改
</view>
</van-dialog>
{ {
"navigationBarTitleText": "",
"usingComponents": {
"review-status": "./components/reviewStatus/reviewStatus",
"van-loading": "@vant/weapp/loading/index",
"label-refund-status": "./components/labelRefundStatus/labelRefundStatus"
}
}
\ No newline at end of file \ No newline at end of file
"navigationBarTitleText": "",
"usingComponents": {
"review-status": "./components/reviewStatus/reviewStatus",
"van-loading": "@vant/weapp/loading/index",
"van-collapse": "@vant/weapp/collapse/index",
"van-collapse-item": "@vant/weapp/collapse-item/index",
"van-image": "@vant/weapp/image/index",
"dialog-input": "./components/dialogInput/dialogInput",
"label-refund-status": "./components/labelRefundStatus/labelRefundStatus"
}
}
...@@ -150,6 +150,7 @@ Page({ ...@@ -150,6 +150,7 @@ Page({
}, },
input(e) { input(e) {
let { value } = e.detail let { value } = e.detail
value = wx.$util.replaceEmoji(value)
this.setData({ this.setData({
keyword: value keyword: value
}) })
......
...@@ -178,6 +178,7 @@ Page({ ...@@ -178,6 +178,7 @@ Page({
}, },
input(e) { input(e) {
let { value } = e.detail let { value } = e.detail
value = wx.$util.replaceEmoji(value)
this.setData({ this.setData({
keyword: value keyword: value
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!