+
+
+ handleRadioClick(item, e)"
+ >{{ item.cgdNo }}
+
+
- 总金额:{{ handlePriceFormat(zongJinE || zongJinECalc) }} 元
+ 订单金额:{{ handlePriceFormat(xiaoji) }} 元
- 单位:元
+
@@ -28,6 +34,7 @@ import { useListPage } from '/@/hooks/system/useListPage';
import { listAndJh } from '../../cgd/NuInvoicingCgdInfo.api';
import { wlColumns } from './cgd.data';
import { any } from 'vue-types';
+import { defHttp } from '/@/utils/http/axios';
// 定义props
const props = defineProps({
@@ -47,6 +54,9 @@ const zongJinECalc = ref()
const emit = defineEmits(['total-amount-change']);
const queryParam = reactive({});
+const ddNo = ref('');
+const ddList = ref([]);
+const xiaoji = ref('');
// 注册table数据
const { tableContext } = useListPage({
@@ -66,7 +76,8 @@ const { tableContext } = useListPage({
fixed: 'right',
},
beforeFetch: async (params) => {
- queryParam.cgdId = props.cgdId;
+ queryParam.cgdId = ddNo.value;
+ console.log("🚀 ~ ddNo.value:", ddNo.value)
return Object.assign(params, queryParam);
},
afterFetch: (data) => {
@@ -75,6 +86,8 @@ const { tableContext } = useListPage({
const totalAmount = data[0].zongJinE || '';
zongJinECalc.value = totalAmount
emit('total-amount-change', totalAmount);
+
+ xiaoji.value = data[0].zongJinE
}
return data;
}
@@ -83,10 +96,26 @@ const { tableContext } = useListPage({
const [registerTable, { reload, setLoading }] = tableContext;
+function handleRadioClick(item, e) {
+ ddNo.value = item.id
+ queryParam.ddNo = item.id
+ reload()
+}
// 监听cgdId变化,重新加载数据
watch(() => props.cgdId, (newCgdId) => {
if (newCgdId) {
- reload();
+ //获取订单号
+ defHttp.get({ url: '/cgd/nuInvoicingCgdInfo/getFkdList', params: { pkId: newCgdId} }).then(res => {
+ console.log("🚀 ~ res:", res)
+ // ddNo.value = res.data;
+ ddList.value = res;
+ if(res.length > 0){
+ ddNo.value = res[0].id
+ }
+ queryParam.cgdNo = ddNo.value
+ reload();
+ });
+
}
});
@@ -102,6 +131,7 @@ function handlePriceFormat(text) {
}
}
+
// 暴露方法给父组件
defineExpose({
reload
diff --git a/src/views/invoicing/fkd/components/NuInvoicingFkdMainForm.vue b/src/views/invoicing/fkd/components/NuInvoicingFkdMainForm.vue
index 693aaf4..5b93a68 100644
--- a/src/views/invoicing/fkd/components/NuInvoicingFkdMainForm.vue
+++ b/src/views/invoicing/fkd/components/NuInvoicingFkdMainForm.vue
@@ -1,6 +1,6 @@
-
+
@@ -18,7 +18,7 @@
-
+
@@ -30,7 +30,7 @@