更新代码
This commit is contained in:
parent
dd6490f5ff
commit
d1b87c152c
@ -1,118 +1,118 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- <el-descriptions class="margin-top" :column="3" :size="'mini'" border style="margin-bottom: 1rem">-->
|
||||
<!-- <!– <template slot="extra">–>-->
|
||||
<!-- <!– <el-button v-if="createTicketType" type="success" size="small">新增客户信息</el-button>–>-->
|
||||
<!-- <!– <el-button v-if="createTicketType" type="primary" size="small" :disabled="!selectUser.id">完善更多客户信息</el-button>–>-->
|
||||
<!-- <!– <el-button type="primary" size="small">选择业务</el-button>–>-->
|
||||
<!-- <!– </template>–>-->
|
||||
<!-- <el-descriptions-item>-->
|
||||
<!-- <template slot="label">-->
|
||||
<!-- 用户选择-->
|
||||
<!-- </template>-->
|
||||
<!-- <UserChoose v-model="selectUser"/>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item>-->
|
||||
<!-- <template slot="label">-->
|
||||
<!-- 车辆选择-->
|
||||
<!-- </template>-->
|
||||
<!-- <CarChoose v-model="selectCar" :cus-name="selectUser.cusName"/>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item>-->
|
||||
<!-- <template slot="label">-->
|
||||
<!-- 手机-->
|
||||
<!-- </template>-->
|
||||
<!-- <el-input disabled v-model="selectUser.phoneNumber"/>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item>-->
|
||||
<!-- <template slot="label">-->
|
||||
<!-- 车架号-->
|
||||
<!-- </template>-->
|
||||
<!-- <el-input disabled v-model="selectCar.vin"/>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<!-- <!– <el-descriptions-item>–>-->
|
||||
<!-- <!– <template slot="label">–>-->
|
||||
<!-- <!– 车牌–>-->
|
||||
<!-- <!– </template>–>-->
|
||||
<!-- <!– <el-input disabled v-model="selectCar.licenseNumber"/>–>-->
|
||||
<!-- <!– </el-descriptions-item>–>-->
|
||||
<!-- <el-descriptions-item>-->
|
||||
<!-- <template slot="label">-->
|
||||
<!-- 品牌车系-->
|
||||
<!-- </template>-->
|
||||
<!-- <el-input disabled v-model="selectCar.modelStr"/>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item>-->
|
||||
<!-- <template slot="label">-->
|
||||
<!-- 保险到期-->
|
||||
<!-- </template>-->
|
||||
<!-- <el-date-picker disabled-->
|
||||
<!-- v-model="selectCar.insuranceExpiryDate"-->
|
||||
<!-- type="date">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item>-->
|
||||
<!-- <template slot="label">-->
|
||||
<!-- 年检到期-->
|
||||
<!-- </template>-->
|
||||
<!-- <el-date-picker disabled-->
|
||||
<!-- v-model="selectCar.nextInspectionDate"-->
|
||||
<!-- type="date">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item>-->
|
||||
<!-- <template slot="label">-->
|
||||
<!-- 进厂时间-->
|
||||
<!-- </template>-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="formData.inTime"-->
|
||||
<!-- type="date"-->
|
||||
<!-- placeholder="选择日期">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item>-->
|
||||
<!-- <template slot="label">-->
|
||||
<!-- 预计完工-->
|
||||
<!-- </template>-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="formData.outTime"-->
|
||||
<!-- type="date"-->
|
||||
<!-- placeholder="选择日期">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item>-->
|
||||
<!-- <template slot="label">-->
|
||||
<!-- 上次里程-->
|
||||
<!-- </template>-->
|
||||
<!-- <el-input v-model="selectCar.maintenanceMileage"/>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item>-->
|
||||
<!-- <template slot="label">-->
|
||||
<!-- 本次里程-->
|
||||
<!-- </template>-->
|
||||
<!-- <el-input v-model="selectCar.newMaintenanceMileage"/>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item>-->
|
||||
<!-- <template slot="label">-->
|
||||
<!-- 预约订单选择-->
|
||||
<!-- </template>-->
|
||||
<!-- <el-select v-model="formData.bookingId" size="small">-->
|
||||
<!-- <el-option v-for="item in bookingList" :key="item.id" :value="item.id" :label="item.bookingTime" />-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<!-- <!– <el-descriptions-item :span="3">–>-->
|
||||
<!-- <!– <template slot="label">–>-->
|
||||
<!-- <!– 备注–>-->
|
||||
<!-- <!– </template>–>-->
|
||||
<!-- <!– <el-input v-model="formData.remark"/>–>-->
|
||||
<!-- <!– </el-descriptions-item>–>-->
|
||||
<!-- <el-descriptions-item>-->
|
||||
<!-- <template slot="label">-->
|
||||
<!-- 服务顾问-->
|
||||
<!-- </template>-->
|
||||
<!-- <StaffChoose v-model="selectStaff"/>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<!-- </el-descriptions>-->
|
||||
<!-- <el-descriptions class="margin-top" :column="3" :size="'mini'" border style="margin-bottom: 1rem">-->
|
||||
<!-- <!– <template slot="extra">–>-->
|
||||
<!-- <!– <el-button v-if="createTicketType" type="success" size="small">新增客户信息</el-button>–>-->
|
||||
<!-- <!– <el-button v-if="createTicketType" type="primary" size="small" :disabled="!selectUser.id">完善更多客户信息</el-button>–>-->
|
||||
<!-- <!– <el-button type="primary" size="small">选择业务</el-button>–>-->
|
||||
<!-- <!– </template>–>-->
|
||||
<!-- <el-descriptions-item>-->
|
||||
<!-- <template slot="label">-->
|
||||
<!-- 用户选择-->
|
||||
<!-- </template>-->
|
||||
<!-- <UserChoose v-model="selectUser"/>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item>-->
|
||||
<!-- <template slot="label">-->
|
||||
<!-- 车辆选择-->
|
||||
<!-- </template>-->
|
||||
<!-- <CarChoose v-model="selectCar" :cus-name="selectUser.cusName"/>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item>-->
|
||||
<!-- <template slot="label">-->
|
||||
<!-- 手机-->
|
||||
<!-- </template>-->
|
||||
<!-- <el-input disabled v-model="selectUser.phoneNumber"/>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item>-->
|
||||
<!-- <template slot="label">-->
|
||||
<!-- 车架号-->
|
||||
<!-- </template>-->
|
||||
<!-- <el-input disabled v-model="selectCar.vin"/>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<!-- <!– <el-descriptions-item>–>-->
|
||||
<!-- <!– <template slot="label">–>-->
|
||||
<!-- <!– 车牌–>-->
|
||||
<!-- <!– </template>–>-->
|
||||
<!-- <!– <el-input disabled v-model="selectCar.licenseNumber"/>–>-->
|
||||
<!-- <!– </el-descriptions-item>–>-->
|
||||
<!-- <el-descriptions-item>-->
|
||||
<!-- <template slot="label">-->
|
||||
<!-- 品牌车系-->
|
||||
<!-- </template>-->
|
||||
<!-- <el-input disabled v-model="selectCar.modelStr"/>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item>-->
|
||||
<!-- <template slot="label">-->
|
||||
<!-- 保险到期-->
|
||||
<!-- </template>-->
|
||||
<!-- <el-date-picker disabled-->
|
||||
<!-- v-model="selectCar.insuranceExpiryDate"-->
|
||||
<!-- type="date">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item>-->
|
||||
<!-- <template slot="label">-->
|
||||
<!-- 年检到期-->
|
||||
<!-- </template>-->
|
||||
<!-- <el-date-picker disabled-->
|
||||
<!-- v-model="selectCar.nextInspectionDate"-->
|
||||
<!-- type="date">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item>-->
|
||||
<!-- <template slot="label">-->
|
||||
<!-- 进厂时间-->
|
||||
<!-- </template>-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="formData.inTime"-->
|
||||
<!-- type="date"-->
|
||||
<!-- placeholder="选择日期">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item>-->
|
||||
<!-- <template slot="label">-->
|
||||
<!-- 预计完工-->
|
||||
<!-- </template>-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="formData.outTime"-->
|
||||
<!-- type="date"-->
|
||||
<!-- placeholder="选择日期">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item>-->
|
||||
<!-- <template slot="label">-->
|
||||
<!-- 上次里程-->
|
||||
<!-- </template>-->
|
||||
<!-- <el-input v-model="selectCar.maintenanceMileage"/>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item>-->
|
||||
<!-- <template slot="label">-->
|
||||
<!-- 本次里程-->
|
||||
<!-- </template>-->
|
||||
<!-- <el-input v-model="selectCar.newMaintenanceMileage"/>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item>-->
|
||||
<!-- <template slot="label">-->
|
||||
<!-- 预约订单选择-->
|
||||
<!-- </template>-->
|
||||
<!-- <el-select v-model="formData.bookingId" size="small">-->
|
||||
<!-- <el-option v-for="item in bookingList" :key="item.id" :value="item.id" :label="item.bookingTime" />-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<!-- <!– <el-descriptions-item :span="3">–>-->
|
||||
<!-- <!– <template slot="label">–>-->
|
||||
<!-- <!– 备注–>-->
|
||||
<!-- <!– </template>–>-->
|
||||
<!-- <!– <el-input v-model="formData.remark"/>–>-->
|
||||
<!-- <!– </el-descriptions-item>–>-->
|
||||
<!-- <el-descriptions-item>-->
|
||||
<!-- <template slot="label">-->
|
||||
<!-- 服务顾问-->
|
||||
<!-- </template>-->
|
||||
<!-- <StaffChoose v-model="selectStaff"/>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<!-- </el-descriptions>-->
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="17" style="padding-right: 0">
|
||||
<el-card class="top-left">
|
||||
@ -213,7 +213,8 @@
|
||||
预约订单选择
|
||||
</template>
|
||||
<el-select v-model="formData.bookingId" size="small">
|
||||
<el-option v-for="item in bookingList" :key="item.id" :value="item.id" :label="parseTime(item.bookingTime)" />
|
||||
<el-option v-for="item in bookingList" :key="item.id" :value="item.id"
|
||||
:label="parseTime(item.bookingTime)"/>
|
||||
</el-select>
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item :span="3">-->
|
||||
@ -232,7 +233,7 @@
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="7" style="padding-left: 0">
|
||||
<el-card style="margin-left: 0" >
|
||||
<el-card style="margin-left: 0">
|
||||
<div slot="header" class="clearfix">
|
||||
<span style="font-weight: bold; font-size: 16px;"> 会员卡券</span>
|
||||
</div>
|
||||
@ -242,20 +243,20 @@
|
||||
size="mini"
|
||||
height="200"
|
||||
style="width: 100%">
|
||||
<!-- @selection-change="handleSelectionChange"-->
|
||||
<!-- <el-table-column-->
|
||||
<!-- type="selection"-->
|
||||
<!-- width="55">-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column prop="couponName" label="卡券名称" />
|
||||
<!-- @selection-change="handleSelectionChange"-->
|
||||
<!-- <el-table-column-->
|
||||
<!-- type="selection"-->
|
||||
<!-- width="55">-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column prop="couponName" label="卡券名称"/>
|
||||
<el-table-column label="卡券类型" width="80" align="center" prop="couponType">
|
||||
<template v-slot="scope">
|
||||
<dict-tag :type="DICT_TYPE.MEMBER_COUPON_TYPE" :value="scope.row.couponType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="剩余金额/次数" width="120" align="right" prop="balance">
|
||||
<el-table-column label="剩余金额/次数" width="120" align="right" prop="balance">
|
||||
<template v-slot="scope">
|
||||
{{scope.row.balance}}{{scope.row.outRule == 'mehx'?'元':'次'}}
|
||||
{{ scope.row.balance }}{{ scope.row.outRule == 'mehx' ? '元' : '次' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="适用车型" width="80" align="center" prop="carModel">
|
||||
@ -279,12 +280,12 @@
|
||||
<span>{{ parseTime(scope.row.endTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column fixed="right" label="操作" width="130" align="center" class-name="small-padding fixed-width">-->
|
||||
<!-- <template v-slot="scope">-->
|
||||
<!-- <el-button size="mini" type="text" icon="el-icon-goods" @click="couponVerification(scope.row)">核销</el-button>-->
|
||||
<!-- <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column fixed="right" label="操作" width="130" align="center" class-name="small-padding fixed-width">-->
|
||||
<!-- <template v-slot="scope">-->
|
||||
<!-- <el-button size="mini" type="text" icon="el-icon-goods" @click="couponVerification(scope.row)">核销</el-button>-->
|
||||
<!-- <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
@ -319,10 +320,13 @@
|
||||
<el-button size="small" v-if="formData.ticketType === '02'" @click="formData.ticketType = '01'">B单</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<TicketItem item-type="project" :in-list-data="projectList" @tableData="projectData" ref="projectTable" :coupon-list="couponList" @changeCoupon="changeCoupon"/>
|
||||
<TicketItem v-if="createTicketType" :in-list-data="partList" item-type="part" @tableData="partData" :coupon-list="couponList" @changeCoupon="changeCoupon"
|
||||
<TicketItem item-type="project" :in-list-data="projectList" @tableData="projectData" ref="projectTable"
|
||||
:coupon-list="couponList" @changeCoupon="changeCoupon"/>
|
||||
<TicketItem v-if="createTicketType" :in-list-data="partList" item-type="part" @tableData="partData"
|
||||
:coupon-list="couponList" @changeCoupon="changeCoupon"
|
||||
ref="partTable"/>
|
||||
<TicketItem v-if="createTicketType" :in-list-data="otherList" item-type="other" @tableData="otherData" :coupon-list="couponList" @changeCoupon="changeCoupon"
|
||||
<TicketItem v-if="createTicketType" :in-list-data="otherList" item-type="other" @tableData="otherData"
|
||||
:coupon-list="couponList" @changeCoupon="changeCoupon"
|
||||
ref="otherTable"/>
|
||||
<el-row :gutter="createTicketType ? 2 : 3" style="margin-top: 1rem">
|
||||
<el-col :span="createTicketType ? 12 : 16">
|
||||
@ -379,8 +383,8 @@
|
||||
</el-descriptions>
|
||||
</el-col>
|
||||
<el-col :span="12" style="margin-top:1rem;display: flex;justify-content: right">
|
||||
<el-button type="success" @click="handleSave">完成</el-button>
|
||||
<el-button type="danger" @click="handlePaid">结算</el-button>
|
||||
<el-button type="success" @click="handleSave" :disabled="isEnable">完成</el-button>
|
||||
<el-button type="danger" @click="handlePaid" :disabled="isEnable">结算</el-button>
|
||||
<!-- <el-button type="primary">通知施工</el-button>-->
|
||||
<!-- <el-button type="primary">领料</el-button>-->
|
||||
<!-- <el-button type="primary">退料</el-button>-->
|
||||
@ -416,13 +420,20 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
selectUser(val) {
|
||||
if (!val) {
|
||||
this.selectUser = {}
|
||||
if (val) {
|
||||
this.selectCar = {}
|
||||
this.bookingList = []
|
||||
this.couponList = []
|
||||
if (val.userId) {
|
||||
this.getBooking(val.userId)
|
||||
}
|
||||
if (val.id) {
|
||||
this.getCouponList(val.id)
|
||||
}
|
||||
} else {
|
||||
this.selectCar = {}
|
||||
this.bookingList = []
|
||||
this.couponList = []
|
||||
}else {
|
||||
this.getBooking(val.userId)
|
||||
this.getCouponList(val.id)
|
||||
}
|
||||
},
|
||||
selectCar(val) {
|
||||
@ -433,6 +444,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isEnable: false,
|
||||
formData: {
|
||||
endCheck: 1,
|
||||
partDisposal: '01',
|
||||
@ -483,7 +495,7 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getCouponList(id){
|
||||
async getCouponList(id) {
|
||||
const res = await CustomerMainApi.getCustomerMain(id);
|
||||
this.couponList = res.data.couponList
|
||||
this.finaCouponList = [
|
||||
@ -548,6 +560,7 @@ export default {
|
||||
},
|
||||
// 登记保存
|
||||
async handleSave() {
|
||||
this.isEnable = true
|
||||
this.createInit()
|
||||
this.createItemInit()
|
||||
try {
|
||||
@ -557,6 +570,7 @@ export default {
|
||||
} catch {
|
||||
} finally {
|
||||
this.formData.ticketNo = null
|
||||
this.isEnable = false
|
||||
}
|
||||
},
|
||||
// 初始化
|
||||
@ -714,16 +728,16 @@ export default {
|
||||
this.handleSave()
|
||||
},
|
||||
// 查看用户的预约记录
|
||||
async getBooking(userId){
|
||||
async getBooking(userId) {
|
||||
const res = await request({
|
||||
url: "/repair/booking/list?userId=" + userId,
|
||||
method: "get"
|
||||
})
|
||||
this.bookingList = res.data
|
||||
console.log(this.bookingList,723)
|
||||
// console.log(this.bookingList,723)
|
||||
},
|
||||
// 权益更改
|
||||
changeCoupon(data){
|
||||
changeCoupon(data) {
|
||||
this.finaCouponList.map(item => {
|
||||
item.isChoose = data.includes(item)
|
||||
})
|
||||
@ -739,7 +753,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.top-left{
|
||||
.top-left {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user