Browse Source

Merge remote-tracking branch 'origin/master_hella' into master_hella

master_hella_20240701
gaojs 5 months ago
parent
commit
dd3bc4e088
  1. 9
      src/api/wms/preparetoissueDetail/index.ts
  2. 10
      src/components/BasicForm/src/BasicForm.vue
  3. 13
      src/components/XButton/src/ButtonBase.vue
  4. 14
      src/views/eam/sparepartsinlocation/index.vue
  5. 93
      src/views/eam/sparepartsinlocation/sparePartsInLocationMain.data.ts

9
src/api/wms/preparetoissueDetail/index.ts

@ -18,7 +18,14 @@ export interface PreparetoissueDetailVO {
// 查询备料计划子列表
export const getPreparetoissueDetailPage = async (params) => {
return await request.get({ url: `/wms/preparetoissue-detail/page`, params })
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/preparetoissue-detail/senior', data })
} else {
return await request.get({ url: `/wms/preparetoissue-detail/page`, params })
}
}
// 查询备料计划子详情

10
src/components/BasicForm/src/BasicForm.vue

@ -566,9 +566,15 @@ const buttonBaseClick = (val) => {
}
//
else if (val == 'save') {
debounce(() => {
let timer = null
if(!timer){
submitForm()
}, 2000)()
timer = setTimeout(()=>{
if(timer){
clearTimeout(timer)
}
},2000)
}
}
//
else if (val == 'close') {

13
src/components/XButton/src/ButtonBase.vue

@ -72,8 +72,17 @@ const props = defineProps({
const emit = defineEmits(['buttonBaseClick', 'updataTableColumns'])
const buttonBaseClick = (val, item, $event) => {
clearButtonBlurHandle($event) //el-button
emit('buttonBaseClick', val, item, $event)
let timer = null
if(!timer){
clearButtonBlurHandle($event) //el-button
emit('buttonBaseClick', val, item, $event)
timer = setTimeout(()=>{
if(timer){
clearTimeout(timer)
}
},2000)
}
}
const popoverVisible = ref(false)
//

14
src/views/eam/sparepartsinlocation/index.vue

@ -76,8 +76,7 @@
:apiDelete="SparePartsInLocationDetailApi.deleteSparePartsInLocationDetail"
@searchTableSuccessDetail="searchTableSuccessDetail"
:isShowAddBtn="true"
:detailButtonIsShowAdd="true"
:detailButtonIsShowAddStatusArray="['0']"
:detailButtonIsShowAdd="false"
/>
<!-- 导入 -->
@ -126,17 +125,22 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
const setV = {}
setV[formField] = val[0][searchField]
if (type == 'tableForm') {
if (formField == 'sparePartsCode') {
row['sparePartsCode'] = val[0].itemNumber
if (formField == 'locationCode') {
// row['sparePartsCode'] = val[0].itemNumber
row['locationCode'] = val[0].code
row['areaCode'] = val[0].areaCode
row['sparePartsCode'] = val[0].sparePartsCode
row['currentQty'] = val[0].qty
}
} else {
if (formField == 'locationCode') {
setV['locationCode'] = val[0].code
setV['areaCode'] = val[0].areaCode
setV['sparePartsCode'] = val[0].sparePartsCode
setV['currentQty'] = val[0].qty
}
}
formRef.setValues(setV)
})
})

93
src/views/eam/sparepartsinlocation/sparePartsInLocationMain.data.ts

@ -112,40 +112,7 @@ export const SparePartsInLocationMain = useCrudSchemas(reactive<CrudSchema[]>([
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
},
{
label: '库位编号',
field: 'locationCode',
sort: 'custom',
isSearch: false,
form: {
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择库位编号', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
},
},
{
label: '库区编号',
field: 'areaCode',
sort: 'custom',
isSearch: false,
form: {
componentProps: {
disabled: true
}
}
},
{
label: '备注',
@ -187,6 +154,8 @@ export const SparePartsInLocationMain = useCrudSchemas(reactive<CrudSchema[]>([
export const SparePartsInLocationDetailRules = reactive({
number: [required],
masterId: [required],
locationCode: [required],
areaCode: [required],
sparePartsCode: [required],
applyQty: [required],
concurrencyStamp: [required],
@ -228,21 +197,18 @@ export const SparePartsInLocationDetail = useCrudSchemas(reactive<CrudSchema[]>(
isTableForm:false
},
{
label: '备件编号',
field: 'sparePartsCode',
label: '库位编号',
field: 'locationCode',
sort: 'custom',
table: {
width: 150
},
isSearch: false,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择备件编号', // 输入框占位文本
searchField: 'itemNumber', // 查询弹窗赋值字段
searchTitle: '备件信息', // 查询弹窗标题
searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类
searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法
searchListPlaceholder: '请选择库位编号', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
@ -257,8 +223,8 @@ export const SparePartsInLocationDetail = useCrudSchemas(reactive<CrudSchema[]>(
searchListPlaceholder: '请选择备件编号', // 输入框占位文本
searchField: 'itemNumber', // 查询弹窗赋值字段
searchTitle: '备件信息', // 查询弹窗标题
searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类
searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
@ -268,6 +234,36 @@ export const SparePartsInLocationDetail = useCrudSchemas(reactive<CrudSchema[]>(
]
}
},
{
label: '库区编号',
field: 'areaCode',
sort: 'custom',
isSearch: false,
form: {
componentProps: {
disabled: true
}
},
tableForm:{
disabled: true
}
},
{
label: '备件编号',
field: 'sparePartsCode',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
},
tableForm:{
disabled: true
}
},
{
label: '库存数量',
field: 'currentQty',
@ -321,7 +317,8 @@ export const SparePartsInLocationDetail = useCrudSchemas(reactive<CrudSchema[]>(
width: 150,
fixed: 'right'
},
isTableForm:false
isTableForm:false,
isTable:false
}
]))

Loading…
Cancel
Save