master
271556543@qq.com 3 years ago
parent e197b22273
commit bbf8abe0e6

@ -85,6 +85,13 @@ export default {
} }
this.$refs['elForm'].resetFields() this.$refs['elForm'].resetFields()
}, },
clearValidate(){
this.$emit('clearValidate')
if(this.type === 'normal'){
return
}
this.$refs['elForm'].clearValidate()
},
submit(){ submit(){
if(this.type === 'normal'){ if(this.type === 'normal'){
return return

@ -247,7 +247,7 @@
type="daterange" type="daterange"
:picker-options="pickerOptions" :picker-options="pickerOptions"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
@change="productPick"></el-date-picker> @change="computedDate"></el-date-picker>
</div> </div>
</div> </div>
</template> </template>
@ -749,8 +749,11 @@ export default {
this.pickedProduct = e this.pickedProduct = e
this.form1.product_id = e.id this.form1.product_id = e.id
this.form1.product_type_id = e.product_type_id this.form1.product_type_id = e.product_type_id
console.log(e)
if(this.form1.product_id && this.form1.date.length>0){ this.computedDate()
},
computedDate(){
if(this.form1.product_id && this.form1.date){
let times; let times;
let t1= moment(this.form1.date[0]) let t1= moment(this.form1.date[0])
let t2 = moment(this.form1.date[1]) let t2 = moment(this.form1.date[1])
@ -848,7 +851,7 @@ export default {
address: val[2], address: val[2],
lng: val[0], lng: val[0],
lat: val[1], lat: val[1],
default: 0, default: this.form.customer_address_list.length === 0 ? 1 : 0,
comment: '' comment: ''
}) })
} }

@ -300,7 +300,7 @@ export default {
this.form.product_id = e.id this.form.product_id = e.id
this.form.product_type_id = e.product_type_id this.form.product_type_id = e.product_type_id
console.log(e) console.log(e)
if(this.form.product_id && this.form.date.length>0){ if(this.form.product_id && this.form.date){
let times; let times;
let t1= moment(this.form.date[0]) let t1= moment(this.form.date[0])
let t2 = moment(this.form.date[1]) let t2 = moment(this.form.date[1])
@ -328,7 +328,7 @@ export default {
} }
}, },
datePick(){ datePick(){
if(this.form.product_id && this.form.date.length>0){ if(this.form.product_id && this.form.date){
let t1= moment(this.form.date[0]) let t1= moment(this.form.date[0])
let t2 = moment(this.form.date[1]) let t2 = moment(this.form.date[1])
let times = t2.diff(t1,'month') // let times = t2.diff(t1,'month') //

@ -80,7 +80,7 @@
range-separator="~" range-separator="~"
:picker-options="pickerOptions" :picker-options="pickerOptions"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
@change="productPick"></el-date-picker> @change="computedData"></el-date-picker>
</div> </div>
</div> </div>
</template> </template>
@ -305,11 +305,14 @@ export default {
this.pickedProduct = e this.pickedProduct = e
this.form.product_id = e.id this.form.product_id = e.id
this.form.product_type_id = e.product_type_id this.form.product_type_id = e.product_type_id
console.log(e)
if(this.form.service_times || this.form.form.total_money || this.form.unit_price || this.form.total_time){ this.computedData()
},
computedData(){
if(this.form.service_times || this.form.total_money || this.form.unit_price || this.form.total_time){
return return
} }
if(this.form.product_id && this.form.date.length>0){ if(this.form.product_id && this.form.date){
let times; let times;
let t1= moment(this.form.date[0]) let t1= moment(this.form.date[0])
let t2 = moment(this.form.date[1]) let t2 = moment(this.form.date[1])

@ -112,6 +112,18 @@
</div> </div>
</template> </template>
<template v-slot:process_total>
<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.process_total" :controls="false" :precision="0" clearable placeholder="请输入护工单价"
style="width: 300px;"/>
</div>
</div>
</template>
<template v-slot:type> <template v-slot:type>
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label"> <div class="xy-table-item-label">
@ -154,6 +166,7 @@ export default {
nurse_price: '', nurse_price: '',
service_rule:false, service_rule:false,
time_lenth: '', time_lenth: '',
process_total:'',
total:'', total:'',
}, },
rules: { rules: {

@ -125,6 +125,11 @@ export default {
} }
} }
}, },
{
prop:'process_total',
label:'需打卡次数',
width:140
}
] ]
} }
}, },

@ -62,6 +62,11 @@ export default {
minWidth:200, minWidth:200,
align:'left' align:'left'
}, },
{
label:'服务时长(分钟)',
prop:'time_lenth',
width: 160
},
{ {
prop:'sortnumber', prop:'sortnumber',
label:'排序', label:'排序',

@ -226,6 +226,11 @@ export default {
} }
}) })
}, },
toggleAll(){
this.skus.forEach(item => {
this.$refs['table'].toggleRowSelection(item)
})
},
submit() { submit() {
this.form.customer_id = this.customerId this.form.customer_id = this.customerId
@ -263,7 +268,13 @@ export default {
return item.default === 1 return item.default === 1
})[0]?.id || '' })[0]?.id || ''
this.toggleRow(this.form.schedule_list_skus) //
if(this.form.schedule_list_skus.length > 0){
this.toggleRow(this.form.schedule_list_skus)
}else{
this.toggleAll()
}
} else { } else {
this.$emit('update:date','') this.$emit('update:date','')
this.$refs['elForm'].resetFields() this.$refs['elForm'].resetFields()

Loading…
Cancel
Save