Browse Source

盘点计划详情

master
zhang_li 12 months ago
parent
commit
056c689073
  1. 6
      src/api/wms/countPlanDetail/index.ts
  2. 36
      src/components/Detail/src/Detail.vue
  3. 2
      src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts

6
src/api/wms/countPlanDetail/index.ts

@ -17,8 +17,14 @@ export interface CountPlanDetailVO {
// 查询盘点计划子列表 // 查询盘点计划子列表
export const getCountPlanDetailPage = async (params) => { export const getCountPlanDetailPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/count-plan-detail/senior', data })
} else {
return await request.get({ url: `/wms/count-plan-detail/page`, params }) return await request.get({ url: `/wms/count-plan-detail/page`, params })
} }
}
// 查询盘点计划子详情 // 查询盘点计划子详情
export const getCountPlanDetail = async (id: number) => { export const getCountPlanDetail = async (id: number) => {

36
src/components/Detail/src/Detail.vue

@ -131,7 +131,6 @@ import DetailTable from '@/components/DetailTable/src/DetailTable.vue'
defineOptions({ name: 'Detail' }) defineOptions({ name: 'Detail' })
const message = useMessage() // const message = useMessage() //
const { t } = useI18n() // const { t } = useI18n() //
@ -139,7 +138,7 @@ const route = useRoute() // 路由信息
const routeName = ref() const routeName = ref()
routeName.value = route.name routeName.value = route.name
routeName.value = routeName.value.substring(0, routeName.value.length - 4) + 'Detail' routeName.value = routeName.value.substring(0, routeName.value.length - 4) + 'Detail'
const updateKey = ref(0); const updateKey = ref(0)
const props = defineProps({ const props = defineProps({
// //
@ -231,7 +230,7 @@ const props = defineProps({
type: Array, type: Array,
required: false, required: false,
default: null default: null
}, }
}) })
const isShowDrawer = ref(false) const isShowDrawer = ref(false)
const detailLoading = ref(false) const detailLoading = ref(false)
@ -354,7 +353,16 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
}), // }), //
defaultButtons.defaultFilterBtn(null) // defaultButtons.defaultFilterBtn(null) //
] ]
//
if (props.fromeWhere == 'countPlan') {
HeadButttondata.value = [
defaultButtons.defaultAddBtn({
hide: isShowMainButton(row, ['1'])
}) //
]
} }
}
// //
buttondata.value = [ buttondata.value = [
defaultButtons.mainListEditBtn({ defaultButtons.mainListEditBtn({
@ -391,7 +399,6 @@ const getChangeRecordList = async () => {
changeRecordData.changeRecordList = await RemarkApi.getChangeRecordPage(remarksData.data) changeRecordData.changeRecordList = await RemarkApi.getChangeRecordPage(remarksData.data)
} }
const tableObjectRef = ref() const tableObjectRef = ref()
const tableMethodsRef = ref() const tableMethodsRef = ref()
const detailAllSchemasRef = ref() const detailAllSchemasRef = ref()
@ -457,17 +464,13 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */ /** 添加/修改操作 */
const formRef = ref() const formRef = ref()
const openForm = async (type: string, row?: number) => { const openForm = async (type: string, row?: number) => {
console.log(row)
if(props.fromeWhere=='countPlan'){
}
formRef.value.open(type, row, masterParmas.value) formRef.value.open(type, row, masterParmas.value)
} }
// form // form
const submitForm = async (formType, data) => { const submitForm = async (formType, data) => {
try { try {
// detailValidate // detailValidate
const rs = await props.detailValidate?props.detailValidate(data):true const rs = (await props.detailValidate) ? props.detailValidate(data) : true
if (!rs) return if (!rs) return
if (formType === 'create') { if (formType === 'create') {
await props.apiCreate(data) await props.apiCreate(data)
@ -479,7 +482,7 @@ const submitForm = async (formType, data) => {
formRef.value.dialogVisible = false formRef.value.dialogVisible = false
// //
await getList() await getList()
updateKey.value += 1; updateKey.value += 1
} finally { } finally {
formRef.value.formLoading = false formRef.value.formLoading = false
} }
@ -490,7 +493,12 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
emit('searchTableSuccessDetail', formField, searchField, val, formRef) emit('searchTableSuccessDetail', formField, searchField, val, formRef)
} }
// //
const emit = defineEmits(['searchTableSuccessDetail', 'changeTabs','selectChangeDetail','detailOpenForm']) const emit = defineEmits([
'searchTableSuccessDetail',
'changeTabs',
'selectChangeDetail',
'detailOpenForm'
])
/** 删除按钮操作 */ /** 删除按钮操作 */
const handleDelete = async (id: number) => { const handleDelete = async (id: number) => {
try { try {
@ -501,7 +509,7 @@ const handleDelete = async (id: number) => {
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
// //
await getList() await getList()
updateKey.value += 1; updateKey.value += 1
} catch {} } catch {}
} }
// //
@ -521,7 +529,7 @@ const searchFormClick =async (searchData) => {
tableObjectRef.value.tableList = [] tableObjectRef.value.tableList = []
const { getList } = tableMethods const { getList } = tableMethods
await getList() await getList()
updateKey.value += 1; updateKey.value += 1
// tableObjectRef.value.params = { // tableObjectRef.value.params = {
// isSearch: true, // isSearch: true,
// filters: searchData.filters // filters: searchData.filters
@ -547,7 +555,7 @@ watch(
tableMethodsRef.value = tableMethods tableMethodsRef.value = tableMethods
const { getList } = tableMethods const { getList } = tableMethods
getList() getList()
}, }
) )
</script> </script>
<style lang="scss"> <style lang="scss">

2
src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts

@ -649,7 +649,7 @@ export const CountPlanDetail = useCrudSchemas(<CrudSchema[]>([
}, },
tableForm: { tableForm: {
width: '300', width: '300',
} },
}, },
{ {
label: '操作', label: '操作',

Loading…
Cancel
Save