更新代码

This commit is contained in:
xiao-fajia 2024-09-25 17:34:42 +08:00
parent dd6490f5ff
commit d1b87c152c

View File

@ -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">-->
@ -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,14 +420,21 @@ export default {
},
watch: {
selectUser(val) {
if (!val) {
this.selectUser = {}
if (val) {
this.selectCar = {}
this.bookingList = []
this.couponList = []
}else {
if (val.userId) {
this.getBooking(val.userId)
}
if (val.id) {
this.getCouponList(val.id)
}
} else {
this.selectCar = {}
this.bookingList = []
this.couponList = []
}
},
selectCar(val) {
if (!val) {
@ -433,6 +444,7 @@ export default {
},
data() {
return {
isEnable: false,
formData: {
endCheck: 1,
partDisposal: '01',
@ -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
}
},
//
@ -720,7 +734,7 @@ export default {
method: "get"
})
this.bookingList = res.data
console.log(this.bookingList,723)
// console.log(this.bookingList,723)
},
//
changeCoupon(data) {