Browse Source

供应商发货申请修改

master_hella_20240701
zhaoxuebing 9 months ago
parent
commit
614939080f
  1. 7
      src/api/wms/supplierdeliverRecordMain/index.ts
  2. 18
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue
  3. 8
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

7
src/api/wms/supplierdeliverRecordMain/index.ts

@ -31,6 +31,8 @@ export interface SupplierdeliverRecordMainVO {
creator: string creator: string
serialNumber: string serialNumber: string
available: string available: string
purchasereceiptRequestFlag: boolean
purchasereceiptRequestNumber: string
} }
// 查询供应商发货记录主列表 // 查询供应商发货记录主列表
@ -78,3 +80,8 @@ export const exportSupplierdeliverRecordMain = async (params) => {
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/wms/supplierdeliver-record-main/get-import-template' }) return request.download({ url: '/wms/supplierdeliver-record-main/get-import-template' })
} }
// 创建采购申请
export const createPurchasereceiptRequest = async (number:string) => {
return await request.post({ url: `/wms/supplierdeliver-record-main/createPurchasereceiptRequest?number=`+number })
}

18
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue

@ -127,12 +127,28 @@ const buttonBaseClick = (val, item) => {
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
// defaultButtons.mainListGenerateApplicationBtn(null), // defaultButtons.mainListGenerateApplicationBtn({hasPermi:'wms:supplierdeliver-record-main:createPurchasereceiptRequest',hide:!row.purchasereceiptRequestFlag}), //
] ]
} }
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if(val == 'generateApplication'){
handlerCreatePurchasereceiptRequest(row.number)
}
}
/** 生成采购收货申请按钮操作 */
const handlerCreatePurchasereceiptRequest = async (number:string) => {
try{
await message.confirm(t('确认生成采购申请吗?'))
tableObject.loading = true
await SupplierdeliverRecordMainApi.createPurchasereceiptRequest(number)
message.success(t('采购申请生成成功'))
await getList()
}catch{}finally{
tableObject.loading = false
}
} }
/** 详情操作 */ /** 详情操作 */

8
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

@ -105,6 +105,7 @@ import * as SupplierdeliverRequestMainApi from '@/api/wms/supplierdeliverRequest
import * as SupplierdeliverRequestDetailApi from '@/api/wms/supplierdeliverRequestDetail' import * as SupplierdeliverRequestDetailApi from '@/api/wms/supplierdeliverRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import point from '@/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/point.vue' import point from '@/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/point.vue'
import * as SupplierdeliverRecordMainApi from '@/api/wms/supplierdeliverRecordMain'
// //
defineOptions({ name: 'SupplierdeliverRequestMain' }) defineOptions({ name: 'SupplierdeliverRequestMain' })
@ -465,8 +466,13 @@ const genRecords = async (id: number) => {
await message.confirm('是否处理所选中数据?') await message.confirm('是否处理所选中数据?')
tableObject.loading = true tableObject.loading = true
// //
await SupplierdeliverRequestMainApi.genRecordsSupplierdeliverRequestMain(id) await SupplierdeliverRequestMainApi.genRecordsSupplierdeliverRequestMain(id).then(res => {
message.success(t('处理成功!')) message.success(t('处理成功!'))
if(!res){
SupplierdeliverRecordMainApi.createPurchasereceiptRequest(res.number)
message.success(t('采购申请生成成功'))
}
})
// //
await getList() await getList()
} catch {}finally{ } catch {}finally{

Loading…
Cancel
Save