Commit f9319efa by 胡悦

Merge branch 'v1.0.1' of http://192.168.3.233:8090/glsx/gl_tape into v1.0.1

2 parents 1662ab76 66a82b7e
...@@ -51,11 +51,32 @@ module.exports = { ...@@ -51,11 +51,32 @@ module.exports = {
}); });
}, },
// 历史订单列表 // 历史订单列表
getQuotationList(data) { getQuotationList (data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.page', method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.page',
projectName: 'boutique', projectName: 'boutique',
...data ...data
}) })
} },
/**
* 车型
*
*/
getCarBrandsList (data) {
return http.post({
method: 'scrm.api.carlife.common.getCarSeriesList',
...data
}, false, 'scrm')
},
/**
* 推荐人
*/
getEmployeeList (data) {
return http.post({
method: 'dj.api.smartcarlife.employee.getByMerchantId',
projectName: 'boutique',
sceneList:[0],
...data
})
},
}; };
...@@ -39,7 +39,6 @@ export default { ...@@ -39,7 +39,6 @@ export default {
}, },
popupW: { popupW: {
type: Number, type: Number,
default: 704,
}, },
popupH: { popupH: {
type: Number, type: Number,
......
...@@ -108,6 +108,7 @@ const pathEnum = { ...@@ -108,6 +108,7 @@ const pathEnum = {
drac: "/rop-scrm-entmicro/", drac: "/rop-scrm-entmicro/",
busassistant: "/rop-scrm-busassistant/", busassistant: "/rop-scrm-busassistant/",
boutique: "/rop-dj-car-boutique/", boutique: "/rop-dj-car-boutique/",
merchants:'/rop-merchants/'
}; };
const CONFIG_ENV_MAP = { const CONFIG_ENV_MAP = {
1: "develop", 1: "develop",
......
...@@ -7,15 +7,32 @@ ...@@ -7,15 +7,32 @@
<view class="title">问界·交车告知书</view> <view class="title">问界·交车告知书</view>
<view class="form"> <view class="form">
<template v-for="(i, index) in formObject"> <template v-for="(i, index) in formObject">
<view class="form-item" :key="index"> <view
class="form-item"
:key="index"
>
<view class="label">{{ i.label }}</view> <view class="label">{{ i.label }}</view>
<view class="value"> <view class="value">
<template v-if="i.type == 'input'"> <template v-if="i.type == 'input'">
<input :type="i.inputType" :maxlength="i.maxlength" /> <input
:type="i.inputType"
:maxlength="i.maxlength"
v-model="customerInfo[i.key]"
class="input"
@input="inputCustomer"
/>
</template> </template>
<template v-else> <template v-else>
<view class="select" @click="showPopup"> <view
<uni-icons class="arrow" type="down" :size="16"></uni-icons> class="select"
@click="showPopup(i.popKey)"
>
{{customerInfo[i.key]}}
<uni-icons
class="arrow"
type="down"
:size="16"
></uni-icons>
</view> </view>
</template> </template>
</view> </view>
...@@ -23,7 +40,10 @@ ...@@ -23,7 +40,10 @@
</template> </template>
</view> </view>
<template v-for="(i, index) in views"> <template v-for="(i, index) in views">
<view class="view" :key="index"> <view
class="view"
:key="index"
>
<wnCanvas <wnCanvas
saveImageType="3" saveImageType="3"
:drawImage="i.detailUrl" :drawImage="i.detailUrl"
...@@ -34,23 +54,51 @@ ...@@ -34,23 +54,51 @@
</view> </view>
</template> </template>
</view> </view>
<MessageBox v-if="carBoxVisible" :isFooter="false"> <MessageBox
position="bottom"
v-if="carBoxVisible"
:isFooter="false"
title="请选择车型"
@cancel="carBoxVisible = false"
>
<view class="select-box"> <view class="select-box">
<view <view
class="select-item" class="select-item"
:class="{ checked: selectId == item.id }" :class="{ checked: selectId == item.id }"
@click="handleSelect(item)" @click="handleSelect(item,'carBoxVisible')"
v-for="(item, index) in list" v-for="(item, index) in carlist"
:key="index" :key="index"
> >
{{ item.name }} {{ item.name }}
</view> </view>
</view> </view>
</MessageBox> </MessageBox>
<template v-if="employeeBoxVisible">
<MessageBox
position="bottom"
popupH="480"
:isFooter="false"
title="请选择销售"
@cancel="employeeBoxVisible = false"
>
<view class="select-box">
<view
class="select-item"
:class="{ checked: selectId == item.id }"
@click="handleSelect(item,'employeeBoxVisible')"
v-for="(item, index) in employeeList"
:key="index"
>
{{ item.staffName }}
</view>
</view>
</MessageBox>
</template>
</view> </view>
</template> </template>
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
import env from '../../../env'
export default { export default {
props: { props: {
views: Array, views: Array,
...@@ -60,62 +108,75 @@ export default { ...@@ -60,62 +108,75 @@ export default {
data () { data () {
return { return {
selectId: 1, selectId: 1,
carBoxVisible:false, carBoxVisible: false,
list: [ employeeBoxVisible: false,
{ carlist: [],
id: 1, employeeList: [],
name: "问界",
},
{
id: 2,
name: "问界",
},
{
id: 3,
name: "问界",
},
{
id: 4,
name: "问界",
},
],
formObject: [ formObject: [
{ {
label: '车主姓名', label: '车主姓名',
key: '', key: 'customerName',
type: 'input', type: 'input',
inputType: 'text', inputType: 'text',
maxlength: 50 maxlength: 50
}, },
{ {
label: '车型', label: '车型',
key: '', key: 'carModel',
type: 'select' type: 'select',
popKey: 'carBoxVisible'
}, },
{ {
label: '电话', label: '电话',
key: '', key: 'phoneNumber',
type: 'input', type: 'input',
inputType: 'tel', inputType: 'tel',
maxlength: 20 maxlength: 20
}, },
{ {
label: '销售姓名', label: '销售姓名',
key: '', key: 'staffName',
type: 'select' type: 'select',
popKey: 'employeeBoxVisible'
}
],
customerInfo: {
customerName: '',
carModel: '',
phoneNumber: '',
salesUuid: '',
staffName: ''
} }
]
} }
}, },
mounted () { mounted () {
let userInfo = uni.$storage.get('userInfo')
uni.$api.commonApi.getCarBrandsList({
brandId: env.index == 3 ? 2365 : 2978,
childBrandId: env.index == 3 ? 2695 : 3454
}).then(res => {
this.carlist = res
})
uni.$api.commonApi.getEmployeeList({
merchantId: userInfo.shopMerchantId,
}).then(res => {
this.employeeList = res
})
}, },
methods: { methods: {
handleSelect(item) { inputCustomer () {
this.selectId = item.id; this.$store.dispatch('setCustomerInfo', this.customerInfo)
this.carBoxVisible = false
}, },
showPopup() { handleSelect (item, popkey) {
this.carBoxVisible = true this[popkey] = false
if (popkey == 'employeeBoxVisible') {
this.customerInfo.salesUuid = item.uuid
this.customerInfo.staffName = item.staffName
} else this.customerInfo.carModel = item.name
this.$store.dispatch('setCustomerInfo', this.customerInfo)
},
showPopup (e) {
this[e] = true
}, },
} }
} }
...@@ -171,10 +232,12 @@ export default { ...@@ -171,10 +232,12 @@ export default {
margin-left: 32rpx; margin-left: 32rpx;
box-sizing: border-box; box-sizing: border-box;
padding: 0 40rpx; padding: 0 40rpx;
input, .input,
.select { .select {
width: 100%; width: 100%;
height: 100%; height: 100%;
border: none !important;
outline: none;
} }
.select { .select {
display: flex; display: flex;
...@@ -194,10 +257,12 @@ export default { ...@@ -194,10 +257,12 @@ export default {
} }
} }
.select-box { .select-box {
margin: 40rpx; margin: 40rpx 0;
display: grid; display: grid;
grid-template-columns: repeat(3, 1fr); grid-template-columns: repeat(3, 1fr);
gap: 20rpx; gap: 20rpx;
overflow-y: scroll;
height: 100%;
.select-item { .select-item {
text-align: center; text-align: center;
height: 68rpx; height: 68rpx;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<view class="title">历史成交记录</view> <view class="title">历史成交记录</view>
<Tabs :list="list" @tabclick="tabclick" /> <Tabs :list="list" @tabclick="tabclick" />
<view class="card-list"> <view class="card-list">
<uni-grid :column="3" :show-border="false" :square="false"> <!-- <uni-grid :column="3" :show-border="false" :square="false">
<uni-grid-item v-for="item in historyList" :key="item.id"> <uni-grid-item v-for="item in historyList" :key="item.id">
<view class="card-item"> <view class="card-item">
<view class="name">{{ item.customerName }}</view> <view class="name">{{ item.customerName }}</view>
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
</view> </view>
</uni-grid-item> </uni-grid-item>
</uni-grid> </uni-grid> -->
</view> </view>
</view> </view>
</view> </view>
......
...@@ -6,50 +6,74 @@ ...@@ -6,50 +6,74 @@
* @LastEditTime: 2024-04-09 16:51:00 * @LastEditTime: 2024-04-09 16:51:00
--> -->
<template> <template>
<view class="detail-box" @click="handleTouchStart()"> <view
class="detail-box"
@click="handleTouchStart()"
>
<view class="nav-bar"> <view class="nav-bar">
<view class="back" @click="back"> <view
<uni-icons type="left" :size="32"></uni-icons> class="back"
@click="back"
>
<uni-icons
type="left"
:size="32"
></uni-icons>
</view> </view>
</view> </view>
<tool-box :type="type" @choose="choose" @finish="open" /> <tool-box
:type="type"
@choose="choose"
@finish="open"
/>
<view :class="['view', { showView: id == 1 }]"> <view :class="['view', { showView: id == 1 }]">
<media_1 <media_1
:views="mediaList" :views="media[id]"
:penSwitch="type != 'preview' && drawStatus" :penSwitch="type != 'preview' && drawStatus"
/> />
</view> </view>
<view :class="['view', { showView: id == 2 }]"> <view :class="['view', { showView: id == 2 }]">
<media_2 <media_2
:views="mediaList" :views="media[id]"
:penSwitch="type != 'preview' && drawStatus" :penSwitch="type != 'preview' && drawStatus"
/> />
</view> </view>
<view :class="['view', { showView: id == 3 }]"> <view :class="['view', { showView: id == 3 }]">
<media_3 <media_3
:views="mediaList" :views="media[id]"
:penSwitch="type != 'preview' && drawStatus" :penSwitch="type != 'preview' && drawStatus"
/> />
</view> </view>
<view :class="['view', { showView: id == 4 }]"> <view :class="['view', { showView: id == 4 }]">
<media_4 <media_4
:views="mediaList" :views="media[id]"
:penSwitch="type != 'preview' && drawStatus" :penSwitch="type != 'preview' && drawStatus"
/> />
</view> </view>
<view :class="['view', { showView: id == 5 }]"> <view :class="['view', { showView: id == 5 }]">
<media_5 <media_5
:views="mediaList" :views="media[id]"
:penSwitch="type != 'preview' && drawStatus" :penSwitch="type != 'preview' && drawStatus"
/> />
</view> </view>
<view :class="['view', { showView: id == 6 }]"> <view :class="['view', { showView: id == 6 }]">
<media_6 :views="mediaList" /> <media_6 :views="media[id]" />
</view> </view>
<pay-pop ref="pay"></pay-pop> <pay-pop ref="pay"></pay-pop>
<view class="pen-box"> <view
<glsx-image src="media" /> class="pen-box"
@click="drawStatus = !drawStatus"
>
<glsx-image :src="!drawStatus?'media/pen.png':'media/pen-active.png'" />
</view> </view>
<MessageBox
v-if="finishVisible"
@cancel="finishVisible = false"
@confirm="stopAudio"
content="是否返回首页并结束本次接待"
confirmBtnText="确认"
></MessageBox>
<MessageBox <MessageBox
v-if="tipVisible" v-if="tipVisible"
@cancel="tipCancel" @cancel="tipCancel"
...@@ -72,70 +96,68 @@ ...@@ -72,70 +96,68 @@
import payPop from "./components/payPop.vue"; import payPop from "./components/payPop.vue";
import ToolBox from "./components/ToolBox.vue"; import ToolBox from "./components/ToolBox.vue";
import myClick from "@/mixin/click"; import myClick from "@/mixin/click";
import Media_1 from "./components/Media_1.vue"; import Media_1 from './components/Media_1.vue'
import Media_2 from "./components/Media_2.vue"; import Media_2 from './components/Media_2.vue'
import Media_3 from "./components/Media_3.vue"; import Media_3 from './components/Media_3.vue'
import Media_4 from "./components/Media_4.vue"; import Media_4 from './components/Media_4.vue'
import Media_5 from "./components/Media_5.vue"; import Media_5 from './components/Media_5.vue'
import Media_6 from "./components/Media_6.vue"; import Media_6 from './components/Media_6.vue'
import GlsxImage from "../../components/GlsxImage.vue";
export default { export default {
components: { components: { ToolBox, payPop, Media_1, Media_2, Media_3, Media_4, Media_5, Media_6 },
ToolBox,
payPop,
Media_1,
Media_2,
Media_3,
Media_4,
Media_5,
Media_6,
GlsxImage,
},
mixins: [myClick], mixins: [myClick],
data() { data () {
return { return {
type: "preview", type: "preview",
id: "", id: "",
mediaList: [], media: {
1: [],
2: [],
3: [],
4: [],
5: []
},
drawStatus: false, drawStatus: false,
messageBoxVisible: false, messageBoxVisible: false,
finishVisible: false,
}; };
}, },
onLoad(options) { onLoad (options) {
console.log(options)
this.type = options.type; this.type = options.type;
this.id = options.id; this.id = options.id;
this.getFindSoureDetail(options.id); this.getFindSoureDetail(options.id);
}, },
methods: { methods: {
open() { open () {
// this.$refs.pay.show() // this.$refs.pay.show()
this.messageBoxVisible = true; this.messageBoxVisible = true;
}, },
/**切换素材 */ /**切换素材 */
choose(e) { choose (e) {
this.id = e.id; this.id = e.id;
this.getFindSoureDetail(e.id); this.getFindSoureDetail(e.id);
}, },
async getFindSoureDetail(id) { async getFindSoureDetail (id) {
try { try {
this.mediaList = if (this.media[id]?.length) return
(await uni.$api.commonApi.getFindSoureDetail({ id })) || []; this.media[id] = (await uni.$api.commonApi.getFindSoureDetail({ id })) || [];
} catch (error) {} console.log(this.media[id])
}, } catch (error) {
back() { console.log(error)
uni.navigateBack(); }
},
back() {
uni.navigateBack();
}, },
// 完成接待 // 完成接待
done() { done () {
uni.navigateBack(); uni.navigateBack();
}, },
// 选择付款方式 // 选择付款方式
toPay() { toPay () {
this.$refs.pay.show(); this.$refs.pay.show();
}, },
back () {
if (this.type != 'preview') return this.finishVisible = true
uni.navigateBack()
}
}, },
}; };
</script> </script>
...@@ -164,13 +186,21 @@ export default { ...@@ -164,13 +186,21 @@ export default {
opacity: 0; opacity: 0;
left: 0; left: 0;
top: 0; top: 0;
display: none;
} }
.showView { .showView {
display: block;
z-index: 2; z-index: 2;
opacity: 1; opacity: 1;
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.pen-box {
position: fixed;
right: 40rpx;
top: 50%;
transform: translateY(-50%);
width: 120rpx;
height: 120rpx;
z-index: 3;
box-shadow: 0 4px 12px 0 #00000033;
}
</style> </style>
...@@ -8,36 +8,26 @@ ...@@ -8,36 +8,26 @@
// import { setToken, getToken, removeToken } from '@/utils/token';; // import { setToken, getToken, removeToken } from '@/utils/token';;
export default { export default {
namespaced: true, state () {
state() {
return { return {
userData: {}, customerInfo: {},
// token: getToken(),
}; };
}, },
mutations: { mutations: {
setUserData(state, data) { getCustomerInfo(state){
state.userData = data; return state.customerInfo
}, },
removeToken(state) { setCustomerInfo (state, data) {
state.token = ''; state.customerInfo = data
removeToken();
},
setToken(state, token) {
state.token = token;
setToken(token);
}, },
}, },
actions: { actions: {
// 获取用户详情 // 获取用户详情
async getUserData({ commit }, { params = {}, options = {} } = {}) { async getCustomerInfo ({ commit }) {
// console.log("userData", parseData); return commit('getCustomerInfo')
commit('setUserData', options.token);
return parseData;
}, },
async logout({ commit }) { async setCustomerInfo ({ commit }, value) {
commit('removeToken'); commit('setCustomerInfo', value);
commit('setUserData', {});
}, },
}, },
}; };
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!