Browse Source

供应商发票申请

master_hella_20240701
yufei0306 5 months ago
parent
commit
7b9d8e407b
  1. 2
      src/api/wms/supplierinvoiceRequestDetail/index.ts
  2. 25
      src/components/Detail/src/Detail.vue
  3. 13
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

2
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 })
}

25
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) => {

13
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

@ -156,6 +156,8 @@
:detailButtonIsShowAdd="true"
@buttonBaseClick="detailButtonBaseClick"
@tableFormButton="tableFormButton"
:mainSubmitCreateApi="true"
@searchTableSuccessDetail="searchTableSuccessDetail"
>
<template #differencePrice="{row}">
<span :class="{'red-text':row.differencePrice!=0}">{{ row.differencePrice }}</span>
@ -174,8 +176,8 @@
/>
</template>
<script setup lang="ts">
//
import download from '@/utils/download'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { SupplierinvoiceRequestMain,
@ -233,6 +235,15 @@ const getSelectionRows = (currentPage,currentPageSelectionRows) => {
})
}
}
const searchTableSuccessDetail = async (formField, searchField, val, formRef,searchTableFormModel)=>{
console.log('详情',formField, searchField, val, formRef,searchTableFormModel)
let res = await SupplierinvoiceRequestDetailApi.createSupplierinvoiceRequestDetail({
masterId:searchTableFormModel.masterId,
subList:val
})
detailRef.value.updateList()
}
//
const searchTableSuccess = (formField, searchField, val, searchFormRef, type, row) => {

Loading…
Cancel
Save