Browse Source

供应商发货申请修改

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

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

@ -31,6 +31,8 @@ export interface SupplierdeliverRecordMainVO {
creator: string
serialNumber: string
available: string
purchasereceiptRequestFlag: boolean
purchasereceiptRequestNumber: string
}
// 查询供应商发货记录主列表
@ -77,4 +79,9 @@ export const exportSupplierdeliverRecordMain = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
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 })
}

22
src/views/wms/purchasereceiptManage/inspect/inspectRecordMain/index.vue

@ -143,18 +143,18 @@ const buttonTableClick = async (val, row) => {
}
/** 生成采购上架申请按钮操作 */
const handlePutawayRequest = async (number:string) => {
try{
await message.confirm(t('确认生成上架申请吗?'))
tableObject.loading = true
await InspectRecordMainApi.createPutAwayRequest(number)
message.success(t('上架申请生成成功'))
await getList()
}catch{}finally{
tableObject.loading = false
}
/** 生成采购上架申请按钮操作 */
const handlePutawayRequest = async (number:string) => {
try{
await message.confirm(t('确认生成上架申请吗?'))
tableObject.loading = true
await InspectRecordMainApi.createPutAwayRequest(number)
message.success(t('上架申请生成成功'))
await getList()
}catch{}finally{
tableObject.loading = false
}
}
/** 详情操作 */
const detailRef = ref()

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

@ -127,12 +127,28 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = (row) => {
return [
// defaultButtons.mainListGenerateApplicationBtn(null), //
defaultButtons.mainListGenerateApplicationBtn({hasPermi:'wms:supplierdeliver-record-main:createPurchasereceiptRequest',hide:!row.purchasereceiptRequestFlag}), //
]
}
// -
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
}
}
/** 详情操作 */

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

Loading…
Cancel
Save