Browse Source

包装信息新增功能修改,导入功能

linshi20240813
TengXF 3 months ago
parent
commit
d80dcf6508
  1. 25
      src/views/wms/inventoryManage/package/index.vue
  2. 543
      src/views/wms/inventoryManage/package/package.data.ts

25
src/views/wms/inventoryManage/package/index.vue

@ -65,6 +65,7 @@ import { Package,PackageRules } from './package.data'
import * as PackageApi from '@/api/wms/package'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { getJmreportBaseUrl } from '@/utils/systemParam'
import * as EquipmentInspectionRecordMainApi from "@/api/eam/equipmentInspectionRecordMain";
defineOptions({ name: 'package' })
@ -91,7 +92,24 @@ const searchTableSuccess = (formField, searchField, val, basicFormRef, type, row
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
setV['itemName'] = val[0]['name']
if (formField == 'itemCode'){
setV['itemName'] = val[0]['name']
setV['itemDesc1'] = val[0]['desc1']
setV['itemDesc2'] = val[0]['desc2']
setV['uom'] = val[0]['uom']
setV['altUom'] = val[0]['altUom']
setV['packUnit'] = null
setV['packQty'] = null
}
else if (formField == 'packUnit'){
setV['packQty'] = val[0]['packQty']
}
else if(formField == 'toWarehouseCode'){
setV['toLocationCode'] = null
}
else if(formField == 'supplierCode'){
setV['supplierItemCode'] = null
}
basicFormRef.setValues(setV)
basicFormRef.setValues(setV)
})
@ -106,7 +124,7 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:package:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'wms:package:import'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:package:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:package:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
@ -315,7 +333,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '包装导入模版.xlsx'
templateTitle: '包装信息导入模板.xlsx'
})
//
@ -335,5 +353,6 @@ const searchFormClick = (searchData) => {
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await PackageApi.importTemplate()
})
</script>

543
src/views/wms/inventoryManage/package/package.data.ts

@ -2,12 +2,30 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter,dateFormatter2 } from '@/utils/formatTime'
import {Itembasic} from "@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data";
import * as ItembasicApi from "@/api/wms/itembasic";
import {Warehouse} from "@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data";
import * as WarehouseApi from "@/api/wms/warehouse";
import {Dock} from "@/views/wms/basicDataManage/factoryModeling/dock/dock.data";
import * as DockApi from "@/api/wms/dock";
import {Packageunit} from "@/views/wms/basicDataManage/itemManage/packageunit/packageunit.data";
import * as PackageunitApi from "@/api/wms/packageunit";
import {Location} from "@/views/wms/basicDataManage/factoryModeling/location/location.data";
import * as LocationApi from "@/api/wms/location";
import {Supplier} from "@/views/wms/basicDataManage/supplierManage/supplier/supplier.data";
import * as SupplierApi from "@/api/wms/supplier";
import {Itempackaging} from "@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data";
import * as ItempackagingApi from "@/api/wms/itempackage";
import * as SupplieritemApi from "@/api/wms/supplieritem";
import {
Supplieritem
} from "@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data";
// 表单校验
export const PackageRules = reactive({
number: [required],
// number: [required],
itemCode: [required],
itemName: [required],
packUnit: [required],
packQty: [required],
})
export const Package = useCrudSchemas(reactive<CrudSchema[]>([
{
@ -19,16 +37,17 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
width: 180,
fixed: 'left'
},
isForm:false
},
{
label: '父包装号',
field: 'parentNumber',
sort: 'custom',
isSearch: true,
table: {
width: 180,
},
},
// {
// label: '父包装号',
// field: 'parentNumber',
// sort: 'custom',
// isSearch: true,
// table: {
// width: 180,
// },
// },
{
label: '物料代码',
field: 'itemCode',
@ -50,7 +69,15 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
},
isSearch: true
@ -70,6 +97,11 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150,
},
form: {
componentProps: {
disabled: true
}
},
},
{
label: '物料描述2',
@ -78,6 +110,11 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150,
},
form: {
componentProps: {
disabled: true
}
},
},
{
label: '批次',
@ -186,7 +223,10 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
dictType: DICT_TYPE.UOM,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'SelectV2'
component: 'SelectV2',
componentProps: {
disabled: true
}
},
table: {
width: 150,
@ -207,7 +247,10 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
dictType: DICT_TYPE.UOM,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'SelectV2'
component: 'SelectV2',
componentProps: {
disabled: true
}
},
table: {
width: 150,
@ -229,14 +272,6 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
width: 150,
},
},
{
label: '包装数量',
field: 'packQty',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '包装规格',
field: 'packUnit',
@ -249,6 +284,50 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150,
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch:true,
isSearch:true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择包装规格', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '物料包装信息', // 查询弹窗标题
searchAllSchemas: Itempackaging.allSchemas, // 查询弹窗所需类
searchPage: ItempackagingApi.getItempackagingPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'itemCode',
value: 'itemCode',
message: '请填写物料代码!',
isMainValue: true
}],
verificationParams: [{
key: 'packUnit',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
{
label: '包装数量',
field: 'packQty',
sort: 'custom',
table: {
width: 150,
},
form: {
componentProps: {
disabled: true
}
},
},
{
label: '仓库代码',
@ -257,6 +336,24 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150,
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch:true,
isSearch:true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择仓库代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '仓库信息', // 查询弹窗标题
searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类
searchPage: WarehouseApi.getWarehousePage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '月台代码',
@ -265,6 +362,23 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150,
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true,
searchListPlaceholder: '请选择月台代码',
searchField: 'code',
searchTitle: '客户月台',
searchAllSchemas: Dock.allSchemas,
searchPage: DockApi.getDockPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}],
}
}
},
{
label: '库位代码',
@ -273,6 +387,28 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150,
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true,
searchListPlaceholder: '请选择库位代码',
searchField: 'code',
searchTitle: '库位信息',
searchAllSchemas: Location.allSchemas,
searchPage: LocationApi.getLocationPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'warehouseCode',
value: 'toWarehouseCode',
message: '请填写仓库代码!',
isMainValue: true
}],
}
}
},
{
label: '供应商代码',
@ -281,6 +417,34 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150,
},
form: {
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择供应商', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '供应商信息', // 查询弹窗标题
searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
searchPage: SupplierApi.getSupplierPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
],
verificationParams: [
{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '供应商物料代码',
@ -289,159 +453,192 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150,
},
form: {
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择供应商物料', // 输入框占位文本
searchField: 'supplierItemCode', // 查询弹窗赋值字段
searchTitle: '供应商信息', // 查询弹窗标题
searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类
searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'supplierCode',
value: 'supplierCode',
message: '请填写物料代码!',
isMainValue: true
}
],
verificationParams: [
{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '采购订单号',
field: 'poNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '采购订单行',
field: 'poLine',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '采购计划单号',
field: 'rpNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '发货单号',
field: 'asnNumber',
sort: 'custom',
table: {
width: 182,
},
},
{
label: '生产订单号',
field: 'woNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '生产订单行',
field: 'woLine',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '生产线代码',
field: 'productionLineCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '班组代码',
field: 'teamCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '班次代码',
field: 'shiftCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '客户代码',
field: 'customerCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '客户月台代码',
field: 'customerDockCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '客户物料代码',
field: 'customerItemCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '销售订单号',
field: 'soNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '销售订单行',
field: 'soLine',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '质量等级',
field: 'eqLevel',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '货主代码',
field: 'ownerCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '重量',
field: 'weight',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '面积',
field: 'area',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '体积',
field: 'volume',
sort: 'custom',
table: {
width: 150,
},
},
// {
// label: '采购订单号',
// field: 'poNumber',
// sort: 'custom',
// table: {
// width: 150,
// },
// },
// {
// label: '采购订单行',
// field: 'poLine',
// sort: 'custom',
// table: {
// width: 150,
// },
// },
// {
// label: '采购计划单号',
// field: 'rpNumber',
// sort: 'custom',
// table: {
// width: 150,
// },
// },
// {
// label: '发货单号',
// field: 'asnNumber',
// sort: 'custom',
// table: {
// width: 182,
// },
// },
// {
// label: '生产订单号',
// field: 'woNumber',
// sort: 'custom',
// table: {
// width: 150,
// },
// },
// {
// label: '生产订单行',
// field: 'woLine',
// sort: 'custom',
// table: {
// width: 150,
// },
// },
// {
// label: '生产线代码',
// field: 'productionLineCode',
// sort: 'custom',
// table: {
// width: 150,
// },
// },
// {
// label: '班组代码',
// field: 'teamCode',
// sort: 'custom',
// table: {
// width: 150,
// },
// },
// {
// label: '班次代码',
// field: 'shiftCode',
// sort: 'custom',
// table: {
// width: 150,
// },
// },
// {
// label: '客户代码',
// field: 'customerCode',
// sort: 'custom',
// table: {
// width: 150,
// },
// },
// {
// label: '客户月台代码',
// field: 'customerDockCode',
// sort: 'custom',
// table: {
// width: 150,
// },
// },
// {
// label: '客户物料代码',
// field: 'customerItemCode',
// sort: 'custom',
// table: {
// width: 150,
// },
// },
// {
// label: '销售订单号',
// field: 'soNumber',
// sort: 'custom',
// table: {
// width: 150,
// },
// },
// {
// label: '销售订单行',
// field: 'soLine',
// sort: 'custom',
// table: {
// width: 150,
// },
// },
// {
// label: '质量等级',
// field: 'eqLevel',
// sort: 'custom',
// table: {
// width: 150,
// },
// },
// {
// label: '货主代码',
// field: 'ownerCode',
// sort: 'custom',
// table: {
// width: 150,
// },
// },
// {
// label: '重量',
// field: 'weight',
// sort: 'custom',
// table: {
// width: 150,
// },
// },
// {
// label: '面积',
// field: 'area',
// sort: 'custom',
// table: {
// width: 150,
// },
// },
// {
// label: '体积',
// field: 'volume',
// sort: 'custom',
// table: {
// width: 150,
// },
// },
{
label: '创建时间',
field: 'createTime',

Loading…
Cancel
Save