陈薪名 11 months ago
parent
commit
db56bb11a8
  1. 10
      src/api/wms/purchasereceiptRecordDetail/index.ts
  2. 11
      src/api/wms/purchasereceiptRequestDetail/index.ts
  3. 21
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue
  4. 21
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue

10
src/api/wms/purchasereceiptRecordDetail/index.ts

@ -90,4 +90,14 @@ export const exportPurchasereceiptRecordDetail = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/purchasereceipt-record-detail/get-import-template' })
}
// 缺货明细
export const getScarceGoodsDetailPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/purchaseshortage-detail/senior', data })
} else {
return await request.get({ url: `/wms/purchaseshortage-detail/page`, params })
}
}

11
src/api/wms/purchasereceiptRequestDetail/index.ts

@ -65,16 +65,7 @@ export const deletePurchasereceiptRequestDetail = async (id: number) => {
return await request.delete({ url: `/wms/purchasereceipt-request-detail/delete?id=` + id })
}
// 缺货明细
export const getScarceGoodsDetailPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/purchaseshortage-detail/senior', data })
} else {
return await request.get({ url: `/wms/purchaseshortage-detail/page`, params })
}
}
// 导出采购收货申请子 Excel
export const exportPurchasereceiptRequestDetail = async (params) => {

21
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue

@ -54,9 +54,11 @@
ref="detailRef"
:isBasic="false"
:allSchemas="PurchasereceiptRecordMain.allSchemas"
:detailAllSchemas="PurchasereceiptRecordDetail.allSchemas"
:detailAllSchemas="detailAllSchemas"
:detailAllSchemasRules="PurchasereceiptRecordDetailRules"
:apiPage="PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPage"
:apiPage="apiPage"
:tabs="PurchasereceiptRequestTabsList"
@changeTabs="changeTabs"
/>
</template>
@ -66,10 +68,13 @@ import { PurchasereceiptRecordMain,PurchasereceiptRecordMainRules,Purchasereceip
import * as PurchasereceiptRecordMainApi from '@/api/wms/purchasereceiptRecordMain'
import * as PurchasereceiptRecordDetailApi from '@/api/wms/purchasereceiptRecordDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { PurchasereceiptRequestTabsList } from '@/utils/disposition/tabsList'
//
defineOptions({ name: 'PurchasereceiptRecordMain' })
const apiPage = ref(PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPage)
const message = useMessage() //
const { t } = useI18n() //
@ -77,6 +82,7 @@ const route = useRoute() // 路由信息
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(PurchasereceiptRecordMain.allSchemas.tableColumns)
const detailAllSchemas = ref(PurchasereceiptRecordDetail.allSchemas)
//
const updataTableColumns = (val) => {
@ -154,6 +160,17 @@ const searchFormClick = (searchData) => {
}
getList() //
}
// tabs
const changeTabs = (data) =>{
if(data.prop == 'receiptDetail'){
console.log(data)
apiPage.value = PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPage
detailAllSchemas.value = PurchasereceiptRecordDetail.allSchemas
}else if(data.prop == 'scarceGoodsDetail'){
apiPage.value = PurchasereceiptRecordDetailApi.getScarceGoodsDetailPage
detailAllSchemas.value = PurchasereceiptRecordDetail.allSchemas
}
}
/** 初始化 **/
onMounted(async () => {

21
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue

@ -68,9 +68,7 @@
:apiPage="apiPage"
:apiDelete="PurchasereceiptRequestDetailApi.deletePurchasereceiptRequestDetail"
:Echo="Echo"
:tabs="PurchasereceiptRequestTabsList"
@searchTableSuccessDetail="searchTableSuccessDetail"
@changeTabs="changeTabs"
/>
<!-- 导入 -->
@ -83,7 +81,6 @@ import { PurchasereceiptRequestMain,PurchasereceiptRequestMainRules,Purchaserece
import * as PurchasereceiptRequestMainApi from '@/api/wms/purchasereceiptRequestMain'
import * as PurchasereceiptRequestDetailApi from '@/api/wms/purchasereceiptRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { PurchasereceiptRequestTabsList } from '@/utils/disposition/tabsList'
//
defineOptions({ name: 'PurchasereceiptRequestMain' })
@ -368,15 +365,15 @@ const searchFormClick = (searchData) => {
}
// tabs
const changeTabs = (data) =>{
if(data.prop == 'receiptDetail'){
apiPage.value = PurchasereceiptRequestDetailApi.getPurchasereceiptRequestDetailPage
detailAllSchemas.value = PurchasereceiptRequestDetail.allSchemas
}else if(data.prop == 'scarceGoodsDetail'){
apiPage.value = PurchasereceiptRequestDetailApi.getScarceGoodsDetailPage
detailAllSchemas.value = PurchasereceiptRequestDetail.allSchemas
}
}
// const changeTabs = (data) =>{
// if(data.prop == 'receiptDetail'){
// apiPage.value = PurchasereceiptRequestDetailApi.getPurchasereceiptRequestDetailPage
// detailAllSchemas.value = PurchasereceiptRequestDetail.allSchemas
// }else if(data.prop == 'scarceGoodsDetail'){
// apiPage.value = PurchasereceiptRequestDetailApi.getScarceGoodsDetailPage
// detailAllSchemas.value = PurchasereceiptRequestDetail.allSchemas
// }
// }
/** 初始化 **/
onMounted(async () => {

Loading…
Cancel
Save