Browse Source

制品收货申请 创建包装标签

master_hella_20240701
陈薪名 8 months ago
parent
commit
2ffeff734d
  1. 11
      src/api/wms/itempackage/index.ts
  2. 21
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue
  3. 370
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts

11
src/api/wms/itempackage/index.ts

@ -41,6 +41,17 @@ export const getItempackagingPageBySupplierdeliver = async (params) => {
} }
} }
// 查询物料包装信息 列表--制品收货申请
export const getItempackagingPageByProductreceipt = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return request.post({ url: '/wms/itempackage/seniorByProductreceipt', data })
} else {
return await request.get({ url: `/wms/itempackage/pageByProductreceipt`, params })
}
}
// 查询物料包装信息 详情 // 查询物料包装信息 详情
export const getItempackaging = async (id: number) => { export const getItempackaging = async (id: number) => {

21
src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue

@ -78,7 +78,7 @@
ref="formLabelRef" ref="formLabelRef"
@success="getList" @success="getList"
:tableAllSchemas="detailListTableColumns" :tableAllSchemas="detailListTableColumns"
:tableFormRules="ProductionreturnRequestDetailLabelRules" :tableFormRules="ProductreceiptRequestLabelRules"
:tableData="detatableData.tableList" :tableData="detatableData.tableList"
:isBusiness="true" :isBusiness="true"
:isShowButton="false" :isShowButton="false"
@ -117,8 +117,9 @@
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { ProductreceiptRequestMain,ProductreceiptRequestMainRules,ProductreceiptRequestDetail,ProductreceiptRequestDetailRules, BackflushDetailRequest } from './productreceiptRequestMain.data' import { ProductreceiptRequestMain,ProductreceiptRequestMainRules,ProductreceiptRequestDetail,
import {ProductionreturnRequestDetailLabel,ProductionreturnRequestDetailLabelRules} from '../../../issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data' ProductreceiptRequestDetailRules, BackflushDetailRequest,
ProductreceiptRequestLabel,ProductreceiptRequestLabelRules } from './productreceiptRequestMain.data'
import * as ProductreceiptRequestMainApi from '@/api/wms/productreceiptRequestMain' import * as ProductreceiptRequestMainApi from '@/api/wms/productreceiptRequestMain'
import * as ProductreceiptRequestDetailApi from '@/api/wms/productreceiptRequestDetail' import * as ProductreceiptRequestDetailApi from '@/api/wms/productreceiptRequestDetail'
import * as BackflushRequestDetailbApi from '@/api/wms/backflushRequestDetailb' import * as BackflushRequestDetailbApi from '@/api/wms/backflushRequestDetailb'
@ -151,7 +152,7 @@ const buttondataTable = ref([{
}]) }])
// //
const detailListTableColumns = ProductionreturnRequestDetailLabel.allSchemas const detailListTableColumns = ProductreceiptRequestLabel.allSchemas
const isCreateLabel = ref(false) const isCreateLabel = ref(false)
const formLabelRef = ref() const formLabelRef = ref()
const labelType = ref('') // const labelType = ref('') //
@ -178,6 +179,10 @@ const updataTableColumns = (val) => {
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => { nextTick(() => {
if (type == 'tableForm') { if (type == 'tableForm') {
if (formField == 'secondPackUnit') {
row['secondPackUnit'] = val[0]['packUnit']
row['secondPackQty'] = val[0]['packQty']
}
// //
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
} else { } else {
@ -375,12 +380,12 @@ const buttonTableClick = async (val, row) => {
if(itemColumns.field == 'productionLineCodePackage') { if(itemColumns.field == 'productionLineCodePackage') {
// itemColumns.tableForm.isInpuFocusShow = false // itemColumns.tableForm.isInpuFocusShow = false
// itemColumns.tableForm.disabled = true // itemColumns.tableForm.disabled = true
ProductionreturnRequestDetailLabelRules.productionLineCodePackage[0].required = false ProductreceiptRequestLabelRules.productionLineCodePackage[0].required = false
} }
if(itemColumns.field == 'supplierItemCode') { if(itemColumns.field == 'supplierItemCode') {
itemColumns.tableForm.isInpuFocusShow = true itemColumns.tableForm.isInpuFocusShow = true
itemColumns.tableForm.disabled = false itemColumns.tableForm.disabled = false
ProductionreturnRequestDetailLabelRules.supplierItemCode[0].required = true ProductreceiptRequestLabelRules.supplierItemCode[0].required = true
} }
}) })
} else { } else {
@ -389,13 +394,13 @@ const buttonTableClick = async (val, row) => {
if(itemColumns.field == 'supplierItemCode') { if(itemColumns.field == 'supplierItemCode') {
itemColumns.tableForm.isInpuFocusShow = false itemColumns.tableForm.isInpuFocusShow = false
itemColumns.tableForm.disabled = true itemColumns.tableForm.disabled = true
ProductionreturnRequestDetailLabelRules.supplierItemCode[0].required = false ProductreceiptRequestLabelRules.supplierItemCode[0].required = false
} }
if(itemColumns.field == 'productionLineCodePackage') { if(itemColumns.field == 'productionLineCodePackage') {
item.productionLineCodePackage = item.productionLineCode item.productionLineCodePackage = item.productionLineCode
// itemColumns.tableForm.isInpuFocusShow = true // itemColumns.tableForm.isInpuFocusShow = true
// itemColumns.tableForm.disabled = false // itemColumns.tableForm.disabled = false
ProductionreturnRequestDetailLabelRules.productionLineCodePackage[0].required = true ProductreceiptRequestLabelRules.productionLineCodePackage[0].required = true
} }
}) })
} }

370
src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts

@ -26,6 +26,12 @@ import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/prod
import * as BomApi from '@/api/wms/bom' import * as BomApi from '@/api/wms/bom'
import { Bom } from '@/views/wms/basicDataManage/itemManage/bom/bom.data' import { Bom } from '@/views/wms/basicDataManage/itemManage/bom/bom.data'
import * as SupplieritemApi from '@/api/wms/supplieritem'
import { Supplieritem } from '@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data'
import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data'
import * as ItemPackageApi from '@/api/wms/itempackage/index'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
@ -884,6 +890,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
tableForm: { tableForm: {
type: 'Select' type: 'Select'
} }
}, },
{ {
label: '生产日期', label: '生产日期',
@ -1390,3 +1397,366 @@ export const BackflushDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false isForm: false
}, },
])) ]))
/**
* @returns {Array}
*/
export const ProductreceiptRequestLabel = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '生产线代码',
field: 'productionLineCodePackage',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
// isInpuFocusShow: true,
// searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
// searchField: 'productionLineCode', // 查询弹窗赋值字段
// searchTitle: '生产线物料关系信息', // 查询弹窗标题
// searchAllSchemas: Productionlineitem.allSchemas, // 查询弹窗所需类
// searchPage: ProductionlineitemApi.getProductionlineitemPage, // 查询弹窗所需分页方法
// searchCondition:[{
// key: 'itemCode',
// value: 'itemCode',
// isMainValue: true
// }]
}
},
{
label: '供应商代码',
field: 'supplierItemCode',
sort: 'custom',
table: {
width: 150
},
tableForm:{
isInpuFocusShow: true,
searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
searchField: 'supplierCode', // 查询弹窗赋值字段
searchTitle: '供应商信息', // 查询弹窗标题
searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类
searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法
searchCondition:[{
key: 'itemCode',
value: 'itemCode',
message: '请填写物料代码!',
isMainValue: true
}]
}
},
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '物料描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '物料描述2',
field: 'itemDesc2',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true,
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'Select',
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '来源生产线代码',
field: 'productionLineCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '来源生产线代码',
field: 'productionLineCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '来源工位代码',
field: 'workStationCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '来源库位代码',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '单据号',
field: 'number',
sort: 'custom',
table: {
width: 180
},
isTableForm: false,
form: {
componentProps: {
disabled: true
}
}
},
{
label: '包装规格1',
field: 'packUnit',
sort: 'custom',
table: {
width: 180
},
tableForm: {
disabled: true
},
},
{
label: '包装数量1',
field: 'packQty',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
},
tableForm: {
disabled: true,
}
},
{
label: '包装规格2',
field: 'secondPackUnit',
isTable: true,
sort: 'custom',
table: {
width: 150,
componentProps: {
disabled: true,
isSearchList: true,
searchListPlaceholder: '请选择包装',
searchField: 'packUnit',
searchTitle: '物品包装信息',
searchAllSchemas: Itempackaging.allSchemas,
searchPage: ItemPackageApi.getItempackagingPageByProductreceipt,
searchCondition: [
{
key: 'itemCode',
value: 'itemCode',
message: '请选择订单行',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
},
tableForm: {
disabled: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择包装',
searchField: 'packUnit',
searchTitle: '物品包装信息',
searchAllSchemas: Itempackaging.allSchemas,
searchPage: ItemPackageApi.getItempackagingPageByProductreceipt,
searchCondition: [
{
key: 'itemCode',
value: 'itemCode',
message: '请选择订单行',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
},
{
label: '包装数量2',
field: 'secondPackQty',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
disabled:true
}
},
tableForm: {
disabled: true,
}
},
]))
//表单校验
export const ProductreceiptRequestLabelRules = reactive({
supplierItemCode: [
{ required: true, message: '请选择供应商', trigger: 'change' }
],
productionLineCodePackage: [
{ required: true, message: '请选择生产线', trigger: 'change' }
]
})

Loading…
Cancel
Save