Browse Source

HL-5463 报工申请中车间代码字段增加默认值

hella_online_20240821
wangyufei 3 months ago
parent
commit
b2d64ecd82
  1. 13
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue
  2. 15
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue

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

@ -185,6 +185,7 @@ import { getJmreportBaseUrl } from '@/utils/systemParam'
import * as BomApi from '@/api/wms/bom'
import { formatDate } from '@/utils/formatTime'
import * as WorkshopApi from '@/api/wms/workshop'
import * as ConfigApi from '@/api/infra/config'
//
//
@ -909,19 +910,19 @@ const searchTableSuccessLabel = async (formField, searchField, val, formRef, typ
})
}
const getDefaultWorkshopCode = async () => {
let res = await WorkshopApi.getWorkshopPage({
available: 'TRUE'
const data = await ConfigApi.getConfigPage({
'key':'predictProductreceiptWorkshopCode',
'pageNo':1,
'pageSize':10
})
if (res && res.list.length > 0) {
if (res.list.find((item) => item.code == 'PRC')) {
if(data&&data.list&&data.list.length>0){
ProductreceiptRequestMain.allSchemas.formSchema.map((itemColumns) => {
if (itemColumns.field == 'workshopCode') {
itemColumns.value = 'PRC'
itemColumns.value = data.list[0]['value']
}
})
}
}
}
/** 初始化 **/
onMounted(async () => {
getDefaultWorkshopCode()

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

@ -152,6 +152,7 @@ import { getJmreportBaseUrl } from '@/utils/systemParam'
import * as BomApi from "@/api/wms/bom";
import { formatDate } from '@/utils/formatTime'
import * as WorkshopApi from '@/api/wms/workshop'
import * as ConfigApi from '@/api/infra/config'
//
defineOptions({ name: 'ProductreceiptRequestMainA' })
@ -814,19 +815,19 @@ const searchTableSuccess1 = async (formField, searchField, val, formRef, type, r
})
}
const getDefaultWorkshopCode = async () => {
let res = await WorkshopApi.getWorkshopPage({
available: "TRUE"
const data = await ConfigApi.getConfigPage({
'key':'assembleProductreceiptWorkshopCode',
'pageNo':1,
'pageSize':10
})
if(res&&res.list.length>0){
if(res.list.find(item=>item.code=='PRA')){
ProductreceiptRequestMain.allSchemas.formSchema.map(itemColumns => {
if(data&&data.list&&data.list.length>0){
ProductreceiptRequestMain.allSchemas.formSchema.map((itemColumns) => {
if (itemColumns.field == 'workshopCode') {
itemColumns.value = 'PRA'
itemColumns.value = data.list[0]['value']
}
})
}
}
}
/** 初始化 **/
onMounted(async () => {
getDefaultWorkshopCode()

Loading…
Cancel
Save