Browse Source

将采购收货申请得缺货明细变成采购收货记录里面的

master
zhang_li 11 months ago
parent
commit
1da0f9e574
  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

@ -91,3 +91,13 @@ export const exportPurchasereceiptRecordDetail = async (params) => {
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/wms/purchasereceipt-record-detail/get-import-template' }) 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 }) 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 // 导出采购收货申请子 Excel
export const exportPurchasereceiptRequestDetail = async (params) => { export const exportPurchasereceiptRequestDetail = async (params) => {

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

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

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

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

Loading…
Cancel
Save