Browse Source

包装规格

master_hella_20240701
zhang_li 4 months ago
parent
commit
06cd2d5663
  1. 11
      src/api/wms/packageunit/index.ts
  2. 27
      src/views/wms/basicDataManage/itemManage/packageunit/index.vue
  3. 2
      src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts

11
src/api/wms/packageunit/index.ts

@ -33,7 +33,16 @@ export const getPackageunitPage = async (params) => {
return await request.get({ url: `/wms/packageunit/page`, params })
}
}
// 查询物品包装规格信息 列表树状图
export const getPackageunitPageTree = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/packageunit/seniorTree', data })
} else {
return await request.get({ url: `/wms/packageunit/pageTree`, params })
}
}
// 查询物品包装规格信息 详情
export const getPackageunit = async (id: number) => {
return await request.get({ url: `/wms/packageunit/get?id=` + id })

27
src/views/wms/basicDataManage/itemManage/packageunit/index.vue

@ -34,7 +34,7 @@
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
@ -80,6 +80,10 @@ const tableColumns = ref(Packageunit.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
// if(val[0].parentCode){
// message.error('')
// return
// }
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
@ -92,7 +96,7 @@ const updataTableColumns = (val) => {
}
const { tableObject, tableMethods } = useTable({
getListApi: PackageunitApi.getPackageunitPage //
getListApi: PackageunitApi.getPackageunitPageTree //
})
//
@ -133,10 +137,23 @@ const buttonBaseClick = (val, item) => {
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:packageunit:update'}), //
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>-1&&findIndex<$index){
return []
}
return [
defaultButtons.mainListEditBtn({hasPermi:'wms:packageunit:update',hide:isShowButton(row)}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:packageunit:delete'}), //
]
]
}
const isShowButton =(row)=>{
if(row.children&&row.children.length>0){
return true
}else{
return false
}
}
// -
const buttonTableClick = async (val, row) => {

2
src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts

@ -335,7 +335,7 @@ export const Packageunit = useCrudSchemas(reactive<CrudSchema[]>([
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择到库位代码', // 输入框占位文本
searchListPlaceholder: '请选择父包装代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '包装规格信息', // 查询弹窗标题
searchAllSchemas: Packageunit1.allSchemas, // 查询弹窗所需类

Loading…
Cancel
Save