From 7b9d8e407be70d2b4c57808b2ebf640d870280bd Mon Sep 17 00:00:00 2001
From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com>
Date: Wed, 12 Jun 2024 19:16:38 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E5=8F=91?=
=?UTF-8?q?=E7=A5=A8=E7=94=B3=E8=AF=B7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../wms/supplierinvoiceRequestDetail/index.ts | 2 +-
src/components/Detail/src/Detail.vue | 25 +++++++++++++++----
.../supplierinvoiceRequestMain/index.vue | 13 +++++++++-
3 files changed, 33 insertions(+), 7 deletions(-)
diff --git a/src/api/wms/supplierinvoiceRequestDetail/index.ts b/src/api/wms/supplierinvoiceRequestDetail/index.ts
index 7cbc9a250..0dd4c5343 100644
--- a/src/api/wms/supplierinvoiceRequestDetail/index.ts
+++ b/src/api/wms/supplierinvoiceRequestDetail/index.ts
@@ -51,7 +51,7 @@ export const getSupplierinvoiceRequestDetail = async (id: number) => {
}
// 新增供应商发票申请子
-export const createSupplierinvoiceRequestDetail = async (data: SupplierinvoiceRequestDetailVO) => {
+export const createSupplierinvoiceRequestDetail = async (data) => {
return await request.post({ url: `/wms/supplierinvoice-request-detail/create`, data })
}
diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue
index 47be4fccd..1477668af 100644
--- a/src/components/Detail/src/Detail.vue
+++ b/src/components/Detail/src/Detail.vue
@@ -394,7 +394,13 @@ const props = defineProps({
type:Array,
required: false,
default: () => []
- }
+ },
+ //主表单独操作--明细左上角新增按钮
+ mainSubmitCreateApi:{
+ type: Boolean,
+ required: false,
+ default: false
+ },
})
const isShowDrawer = ref(false)
const detailLoading = ref(false)
@@ -676,7 +682,10 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
}
}
}
-defineExpose({ openDetail, formRef }) // 提供 open 方法,用于打开弹窗
+const updateList = ()=>{
+ getList()
+}
+defineExpose({ openDetail, formRef ,updateList}) // 提供 open 方法,用于打开弹窗
// 获取备注列表
const getRemarkList = async () => {
@@ -875,13 +884,19 @@ const submitForm = async (formType, data) => {
const searchTableSuccess1 = (formField, searchField, val, formRef) => {
searchTableFormModel.value[formField] = val.map(item=>item[searchField]).join(',')
console.log('searchTableSuccess1',searchTableFormModel)
- submitForm(searchTableFormType.value,searchTableFormModel.value)
- emit('searchTableSuccessDetail', formField, searchField, val, formRef)
+ if(props.mainSubmitCreateApi){
+ emit('searchTableSuccessDetail', formField, searchField, val, formRef,searchTableFormModel.value)
+ }else{
+ submitForm(searchTableFormType.value,searchTableFormModel.value)
+ emit('searchTableSuccessDetail', formField, searchField, val, formRef)
+
+ }
}
// 查询页面返回
const searchTableSuccess = (formField, searchField, val, formRef) => {
emit('searchTableSuccessDetail', formField, searchField, val, formRef)
}
+
// 传递给父类
const emit = defineEmits([
'searchTableSuccessDetail',
@@ -893,7 +908,7 @@ const emit = defineEmits([
'onBlur',
'detailBasicFormOnChange',
'formFormDateChange',
- 'buttonBaseClick'
+ 'buttonBaseClick',
])
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue
index 73b36e684..17bd9efa9 100644
--- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue
+++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue
@@ -156,6 +156,8 @@
:detailButtonIsShowAdd="true"
@buttonBaseClick="detailButtonBaseClick"
@tableFormButton="tableFormButton"
+ :mainSubmitCreateApi="true"
+ @searchTableSuccessDetail="searchTableSuccessDetail"
>
{{ row.differencePrice }}
@@ -174,8 +176,8 @@
/>
-