From 15afeabad6dc6d5cf4cb8459e176d499048cdd08 Mon Sep 17 00:00:00 2001
From: yangjun <1173114630@qq.com>
Date: Fri, 17 Oct 2025 15:35:48 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=9B=E9=94=80=E5=AD=98?=
=?UTF-8?q?=E9=80=BB=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/invoicing/jxc/JxcInfo.api.ts | 2 +
.../jxc/components/CgPriviewForm.vue | 125 ++++++++++++++++++
.../jxc/components/CgPriviewModal.vue | 72 ++++++++++
.../invoicing/jxc/components/QgcList.vue | 22 ++-
4 files changed, 216 insertions(+), 5 deletions(-)
create mode 100644 src/views/invoicing/jxc/components/CgPriviewForm.vue
create mode 100644 src/views/invoicing/jxc/components/CgPriviewModal.vue
diff --git a/src/views/invoicing/jxc/JxcInfo.api.ts b/src/views/invoicing/jxc/JxcInfo.api.ts
index 4c3b9ae..5d42a31 100644
--- a/src/views/invoicing/jxc/JxcInfo.api.ts
+++ b/src/views/invoicing/jxc/JxcInfo.api.ts
@@ -12,6 +12,7 @@ enum Api {
addList='/invoicing/qgdInfo/addList',
queryListByUser='/invoicing/qgdInfo/queryListByUser',
addCgdByUser='/invoicing/qgdInfo/addCgdByUser',
+ saveCgd='/invoicing/qgdInfo/saveCgd',
}
@@ -26,6 +27,7 @@ export const list = (params) => defHttp.get({ url: Api.list, params });
*/
export const queryListByUser = (params) => defHttp.get({ url: Api.queryListByUser, params });
export const addCgdByUser = (params) => defHttp.post({ url: Api.addCgdByUser, params });
+export const saveCgd = (params) => defHttp.post({ url: Api.saveCgd, params });
/**
* 删除单个
diff --git a/src/views/invoicing/jxc/components/CgPriviewForm.vue b/src/views/invoicing/jxc/components/CgPriviewForm.vue
new file mode 100644
index 0000000..be77ed1
--- /dev/null
+++ b/src/views/invoicing/jxc/components/CgPriviewForm.vue
@@ -0,0 +1,125 @@
+
+
+
+
+
+ 采购单
+
+
+
+ 供应商:{{item.gysName}}
+
+
+ 采购单号:{{item.cgdNo}}
+
+
+ 采购人:{{item.gysLxr}}
+
+
+ 采购金额:{{item.totalPrice}} 元
+
+
+
+
+ 采购数量:{{item2.purchaseQuantity}}
+
+
+ 采购金额:{{item2.totalPrice}}
+
+
+ {{item2.tagName}}
+
+
+ 商品名称:{{item2.wlName}}
+
+
+
+
+
+
+ 规格型号:{{item2.wlMaterialNo}}
+ 采购单位:{{item2.wlUnits}}
+ 库存数量:{{item2.kcsl}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/invoicing/jxc/components/CgPriviewModal.vue b/src/views/invoicing/jxc/components/CgPriviewModal.vue
new file mode 100644
index 0000000..3616b62
--- /dev/null
+++ b/src/views/invoicing/jxc/components/CgPriviewModal.vue
@@ -0,0 +1,72 @@
+
+
+
+
+ 关闭
+ 确认
+
+
+
+
+
+
+
+
diff --git a/src/views/invoicing/jxc/components/QgcList.vue b/src/views/invoicing/jxc/components/QgcList.vue
index d3a997b..bd21b35 100644
--- a/src/views/invoicing/jxc/components/QgcList.vue
+++ b/src/views/invoicing/jxc/components/QgcList.vue
@@ -22,7 +22,7 @@
-
+
@@ -38,6 +38,7 @@
+
@@ -53,6 +54,8 @@
import { DownOutlined } from '@ant-design/icons-vue';
import { defHttp } from '/@/utils/http/axios';
import QgdInfoModal from '/@/views/invoicing/jxc/components/QgdInfoModal.vue'
+ import CgPriviewModal from '/@/views/invoicing/jxc/components/CgPriviewModal.vue'
+ import { useMessage } from '/@/hooks/web/useMessage';
const formRef = ref();
@@ -61,6 +64,7 @@ import { defHttp } from '/@/utils/http/axios';
const registerModal = ref();
const qgcOpen = ref(false)//请购车抽屉
const count = ref(5);
+ const { createMessage } = useMessage();
const emit = defineEmits(['register', 'success']);
//注册table数据
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
@@ -80,8 +84,7 @@ import { defHttp } from '/@/utils/http/axios';
},
},
});
- const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
- const labelCol = reactive({
+ const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys, selectedRows }] = tableContext; const labelCol = reactive({
xs:24,
sm:8,
xl:8,
@@ -151,8 +154,17 @@ const handleInputChange = (record, field, value) => {
}
async function submitForm(){
- await addCgdByUser(null);
- emit("success");
+ console.log("🚀 ~ submitForm ~ selectedRows:", selectedRows.value)
+ var list = selectedRows.value;
+ if(list.length == 0){
+ createMessage.error("请选择物料");
+ return;
+ }
+ var list2 = await addCgdByUser(selectedRows.value);
+ console.log("🚀 ~ submitForm ~ list2:", list2)
+ // emit("success");
+ registerModal.value.edit(list2);
+ registerModal.value.disableSubmit = false;
}