Browse Source

制品回收修改

master_hella_20240701
陈薪名 11 months ago
parent
commit
cef3433679
  1. 116
      src/views/wms/productionManage/productredress/productredressJobMain/index.vue
  2. 576
      src/views/wms/productionManage/productredress/productredressJobMain/productredressJobMain.data.ts
  3. 2
      src/views/wms/productionManage/productredress/productredressRequestMain/index.vue
  4. 194
      src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts

116
src/views/wms/productionManage/productredress/productredressJobMain/index.vue

@ -27,9 +27,9 @@
v-model:currentPage="tableObject.currentPage" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort" v-model:sort="tableObject.sort"
> >
<template #code="{row}"> <template #number="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> <el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.code }}</span> <span>{{ row.number }}</span>
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <template #action="{ row }">
@ -38,33 +38,26 @@
</Table> </Table>
</ContentWrap> </ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="ProductredressJobMainRules"
:formAllSchemas="ProductredressJobMain.allSchemas"
:apiUpdate="ProductredressJobMainApi.updateProductredressJobMain"
:apiCreate="ProductredressJobMainApi.createProductredressJobMain"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 --> <!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="ProductredressJobMain.allSchemas" /> <Detail
ref="detailRef"
<!-- 导入 --> :isBasic="false"
<ImportForm ref="importFormRef" url="/wms/productredress-job-main/import" :importTemplateData="importTemplateData" @success="importSuccess" /> :allSchemas="ProductredressJobMain.allSchemas"
:detailAllSchemas="ProductredressJobDetail.allSchemas"
:detailAllSchemasRules="ProductredressJobDetailRules"
:apiCreate="ProductredressJobDetailApi.createProductredressJobDetail"
:apiUpdate="ProductredressJobDetailApi.updateProductredressJobDetail"
:apiPage="ProductredressJobDetailApi.getProductredressJobDetailPage"
:apiDelete="ProductredressJobDetailApi.deleteProductredressJobDetail"
/>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { ProductredressJobMain,ProductredressJobMainRules } from './productredressJobMain.data' import { ProductredressJobMain,ProductredressJobMainRules,ProductredressJobDetail, ProductredressJobDetailRules } from './productredressJobMain.data'
import * as ProductredressJobMainApi from '@/api/wms/productredressJobMain' import * as ProductredressJobMainApi from '@/api/wms/productredressJobMain'
import * as ProductredressJobDetailApi from '@/api/wms/productredressJobDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' 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: 'ProductredressJobMain' }) defineOptions({ name: 'ProductredressJobMain' })
@ -76,15 +69,6 @@ const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref(ProductredressJobMain.allSchemas.tableColumns) const tableColumns = ref(ProductredressJobMain.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
tableColumns.value = val tableColumns.value = val
@ -99,29 +83,15 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:productredressJobMain:create'}), // defaultButtons.defaultExportBtn({hasPermi:'wms:productredress-job-main:export'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:productredressJobMain:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:productredressJobMain:export'}), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
] ]
// //
const buttonBaseClick = (val, item) => { const buttonBaseClick = (val, item) => {
if (val == 'add') { // if (val == 'export') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport() handleExport()
} else if (val == 'refresh') { // } else if (val == 'refresh') { //
getList() getList()
@ -133,8 +103,8 @@ const buttonBaseClick = (val, item) => {
// - // -
const butttondata = [ const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:productredressJobMain:update'}), // defaultButtons.mainListEditBtn({hasPermi:'wms:productredress-job-main:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:productredressJobMain:delete'}), // defaultButtons.mainListDeleteBtn({hasPermi:'wms:productredress-job-main:delete'}), //
] ]
// - // -
@ -152,29 +122,13 @@ const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row) basicFormRef.value.open(type, row)
} }
// form /**
const formsSuccess = async (formType,data) => { * tableForm方法
var isHave =ProductredressJobMain.allSchemas.formSchema.some(function (item) { */
return item.field === 'activeTime' || item.field === 'expireTime'; const tableFormKeys = {}
}); ProductredressJobDetail.allSchemas.tableFormColumns.forEach(item => {
if(isHave){ tableFormKeys[item.field] = item.default ? item.default : ''
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 ProductredressJobMainApi.createProductredressJobMain(data)
message.success(t('common.createSuccess'))
} else {
await ProductredressJobMainApi.updateProductredressJobMain(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 详情操作 */ /** 详情操作 */
const detailRef = ref() const detailRef = ref()
@ -211,21 +165,6 @@ const handleExport = async () => {
} }
} }
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '制品回收任务主导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
// //
const searchFormClick = (searchData) => { const searchFormClick = (searchData) => {
tableObject.params = { tableObject.params = {
@ -238,7 +177,6 @@ const searchFormClick = (searchData) => {
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()
importTemplateData.templateUrl = await ProductredressJobMainApi.importTemplate()
}) })
</script> </script>

576
src/views/wms/productionManage/productredress/productredressJobMain/productredressJobMain.data.ts

@ -7,517 +7,667 @@ export const ProductredressJobMainRules = reactive({
export const ProductredressJobMain = useCrudSchemas(reactive<CrudSchema[]>([ export const ProductredressJobMain = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: 'id', label: '单据号',
field: 'id', field: 'number',
sort: 'custom', sort: 'custom',
table: {
width: 180,
fixed: 'left'
},
isForm: false, isForm: false,
isSearch: true,
}, },
{ {
label: '申请单号', label: '申请单号',
field: 'requestNumber', field: 'requestNumber',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: {
width: 180,
}, },
{
label: '生产计划单号',
field: 'productionPlanNumber',
sort: 'custom',
isSearch: true,
},
{
label: '车间代码',
field: 'workShopCode',
sort: 'custom',
},
{
label: '班组',
field: 'team',
sort: 'custom',
}, },
{ {
label: '班次', label: '状态',
field: 'shift', field: 'status',
dictType: DICT_TYPE.JOB_STATUS,
dictClass: 'string',
isSearch: true,
isTable: true,
sort: 'custom', sort: 'custom',
table: {
width: 150
}, },
{ form: {
label: '明细', value: '1',
field: 'details', componentProps: {
sort: 'custom', disabled: true
}
}
}, },
{ {
label: '申请时间', label: '申请时间',
field: 'requestTime', field: 'requestTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
style: {width: '100%'},
type: 'datetime', type: 'datetime',
valueFormat: 'x' dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
} }
}, },
isForm: false
}, },
{ {
label: '要求截止时间', label: '要求截止时间',
field: 'requestDueTime', field: 'requestDueTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
style: {width: '100%'},
type: 'datetime', type: 'datetime',
valueFormat: 'x' dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
} }
}, },
}, isForm: false
{
label: '状态',
field: 'status',
sort: 'custom',
form: {
component: 'Radio'
},
}, },
{ {
label: '过期时间', label: '过期时间',
field: 'expiredTime', field: 'expiredTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
style: {width: '100%'},
type: 'datetime', type: 'datetime',
valueFormat: 'x' dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
} }
}, },
}, isForm: false
{
label: '最后更新时间',
field: 'updateTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
},
{
label: '最后更新者Id',
field: 'updater',
sort: 'custom',
isForm: false,
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isForm: false,
},
{
label: '状态',
field: 'jobStageStatus',
sort: 'custom',
form: {
component: 'Radio'
},
}, },
{ {
label: '优先级', label: '优先级',
field: 'priority', field: 'priority',
sort: 'custom', sort: 'custom',
form: { isForm:false,
component: 'InputNumber', isTable:false,
value: 0
},
}, },
{ {
label: '优先级增量', label: '优先级增量',
field: 'priorityIncrement', field: 'priorityIncrement',
sort: 'custom', sort: 'custom',
form: { isForm:false,
component: 'InputNumber', isTable:false,
value: 0
},
}, },
{ {
label: '部门', label: '部门',
field: 'departmentCode', field: 'departmentCode',
sort: 'custom', sort: 'custom',
table: {
width: 150
}, },
{ isForm:false,
label: '用户组', isTable:false,
field: 'userGroupCode',
sort: 'custom',
}, },
{ {
label: '承接人用户ID', label: '承接人用户ID',
field: 'acceptUserId', field: 'acceptUserId',
sort: 'custom', sort: 'custom',
table: {
width: 180
},
isForm:false,
isTable:false,
}, },
{ {
label: '承接人用户名', label: '承接人用户名',
field: 'acceptUserName', field: 'acceptUserName',
sort: 'custom', sort: 'custom',
table: {
width: 180
},
}, },
{ {
label: '承接时间', label: '承接时间',
field: 'acceptTime', field: 'acceptTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
style: {width: '100%'},
type: 'datetime', type: 'datetime',
valueFormat: 'x' dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
} }
}, },
isForm: false
}, },
{ {
label: '完成人用户ID', label: '完成人用户ID',
field: 'completeUserId', field: 'completeUserId',
sort: 'custom', sort: 'custom',
table: {
width: 180
},
isForm:false,
isTable:false,
}, },
{ {
label: '完成人用户名', label: '完成人用户名',
field: 'completeUserName', field: 'completeUserName',
sort: 'custom', sort: 'custom',
table: {
width: 180
},
}, },
{ {
label: '完成时间', label: '完成时间',
field: 'completeTime', field: 'completeTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
style: {width: '100%'},
type: 'datetime', type: 'datetime',
valueFormat: 'x' dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
} }
}, },
isForm: false
}, },
{ {
label: '到仓库代码', label: '到仓库代码',
field: 'toWarehouseCode', field: 'toWarehouseCode',
sort: 'custom', sort: 'custom',
isForm:false,
isTable:false,
}, },
{ {
label: '到库区代码范围', label: '到库区代码范围',
field: 'toAreaCodes', field: 'toAreaCodes',
sort: 'custom', sort: 'custom',
isForm:false,
isTable:false,
}, },
{ {
label: '从库区类型范围', label: '从库区类型范围',
field: 'fromAreaTypes', field: 'fromAreaTypes',
sort: 'custom', sort: 'custom',
isForm:false,
isTable:false,
}, },
{ {
label: '到库区类型范围', label: '到库区类型范围',
field: 'toAreaTypes', field: 'toAreaTypes',
sort: 'custom', sort: 'custom',
}, isForm:false,
{ isTable:false,
label: '单据号',
field: 'number',
sort: 'custom',
},
{
label: '收货类型',
field: 'type',
sort: 'custom',
form: {
component: 'SelectV2'
},
}, },
{ {
label: '业务类型', label: '业务类型',
field: 'businessType', field: 'businessType',
sort: 'custom', sort: 'custom',
form: { isForm:false,
component: 'SelectV2' isTable:false,
},
}, },
{ {
label: '备注', label: '备注',
field: 'remark', field: 'remark',
sort: 'custom', sort: 'custom',
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
},
{
label: '创建者id',
field: 'creator',
sort: 'custom',
isForm:false, isForm:false,
isTable:false,
}, },
{ {
label: '自动完成', label: '自动完成',
field: 'autoComplete', field: 'autoComplete',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
sort: 'custom', sort: 'custom',
isForm:false,
isTable:false,
}, },
{ {
label: '允许修改库位', label: '允许修改库位',
field: 'allowModifyLocation', field: 'allowModifyLocation',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
sort: 'custom', sort: 'custom',
isForm:false,
isTable:false,
}, },
{ {
label: '允许修改数量', label: '允许修改数量',
field: 'allowModifyQty', field: 'allowModifyQty',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
sort: 'custom', sort: 'custom',
isForm:false,
isTable:false,
}, },
{ {
label: '允许大于推荐数量', label: '允许大于推荐数量',
field: 'allowBiggerQty', field: 'allowBiggerQty',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
sort: 'custom', sort: 'custom',
isForm:false,
isTable:false,
}, },
{ {
label: '允许小于推荐数量', label: '允许小于推荐数量',
field: 'allowSmallerQty', field: 'allowSmallerQty',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
sort: 'custom', sort: 'custom',
isForm:false,
isTable:false,
}, },
{ {
label: '允许修改库存状态', label: '允许修改库存状态',
field: 'allowModifyInventoryStatus', field: 'allowModifyInventoryStatus',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
sort: 'custom', sort: 'custom',
form: { isForm:false,
component: 'Radio' isTable:false,
},
}, },
{ {
label: '允许连续扫描', label: '允许连续扫描',
field: 'allowContinuousScanning', field: 'allowContinuousScanning',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
sort: 'custom', sort: 'custom',
isForm:false,
isTable:false,
}, },
{ {
label: '允许部分完成', label: '允许部分完成',
field: 'allowPartialComplete', field: 'allowPartialComplete',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
sort: 'custom', sort: 'custom',
isForm:false,
isTable:false,
}, },
{ {
label: '允许修改批次', label: '允许修改批次',
field: 'allowModifyBatch', field: 'allowModifyBatch',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
sort: 'custom', sort: 'custom',
isForm:false,
isTable:false,
}, },
{ {
label: '允许修改箱码', label: '允许修改箱码',
field: 'allowModifyPackingNumber', field: 'allowModifyPackingNumber',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
sort: 'custom', sort: 'custom',
isForm:false,
isTable:false,
}, },
{ {
label: '入库库存状态范围', label: '入库库存状态范围',
field: 'inInventoryStatuses', field: 'inInventoryStatuses',
sort: 'custom', sort: 'custom',
isForm:false,
isTable:false,
}, },
{ {
label: '出库库存状态范围', label: '出库库存状态范围',
field: 'outInventoryStatuses', field: 'outInventoryStatuses',
sort: 'custom', sort: 'custom',
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))
// 表单校验
export const ProductredressJobDetailRules = reactive({
})
export const ProductredressJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isForm:false, isForm:false,
isTable:false,
}, },
{ {
label: '生产线代码', label: '创建者',
field: 'productionLineCode', field: 'creator',
sort: 'custom',
isSearch: true,
},
{
label: '工位代码',
field: 'workStationCode',
sort: 'custom',
},
{
label: '工序代码',
field: 'processCode',
sort: 'custom', sort: 'custom',
table: {
width: 150
}, },
{ isForm: false,
label: '包装号',
field: 'packingNumber',
sort: 'custom',
}, },
{ {
label: '器具号', label: '创建时间',
field: 'containerNumber', field: 'createTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
}, },
{ table: {
label: '批次', width: 180
field: 'batch',
sort: 'custom',
}, },
{
label: '生产日期',
field: 'produceDate',
sort: 'custom',
formatter: dateFormatter,
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
style: {width: '100%'},
type: 'datetime', type: 'datetime',
valueFormat: 'x' dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
} }
}, },
isForm: false
}, },
{ {
label: '过期日期', label: '最后更新者',
field: 'expireDate', field: 'updater',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, table: {
form: { width: 150
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
}, },
isForm: false,
}, },
{ {
label: '库存状态', label: '最后更新时间',
field: 'inventoryStatus', field: 'updateTime',
sort: 'custom', sort: 'custom',
form: { formatter: dateFormatter,
component: 'Radio' detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
}, },
table: {
width: 180
}, },
{ form: {
label: '到库位代码', component: 'DatePicker',
field: 'toLocationCode', componentProps: {
sort: 'custom', style: {width: '100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
}, },
{ isForm: false
label: '订单号',
field: 'woNumber',
sort: 'custom',
}, },
]))
// 表单校验
export const ProductredressJobDetailRules = reactive({
})
export const ProductredressJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '订单行', label: '包装号',
field: 'woLine', field: 'packingNumber',
sort: 'custom', sort: 'custom',
table: {
width: 180
}, },
{
label: '包装数量',
field: 'packQty',
sort: 'custom',
}, },
{ {
label: '包装规格', label: '批次',
field: 'packUnit', field: 'batch',
sort: 'custom', sort: 'custom',
}, table: {
width: 150
},
},
// {
// label: '生产日期',
// field: 'produceDate',
// sort: 'custom',
// formatter: dateFormatter,
// detail: {
// dateFormat: 'YYYY-MM-DD HH:mm:ss'
// },
// table: {
// width: 180
// },
// form: {
// component: 'DatePicker',
// componentProps: {
// style: {width: '100%'},
// type: 'datetime',
// dateFormat: 'YYYY-MM-DD HH:mm:ss',
// valueFormat: 'x',
// }
// },
// isForm: false
// },
// {
// label: '过期日期',
// field: 'expireDate',
// sort: 'custom',
// formatter: dateFormatter,
// detail: {
// dateFormat: 'YYYY-MM-DD HH:mm:ss'
// },
// table: {
// width: 180
// },
// form: {
// component: 'DatePicker',
// componentProps: {
// style: {width: '100%'},
// type: 'datetime',
// dateFormat: 'YYYY-MM-DD HH:mm:ss',
// valueFormat: 'x',
// }
// },
// isForm: false
// },
{ {
label: '物品代码', label: '物品代码',
field: 'itemCode', field: 'itemCode',
sort: 'custom', sort: 'custom',
table: {
width: 150
},
}, },
{ {
label: '物品名称', label: '物品名称',
field: 'itemName', field: 'itemName',
sort: 'custom', sort: 'custom',
table: {
width: 150
},
}, },
{ {
label: '物品描述1', label: '物品描述1',
field: 'itemDesc1', field: 'itemDesc1',
sort: 'custom', sort: 'custom',
table: {
width: 150
},
}, },
{ {
label: '物品描述2', label: '物品描述2',
field: 'itemDesc2', field: 'itemDesc2',
sort: 'custom', sort: 'custom',
table: {
width: 150
},
}, },
{ {
label: '项目代码', label: '项目代码',
field: 'projectCode', field: 'projectCode',
sort: 'custom', sort: 'custom',
table: {
width: 150
},
}, },
{ {
label: '数量', label: '数量',
field: 'qty', field: 'qty',
sort: 'custom', sort: 'custom',
table: {
width: 150
},
}, },
{ {
label: '计量单位', label: '计量单位',
field: 'uom', field: 'uom',
sort: 'custom', sort: 'custom',
table: {
width: 150
},
}, },
{ {
label: '主表ID', label: '包装规格',
field: 'masterId', field: 'packUnit',
sort: 'custom', sort: 'custom',
form: { table: {
component: 'InputNumber', width: 150
value: 0
}, },
}, },
{ {
label: '单据号', label: '包装数量',
field: 'number', field: 'packQty',
sort: 'custom', sort: 'custom',
table: {
width: 150
},
}, },
// {
// label: '单据号',
// field: 'number',
// sort: 'custom',
// table: {
// width: 150
// },
// },
{ {
label: '备注', label: '库存状态',
field: 'remark', field: 'inventoryStatus',
sort: 'custom', sort: 'custom',
table: {
width: 150
},
}, },
{ {
label: '创建时间', label: '到库位代码',
field: 'createTime', field: 'toLocationCode',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, table: {
isForm: false, width: 150
},
}, },
{ {
label: '创建者Id', label: '订单号',
field: 'woNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '订单行',
field: 'woLine',
sort: 'custom',
table: {
width: 150
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
},
{
label: '创建者',
field: 'creator', field: 'creator',
sort: 'custom', sort: 'custom',
isForm: false, table: {
width: 150
},
}, },
{ {
label: '最后更新时间', label: '创建时间',
field: 'updateTime', field: 'createTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isForm: false, detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
isForm: false
}, },
{ {
label: '最后更新者Id', label: '最后更新者',
field: 'updater', field: 'updater',
sort: 'custom', sort: 'custom',
isForm: false, isForm: false,
table: {
width: 150
},
}, },
{ {
label: '到货主代码', label: '最后更新时间',
field: 'toOwnerCode', field: 'updateTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
}, },
{
label: '操作',
field: 'action',
isForm: false,
table: { table: {
width: 150, width: 180
fixed: 'right' },
form: {
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
} }
},
isForm: false
} }
])) ]))

2
src/views/wms/productionManage/productredress/productredressRequestMain/index.vue

@ -131,6 +131,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['packQty'] = val[0]['packQty'] row['packQty'] = val[0]['packQty']
row['packUnit'] = val[0]['packUnit'] row['packUnit'] = val[0]['packUnit']
row['inventoryStatus'] = val[0]['inventoryStatus'] row['inventoryStatus'] = val[0]['inventoryStatus']
row['toLocationCode'] = val[0]['locationCode']
} }
// //
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
@ -155,6 +156,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
setV['packQty'] = val[0]['packQty'] setV['packQty'] = val[0]['packQty']
setV['packUnit'] = val[0]['packUnit'] setV['packUnit'] = val[0]['packUnit']
setV['inventoryStatus'] = val[0]['inventoryStatus'] setV['inventoryStatus'] = val[0]['inventoryStatus']
setV['toLocationCode'] = val[0]['locationCode']
} }
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
formRef.setValues(setV) formRef.setValues(setV)

194
src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts

@ -112,42 +112,61 @@ export const ProductredressRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'toWarehouseCode', field: 'toWarehouseCode',
sort: 'custom', sort: 'custom',
isForm:false, isForm:false,
table: {
width: 150
},
}, },
{ {
label: '部门', label: '部门',
field: 'departmentCode', field: 'departmentCode',
sort: 'custom', sort: 'custom',
isForm:false, isForm:false,
table: {
width: 150
},
}, },
{ {
label: '自动提交', label: '自动提交',
field: 'autoCommit', field: 'autoCommit',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isForm:false, isForm:false,
isTable:false,
}, },
{ {
label: '自动通过', label: '自动通过',
field: 'autoAgree', field: 'autoAgree',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isForm:false, isForm:false,
isTable:false,
}, },
{ {
label: '自动执行', label: '自动执行',
field: 'autoExecute', field: 'autoExecute',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isForm:false, isForm:false,
isTable:false,
}, },
{ {
label: '直接生成记录', label: '直接生成记录',
field: 'directCreateRecord', field: 'directCreateRecord',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isForm:false, isForm:false,
isTable:false,
}, },
{ {
label: '业务类型', label: '业务类型',
field: 'businessType', field: 'businessType',
sort: 'custom', sort: 'custom',
isForm:false, isForm:false,
isTable:false,
}, },
{ {
label: '备注', label: '备注',
@ -158,31 +177,44 @@ export const ProductredressRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '到库区类型范围', label: '到库区类型范围',
field: 'toAreaTypes', field: 'toAreaTypes',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string',
isForm:false, isForm:false,
isTable:false,
}, },
{ {
label: '到库区代码范围', label: '到库区代码范围',
field: 'toAreaCodes', field: 'toAreaCodes',
sort: 'custom', sort: 'custom',
isForm:false, isForm:false,
isTable:false,
}, },
{ {
label: '入库库存状态范围', label: '入库库存状态范围',
field: 'inInventoryStatuses', field: 'inInventoryStatuses',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isForm:false, isForm:false,
isTable:false,
}, },
{ {
label: '出库库存状态范围', label: '出库库存状态范围',
field: 'outInventoryStatuses', field: 'outInventoryStatuses',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isForm:false, isForm:false,
isTable:false,
}, },
{ {
label: '创建者用户名', label: '创建者',
field: 'creator', field: 'creator',
sort: 'custom', sort: 'custom',
isForm: false, isForm: false,
table: {
width: 150
},
}, },
{ {
label: '创建时间', label: '创建时间',
@ -207,10 +239,13 @@ export const ProductredressRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false isForm: false
}, },
{ {
label: '最后更新者用户名', label: '最后更新者',
field: 'updater', field: 'updater',
sort: 'custom', sort: 'custom',
isForm: false, isForm: false,
table: {
width: 150
},
}, },
{ {
label: '最后更新时间', label: '最后更新时间',
@ -239,7 +274,7 @@ export const ProductredressRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'action', field: 'action',
isForm: false, isForm: false,
table: { table: {
width: 150, width: 180,
fixed: 'right' fixed: 'right'
} }
} }
@ -250,90 +285,6 @@ export const ProductredressRequestDetailRules = reactive({
}) })
export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
// {
// label: '生产线代码',
// field: 'productionLineCode',
// sort: 'custom',
// isSearch: true,
// },
// {
// label: '工位代码',
// field: 'workStationCode',
// sort: 'custom',
// },
// {
// label: '目标库位',
// field: 'toLocationCode',
// sort: 'custom',
// },
// {
// label: '工序代码',
// field: 'processCode',
// sort: 'custom',
// },
// {
// label: '器具号',
// field: 'containerNumber',
// sort: 'custom',
// },
// {
// label: '生产日期',
// field: 'produceDate',
// sort: 'custom',
// formatter: dateFormatter,
// detail: {
// dateFormat: 'YYYY-MM-DD HH:mm:ss'
// },
// table: {
// width: 180
// },
// form: {
// component: 'DatePicker',
// componentProps: {
// style: {width: '100%'},
// type: 'datetime',
// dateFormat: 'YYYY-MM-DD HH:mm:ss',
// valueFormat: 'x',
// }
// },
// isForm: false
// },
// {
// label: '过期日期',
// field: 'expireDate',
// formatter: dateFormatter,
// detail: {
// dateFormat: 'YYYY-MM-DD HH:mm:ss'
// },
// sort: 'custom',
// table: {
// width: 180
// },
// form: {
// component: 'DatePicker',
// componentProps: {
// style: {width: '100%'},
// type: 'datetime',
// dateFormat: 'YYYY-MM-DD HH:mm:ss',
// valueFormat: 'x',
// }
// },
// isForm: false
// },
// {
// label: '订单号',
// field: 'woNumber',
// sort: 'custom',
// },
// {
// label: '订单行',
// field: 'woLine',
// sort: 'custom',
// },
// { // {
// label: 'BOM版本', // label: 'BOM版本',
// field: 'bomVersion', // field: 'bomVersion',
@ -343,6 +294,9 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '单据号', label: '单据号',
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
table: {
width: 180
},
isForm: false, isForm: false,
isTableForm: false, isTableForm: false,
}, },
@ -370,7 +324,7 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
},{ },{
key: 'packingNumber', // 查询列表中字段 key: 'packingNumber', // 查询列表中字段
value: '', // 指查询具体值 value: '', // 指查询具体值
action: '!=', // 查询拼接条件 action: 'isNotStr', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件 isSearch: true, // 使用自定义拼接条件
isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
}] }]
@ -391,7 +345,7 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
},{ },{
key: 'packingNumber', // 查询列表中字段 key: 'packingNumber', // 查询列表中字段
value: '', // 指查询具体值 value: '', // 指查询具体值
action: '!=', // 查询拼接条件 action: 'isNotStr', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件 isSearch: true, // 使用自定义拼接条件
isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
}] }]
@ -401,6 +355,9 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '物品名称', label: '物品名称',
field: 'itemName', field: 'itemName',
sort: 'custom', sort: 'custom',
table: {
width: 150
},
isForm: false, isForm: false,
isTableForm: false, isTableForm: false,
}, },
@ -408,6 +365,9 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '物品描述1', label: '物品描述1',
field: 'itemDesc1', field: 'itemDesc1',
sort: 'custom', sort: 'custom',
table: {
width: 150
},
isForm: false, isForm: false,
isTableForm: false, isTableForm: false,
}, },
@ -415,6 +375,9 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '物品描述2', label: '物品描述2',
field: 'itemDesc2', field: 'itemDesc2',
sort: 'custom', sort: 'custom',
table: {
width: 150
},
isForm: false, isForm: false,
isTableForm: false, isTableForm: false,
}, },
@ -422,6 +385,9 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '项目代码', label: '项目代码',
field: 'projectCode', field: 'projectCode',
sort: 'custom', sort: 'custom',
table: {
width: 150
},
isForm: false, isForm: false,
isTableForm: false, isTableForm: false,
}, },
@ -429,6 +395,9 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '数量', label: '数量',
field: 'qty', field: 'qty',
sort: 'custom', sort: 'custom',
table: {
width: 150
},
tableForm: { tableForm: {
disabled: true disabled: true
}, },
@ -442,6 +411,25 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '计量单位', label: '计量单位',
field: 'uom', field: 'uom',
sort: 'custom', sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '库位',
field: 'toLocationCode',
sort: 'custom',
table: {
width: 150
},
tableForm: { tableForm: {
disabled: true disabled: true
}, },
@ -455,6 +443,9 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '包装号', label: '包装号',
field: 'packingNumber', field: 'packingNumber',
sort: 'custom', sort: 'custom',
table: {
width: 150
},
tableForm: { tableForm: {
disabled: true disabled: true
}, },
@ -469,6 +460,9 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
field: 'batch', field: 'batch',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: {
width: 150
},
tableForm: { tableForm: {
disabled: true disabled: true
}, },
@ -482,6 +476,9 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '包装数量', label: '包装数量',
field: 'packQty', field: 'packQty',
sort: 'custom', sort: 'custom',
table: {
width: 150
},
tableForm: { tableForm: {
disabled: true disabled: true
}, },
@ -495,6 +492,9 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '包装规格', label: '包装规格',
field: 'packUnit', field: 'packUnit',
sort: 'custom', sort: 'custom',
table: {
width: 150
},
tableForm: { tableForm: {
disabled: true disabled: true
}, },
@ -508,6 +508,9 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '库存状态', label: '库存状态',
field: 'inventoryStatus', field: 'inventoryStatus',
sort: 'custom', sort: 'custom',
table: {
width: 150
},
tableForm: { tableForm: {
disabled: true disabled: true
}, },
@ -521,11 +524,17 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '备注', label: '备注',
field: 'remark', field: 'remark',
sort: 'custom', sort: 'custom',
table: {
width: 150
},
}, },
{ {
label: '创建者用户名', label: '创建者',
field: 'creator', field: 'creator',
sort: 'custom', sort: 'custom',
table: {
width: 150
},
isTableForm: false, isTableForm: false,
isForm: false, isForm: false,
}, },
@ -553,9 +562,12 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
isForm: false isForm: false
}, },
{ {
label: '最后更新者用户名', label: '最后更新者',
field: 'updater', field: 'updater',
sort: 'custom', sort: 'custom',
table: {
width: 150
},
isForm: false, isForm: false,
isTableForm: false, isTableForm: false,
}, },

Loading…
Cancel
Save