Commit 833749e4 by 李伟康

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

2 parents 291cbc2e 02b8e1d2
......@@ -74,5 +74,11 @@ module.exports = {
...data
})
},
getPrelearnScriptBoardAPI(data) {
return http.post({
method: 'dj.api.pad.prelearn.script.board',
projectName: 'pad',
...data
})
},
}
<template>
<MessageBox ref="employeeBoxVisible" position="bottom" :isFooter="false" :title="`请选择${title}`" :maxHeight="1000" @close="$emit('close')">
<view class="select-box">
<view class="select-item" :class="{ checked: salesUuid == item.uuid }" @click="handleSelect(item)" v-for="(item, index) in employeeList" :key="index">
{{ item.staffName }}
<view class="select-item" :class="{ checked: selectedId == item[valueKey] }" @click="handleSelect(item)" v-for="(item, index) in displayList" :key="index">
{{ item[labelKey] }}
</view>
</view>
</MessageBox>
......@@ -19,6 +19,18 @@ export default {
salesPropsUuid: {
type: String,
default: ''
},
list: {
type: Array,
default: null
},
labelKey: {
type: String,
default: 'staffName'
},
valueKey: {
type: String,
default: 'uuid'
}
},
data () {
......@@ -37,10 +49,16 @@ export default {
watchStatus () {
return this.$store.state.user.historyStatus
},
salesUuid () {
selectedId () {
if (Array.isArray(this.list)) {
return this.salesPropsUuid
}
return this.$store.state.user.customerInfo.salesUuid || this.salesPropsUuid
},
employeeList () {
displayList () {
if (Array.isArray(this.list)) {
return this.list
}
return this.$store.state.user.employeeList
}
},
......@@ -49,6 +67,7 @@ export default {
methods: {
open () {
this.$refs.employeeBoxVisible.open()
if (Array.isArray(this.list)) return
const userInfo = uni.$storage.get("userInfo"),
{ shopMerchantId } = userInfo;
/**获取销售人员 */
......
......@@ -158,6 +158,7 @@ export default {
})
},
handleGoCustomerDetail(item) {
console.log('handleGoCustomerDetail***', item)
uni.navigateTo({
url: `/pages/common/customerPages/detailFiles?customerId=${item.id}`,
animationType: 'pop-in',
......
......@@ -31,6 +31,19 @@
<script>
const GOODS_COVER = require('@/assets/images/common/goods-activity-cover.png')
const PRELEARN_AI_STATUS = {
GENERATING: 'GENERATING',
MODIFIED: 'MODIFIED',
DELETED: 'DELETED',
READY: 'READY'
}
const PRELEARN_AI_STATUS_TIPS = {
[PRELEARN_AI_STATUS.GENERATING]: 'AI生成中',
[PRELEARN_AI_STATUS.MODIFIED]: '策略更新重写中',
[PRELEARN_AI_STATUS.DELETED]: '任务已失效'
}
export default {
name: 'ActuvityDetail',
data() {
......@@ -54,18 +67,6 @@ export default {
try {
this.goodsInfo = JSON.parse(decodeURIComponent(options.row))
console.log('[actuvityDetail] 商品完整数据 goodsInfo:', this.goodsInfo)
console.log('[actuvityDetail] 商品名称:', this.goodsInfo.name)
console.log('[actuvityDetail] 活动时间:', this.goodsInfo.startTime, '至', this.goodsInfo.endTime)
console.log('[actuvityDetail] 是否主推:', this.goodsInfo.isMainPush)
console.log('[actuvityDetail] 活动类型:', this.goodsInfo.activityTypeLabel)
console.log('[actuvityDetail] 车型:', this.goodsInfo.carSeriesName)
console.log('[actuvityDetail] 商品描述:', this.goodsInfo.description)
console.log('[actuvityDetail] 售价:', this.goodsInfo.price)
console.log('[actuvityDetail] 原价:', this.goodsInfo.originalPrice)
console.log('[actuvityDetail] 主图:', this.goodsInfo.mainImageUrl)
console.log('[actuvityDetail] 缩略图:', this.goodsInfo.thumbImageUrl)
console.log('[actuvityDetail] 详情图:', this.goodsInfo.detailImageUrl)
console.log('[actuvityDetail] 商品ID:', this.goodsInfo.id || this.goodsInfo.productId)
} catch (error) {
console.error('[actuvityDetail] 解析商品详情参数失败:', error)
uni.showToast({
......@@ -82,7 +83,7 @@ export default {
animationDuration: 100
})
},
handlePrelearnClick() {
async handlePrelearnClick() {
if (!this.goodsInfo?.id && !this.goodsInfo?.productId) {
uni.showToast({
title: '商品信息不完整',
......@@ -90,11 +91,27 @@ export default {
})
return
}
const row = encodeURIComponent(JSON.stringify(this.goodsInfo))
uni.navigateTo({
url: `/pages/common/prelearnBridge?row=${row}&entrySource=package_detail`
})
try {
const res = await uni.$api.activityApi.getPrelearnScriptBoardAPI({
activityId: this.goodsInfo.activityId,
activityProductId: this.goodsInfo.productId
})
console.log('getPrelearnScriptBoardAPI**前置*', res)
const { aiStatus } = res || {}
if (aiStatus !== PRELEARN_AI_STATUS.READY) {
const tip = PRELEARN_AI_STATUS_TIPS[aiStatus] || '剧本未就绪,请稍后重试'
uni.showToast({ title: tip, icon: 'none' })
return
}
const row = encodeURIComponent(JSON.stringify(this.goodsInfo))
uni.navigateTo({
url: `/pages/common/prelearnBridge?row=${row}&entrySource=package_detail`
})
} catch (error) {
console.error('[actuvityDetail] 预学习剧本查询失败:', error)
}
}
}
}
......
......@@ -377,7 +377,7 @@ export default {
})
let { customerInfo, customerForm, optionalForm } = this,
{ shopMerchantId, sceneType } = uni.$storage.get("userInfo"),
targetApi = customerInfo.id ? 'submitCustomerProfileAPI' : 'submitCustomerProfileAPI',
targetApi = customerInfo.id ? 'submitPreliminaryOrderAPI' : 'submitPreliminaryOrderAPI',
params = {
merchantId: shopMerchantId,
bussinessScene: sceneType == 0 ? 1 : 2
......@@ -404,25 +404,6 @@ export default {
mask: true
})
console.log('params**', params)
// {
// "merchantId": 44211227,
// "bussinessScene": 2,
// "customerName": "linl",
// "customerPhone": "13588008885",
// "carTypeName": "问界M7",
// "arrivalDate": "2026-06-25",
// "residentSaleId": "997c9fbb64b046ac900d751d99d0273d",
// "standNo": "",
// "filingDate": "",
// "carTypeId": 1149147,
// "carBrand": "AITO 问界",
// "carBrandId": 3454,
// "oneCarBrand": "鸿蒙智行",
// "oneCarBrandId": 2978,
// "employeeName": "成威2号",
// "userId": "e77729f1a544442a8f43e587e1f6d20a",
// "sellerMerchantId": 44209880
// }
let requestParams = {
userId:params.userId,
merchantId:params.merchantId,
......@@ -430,6 +411,8 @@ export default {
sellerMerchantId:params.sellerMerchantId,
preliminaryOrders: [
{
sceneType:1,
baseSceneCode:'100101',
customerName:params.customerName,
customerPhone:params.customerPhone,
carBrand:params.carBrand,
......@@ -438,9 +421,9 @@ export default {
carChildsBrandName:'',
carSeriesId:params.carTypeId,
carSeriesName:params.carTypeName,
deliveryDate:params.arrivalDate, //交付日期
inviteDate:'', //到店日期
createdDate:'', //建档日期
deliveryDate: params.arrivalDate ? params.arrivalDate + ' 00:00:00' : params.arrivalDate, //交付日期
inviteDate: params.filingDate ? params.filingDate + ' 00:00:00' : params.filingDate, //到店日期
createdDate: params.filingDate ? params.filingDate + ' 00:00:00' : params.filingDate, //建档日期
}
]
}
......@@ -449,6 +432,7 @@ export default {
_this = this
console.log('submitCustomerProfileAPI res**', res)
if (res) {
uni.$emit('refreshCustomerProfileGroupInfo')
if (res == '1') {
this.$refs.successRef.open()
setTimeout(() => {
......
......@@ -66,8 +66,8 @@ export default {
},
goodsInfo: {},
prelearnContext: {
activityId: '31',
activityProductId: '16',
activityId: '',
activityProductId: '',
staffUuid: uni.$storage.get('userInfo').uuid,
staffName: uni.$storage.get('userInfo').name,
merchantId: String(uni.$storage.get('userInfo').merchantId ?? ''),
......@@ -136,7 +136,7 @@ export default {
},
},
onLoad(options) {
const defaultUrl = 'http://192.168.1.68:4173/prelearning.html'
const defaultUrl = 'https://single-pages.test.glsx.com.cn/prelearning.html'
this.webviewUrl = options.url ? decodeURIComponent(options.url) : defaultUrl
if (options.prelearnData) {
try {
......@@ -166,7 +166,7 @@ export default {
this.goodsInfo = JSON.parse(decodeURIComponent(options.row))
console.log('[prelearnBridge] 商品完整数据 goodsInfo:', this.goodsInfo)
const productId = this.goodsInfo.id || this.goodsInfo.productId || this.goodsInfo.activityProductId
const productId =this.goodsInfo.productId
if (productId) {
this.prelearnContext.activityProductId = String(productId)
}
......@@ -737,30 +737,8 @@ export default {
},
async back() {
try {
// const res = await uni.$api.commonApi.getPrelernHomePopupAPI()
const res = {
"activityId": 31,
"activityName": "618年中促活动A",
"packages": [
{
"activityProductId": "16",
"packageName": "tttttttt",
"includes": ['原厂定制车衣','玻璃贴膜'],
"learnStatus": "STUDIED",
"scriptReady": true
}
],
"remainingSkipCount": 0,
"shouldPopup": true,
"muteReason": null,
"remainingActivityCount": null
}
const res = await uni.$api.commonApi.getPrelernHomePopupAPI()
console.log('[prelearnBridge] getPrelernHomePopupAPI res:', res)
// if (!res) {
// this.navigateBack()
// return
// }
const packages = res.packages || []
const allStudied = packages.length > 0 && packages.every(
(pkg) => pkg.learnStatus === 'STUDIED'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!