Commit 5bc87b55 authored by 高宇's avatar 高宇

完善代码功能;

parent 99747fd6
......@@ -50,8 +50,8 @@
close (getList) {
this.$emit('close', getList)
},
init () {
this.$refs.operationProject.initAdd()
init (clientId) {
this.$refs.operationProject.initAdd(clientId)
}
},
created () {
......
......@@ -331,12 +331,12 @@
this.Projects.invoices.push({key: 'new', name: ''})
}
},
initAdd () {
if (this.$route.params.id) {
this.Projects.client_id = this.$route.params.id
initAdd (clientId) {
if (clientId) {
this.Projects.client_id = clientId
requestAPI(api.getClient, {
data: {
id: this.$route.params.id
id: clientId
}
}).then(res => {
this.searchText = res.model.name
......
......@@ -71,7 +71,7 @@
</div>
</div>
<side-popup ref="sidePopup" :title="operationTitle">
<component :is="operationPage" :ref="operationPage" @close="close"></component>
<component :is="operationPage" :ref="operationPage" @close="getList => {close(getList)}"></component>
</side-popup>
</section>
</template>
......@@ -235,8 +235,11 @@
this.$refs.sidePopup.show(this.$refs[this.operationPage].init(row.id, row.client_id))
})
},
close () {
close (getList) {
this.$refs.sidePopup.close()
if (getList) {
this.getList()
}
},
getList () {
if (this.loading) {
......
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