Browse Source

选择从库位代码,勾选确认,没有选上这几个菜单点添加明细按钮不好使

intex_online20241111
zhang_li 3 weeks ago
parent
commit
6f10f7e71a
  1. 15
      src/layout/components/Menu/src/Menu.vue
  2. 11
      src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue
  3. 61
      src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts
  4. 27
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue
  5. 33
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts
  6. 26
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMainHOLDWIP/index.vue
  7. 33
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMainHOLDWIP/inventorymoveRequestMain.data.ts
  8. 26
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMainMOVE/index.vue
  9. 32
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMainMOVE/inventorymoveRequestMain.data.ts

15
src/layout/components/Menu/src/Menu.vue

@ -1,12 +1,13 @@
<script lang="tsx">
import { PropType } from 'vue'
import { ElMenu, ElScrollbar } from 'element-plus'
import { ElMenu, ElScrollbar, ElButton } from 'element-plus'
import { useAppStore } from '@/store/modules/app'
import { usePermissionStore } from '@/store/modules/permission'
import { useRenderMenuItem } from './components/useRenderMenuItem'
import { isUrl } from '@/utils/is'
import { useDesign } from '@/hooks/web/useDesign'
import { LayoutType } from '@/types/layout'
import { Search } from '@element-plus/icons-vue'
const { getPrefixCls } = useDesign()
@ -99,7 +100,18 @@ export default defineComponent({
return <ElScrollbar>{renderMenu()}</ElScrollbar>
}
}
const renderMenuWrapAddButton = () => {
return (
<div style='position:relative'>
<ElButton type="text" icon={Search} style="color:var(--el-button-text-color);position:absolute;right:-20px;top:120px;z-index:999" ></ElButton>
<ElScrollbar>
{renderMenu()}
</ElScrollbar>
</div>
)
}
const renderMenu = () => {
return (
<ElMenu
@ -113,6 +125,7 @@ export default defineComponent({
activeTextColor="var(--left-menu-text-active-color)"
onSelect={menuSelect}
>
{{
default: () => {
const { renderMenuItem } = useRenderMenuItem(unref(menuMode))

11
src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue

@ -54,7 +54,7 @@
<BasicForm
ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="fromPackingNumber"
fieldTableColumn="itemCode"
@success="getList"
:rules="InventorychangeRequestMainRules"
:formAllSchemas="InventorychangeRequestMain.allSchemas"
@ -135,13 +135,12 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
if(formField=='toOwnerCode'){
//
row['toOwnerCode'] = val[0]['code']
}else if(formField == 'fromPackingNumber'){
val = val.filter(item=>!tableData.value.find(item1=>item1['itemCode']==item['itemCode']&&item1['fromBatch']==item['batch']&&item1['fromPackingNumber']==item['packingNumber']&&item1['locationCode']==item['locationCode']&&item1['fromInventoryStatus']==item['inventoryStatus']))
}else if(formField == 'itemCode'){
val = val.filter(item=>!tableData.value.find(item1=>item1['itemCode']==item['itemCode']&&item1['fromBatch']==item['batch']&&item1['locationCode']==item['locationCode']&&item1['fromInventoryStatus']==item['inventoryStatus']))
if(val.length==0) return
val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow[formField] = item[searchField]
newRow['fromPackingNumber'] = item['packingNumber']
newRow['toPackingNumber'] = item['packingNumber']
newRow['fromBatch'] = item['batch']
newRow['toBatch'] = item['batch']
@ -173,7 +172,6 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} else {
const setV = {}
setV[formField] = val[0][searchField]
setV['fromPackingNumber'] = val[0]['fromPackingNumber']
setV['toPackingNumber'] = val[0]['packingNumber']
setV['fromBatch'] = val[0]['batch']
setV['toBatch'] = val[0]['batch']
@ -204,8 +202,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
nextTick(() => {
const setV = {}
if(formField == 'fromPackingNumber') {
setV['fromPackingNumber'] = val[0]['packingNumber']
if(formField == 'itemCode') {
setV['itemCode'] = val[0]['itemCode']
setV['fromBatch'] = val[0]['batch']
setV['toBatch'] = val[0]['batch']

61
src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts

@ -392,37 +392,11 @@ export const InventorychangeRequestDetail = useCrudSchemas(reactive<CrudSchema[]
width: 150
},
tableForm: {
multiple:true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择从包装号',
searchField: 'packingNumber',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.getBalancePageByBusinessTypeByItemType,
searchCondition: [{
key: 'businessType',
value: businessTypeData.code,
},{
key: 'noCheckExpireDateFlag',
value: 'TRUE',
}]
disabled: true
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择从包装号',
searchField: 'packingNumber',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.getBalancePageByBusinessTypeByItemType,
searchCondition: [{
key: 'businessType',
value: businessTypeData.code,
},{
key: 'noCheckExpireDateFlag',
value: 'TRUE',
}]
disabled: true
}
}
},
@ -443,12 +417,39 @@ export const InventorychangeRequestDetail = useCrudSchemas(reactive<CrudSchema[]
table: {
width: 150
},
tableForm: {
disabled: true
multiple: true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码',
searchField: 'itemCode',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.getBalancePageByBusinessTypeByItemType,
searchCondition: [{
key: 'businessType',
value: businessTypeData.code,
}, {
key: 'noCheckExpireDateFlag',
value: 'TRUE',
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
disabled: true
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码',
searchField: 'itemCode',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.getBalancePageByBusinessTypeByItemType,
searchCondition: [{
key: 'businessType',
value: businessTypeData.code,
}, {
key: 'noCheckExpireDateFlag',
value: 'TRUE',
}]
}
}
},

27
src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue

@ -43,7 +43,7 @@
<BasicForm
ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="fromPackingNumber"
fieldTableColumn="itemCode"
@success="getList"
:rules="InventorymoveRequestMainRules"
:formAllSchemas="InventorymoveRequestMain.allSchemas"
@ -251,7 +251,7 @@ InventorymoveRequestMain.allSchemas.tableFormColumns.map(item =>{
})
// tableform
InventorymoveRequestDetail.allSchemas.tableFormColumns.map(item => {
if(item.field == 'fromPackingNumber') {
if(item.field == 'itemCode') {
if (fromInventoryStatus.value) {
item.tableForm.searchCondition = [
{
@ -354,12 +354,12 @@ const fromManagementPrecision = ref('')
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(async() => {
if (type == 'tableForm') {
if(formField == 'fromPackingNumber'){
val = val.filter(item=>!tableData.value.find(item1=>item1['itemCode']==item['itemCode']&&item1['fromBatch']==item['batch']&&item1['fromPackingNumber']==item['packingNumber']&&item1['fromLocationCode']==item['locationCode']&&item1['fromInventoryStatus']==item['inventoryStatus']))
if(formField == 'itemCode'){
val = val.filter(item=>!tableData.value.find(item1=>item1['itemCode']==item['itemCode']&&item1['fromBatch']==item['batch']&&item1['fromLocationCode']==item['locationCode']&&item1['fromInventoryStatus']==item['inventoryStatus']))
if(val.length==0) return
val.forEach(async item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['fromPackingNumber'] = item['packingNumber']
// newRow['fromPackingNumber'] = item['packingNumber']
newRow['fromContainerNumber'] = item['containerNumber']
newRow['itemCode'] = item['itemCode']
if (item['batch'] != '') {
@ -406,14 +406,14 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} else {
const setV = {}
if (formField == 'fromWarehouseCode') {
if(InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromPackingNumber')).tableForm.searchCondition.find(item => (item.key == 'warehouseCode')) == undefined){
InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromPackingNumber')).tableForm.searchCondition.push({
if(InventorymoveRequestDetail?.allSchemas?.tableFormColumns?.find(item => (item.field == 'itemCode'))?.tableForm?.searchCondition?.find(item => (item.key == 'warehouseCode')) == undefined){
InventorymoveRequestDetail?.allSchemas?.tableFormColumns?.find(item => (item.field == 'itemCode'))?.tableForm?.searchCondition?.push({
key: 'warehouseCode',
value: val[0]["code"],
isMainValue: false
})
} else {
InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromPackingNumber')).tableForm.searchCondition.find(item => {
InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'itemCode')).tableForm.searchCondition.find(item => {
if (item.key == 'warehouseCode') {
item.value = val[0]["code"]
}
@ -429,8 +429,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
nextTick(() => {
const setV = {}
if(formField == 'fromPackingNumber') {
setV['fromPackingNumber'] = val[0]['packingNumber']
if(formField == 'itemCode') {
setV['fromContainerNumber'] = val[0]['containerNumber']
setV['itemCode'] = val[0]['itemCode']
setV['fromBatch'] = val[0]['batch']
@ -625,14 +624,14 @@ const detailOpenForm = (type, row) => {
item.componentProps.disabled = routeName.value == "HoldtookRequestMain"
}
})
if(InventorymoveRequestDetail.allSchemas.formSchema.find(item => (item.field == 'fromPackingNumber'))?.componentProps?.searchCondition.find(item => (item.key == 'warehouseCode')) == undefined){
InventorymoveRequestDetail.allSchemas.formSchema.find(item => (item.field == 'fromPackingNumber'))?.componentProps?.searchCondition.push({
if(InventorymoveRequestDetail.allSchemas.formSchema.find(item => (item.field == 'itemCode'))?.componentProps?.searchCondition.find(item => (item.key == 'warehouseCode')) == undefined){
InventorymoveRequestDetail.allSchemas.formSchema.find(item => (item.field == 'itemCode'))?.componentProps?.searchCondition.push({
key: 'warehouseCode',
value: fromWarehouseCodeMain.value,
isMainValue: false
})
} else {
InventorymoveRequestDetail.allSchemas.formSchema.find(item => (item.field == 'fromPackingNumber'))?.componentProps?.searchCondition.find(item => {
InventorymoveRequestDetail.allSchemas.formSchema.find(item => (item.field == 'itemCode'))?.componentProps?.searchCondition.find(item => {
if (item.key == 'warehouseCode') {
item.value = fromWarehouseCodeMain.value
}
@ -741,7 +740,7 @@ const submitForm = async (formType, submitData) => {
data.subList = tableData.value //
let isExist = false
tableData.value.forEach(item => {
let rs = tableData.value.filter(filterItem => (filterItem.fromPackingNumber&&filterItem.fromPackingNumber == item.fromPackingNumber) )
let rs = tableData.value.filter(filterItem => (filterItem.itemCode&&filterItem.itemCode == item.itemCode) )
console.log(rs,5666);
if(rs.length > 1) isExist = true
})

33
src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts

@ -512,11 +512,23 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
width: 150
},
tableForm: {
disabled: true
multiple: true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码',
searchField: 'itemCode',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.selectLocationTypeToBalance,
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
disabled: true
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码',
searchField: 'itemCode',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.selectLocationTypeToBalance,
}
}
},
@ -588,23 +600,14 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
width: 150
},
tableForm:{
multiple:true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择从包装号',
searchField: 'packingNumber',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.selectLocationTypeToBalance,
disabled: true,
placeholder: '请选择从包装号',
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择从包装号',
searchField: 'packingNumber',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.selectLocationTypeToBalance,
disabled: true,
placeholder: '请选择从包装号',
}
}
},

26
src/views/wms/moveManage/inventorymove/inventorymoveRequestMainHOLDWIP/index.vue

@ -43,7 +43,7 @@
<BasicForm
ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="fromPackingNumber"
fieldTableColumn="itemCode"
@success="getList"
:rules="InventorymoveRequestMainRules"
:formAllSchemas="InventorymoveRequestMain.allSchemas"
@ -206,7 +206,7 @@ InventorymoveRequestMain.allSchemas.tableFormColumns.map(item =>{
})
// tableform
InventorymoveRequestDetail.allSchemas.tableFormColumns.map(item => {
if(item.field == 'fromPackingNumber') {
if(item.field == 'itemCode') {
if (fromInventoryStatus.value) {
item.tableForm.searchCondition = [
{
@ -296,12 +296,11 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
nextTick(async () => {
console.log(formField)
if (type == 'tableForm') {
if (formField == 'fromPackingNumber') {
val = val.filter(item => !tableData.value.find(item1 => item1['itemCode'] == item['itemCode'] && item1['fromBatch'] == item['batch'] && item1['fromPackingNumber'] == item['packingNumber'] && item1['fromLocationCode'] == item['locationCode'] && item1['fromInventoryStatus'] == item['inventoryStatus']))
if (formField == 'itemCode') {
val = val.filter(item => !tableData.value.find(item1 => item1['itemCode'] == item['itemCode'] && item1['fromBatch'] == item['batch'] && item1['fromLocationCode'] == item['locationCode'] && item1['fromInventoryStatus'] == item['inventoryStatus']))
if (val.length == 0) return
val.forEach(item => {
const newRow = JSON.parse(JSON.stringify({ ...tableFormKeys, ...item }))
newRow['fromPackingNumber'] = item['packingNumber']
newRow['fromContainerNumber'] = item['containerNumber']
newRow['itemCode'] = item['itemCode']
newRow['fromBatch'] = item['batch']
@ -349,14 +348,14 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
const setV = {}
if (formField == 'fromWarehouseCode') {
tableData.value = []
if(InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromPackingNumber')).tableForm.searchCondition.find(item => (item.key == 'warehouseCode')) == undefined){
InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromPackingNumber')).tableForm.searchCondition.push({
if(InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'itemCode')).tableForm.searchCondition.find(item => (item.key == 'warehouseCode')) == undefined){
InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'itemCode')).tableForm.searchCondition.push({
key: 'warehouseCode',
value: val[0]["code"],
isMainValue: false
})
} else {
InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromPackingNumber')).tableForm.searchCondition.find(item => {
InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'itemCode')).tableForm.searchCondition.find(item => {
if (item.key == 'warehouseCode') {
item.value = val[0]["code"]
}
@ -372,8 +371,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
nextTick(() => {
const setV = {}
if(formField == 'fromPackingNumber') {
setV['fromPackingNumber'] = val[0]['packingNumber']
if(formField == 'itemCode') {
setV['fromContainerNumber'] = val[0]['containerNumber']
setV['itemCode'] = val[0]['itemCode']
setV['fromBatch'] = val[0]['batch']
@ -546,14 +544,14 @@ const openForm =async (type: string, row?: number) => {
* 详情 新增/编辑事件
*/
const detailOpenForm = (type, row) => {
if(InventorymoveRequestDetail.allSchemas.formSchema.find(item => (item.field == 'fromPackingNumber'))?.componentProps?.searchCondition.find(item => (item.key == 'warehouseCode')) == undefined){
InventorymoveRequestDetail.allSchemas.formSchema.find(item => (item.field == 'fromPackingNumber'))?.componentProps?.searchCondition.push({
if(InventorymoveRequestDetail.allSchemas.formSchema.find(item => (item.field == 'itemCode'))?.componentProps?.searchCondition.find(item => (item.key == 'warehouseCode')) == undefined){
InventorymoveRequestDetail.allSchemas.formSchema.find(item => (item.field == 'itemCode'))?.componentProps?.searchCondition.push({
key: 'warehouseCode',
value: fromWarehouseCodeMain.value,
isMainValue: false
})
} else {
InventorymoveRequestDetail.allSchemas.formSchema.find(item => (item.field == 'fromPackingNumber'))?.componentProps?.searchCondition.find(item => {
InventorymoveRequestDetail.allSchemas.formSchema.find(item => (item.field == 'itemCode'))?.componentProps?.searchCondition.find(item => {
if (item.key == 'warehouseCode') {
item.value = fromWarehouseCodeMain.value
}
@ -646,7 +644,7 @@ const submitForm = async (formType, submitData) => {
data.subList = tableData.value //
let isExist = false
tableData.value.forEach(item => {
let rs = tableData.value.filter(filterItem => (filterItem.fromPackingNumber&&filterItem.fromPackingNumber == item.fromPackingNumber) )
let rs = tableData.value.filter(filterItem => (filterItem.itemCode&&filterItem.itemCode == item.itemCode) )
console.log(rs,5666);
if(rs.length > 1) isExist = true
})

33
src/views/wms/moveManage/inventorymove/inventorymoveRequestMainHOLDWIP/inventorymoveRequestMain.data.ts

@ -510,12 +510,25 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
table: {
width: 150
},
tableForm: {
disabled: true
multiple: true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码',
searchField: 'itemCode',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.selectLocationTypeToBalance,
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
disabled: true
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码',
searchField: 'itemCode',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.selectLocationTypeToBalance,
}
}
},
@ -587,23 +600,11 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
width: 150
},
tableForm: {
multiple:true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择从包装号',
searchField: 'packingNumber',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.selectLocationTypeToBalance,
disabled: true
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择从包装号',
searchField: 'packingNumber',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.selectLocationTypeToBalance,
disabled: true
}
}
},

26
src/views/wms/moveManage/inventorymove/inventorymoveRequestMainMOVE/index.vue

@ -43,7 +43,7 @@
<BasicForm
ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="fromPackingNumber"
fieldTableColumn="itemCode"
@success="getList"
:rules="InventorymoveRequestMainRules"
:formAllSchemas="InventorymoveRequestMain.allSchemas"
@ -197,7 +197,7 @@ InventorymoveRequestMain.allSchemas.tableFormColumns.map(item =>{
})
// tableform
InventorymoveRequestDetail.allSchemas.tableFormColumns.map(item => {
if(item.field == 'fromPackingNumber') {
if(item.field == 'itemCode') {
if (fromInventoryStatus.value) {
item.tableForm.searchCondition = [
{
@ -311,12 +311,11 @@ let toManagementPrecision = ref('')
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(async() => {
if (type == 'tableForm') {
if(formField == 'fromPackingNumber'){
val = val.filter(item=>!tableData.value.find(item1=>item1['itemCode']==item['itemCode']&&item1['fromBatch']==item['batch']&&item1['fromPackingNumber']==item['packingNumber']&&item1['fromLocationCode']==item['locationCode']&&item1['fromInventoryStatus']==item['inventoryStatus']))
if(formField == 'itemCode'){
val = val.filter(item=>!tableData.value.find(item1=>item1['itemCode']==item['itemCode']&&item1['fromBatch']==item['batch']&&item1['fromLocationCode']==item['locationCode']&&item1['fromInventoryStatus']==item['inventoryStatus']))
if(val.length==0) return
val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['fromPackingNumber'] = item['packingNumber']
newRow['fromContainerNumber'] = item['containerNumber']
newRow['itemCode'] = item['itemCode']
newRow['fromBatch'] = item['batch']
@ -354,14 +353,14 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} else {
const setV = {}
if (formField == 'fromWarehouseCode') {
if(InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromPackingNumber')).tableForm.searchCondition.find(item => (item.key == 'warehouseCode')) == undefined){
InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromPackingNumber')).tableForm.searchCondition.push({
if(InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'itemCode')).tableForm.searchCondition.find(item => (item.key == 'warehouseCode')) == undefined){
InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'itemCode')).tableForm.searchCondition.push({
key: 'warehouseCode',
value: val[0]["code"],
isMainValue: false
})
} else {
InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromPackingNumber')).tableForm.searchCondition.find(item => {
InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'itemCode')).tableForm.searchCondition.find(item => {
if (item.key == 'warehouseCode') {
item.value = val[0]["code"]
}
@ -377,8 +376,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(async() => {
const setV = {}
if(formField == 'fromPackingNumber') {
setV['fromPackingNumber'] = val[0]['packingNumber']
if(formField == 'itemCode') {
setV['fromContainerNumber'] = val[0]['containerNumber']
setV['itemCode'] = val[0]['itemCode']
setV['fromBatch'] = val[0]['batch']
@ -576,14 +574,14 @@ const openForm =async (type: string, row?: number) => {
* 详情 新增/编辑事件
*/
const detailOpenForm =async (type, row) => {
if(InventorymoveRequestDetail.allSchemas.formSchema.find(item => (item.field == 'fromPackingNumber'))?.componentProps?.searchCondition.find(item => (item.key == 'warehouseCode')) == undefined){
InventorymoveRequestDetail.allSchemas.formSchema.find(item => (item.field == 'fromPackingNumber'))?.componentProps?.searchCondition.push({
if(InventorymoveRequestDetail.allSchemas.formSchema.find(item => (item.field == 'itemCode'))?.componentProps?.searchCondition.find(item => (item.key == 'warehouseCode')) == undefined){
InventorymoveRequestDetail.allSchemas.formSchema.find(item => (item.field == 'itemCode'))?.componentProps?.searchCondition.push({
key: 'warehouseCode',
value: fromWarehouseCodeMain.value,
isMainValue: false
})
} else {
InventorymoveRequestDetail.allSchemas.formSchema.find(item => (item.field == 'fromPackingNumber'))?.componentProps?.searchCondition.find(item => {
InventorymoveRequestDetail.allSchemas.formSchema.find(item => (item.field == 'itemCode'))?.componentProps?.searchCondition.find(item => {
if (item.key == 'warehouseCode') {
item.value = fromWarehouseCodeMain.value
}
@ -712,7 +710,7 @@ const submitForm = async (formType, submitData) => {
data.subList = tableData.value //
let isExist = false
tableData.value.forEach(item => {
let rs = tableData.value.filter(filterItem => (filterItem.fromPackingNumber&&filterItem.fromPackingNumber == item.fromPackingNumber) )
let rs = tableData.value.filter(filterItem => (filterItem.itemCode&&filterItem.itemCode == item.itemCode) )
if(rs.length > 1) isExist = true
})
if (isExist) {

32
src/views/wms/moveManage/inventorymove/inventorymoveRequestMainMOVE/inventorymoveRequestMain.data.ts

@ -511,11 +511,23 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
width: 150
},
tableForm: {
disabled: true
multiple: true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码',
searchField: 'itemCode',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.selectLocationTypeToBalance,
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
disabled: true
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码',
searchField: 'itemCode',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.selectLocationTypeToBalance,
}
}
},
@ -620,23 +632,11 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
width: 150
},
tableForm: {
multiple:true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择从包装号',
searchField: 'packingNumber',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.selectLocationTypeToBalance,
disabled: true
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择从包装号',
searchField: 'packingNumber',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.selectLocationTypeToBalance,
disabled: true
}
}
},

Loading…
Cancel
Save