This commit is contained in:
@@ -5,6 +5,7 @@ const customersApi = require('../../api/customers')
|
||||
const dateUtil = require('../../utils/date')
|
||||
const { uploadObjectFile } = require('../../utils/upload')
|
||||
const { showErrorToast, toUserMessage } = require('../../utils/toast')
|
||||
const { showActionModal } = require('../../utils/action-modal')
|
||||
|
||||
function normalizeProduct(product, artists) {
|
||||
const artistIds = String(product.bookableArtists || '').split(',').map(id => id.trim()).filter(Boolean)
|
||||
@@ -42,14 +43,13 @@ Page({
|
||||
wx.showToast({ title: '图片上传中,请稍后再恢复默认值', icon: 'none' })
|
||||
return
|
||||
}
|
||||
const result = await new Promise(resolve => wx.showModal({
|
||||
const result = await showActionModal(this, {
|
||||
title: '恢复默认值',
|
||||
content: '将清除本次补录内容,但不会删除已上传图片文件。保留入口带入的日期和美甲师,确定继续吗?',
|
||||
cancelText: '继续填写',
|
||||
confirmText: '恢复默认',
|
||||
success: resolve,
|
||||
fail: () => resolve({ confirm: false })
|
||||
}))
|
||||
confirmType: 'danger'
|
||||
})
|
||||
if (!result.confirm) return
|
||||
const defaults = this._entryDefaults || {}
|
||||
const artistId = defaults.artistId || ''
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"navigationBarTitleText": "补录历史订单",
|
||||
"usingComponents": { "entity-selector-sheet": "/components/entity-selector-sheet/index", "product-selector-sheet": "/components/product-selector-sheet/index" }
|
||||
"usingComponents": { "entity-selector-sheet": "/components/entity-selector-sheet/index", "product-selector-sheet": "/components/product-selector-sheet/index", "action-modal": "/components/action-modal/index" }
|
||||
}
|
||||
|
||||
@@ -97,4 +97,5 @@
|
||||
<view class="manual-style-footer"><button class="manual-style-confirm" bindtap="useManualProduct">用于本次补录</button><button class="manual-style-library-link" bindtap="openProductLibrary">从款式库中选择</button></view>
|
||||
</view>
|
||||
</view>
|
||||
<action-modal id="actionModal" />
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user