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

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

@ -75,7 +75,7 @@
ref="formLabelRef"
@success="getList"
:tableAllSchemas="detailListTableColumns"
:tableFormRules="ProductionreturnRequestDetailLabelRules"
:tableFormRules="ProductionreturnRequestDetailNoLabelRules"
:tableData="detatableData.tableList"
:isBusiness="true"
:isShowButton="false"
@ -88,14 +88,16 @@
<script setup lang="ts">
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 ProductionreturnRequestDetailNoApi from '@/api/wms/productionreturnRequestDetailNo'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as ItembasicApi from '@/api/wms/itembasic'
import * as PackageApi from '@/api/wms/package'
// 退
// 退
defineOptions({ name: 'ProductionreturnRequestMainNo' })
const message = useMessage() //
@ -107,7 +109,7 @@ routeName.value = route.name
const tableColumns = ref(ProductionreturnRequestMain.allSchemas.tableColumns)
//
const detailListTableColumns = ProductionreturnRequestDetailLabel.allSchemas
const detailListTableColumns = ProductionreturnRequestDetailNoLabel.allSchemas
const isCreateLabel = ref(false)
const formLabelRef = ref()
const { tableObject: detatableData, tableMethods: detatableMethods } =useTable({
@ -317,12 +319,12 @@ const buttonTableClick = async (val, row) => {
if(item.field == 'productionLineCodePackage') {
item.tableForm.isInpuFocusShow = false
item.tableForm.disabled = true
ProductionreturnRequestDetailLabelRules.productionLineCodePackage[0].required = false
ProductionreturnRequestDetailNoLabelRules.productionLineCodePackage[0].required = false
}
if(item.field == 'supplierItemCode') {
item.tableForm.isInpuFocusShow = true
item.tableForm.disabled = false
ProductionreturnRequestDetailLabelRules.supplierItemCode[0].required = true
ProductionreturnRequestDetailNoLabelRules.supplierItemCode[0].required = true
}
})
} else {
@ -331,12 +333,12 @@ const buttonTableClick = async (val, row) => {
if(item.field == 'supplierItemCode') {
item.tableForm.isInpuFocusShow = false
item.tableForm.disabled = true
ProductionreturnRequestDetailLabelRules.supplierItemCode[0].required = false
ProductionreturnRequestDetailNoLabelRules.supplierItemCode[0].required = false
}
if(item.field == 'productionLineCodePackage') {
item.tableForm.isInpuFocusShow = true
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 { 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() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
@ -802,3 +808,269 @@ export const ProductionreturnRequestDetailRules = reactive({
{ 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