This commit is contained in:
PQZ 2024-09-25 17:44:03 +08:00
commit 56ae63493d

View File

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