|
|
@ -72,7 +72,7 @@ |
|
|
|
ref="detailRef" |
|
|
|
:isBasic="false" |
|
|
|
:allSchemas="PurchaseClaimRequestMain.allSchemas" |
|
|
|
:detailAllSchemas="PurchaseClaimRequestDetail.allSchemas" |
|
|
|
:detailAllSchemas="detailAllSchemas" |
|
|
|
:detailAllSchemasRules="PurchaseClaimRequestDetailRules" |
|
|
|
:apiCreate="PurchaseClaimRequestDetailApi.createPurchaseClaimRequestDetail" |
|
|
|
:apiUpdate="PurchaseClaimRequestDetailApi.updatePurchaseClaimRequestDetail" |
|
|
@ -80,6 +80,9 @@ |
|
|
|
:apiDelete="PurchaseClaimRequestDetailApi.deletePurchaseClaimRequestDetail" |
|
|
|
:detailButtonIsShowDelete="false" |
|
|
|
:detailButtonIsShowAdd="false" |
|
|
|
:detailButtonIsShowAddStatusArray="['1','2']" |
|
|
|
:isChangeDetailDrawer="['2']" |
|
|
|
@detailOpenForm="detailOpenForm" |
|
|
|
/> |
|
|
|
<!-- 导入 --> |
|
|
|
<ImportForm |
|
|
@ -92,6 +95,15 @@ |
|
|
|
:mode="2" |
|
|
|
:extend="businessType" |
|
|
|
/> |
|
|
|
<BasicForm |
|
|
|
ref="detailFormRef" |
|
|
|
:isOpenSearchTable="true" |
|
|
|
fieldTableColumn="itemCode" |
|
|
|
:rules="PurchaseClaimRequestMainRules" |
|
|
|
:formAllSchemas="PurchaseClaimRequestAmount.allSchemas" |
|
|
|
:isBusiness="false" |
|
|
|
@success="submitFormDetail" |
|
|
|
/> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
@ -100,7 +112,8 @@ import { |
|
|
|
PurchaseClaimRequestMain, |
|
|
|
PurchaseClaimRequestMainRules, |
|
|
|
PurchaseClaimRequestDetailRules, |
|
|
|
PurchaseClaimRequestDetail |
|
|
|
PurchaseClaimRequestDetail, |
|
|
|
PurchaseClaimRequestAmount |
|
|
|
} from './PurchaseClaimRequestMain.data' |
|
|
|
import * as PurchaseClaimRequestMainApi from '@/api/wms/PurchaseClaimRequestMain' |
|
|
|
import * as PurchaseClaimRequestDetailApi from '@/api/wms/purchaseClaimRequestDetail' |
|
|
@ -120,6 +133,8 @@ const tableColumns = ref([ |
|
|
|
...PurchaseClaimRequestMain.allSchemas.tableColumns, |
|
|
|
...PurchaseClaimRequestDetail.allSchemas.tableMainColumns |
|
|
|
]) |
|
|
|
const detailAllSchemas = ref(PurchaseClaimRequestDetail.allSchemas) |
|
|
|
|
|
|
|
const { tableObject, tableMethods } = useTable({ |
|
|
|
getListApi: PurchaseClaimRequestDetailApi.getPurchaseClaimRequestDetailPage // 分页接口 |
|
|
|
}) |
|
|
@ -384,7 +399,9 @@ const openForm = async (type: string, row?: any) => { |
|
|
|
} |
|
|
|
/** 详情操作 */ |
|
|
|
const detailRef = ref() |
|
|
|
const detailData = ref({}) |
|
|
|
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|
|
|
detailData.value = row |
|
|
|
detailRef.value.openDetail(row, titleName, titleValue, 'planDeliverMain') |
|
|
|
} |
|
|
|
|
|
|
@ -528,7 +545,32 @@ const searchFormClick = (searchData) => { |
|
|
|
} |
|
|
|
getList() // 刷新当前列表 |
|
|
|
} |
|
|
|
|
|
|
|
const detailFormRef = ref() |
|
|
|
const detailOpenForm = (type, row, masterParmas) => { |
|
|
|
// 自定义弹窗 |
|
|
|
if (masterParmas) { |
|
|
|
detailFormRef.value.open(type, row, masterParmas) |
|
|
|
} |
|
|
|
} |
|
|
|
// 审批中的时候详情的编辑提交 |
|
|
|
const submitFormDetail =async (formType,data) => { |
|
|
|
detailFormRef.value.formLoading = true |
|
|
|
try { |
|
|
|
if (formType === 'create') { |
|
|
|
await PurchaseClaimRequestDetailApi.createPurchaseClaimRequestDetail(data) |
|
|
|
message.success(t('common.createSuccess')) |
|
|
|
} else { |
|
|
|
await PurchaseClaimRequestDetailApi.updatePurchaseClaimRequestDetail(data) |
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
} |
|
|
|
console.log(detailRef.value.formRef.dialogVisible) |
|
|
|
detailFormRef.value.dialogVisible = false |
|
|
|
detailRef.value.updateList() |
|
|
|
} catch { |
|
|
|
detailFormRef.value.formLoading = false |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
/** 初始化 **/ |
|
|
|
onMounted(async () => { |
|
|
|
getList() |
|
|
|