Browse Source

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

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

21
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,17 +910,17 @@ 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')) {
ProductreceiptRequestMain.allSchemas.formSchema.map((itemColumns) => {
if (itemColumns.field == 'workshopCode') {
itemColumns.value = 'PRC'
}
})
}
if(data&&data.list&&data.list.length>0){
ProductreceiptRequestMain.allSchemas.formSchema.map((itemColumns) => {
if (itemColumns.field == 'workshopCode') {
itemColumns.value = data.list[0]['value']
}
})
}
}
/** 初始化 **/

23
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' })
@ -813,18 +814,18 @@ const searchTableSuccess1 = async (formField, searchField, val, formRef, type, r
message.error('创建标签失败')
})
}
const getDefaultWorkshopCode = async ()=>{
let res = await WorkshopApi.getWorkshopPage({
available: "TRUE"
const getDefaultWorkshopCode = async () => {
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(itemColumns.field == 'workshopCode') {
itemColumns.value = 'PRA'
}
})
}
if(data&&data.list&&data.list.length>0){
ProductreceiptRequestMain.allSchemas.formSchema.map((itemColumns) => {
if (itemColumns.field == 'workshopCode') {
itemColumns.value = data.list[0]['value']
}
})
}
}
/** 初始化 **/

Loading…
Cancel
Save