|
@@ -307,27 +307,30 @@ export default {
|
|
|
|
|
|
// 详情
|
|
|
details(record) {
|
|
|
- this.$refs.addPreBookDrawer.visible = true
|
|
|
+
|
|
|
// console.log('点击项的ID', record.id)
|
|
|
preBookById({ id: record.id }).then(res => {
|
|
|
if (res.success) {
|
|
|
- console.log('点击的对象', res.result)
|
|
|
// 把通过id查询到的对象,赋值给子组件
|
|
|
- this.$refs.addPreBookDrawer.preBookDetails = res.result //主表
|
|
|
- this.$refs.addPreBookDrawer.data = res.result.syLetterDepositItemList //子表
|
|
|
+ this.$refs.detailsPreBookDrawer.preBookDetails = res.result; //主表
|
|
|
+ this.$refs.detailsPreBookDrawer.data = res.result.syLetterDepositItemList; //子表
|
|
|
+ this.$refs.detailsPreBookDrawer.visible = true
|
|
|
+ }else{
|
|
|
+ this.$message.error(res.message)
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
|
|
|
// 编辑
|
|
|
edit(record) {
|
|
|
- this.$refs.editPreBookDrawer.visible = true
|
|
|
+
|
|
|
preBookById({ id: record.id }).then(res => {
|
|
|
if (res.success) {
|
|
|
- console.log('编辑对象', res.result)
|
|
|
- // console.log('子表信息', res.result.syShippingDetailsItemList)
|
|
|
- this.$refs.editPreBookDrawer.editPreBook = res.result
|
|
|
- this.$refs.editPreBookDrawer.data = res.result.syLetterDepositItemList
|
|
|
+ this.$refs.addPreBookDrawer.addPreBook = res.result;
|
|
|
+ this.$refs.addPreBookDrawer.data = res.result.syLetterDepositItemList;
|
|
|
+ this.$refs.editPreBookDrawer.visible = true
|
|
|
+ }else{
|
|
|
+ this.$message.error(res.message)
|
|
|
}
|
|
|
})
|
|
|
},
|