Browse Source

生产退料

master
陈薪名 12 months ago
parent
commit
96523854f9
  1. 104
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts
  2. 18
      src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue
  3. 272
      src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts

104
src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts

@ -939,14 +939,14 @@ export const ProductionreturnRequestDetailLabel = useCrudSchemas(reactive<CrudSc
} }
}, },
{ {
label: '来源生产线代码', label: '批次',
field: 'productionLineCode', field: 'batch',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
tableForm: { tableForm: {
disabled: true disabled: true,
}, },
form: { form: {
componentProps: { componentProps: {
@ -955,8 +955,8 @@ export const ProductionreturnRequestDetailLabel = useCrudSchemas(reactive<CrudSc
} }
}, },
{ {
label: '来源生产线代码', label: '数量',
field: 'productionLineCode', field: 'qty',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -971,8 +971,11 @@ export const ProductionreturnRequestDetailLabel = useCrudSchemas(reactive<CrudSc
} }
}, },
{ {
label: '来源工位代码', label: '计量单位',
field: 'workStationCode', field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -987,13 +990,17 @@ export const ProductionreturnRequestDetailLabel = useCrudSchemas(reactive<CrudSc
} }
}, },
{ {
label: '来源库位代码', label: '库存状态',
field: 'fromLocationCode', field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
tableForm: { tableForm: {
type: 'Select',
disabled: true disabled: true
}, },
form: { form: {
@ -1003,18 +1010,24 @@ export const ProductionreturnRequestDetailLabel = useCrudSchemas(reactive<CrudSc
} }
}, },
{ {
label: '物品名称', label: '来源生产线代码',
field: 'itemName', field: 'productionLineCode',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
isTableForm: false, tableForm: {
isForm: false, disabled: true
},
form: {
componentProps: {
disabled: true
}
}
}, },
{ {
label: '数量', label: '来源生产线代码',
field: 'qty', field: 'productionLineCode',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -1029,11 +1042,8 @@ export const ProductionreturnRequestDetailLabel = useCrudSchemas(reactive<CrudSc
} }
}, },
{ {
label: '计量单位', label: '来源工位代码',
field: 'uom', field: 'workStationCode',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -1048,18 +1058,24 @@ export const ProductionreturnRequestDetailLabel = useCrudSchemas(reactive<CrudSc
} }
}, },
{ {
label: '物品描述1', label: '来源库位代码',
field: 'itemDesc1', field: 'fromLocationCode',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
isTableForm: false, tableForm: {
isForm: false, disabled: true
},
form: {
componentProps: {
disabled: true
}
}
}, },
{ {
label: '物品描述2', label: '物品名称',
field: 'itemDesc2', field: 'itemName',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -1068,8 +1084,8 @@ export const ProductionreturnRequestDetailLabel = useCrudSchemas(reactive<CrudSc
isForm: false, isForm: false,
}, },
{ {
label: '项目代码', label: '物品描述1',
field: 'projectCode', field: 'itemDesc1',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -1078,40 +1094,24 @@ export const ProductionreturnRequestDetailLabel = useCrudSchemas(reactive<CrudSc
isForm: false, isForm: false,
}, },
{ {
label: '库存状态', label: '物品描述2',
field: 'inventoryStatus', field: 'itemDesc2',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
tableForm: { isTableForm: false,
type: 'Select', isForm: false,
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
}, },
{ {
label: '批次', label: '项目代码',
field: 'batch', field: 'projectCode',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
tableForm: { isTableForm: false,
disabled: true, isForm: false,
},
form: {
componentProps: {
disabled: true
}
}
}, },
{ {
label: '单据号', label: '单据号',

18
src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue

@ -75,7 +75,7 @@
ref="formLabelRef" ref="formLabelRef"
@success="getList" @success="getList"
:tableAllSchemas="detailListTableColumns" :tableAllSchemas="detailListTableColumns"
:tableFormRules="ProductionreturnRequestDetailLabelRules" :tableFormRules="ProductionreturnRequestDetailNoLabelRules"
:tableData="detatableData.tableList" :tableData="detatableData.tableList"
:isBusiness="true" :isBusiness="true"
:isShowButton="false" :isShowButton="false"
@ -88,14 +88,16 @@
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { ProductionreturnRequestMain,ProductionreturnRequestMainRules,ProductionreturnRequestDetail,ProductionreturnRequestDetailRules,ProductionreturnRequestDetailLabel,ProductionreturnRequestDetailLabelRules } from '../productionreturnRequestMain/productionreturnRequestMain.data' import { ProductionreturnRequestMain,ProductionreturnRequestMainRules,ProductionreturnRequestDetail,ProductionreturnRequestDetailRules } from '../productionreturnRequestMain/productionreturnRequestMain.data'
import { ProductionreturnRequestDetailNoLabel, ProductionreturnRequestDetailNoLabelRules } from './productionreturnRequestMainNo.data'
import * as ProductionreturnRequestMainNoApi from '@/api/wms/productionreturnRequestMainNo' import * as ProductionreturnRequestMainNoApi from '@/api/wms/productionreturnRequestMainNo'
import * as ProductionreturnRequestDetailNoApi from '@/api/wms/productionreturnRequestDetailNo' import * as ProductionreturnRequestDetailNoApi from '@/api/wms/productionreturnRequestDetailNo'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as ItembasicApi from '@/api/wms/itembasic' import * as ItembasicApi from '@/api/wms/itembasic'
import * as PackageApi from '@/api/wms/package' import * as PackageApi from '@/api/wms/package'
// 退 // 退
defineOptions({ name: 'ProductionreturnRequestMainNo' }) defineOptions({ name: 'ProductionreturnRequestMainNo' })
const message = useMessage() // const message = useMessage() //
@ -107,7 +109,7 @@ routeName.value = route.name
const tableColumns = ref(ProductionreturnRequestMain.allSchemas.tableColumns) const tableColumns = ref(ProductionreturnRequestMain.allSchemas.tableColumns)
// //
const detailListTableColumns = ProductionreturnRequestDetailLabel.allSchemas const detailListTableColumns = ProductionreturnRequestDetailNoLabel.allSchemas
const isCreateLabel = ref(false) const isCreateLabel = ref(false)
const formLabelRef = ref() const formLabelRef = ref()
const { tableObject: detatableData, tableMethods: detatableMethods } =useTable({ const { tableObject: detatableData, tableMethods: detatableMethods } =useTable({
@ -317,12 +319,12 @@ const buttonTableClick = async (val, row) => {
if(item.field == 'productionLineCodePackage') { if(item.field == 'productionLineCodePackage') {
item.tableForm.isInpuFocusShow = false item.tableForm.isInpuFocusShow = false
item.tableForm.disabled = true item.tableForm.disabled = true
ProductionreturnRequestDetailLabelRules.productionLineCodePackage[0].required = false ProductionreturnRequestDetailNoLabelRules.productionLineCodePackage[0].required = false
} }
if(item.field == 'supplierItemCode') { if(item.field == 'supplierItemCode') {
item.tableForm.isInpuFocusShow = true item.tableForm.isInpuFocusShow = true
item.tableForm.disabled = false item.tableForm.disabled = false
ProductionreturnRequestDetailLabelRules.supplierItemCode[0].required = true ProductionreturnRequestDetailNoLabelRules.supplierItemCode[0].required = true
} }
}) })
} else { } else {
@ -331,12 +333,12 @@ const buttonTableClick = async (val, row) => {
if(item.field == 'supplierItemCode') { if(item.field == 'supplierItemCode') {
item.tableForm.isInpuFocusShow = false item.tableForm.isInpuFocusShow = false
item.tableForm.disabled = true item.tableForm.disabled = true
ProductionreturnRequestDetailLabelRules.supplierItemCode[0].required = false ProductionreturnRequestDetailNoLabelRules.supplierItemCode[0].required = false
} }
if(item.field == 'productionLineCodePackage') { if(item.field == 'productionLineCodePackage') {
item.tableForm.isInpuFocusShow = true item.tableForm.isInpuFocusShow = true
item.tableForm.disabled = false item.tableForm.disabled = false
ProductionreturnRequestDetailLabelRules.productionLineCodePackage[0].required = true ProductionreturnRequestDetailNoLabelRules.productionLineCodePackage[0].required = true
} }
}) })
} }

272
src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts

@ -14,6 +14,12 @@ import { Workstation } from '@/views/wms/basicDataManage/factoryModeling/worksta
import * as BalanceApi from '@/api/wms/balance' import * as BalanceApi from '@/api/wms/balance'
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
import * as ProductionlineitemApi from '@/api/wms/productionlineitem'
import { Productionlineitem } from '@/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data'
import * as SupplieritemApi from '@/api/wms/supplieritem'
import { Supplieritem } from '@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
@ -801,4 +807,270 @@ export const ProductionreturnRequestDetailRules = reactive({
itemCode: [ itemCode: [
{ required: true, message: '请输入物品代码', trigger: 'blur' } { required: true, message: '请输入物品代码', trigger: 'blur' }
], ],
})
/**
* @returns {Array} 退
*/
export const ProductionreturnRequestDetailNoLabel = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '生产线代码',
field: 'productionLineCodePackage',
sort: 'custom',
table: {
width: 150
},
tableForm:{
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',
isMainValue: true
}]
}
},
{
label: '物品代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: false,
},
form: {
componentProps: {
disabled: false
}
}
},
{
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: '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: 'number',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
form: {
componentProps: {
disabled: true
}
}
},
]))
//表单校验
export const ProductionreturnRequestDetailNoLabelRules = reactive({
supplierItemCode: [
{ required: true, message: '请选择供应商', trigger: 'change' }
],
productionLineCodePackage: [
{ required: true, message: '请选择生产线', trigger: 'change' }
],
batch: [
{ required: true, message: '请输入批次', trigger: 'blur' }
]
}) })
Loading…
Cancel
Save