Commit 7715c095 by cen

Merge branch 'SAAS+V5.5.1' of http://192.168.3.233:8090/glsx/gl_tape into SAAS+V5.5.1

2 parents 0f20a370 cbb76217
...@@ -32,25 +32,13 @@ ...@@ -32,25 +32,13 @@
> >
<view :class="['label',{required:i.required}]">{{ i.label }}</view> <view :class="['label',{required:i.required}]">{{ i.label }}</view>
<view :class="['value', { error: showError(i.key) && i.required },{disabled: pageParams.received}]"> <view :class="['value', { error: showError(i.key) && i.required },{disabled: pageParams.received}]">
<template v-if="i.type == 'input'"> <template v-if="i.addHtml">
<input
:type="i.inputType"
:maxlength="i.maxlength"
v-model="customerInfo[i.key]"
class="input"
:placeholder="i.placeholder"
:disabled="pageParams.received"
@input="inputCustomer"
placeholder-style="color:#c9c9c9;"
/>
</template>
<template v-else-if="i.type == 'select'">
<view <view
:class="['select', `${customerInfo[i.key]? '' : 'placeholder'}`]" :class="['select', `${pageParams.carInfo[i.key]? '' : 'placeholder'}`]"
@click="showPopup(i.popKey)" @click="showPopup(i.popKey)"
:key="selectKey" :key="selectKey"
> >
{{ customerInfo[i.key] || i.placeholder }} {{ pageParams.carInfo[i.key] || i.placeholder }}
<uni-icons <uni-icons
class="arrow" class="arrow"
type="down" type="down"
...@@ -59,7 +47,35 @@ ...@@ -59,7 +47,35 @@
</view> </view>
</template> </template>
<template v-else> <template v-else>
<view class="text">{{ customerInfo[i.key] }}</view> <template v-if="i.type == 'input'">
<input
:type="i.inputType"
:maxlength="i.maxlength"
v-model="customerInfo[i.key]"
class="input"
:placeholder="i.placeholder"
:disabled="pageParams.received"
@input="inputCustomer"
placeholder-style="color:#c9c9c9;"
/>
</template>
<template v-else-if="i.type == 'select'">
<view
:class="['select', `${customerInfo[i.key]? '' : 'placeholder'}`]"
@click="showPopup(i.popKey)"
:key="selectKey"
>
{{ customerInfo[i.key] || i.placeholder }}
<uni-icons
class="arrow"
type="down"
:size="16"
></uni-icons>
</view>
</template>
<template v-else>
<view class="text">{{ customerInfo[i.key] }}</view>
</template>
</template> </template>
</view> </view>
</view> </view>
...@@ -77,7 +93,14 @@ ...@@ -77,7 +93,14 @@
:key="idx" :key="idx"
> >
<view class="label">{{ j.label }}</view> <view class="label">{{ j.label }}</view>
<view class="value-text">{{ customerInfo[j.key] || '--'}}</view> <view class="value-text">
<template v-if="j.addHtml">
{{ pageParams.carInfo[j.key] || '--'}}
</template>
<template v-else>
{{ customerInfo[j.key] || '--'}}
</template>
</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -147,6 +170,11 @@ ...@@ -147,6 +170,11 @@
>生成专属二维码</view> >生成专属二维码</view>
</view> </view>
</MessageBox> </MessageBox>
<car-brands
:linkage="false"
ref="carBrandListVisible"
@select="handleSelect($event, 'carBrandListVisible')"
/>
<employee <employee
ref="employeeBoxVisible" ref="employeeBoxVisible"
@select="handleSelect($event,'employeeBoxVisible')" @select="handleSelect($event,'employeeBoxVisible')"
...@@ -179,6 +207,8 @@ ...@@ -179,6 +207,8 @@
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
import Employee from '@/components/Employee.vue' import Employee from '@/components/Employee.vue'
import qrcode from '@/utils/qrcode.js' import qrcode from '@/utils/qrcode.js'
import CarBrands from '@/components/CarBrands.vue'
const phoneRex = /^[1]([3-9])[0-9]{9}$/; const phoneRex = /^[1]([3-9])[0-9]{9}$/;
import dayjs from 'dayjs' import dayjs from 'dayjs'
const formObject_boutique = [{ const formObject_boutique = [{
...@@ -201,10 +231,12 @@ const formObject_boutique = [{ ...@@ -201,10 +231,12 @@ const formObject_boutique = [{
}, },
{ {
label: "品牌车型", label: "品牌车型",
key: "carModel", type: "select",
type: "text",
popKey: "carBrandListVisible", popKey: "carBrandListVisible",
placeholder: '请选择车型' placeholder: '请选择车型',
addHtml: 'carbrand',
key: 'name',
required: true
}, },
{ {
label: "交付专员", label: "交付专员",
...@@ -233,12 +265,22 @@ export default { ...@@ -233,12 +265,22 @@ export default {
title: String, title: String,
tips: String tips: String
}, },
components: { Employee }, components: { Employee, CarBrands },
watch: { watch: {
watchCustomerInfo: { watchCustomerInfo: {
immediate: true, immediate: true,
handler (newval) { handler (newval) {
this.customerInfo = Object.assign(this.customerInfo, newval) this.customerInfo = Object.assign(this.customerInfo, newval)
if (newval.carModel) {
this.pageParams.carInfo = {
carChildsBrandId: newval.carChildsBrandId,
carChildsBrandName: newval.carChildsBrandName,
carBrandId: newval.carBrandId,
carBrand: newval.carBrand,
id: newval.carSeriesId,
name: newval.carModel
}
}
try { try {
// 监听完成接待修改数据,同步修改生成优惠券按钮状态 // 监听完成接待修改数据,同步修改生成优惠券按钮状态
const { customerName, phoneNumber, staffName } = this.customerInfo const { customerName, phoneNumber, staffName } = this.customerInfo
...@@ -268,6 +310,21 @@ export default { ...@@ -268,6 +310,21 @@ export default {
}, },
show () { show () {
this.closeAllPopup() this.closeAllPopup()
},
carInfo: {
handler (newval) {
console.log(newval, '===')
this.pageParams.carInfo = {
carChildsBrandId: newval.carChildsBrandId,
carChildsBrandName: newval.carChildsBrandName,
carBrandId: newval.carBrandId,
carBrand: newval.carBrand,
id: newval.id,
name: newval.name
}
},
deep: true,
immediate: true
} }
}, },
computed: { computed: {
...@@ -419,11 +476,18 @@ export default { ...@@ -419,11 +476,18 @@ export default {
if (popkey == "employeeBoxVisible") { if (popkey == "employeeBoxVisible") {
this.customerInfo.salesUuid = item.uuid; this.customerInfo.salesUuid = item.uuid;
this.customerInfo.staffName = item.staffName; this.customerInfo.staffName = item.staffName;
this.$store.dispatch("setCustomerInfo", this.customerInfo);
} else { } else {
this.$refs.carBrandListVisible.close(); this.$refs.carBrandListVisible.close();
this.customerInfo.carModel = item.name; this.pageParams.carInfo = {
carChildsBrandId: item.carChildsBrandId,
carChildsBrandName: item.carChildsBrandName,
carBrandId: item.carBrandId,
carBrand: item.carBrand,
id: item.id,
name: item.name
}
} }
this.$store.dispatch("setCustomerInfo", this.customerInfo);
this.selectKey = Date.now() this.selectKey = Date.now()
const { customerName, phoneNumber, staffName } = this.customerInfo const { customerName, phoneNumber, staffName } = this.customerInfo
this.isCheck = customerName && phoneNumber && staffName this.isCheck = customerName && phoneNumber && staffName
...@@ -455,7 +519,7 @@ export default { ...@@ -455,7 +519,7 @@ export default {
if (this.pageParams.received) return if (this.pageParams.received) return
if (!this.isCheck) return // 按钮置灰的情况 if (!this.isCheck) return // 按钮置灰的情况
try { try {
const { pageParams: { clickFlag, couponId }, carInfo, customerInfo } = this, { const { pageParams: { clickFlag, couponId, carInfo }, customerInfo } = this, {
shopMerchantId } = uni.$storage.get("userInfo"), shopMerchantId } = uni.$storage.get("userInfo"),
validateStatus = await this.validate(), validateStatus = await this.validate(),
checkCouponAmount = await this.checkCouponAmount(couponId, [shopMerchantId]) checkCouponAmount = await this.checkCouponAmount(couponId, [shopMerchantId])
...@@ -512,7 +576,7 @@ export default { ...@@ -512,7 +576,7 @@ export default {
try { try {
this.pageParams.received = false this.pageParams.received = false
this.pageParams.qrTimer = setInterval(async () => { this.pageParams.qrTimer = setInterval(async () => {
const { pageParams: { couponId }, customerInfo } = this, const { pageParams: { couponId ,carInfo }, customerInfo } = this,
res = await uni.$api.boutiqueApi.findCustomerReceivedStatus({ res = await uni.$api.boutiqueApi.findCustomerReceivedStatus({
merchantCouponId: couponId, merchantCouponId: couponId,
customerPhone: customerInfo.phoneNumber, customerPhone: customerInfo.phoneNumber,
...@@ -524,7 +588,7 @@ export default { ...@@ -524,7 +588,7 @@ export default {
this.$emit('reception', { this.$emit('reception', {
item: { item: {
customerName: customerInfo.customerName, customerName: customerInfo.customerName,
carSeriesName: customerInfo.carModel, carSeriesName: carInfo.name,
customerPhone: customerInfo.phoneNumber, customerPhone: customerInfo.phoneNumber,
userId: customerInfo.salesUuid, userId: customerInfo.salesUuid,
employeeName: customerInfo.staffName, employeeName: customerInfo.staffName,
......
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
ref="futureCalendar" ref="futureCalendar"
:insert="false" :insert="false"
:clearDate="false" :clearDate="false"
:startDate="endDate" :startDate="startDate"
@confirm="confirmCalendar($event,'effectiveDate')" @confirm="confirmCalendar($event,'effectiveDate')"
:date="orderObj.effectiveDate" :date="orderObj.effectiveDate"
showBottomBtn showBottomBtn
...@@ -173,6 +173,7 @@ export default { ...@@ -173,6 +173,7 @@ export default {
formList: utils.deepClone(EQUITY_FORM_LIST), formList: utils.deepClone(EQUITY_FORM_LIST),
titleList: utils.deepClone(EQUITY_FORM_TITLE_LIST), titleList: utils.deepClone(EQUITY_FORM_TITLE_LIST),
endDate: dayjs().format('YYYY-MM-DD'), endDate: dayjs().format('YYYY-MM-DD'),
startDate: dayjs().add(1, 'day').format('YYYY-MM-DD'),
equityFormRule: utils.deepClone(EQUITY_FORM_RULE), equityFormRule: utils.deepClone(EQUITY_FORM_RULE),
orderObj: {}, orderObj: {},
loadComplete: false, loadComplete: false,
...@@ -232,7 +233,7 @@ export default { ...@@ -232,7 +233,7 @@ export default {
if (i.value == val.value) i.current = e.detail.value if (i.value == val.value) i.current = e.detail.value
}) })
}) })
this.viewKey = Date.now() // this.viewKey = Date.now()
}, },
handleCell (val) { handleCell (val) {
if (['calendar', 'futureCalendar'].includes(val.key)) return this.$refs[val.key]?.open() if (['calendar', 'futureCalendar'].includes(val.key)) return this.$refs[val.key]?.open()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!