Browse Source

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

master_hella_20240701
王宇飞 8 months ago
parent
commit
50562a9093
  1. 148
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts
  2. 17
      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 WorkstationApi from '@/api/wms/workstation'
import * as getPlansettingApi from '@/api/wms/plansetting/index' import * as getPlansettingApi from '@/api/wms/plansetting/index'
import * as getBusinessTypeApi from '@/api/wms/businesstype/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: '发货类型', label: '发货类型',
field: 'deliverType', field: 'deliverType',
@ -144,6 +177,11 @@ export const DeliverPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
form: {
componentProps: {
disabled:true
}
}
}, },
{ {
label: '计划日期', label: '计划日期',
@ -608,61 +646,61 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{ // {
label: '到仓库代码', // label: '到仓库代码',
field: 'toWarehouseCode', // field: 'toWarehouseCode',
sort: 'custom', // sort: 'custom',
isForm: false, // isForm: false,
table: { // table: {
width: 150 // width: 150
}, // },
}, // },
{ // {
label: '到库位代码', // label: '到库位代码',
field: 'toLocationCode', // field: 'toLocationCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
tableForm:{ // tableForm:{
isInpuFocusShow: true, // 开启查询弹窗 // isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择到库位代码', // searchListPlaceholder: '请选择到库位代码',
searchField: 'code', // searchField: 'code',
searchTitle: '库位基础信息', // searchTitle: '库位基础信息',
searchAllSchemas: Location.allSchemas, // searchAllSchemas: Location.allSchemas,
searchPage: WorkstationApi.selectAreaTypeToLocation, // searchPage: WorkstationApi.selectAreaTypeToLocation,
searchCondition: [{ // searchCondition: [{
key: 'available', // key: 'available',
value: 'TRUE', // value: 'TRUE',
isMainValue: false // isMainValue: false
},{ // },{
key: 'areaType', // key: 'areaType',
value: "deliverType", // value: "deliverType",
message:"请选择发货类型", // message:"请选择发货类型",
isMainValue: true // isMainValue: true
}] // }]
}, // },
form: { // form: {
componentProps: { // componentProps: {
isSearchList: true, // isSearchList: true,
searchListPlaceholder: '请选择到库位代码', // searchListPlaceholder: '请选择到库位代码',
searchField: 'code', // searchField: 'code',
searchTitle: '库位基础信息', // searchTitle: '库位基础信息',
searchAllSchemas: Location.allSchemas, // searchAllSchemas: Location.allSchemas,
searchPage: WorkstationApi.selectAreaTypeToLocation, // searchPage: WorkstationApi.selectAreaTypeToLocation,
searchCondition: [{ // searchCondition: [{
key: 'available', // key: 'available',
value: 'TRUE', // value: 'TRUE',
isMainValue: false // isMainValue: false
},{ // },{
key: 'areaType', // key: 'areaType',
value: "deliverType", // value: "deliverType",
message:"请选择发货类型", // message:"请选择发货类型",
isMainValue: false // isMainValue: false
}] // }]
} // }
}, // },
}, // },
{ {
label: '项目', label: '项目',
field: 'project', field: 'project',

17
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 DeliverPlanMainApi from '@/api/wms/deliverPlanMain'
import * as DeliverPlanDetailApi from '@/api/wms/deliverPlanDetail' import * as DeliverPlanDetailApi from '@/api/wms/deliverPlanDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as AreabasicApi from '@/api/wms/areabasic'
// //
defineOptions({ name: 'DeliverPlanMain' }) defineOptions({ name: 'DeliverPlanMain' })
@ -132,7 +133,9 @@ const updataTableColumns = (val) => {
// //
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => { alert(11)
nextTick(async () => {
// tableform // tableform
if(formField == 'customerCode'){ if(formField == 'customerCode'){
customerCode.value = val[0]['code'] customerCode.value = val[0]['code']
@ -150,7 +153,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
key: 'customerCode', key: 'customerCode',
value: customerCode.value , value: customerCode.value ,
isMainValue: false isMainValue: false
}]} }]
}
}) })
if (type == 'tableForm') { if (type == 'tableForm') {
if(formField == 'itemCode') { if(formField == 'itemCode') {
@ -168,6 +172,15 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
} else { } else {
const setV = {} 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] setV[formField] = val[0][searchField]
formRef.setValues(setV) formRef.setValues(setV)
} }

Loading…
Cancel
Save