Browse Source

发货计划,自制备件发货计划--到仓库、到库位、发货类型

master_hella_20240701
王宇飞 8 months ago
parent
commit
50562a9093
  1. 148
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts
  2. 29
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue

148
src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts

@ -15,6 +15,7 @@ import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/l
import * as WorkstationApi from '@/api/wms/workstation'
import * as getPlansettingApi from '@/api/wms/plansetting/index'
import * as getBusinessTypeApi from '@/api/wms/businesstype/index'
@ -135,6 +136,38 @@ export const DeliverPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
}
},
},
{
label: '到仓库',
field: 'toWarehouseCode',
sort: 'custom',
table: {
width: 150
},
isForm: true,
isTableForm:false,
isDetail:false,
form: {
componentProps: {
disabled:true
}
}
},
{
label: '到库位',
field: 'toLocationCode',
sort: 'custom',
table: {
width: 150
},
isForm: true,
isTableForm:false,
isDetail:false,
form: {
componentProps: {
disabled:true
}
}
},
{
label: '发货类型',
field: 'deliverType',
@ -144,6 +177,11 @@ export const DeliverPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
form: {
componentProps: {
disabled:true
}
}
},
{
label: '计划日期',
@ -608,61 +646,61 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '到仓库代码',
field: 'toWarehouseCode',
sort: 'custom',
isForm: false,
table: {
width: 150
},
},
{
label: '到库位代码',
field: 'toLocationCode',
sort: 'custom',
table: {
width: 150
},
tableForm:{
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择到库位代码',
searchField: 'code',
searchTitle: '库位基础信息',
searchAllSchemas: Location.allSchemas,
searchPage: WorkstationApi.selectAreaTypeToLocation,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'areaType',
value: "deliverType",
message:"请选择发货类型",
isMainValue: true
}]
},
form: {
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择到库位代码',
searchField: 'code',
searchTitle: '库位基础信息',
searchAllSchemas: Location.allSchemas,
searchPage: WorkstationApi.selectAreaTypeToLocation,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'areaType',
value: "deliverType",
message:"请选择发货类型",
isMainValue: false
}]
}
},
},
// {
// label: '到仓库代码',
// field: 'toWarehouseCode',
// sort: 'custom',
// isForm: false,
// table: {
// width: 150
// },
// },
// {
// label: '到库位代码',
// field: 'toLocationCode',
// sort: 'custom',
// table: {
// width: 150
// },
// tableForm:{
// isInpuFocusShow: true, // 开启查询弹窗
// searchListPlaceholder: '请选择到库位代码',
// searchField: 'code',
// searchTitle: '库位基础信息',
// searchAllSchemas: Location.allSchemas,
// searchPage: WorkstationApi.selectAreaTypeToLocation,
// searchCondition: [{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// },{
// key: 'areaType',
// value: "deliverType",
// message:"请选择发货类型",
// isMainValue: true
// }]
// },
// form: {
// componentProps: {
// isSearchList: true,
// searchListPlaceholder: '请选择到库位代码',
// searchField: 'code',
// searchTitle: '库位基础信息',
// searchAllSchemas: Location.allSchemas,
// searchPage: WorkstationApi.selectAreaTypeToLocation,
// searchCondition: [{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// },{
// key: 'areaType',
// value: "deliverType",
// message:"请选择发货类型",
// isMainValue: false
// }]
// }
// },
// },
{
label: '项目',
field: 'project',

29
src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue

@ -86,6 +86,7 @@ import { DeliverPlanMain,DeliverPlanMainRules,DeliverPlanDetail,DeliverPlanDetai
import * as DeliverPlanMainApi from '@/api/wms/deliverPlanMain'
import * as DeliverPlanDetailApi from '@/api/wms/deliverPlanDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as AreabasicApi from '@/api/wms/areabasic'
//
defineOptions({ name: 'DeliverPlanMain' })
@ -132,11 +133,13 @@ const updataTableColumns = (val) => {
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => {
alert(11)
nextTick(async () => {
// tableform
if(formField == 'customerCode'){
customerCode.value = val[0]['code']
}
}
DeliverPlanDetail.allSchemas.tableFormColumns.map(item => {
if(item.field == 'customerDockCode') {
item.tableForm.searchCondition = [
@ -146,12 +149,13 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
isMainValue: false
}]
item.form.componentProps.searchCondition = [
{
key: 'customerCode',
value: customerCode.value ,
isMainValue: false
}]}
})
{
key: 'customerCode',
value: customerCode.value ,
isMainValue: false
}]
}
})
if (type == 'tableForm') {
if(formField == 'itemCode') {
val.forEach(item=>{
@ -168,6 +172,15 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row[formField] = val[0][searchField]
} else {
const setV = {}
if(formField == 'customerDockCode') {
//
setV['toWarehouseCode'] = val[0]['warehouseCode']//
setV['toLocationCode'] = val[0]['defaultLocationCode']//
let res = await AreabasicApi.selectAreabasicDOByCode(val[0]['defaultLocationCode'])
if(res){
setV['deliverType'] = res['type']
}
}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
}

Loading…
Cancel
Save