Commit 79758a27 by cen

fix: 样式修复

1 parent 13947daa
Showing 33 changed files with 761 additions and 142 deletions
...@@ -28,7 +28,7 @@ module.exports = { ...@@ -28,7 +28,7 @@ module.exports = {
{ {
...data ...data
}, },
{ returnAll: true } { returnAll: true, duplicatePrevention: true }
) )
}, },
/** 评估单分页状态数量 */ /** 评估单分页状态数量 */
...@@ -48,7 +48,7 @@ module.exports = { ...@@ -48,7 +48,7 @@ module.exports = {
{ {
...data ...data
}, },
{ returnAll: true } { returnAll: true, duplicatePrevention: true }
) )
}, },
/** 评估单重新报价 */ /** 评估单重新报价 */
......
...@@ -15,6 +15,8 @@ import MessageBox from './components/MessageBox/index' ...@@ -15,6 +15,8 @@ import MessageBox from './components/MessageBox/index'
import wnCanvas from './components/Canvas/wn-canvas' import wnCanvas from './components/Canvas/wn-canvas'
import UpdateBox from './components/UpdateBox' import UpdateBox from './components/UpdateBox'
import webView from './components/WebView' import webView from './components/WebView'
import uView from 'uview-ui'
Vue.use(uView)
Vue.use(webView) Vue.use(webView)
Vue.component('GlsxImage', GlsxImage) Vue.component('GlsxImage', GlsxImage)
Vue.component('MessageBox', MessageBox) Vue.component('MessageBox', MessageBox)
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
"number-precision": "^1.6.0", "number-precision": "^1.6.0",
"pinyin.js": "^2.0.0", "pinyin.js": "^2.0.0",
"prettier": "^3.3.2", "prettier": "^3.3.2",
"uview-ui": "^2.0.38",
"webpack-spritesmith": "^1.1.0" "webpack-spritesmith": "^1.1.0"
} }
} }
{ {
"easycom": { "easycom": {
"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue" "^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
}, },
"pages": [ "pages": [
{ {
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
</view> </view>
<view class="upload-section"> <view class="upload-section">
<view class="section-title">其他图片</view> <view class="section-title">其他图片</view>
<UploadMedia :upload-fields="uploadOtherFields" :mediaData.sync="otherImagesData" :grid-columns="3" /> <UploadMedia :upload-fields="uploadOtherFields" :mediaData.sync="otherImagesData" :grid-columns="1" />
</view> </view>
</view> </view>
</view> </view>
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
/> />
<GeneralPopup ref="calendarGeneralPopup" popupClass="calendarGeneralPopup" :showClose="false" :showTitle="false" @confirm="confirmCalendar"> <GeneralPopup ref="calendarGeneralPopup" popupClass="calendarGeneralPopup" :showClose="false" :showTitle="false" @confirm="confirmCalendar">
<template #content> <template #content>
<uni-calendar class="calendar" :showMonth="false" :startDate="startDate" :endDate="endDate" @change="calendarChange" /> <uni-calendar class="calendar" :showMonth="false" :date="defaultDate" :startDate="startDate" :endDate="endDate" @change="calendarChange" />
</template> </template>
</GeneralPopup> </GeneralPopup>
<GeneralPopup ref="tipsPopup" popupClass="tipsPopup" type="center" :showClose="true" :showTitle="false" :noTitle="true"> <GeneralPopup ref="tipsPopup" popupClass="tipsPopup" type="center" :showClose="true" :showTitle="false" :noTitle="true">
...@@ -193,6 +193,7 @@ export default { ...@@ -193,6 +193,7 @@ export default {
selectedCarInfo: null, selectedCarInfo: null,
startDate: '1999-01-01', startDate: '1999-01-01',
endDate: dayjs().format('YYYY-MM-DD'), endDate: dayjs().format('YYYY-MM-DD'),
defaultDate: dayjs().format('YYYY-MM-DD'),
isExistSamePlate: false, isExistSamePlate: false,
formData: { formData: {
evalOrderBasicReqDTO: { evalOrderBasicReqDTO: {
...@@ -509,7 +510,7 @@ export default { ...@@ -509,7 +510,7 @@ export default {
{ {
key: 'previousOwnerAddress', key: 'previousOwnerAddress',
label: '原车主住址', label: '原车主住址',
required: false, required: true,
fullWidth: true, fullWidth: true,
targetNameKey: 'sellerName', targetNameKey: 'sellerName',
sourceNameKey: 'staffName', sourceNameKey: 'staffName',
...@@ -900,6 +901,7 @@ export default { ...@@ -900,6 +901,7 @@ export default {
// 指导价验证 - 数字,0-999999 // 指导价验证 - 数字,0-999999
const guidePrice = this.formData.carBaseReqDTO.guidePrice const guidePrice = this.formData.carBaseReqDTO.guidePrice
const priceRegex = /^\d+(\.\d{1,2})?$/ const priceRegex = /^\d+(\.\d{1,2})?$/
console.log('priceRegex', guidePrice)
if (!priceRegex.test(guidePrice) || guidePrice < 0 || guidePrice > 9999999.99) { if (!priceRegex.test(guidePrice) || guidePrice < 0 || guidePrice > 9999999.99) {
uni.showToast({ uni.showToast({
title: '指导价必须为0-9999999.99之间的数字', title: '指导价必须为0-9999999.99之间的数字',
...@@ -986,6 +988,7 @@ export default { ...@@ -986,6 +988,7 @@ export default {
this.$refs.selectCarCity.open() this.$refs.selectCarCity.open()
} else if (field.type === 'calendar') { } else if (field.type === 'calendar') {
this.currentField = field this.currentField = field
this.defaultDate = that.formData[field.targetObj][field.targetKey] || dayjs().format('YYYY-MM-DD')
if (field.endDate) { if (field.endDate) {
this.endDate = dayjs().format('YYYY-MM-DD') this.endDate = dayjs().format('YYYY-MM-DD')
} else { } else {
...@@ -995,7 +998,7 @@ export default { ...@@ -995,7 +998,7 @@ export default {
.open() .open()
.then(() => { .then(() => {
console.log('that.selectDate', that.selectDate) console.log('that.selectDate', that.selectDate)
that.$set(that.formData[field.targetObj], field.targetKey, that.selectDate) that.$set(that.formData[field.targetObj], field.targetKey, that.selectDate || this.defaultDate)
}) })
.catch(() => { .catch(() => {
console.log('日期取消') console.log('日期取消')
...@@ -1018,6 +1021,7 @@ export default { ...@@ -1018,6 +1021,7 @@ export default {
this.$set(this.formData.carBaseReqDTO, 'carTypeName', carInfo.year.name) this.$set(this.formData.carBaseReqDTO, 'carTypeName', carInfo.year.name)
}, },
handleCitySelected(date) { handleCitySelected(date) {
console.log('handleCitySelected', date)
this.$set(this.formData.carBaseReqDTO, 'registrationProvinceId', date.province.code) this.$set(this.formData.carBaseReqDTO, 'registrationProvinceId', date.province.code)
this.$set(this.formData.carBaseReqDTO, 'registrationProvinceName', date.province.name) this.$set(this.formData.carBaseReqDTO, 'registrationProvinceName', date.province.name)
this.$set(this.formData.carBaseReqDTO, 'registrationCityId', date.city.code) this.$set(this.formData.carBaseReqDTO, 'registrationCityId', date.city.code)
...@@ -1169,7 +1173,7 @@ export default { ...@@ -1169,7 +1173,7 @@ export default {
takePhoto(type) { takePhoto(type) {
uni.chooseImage({ uni.chooseImage({
count: 1, count: 1,
sizeType: ['compressed'], sizeType: ['original'],
sourceType: ['camera'], sourceType: ['camera'],
success: async res => { success: async res => {
try { try {
...@@ -1197,7 +1201,7 @@ export default { ...@@ -1197,7 +1201,7 @@ export default {
chooseImageFromAlbum(type) { chooseImageFromAlbum(type) {
uni.chooseImage({ uni.chooseImage({
count: 1, count: 1,
sizeType: ['compressed'], sizeType: ['original'],
sourceType: ['album'], sourceType: ['album'],
success: async res => { success: async res => {
try { try {
...@@ -1222,6 +1226,7 @@ export default { ...@@ -1222,6 +1226,7 @@ export default {
}, },
async scan(type) { async scan(type) {
// #ifdef APP-PLUS
const photoLibrary = await permision.requestAndroidPermission('android.permission.READ_EXTERNAL_STORAGE') const photoLibrary = await permision.requestAndroidPermission('android.permission.READ_EXTERNAL_STORAGE')
const camera = await permision.requestAndroidPermission('android.permission.CAMERA') const camera = await permision.requestAndroidPermission('android.permission.CAMERA')
const isOnline = await uni.$isNetWork() const isOnline = await uni.$isNetWork()
...@@ -1237,6 +1242,7 @@ export default { ...@@ -1237,6 +1242,7 @@ export default {
uni.showToast({ title: '当前无网络连接,请连接网络后重试', icon: 'none' }) uni.showToast({ title: '当前无网络连接,请连接网络后重试', icon: 'none' })
return return
} }
// #endif
uni.showActionSheet({ uni.showActionSheet({
itemList: ['拍照', '从相册选择'], itemList: ['拍照', '从相册选择'],
success: res => { success: res => {
...@@ -1444,7 +1450,7 @@ export default { ...@@ -1444,7 +1450,7 @@ export default {
if (res.data.code == 0) { if (res.data.code == 0) {
uni.hideLoading() uni.hideLoading()
uni.showToast({ uni.showToast({
title: '编辑成功', title: '提交成功',
icon: 'none' icon: 'none'
}) })
setTimeout(() => { setTimeout(() => {
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
<text class="requiredLabel" v-if="field.required">*</text> <text class="requiredLabel" v-if="field.required">*</text>
</view> </view>
<template v-if="field.type === 'input'" class="flex align-center"> <template v-if="field.type === 'input'" class="flex align-center">
<input class="formInput" :class="field.disabled ? 'formInputDisabled' : ''" :min="field.min" :max="field.max" v-if="field.targetObj" :type="field.inputType || 'text'" :disabled="field.disabled" type="text" :placeholder="'请输入'" :maxlength="field.maxlength || 100" v-model="formData[field.targetObj][field.targetKey]" :pattern="field.pattern || ''" @input="e => handleInput(e, field)" @blur="e => handleBlur(e, field)" /> <input class="formInput" :class="field.disabled ? 'formInputDisabled' : ''" :min="field.min" :max="field.max" v-if="field.targetObj" :type="field.inputType" :disabled="field.disabled" :placeholder="field.placeholder || '请输入'" :maxlength="field.maxlength || 100" v-model="formData[field.targetObj][field.targetKey]" :pattern="field.pattern || ''" @input="e => handleInput(e, field)" @blur="e => handleBlur(e, field)" />
<input class="formInput" :class="field.disabled ? 'formInputDisabled' : ''" :min="field.min" :max="field.max" v-else type="text" :type="field.inputType || 'text'" :disabled="field.disabled" :placeholder="'请输入'" v-model="formData[field.targetKey]" :maxlength="field.maxlength || 100" :pattern="field.pattern || ''" @input="e => handleInput(e, field)" @blur="e => handleBlur(e, field)" /> <input class="formInput" :class="field.disabled ? 'formInputDisabled' : ''" :min="field.min" :max="field.max" v-else type="text" :type="field.inputType" :disabled="field.disabled" :placeholder="field.placeholder || '请输入'" v-model="formData[field.targetKey]" :maxlength="field.maxlength || 100" :pattern="field.pattern || ''" @input="e => handleInput(e, field)" @blur="e => handleBlur(e, field)" />
<view v-if="field.isScan" class="flex align-center scanBtn justify-center" @click.stop="scan('vinOcr')"> <view v-if="field.isScan" class="flex align-center scanBtn justify-center" @click.stop="scan('vinOcr')">
<view class="sprite-icon icon-scanIconX"></view> <view class="sprite-icon icon-scanIconX"></view>
</view> </view>
...@@ -115,10 +115,6 @@ export default { ...@@ -115,10 +115,6 @@ export default {
formData: { formData: {
type: Object, type: Object,
default: () => ({}) default: () => ({})
},
userInfo: {
type: Object,
default: () => ({})
} }
}, },
data() { data() {
......
...@@ -54,10 +54,10 @@ export default { ...@@ -54,10 +54,10 @@ export default {
currentStep: 0, currentStep: 0,
stepSelectedIds: [null, null, null, null], stepSelectedIds: [null, null, null, null],
steps: [ steps: [
{ label: '品牌选择', number: 1, selectedText: '' }, { label: '主品牌', number: 1, selectedText: '' },
{ label: '系列选择', number: 2, selectedText: '' }, { label: '子品牌', number: 2, selectedText: '' },
{ label: '车型选择', number: 3, selectedText: '' }, { label: '车系', number: 3, selectedText: '' },
{ label: '年份选择', number: 4, selectedText: '' } { label: '车型', number: 4, selectedText: '' }
], ],
selectedBrand: null, selectedBrand: null,
selectedSeries: null, selectedSeries: null,
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<view class="loading-spinner"></view> <view class="loading-spinner"></view>
<text class="loading-text">加载中...</text> <text class="loading-text">加载中...</text>
</view> </view>
<view v-else class="content-container"> <view v-else class="content-container">
<StepTab :steps="dynamicSteps" :currentStep="currentStep" :clickable="true" @step-change="onStepChange" :isShowStepNumber="false"></StepTab> <StepTab :steps="dynamicSteps" :currentStep="currentStep" :clickable="true" @step-change="onStepChange" :isShowStepNumber="false"></StepTab>
<view class="list-component"> <view class="list-component">
<SortByNameList :items="currentStepData" :activeValue="currentSelectedId" :activeField="'code'" :itemNameField="'name'" :groupKeyField="'letter'" :itemsPerRow="3" :itemSpacing="32" @item-click="handleItemClick" /> <SortByNameList :items="currentStepData" :activeValue="currentSelectedId" :activeField="'code'" :itemNameField="'name'" :groupKeyField="'letter'" :itemsPerRow="3" :itemSpacing="32" @item-click="handleItemClick" />
...@@ -177,20 +177,22 @@ export default { ...@@ -177,20 +177,22 @@ export default {
} }
}, },
handleItemClick(item) { handleItemClick(item) {
console.log('Clicked item:', item)
this.currentSelectedId = item.code this.currentSelectedId = item.code
if (this.currentStep === 0) { if (this.currentStep === 0) {
this.selectedProvince = item this.selectedProvince = item
this.selectedCity = null this.selectedCity = null
this.currentStep = 1 this.currentStep = 1
this.$emit('province-selected', item) // this.$emit('province-selected', item)
} else if (this.currentStep === 1) { } else if (this.currentStep === 1) {
this.selectedCity = item this.selectedCity = item
this.$emit('city-selected', item) // this.$emit('city-selected', item)
} }
this.selectionResult = { this.selectionResult = {
province: this.selectedProvince, province: this.selectedProvince,
city: this.selectedCity city: this.selectedCity
} }
console.log('Selection result:', this.selectionResult)
}, },
addLetterToItem(item) { addLetterToItem(item) {
if (!item || !item.name) { if (!item || !item.name) {
...@@ -301,7 +303,7 @@ export default { ...@@ -301,7 +303,7 @@ export default {
} }
.content-container { .content-container {
width: 100%; width: 100%;
height: 100% height: 100%;
} }
.loading-container { .loading-container {
width: 100%; width: 100%;
......
...@@ -56,11 +56,11 @@ ...@@ -56,11 +56,11 @@
<view class="text-ellipsis tips px-20 justify-between"> <view class="text-ellipsis tips px-20 justify-between">
<view class="flex-1 flex align-center"> <view class="flex-1 flex align-center">
<view class="sprite-icon icon-study-tips"></view> <view class="sprite-icon icon-study-tips"></view>
驳回原因:{{ carInfo.rejectReason }} <view class="text-ellipsis">驳回原因:{{ carInfo.rejectReason }}</view>
</view> </view>
<view class="flex-1 flex align-center"> <view class="flex-1 flex align-center">
<view class="sprite-icon icon-feedbackIcon"></view> <view class="sprite-icon icon-feedbackIcon"></view>
驳回意见:{{ carInfo.rejectSuggestion }} <view class="text-ellipsis">驳回意见:{{ carInfo.rejectSuggestion }}</view>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -6,6 +6,13 @@ ...@@ -6,6 +6,13 @@
<text class="requiredLabel" v-if="field.required">*</text> <text class="requiredLabel" v-if="field.required">*</text>
</view> </view>
<view class="upload-images-wrapper"> <view class="upload-images-wrapper">
<!-- 上传按钮,当未达到最大限制时显示 -->
<view v-if="!hasReachedMax(field)" class="upload-item" @click="handleMediaUpload(field)">
<view class="upload-placeholder">
<view class="sprite-icon icon-uploadAdd"></view>
<text class="upload-text">{{ field.maxCount > 1 ? getMedia(field).length + '/' + field.maxCount : getUploadText(field) }}</text>
</view>
</view>
<!-- 显示已上传的媒体列表 --> <!-- 显示已上传的媒体列表 -->
<view v-for="(media, index) in getMedia(field)" :key="index" class="uploaded-media-container"> <view v-for="(media, index) in getMedia(field)" :key="index" class="uploaded-media-container">
<!-- 图片显示 --> <!-- 图片显示 -->
...@@ -14,7 +21,7 @@ ...@@ -14,7 +21,7 @@
<view v-else class="video-container" @click.stop="previewMedia(media, 2)"> <view v-else class="video-container" @click.stop="previewMedia(media, 2)">
<!-- <video :src="media.url || media" mode="aspectFill" controls class="uploaded-media"></video> --> <!-- <video :src="media.url || media" mode="aspectFill" controls class="uploaded-media"></video> -->
<image :src="media.url + videoProcess" mode="aspectFill" @click.stop="previewMedia(media, 1)"></image> <image :src="media.url + videoProcess" mode="aspectFill"></image>
<view class="video-play-icon"> <view class="video-play-icon">
<view class="sprite-icon icon-upload-play"></view> <view class="sprite-icon icon-upload-play"></view>
</view> </view>
...@@ -23,13 +30,6 @@ ...@@ -23,13 +30,6 @@
<view class="sprite-icon icon-icon-circle-error"></view> <view class="sprite-icon icon-icon-circle-error"></view>
</view> </view>
</view> </view>
<!-- 上传按钮,当未达到最大限制时显示 -->
<view v-if="!hasReachedMax(field)" class="upload-item" @click="handleMediaUpload(field)">
<view class="upload-placeholder">
<view class="sprite-icon icon-uploadAdd"></view>
<text class="upload-text">{{ field.maxCount > 1 ? getMedia(field).length + '/' + field.maxCount : getUploadText(field) }}</text>
</view>
</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -75,6 +75,7 @@ export default { ...@@ -75,6 +75,7 @@ export default {
methods: { methods: {
// 处理媒体上传 // 处理媒体上传
async handleMediaUpload(field) { async handleMediaUpload(field) {
// #ifdef APP-PLUS
const photoLibrary = await permision.requestAndroidPermission('android.permission.READ_EXTERNAL_STORAGE') const photoLibrary = await permision.requestAndroidPermission('android.permission.READ_EXTERNAL_STORAGE')
const camera = await permision.requestAndroidPermission('android.permission.CAMERA') const camera = await permision.requestAndroidPermission('android.permission.CAMERA')
const isOnline = await uni.$isNetWork() const isOnline = await uni.$isNetWork()
...@@ -90,6 +91,7 @@ export default { ...@@ -90,6 +91,7 @@ export default {
uni.showToast({ title: '当前无网络连接,请连接网络后重试', icon: 'none' }) uni.showToast({ title: '当前无网络连接,请连接网络后重试', icon: 'none' })
return return
} }
// #endif
// 根据字段类型显示不同的操作菜单 // 根据字段类型显示不同的操作菜单
const itemList = [] const itemList = []
if (field.accept === 'image' || !field.accept) { if (field.accept === 'image' || !field.accept) {
...@@ -130,7 +132,7 @@ export default { ...@@ -130,7 +132,7 @@ export default {
takePhoto(field) { takePhoto(field) {
uni.chooseImage({ uni.chooseImage({
count: this.getRemainingCount(field), count: this.getRemainingCount(field),
sizeType: ['compressed'], sizeType: ['original'],
sourceType: ['camera'], sourceType: ['camera'],
success: async res => { success: async res => {
try { try {
...@@ -170,7 +172,7 @@ export default { ...@@ -170,7 +172,7 @@ export default {
chooseImageFromAlbum(field) { chooseImageFromAlbum(field) {
uni.chooseImage({ uni.chooseImage({
count: this.getRemainingCount(field), count: this.getRemainingCount(field),
sizeType: ['compressed'], sizeType: ['original'],
sourceType: ['album'], sourceType: ['album'],
success: async res => { success: async res => {
console.log(res, '选择图片') console.log(res, '选择图片')
...@@ -212,6 +214,7 @@ export default { ...@@ -212,6 +214,7 @@ export default {
sourceType: ['camera'], sourceType: ['camera'],
maxDuration: field.maxDuration || 60, maxDuration: field.maxDuration || 60,
camera: 'back', camera: 'back',
compressed: false,
success: async res => { success: async res => {
console.log('拍摄视频成功', res) console.log('拍摄视频成功', res)
try { try {
...@@ -258,6 +261,7 @@ export default { ...@@ -258,6 +261,7 @@ export default {
chooseVideoFromAlbum(field) { chooseVideoFromAlbum(field) {
uni.chooseVideo({ uni.chooseVideo({
sourceType: ['album'], sourceType: ['album'],
compressed: false,
maxDuration: field.maxDuration || 60, maxDuration: field.maxDuration || 60,
success: async res => { success: async res => {
console.log('选择视频成功', res) console.log('选择视频成功', res)
...@@ -373,9 +377,10 @@ export default { ...@@ -373,9 +377,10 @@ export default {
if (this.mediaData[key].length === 0) { if (this.mediaData[key].length === 0) {
this.$delete(this.mediaData, key) this.$delete(this.mediaData, key)
} }
console.log('删除媒体成功')
// 触发父组件更新 // 触发父组件更新 - 创建新的对象副本
this.$emit('update:mediaData', this.mediaData) this.$emit('update:mediaData', { ...this.mediaData })
} }
} }
}) })
...@@ -446,6 +451,7 @@ export default { ...@@ -446,6 +451,7 @@ export default {
display: flex; display: flex;
gap: toRpx(16); gap: toRpx(16);
flex: 1; flex: 1;
flex-wrap: wrap;
} }
&.fullwidth { &.fullwidth {
grid-column: 1 / -1; // 跨越所有列 grid-column: 1 / -1; // 跨越所有列
......
...@@ -37,9 +37,9 @@ ...@@ -37,9 +37,9 @@
<view v-if="activeTabKey == 'carInfo'" class="gridBox"> <view v-if="activeTabKey == 'carInfo'" class="gridBox">
<view v-for="(item, index) in carInfoItems" :key="index" :class="['flex align-center', { 'full-width': item.fullWidth }]"> <view v-for="(item, index) in carInfoItems" :key="index" :class="['flex align-center', { 'full-width': item.fullWidth }]">
<view class="title-label-see mr-16">{{ item.label }}</view> <view class="title-label-see mr-16">{{ item.label }}</view>
<view class="flex-1"> <view class="flex-1 break-word">
{{ formatValue(item, detailsInfo) }} {{ formatValue(item, detailsInfo) }}
<text>{{ item.cell }}</text> <text v-if="item.cell">{{ item.cell }}</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -229,7 +229,11 @@ ...@@ -229,7 +229,11 @@
</view> </view>
<view v-for="(item, index) in detailsInfo.paymentList || []" :key="index" class="tableRow"> <view v-for="(item, index) in detailsInfo.paymentList || []" :key="index" class="tableRow">
<view class="tableCell">{{ item.paymentType == 1 ? '定金' : item.paymentType == 2 ? '尾款' : '全款' }}</view> <view class="tableCell">{{ item.paymentType == 1 ? '定金' : item.paymentType == 2 ? '尾款' : '全款' }}</view>
<view class="tableCell">{{ item.status == 1 ? '未支付' : '已支付' }}</view> <view class="tableCell">
<view class="flex align-center justify-center">
<view class="status" :class="item.status == 1 ? 'status-10' : 'status-30'">{{ item.status == 1 ? '未支付' : '已支付' }}</view>
</view>
</view>
<view class="tableCell">{{ item.payTime || '-' }}</view> <view class="tableCell">{{ item.payTime || '-' }}</view>
<view class="tableCell">{{ item.paymentAmount ? '¥' + item.paymentAmount : '-' }}</view> <view class="tableCell">{{ item.paymentAmount ? '¥' + item.paymentAmount : '-' }}</view>
</view> </view>
...@@ -695,9 +699,8 @@ export default { ...@@ -695,9 +699,8 @@ export default {
if (item.map && this[item.map]) { if (item.map && this[item.map]) {
return this[item.map][rawValue] || rawValue return this[item.map][rawValue] || rawValue
} }
console.log('rawValue:', rawValue, rawValue == 0, item.key)
return rawValue === 0 ? 0 : rawValue || '-' return rawValue === 0 ? 0 : item.type === 'image' || item.accept === 'video' ? rawValue : rawValue || '-'
}, },
getImageBySubtype(subtype) { getImageBySubtype(subtype) {
if (!this.detailsInfo.images) return [] if (!this.detailsInfo.images) return []
...@@ -1086,6 +1089,7 @@ export default { ...@@ -1086,6 +1089,7 @@ export default {
height: toRpx(44); height: toRpx(44);
line-height: toRpx(44); line-height: toRpx(44);
} }
// 状态颜色 // 状态颜色
.status-10 { .status-10 {
color: #f59619; color: #f59619;
...@@ -1168,7 +1172,7 @@ export default { ...@@ -1168,7 +1172,7 @@ export default {
padding: toRpx(20) toRpx(16); padding: toRpx(20) toRpx(16);
font-size: toRpx(28); font-size: toRpx(28);
color: #666666; color: #666666;
text-align: left;
background: #f9fafc; background: #f9fafc;
text-align: center; text-align: center;
word-break: break-all; word-break: break-all;
...@@ -1177,6 +1181,13 @@ export default { ...@@ -1177,6 +1181,13 @@ export default {
height: toRpx(96); height: toRpx(96);
border-radius: 8px; border-radius: 8px;
} }
.status {
width: toRpx(124);
}
}
.break-word {
word-break: break-all;
white-space: normal;
} }
// 表格空状态样式 // 表格空状态样式
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
<template #content> <template #content>
<view class="signAgreement-content"> <view class="signAgreement-content">
<view class="signAgreement-label mb-24"> <view class="signAgreement-label mb-24">
选择车辆代保管人员签署《车辆保管协议》 选择车辆代保管人员签署《车辆代保管协议》
<text class="requiredLabel">*</text> <text class="requiredLabel">*</text>
</view> </view>
<view class="flex align-center"> <view class="flex align-center">
...@@ -289,14 +289,13 @@ export default { ...@@ -289,14 +289,13 @@ export default {
} }
}, },
getStatByStatus() { getStatByStatus() {
const userInfo = uni.$storage.get('userInfo'),
{ shopMerchantId } = userInfo
uni.$api.evaluationApi uni.$api.evaluationApi
.evalOrderPageCount({ .evalOrderPageCount({
conversionUserId: '', conversionUserId: '',
previousOwnerName: '', ...this.searchValue,
previousOwnerPhone: '', sellerMerchantId: shopMerchantId
vin: '',
evalOrderNo: '',
status: ''
}) })
.then(res => { .then(res => {
console.log('res:', res) console.log('res:', res)
...@@ -370,6 +369,7 @@ export default { ...@@ -370,6 +369,7 @@ export default {
const res = await uni.$api.evaluationApi.evalOrderConfirmVehicleDelivery({ const res = await uni.$api.evaluationApi.evalOrderConfirmVehicleDelivery({
evalOrderNo: e.evalOrderNo evalOrderNo: e.evalOrderNo
}) })
console.log('res:', res)
if (res.data.code == 0) { if (res.data.code == 0) {
uni.hideLoading() uni.hideLoading()
uni.showToast({ uni.showToast({
...@@ -380,7 +380,7 @@ export default { ...@@ -380,7 +380,7 @@ export default {
setTimeout(() => { setTimeout(() => {
this.currentPage = 1 this.currentPage = 1
this.search() this.search()
}, 500) }, 1000)
} else { } else {
uni.hideLoading() uni.hideLoading()
uni.showToast({ uni.showToast({
...@@ -420,7 +420,7 @@ export default { ...@@ -420,7 +420,7 @@ export default {
setTimeout(() => { setTimeout(() => {
that.currentPage = 1 that.currentPage = 1
that.search() that.search()
}, 500) }, 1000)
} }
} else { } else {
uni.showLoading() uni.showLoading()
...@@ -444,8 +444,16 @@ export default { ...@@ -444,8 +444,16 @@ export default {
title: '电子签约已发送,请注意查收短信', title: '电子签约已发送,请注意查收短信',
icon: 'none' icon: 'none'
}) })
that.currentPage = 1 setTimeout(() => {
that.search() that.currentPage = 1
that.search()
}, 1000)
} else {
uni.hideLoading()
uni.showToast({
title: res.data.msg || '请求失败',
icon: 'none'
})
} }
}) })
}) })
...@@ -524,7 +532,7 @@ export default { ...@@ -524,7 +532,7 @@ export default {
setTimeout(() => { setTimeout(() => {
this.currentPage = 1 this.currentPage = 1
this.search() this.search()
}, 500) }, 1000)
} else { } else {
uni.hideLoading() uni.hideLoading()
uni.showToast({ uni.showToast({
...@@ -576,7 +584,7 @@ export default { ...@@ -576,7 +584,7 @@ export default {
async addSignAgreement() { async addSignAgreement() {
this.$refs.addSignAgreementPopup.open() this.$refs.addSignAgreementPopup.open()
}, },
confirmAddSignAgreement() { async confirmAddSignAgreement() {
if (!this.addSignAgreementObj.custodianName) { if (!this.addSignAgreementObj.custodianName) {
uni.showToast({ title: '请输入签约保管人', icon: 'none' }) uni.showToast({ title: '请输入签约保管人', icon: 'none' })
return return
...@@ -599,11 +607,16 @@ export default { ...@@ -599,11 +607,16 @@ export default {
return return
} }
uni.showLoading() uni.showLoading()
uni.$api.evaluationApi.addCustodyAgreement(this.addSignAgreementObj).then(res => { uni.$api.evaluationApi.addCustodyAgreement(this.addSignAgreementObj).then(async res => {
if (res.data.code == 0) { if (res.data.code == 0) {
uni.hideLoading() uni.hideLoading()
console.log('res:', res) console.log('res:', res)
this.$refs.addSignAgreementPopup.closePopup() this.$refs.addSignAgreementPopup.closePopup()
const res = await uni.$api.evaluationApi.getCustodyAgreementList()
if (res.data.code == 0) {
this.signAgreementObj.custodianName = res.data.data[0].name
this.signAgreementObj.custodianPhone = res.data.data[0].conversionPhone
}
} else { } else {
uni.hideLoading() uni.hideLoading()
uni.showToast({ uni.showToast({
......
...@@ -14,6 +14,7 @@ $detailVW: 100vmin * (1173 / 768); ...@@ -14,6 +14,7 @@ $detailVW: 100vmin * (1173 / 768);
} }
$margin: 0 calc((100vmax - #{$detailVW}) / 2); $margin: 0 calc((100vmax - #{$detailVW}) / 2);
@import 'uview-ui/theme.scss';
@import './assets/css/sprite.scss'; @import './assets/css/sprite.scss';
@import './assets/css/common.scss'; @import './assets/css/common.scss';
......
## 2.2.42(2025-08-20)
- 修复 datetime-picker 小程序样式警告
## 2.2.41(2025-08-20)
- 修复 uni-datetime-picker组件时间对比报错问题
## 2.2.40(2025-04-14)
- 修复 绑定字符串值的时,日历面板选中状态未重置到默认值的问题
## 2.2.39(2025-04-14)
- 修复 在 iOS 微信小程序上type='daterange'时,传入'YYYY-MM-DD'格式不生效的问题
## 2.2.38(2024-10-15)
- 修复 微信小程序中的getSystemInfo警告
## 2.2.35(2024-09-21)
- 修复 没有选中日期时点击确定直接报错的Bug [详情](https://ask.dcloud.net.cn/question/198168)
## 2.2.34(2024-04-24)
- 新增 日期点击事件,在点击日期时会触发该事件。
## 2.2.33(2024-04-15)
- 修复 抖音小程序事件传递失效bug
## 2.2.32(2024-02-20)
- 修复 日历的close事件触发异常的bug [详情](https://github.com/dcloudio/uni-ui/issues/844)
## 2.2.31(2024-02-20)
- 修复 h5平台 右边日历的月份默认+1的bug [详情](https://github.com/dcloudio/uni-ui/issues/841)
## 2.2.30(2024-01-31)
- 修复 隐藏“秒”时,在IOS15及以下版本时出现 结束时间在开始时间之前 的bug [详情](https://github.com/dcloudio/uni-ui/issues/788)
## 2.2.29(2024-01-20)
- 新增 show事件,弹窗弹出时触发该事件 [详情](https://github.com/dcloudio/uni-app/issues/4694)
## 2.2.28(2024-01-18)
- 去除 noChange事件,当进行日期范围选择时,若只选了一天,则开始结束日期都为同一天 [详情](https://github.com/dcloudio/uni-ui/issues/815)
## 2.2.27(2024-01-10)
- 优化 增加noChange事件,当进行日期范围选择时,若有空值,则触发该事件 [详情](https://github.com/dcloudio/uni-ui/issues/815)
## 2.2.26(2024-01-08)
- 修复 字节小程序时间选择范围器失效问题 [详情](https://github.com/dcloudio/uni-ui/issues/834)
## 2.2.25(2023-10-18)
- 修复 PC端初次修改时间,开始时间未更新的Bug [详情](https://github.com/dcloudio/uni-ui/issues/737)
## 2.2.24(2023-06-02)
- 修复 部分情况修改时间,开始、结束时间显示异常的Bug [详情](https://ask.dcloud.net.cn/question/171146)
- 优化 当前月可以选择上月、下月的日期的Bug
## 2.2.23(2023-05-02)
- 修复 部分情况修改时间,开始时间未更新的Bug [详情](https://github.com/dcloudio/uni-ui/issues/737)
- 修复 部分平台及设备第一次点击无法显示弹框的Bug
- 修复 ios 日期格式未补零显示及使用异常的Bug [详情](https://ask.dcloud.net.cn/question/162979)
## 2.2.22(2023-03-30)
- 修复 日历 picker 修改年月后,自动选中当月1日的Bug [详情](https://ask.dcloud.net.cn/question/165937)
- 修复 小程序端 低版本 ios NaN的Bug [详情](https://ask.dcloud.net.cn/question/162979)
## 2.2.21(2023-02-20)
- 修复 firefox 浏览器显示区域点击无法拉起日历弹框的Bug [详情](https://ask.dcloud.net.cn/question/163362)
## 2.2.20(2023-02-17)
- 优化 值为空依然选中当天问题
- 优化 提供 default-value 属性支持配置选择器打开时默认显示的时间
- 优化 非范围选择未选择日期时间,点击确认按钮选中当前日期时间
- 优化 字节小程序日期时间范围选择,底部日期换行的Bug
## 2.2.19(2023-02-09)
- 修复 2.2.18 引起范围选择配置 end 选择无效的Bug [详情](https://github.com/dcloudio/uni-ui/issues/686)
## 2.2.18(2023-02-08)
- 修复 移动端范围选择change事件触发异常的Bug [详情](https://github.com/dcloudio/uni-ui/issues/684)
- 优化 PC端输入日期格式错误时返回当前日期时间
- 优化 PC端输入日期时间超出 start、end 限制的Bug
- 优化 移动端日期时间范围用法时间展示不完整问题
## 2.2.17(2023-02-04)
- 修复 小程序端绑定 Date 类型报错的Bug [详情](https://github.com/dcloudio/uni-ui/issues/679)
- 修复 vue3 time-picker 无法显示绑定时分秒的Bug
## 2.2.16(2023-02-02)
- 修复 字节小程序报错的Bug
## 2.2.15(2023-02-02)
- 修复 某些情况切换月份错误的Bug
## 2.2.14(2023-01-30)
- 修复 某些情况切换月份错误的Bug [详情](https://ask.dcloud.net.cn/question/162033)
## 2.2.13(2023-01-10)
- 修复 多次加载组件造成内存占用的Bug
## 2.2.12(2022-12-01)
- 修复 vue3 下 i18n 国际化初始值不正确的Bug
## 2.2.11(2022-09-19)
- 修复 支付宝小程序样式错乱的Bug [详情](https://github.com/dcloudio/uni-app/issues/3861)
## 2.2.10(2022-09-19)
- 修复 反向选择日期范围,日期显示异常的Bug [详情](https://ask.dcloud.net.cn/question/153401?item_id=212892&rf=false)
## 2.2.9(2022-09-16)
- 可以使用 uni-scss 控制主题色
## 2.2.8(2022-09-08)
- 修复 close事件无效的Bug
## 2.2.7(2022-09-05)
- 修复 移动端 maskClick 无效的Bug [详情](https://ask.dcloud.net.cn/question/140824)
## 2.2.6(2022-06-30)
- 优化 组件样式,调整了组件图标大小、高度、颜色等,与uni-ui风格保持一致
## 2.2.5(2022-06-24)
- 修复 日历顶部年月及底部确认未国际化的Bug
## 2.2.4(2022-03-31)
- 修复 Vue3 下动态赋值,单选类型未响应的Bug
## 2.2.3(2022-03-28)
- 修复 Vue3 下动态赋值未响应的Bug
## 2.2.2(2021-12-10)
- 修复 clear-icon 属性在小程序平台不生效的Bug
## 2.2.1(2021-12-10)
- 修复 日期范围选在小程序平台,必须多点击一次才能取消选中状态的Bug
## 2.2.0(2021-11-19)
- 优化 组件UI,并提供设计资源 [详情](https://uniapp.dcloud.io/component/uniui/resource)
- 文档迁移 [https://uniapp.dcloud.io/component/uniui/uni-datetime-picker](https://uniapp.dcloud.io/component/uniui/uni-datetime-picker)
## 2.1.5(2021-11-09)
- 新增 提供组件设计资源,组件样式调整
## 2.1.4(2021-09-10)
- 修复 hide-second 在移动端的Bug
- 修复 单选赋默认值时,赋值日期未高亮的Bug
- 修复 赋默认值时,移动端未正确显示时间的Bug
## 2.1.3(2021-09-09)
- 新增 hide-second 属性,支持只使用时分,隐藏秒
## 2.1.2(2021-09-03)
- 优化 取消选中时(范围选)直接开始下一次选择, 避免多点一次
- 优化 移动端支持清除按钮,同时支持通过 ref 调用组件的 clear 方法
- 优化 调整字号大小,美化日历界面
- 修复 因国际化导致的 placeholder 失效的Bug
## 2.1.1(2021-08-24)
- 新增 支持国际化
- 优化 范围选择器在 pc 端过宽的问题
## 2.1.0(2021-08-09)
- 新增 适配 vue3
## 2.0.19(2021-08-09)
- 新增 支持作为 uni-forms 子组件相关功能
- 修复 在 uni-forms 中使用时,选择时间报 NAN 错误的Bug
## 2.0.18(2021-08-05)
- 修复 type 属性动态赋值无效的Bug
- 修复 ‘确认’按钮被 tabbar 遮盖 bug
- 修复 组件未赋值时范围选左、右日历相同的Bug
## 2.0.17(2021-08-04)
- 修复 范围选未正确显示当前值的Bug
- 修复 h5 平台(移动端)报错 'cale' of undefined 的Bug
## 2.0.16(2021-07-21)
- 新增 return-type 属性支持返回 date 日期对象
## 2.0.15(2021-07-14)
- 修复 单选日期类型,初始赋值后不在当前日历的Bug
- 新增 clearIcon 属性,显示框的清空按钮可配置显示隐藏(仅 pc 有效)
- 优化 移动端移除显示框的清空按钮,无实际用途
## 2.0.14(2021-07-14)
- 修复 组件赋值为空,界面未更新的Bug
- 修复 start 和 end 不能动态赋值的Bug
- 修复 范围选类型,用户选择后再次选择右侧日历(结束日期)显示不正确的Bug
## 2.0.13(2021-07-08)
- 修复 范围选择不能动态赋值的Bug
## 2.0.12(2021-07-08)
- 修复 范围选择的初始时间在一个月内时,造成无法选择的bug
## 2.0.11(2021-07-08)
- 优化 弹出层在超出视窗边缘定位不准确的问题
## 2.0.10(2021-07-08)
- 修复 范围起始点样式的背景色与今日样式的字体前景色融合,导致日期字体看不清的Bug
- 优化 弹出层在超出视窗边缘被遮盖的问题
## 2.0.9(2021-07-07)
- 新增 maskClick 事件
- 修复 特殊情况日历 rpx 布局错误的Bug,rpx -> px
- 修复 范围选择时清空返回值不合理的bug,['', ''] -> []
## 2.0.8(2021-07-07)
- 新增 日期时间显示框支持插槽
## 2.0.7(2021-07-01)
- 优化 添加 uni-icons 依赖
## 2.0.6(2021-05-22)
- 修复 图标在小程序上不显示的Bug
- 优化 重命名引用组件,避免潜在组件命名冲突
## 2.0.5(2021-05-20)
- 优化 代码目录扁平化
## 2.0.4(2021-05-12)
- 新增 组件示例地址
## 2.0.3(2021-05-10)
- 修复 ios 下不识别 '-' 日期格式的Bug
- 优化 pc 下弹出层添加边框和阴影
## 2.0.2(2021-05-08)
- 修复 在 admin 中获取弹出层定位错误的bug
## 2.0.1(2021-05-08)
- 修复 type 属性向下兼容,默认值从 date 变更为 datetime
## 2.0.0(2021-04-30)
- 支持日历形式的日期+时间的范围选择
> 注意:此版本不向后兼容,不再支持单独时间选择(type=time)及相关的 hide-second 属性(时间选可使用内置组件 picker)
## 1.0.6(2021-03-18)
- 新增 hide-second 属性,时间支持仅选择时、分
- 修复 选择跟显示的日期不一样的Bug
- 修复 chang事件触发2次的Bug
- 修复 分、秒 end 范围错误的Bug
- 优化 更好的 nvue 适配
<template>
<view class="uni-calendar-item__weeks-box" :class="{
'uni-calendar-item--disable':weeks.disable,
'uni-calendar-item--before-checked-x':weeks.beforeMultiple,
'uni-calendar-item--multiple': weeks.multiple,
'uni-calendar-item--after-checked-x':weeks.afterMultiple,
}" @click="choiceDate(weeks)" @mouseenter="handleMousemove(weeks)">
<view class="uni-calendar-item__weeks-box-item" :class="{
'uni-calendar-item--checked':calendar.fullDate === weeks.fullDate && (calendar.userChecked || !checkHover),
'uni-calendar-item--checked-range-text': checkHover,
'uni-calendar-item--before-checked':weeks.beforeMultiple,
'uni-calendar-item--multiple': weeks.multiple,
'uni-calendar-item--after-checked':weeks.afterMultiple,
'uni-calendar-item--disable':weeks.disable,
}">
<text v-if="selected && weeks.extraInfo" class="uni-calendar-item__weeks-box-circle"></text>
<text class="uni-calendar-item__weeks-box-text uni-calendar-item__weeks-box-text-disable uni-calendar-item--checked-text">{{weeks.date}}</text>
</view>
<view :class="{'uni-calendar-item--today': weeks.isToday}"></view>
</view>
</template>
<script>
export default {
props: {
weeks: {
type: Object,
default () {
return {}
}
},
calendar: {
type: Object,
default: () => {
return {}
}
},
selected: {
type: Array,
default: () => {
return []
}
},
checkHover: {
type: Boolean,
default: false
}
},
methods: {
choiceDate(weeks) {
this.$emit('change', weeks)
},
handleMousemove(weeks) {
this.$emit('handleMouse', weeks)
}
}
}
</script>
<style lang="scss" >
$uni-primary: #007aff !default;
.uni-calendar-item__weeks-box {
flex: 1;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
justify-content: center;
align-items: center;
margin: 1px 0;
position: relative;
}
.uni-calendar-item__weeks-box-text {
font-size: 14px;
// font-family: Lato-Bold, Lato;
font-weight: bold;
color: darken($color: $uni-primary, $amount: 40%);
}
.uni-calendar-item__weeks-box-item {
position: relative;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
justify-content: center;
align-items: center;
width: 40px;
height: 40px;
/* #ifdef H5 */
cursor: pointer;
/* #endif */
}
.uni-calendar-item__weeks-box-circle {
position: absolute;
top: 5px;
right: 5px;
width: 8px;
height: 8px;
border-radius: 8px;
background-color: #dd524d;
}
.uni-calendar-item__weeks-box .uni-calendar-item--disable {
cursor: default;
}
.uni-calendar-item--disable .uni-calendar-item__weeks-box-text-disable {
color: #D1D1D1;
}
.uni-calendar-item--today {
position: absolute;
top: 10px;
right: 17%;
background-color: #dd524d;
width:6px;
height: 6px;
border-radius: 50%;
}
.uni-calendar-item--extra {
color: #dd524d;
opacity: 0.8;
}
.uni-calendar-item__weeks-box .uni-calendar-item--checked {
background-color: $uni-primary;
border-radius: 50%;
box-sizing: border-box;
border: 3px solid #fff;
}
.uni-calendar-item--checked .uni-calendar-item--checked-text {
color: #fff;
}
.uni-calendar-item--multiple .uni-calendar-item--checked-range-text {
color: #333;
}
.uni-calendar-item--multiple {
background-color: #F6F7FC;
// color: #fff;
}
.uni-calendar-item--multiple .uni-calendar-item--before-checked,
.uni-calendar-item--multiple .uni-calendar-item--after-checked {
background-color: $uni-primary;
border-radius: 50%;
box-sizing: border-box;
border: 3px solid #F6F7FC;
}
.uni-calendar-item--before-checked .uni-calendar-item--checked-text,
.uni-calendar-item--after-checked .uni-calendar-item--checked-text {
color: #fff;
}
.uni-calendar-item--before-checked-x {
border-top-left-radius: 50px;
border-bottom-left-radius: 50px;
box-sizing: border-box;
background-color: #F6F7FC;
}
.uni-calendar-item--after-checked-x {
border-top-right-radius: 50px;
border-bottom-right-radius: 50px;
background-color: #F6F7FC;
}
</style>
{
"uni-datetime-picker.selectDate": "select date",
"uni-datetime-picker.selectTime": "select time",
"uni-datetime-picker.selectDateTime": "select date and time",
"uni-datetime-picker.startDate": "start date",
"uni-datetime-picker.endDate": "end date",
"uni-datetime-picker.startTime": "start time",
"uni-datetime-picker.endTime": "end time",
"uni-datetime-picker.ok": "ok",
"uni-datetime-picker.clear": "clear",
"uni-datetime-picker.cancel": "cancel",
"uni-datetime-picker.year": "-",
"uni-datetime-picker.month": "",
"uni-calender.MON": "MON",
"uni-calender.TUE": "TUE",
"uni-calender.WED": "WED",
"uni-calender.THU": "THU",
"uni-calender.FRI": "FRI",
"uni-calender.SAT": "SAT",
"uni-calender.SUN": "SUN",
"uni-calender.confirm": "confirm"
}
import en from './en.json'
import zhHans from './zh-Hans.json'
import zhHant from './zh-Hant.json'
export default {
en,
'zh-Hans': zhHans,
'zh-Hant': zhHant
}
{
"uni-datetime-picker.selectDate": "选择日期",
"uni-datetime-picker.selectTime": "选择时间",
"uni-datetime-picker.selectDateTime": "选择日期时间",
"uni-datetime-picker.startDate": "开始日期",
"uni-datetime-picker.endDate": "结束日期",
"uni-datetime-picker.startTime": "开始时间",
"uni-datetime-picker.endTime": "结束时间",
"uni-datetime-picker.ok": "确定",
"uni-datetime-picker.clear": "清除",
"uni-datetime-picker.cancel": "取消",
"uni-datetime-picker.year": "年",
"uni-datetime-picker.month": "月",
"uni-calender.SUN": "日",
"uni-calender.MON": "一",
"uni-calender.TUE": "二",
"uni-calender.WED": "三",
"uni-calender.THU": "四",
"uni-calender.FRI": "五",
"uni-calender.SAT": "六",
"uni-calender.confirm": "确认"
}
\ No newline at end of file \ No newline at end of file
{
"uni-datetime-picker.selectDate": "選擇日期",
"uni-datetime-picker.selectTime": "選擇時間",
"uni-datetime-picker.selectDateTime": "選擇日期時間",
"uni-datetime-picker.startDate": "開始日期",
"uni-datetime-picker.endDate": "結束日期",
"uni-datetime-picker.startTime": "開始时间",
"uni-datetime-picker.endTime": "結束时间",
"uni-datetime-picker.ok": "確定",
"uni-datetime-picker.clear": "清除",
"uni-datetime-picker.cancel": "取消",
"uni-datetime-picker.year": "年",
"uni-datetime-picker.month": "月",
"uni-calender.SUN": "日",
"uni-calender.MON": "一",
"uni-calender.TUE": "二",
"uni-calender.WED": "三",
"uni-calender.THU": "四",
"uni-calender.FRI": "五",
"uni-calender.SAT": "六",
"uni-calender.confirm": "確認"
}
\ No newline at end of file \ No newline at end of file
{
"id": "uni-datetime-picker",
"displayName": "uni-datetime-picker 日期选择器",
"version": "2.2.42",
"description": "uni-datetime-picker 日期时间选择器,支持日历,支持范围选择",
"keywords": [
"uni-datetime-picker",
"uni-ui",
"uniui",
"日期时间选择器",
"日期时间"
],
"repository": "https://github.com/dcloudio/uni-ui",
"engines": {
"HBuilderX": "",
"uni-app": "^4.07",
"uni-app-x": ""
},
"directories": {
"example": "../../temps/example_temps"
},
"dcloudext": {
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
"type": "component-vue",
"darkmode": "x",
"i18n": "x",
"widescreen": "x"
},
"uni_modules": {
"dependencies": [
"uni-scss",
"uni-icons"
],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "x",
"aliyun": "x",
"alipay": "x"
},
"client": {
"uni-app": {
"vue": {
"vue2": "√",
"vue3": "√"
},
"web": {
"safari": "√",
"chrome": "√"
},
"app": {
"vue": "√",
"nvue": "√",
"android": "√",
"ios": "√",
"harmony": "√"
},
"mp": {
"weixin": "√",
"alipay": "√",
"toutiao": "√",
"baidu": "√",
"kuaishou": "-",
"jd": "-",
"harmony": "-",
"qq": "√",
"lark": "-"
},
"quickapp": {
"huawei": "√",
"union": "√"
}
},
"uni-app-x": {
"web": {
"safari": "-",
"chrome": "-"
},
"app": {
"android": "-",
"ios": "-",
"harmony": "-"
},
"mp": {
"weixin": "-"
}
}
}
}
}
}
\ No newline at end of file \ No newline at end of file
> `重要通知:组件升级更新 2.0.0 后,支持日期+时间范围选择,组件 ui 将使用日历选择日期,ui 变化较大,同时支持 PC 和 移动端。此版本不向后兼容,不再支持单独的时间选择(type=time)及相关的 hide-second 属性(时间选可使用内置组件 picker)。若仍需使用旧版本,可在插件市场下载*非uni_modules版本*,旧版本将不再维护`
## DatetimePicker 时间选择器
> **组件名:uni-datetime-picker**
> 代码块: `uDatetimePicker`
该组件的优势是,支持**时间戳**输入和输出(起始时间、终止时间也支持时间戳),可**同时选择**日期和时间。
若只是需要单独选择日期和时间,不需要时间戳输入和输出,可使用原生的 picker 组件。
**_点击 picker 默认值规则:_**
- 若设置初始值 value, 会显示在 picker 显示框中
- 若无初始值 value,则初始值 value 为当前本地时间 Date.now(), 但不会显示在 picker 显示框中
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-datetime-picker)
#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
\ No newline at end of file \ No newline at end of file
## 2.0.12(2025-08-26)
- 优化 uni-app x 下 size 类型问题
## 2.0.11(2025-08-18)
- 修复 图标点击事件返回
## 2.0.9(2024-01-12) ## 2.0.9(2024-01-12)
fix: 修复图标大小默认值错误的问题 fix: 修复图标大小默认值错误的问题
## 2.0.8(2023-12-14) ## 2.0.8(2023-12-14)
......
...@@ -29,8 +29,8 @@ ...@@ -29,8 +29,8 @@
default: '#333333' default: '#333333'
}, },
size: { size: {
type: Object, type: [Number, String],
default: 16 default: 16
}, },
fontFamily: { fontFamily: {
type: String, type: String,
...@@ -49,12 +49,12 @@ ...@@ -49,12 +49,12 @@
return '' return ''
}, },
iconSize() : string { iconSize() : string {
const size = this.size const size = this.size
if (typeof size == 'string') { if (typeof size == 'string') {
const reg = /^[0-9]*$/g const reg = /^[0-9]*$/g
return reg.test(size as string) ? '' + size + 'px' : '' + size; return reg.test(size as string) ? '' + size + 'px' : '' + size;
// return '' + this.size // return '' + this.size
} }
return this.getFontSize(size as number) return this.getFontSize(size as number)
}, },
styleObj() : UTSJSONObject { styleObj() : UTSJSONObject {
......
...@@ -85,8 +85,8 @@ ...@@ -85,8 +85,8 @@
} }
}, },
methods: { methods: {
_onClick() { _onClick(e) {
this.$emit('click') this.$emit('click', e)
} }
} }
} }
...@@ -107,4 +107,4 @@ ...@@ -107,4 +107,4 @@
text-decoration: none; text-decoration: none;
text-align: center; text-align: center;
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
{ {
"id": "uni-icons", "id": "uni-icons",
"displayName": "uni-icons 图标", "displayName": "uni-icons 图标",
"version": "2.0.9", "version": "2.0.12",
"description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。", "description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。",
"keywords": [ "keywords": [
"uni-ui", "uni-ui",
...@@ -11,12 +11,14 @@ ...@@ -11,12 +11,14 @@
], ],
"repository": "https://github.com/dcloudio/uni-ui", "repository": "https://github.com/dcloudio/uni-ui",
"engines": { "engines": {
"HBuilderX": "^3.2.14" "HBuilderX": "^3.2.14",
"uni-app": "^4.08",
"uni-app-x": "^4.61"
}, },
"directories": { "directories": {
"example": "../../temps/example_temps" "example": "../../temps/example_temps"
}, },
"dcloudext": { "dcloudext": {
"sale": { "sale": {
"regular": { "regular": {
"price": "0.00" "price": "0.00"
...@@ -34,55 +36,76 @@ ...@@ -34,55 +36,76 @@
"permissions": "无" "permissions": "无"
}, },
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui", "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
"type": "component-vue" "type": "component-vue",
"darkmode": "x",
"i18n": "x",
"widescreen": "x"
}, },
"uni_modules": { "uni_modules": {
"dependencies": ["uni-scss"], "dependencies": [
"uni-scss"
],
"encrypt": [], "encrypt": [],
"platforms": { "platforms": {
"cloud": { "cloud": {
"tcb": "y", "tcb": "x",
"aliyun": "y" "aliyun": "x",
"alipay": "x"
}, },
"client": { "client": {
"App": { "uni-app": {
"app-vue": "y", "vue": {
"app-nvue": "y", "vue2": "√",
"app-uvue": "y" "vue3": "√"
},
"web": {
"safari": "√",
"chrome": "√"
},
"app": {
"vue": "√",
"nvue": "-",
"android": {
"extVersion": "",
"minVersion": "29"
},
"ios": "√",
"harmony": "√"
},
"mp": {
"weixin": "√",
"alipay": "√",
"toutiao": "√",
"baidu": "√",
"kuaishou": "-",
"jd": "-",
"harmony": "-",
"qq": "√",
"lark": "-"
},
"quickapp": {
"huawei": "√",
"union": "√"
}
}, },
"H5-mobile": { "uni-app-x": {
"Safari": "y", "web": {
"Android Browser": "y", "safari": "√",
"微信浏览器(Android)": "y", "chrome": "√"
"QQ浏览器(Android)": "y" },
}, "app": {
"H5-pc": { "android": {
"Chrome": "y", "extVersion": "",
"IE": "y", "minVersion": "29"
"Edge": "y", },
"Firefox": "y", "ios": "√",
"Safari": "y" "harmony": "√"
}, },
"小程序": { "mp": {
"微信": "y", "weixin": "√"
"阿里": "y", }
"百度": "y",
"字节跳动": "y",
"QQ": "y",
"钉钉": "y",
"快手": "y",
"飞书": "y",
"京东": "y"
},
"快应用": {
"华为": "y",
"联盟": "y"
},
"Vue": {
"vue2": "y",
"vue3": "y"
} }
} }
} }
} }
} }
\ No newline at end of file \ No newline at end of file
const SpritesmithPlugin = require("webpack-spritesmith"); const SpritesmithPlugin = require('webpack-spritesmith')
const spritesmithFunction = (data) => { const spritesmithFunction = data => {
function toRpx (val) { function toRpx(val) {
return `calc(100vmin * (1173 / 768) * ${val / 2 / 2346})` return `calc(100vmin * (1173 / 768) * ${val / 2 / 2346})`
} }
let { spritesheet, sprites } = data, let { spritesheet, sprites } = data,
spritesheetWidth = toRpx(spritesheet.width), spritesheetWidth = toRpx(spritesheet.width),
spritesheetHeight = toRpx(spritesheet.height) spritesheetHeight = toRpx(spritesheet.height)
let shared = `.sprite-icon { background-image: url(${data.sprites[0].image let shared = `.sprite-icon { background-image: url(${data.sprites[0].image});background-size: ${spritesheetWidth} ${spritesheetHeight};}`
});background-size: ${spritesheetWidth} ${spritesheetHeight};}`;
let perSprite = sprites let perSprite = sprites
.map((sprite) => { .map(sprite => {
let { name, width, height, offset_x, offset_y } = sprite let { name, width, height, offset_x, offset_y } = sprite
width = toRpx(width), ;((width = toRpx(width)), (height = toRpx(height)), (offset_x = toRpx(offset_x)), (offset_y = toRpx(offset_y)))
height = toRpx(height),
offset_x = toRpx(offset_x),
offset_y = toRpx(offset_y)
return `.icon-${name} { width: ${width}; height: ${height}; return `.icon-${name} { width: ${width}; height: ${height};
background-position: ${offset_x} ${offset_y};}`; background-position: ${offset_x} ${offset_y};}`
}) })
.join("\n"); .join('\n')
// let shared = `.sprite-icon { background-image: url(${ // let shared = `.sprite-icon { background-image: url(${
// data.sprites[0].image // data.sprites[0].image
// });background-size: ${spritesheet.width / 2}rpx ${ // });background-size: ${spritesheet.width / 2}rpx ${
...@@ -32,46 +28,47 @@ const spritesmithFunction = (data) => { ...@@ -32,46 +28,47 @@ const spritesmithFunction = (data) => {
// }rpx; background-position: ${offset_x / 2}rpx ${offset_y / 2}rpx;}`; // }rpx; background-position: ${offset_x / 2}rpx ${offset_y / 2}rpx;}`;
// }) // })
// .join("\n"); // .join("\n");
return `${shared}\n${perSprite}`; return `${shared}\n${perSprite}`
}; }
const path = require("path"); const path = require('path')
module.exports = { module.exports = {
devServer: { devServer: {
disableHostCheck: true, disableHostCheck: true
}, },
configureWebpack: { configureWebpack: {
plugins: [ plugins: [
new SpritesmithPlugin({ new SpritesmithPlugin({
// 引入图片文件夹 // 引入图片文件夹
src: { src: {
cwd: path.resolve(__dirname, "./assets/spritesmith"), cwd: path.resolve(__dirname, './assets/spritesmith'),
glob: ["*.png", "*.jpg"], glob: ['*.png', '*.jpg']
}, },
// 生成图片的路径 // 生成图片的路径
target: { target: {
image: path.resolve(__dirname, "./assets/images/sprite.png"), image: path.resolve(__dirname, './assets/images/sprite.png'),
// 生成SCSS // 生成SCSS
css: [ css: [
[ [
path.resolve(__dirname, "./assets/css/sprite.scss"), path.resolve(__dirname, './assets/css/sprite.scss'),
{ {
format: "function_based_template", format: 'function_based_template'
}, }
], ]
], ]
}, },
customTemplates: { customTemplates: {
function_based_template: spritesmithFunction, function_based_template: spritesmithFunction
}, },
//background引用路径 //background引用路径
apiOptions: { apiOptions: {
cssImageRef: "@/assets/images/sprite.png", cssImageRef: '@/assets/images/sprite.png'
}, },
// 每个图片间距 // 每个图片间距
spritesmithOptions: { spritesmithOptions: {
padding: 30, padding: 30
}, }
}), })
], ]
}, },
}; transpileDependencies: ['uview-ui']
}
...@@ -1083,6 +1083,11 @@ uuid@^3.3.2: ...@@ -1083,6 +1083,11 @@ uuid@^3.3.2:
resolved "https://registry.npmmirror.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" resolved "https://registry.npmmirror.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee"
integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==
uview-ui@^2.0.38:
version "2.0.38"
resolved "https://registry.npmmirror.com/uview-ui/-/uview-ui-2.0.38.tgz#02a0585f2c966a81c2997c79cfff0e8538a89c61"
integrity sha512-6egHDf9lXHKpG3hEjRE0vMx4+VWwKk/ReTf5x18KrIKqdvdPRqO3+B8Unh7vYYwrIxzAWIlmhZ9RJpKI/4UqPQ==
verror@1.10.0: verror@1.10.0:
version "1.10.0" version "1.10.0"
resolved "https://registry.npmmirror.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" resolved "https://registry.npmmirror.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!