Commit 7ff40264 by 岑成威

Merge branch 'saas+v5.8.3' of 192.168.3.233:glsx/gl_tape into saas+v5.8.3

2 parents 40dd0a8f e4e0e1dd
...@@ -32,10 +32,10 @@ export default { ...@@ -32,10 +32,10 @@ export default {
type: String, type: String,
default: 'uuid' default: 'uuid'
}, },
/** 转化人员(驻店零售)模式,与 OrderPopup 转化人员选择项一致 */ // default: 销售顾问;seller: 转化人员/驻店零售
sellerUser: { employeeType: {
type: Boolean, type: String,
default: false default: 'default'
} }
}, },
data () { data () {
...@@ -56,7 +56,7 @@ export default { ...@@ -56,7 +56,7 @@ export default {
return this.$store.state.user.historyStatus return this.$store.state.user.historyStatus
}, },
selectedId () { selectedId () {
if (Array.isArray(this.list) || this.sellerUser) { if (Array.isArray(this.list) || this.employeeType === 'seller') {
return this.salesPropsUuid return this.salesPropsUuid
} }
return this.$store.state.user.customerInfo.salesUuid || this.salesPropsUuid return this.$store.state.user.customerInfo.salesUuid || this.salesPropsUuid
...@@ -65,7 +65,7 @@ export default { ...@@ -65,7 +65,7 @@ export default {
if (Array.isArray(this.list)) { if (Array.isArray(this.list)) {
return this.list return this.list
} }
if (this.sellerUser) { if (this.employeeType === 'seller') {
return this.sellerEmployeeList return this.sellerEmployeeList
} }
return this.$store.state.user.employeeList return this.$store.state.user.employeeList
...@@ -78,13 +78,14 @@ export default { ...@@ -78,13 +78,14 @@ export default {
this.$refs.employeeBoxVisible.open() this.$refs.employeeBoxVisible.open()
if (Array.isArray(this.list)) return if (Array.isArray(this.list)) return
const userInfo = uni.$storage.get("userInfo") const userInfo = uni.$storage.get("userInfo")
if (this.sellerUser) { if (this.employeeType === 'seller') {
const { sceneType, merchantId } = userInfo const { merchantId } = userInfo
const apiTargetName = sceneType == 1 ? 'getEmployeeList' : 'getOrderScreenEmployeeList' uni.$api.popupApi
uni.$api.popupApi[apiTargetName]({ .getEmployeeList({
merchantId, merchantId,
sceneList: '' sceneList: ''
}).then((res) => { })
.then((res) => {
this.sellerEmployeeList = res || [] this.sellerEmployeeList = res || []
}) })
return return
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
/> />
<image <image
v-if="goodsInfo.isMainPush == 1"
class="prelearn-entrance" class="prelearn-entrance"
:style="prelearnButtonStyle" :style="prelearnButtonStyle"
:src="require('@/assets/images/common/icon-prestudy-entrance.webp')" :src="require('@/assets/images/common/icon-prestudy-entrance.webp')"
......
...@@ -114,7 +114,6 @@ ...@@ -114,7 +114,6 @@
</view> </view>
</view> </view>
</view> </view>
<view class="popup"> <view class="popup">
<car-brands <car-brands
ref="carBrandVisible" ref="carBrandVisible"
...@@ -131,8 +130,8 @@ ...@@ -131,8 +130,8 @@
></reception-sence> ></reception-sence>
<employee <employee
ref="residentSaleVisible" ref="residentSaleVisible"
title="驻店零售" :title="employeeSelectKey === 'sellerUserId' ? '驻店零售' : '流量来源'"
:sellerUser="employeeSelectKey === 'sellerUserId'" :employeeType="employeeSelectKey === 'sellerUserId' ? 'seller' : 'default'"
:salesPropsUuid="employeeSelectKey ? customerInfo[employeeSelectKey] : ''" :salesPropsUuid="employeeSelectKey ? customerInfo[employeeSelectKey] : ''"
@select="handleSelect($event, 'residentSaleVisible')" @select="handleSelect($event, 'residentSaleVisible')"
/> />
...@@ -146,14 +145,12 @@ ...@@ -146,14 +145,12 @@
</uni-popup> </uni-popup>
</view> </view>
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import CarBrands from '@/components/CarBrands.vue' import CarBrands from '@/components/CarBrands.vue'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import ReceptionSence from '@/components/HomeFrame/components/ReceptionCenter/ReceptionSence.vue' import ReceptionSence from '@/components/HomeFrame/components/ReceptionCenter/ReceptionSence.vue'
import Employee from '@/components/Employee.vue' import Employee from '@/components/Employee.vue'
import { validateVin, formatVinInput } from '@/utils/vinVaildate' import { validateVin, formatVinInput } from '@/utils/vinVaildate'
const phoneRex = /^[1]([3-9])[0-9]{9}$/, const phoneRex = /^[1]([3-9])[0-9]{9}$/,
default_customerForm = [{ default_customerForm = [{
label: '车主姓名', label: '车主姓名',
...@@ -217,8 +214,8 @@ const phoneRex = /^[1]([3-9])[0-9]{9}$/, ...@@ -217,8 +214,8 @@ const phoneRex = /^[1]([3-9])[0-9]{9}$/,
}, },
{ {
label: '到店日期', label: '到店日期',
valueKey: 'arrivalDate', valueKey: 'inviteDate',
key: 'arrivalDate', key: 'inviteDate',
type: 'date' type: 'date'
}, },
{ {
...@@ -233,7 +230,6 @@ const phoneRex = /^[1]([3-9])[0-9]{9}$/, ...@@ -233,7 +230,6 @@ const phoneRex = /^[1]([3-9])[0-9]{9}$/,
type: 'select', type: 'select',
popKey: 'residentSaleVisible' popKey: 'residentSaleVisible'
}] }]
export default { export default {
name: 'AddFiles', name: 'AddFiles',
components: { CarBrands, ReceptionSence, Employee }, components: { CarBrands, ReceptionSence, Employee },
...@@ -260,7 +256,8 @@ export default { ...@@ -260,7 +256,8 @@ export default {
startDate: '', startDate: '',
endDate: '', endDate: '',
validateState: true, validateState: true,
employeeSelectKey: '' employeeSelectKey: '',
inviteDateTouched: false
} }
}, },
onLoad (options) { onLoad (options) {
...@@ -298,8 +295,10 @@ export default { ...@@ -298,8 +295,10 @@ export default {
merchantName: '', merchantName: '',
sellerName: '', sellerName: '',
sellerUserId: '', sellerUserId: '',
inviteDate: '',
filingDate: '' filingDate: ''
} }
this.inviteDateTouched = false
if (this.customerId) this.findVisitsInfo() if (this.customerId) this.findVisitsInfo()
}, },
async findVisitsInfo () { async findVisitsInfo () {
...@@ -307,8 +306,10 @@ export default { ...@@ -307,8 +306,10 @@ export default {
id: this.customerId id: this.customerId
}) })
if (res.arrivalDate) res.arrivalDate = dayjs(res.arrivalDate).format("YYYY-MM-DD") if (res.arrivalDate) res.arrivalDate = dayjs(res.arrivalDate).format("YYYY-MM-DD")
if (res.inviteDate) res.inviteDate = dayjs(res.inviteDate).format("YYYY-MM-DD")
if (res.filingDate) res.filingDate = dayjs(res.filingDate).format("YYYY-MM-DD") if (res.filingDate) res.filingDate = dayjs(res.filingDate).format("YYYY-MM-DD")
this.customerInfo = res this.customerInfo = res
this.inviteDateTouched = !!res.inviteDate
}, },
backPage () { backPage () {
uni.navigateBack({ uni.navigateBack({
...@@ -357,7 +358,14 @@ export default { ...@@ -357,7 +358,14 @@ export default {
} }
}, },
bindDateChange (e, valueKey) { bindDateChange (e, valueKey) {
this.customerInfo[valueKey] = e.detail.value const value = e.detail.value
this.customerInfo[valueKey] = value
if (valueKey === 'arrivalDate' && !this.inviteDateTouched) {
this.customerInfo.inviteDate = value
}
if (valueKey === 'inviteDate') {
this.inviteDateTouched = true
}
}, },
inputBlur (e, val) { inputBlur (e, val) {
const standNoVal = this.customerInfo.standNo const standNoVal = this.customerInfo.standNo
...@@ -435,6 +443,8 @@ export default { ...@@ -435,6 +443,8 @@ export default {
merchantId:params.merchantId, merchantId:params.merchantId,
employeeName:params.employeeName, employeeName:params.employeeName,
sellerMerchantId:params.sellerMerchantId, sellerMerchantId:params.sellerMerchantId,
sellerUserId: params.sellerUserId,
sellerName: customerInfo.sellerName,
preliminaryOrders: [ preliminaryOrders: [
{ {
sceneType:1, sceneType:1,
...@@ -451,7 +461,7 @@ export default { ...@@ -451,7 +461,7 @@ export default {
employeeName:params.employeeName, employeeName:params.employeeName,
userId:params.userId, userId:params.userId,
deliveryDate: params.arrivalDate ? params.arrivalDate + ' 00:00:00' : params.arrivalDate, //交付日期 deliveryDate: params.arrivalDate ? params.arrivalDate + ' 00:00:00' : params.arrivalDate, //交付日期
inviteDate: params.filingDate ? params.filingDate + ' 00:00:00' : params.filingDate, //到店日期 inviteDate: params.inviteDate ? params.inviteDate + ' 00:00:00' : params.inviteDate, //到店日期
createdDate: params.filingDate, //建档日期 createdDate: params.filingDate, //建档日期
sellerUserld: params.sellerUserId, sellerUserld: params.sellerUserId,
sellerName: customerInfo.sellerName, sellerName: customerInfo.sellerName,
...@@ -498,7 +508,6 @@ export default { ...@@ -498,7 +508,6 @@ export default {
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.detail-box { .detail-box {
position: relative; position: relative;
...@@ -509,7 +518,6 @@ export default { ...@@ -509,7 +518,6 @@ export default {
box-sizing: border-box; box-sizing: border-box;
padding: toRpx(160) toRpx(64) 0; padding: toRpx(160) toRpx(64) 0;
} }
.nav-bar { .nav-bar {
position: fixed; position: fixed;
width: 100%; width: 100%;
...@@ -518,7 +526,6 @@ export default { ...@@ -518,7 +526,6 @@ export default {
top: toRpx(48); top: toRpx(48);
z-index: 999; z-index: 999;
pointer-events: none; pointer-events: none;
.back { .back {
height: 100%; height: 100%;
aspect-ratio: 1/1; aspect-ratio: 1/1;
...@@ -527,7 +534,6 @@ export default { ...@@ -527,7 +534,6 @@ export default {
justify-content: center; justify-content: center;
pointer-events: auto; pointer-events: auto;
} }
.title { .title {
position: absolute; position: absolute;
top: 50%; top: 50%;
...@@ -538,11 +544,9 @@ export default { ...@@ -538,11 +544,9 @@ export default {
color: #1a1a1a; color: #1a1a1a;
} }
} }
.detail-content { .detail-content {
height: calc(100vh - #{toRpx(212)}); height: calc(100vh - #{toRpx(212)});
overflow-y: auto; overflow-y: auto;
.detail-panel { .detail-panel {
width: 100%; width: 100%;
min-height: 100%; min-height: 100%;
...@@ -554,7 +558,6 @@ export default { ...@@ -554,7 +558,6 @@ export default {
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.form-header { .form-header {
width: 100%; width: 100%;
height: 28px; height: 28px;
...@@ -568,7 +571,6 @@ export default { ...@@ -568,7 +571,6 @@ export default {
} }
} }
} }
.form-box { .form-box {
flex-shrink: 0; flex-shrink: 0;
flex-wrap: wrap; flex-wrap: wrap;
...@@ -582,18 +584,15 @@ export default { ...@@ -582,18 +584,15 @@ export default {
height: toRpx(80); height: toRpx(80);
font-size: toRpx(28); font-size: toRpx(28);
} }
.label { .label {
width: toRpx(192); width: toRpx(192);
color: #292d33; color: #292d33;
justify-content: center; justify-content: center;
.required { .required {
color: #f24724; color: #f24724;
font-size: toRpx(28); font-size: toRpx(28);
} }
} }
.input, .input,
.select { .select {
width: toRpx(738); width: toRpx(738);
...@@ -607,44 +606,36 @@ export default { ...@@ -607,44 +606,36 @@ export default {
line-height: toRpx(76); line-height: toRpx(76);
padding: 0 toRpx(32) !important; padding: 0 toRpx(32) !important;
font-size: toRpx(28); font-size: toRpx(28);
&::placeholder { &::placeholder {
color: #33333333; color: #33333333;
} }
.value { .value {
max-width: toRpx(598); max-width: toRpx(598);
} }
} }
.placeholderStyle { .placeholderStyle {
color: #33333333; color: #33333333;
} }
.arrow { .arrow {
color: #999 !important; color: #999 !important;
margin-left: auto; margin-left: auto;
flex-shrink: 0; flex-shrink: 0;
} }
.calendar-icon { .calendar-icon {
width: 16px; width: 16px;
height: 16px; height: 16px;
margin-left: auto; margin-left: auto;
flex-shrink: 0; flex-shrink: 0;
} }
.error { .error {
border: toRpx(2) solid #f24724 !important; border: toRpx(2) solid #f24724 !important;
} }
} }
.btns { .btns {
justify-content: center; justify-content: center;
gap: 0 toRpx(34); gap: 0 toRpx(34);
padding-bottom: toRpx(32); padding-bottom: toRpx(32);
flex-shrink: 0; flex-shrink: 0;
.btn { .btn {
width: toRpx(718); width: toRpx(718);
height: toRpx(80); height: toRpx(80);
...@@ -657,12 +648,10 @@ export default { ...@@ -657,12 +648,10 @@ export default {
font-size: toRpx(32); font-size: toRpx(32);
color: #ffffff; color: #ffffff;
} }
.cancel { .cancel {
background: #dae9ff; background: #dae9ff;
color: #2c66f7; color: #2c66f7;
} }
.disabled { .disabled {
background-image: linear-gradient(0deg, #2c66f799 0%, #48a6ff99 100%); background-image: linear-gradient(0deg, #2c66f799 0%, #48a6ff99 100%);
} }
......
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
placeholder="请选择" placeholder="请选择"
placeholder-style="color:rgba(51, 51, 51, 0.2);" placeholder-style="color:rgba(51, 51, 51, 0.2);"
confirm-type="done" confirm-type="done"
@blur="inputBlur($event, i)"
/> />
</template> </template>
<template v-else-if="i.type == 'date'"> <template v-else-if="i.type == 'date'">
...@@ -97,6 +98,7 @@ ...@@ -97,6 +98,7 @@
placeholder="请选择" placeholder="请选择"
placeholder-style="color:rgba(51, 51, 51, 0.2);" placeholder-style="color:rgba(51, 51, 51, 0.2);"
confirm-type="done" confirm-type="done"
@blur="inputBlur($event, i)"
/> />
</template> </template>
<template v-else-if="i.type == 'date'"> <template v-else-if="i.type == 'date'">
...@@ -174,7 +176,6 @@ ...@@ -174,7 +176,6 @@
</view> </view>
</view> </view>
</view> </view>
<view class="popup"> <view class="popup">
<car-brands <car-brands
ref="carBrandVisible" ref="carBrandVisible"
...@@ -192,7 +193,7 @@ ...@@ -192,7 +193,7 @@
<employee <employee
ref="residentSaleVisible" ref="residentSaleVisible"
title="驻店零售" title="驻店零售"
seller-user employee-type="seller"
:salesPropsUuid="customerInfo.advanceUserId" :salesPropsUuid="customerInfo.advanceUserId"
@select="handleSelect($event, 'residentSaleVisible')" @select="handleSelect($event, 'residentSaleVisible')"
/> />
...@@ -214,15 +215,14 @@ ...@@ -214,15 +215,14 @@
></uni-popup-message> ></uni-popup-message>
</uni-popup> </uni-popup>
</view> </view>
</template> </template>
<script type='text/ecmascript-6'>
<script type='text/ecmascript-6'> import CarBrands from '@/components/CarBrands.vue'
import CarBrands from '@/components/CarBrands.vue' import dayjs from 'dayjs'
import dayjs from 'dayjs' import ReceptionSence from '@/components/HomeFrame/components/ReceptionCenter/ReceptionSence.vue'
import ReceptionSence from '@/components/HomeFrame/components/ReceptionCenter/ReceptionSence.vue' import Employee from '@/components/Employee.vue'
import Employee from '@/components/Employee.vue' import { validateVin, formatVinInput } from '@/utils/vinVaildate'
const phoneRex = /^[1]([3-9])[0-9]{9}$/,
const phoneRex = /^[1]([3-9])[0-9]{9}$/,
default_customerForm = [{ default_customerForm = [{
label: '车主姓名', label: '车主姓名',
valueKey: 'customerName', valueKey: 'customerName',
...@@ -254,14 +254,14 @@ ...@@ -254,14 +254,14 @@
required: true, required: true,
type: 'date' type: 'date'
}, },
// { // {
// label: '接待场景', // label: '接待场景',
// valueKey: 'receptionSceneName', // valueKey: 'receptionSceneName',
// key: 'receptionScene', // key: 'receptionScene',
// type: 'select', // type: 'select',
// required: true, // required: true,
// popKey: 'receptionSceneVisible' // popKey: 'receptionSceneVisible'
// }, // },
{ {
label: '流量来源', label: '流量来源',
valueKey: 'employeeName', valueKey: 'employeeName',
...@@ -320,8 +320,7 @@ ...@@ -320,8 +320,7 @@
fullWidth: true, fullWidth: true,
showCount: true showCount: true
}] }]
export default {
export default {
name: 'DetailFiles', name: 'DetailFiles',
components: { CarBrands, ReceptionSence, Employee }, components: { CarBrands, ReceptionSence, Employee },
computed: { computed: {
...@@ -373,7 +372,8 @@ ...@@ -373,7 +372,8 @@
}, },
groupMemberList: [], groupMemberList: [],
startDate: '', startDate: '',
endDate: '' endDate: '',
validateState: true
} }
}, },
onLoad (options) { onLoad (options) {
...@@ -434,6 +434,24 @@ ...@@ -434,6 +434,24 @@
} }
return false return false
} }
const carVin = this.customerInfo.standNo
if (carVin) {
this.customerInfo.standNo = formatVinInput(carVin)
if (this.customerInfo.standNo.length !== 17) {
uni.showToast({
title: '请输入 17 位有效字符(支持大写 A-H/J-N/P-Z、0-9)',
icon: 'none'
})
return false
}
if (!this.validateState) {
uni.showToast({
title: '车架号校验不匹配,请核对后重新输入',
icon: 'none'
})
return false
}
}
const requestParams = { const requestParams = {
id: this.customerInfo.id, id: this.customerInfo.id,
customerName: this.customerInfo.customerName, customerName: this.customerInfo.customerName,
...@@ -599,6 +617,7 @@ ...@@ -599,6 +617,7 @@
deliveryDate: '', deliveryDate: '',
receptionSceneName: '', receptionSceneName: '',
standNo: '', standNo: '',
inviteDate: '',
createdDate: '', createdDate: '',
employeeName: '', employeeName: '',
userId: '', userId: '',
...@@ -681,6 +700,22 @@ ...@@ -681,6 +700,22 @@
bindDateChange (e, valueKey) { bindDateChange (e, valueKey) {
this.customerInfo[valueKey] = e.detail.value this.customerInfo[valueKey] = e.detail.value
}, },
inputBlur (e, val) {
const standNoVal = this.customerInfo.standNo
if (val.key === 'standNo' && standNoVal) {
this.customerInfo.standNo = formatVinInput(standNoVal)
validateVin(this.customerInfo.standNo)
.then(result => {
const { valid } = result.data
this.validateState = valid
})
.catch(() => {
this.validateState = false
})
} else if (val.key === 'standNo') {
this.validateState = true
}
},
formatDateTime (value) { formatDateTime (value) {
if (!value) return value if (!value) return value
return dayjs(value).format('YYYY-MM-DD HH:mm:ss') return dayjs(value).format('YYYY-MM-DD HH:mm:ss')
...@@ -717,7 +752,6 @@ ...@@ -717,7 +752,6 @@
carChildsBrandName: customerInfo.carChildsBrandName, carChildsBrandName: customerInfo.carChildsBrandName,
carChildsBrandId: customerInfo.carChildsBrandId carChildsBrandId: customerInfo.carChildsBrandId
}) })
uni.showLoading({ uni.showLoading({
mask: true mask: true
}) })
...@@ -756,11 +790,10 @@ ...@@ -756,11 +790,10 @@
} }
} }
} }
} }
</script> </script>
<style scoped lang="scss">
<style scoped lang="scss"> .detail-box {
.detail-box {
position: relative; position: relative;
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
...@@ -768,9 +801,8 @@ ...@@ -768,9 +801,8 @@
background-size: 100%; background-size: 100%;
box-sizing: border-box; box-sizing: border-box;
padding: toRpx(160) toRpx(64) 0; padding: toRpx(160) toRpx(64) 0;
} }
.nav-bar {
.nav-bar {
position: fixed; position: fixed;
width: 100%; width: 100%;
height: toRpx(96); height: toRpx(96);
...@@ -778,7 +810,6 @@ ...@@ -778,7 +810,6 @@
top: toRpx(48); top: toRpx(48);
z-index: 999; z-index: 999;
pointer-events: none; pointer-events: none;
.back { .back {
height: 100%; height: 100%;
aspect-ratio: 1/1; aspect-ratio: 1/1;
...@@ -787,7 +818,6 @@ ...@@ -787,7 +818,6 @@
justify-content: center; justify-content: center;
pointer-events: auto; pointer-events: auto;
} }
.title { .title {
position: absolute; position: absolute;
top: 50%; top: 50%;
...@@ -797,12 +827,10 @@ ...@@ -797,12 +827,10 @@
font-size: toRpx(32); font-size: toRpx(32);
color: #1a1a1a; color: #1a1a1a;
} }
} }
.detail-content {
.detail-content {
height: calc(100vh - #{toRpx(212)}); height: calc(100vh - #{toRpx(212)});
overflow-y: auto; overflow-y: auto;
.detail-panel { .detail-panel {
width: 100%; width: 100%;
min-height: 100%; min-height: 100%;
...@@ -814,7 +842,6 @@ ...@@ -814,7 +842,6 @@
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.detail-info { .detail-info {
position: relative; position: relative;
width: 100%; width: 100%;
...@@ -825,7 +852,6 @@ ...@@ -825,7 +852,6 @@
margin-bottom: 24px; margin-bottom: 24px;
flex-shrink: 0; flex-shrink: 0;
box-sizing: border-box; box-sizing: border-box;
.detail-info-bg { .detail-info-bg {
position: absolute; position: absolute;
inset: 0; inset: 0;
...@@ -834,7 +860,6 @@ ...@@ -834,7 +860,6 @@
backdrop-filter: blur(2px); backdrop-filter: blur(2px);
-webkit-backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
} }
.detail-info-body { .detail-info-body {
position: relative; position: relative;
z-index: 1; z-index: 1;
...@@ -844,57 +869,45 @@ ...@@ -844,57 +869,45 @@
padding: 0 18px; padding: 0 18px;
box-sizing: border-box; box-sizing: border-box;
} }
.detail-info-left { .detail-info-left {
flex: 1; flex: 1;
min-width: 0; min-width: 0;
align-items: center; align-items: center;
gap: 8px; gap: 8px;
} }
.customer-item-status { .customer-item-status {
padding: 0 8px; padding: 0 8px;
border-radius: 4px; border-radius: 4px;
flex-shrink: 0; flex-shrink: 0;
&--warning { &--warning {
background: #FDECE9; background: #FDECE9;
.customer-item-status-text { .customer-item-status-text {
color: #F24724; color: #F24724;
} }
} }
&--success { &--success {
background: #EAF9F1; background: #EAF9F1;
.customer-item-status-text { .customer-item-status-text {
color: #35C376; color: #35C376;
} }
} }
&--failed { &--failed {
background: #F5F7FA; background: #F5F7FA;
.customer-item-status-text { .customer-item-status-text {
color: #999EA8; color: #999EA8;
} }
} }
&--refund { &--refund {
background: #FFF5E6; background: #FFF5E6;
.customer-item-status-text { .customer-item-status-text {
color: #F7A431; color: #F7A431;
} }
} }
} }
.customer-item-status-text { .customer-item-status-text {
font-size: 12px; font-size: 12px;
line-height: 22px; line-height: 22px;
} }
.user-tag { .user-tag {
width: 32px; width: 32px;
height: 32px; height: 32px;
...@@ -904,7 +917,6 @@ ...@@ -904,7 +917,6 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
flex-shrink: 0; flex-shrink: 0;
.user-tag-text { .user-tag-text {
font-size: 14px; font-size: 14px;
line-height: 20px; line-height: 20px;
...@@ -912,7 +924,6 @@ ...@@ -912,7 +924,6 @@
color: #2c66f7; color: #2c66f7;
} }
} }
.user-name { .user-name {
font-size: 16px; font-size: 16px;
font-weight: 500; font-weight: 500;
...@@ -920,7 +931,6 @@ ...@@ -920,7 +931,6 @@
flex-shrink: 0; flex-shrink: 0;
white-space: nowrap; white-space: nowrap;
} }
.active-list { .active-list {
flex: 1; flex: 1;
min-width: 0; min-width: 0;
...@@ -928,7 +938,6 @@ ...@@ -928,7 +938,6 @@
gap: 8px; gap: 8px;
overflow: hidden; overflow: hidden;
} }
.active-item { .active-item {
padding: 6px 12px; padding: 6px 12px;
border: 1px solid #dce1e6; border: 1px solid #dce1e6;
...@@ -941,7 +950,6 @@ ...@@ -941,7 +950,6 @@
box-sizing: border-box; box-sizing: border-box;
} }
} }
.form-header { .form-header {
width: 100%; width: 100%;
height: 28px; height: 28px;
...@@ -954,9 +962,8 @@ ...@@ -954,9 +962,8 @@
justify-content: center; justify-content: center;
} }
} }
} }
.form-box {
.form-box {
flex-shrink: 0; flex-shrink: 0;
flex-wrap: wrap; flex-wrap: wrap;
align-items: flex-start; align-items: flex-start;
...@@ -964,7 +971,6 @@ ...@@ -964,7 +971,6 @@
row-gap: 16px; row-gap: 16px;
padding: toRpx(32) toRpx(40); padding: toRpx(32) toRpx(40);
justify-content: space-between; justify-content: space-between;
&--no-top { &--no-top {
padding-top: 0; padding-top: 0;
} }
...@@ -973,18 +979,15 @@ ...@@ -973,18 +979,15 @@
height: toRpx(80); height: toRpx(80);
font-size: toRpx(28); font-size: toRpx(28);
} }
.label { .label {
width: toRpx(192); width: toRpx(192);
color: #292d33; color: #292d33;
justify-content: center; justify-content: center;
.required { .required {
color: #f24724; color: #f24724;
font-size: toRpx(28); font-size: toRpx(28);
} }
} }
.input, .input,
.select { .select {
width: toRpx(738); width: toRpx(738);
...@@ -998,45 +1001,36 @@ ...@@ -998,45 +1001,36 @@
line-height: toRpx(76); line-height: toRpx(76);
padding: 0 toRpx(32) !important; padding: 0 toRpx(32) !important;
font-size: toRpx(28); font-size: toRpx(28);
&::placeholder { &::placeholder {
color: #33333333; color: #33333333;
} }
.value { .value {
max-width: toRpx(598); max-width: toRpx(598);
} }
} }
.placeholderStyle { .placeholderStyle {
color: #33333333; color: #33333333;
} }
.arrow { .arrow {
color: #999 !important; color: #999 !important;
margin-left: auto; margin-left: auto;
flex-shrink: 0; flex-shrink: 0;
} }
.error { .error {
border: toRpx(2) solid #f24724 !important; border: toRpx(2) solid #f24724 !important;
} }
.input--readonly { .input--readonly {
color: #666666; color: #666666;
background: #f5f7fa; background: #f5f7fa;
} }
.readonly-box { .readonly-box {
width: toRpx(738); width: toRpx(738);
align-items: center; align-items: center;
gap: toRpx(16); gap: toRpx(16);
.input--readonly { .input--readonly {
flex: 1; flex: 1;
width: 0; width: 0;
} }
.sync-btn { .sync-btn {
flex-shrink: 0; flex-shrink: 0;
min-width: toRpx(112); min-width: toRpx(112);
...@@ -1052,10 +1046,8 @@ ...@@ -1052,10 +1046,8 @@
box-sizing: border-box; box-sizing: border-box;
} }
} }
.form-item--full { .form-item--full {
width: 100%; width: 100%;
.input-box, .input-box,
.input, .input,
.select, .select,
...@@ -1064,7 +1056,6 @@ ...@@ -1064,7 +1056,6 @@
width: 0; width: 0;
} }
} }
.input-box { .input-box {
width: toRpx(738); width: toRpx(738);
height: toRpx(76); height: toRpx(76);
...@@ -1073,7 +1064,6 @@ ...@@ -1073,7 +1064,6 @@
box-sizing: border-box; box-sizing: border-box;
align-items: center; align-items: center;
padding-right: toRpx(24); padding-right: toRpx(24);
.input--count { .input--count {
flex: 1; flex: 1;
width: 0; width: 0;
...@@ -1083,7 +1073,6 @@ ...@@ -1083,7 +1073,6 @@
padding: 0 0 0 toRpx(32) !important; padding: 0 0 0 toRpx(32) !important;
line-height: toRpx(76); line-height: toRpx(76);
} }
.input-count { .input-count {
flex-shrink: 0; flex-shrink: 0;
font-size: toRpx(24); font-size: toRpx(24);
...@@ -1092,14 +1081,12 @@ ...@@ -1092,14 +1081,12 @@
white-space: nowrap; white-space: nowrap;
} }
} }
} }
.btns {
.btns {
justify-content: center; justify-content: center;
gap: 0 toRpx(34); gap: 0 toRpx(34);
padding-bottom: toRpx(32); padding-bottom: toRpx(32);
flex-shrink: 0; flex-shrink: 0;
.btn { .btn {
width: toRpx(718); width: toRpx(718);
height: toRpx(80); height: toRpx(80);
...@@ -1112,14 +1099,12 @@ ...@@ -1112,14 +1099,12 @@
font-size: toRpx(32); font-size: toRpx(32);
color: #ffffff; color: #ffffff;
} }
.cancel { .cancel {
background: #dae9ff; background: #dae9ff;
color: #2c66f7; color: #2c66f7;
} }
.disabled { .disabled {
background-image: linear-gradient(0deg, #2c66f799 0%, #48a6ff99 100%); background-image: linear-gradient(0deg, #2c66f799 0%, #48a6ff99 100%);
} }
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -29,7 +29,7 @@ import dayjs from 'dayjs' ...@@ -29,7 +29,7 @@ import dayjs from 'dayjs'
export default { export default {
name: 'DateTime', name: 'DateTime',
inject: ['userInfo'], inject: ['userInfo'],
data () { data() {
return { return {
hours: [], hours: [],
days: [], days: [],
...@@ -44,18 +44,18 @@ export default { ...@@ -44,18 +44,18 @@ export default {
}, },
mounted () { mounted() {
this.initDate() this.initDate()
}, },
methods: { methods: {
initDate () { initDate() {
this.dateValues = [] this.dateValues = []
this.hourValues = [] this.hourValues = []
this.minuteValues = [] this.minuteValues = []
const today = new Date() const today = new Date()
this.getDateList('2019/01/01', new Date(today.getFullYear(), today.getMonth(), today.getDate())) this.getDateList('2019/01/01', new Date(today.getFullYear(), today.getMonth(), today.getDate()))
}, },
getDateList (starDay, endDay) { getDateList(starDay, endDay) {
const arr = []; const arr = [];
const dates = []; const dates = [];
...@@ -74,16 +74,19 @@ export default { ...@@ -74,16 +74,19 @@ export default {
// 获取每一天的时间 YY-MM-DD // 获取每一天的时间 YY-MM-DD
for (const j in arr) { for (const j in arr) {
const time = new Date(arr[j]); const time = dayjs(arr[j]);
const year = time.getFullYear(); if (!time.isValid()) continue; // 跳过无效日期
const mouth = time.getMonth() + 1 >= 10 ? time.getMonth() + 1 : '0' + (time.getMonth() + 1); const year = time.year();
const day = time.getDate() >= 10 ? time.getDate() : '0' + time.getDate(); const month = time.month() + 1; // 注意:dayjs 的 month() 返回 0-11
const YYMMDD = year + '/' + mouth + '/' + day; const day = time.date();
const mouthStr = month >= 10 ? month : '0' + month;
const dayStr = day >= 10 ? day : '0' + day;
const YYMMDD = year + '/' + mouthStr + '/' + dayStr;
dates.push(YYMMDD); dates.push(YYMMDD);
} }
this.getHourList(dates) this.getHourList(dates)
}, },
getHourList (days) { getHourList(days) {
const hours = [], today = new Date(); const hours = [], today = new Date();
for (let hour = 0; hour < today.getHours() + 1; hour++) { for (let hour = 0; hour < today.getHours() + 1; hour++) {
hours.push(hour.toString().padStart(2, '0')); hours.push(hour.toString().padStart(2, '0'));
...@@ -91,7 +94,7 @@ export default { ...@@ -91,7 +94,7 @@ export default {
this.getMinuteList(days, hours) this.getMinuteList(days, hours)
}, },
getMinuteList (days, hours) { getMinuteList(days, hours) {
const minutes = []; const minutes = [];
const today = new Date() const today = new Date()
for (let minute = 0; minute < today.getMinutes() + 1; minute++) { for (let minute = 0; minute < today.getMinutes() + 1; minute++) {
...@@ -123,7 +126,7 @@ export default { ...@@ -123,7 +126,7 @@ export default {
}, 100) }, 100)
this.$emit('onComplete') this.$emit('onComplete')
}, },
changeDate (e) { changeDate(e) {
const { days } = this const { days } = this
const { value } = e.detail const { value } = e.detail
const index = value[0] const index = value[0]
...@@ -133,7 +136,7 @@ export default { ...@@ -133,7 +136,7 @@ export default {
const timeType = this.currentDate != today ? 1 : 0 const timeType = this.currentDate != today ? 1 : 0
this.getAllTimeOrPartTime(timeType) this.getAllTimeOrPartTime(timeType)
}, },
changeHour (e) { changeHour(e) {
const { hours, days, dateValues } = this const { hours, days, dateValues } = this
const { value } = e.detail const { value } = e.detail
const index = value[0] const index = value[0]
...@@ -146,13 +149,13 @@ export default { ...@@ -146,13 +149,13 @@ export default {
const timeType = this.currentDate != today ? 1 : 0 const timeType = this.currentDate != today ? 1 : 0
this.getAllTimeOrPartTimeMinute(timeType) this.getAllTimeOrPartTimeMinute(timeType)
}, },
changeMinutes (e) { changeMinutes(e) {
const { minutes } = this const { minutes } = this
const { value } = e.detail const { value } = e.detail
const index = value[0] const index = value[0]
this.currentMinute = minutes[index] this.currentMinute = minutes[index]
}, },
getAllTimeOrPartTime (type) { getAllTimeOrPartTime(type) {
const today = new Date() const today = new Date()
const hours = [], minutes = [], hour_len = type == 1 ? 24 : today.getHours() + 1, minute_len = type == 1 ? 60 : today.getMinutes() + 1; const hours = [], minutes = [], hour_len = type == 1 ? 24 : today.getHours() + 1, minute_len = type == 1 ? 60 : today.getMinutes() + 1;
for (let hour = 0; hour < hour_len; hour++) { for (let hour = 0; hour < hour_len; hour++) {
...@@ -164,7 +167,7 @@ export default { ...@@ -164,7 +167,7 @@ export default {
this.hours = hours this.hours = hours
this.minutes = minutes this.minutes = minutes
}, },
getAllTimeOrPartTimeMinute (type) { getAllTimeOrPartTimeMinute(type) {
const today = new Date() const today = new Date()
const currentHour = today.getHours() const currentHour = today.getHours()
const timeType = this.currentHour != currentHour ? 1 : 0 const timeType = this.currentHour != currentHour ? 1 : 0
...@@ -174,7 +177,7 @@ export default { ...@@ -174,7 +177,7 @@ export default {
} }
this.minutes = minutes this.minutes = minutes
}, },
getResult () { getResult() {
let str = '' let str = ''
str = this.currentDate + ' ' + this.currentHour + ':' + this.currentMinute str = this.currentDate + ' ' + this.currentHour + ':' + this.currentMinute
// + ":00" // + ":00"
...@@ -190,9 +193,11 @@ export default { ...@@ -190,9 +193,11 @@ export default {
height: 100%; height: 100%;
display: grid; display: grid;
grid-template-columns: repeat(3, 1fr); grid-template-columns: repeat(3, 1fr);
.picker { .picker {
height: 100%; height: 100%;
text-align: center; text-align: center;
.view { .view {
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -201,6 +206,7 @@ export default { ...@@ -201,6 +206,7 @@ export default {
height: toRpx(72); height: toRpx(72);
} }
} }
/deep/.indicator { /deep/.indicator {
height: toRpx(72); height: toRpx(72);
} }
......
...@@ -65,12 +65,14 @@ export default { ...@@ -65,12 +65,14 @@ export default {
confirmText: '确认', confirmText: '确认',
}, },
goodsInfo: {}, goodsInfo: {},
enteredViaRow: false,
isMainPush: null,
prelearnContext: { prelearnContext: {
activityId: '', activityId: '',
activityProductId: '', activityProductId: '',
staffUuid: uni.$storage.get('userInfo').uuid, staffUuid: uni.$storage.get('userInfo').uuid,
staffName: uni.$storage.get('userInfo').name, staffName: uni.$storage.get('userInfo').name,
merchantId: String(uni.$storage.get('userInfo').merchantId ?? ''), merchantId: String(uni.$storage.get('userInfo').shopMerchantId ?? ''),
entrySource: 'home_popup', entrySource: 'home_popup',
skipCount: 0, skipCount: 0,
}, },
...@@ -164,7 +166,9 @@ export default { ...@@ -164,7 +166,9 @@ export default {
if (options.row) { if (options.row) {
try { try {
this.goodsInfo = JSON.parse(decodeURIComponent(options.row)) this.goodsInfo = JSON.parse(decodeURIComponent(options.row))
console.log('[prelearnBridge] 商品完整数据 goodsInfo:', this.goodsInfo) this.enteredViaRow = true
this.isMainPush = this.goodsInfo.isMainPush ?? null
console.log('[prelearnBridge] 商品完整数据 goodsInfo:', this.goodsInfo, 'isMainPush:', this.isMainPush)
const productId =this.goodsInfo.productId const productId =this.goodsInfo.productId
if (productId) { if (productId) {
...@@ -735,7 +739,43 @@ export default { ...@@ -735,7 +739,43 @@ export default {
} }
// #endif // #endif
}, },
async checkMainPushStaffLearnStatus() {
const res = await uni.$api.activityApi.getPrelearnScriptBoardAPI({
activityId: this.goodsInfo.activityId || this.prelearnContext.activityId,
activityProductId: this.goodsInfo.productId || this.prelearnContext.activityProductId,
})
console.log('[prelearnBridge] getPrelearnScriptBoardAPI res:', res)
return Number(res?.staffLearnStatus) === 1
},
showMainPushBackTip() {
uni.showModal({
title: '提示',
content: '请先完成预学习后再退出',
showCancel: false,
confirmText: '知道了',
})
},
async back() { async back() {
if (this.enteredViaRow && Number(this.isMainPush) !== 1) {
this.navigateBack()
return
}
if (Number(this.isMainPush) === 1) {
try {
const learned = await this.checkMainPushStaffLearnStatus()
if (learned) {
this.navigateBack()
return
}
this.showMainPushBackTip()
} catch (error) {
console.error('[prelearnBridge] 预学习状态查询失败:', error)
this.showMainPushBackTip()
}
return
}
try { try {
const res = await uni.$api.commonApi.getPrelernHomePopupAPI() const res = await uni.$api.commonApi.getPrelernHomePopupAPI()
console.log('[prelearnBridge] getPrelernHomePopupAPI res:', res) console.log('[prelearnBridge] getPrelernHomePopupAPI res:', res)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!