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

完善代码功能;

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