Browse Source

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

intex_online20241111
zhang_li 4 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"> <script lang="tsx">
import { PropType } from 'vue' import { PropType } from 'vue'
import { ElMenu, ElScrollbar } from 'element-plus' import { ElMenu, ElScrollbar, ElButton } from 'element-plus'
import { useAppStore } from '@/store/modules/app' import { useAppStore } from '@/store/modules/app'
import { usePermissionStore } from '@/store/modules/permission' import { usePermissionStore } from '@/store/modules/permission'
import { useRenderMenuItem } from './components/useRenderMenuItem' import { useRenderMenuItem } from './components/useRenderMenuItem'
import { isUrl } from '@/utils/is' import { isUrl } from '@/utils/is'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
import { LayoutType } from '@/types/layout' import { LayoutType } from '@/types/layout'
import { Search } from '@element-plus/icons-vue'
const { getPrefixCls } = useDesign() const { getPrefixCls } = useDesign()
@ -99,7 +100,18 @@ export default defineComponent({
return <ElScrollbar>{renderMenu()}</ElScrollbar> 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 = () => { const renderMenu = () => {
return ( return (
<ElMenu <ElMenu
@ -113,6 +125,7 @@ export default defineComponent({
activeTextColor="var(--left-menu-text-active-color)" activeTextColor="var(--left-menu-text-active-color)"
onSelect={menuSelect} onSelect={menuSelect}
> >
{{ {{
default: () => { default: () => {
const { renderMenuItem } = useRenderMenuItem(unref(menuMode)) const { renderMenuItem } = useRenderMenuItem(unref(menuMode))

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

@ -54,7 +54,7 @@
<BasicForm <BasicForm
ref="formRef" ref="formRef"
:isOpenSearchTable="true" :isOpenSearchTable="true"
fieldTableColumn="fromPackingNumber" fieldTableColumn="itemCode"
@success="getList" @success="getList"
:rules="InventorychangeRequestMainRules" :rules="InventorychangeRequestMainRules"
:formAllSchemas="InventorychangeRequestMain.allSchemas" :formAllSchemas="InventorychangeRequestMain.allSchemas"
@ -135,13 +135,12 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
if(formField=='toOwnerCode'){ if(formField=='toOwnerCode'){
// //
row['toOwnerCode'] = val[0]['code'] row['toOwnerCode'] = val[0]['code']
}else if(formField == 'fromPackingNumber'){ }else if(formField == 'itemCode'){
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'])) 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 if(val.length==0) return
val.forEach(item=>{ val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow[formField] = item[searchField] newRow[formField] = item[searchField]
newRow['fromPackingNumber'] = item['packingNumber']
newRow['toPackingNumber'] = item['packingNumber'] newRow['toPackingNumber'] = item['packingNumber']
newRow['fromBatch'] = item['batch'] newRow['fromBatch'] = item['batch']
newRow['toBatch'] = item['batch'] newRow['toBatch'] = item['batch']
@ -173,7 +172,6 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} else { } else {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
setV['fromPackingNumber'] = val[0]['fromPackingNumber']
setV['toPackingNumber'] = val[0]['packingNumber'] setV['toPackingNumber'] = val[0]['packingNumber']
setV['fromBatch'] = val[0]['batch'] setV['fromBatch'] = val[0]['batch']
setV['toBatch'] = 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 ) => { const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
nextTick(() => { nextTick(() => {
const setV = {} const setV = {}
if(formField == 'fromPackingNumber') { if(formField == 'itemCode') {
setV['fromPackingNumber'] = val[0]['packingNumber']
setV['itemCode'] = val[0]['itemCode'] setV['itemCode'] = val[0]['itemCode']
setV['fromBatch'] = val[0]['batch'] setV['fromBatch'] = val[0]['batch']
setV['toBatch'] = 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 width: 150
}, },
tableForm: { tableForm: {
multiple:true, disabled: true
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择从包装号',
searchField: 'packingNumber',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.getBalancePageByBusinessTypeByItemType,
searchCondition: [{
key: 'businessType',
value: businessTypeData.code,
},{
key: 'noCheckExpireDateFlag',
value: 'TRUE',
}]
}, },
form: { form: {
// labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
isSearchList: true, // 开启查询弹窗 disabled: true
searchListPlaceholder: '请选择从包装号',
searchField: 'packingNumber',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.getBalancePageByBusinessTypeByItemType,
searchCondition: [{
key: 'businessType',
value: businessTypeData.code,
},{
key: 'noCheckExpireDateFlag',
value: 'TRUE',
}]
} }
} }
}, },
@ -443,12 +417,39 @@ export const InventorychangeRequestDetail = useCrudSchemas(reactive<CrudSchema[]
table: { table: {
width: 150 width: 150
}, },
tableForm: { 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: { form: {
// labelMessage: '信息提示说明!!!',
componentProps: { 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 <BasicForm
ref="formRef" ref="formRef"
:isOpenSearchTable="true" :isOpenSearchTable="true"
fieldTableColumn="fromPackingNumber" fieldTableColumn="itemCode"
@success="getList" @success="getList"
:rules="InventorymoveRequestMainRules" :rules="InventorymoveRequestMainRules"
:formAllSchemas="InventorymoveRequestMain.allSchemas" :formAllSchemas="InventorymoveRequestMain.allSchemas"
@ -251,7 +251,7 @@ InventorymoveRequestMain.allSchemas.tableFormColumns.map(item =>{
}) })
// tableform // tableform
InventorymoveRequestDetail.allSchemas.tableFormColumns.map(item => { InventorymoveRequestDetail.allSchemas.tableFormColumns.map(item => {
if(item.field == 'fromPackingNumber') { if(item.field == 'itemCode') {
if (fromInventoryStatus.value) { if (fromInventoryStatus.value) {
item.tableForm.searchCondition = [ item.tableForm.searchCondition = [
{ {
@ -354,12 +354,12 @@ const fromManagementPrecision = ref('')
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(async() => { nextTick(async() => {
if (type == 'tableForm') { if (type == 'tableForm') {
if(formField == 'fromPackingNumber'){ if(formField == 'itemCode'){
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'])) 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 if(val.length==0) return
val.forEach(async item=>{ val.forEach(async item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['fromPackingNumber'] = item['packingNumber'] // newRow['fromPackingNumber'] = item['packingNumber']
newRow['fromContainerNumber'] = item['containerNumber'] newRow['fromContainerNumber'] = item['containerNumber']
newRow['itemCode'] = item['itemCode'] newRow['itemCode'] = item['itemCode']
if (item['batch'] != '') { if (item['batch'] != '') {
@ -406,14 +406,14 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} else { } else {
const setV = {} const setV = {}
if (formField == 'fromWarehouseCode') { if (formField == 'fromWarehouseCode') {
if(InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromPackingNumber')).tableForm.searchCondition.find(item => (item.key == 'warehouseCode')) == undefined){ if(InventorymoveRequestDetail?.allSchemas?.tableFormColumns?.find(item => (item.field == 'itemCode'))?.tableForm?.searchCondition?.find(item => (item.key == 'warehouseCode')) == undefined){
InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromPackingNumber')).tableForm.searchCondition.push({ InventorymoveRequestDetail?.allSchemas?.tableFormColumns?.find(item => (item.field == 'itemCode'))?.tableForm?.searchCondition?.push({
key: 'warehouseCode', key: 'warehouseCode',
value: val[0]["code"], value: val[0]["code"],
isMainValue: false isMainValue: false
}) })
} else { } 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') { if (item.key == 'warehouseCode') {
item.value = val[0]["code"] item.value = val[0]["code"]
} }
@ -429,8 +429,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
nextTick(() => { nextTick(() => {
const setV = {} const setV = {}
if(formField == 'fromPackingNumber') { if(formField == 'itemCode') {
setV['fromPackingNumber'] = val[0]['packingNumber']
setV['fromContainerNumber'] = val[0]['containerNumber'] setV['fromContainerNumber'] = val[0]['containerNumber']
setV['itemCode'] = val[0]['itemCode'] setV['itemCode'] = val[0]['itemCode']
setV['fromBatch'] = val[0]['batch'] setV['fromBatch'] = val[0]['batch']
@ -625,14 +624,14 @@ const detailOpenForm = (type, row) => {
item.componentProps.disabled = routeName.value == "HoldtookRequestMain" item.componentProps.disabled = routeName.value == "HoldtookRequestMain"
} }
}) })
if(InventorymoveRequestDetail.allSchemas.formSchema.find(item => (item.field == 'fromPackingNumber'))?.componentProps?.searchCondition.find(item => (item.key == 'warehouseCode')) == undefined){ if(InventorymoveRequestDetail.allSchemas.formSchema.find(item => (item.field == 'itemCode'))?.componentProps?.searchCondition.find(item => (item.key == 'warehouseCode')) == undefined){
InventorymoveRequestDetail.allSchemas.formSchema.find(item => (item.field == 'fromPackingNumber'))?.componentProps?.searchCondition.push({ InventorymoveRequestDetail.allSchemas.formSchema.find(item => (item.field == 'itemCode'))?.componentProps?.searchCondition.push({
key: 'warehouseCode', key: 'warehouseCode',
value: fromWarehouseCodeMain.value, value: fromWarehouseCodeMain.value,
isMainValue: false isMainValue: false
}) })
} else { } 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') { if (item.key == 'warehouseCode') {
item.value = fromWarehouseCodeMain.value item.value = fromWarehouseCodeMain.value
} }
@ -741,7 +740,7 @@ const submitForm = async (formType, submitData) => {
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.fromPackingNumber&&filterItem.fromPackingNumber == item.fromPackingNumber) ) let rs = tableData.value.filter(filterItem => (filterItem.itemCode&&filterItem.itemCode == item.itemCode) )
console.log(rs,5666); console.log(rs,5666);
if(rs.length > 1) isExist = true 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 width: 150
}, },
tableForm: { tableForm: {
disabled: true multiple: true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码',
searchField: 'itemCode',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.selectLocationTypeToBalance,
}, },
form: { form: {
// labelMessage: '信息提示说明!!!',
componentProps: { 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 width: 150
}, },
tableForm:{ tableForm:{
multiple:true, disabled: true,
isInpuFocusShow: true, // 开启查询弹窗 placeholder: '请选择从包装号',
searchListPlaceholder: '请选择从包装号',
searchField: 'packingNumber',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.selectLocationTypeToBalance,
}, },
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
isSearchList: true, // 开启查询弹窗 disabled: true,
searchListPlaceholder: '请选择从包装号', placeholder: '请选择从包装号',
searchField: 'packingNumber',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.selectLocationTypeToBalance,
} }
} }
}, },

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

@ -43,7 +43,7 @@
<BasicForm <BasicForm
ref="formRef" ref="formRef"
:isOpenSearchTable="true" :isOpenSearchTable="true"
fieldTableColumn="fromPackingNumber" fieldTableColumn="itemCode"
@success="getList" @success="getList"
:rules="InventorymoveRequestMainRules" :rules="InventorymoveRequestMainRules"
:formAllSchemas="InventorymoveRequestMain.allSchemas" :formAllSchemas="InventorymoveRequestMain.allSchemas"
@ -206,7 +206,7 @@ InventorymoveRequestMain.allSchemas.tableFormColumns.map(item =>{
}) })
// tableform // tableform
InventorymoveRequestDetail.allSchemas.tableFormColumns.map(item => { InventorymoveRequestDetail.allSchemas.tableFormColumns.map(item => {
if(item.field == 'fromPackingNumber') { if(item.field == 'itemCode') {
if (fromInventoryStatus.value) { if (fromInventoryStatus.value) {
item.tableForm.searchCondition = [ item.tableForm.searchCondition = [
{ {
@ -296,12 +296,11 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
nextTick(async () => { nextTick(async () => {
console.log(formField) console.log(formField)
if (type == 'tableForm') { if (type == 'tableForm') {
if (formField == 'fromPackingNumber') { if (formField == 'itemCode') {
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'])) 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 if (val.length == 0) return
val.forEach(item => { val.forEach(item => {
const newRow = JSON.parse(JSON.stringify({ ...tableFormKeys, ...item })) const newRow = JSON.parse(JSON.stringify({ ...tableFormKeys, ...item }))
newRow['fromPackingNumber'] = item['packingNumber']
newRow['fromContainerNumber'] = item['containerNumber'] newRow['fromContainerNumber'] = item['containerNumber']
newRow['itemCode'] = item['itemCode'] newRow['itemCode'] = item['itemCode']
newRow['fromBatch'] = item['batch'] newRow['fromBatch'] = item['batch']
@ -349,14 +348,14 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
const setV = {} const setV = {}
if (formField == 'fromWarehouseCode') { if (formField == 'fromWarehouseCode') {
tableData.value = [] tableData.value = []
if(InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromPackingNumber')).tableForm.searchCondition.find(item => (item.key == 'warehouseCode')) == undefined){ if(InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'itemCode')).tableForm.searchCondition.find(item => (item.key == 'warehouseCode')) == undefined){
InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromPackingNumber')).tableForm.searchCondition.push({ InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'itemCode')).tableForm.searchCondition.push({
key: 'warehouseCode', key: 'warehouseCode',
value: val[0]["code"], value: val[0]["code"],
isMainValue: false isMainValue: false
}) })
} else { } 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') { if (item.key == 'warehouseCode') {
item.value = val[0]["code"] item.value = val[0]["code"]
} }
@ -372,8 +371,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
nextTick(() => { nextTick(() => {
const setV = {} const setV = {}
if(formField == 'fromPackingNumber') { if(formField == 'itemCode') {
setV['fromPackingNumber'] = val[0]['packingNumber']
setV['fromContainerNumber'] = val[0]['containerNumber'] setV['fromContainerNumber'] = val[0]['containerNumber']
setV['itemCode'] = val[0]['itemCode'] setV['itemCode'] = val[0]['itemCode']
setV['fromBatch'] = val[0]['batch'] setV['fromBatch'] = val[0]['batch']
@ -546,14 +544,14 @@ const openForm =async (type: string, row?: number) => {
* 详情 新增/编辑事件 * 详情 新增/编辑事件
*/ */
const detailOpenForm = (type, row) => { const detailOpenForm = (type, row) => {
if(InventorymoveRequestDetail.allSchemas.formSchema.find(item => (item.field == 'fromPackingNumber'))?.componentProps?.searchCondition.find(item => (item.key == 'warehouseCode')) == undefined){ if(InventorymoveRequestDetail.allSchemas.formSchema.find(item => (item.field == 'itemCode'))?.componentProps?.searchCondition.find(item => (item.key == 'warehouseCode')) == undefined){
InventorymoveRequestDetail.allSchemas.formSchema.find(item => (item.field == 'fromPackingNumber'))?.componentProps?.searchCondition.push({ InventorymoveRequestDetail.allSchemas.formSchema.find(item => (item.field == 'itemCode'))?.componentProps?.searchCondition.push({
key: 'warehouseCode', key: 'warehouseCode',
value: fromWarehouseCodeMain.value, value: fromWarehouseCodeMain.value,
isMainValue: false isMainValue: false
}) })
} else { } 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') { if (item.key == 'warehouseCode') {
item.value = fromWarehouseCodeMain.value item.value = fromWarehouseCodeMain.value
} }
@ -646,7 +644,7 @@ const submitForm = async (formType, submitData) => {
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.fromPackingNumber&&filterItem.fromPackingNumber == item.fromPackingNumber) ) let rs = tableData.value.filter(filterItem => (filterItem.itemCode&&filterItem.itemCode == item.itemCode) )
console.log(rs,5666); console.log(rs,5666);
if(rs.length > 1) isExist = true 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: { table: {
width: 150 width: 150
}, },
tableForm: { tableForm: {
disabled: true multiple: true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码',
searchField: 'itemCode',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.selectLocationTypeToBalance,
}, },
form: { form: {
// labelMessage: '信息提示说明!!!',
componentProps: { 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 width: 150
}, },
tableForm: { tableForm: {
multiple:true, disabled: true
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择从包装号',
searchField: 'packingNumber',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.selectLocationTypeToBalance,
}, },
form: { form: {
// labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
isSearchList: true, // 开启查询弹窗 disabled: true
searchListPlaceholder: '请选择从包装号',
searchField: 'packingNumber',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.selectLocationTypeToBalance,
} }
} }
}, },

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

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

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

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

Loading…
Cancel
Save