Browse Source

物料降级展示字段

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

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

@ -1,33 +1,21 @@
<template>
<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>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="RelegateRequestMain.allSchemas"
:detailAllSchemas="RelegateRequestDetail.allSchemas"
/>
<TableHead :HeadButttondata="HeadButttondata" @button-base-click="buttonBaseClick" :routeName="routeName"
@updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick"
:allSchemas="RelegateRequestMain.allSchemas" :detailAllSchemas="RelegateRequestDetail.allSchemas" />
<!-- 列表 -->
<ContentWrap>
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
<Table :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
}" 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)">
<span>{{ row.number }}</span>
@ -40,9 +28,8 @@
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
:isOpenSearchTable="true"
<BasicForm ref="basicFormRef"
:isOpenSearchTable="false"
fieldTableColumn="itemCode"
@success="getList"
:rules="RelegateRequestMainRules"
@ -52,18 +39,15 @@
:tableData="tableData"
:apiUpdate="RelegateRequestMainApi.updateRelegateRequestMain"
:apiCreate="RelegateRequestMainApi.createRelegateRequestMain"
:isBusiness="true"
fromeWhere="RelegateRequestMain"
:isBusiness="true" fromeWhere="RelegateRequestMain"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
:isShowButton = isShowButton
/>
:isShowButton=isShowButton />
<!-- 详情 -->
<Detail
ref="detailRef"
<Detail ref="detailRef"
:isBasic="true"
:allSchemas="RelegateRequestMain.allSchemas"
:detailAllSchemas="RelegateRequestDetail.allSchemas"
@ -75,11 +59,11 @@
fromeWhere="RelegateRequestMain"
@searchTableSuccessDetail="searchTableSuccessDetail"
: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>
<script setup lang="ts">
@ -99,6 +83,7 @@ const { t } = useI18n() // 国际化
const route = useRoute() //
const routeName = ref()
const businessType = 'relegate'
routeName.value = route.name
const tableColumns = ref([...RelegateRequestMain.allSchemas.tableColumns, ...RelegateRequestDetail.allSchemas.tableMainColumns])
const isShowButton = ref(true)
@ -106,11 +91,34 @@ const isShowButton = ref(true)
const trueFalse = ref(false)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(() => {
if (type == 'tableForm') {
if (formField == 'itemCode') {
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)
}
})
}
@ -118,15 +126,57 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
if(formField == 'itemCode') {
setV['itemCode'] = val[0]['itemCode']
setV['uom'] = val[0]['customerUom']
}else {
setV[formField] = val[0][searchField]
}
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) => {
tableColumns.value = val

214
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 { 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 = {
pageSize:10,
@ -19,6 +22,7 @@ const queryParams = {
}
const data = await getRequestsettingApi.getRequestsettingPage(queryParams)
const requestsettingData =data?.list[0]||{}
const confgiData = await confgiApi.queryByKey("relegateItemType")
// 表单校验
export const RelegateRequestMainRules = reactive({
fromWarehouseCode: [required],
@ -39,7 +43,10 @@ export const RelegateRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'number',
sort: 'custom',
isSearch: true,
isForm: false
isForm: false,
table: {
width: 180
},
},
{
label: '从仓库代码',
@ -60,14 +67,16 @@ export const RelegateRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
isMainValue: false
}]
}
}
},
table: {
width: 180
},
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
isSearch: true,
isForm: false,
isTable: false
},
@ -75,7 +84,6 @@ export const RelegateRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true,
isForm: false,
isTable: false
},
@ -269,7 +277,6 @@ export const RelegateRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '原因',
field: 'reason',
sort: 'custom',
isForm: false,
},
{
label: '操作',
@ -303,16 +310,33 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
isSearchList: true,
searchListPlaceholder: '请选择物料代码',
searchField: 'itemCode',
searchTitle: '物料基础信息',
searchAllSchemas: Itembasic.allSchemas,
searchPage: ItembasicApi.getItembasicPage,
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.getBalancePageByBusinessTypeByItemType,
searchCondition: [{
key: 'available',
value: 'TRUE',
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: '降级物料代码',
@ -322,7 +346,7 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择降级物料代码',
searchField: 'itemCode',
searchField: 'code',
searchTitle: '物料基础信息',
searchAllSchemas: Itembasic.allSchemas,
searchPage: ItembasicApi.getItembasicPage,
@ -330,10 +354,35 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
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: '计量单位',
@ -342,7 +391,7 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
dictClass: 'string',
sort: 'custom',
table: {
width: 150
width: 80
},
tableForm: {
type: 'Select',
@ -358,6 +407,17 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
label: '数量',
field: 'qty',
sort: 'custom',
form: {
componentProps: {
disabled: true
}
},
tableForm: {
disabled: true
},
table: {
width: 80
},
},
{
label: '从批次',
@ -368,6 +428,12 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
disabled: true,
}
},
tableForm: {
disabled: true
},
table: {
width: 120
},
},
{
label: '从包装号',
@ -378,6 +444,12 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
disabled: true,
}
},
tableForm: {
disabled: true
},
table: {
width: 120
},
},
{
label: '从库位代码',
@ -388,90 +460,150 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
disabled: true,
}
},
tableForm: {
disabled: true
},
table: {
width: 120
},
},
{
label: '从库区类型',
field: 'fromAreaTypes',
sort: 'custom',
dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string',
isTable: false,
isForm: false,
isTableForm: false,
sort: 'custom',
},
{
label: '从库区代码',
field: 'fromAreaCodes',
sort: 'custom',
isForm:false,
isTableForm: false,
table: {
width: 150
},
{
label: '从仓库代码',
field: 'fromWarehouseCode',
sort: 'custom',
isForm:false,
},
{
label: '到包装号',
field: 'toPackingNumber',
sort: 'custom',
tableForm: {
disabled: true
},
table: {
width: 120
},
},
{
label: '到批次',
field: 'toBatch',
sort: 'custom',
tableForm: {
disabled: true
},
table: {
width: 120
},
},
{
label: '到库位代码',
field: 'toLocationCode',
sort: 'custom',
tableForm:{
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择到库位代码',
searchField: 'code',
searchTitle: '库位信息',
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: '到仓库代码',
field: 'toWarehouseCode',
sort: 'custom',
isForm:false,
},
{
label: '到库区类型',
field: 'toAreaTypes',
dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string',
isTable: false,
sort: 'custom',
isForm:false,
isTableForm: false
},
{
label: '到库区代码',
field: 'toAreaCodes',
sort: 'custom',
isForm:false,
isTableForm: false,
table: {
width: 150
},
},
{
label: '到仓库代码',
field: 'toWarehouseCode',
sort: 'custom',
isForm:false,
isTableForm: false,
table: {
width: 150
},
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
isForm:false,
isTableForm: false,
isTable:false,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isForm:false,
isTableForm: false,
isTable:false,
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
isForm:false,
isTableForm: false,
isTable:false,
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
form: {
component: 'InputNumber',
value: 0
},
isForm:false,
isTableForm: false,
isTable:false,
},
{
label: '扩展属性',
field: 'extraProperties',
sort: 'custom',
isForm:false,
isTableForm: false,
isTable:false,
},
{
label: '创建时间',
@ -487,19 +619,20 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
}
},
isForm:false,
isTableForm: false,
isTable:false,
},
{
label: '状态',
field: 'status',
dictType: DICT_TYPE.REQUEST_STATUS,
dictClass: 'string',
isSearch: true,
isForm: false,
isTable: true,
sort: 'custom',
table: {
width: 150
},
isForm:false,
isTableForm: false,
isTable:false,
},
{
label: '并发乐观锁',
@ -510,30 +643,37 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
component: 'InputNumber',
value: 0
},
isForm:false,
isTableForm: false,
isTable:false,
},
{
label: '工作流流水号',
field: 'serialNumber',
isForm:false,
sort: 'custom',
isForm:false,
isTableForm: false,
isTable:false,
},
{
label: '权限所属人员id',
field: 'ruleUserId',
sort: 'custom',
isForm:false,
form: {
component: 'InputNumber',
value: 0
},
isForm:false,
isTableForm: false,
isTable:false,
},
{
label: '操作',
field: 'action',
isForm: false,
hiddenInMain:true,
table: {
width: 150,
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['batch'] = val[0]['batch']
row['altBatch'] = val[0]['altBatch']
row['packingNumber'] = val[0]['packingNumber']
row['containerNumber'] = val[0]['containerNumber']
row['qty'] = val[0]['qty']
row['uom'] = val[0]['uom']
@ -244,7 +243,6 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
if(formField == 'itemCode'){
row['batch'] = val[0]['toBatch']
row['packingNumber'] = val[0]['toPackingNumber']
row['containerNumber'] = val[0]['toContainerNumber']
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
tableData.value.forEach((item) => {
item.batch = item.toBatch
item.packingNumber = item.toPackingNumber
item.packingNumber = null
item.containerNumber = item.toContainerNumber
item.receiptQty = item.qty
item.toLocationGroupCode = null
@ -331,7 +329,6 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
setV['itemDesc2'] = val[0]['itemDesc2']
setV['batch'] = val[0]['toBatch']
setV['altBatch'] = val[0]['altBatch']
setV['packingNumber'] = val[0]['toPackingNumber']
setV['containerNumber'] = val[0]['toContainerNumber']
setV['receiptQty'] = val[0]['qty']
setV['qty'] = val[0]['qty']
@ -362,7 +359,6 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
if(formField == 'itemCode'){
setV['batch'] = val[0]['toBatch']
setV['packingNumber'] = val[0]['toPackingNumber']
setV['containerNumber'] = val[0]['toContainerNumber']
setV['containerNumber'] = val[0]['containerNumber']
setV['containerNumber'] = val[0]['containerNumber']

Loading…
Cancel
Save