Commit 62a050ca authored by v_liuhuaizhi's avatar v_liuhuaizhi

挂号管理--新增

parent 3aa4e9fd
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
size="mini" size="mini"
style="width: 50px; border-radius: 6px 6px 6px 6px;border: 1px solid rgb(95,181,75);" style="width: 50px; border-radius: 6px 6px 6px 6px;border: 1px solid rgb(95,181,75);"
type="success" type="success"
@click="handleView(scope.row)" @click="addReservation(scope.row)"
>立即预约 >立即预约
</el-button> </el-button>
</template> </template>
...@@ -144,29 +144,21 @@ export default { ...@@ -144,29 +144,21 @@ export default {
this.petsList = response.rows.rows this.petsList = response.rows.rows
}) })
}, },
/** 立即预约按钮,把对象传给新增接口 */
handleView(row) {
this.addReservation(row)
},
// 新增预约接口 // 新增预约接口
addReservation(data, doctorForm, singleDoctor) { addReservation(data) {
console.log('gggggg', this.data, this.doctorForm, this.singleDoctor) console.log('gggggg', data, this.doctorForm, this.singleDoctor)
const temp = { const temp = {
// 当前行的数据 petOwnersName: data.petOwnersName
data: this.data,
// 宠主宠物的信息
form: this.doctorForm,
// 医生详情的信息
single: this.singleDoctor
} }
console.log('KKKKKKKKKKKKKKK', temp)
// 将整个界面对象传新增挂号接口 // 将整个界面对象传新增挂号接口
addRegister(temp).then(response => { // addRegister(temp).then(response => {
this.$message({ // this.$message({
type: 'success', // type: 'success',
message: '预约成功!' // message: '预约成功!'
}) // })
this.$emit('registerModleClose', false) // this.$emit('registerModleClose', false)
}) // })
}, },
submit() { submit() {
}, },
......
...@@ -219,7 +219,7 @@ ...@@ -219,7 +219,7 @@
<register-modle :is-show="showRegistrationModle" :doctor-id="doctorIdNd" :doctor-form="test" :registration-type="registrationType" :single-doctor="singleDoctor" @registerModleClose="closeRegisterModle" /> <register-modle :is-show="showRegistrationModle" :doctor-id="doctorIdNd" :doctor-form="test" :registration-type="registrationType" :single-doctor="singleDoctor" @registerModleClose="closeRegisterModle" />
<!-- 选择宠物--> <!-- 选择宠物-->
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button class="queryBtn" icon="el-icon-check" @click="submitForm">提 交</el-button> <el-button class="queryBtn" icon="el-icon-check" @click="submitForm">提 交</el-button>
<el-button class="resetBtn" icon="el-icon-back" @click="cancel">返 回</el-button> <el-button class="resetBtn" icon="el-icon-back" @click="cancel">返 回</el-button>
</div> </div>
</div> </div>
...@@ -402,8 +402,9 @@ export default { ...@@ -402,8 +402,9 @@ export default {
this.showRegistrationModle = true this.showRegistrationModle = true
this.doctorIdNd = params.id this.doctorIdNd = params.id
this.registrationType = params.type this.registrationType = params.type
this.singleDoctor = params.dat this.singleDoctor = params.data
this.test = {...this.form} this.test = { ...this.form }
console.log('this.form', this.form)
}, },
/** 关闭挂号回调*/ /** 关闭挂号回调*/
closeRegisterModle() { closeRegisterModle() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment