Browse Source

Merge branch 'master_hella' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-ui into master_hella

master_hella_20240701
zhaoxuebing 8 months ago
parent
commit
23f3dcfa37
  1. 2
      README.md
  2. 61
      src/api/mes/productionPlan/index.ts
  3. 3
      src/utils/dict.ts
  4. 244
      src/views/mes/productionPlan/index.vue
  5. 182
      src/views/mes/productionPlan/productionPlan.data.ts
  6. 8
      src/views/wms/deliversettlementManage/deliver/deliverJobMain/deliverJobMain.data.ts
  7. 191
      src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue
  8. 8
      src/views/wms/deliversettlementManage/deliver/deliverRecordMain/deliverRecordMain.data.ts
  9. 71
      src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts
  10. 77
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts

2
README.md

@ -23,6 +23,8 @@ form: {
]
}
}
**tableForm明细列表查询弹窗配置**
tableForm:{
isInpuFocusShow: true, // 开启查询弹窗 【**与form表单中唯一不同属性**】

61
src/api/mes/productionPlan/index.ts

@ -0,0 +1,61 @@
import request from '@/config/axios'
export interface ProductionPlanVO {
id: number
planCode: string
planName: string
teamType: string
endTime: Date
shiftMode: string
billState: number
deleteTime: Date
status: string
concurrencyStamp: number
remark: string
deleter: string
siteId: number
textOne: string
textTwo: string
textThree: string
}
// 查询生产排产计划列表
export const getProductionPlanPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/mes/productionPlan/senior', data })
} else {
return await request.get({ url: `/mes/productionPlan/page`, params })
}
}
// 查询生产排产计划详情
export const getProductionPlan = async (id: number) => {
return await request.get({ url: `/mes/productionPlan/get?id=` + id })
}
// 新增生产排产计划
export const createProductionPlan = async (data: ProductionPlanVO) => {
return await request.post({ url: `/mes/productionPlan/create`, data })
}
// 修改生产排产计划
export const updateProductionPlan = async (data: ProductionPlanVO) => {
return await request.put({ url: `/mes/productionPlan/update`, data })
}
// 删除生产排产计划
export const deleteProductionPlan = async (id: number) => {
return await request.delete({ url: `/mes/productionPlan/delete?id=` + id })
}
// 导出生产排产计划 Excel
export const exportProductionPlan = async (params) => {
return await request.download({ url: `/mes/productionPlan/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/mes/productionPlan/get-import-template' })
}

3
src/utils/dict.ts

@ -276,5 +276,6 @@ export enum DICT_TYPE {
PACK_UNIT_TYPE = 'pack_unit_type', // 包装规格类型
TRANSFER_REASON = 'transfer_reason', // 调拨出入库原因
PURCHASERECEIPT_SOURCE_TYPE="purchasereceipt_source_type",//采购收货数据来源
PLAN_PRODUCTION_TYPE = "plan_production_type" // 生产计划类型
PLAN_PRODUCTION_TYPE = "plan_production_type", // 生产计划类型
DELIVER_TYPE="deliver_type",//发货类型
}

244
src/views/mes/productionPlan/index.vue

@ -0,0 +1,244 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="ProductionPlan.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ProductionPlan.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="ProductionPlanRules"
:formAllSchemas="ProductionPlan.allSchemas"
:apiUpdate="ProductionPlanApi.updateProductionPlan"
:apiCreate="ProductionPlanApi.createProductionPlan"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="ProductionPlan.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/mes/productionPlan/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { ProductionPlan,ProductionPlanRules } from './productionPlan.data'
import * as ProductionPlanApi from '@/api/mes/productionPlan'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
defineOptions({ name: 'MesProductionPlan' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(ProductionPlan.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: ProductionPlanApi.getProductionPlanPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'mes:productionPlan:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'mes:productionPlan:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'mes:productionPlan:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'mes:productionPlan:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'mes:productionPlan:delete'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =ProductionPlan.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
if(isHave){
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){
message.error('失效时间要大于生效时间')
return;
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') {
await ProductionPlanApi.createProductionPlan(data)
message.success(t('common.createSuccess'))
} else {
await ProductionPlanApi.updateProductionPlan(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicProductionPlan')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await ProductionPlanApi.deleteProductionPlan(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await ProductionPlanApi.exportProductionPlan(tableObject.params)
download.excel(data, '生产排产计划.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '生产排产计划导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await ProductionPlanApi.importTemplate()
})
</script>

182
src/views/mes/productionPlan/productionPlan.data.ts

@ -0,0 +1,182 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const ProductionPlanRules = reactive({
endTime: [required],
concurrencyStamp: [required],
})
export const ProductionPlan = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isForm: false,
},
{
label: '计划编号',
field: 'planCode',
sort: 'custom',
isSearch: true,
},
{
label: '计划名称',
field: 'planName',
sort: 'custom',
isSearch: true,
},
{
label: '班组类型',
field: 'teamType',
sort: 'custom',
isSearch: true,
// form: {
// component: 'SelectV2'
// },
},
{
label: '结束时间',
field: 'endTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '轮班方式',
field: 'shiftMode',
sort: 'custom',
isSearch: true,
},
{
label: '单据状态',
field: 'billState',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '删除时间',
field: 'deleteTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '状态',
field: 'status',
sort: 'custom',
isSearch: true,
form: {
component: 'Radio'
},
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true,
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
},
{
label: '删除用户名',
field: 'deleter',
sort: 'custom',
isSearch: true,
},
{
label: '位置ID',
field: 'siteId',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '备用字段一',
field: 'textOne',
sort: 'custom',
isSearch: false,
},
{
label: '备用字段二',
field: 'textTwo',
sort: 'custom',
isSearch: false,
},
{
label: '备用字段三',
field: 'textThree',
sort: 'custom',
isSearch: false,
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

8
src/views/wms/deliversettlementManage/deliver/deliverJobMain/deliverJobMain.data.ts

@ -761,6 +761,14 @@ export const DeliverJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '在途库库位',
field: 'onTheWayLocationCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '从库位代码',
field: 'fromLocationCode',

191
src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue

@ -180,112 +180,109 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row) => {
return [
// defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
// defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), //
// defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
// defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
]
}
// -
const buttonTableClick = async (val, row) => {
 if (val == 'mainJobExe') { //
    let aaa = {
"id": "1809190002130023685",
"requestNumber": "REQ1720231222-0004",
"deliverPlanNumber": "DP20231222-0004",
"customerDeliverNumber": "CUST20231222-00000005",
"customerCode": "CF",
"customerDockCode": "CFCKYT",
"deliverDock": null,
"carrierCode": null,
"transferMode": null,
"vehiclePlateNumber": null,
"fromWarehouseCode": null,
"toWarehouseCode": "CFCK",
"requestTime": 1703207798000,
"requestDueTime": 1703952000000,
"status": "2",
"expiredTime": null,
"updateTime": 1703207917000,
"updater": "超级管理员",
"jobStageStatus": null,
"priority": null,
"priorityincrement": null,
"departmentCode": "100",
"acceptUserId": "1",
"acceptTime": 1703207934000,
"completeUserId": null,
"completeTime": null,
"fromAreaTypes": "FG",
"toAreaTypes": "CUST",
"number": "JOB2420231222-0006",
"businessType": "DeliverJob",
"remark": "",
"createTime": 1703207917000,
"creator": "超级管理员",
"ruleUserId": null,
"fromAreaCodes": "采购在途库",
"toAreaCodes": "采购在途库",
"fromDockCode": null,
"autoComplete": "FALSE",
"allowModifyLocation": "FALSE",
"allowModifyQty": "TRUE",
"allowBiggerQty": "TRUE",
"allowSmallerQty": "TRUE",
"allowModifyInventoryStatus": "TRUE",
"allowContinuousScanning": "TRUE",
"allowPartialComplete": "TRUE",
"allowModifyBatch": "FALSE",
"allowModifyPackingNumber": "FALSE",
"inInventoryStatuses": "OK",
"outInventoryStatuses": "OK",
"concurrencyStamp": 1,
"subList": [{
"id": "1809190001245559379",
"soNumber": null,
"soLine": null,
"packingNumber": null,
"batch": "20230808",
"inventoryStatus": "OK",
"ownerCode": null,
"containerNumber": null,
"fromLocationCode": "L-R-001-001-1-01",
"toLocationCode": "CUST",
"itemCode": "testCF",
"itemName": "陈放测试物料",
"itemDesc1": "测试用",
"itemDesc2": "测试用",
"projectCode": "5",
"qty": 5,
"uom": "EA",
"number": "JOB2420231222-0006",
"remark": "",
"createTime": 1703207917000,
"creator": "超级管理员",
"toPackingNumber": null,
"toContainerNumber": null,
"toBatch": null,
"handleQty": null,
"toInventoryStatus": null,
recordList: [{
handleQty: 10,
toPackingNumber: '12',
toContainerNumber: '001',
toBatch: '21',
let aaa = {
"id": 3,
"requestNumber": "REQ1720240326-0012",
"deliverPlanNumber": "",
"customerDeliverNumber": "CUST20240326-00000012",
"customerCode": "KHV",
"customerDockCode": "YTV4",
"deliverDock": null,
"carrierCode": "",
"transferMode": "",
"vehiclePlateNumber": "",
"fromWarehouseCode": null,
"toWarehouseCode": "CKV",
"requestTime": 1711443936000,
"requestDueTime": null,
"status": "2",
"expiredTime": null,
"updateTime": 1711443936000,
"updater": "超级管理员",
"jobStageStatus": null,
"priority": null,
"priorityincrement": null,
"departmentCode": "100",
"acceptUserId": "1",
"acceptTime": 1711443941000,
"completeUserId": null,
"completeTime": null,
"fromAreaTypes": "FG,STOCK_UP",
"toAreaTypes": "CUST,THIRD_PARTY",
"number": "JOB2420240326-0013",
"businessType": "Deliver",
"remark": "",
"createTime": 1711443936000,
"creator": "超级管理员",
"ruleUserId": null,
"fromAreaCodes": "FG",
"toAreaCodes": "CUST,ZTQ",
"fromDockCode": null,
"autoComplete": "FALSE",
"allowModifyLocation": "FALSE",
"allowModifyQty": "TRUE",
"allowBiggerQty": "TRUE",
"allowSmallerQty": "TRUE",
"allowModifyInventoryStatus": "TRUE",
"allowContinuousScanning": "TRUE",
"allowPartialComplete": "TRUE",
"allowModifyBatch": "FALSE",
"allowModifyPackingNumber": "FALSE",
"inInventoryStatuses": "OK",
"outInventoryStatuses": "OK",
"concurrencyStamp": 1,
"useOnTheWayLocation": null,
"subList": [{
"id": 3,
"soNumber": null,
"soLine": null,
"packingNumber": null,
"batch": "2024021801",
"inventoryStatus": "OK",
"ownerCode": null,
"containerNumber": null,
"fromLocationCode": "FG",
"toLocationCode": "SFK",
"itemCode": "vvcs-zhj1",
"itemName": "测试物件",
"itemDesc1": "水冷系-散热器",
"itemDesc2": "水冷系-散热器",
"projectCode": "PJ001",
"qty": 11,
"uom": "PC",
"number": "JOB2420240326-0013",
"remark": "",
"createTime": 1711443936000,
"creator": "超级管理员",
"toPackingNumber": null,
"toContainerNumber": null,
"toBatch": null,
"handleQty": null,
"toInventoryStatus": null,
"updateTime": 1711443936000,
"updater": "超级管理员",
"onTheWayLocationCode": "FHZTK",
recordList: [{
handleQty: 11,
toPackingNumber: null,
toContainerNumber: null,
toBatch: '2024021801',
toInventoryStatus: 'OK',
toLocationCode: 'H03',
supplierCode: '31213',
},{
handleQty: 22,
toPackingNumber: 'M20230421000005',
toContainerNumber: '001',
toBatch: '20230808',
toInventoryStatus: 'OK',
toLocationCode: 'SFG',
toLocationCode: "SFK",
supplierCode: '31213',
}]
}]
}
]
}
handleHandle(aaa)
console.log('列表-操作按钮事件-执行')

8
src/views/wms/deliversettlementManage/deliver/deliverRecordMain/deliverRecordMain.data.ts

@ -516,6 +516,14 @@ export const DeliverRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '在途库库位',
field: 'onTheWayLocationCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '从库位代码',
field: 'fromLocationCode',

71
src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts

@ -19,6 +19,9 @@ import { Customer } from '@/views/wms/basicDataManage/customerManage/customer/cu
import * as CarrierApi from '@/api/wms/carrier'
import { Carrier } from '@/views/wms/basicDataManage/orderManage/carrier/carrier.data'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
import * as WorkstationApi from '@/api/wms/workstation'
const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
@ -166,6 +169,16 @@ export const DeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '发货类型',
field: 'deliverType',
sort: 'custom',
dictType: DICT_TYPE.DELIVER_TYPE,
dictClass: 'string',
table: {
width: 150
},
},
{
label: '承运商',
field: 'carrierCode',
@ -200,6 +213,15 @@ export const DeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '发货库区类型',
field: 'deliverType',
sort: 'custom',
dictType: DICT_TYPE.DELIVER_TYPE,
table: {
width: 150
},
},
{
label: '车牌号',
field: 'vehiclePlateNumber',
@ -527,6 +549,9 @@ export const DeliverRequestMainRules = reactive({
customerCode: [
{ required: true, message: '请选择客户代码', trigger: 'change' }
],
deliverType: [
{ required: true, message: '发货库区类型不能为空', trigger: 'change' }
],
customerDockCode: [
{ required: true, message: '请选择客户月台代码', trigger: 'change' }
],
@ -783,7 +808,8 @@ export const DeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
tableForm: {
type: 'Select'
type: 'Select',
disabled: true
},
form: {
componentProps: {
@ -798,8 +824,44 @@ export const DeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTableForm: false,
isForm: false,
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: '库存状态',
@ -966,4 +1028,7 @@ export const DeliverRequestDetailRules = reactive({
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
toLocationCode: [
{ required: true, message: '请选择到库位代码', trigger: 'change' }
],
})

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

@ -10,8 +10,15 @@ import { Customerdock } from '@/views/wms/basicDataManage/customerManage/custome
import * as CustomerItemApi from '@/api/wms/customeritem'
import { Customeritem } from '@/views/wms/basicDataManage/customerManage/customeritem/customeritem.data'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
import * as WorkstationApi from '@/api/wms/workstation'
import * as getPlansettingApi from '@/api/wms/plansetting/index'
import * as getBusinessTypeApi from '@/api/wms/businesstype/index'
const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
@ -23,6 +30,13 @@ const queryParams = {
const data = await getPlansettingApi.getPlansettingPage(queryParams)
const plansettingData =data?.list[0]||{}
const businessTypeQueryParams = {
pageSize:10,
pageNo:1,
code:'Deliver'
}
const data1 = await getBusinessTypeApi.getBusinesstypePage(businessTypeQueryParams)
const businessTypeData =data1?.list[0]||{}
/**
* @returns {Array}
*/
@ -63,6 +77,16 @@ export const DeliverPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '发货类型',
field: 'deliverType',
sort: 'custom',
dictType: DICT_TYPE.DELIVER_TYPE,
dictClass: 'string',
table: {
width: 150
},
},
{
label: '计划日期',
field: 'planDate',
@ -317,6 +341,9 @@ export const DeliverPlanMainRules = reactive({
customerCode: [
{ required: true, message: '请选择客户代码', trigger: 'change' }
],
deliverType: [
{ required: true, message: '发货库区类型不能为空', trigger: 'change' }
],
planDate: [
{ required: true, message: '计划日期不能为空', trigger: 'change' }
],
@ -405,7 +432,6 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'customerCode',
value: 'customerCode',
@ -500,6 +526,52 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
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: 'remark',
@ -657,6 +729,9 @@ export const DeliverPlanDetailRules = reactive({
itemCode: [
{ required: true, message: '请选择物料代码', trigger: 'change' }
],
toLocationCode: [
{ required: true, message: '请选择到库位代码', trigger: 'change' }
],
available: [
{ required: true, message: '请选择是否可用', trigger: 'change' }
],

Loading…
Cancel
Save