数据都在formData.value里面自行修改即可
useFun.setPropConfig('sales_id', { change: async ({ value }) => { if (value) { // 获取销售单的数据 const orderData = await useFun.requestApi('post', `/jeelowcode/dbform-data/detail/1951502190357168130/${value}`); tableForm.value.salesperson_id = orderData.salesperson_id; tableForm.value.customer_id = orderData.customer_id tableForm.value.total_amount = orderData.total_amount // 把销售单中明细数据添加到销售退单的明细表中 const subTable = subTableRef.value.tbl_sales_return_order_items; tableForm.value.tbl_sales_return_order_items = []; orderData.jeelowcode_subtable_data.tbl_sales_order_items.forEach((item, index) => { tableForm.value.tbl_sales_return_order_items.push({ id: index, product_id: item.product_id, quantity: item.quantity, price: item.price, total: item.total, product_spec: item.product_spec, $cellEdit: true }) }) } } })
我正在参加 Gitee 2025 最受欢迎的年度开源软件投票活动,请为 JeeLowCode 投上宝贵一票。
数据都在formData.value里面自行修改即可