|
|
|
|
@ -68,53 +68,53 @@
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<template v-slot:service_times>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>服务次数:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-input-number v-model="form.service_times" :controls="false" :precision="0"
|
|
|
|
|
placeholder="请输入服务次数" style="width: 300px;" @blur="totalComputed"/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<!-- <template v-slot:service_times>-->
|
|
|
|
|
<!-- <div class="xy-table-item">-->
|
|
|
|
|
<!-- <div class="xy-table-item-label">-->
|
|
|
|
|
<!-- <span style="color: red;font-weight: 600;padding-right: 4px;">*</span>服务次数:-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- <div class="xy-table-item-content">-->
|
|
|
|
|
<!-- <el-input-number v-model="form.service_times" :controls="false" :precision="0"-->
|
|
|
|
|
<!-- placeholder="请输入服务次数" style="width: 300px;" @blur="totalComputed"/>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
|
|
|
|
|
<template v-slot:unit_price>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>单次单价:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content xy-table-item-price">
|
|
|
|
|
<el-input-number v-model="form.unit_price" :controls="false" :precision="2"
|
|
|
|
|
placeholder="请输入单次单价" style="width: 300px;" @blur="totalComputed"/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<!-- <template v-slot:unit_price>-->
|
|
|
|
|
<!-- <div class="xy-table-item">-->
|
|
|
|
|
<!-- <div class="xy-table-item-label">-->
|
|
|
|
|
<!-- <span style="color: red;font-weight: 600;padding-right: 4px;">*</span>单次单价:-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- <div class="xy-table-item-content xy-table-item-price">-->
|
|
|
|
|
<!-- <el-input-number v-model="form.unit_price" :controls="false" :precision="2"-->
|
|
|
|
|
<!-- placeholder="请输入单次单价" style="width: 300px;" @blur="totalComputed"/>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
|
|
|
|
|
<template v-slot:total_time>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>总计时长:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content xy-table-item-min">
|
|
|
|
|
<el-input-number :controls="false" v-model="form.total_time"
|
|
|
|
|
placeholder="请输入总计时长" style="width: 300px;"/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<!-- <template v-slot:total_time>-->
|
|
|
|
|
<!-- <div class="xy-table-item">-->
|
|
|
|
|
<!-- <div class="xy-table-item-label">-->
|
|
|
|
|
<!-- <span style="color: red;font-weight: 600;padding-right: 4px;">*</span>总计时长:-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- <div class="xy-table-item-content xy-table-item-min">-->
|
|
|
|
|
<!-- <el-input-number :controls="false" v-model="form.total_time"-->
|
|
|
|
|
<!-- placeholder="请输入总计时长" style="width: 300px;"/>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
|
|
|
|
|
<template v-slot:total_money>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>总计金额:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content xy-table-item-price">
|
|
|
|
|
<el-input-number :precision="2" :controls="false" v-model="form.total_money"
|
|
|
|
|
placeholder="请输入总计金额" style="width: 300px;"/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<!-- <template v-slot:total_money>-->
|
|
|
|
|
<!-- <div class="xy-table-item">-->
|
|
|
|
|
<!-- <div class="xy-table-item-label">-->
|
|
|
|
|
<!-- <span style="color: red;font-weight: 600;padding-right: 4px;">*</span>总计金额:-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- <div class="xy-table-item-content xy-table-item-price">-->
|
|
|
|
|
<!-- <el-input-number :precision="2" :controls="false" v-model="form.total_money"-->
|
|
|
|
|
<!-- placeholder="请输入总计金额" style="width: 300px;"/>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
|
|
|
|
|
<template v-slot:account_id>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
@ -326,12 +326,25 @@ export default {
|
|
|
|
|
this.form.total_time = this.pickedProduct.total
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
console.log(this.form)
|
|
|
|
|
},
|
|
|
|
|
datePick(){
|
|
|
|
|
if(this.form.product_id && this.form.date){
|
|
|
|
|
let t1= moment(this.form.date[0])
|
|
|
|
|
let t2 = moment(this.form.date[1])
|
|
|
|
|
let times = t2.diff(t1,'month') //几个周期
|
|
|
|
|
let unit;
|
|
|
|
|
switch (this.pickedProduct.cycle){
|
|
|
|
|
case 1:
|
|
|
|
|
unit = 'year'
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
unit = 'month'
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
unit = 'week'
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
let times = t2.diff(t1,unit) //几个周期
|
|
|
|
|
this.form.service_times = this.pickedProduct.frequency * times
|
|
|
|
|
this.form.total_money = Number(this.pickedProduct.purchase_price) * this.form.service_times
|
|
|
|
|
this.form.unit_price = Number(this.pickedProduct.purchase_price)
|
|
|
|
|
@ -341,6 +354,8 @@ export default {
|
|
|
|
|
this.form.total_time = this.pickedProduct.total * times
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
console.log(this.form)
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
submit() {
|
|
|
|
|
|