Browse Source

物料降级展示字段

master_hella_20240701
chenfang 6 months ago
parent
commit
e6b22d9fca
  1. 238
      src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue
  2. 220
      src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/relegateRequestMain.data.ts
  3. 6
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue

238
src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue

@ -1,90 +1,74 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="[...RelegateRequestMain.allSchemas.searchSchema,...RelegateRequestDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" /> <Search :schema="[...RelegateRequestMain.allSchemas.searchSchema, ...RelegateRequestDetail.allSchemas.searchSchema]"
@search="setSearchParams" @reset="setSearchParams" />
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
<TableHead <TableHead :HeadButttondata="HeadButttondata" @button-base-click="buttonBaseClick" :routeName="routeName"
:HeadButttondata="HeadButttondata" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick"
@button-base-click="buttonBaseClick" :allSchemas="RelegateRequestMain.allSchemas" :detailAllSchemas="RelegateRequestDetail.allSchemas" />
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="RelegateRequestMain.allSchemas"
:detailAllSchemas="RelegateRequestDetail.allSchemas"
/>
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <ContentWrap>
<Table <Table :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{
:columns="tableColumns" total: tableObject.total
:data="tableObject.tableList" }" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage"
:loading="tableObject.loading" v-model:sort="tableObject.sort">
:pagination="{ <template #number="{ row }">
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #number="{row}">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> <el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span> <span>{{ row.number }}</span>
</el-button> </el-button>
</template> </template>
<template #action="{ row,$index }"> <template #action="{ row, $index }">
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" /> <ButtonBase :Butttondata="butttondata(row, $index)" @button-base-click="buttonTableClick($event, row)" />
</template> </template>
</Table> </Table>
</ContentWrap> </ContentWrap>
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm ref="basicFormRef"
ref="basicFormRef" :isOpenSearchTable="false"
:isOpenSearchTable="true" fieldTableColumn="itemCode"
fieldTableColumn="itemCode"
@success="getList" @success="getList"
:rules="RelegateRequestMainRules" :rules="RelegateRequestMainRules"
:formAllSchemas="RelegateRequestMain.allSchemas" :formAllSchemas="RelegateRequestMain.allSchemas"
:tableAllSchemas="RelegateRequestDetail.allSchemas" :tableAllSchemas="RelegateRequestDetail.allSchemas"
:tableFormRules="RelegateRequestDetailRules" :tableFormRules="RelegateRequestDetailRules"
:tableData="tableData" :tableData="tableData"
:apiUpdate="RelegateRequestMainApi.updateRelegateRequestMain" :apiUpdate="RelegateRequestMainApi.updateRelegateRequestMain"
:apiCreate="RelegateRequestMainApi.createRelegateRequestMain" :apiCreate="RelegateRequestMainApi.createRelegateRequestMain"
:isBusiness="true" :isBusiness="true" fromeWhere="RelegateRequestMain"
fromeWhere="RelegateRequestMain" @handleAddTable="handleAddTable"
@handleAddTable="handleAddTable" @handleDeleteTable="handleDeleteTable"
@handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
@submitForm="submitForm" @submitForm="submitForm"
:isShowButton = isShowButton :isShowButton=isShowButton />
/>
<!-- 详情 --> <!-- 详情 -->
<Detail <Detail ref="detailRef"
ref="detailRef"
:isBasic="true" :isBasic="true"
:allSchemas="RelegateRequestMain.allSchemas" :allSchemas="RelegateRequestMain.allSchemas"
:detailAllSchemas="RelegateRequestDetail.allSchemas" :detailAllSchemas="RelegateRequestDetail.allSchemas"
:detailAllSchemasRules="RelegateRequestDetailRules" :detailAllSchemasRules="RelegateRequestDetailRules"
:apiCreate="RelegateRequestDetailApi.createRelegateRequestDetail" :apiCreate="RelegateRequestDetailApi.createRelegateRequestDetail"
:apiUpdate="RelegateRequestDetailApi.updateRelegateRequestDetail" :apiUpdate="RelegateRequestDetailApi.updateRelegateRequestDetail"
:apiPage="RelegateRequestDetailApi.getRelegateRequestDetailPage" :apiPage="RelegateRequestDetailApi.getRelegateRequestDetailPage"
:apiDelete="RelegateRequestDetailApi.deleteRelegateRequestDetail" :apiDelete="RelegateRequestDetailApi.deleteRelegateRequestDetail"
fromeWhere="RelegateRequestMain" fromeWhere="RelegateRequestMain"
@searchTableSuccessDetail="searchTableSuccessDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
:detailButtonIsShowAdd="trueFalse" :detailButtonIsShowAdd="trueFalse"
:detailButtonIsShowDelete="trueFalse" :detailButtonIsShowDelete="trueFalse" />
/>
<!-- 导入 --> <!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/relegate-request-main/import" :importTemplateData="importTemplateData" @success="importSuccess" /> <ImportForm ref="importFormRef" url="/wms/relegate-request-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { RelegateRequestMain,RelegateRequestMainRules,RelegateRequestDetail,RelegateRequestDetailRules } from './relegateRequestMain.data' import { RelegateRequestMain, RelegateRequestMainRules, RelegateRequestDetail, RelegateRequestDetailRules } from './relegateRequestMain.data'
import * as RelegateRequestMainApi from '@/api/wms/relegateRequestMain' import * as RelegateRequestMainApi from '@/api/wms/relegateRequestMain'
import * as RelegateRequestDetailApi from '@/api/wms/relegateRequestDetail' import * as RelegateRequestDetailApi from '@/api/wms/relegateRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
@ -99,34 +83,100 @@ const { t } = useI18n() // 国际化
const route = useRoute() // const route = useRoute() //
const routeName = ref() const routeName = ref()
const businessType = 'relegate'
routeName.value = route.name routeName.value = route.name
const tableColumns = ref([...RelegateRequestMain.allSchemas.tableColumns,...RelegateRequestDetail.allSchemas.tableMainColumns]) const tableColumns = ref([...RelegateRequestMain.allSchemas.tableColumns, ...RelegateRequestDetail.allSchemas.tableMainColumns])
const isShowButton = ref(true) const isShowButton = ref(true)
// // // //
const trueFalse = ref(false) const trueFalse = ref(false)
// //
const searchTableSuccess = (formField, searchField, val, formRef) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(() => { nextTick(() => {
const setV = {} if (type == 'tableForm') {
setV[formField] = val[0][searchField] if (formField == 'itemCode') {
formRef.setValues(setV) row['itemCode'] = val[0]['itemCode']
row['uom'] = val[0]['uom']
row['qty'] = val[0]['qty']
row['fromBatch'] = val[0]['batch']
row['fromPackingNumber'] = val[0]['packingNumber']
row['toBatch'] = val[0]['batch']
row['toPackingNumber'] = val[0]['packingNumber']
row['fromLocationCode'] = val[0]['locationCode']
row['fromInventoryStatus'] = val[0]['inventoryStatus']
} else if (formField == 'downItemCode') {
row['downItemCode'] = val[0]['code']
} else if (formField == 'toLocationCode') {
row['toLocationCode'] = val[0]['code']
} else {
row[formField] = val[0][searchField]
}
} else {
const setV = {}
setV[formField] = val[0][searchField]
if (formField == 'fromWarehouseCode') {
setV['fromWarehouseCode'] = val[0]['code']
}
formRef.setValues(setV)
}
}) })
} }
// //
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(() => { nextTick(() => {
const setV = {} const setV = {}
if(formField == 'itemCode') { setV[formField] = val[0][searchField]
setV['itemCode'] = val[0]['itemCode']
setV['uom'] = val[0]['customerUom']
}else {
setV[formField] = val[0][searchField]
}
formRef.setValues(setV) formRef.setValues(setV)
}) })
} }
// tableform
RelegateRequestDetail.allSchemas.tableFormColumns.map(item => {
if (item.field == 'itemCode') {
item.tableForm.searchCondition = [
{
key: 'businessType',
value: businessType,
isMainValue: false
}
]
item.form.componentProps.searchCondition = [
{
key: 'businessType',
value: businessType,
isMainValue: false
}
]
}
if (item.field == "toLocationCode") {
item.tableForm.searchCondition = [
{
key: 'businessType',
value: businessType,
isMainValue: false
}]
item.form.componentProps.searchCondition = [
{
key: 'businessType',
value: businessType,
isMainValue: false
}]
item.tableForm.searchCondition = [
{
key: 'businessType',
value: businessType,
isMainValue: false
}]
item.form.componentProps.searchCondition = [
{
key: 'businessType',
value: businessType,
isMainValue: false
}]
}
})
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
tableColumns.value = val tableColumns.value = val
@ -141,9 +191,9 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:relegate-request-main:create'}), // defaultButtons.defaultAddBtn({ hasPermi: 'wms:relegate-request-main:create' }), //
defaultButtons.defaultImportBtn({hasPermi:'wms:relegate-request-main:import'}), // defaultButtons.defaultImportBtn({ hasPermi: 'wms:relegate-request-main:import' }), //
defaultButtons.defaultExportBtn({hasPermi:'wms:relegate-request-main:export'}), // defaultButtons.defaultExportBtn({ hasPermi: 'wms:relegate-request-main:export' }), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null), //
@ -174,7 +224,7 @@ const buttonBaseClick = (val, item) => {
} }
// //
const isShowMainButton = (row,val) => { const isShowMainButton = (row, val) => {
if (val.indexOf(row.status) > -1) { if (val.indexOf(row.status) > -1) {
return false return false
} else { } else {
@ -183,15 +233,15 @@ const isShowMainButton = (row,val) => {
} }
// - // -
const butttondata = (row,$index) => { const butttondata = (row, $index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1 const findIndex = row['masterId'] ? tableObject.tableList.findIndex(item => item['masterId'] == row['masterId']) : -1
if(findIndex>0&&findIndex<$index){ if (findIndex > 0 && findIndex < $index) {
return [] return []
} }
return [ return [
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:relegate-request-main:update'}), // defaultButtons.mainListEditBtn({ hide: isShowMainButton(row, ['1']), hasPermi: 'wms:relegate-request-main:update' }), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:relegate-request-main:delete'}), // defaultButtons.mainListDeleteBtn({ hasPermi: 'wms:relegate-request-main:delete' }), //
] ]
} }
// - // -
@ -211,46 +261,46 @@ const openForm = (type: string, row?: any) => {
//true0 //true0
const flag = ref(false) const flag = ref(false)
// form // form
const submitForm = async (formType,data) => { const submitForm = async (formType, data) => {
data.subList = tableData.value // data.subList = tableData.value //
let isExist = false let isExist = false
tableData.value.forEach(item => { tableData.value.forEach(item => {
let rs = tableData.value.filter(filterItem => (filterItem.itemCode == item.itemCode)) let rs = tableData.value.filter(filterItem => (filterItem.itemCode == item.itemCode))
if(rs.length > 1) isExist = true if (rs.length > 1) isExist = true
}) })
if (isExist) { if (isExist) {
basicFormRef.value.formLoading = false basicFormRef.value.formLoading = false
return message.warning('物料代码重复') return message.warning('物料代码重复')
} }
data.subList.forEach(obj => { data.subList.forEach(obj => {
if(obj.qty == 0){ if (obj.qty == 0) {
message.warning(`数量不能为0!`) message.warning(`数量不能为0!`)
flag.value = true flag.value = true
return; return;
} }
}) })
if(flag.value){ if (flag.value) {
basicFormRef.value.formLoading = false basicFormRef.value.formLoading = false
return return
} }
try { try {
if (formType === 'create') { if (formType === 'create') {
if(tableData.value.length <= 0){ if (tableData.value.length <= 0) {
message.warning(`子表明细不能为空!`) message.warning(`子表明细不能为空!`)
flag.value = true flag.value = true
basicFormRef.value.formLoading = false basicFormRef.value.formLoading = false
return; return;
} }
await RelegateRequestMainApi.createRelegateRequestMain(data) await RelegateRequestMainApi.createRelegateRequestMain(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
} else { } else {
await RelegateRequestMainApi.updateRelegateRequestMain(data) await RelegateRequestMainApi.updateRelegateRequestMain(data)
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
} }
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false
getList() getList()
} finally { } finally {
basicFormRef.value.formLoading = false basicFormRef.value.formLoading = false
} }
} }
@ -270,7 +320,7 @@ const handleDelete = async (id: number) => {
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
// //
await getList() await getList()
} catch {} } catch { }
} }
/** /**

220
src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/relegateRequestMain.data.ts

@ -11,6 +11,9 @@ import * as WarehouseApi from "@/api/wms/warehouse";
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 LocationApi from '@/api/wms/location'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
import * as confgiApi from '@/api/infra/config'
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
const queryParams = { const queryParams = {
pageSize:10, pageSize:10,
@ -19,6 +22,7 @@ const queryParams = {
} }
const data = await getRequestsettingApi.getRequestsettingPage(queryParams) const data = await getRequestsettingApi.getRequestsettingPage(queryParams)
const requestsettingData =data?.list[0]||{} const requestsettingData =data?.list[0]||{}
const confgiData = await confgiApi.queryByKey("relegateItemType")
// 表单校验 // 表单校验
export const RelegateRequestMainRules = reactive({ export const RelegateRequestMainRules = reactive({
fromWarehouseCode: [required], fromWarehouseCode: [required],
@ -39,7 +43,10 @@ export const RelegateRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm: false isForm: false,
table: {
width: 180
},
}, },
{ {
label: '从仓库代码', label: '从仓库代码',
@ -60,14 +67,16 @@ export const RelegateRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
isMainValue: false isMainValue: false
}] }]
} }
} },
table: {
width: 180
},
}, },
{ {
label: '业务类型', label: '业务类型',
field: 'businessType', field: 'businessType',
sort: 'custom', sort: 'custom',
isSearch: true,
isForm: false, isForm: false,
isTable: false isTable: false
}, },
@ -75,7 +84,6 @@ export const RelegateRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '备注', label: '备注',
field: 'remark', field: 'remark',
sort: 'custom', sort: 'custom',
isSearch: true,
isForm: false, isForm: false,
isTable: false isTable: false
}, },
@ -269,7 +277,6 @@ export const RelegateRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '原因', label: '原因',
field: 'reason', field: 'reason',
sort: 'custom', sort: 'custom',
isForm: false,
}, },
{ {
label: '操作', label: '操作',
@ -303,16 +310,33 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
isSearchList: true, isSearchList: true,
searchListPlaceholder: '请选择物料代码', searchListPlaceholder: '请选择物料代码',
searchField: 'itemCode', searchField: 'itemCode',
searchTitle: '物料基础信息', searchTitle: '库存余额信息',
searchAllSchemas: Itembasic.allSchemas, searchAllSchemas: Balance.allSchemas,
searchPage: ItembasicApi.getItembasicPage, searchPage: BalanceApi.getBalancePageByBusinessTypeByItemType,
searchCondition: [{ searchCondition: [{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
}] }]
} }
} },
tableForm:{
isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '库存余额信息', // 查询弹窗标题
searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类
searchPage: BalanceApi.getBalancePageByBusinessTypeByItemType, // 查询弹窗所需分页方法
searchCondition:[
{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
table: {
width: 150
},
}, },
{ {
label: '降级物料代码', label: '降级物料代码',
@ -322,7 +346,7 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
isSearchList: true, isSearchList: true,
searchListPlaceholder: '请选择降级物料代码', searchListPlaceholder: '请选择降级物料代码',
searchField: 'itemCode', searchField: 'code',
searchTitle: '物料基础信息', searchTitle: '物料基础信息',
searchAllSchemas: Itembasic.allSchemas, searchAllSchemas: Itembasic.allSchemas,
searchPage: ItembasicApi.getItembasicPage, searchPage: ItembasicApi.getItembasicPage,
@ -330,10 +354,35 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},{
key: 'type',
value: confgiData.itemType,
isMainValue: false
}] }]
} }
}, },
isSearch: true tableForm:{
isInpuFocusShow: true,
searchListPlaceholder: '请选择降级物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '物料基础信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
searchCondition:[
{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'type',
value: confgiData.itemType,
isMainValue: false
}]
},
isSearch: true,
table: {
width: 150
},
}, },
{ {
label: '计量单位', label: '计量单位',
@ -342,7 +391,7 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
dictClass: 'string', dictClass: 'string',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 80
}, },
tableForm: { tableForm: {
type: 'Select', type: 'Select',
@ -358,6 +407,17 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
label: '数量', label: '数量',
field: 'qty', field: 'qty',
sort: 'custom', sort: 'custom',
form: {
componentProps: {
disabled: true
}
},
tableForm: {
disabled: true
},
table: {
width: 80
},
}, },
{ {
label: '从批次', label: '从批次',
@ -368,6 +428,12 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
disabled: true, disabled: true,
} }
}, },
tableForm: {
disabled: true
},
table: {
width: 120
},
}, },
{ {
label: '从包装号', label: '从包装号',
@ -378,6 +444,12 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
disabled: true, disabled: true,
} }
}, },
tableForm: {
disabled: true
},
table: {
width: 120
},
}, },
{ {
label: '从库位代码', label: '从库位代码',
@ -388,90 +460,150 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
disabled: true, disabled: true,
} }
}, },
tableForm: {
disabled: true
},
table: {
width: 120
},
}, },
{ {
label: '从库区类型', label: '从库区类型',
field: 'fromAreaTypes', field: 'fromAreaTypes',
dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string',
isTable: false,
isForm: false,
isTableForm: false,
sort: 'custom', sort: 'custom',
isForm:false,
}, },
{ {
label: '从库区代码', label: '从库区代码',
field: 'fromAreaCodes', field: 'fromAreaCodes',
sort: 'custom', sort: 'custom',
isForm:false, isForm:false,
}, isTableForm: false,
{ table: {
label: '从仓库代码', width: 150
field: 'fromWarehouseCode', },
sort: 'custom',
isForm:false,
}, },
{ {
label: '到包装号', label: '到包装号',
field: 'toPackingNumber', field: 'toPackingNumber',
sort: 'custom', sort: 'custom',
tableForm: {
disabled: true
},
table: {
width: 120
},
}, },
{ {
label: '到批次', label: '到批次',
field: 'toBatch', field: 'toBatch',
sort: 'custom', sort: 'custom',
tableForm: {
disabled: true
},
table: {
width: 120
},
}, },
{ {
label: '到库位代码', label: '到库位代码',
field: 'toLocationCode', field: 'toLocationCode',
sort: 'custom', sort: 'custom',
}, tableForm:{
{ isInpuFocusShow: true, // 开启查询弹窗
label: '到仓库代码', searchListPlaceholder: '请选择到库位代码',
field: 'toWarehouseCode', searchField: 'code',
sort: 'custom', searchTitle: '库位信息',
isForm:false, searchAllSchemas: Location.allSchemas,
searchPage: LocationApi.selectBusinessTypeToLocation,
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择到库位代码',
searchField: 'code',
searchTitle: '库位信息',
searchAllSchemas: Location.allSchemas,
searchPage: LocationApi.selectBusinessTypeToLocation,
}
},
table: {
width: 120
},
}, },
{ {
label: '到库区类型', label: '到库区类型',
field: 'toAreaTypes', field: 'toAreaTypes',
dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string',
isTable: false,
sort: 'custom', sort: 'custom',
isForm:false, isTableForm: false
}, },
{ {
label: '到库区代码', label: '到库区代码',
field: 'toAreaCodes', field: 'toAreaCodes',
sort: 'custom', sort: 'custom',
isForm:false, isForm:false,
isTableForm: false,
table: {
width: 150
},
},
{
label: '到仓库代码',
field: 'toWarehouseCode',
sort: 'custom',
isForm:false,
isTableForm: false,
table: {
width: 150
},
}, },
{ {
label: '是否可用', label: '是否可用',
field: 'available', field: 'available',
sort: 'custom', sort: 'custom',
isForm:false, isForm:false,
isTableForm: false,
isTable:false,
}, },
{ {
label: '备注', label: '备注',
field: 'remark', field: 'remark',
sort: 'custom', sort: 'custom',
isForm:false,
isTableForm: false,
isTable:false,
}, },
{ {
label: '部门', label: '部门',
field: 'departmentCode', field: 'departmentCode',
sort: 'custom', sort: 'custom',
isForm:false, isForm:false,
isTableForm: false,
isTable:false,
}, },
{ {
label: '地点ID', label: '地点ID',
field: 'siteId', field: 'siteId',
sort: 'custom', sort: 'custom',
form: {
component: 'InputNumber',
value: 0
},
isForm:false, isForm:false,
isTableForm: false,
isTable:false,
}, },
{ {
label: '扩展属性', label: '扩展属性',
field: 'extraProperties', field: 'extraProperties',
sort: 'custom', sort: 'custom',
isForm:false, isForm:false,
isTableForm: false,
isTable:false,
}, },
{ {
label: '创建时间', label: '创建时间',
@ -486,20 +618,21 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
} }
}, },
isForm: false, isForm:false,
isTableForm: false,
isTable:false,
}, },
{ {
label: '状态', label: '状态',
field: 'status', field: 'status',
dictType: DICT_TYPE.REQUEST_STATUS, dictType: DICT_TYPE.REQUEST_STATUS,
dictClass: 'string', dictClass: 'string',
isSearch: true,
isForm: false, isForm: false,
isTable: true, isTable: true,
sort: 'custom', sort: 'custom',
table: { isForm:false,
width: 150 isTableForm: false,
}, isTable:false,
}, },
{ {
label: '并发乐观锁', label: '并发乐观锁',
@ -510,30 +643,37 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
component: 'InputNumber', component: 'InputNumber',
value: 0 value: 0
}, },
isForm:false,
isTableForm: false,
isTable:false,
}, },
{ {
label: '工作流流水号', label: '工作流流水号',
field: 'serialNumber', field: 'serialNumber',
isForm:false, isForm:false,
sort: 'custom', sort: 'custom',
isForm:false,
isTableForm: false,
isTable:false,
}, },
{ {
label: '权限所属人员id', label: '权限所属人员id',
field: 'ruleUserId', field: 'ruleUserId',
sort: 'custom', sort: 'custom',
isForm:false, isForm:false,
form: { isForm:false,
component: 'InputNumber', isTableForm: false,
value: 0 isTable:false,
},
}, },
{ {
label: '操作', label: '操作',
field: 'action', field: 'action',
isForm: false, isForm: false,
hiddenInMain:true,
table: { table: {
width: 150, width: 150,
fixed: 'right' fixed: 'right'
} },
isTableForm: false
} }
])) ]))

6
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue

@ -214,7 +214,6 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
row['itemDesc2'] = val[0]['itemDesc2'] row['itemDesc2'] = val[0]['itemDesc2']
row['batch'] = val[0]['batch'] row['batch'] = val[0]['batch']
row['altBatch'] = val[0]['altBatch'] row['altBatch'] = val[0]['altBatch']
row['packingNumber'] = val[0]['packingNumber']
row['containerNumber'] = val[0]['containerNumber'] row['containerNumber'] = val[0]['containerNumber']
row['qty'] = val[0]['qty'] row['qty'] = val[0]['qty']
row['uom'] = val[0]['uom'] row['uom'] = val[0]['uom']
@ -244,7 +243,6 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
if(formField == 'itemCode'){ if(formField == 'itemCode'){
row['batch'] = val[0]['toBatch'] row['batch'] = val[0]['toBatch']
row['packingNumber'] = val[0]['toPackingNumber']
row['containerNumber'] = val[0]['toContainerNumber'] row['containerNumber'] = val[0]['toContainerNumber']
row['containerNumber'] = val[0]['containerNumber'] row['containerNumber'] = val[0]['containerNumber']
row['containerNumber'] = val[0]['containerNumber'] row['containerNumber'] = val[0]['containerNumber']
@ -268,7 +266,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
if (res) tableData.value = res if (res) tableData.value = res
tableData.value.forEach((item) => { tableData.value.forEach((item) => {
item.batch = item.toBatch item.batch = item.toBatch
item.packingNumber = item.toPackingNumber item.packingNumber = null
item.containerNumber = item.toContainerNumber item.containerNumber = item.toContainerNumber
item.receiptQty = item.qty item.receiptQty = item.qty
item.toLocationGroupCode = null item.toLocationGroupCode = null
@ -331,7 +329,6 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
setV['itemDesc2'] = val[0]['itemDesc2'] setV['itemDesc2'] = val[0]['itemDesc2']
setV['batch'] = val[0]['toBatch'] setV['batch'] = val[0]['toBatch']
setV['altBatch'] = val[0]['altBatch'] setV['altBatch'] = val[0]['altBatch']
setV['packingNumber'] = val[0]['toPackingNumber']
setV['containerNumber'] = val[0]['toContainerNumber'] setV['containerNumber'] = val[0]['toContainerNumber']
setV['receiptQty'] = val[0]['qty'] setV['receiptQty'] = val[0]['qty']
setV['qty'] = val[0]['qty'] setV['qty'] = val[0]['qty']
@ -362,7 +359,6 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
if(formField == 'itemCode'){ if(formField == 'itemCode'){
setV['batch'] = val[0]['toBatch'] setV['batch'] = val[0]['toBatch']
setV['packingNumber'] = val[0]['toPackingNumber']
setV['containerNumber'] = val[0]['toContainerNumber'] setV['containerNumber'] = val[0]['toContainerNumber']
setV['containerNumber'] = val[0]['containerNumber'] setV['containerNumber'] = val[0]['containerNumber']
setV['containerNumber'] = val[0]['containerNumber'] setV['containerNumber'] = val[0]['containerNumber']

Loading…
Cancel
Save