Browse Source

邱晨:预生产收货申请新增,选择车间代码默认PRC,装配的默认PRA

hella_online_20240815
wangyufei 3 months ago
parent
commit
ec59c7efb6
  1. 17
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue
  2. 17
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue

17
src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue

@ -151,6 +151,8 @@ import dayjs from 'dayjs'
import { getJmreportBaseUrl } from '@/utils/systemParam'
import * as BomApi from "@/api/wms/bom";
import { formatDate } from '@/utils/formatTime'
import * as WorkshopApi from '@/api/wms/workshop'
//
//
defineOptions({ name: 'ProductreceiptRequestMain' })
@ -798,8 +800,23 @@ const searchTableSuccessLabel = async (formField, searchField, val, formRef, typ
message.error('创建标签失败')
})
}
const getDefaultWorkshopCode = async ()=>{
let res = await WorkshopApi.getWorkshopPage({
available: "TRUE"
})
if(res&&res.list.length>0){
if(res.list.find(item=>item.code=='PRC')){
ProductreceiptRequestMain.allSchemas.formSchema.map(itemColumns => {
if(itemColumns.field == 'workshopCode') {
itemColumns.value = 'PRC'
}
})
}
}
}
/** 初始化 **/
onMounted(async () => {
getDefaultWorkshopCode()
getList()
importTemplateData.templateUrl = await ProductreceiptRequestMainApi.importTemplate()
})

17
src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue

@ -151,6 +151,7 @@ import { getAccessToken } from '@/utils/auth'
import { getJmreportBaseUrl } from '@/utils/systemParam'
import * as BomApi from "@/api/wms/bom";
import { formatDate } from '@/utils/formatTime'
import * as WorkshopApi from '@/api/wms/workshop'
//
defineOptions({ name: 'ProductreceiptRequestMainA' })
@ -800,9 +801,23 @@ const searchTableSuccess1 = async (formField, searchField, val, formRef, type, r
message.error('创建标签失败')
})
}
const getDefaultWorkshopCode = async ()=>{
let res = await WorkshopApi.getWorkshopPage({
available: "TRUE"
})
if(res&&res.list.length>0){
if(res.list.find(item=>item.code=='PRC')){
ProductreceiptRequestMain.allSchemas.formSchema.map(itemColumns => {
if(itemColumns.field == 'workshopCode') {
itemColumns.value = 'PRA'
}
})
}
}
}
/** 初始化 **/
onMounted(async () => {
getDefaultWorkshopCode()
getList()
importTemplateData.templateUrl = await ProductreceiptRequestMainApi.importTemplate()
})

Loading…
Cancel
Save