编辑页 底部浮动

pull/2/head
qiuhongwu 9 months ago
parent 5ff73face2
commit 35f26f57ac

@ -17,7 +17,8 @@
} }
.hl-card { .hl-card {
margin: 0px; position: relative;
padding-bottom: 100px;
border-radius: 10px !important; border-radius: 10px !important;
.el-card__header { .el-card__header {
background-color: #f7f8fa; background-color: #f7f8fa;
@ -34,6 +35,23 @@
font-size: 20px !important; font-size: 20px !important;
} }
} }
.hl-card-scrollable-content {
width: 100%;
box-sizing: border-box;
max-height: calc(100vh - 300px); overflow-y: auto;
}
.hl-footer {
width: 96%;
background-color: #fff;
position: absolute !important;
left: 50%;
height: 100px;
line-height: 100px;
transform: translateX(-51%);
bottom: 0px;
z-index: 1000;
}
} }
.borderxx { .borderxx {
border: none !important; border: none !important;
@ -48,7 +66,7 @@
.hl-table thead { .hl-table thead {
color: #1d2129; color: #1d2129;
} }
.hl-table_header{ .hl-table_header {
color: red; color: red;
} }
.hl-table thead th.el-table__cell { .hl-table thead th.el-table__cell {
@ -88,7 +106,7 @@
border: none !important; border: none !important;
.el-card__header { .el-card__header {
padding: 16px 0px; padding-bottom: 16px ;
background-color: inherit; background-color: inherit;
.hl-card-info-icona { .hl-card-info-icona {
@ -106,14 +124,13 @@
.el-card__body { .el-card__body {
padding: 15px 0px; padding: 15px 0px;
.el-row { .el-row {
margin: 10px; margin: 10px;
} }
} }
} }
.hl-incard { .hl-incard {
margin-bottom: 20px; margin-bottom: 10px;
padding: 0 20px; padding: 0 20px;
} }
@ -121,9 +138,6 @@
margin: 10px 0px 10px 0px !important; margin: 10px 0px 10px 0px !important;
} }
.hl-footer {
margin: 30px 0;
}
.abstatus { .abstatus {
position: absolute; position: absolute;
right: 80px; right: 80px;
@ -145,7 +159,6 @@
} }
} }
/* ---el-table滚动条公共样式--- */ /* ---el-table滚动条公共样式--- */
.el-scrollbar { .el-scrollbar {
// //

@ -4,6 +4,7 @@
<template #header> <template #header>
<span v-text="dialogTitle"></span> <span v-text="dialogTitle"></span>
</template> </template>
<div class="hl-card-scrollable-content" >
<el-form <el-form
ref="formRef" ref="formRef"
:model="formData" :model="formData"
@ -133,7 +134,7 @@
v-loading="subFormLoading" v-loading="subFormLoading"
label-width="0" label-width="0"
> >
<el-table :data="formData.matItemDOList" class="hl-table" > <el-table :data="formData.matItemDOList" class="hl-table">
<el-table-column prop="cid" label="序号" min-width="80" align="center" fixed /> <el-table-column prop="cid" label="序号" min-width="80" align="center" fixed />
<el-table-column prop="matId" min-width="140" align="center"> <el-table-column prop="matId" min-width="140" align="center">
<template #header> <span class="hl-table_header">*</span> 物料编码 </template> <template #header> <span class="hl-table_header">*</span> 物料编码 </template>
@ -275,7 +276,7 @@
<el-input v-model="scope.row.projectNo" /> <el-input v-model="scope.row.projectNo" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="description" label="备注" align="center" min-width="180" > <el-table-column prop="description" label="备注" align="center" min-width="180">
<template #default="scope"> <template #default="scope">
<el-input v-model="scope.row.description" /> <el-input v-model="scope.row.description" />
</template> </template>
@ -420,6 +421,7 @@
</el-row> </el-row>
</el-card> </el-card>
</el-form> </el-form>
</div>
<div class="text-center hl-footer"> <div class="text-center hl-footer">
<el-button @click="() => router.go(-1)" size="large"> </el-button> <el-button @click="() => router.go(-1)" size="large"> </el-button>
<el-button <el-button
@ -517,10 +519,9 @@ const subFormRules = reactive({
storageOkQty: [{ required: true, message: '入库数量不能为空', trigger: 'blur' }] storageOkQty: [{ required: true, message: '入库数量不能为空', trigger: 'blur' }]
}) })
const handleStatus = async (num) => { const handleStatus = async (num) => {
// //
await formRef.value.validate() await formRef.value.validate()
if(formData.value.matItemDOList.length === 0){ if (formData.value.matItemDOList.length === 0) {
message.alertWarning('请添加物料信息!') message.alertWarning('请添加物料信息!')
return return
} }
@ -576,10 +577,9 @@ const handleStatus = async (num) => {
isShowBtnOther.value = false isShowBtnOther.value = false
isShowBtnDelete.value = false isShowBtnDelete.value = false
} }
query.type= 'update' query.type = 'update'
query.id = formData.value.id query.id = formData.value.id
reload() reload()
} }
const userList = ref<UserApi.UserVO[]>([]) // const userList = ref<UserApi.UserVO[]>([]) //
@ -642,7 +642,7 @@ var commonResult = ''
/** 提交表单 */ /** 提交表单 */
const emit = defineEmits(['success']) // success const emit = defineEmits(['success']) // success
const saveFormData = async () =>{ const saveFormData = async () => {
// //
formLoading.value = true formLoading.value = true
try { try {
@ -671,7 +671,6 @@ const saveFormData = async () =>{
} }
formData.value = await StorageApi.getStorage(storageid.value) formData.value = await StorageApi.getStorage(storageid.value)
message.success(t(commonResult)) message.success(t(commonResult))
} finally { } finally {
formLoading.value = false formLoading.value = false
} }
@ -679,7 +678,7 @@ const saveFormData = async () =>{
const submitForm = async () => { const submitForm = async () => {
// //
await formRef.value.validate() await formRef.value.validate()
if(formData.value.matItemDOList.length === 0){ if (formData.value.matItemDOList.length === 0) {
message.alertWarning('请添加物料信息!') message.alertWarning('请添加物料信息!')
return return
} }
@ -693,11 +692,11 @@ const submitForm = async () => {
await saveFormData() await saveFormData()
// //
query.type= 'update' query.type = 'update'
query.id = storageid.value query.id = storageid.value
formData.value.id = storageid.value formData.value.id = storageid.value
// //
reload(); reload()
} }
var matCount = 1 var matCount = 1
@ -866,7 +865,6 @@ onMounted(async () => {
isShowBtnDelete.value = false isShowBtnDelete.value = false
} }
// //
const queryParamsRg = reactive({ const queryParamsRg = reactive({
pageNo: 1, pageNo: 1,
@ -930,10 +928,14 @@ onMounted(async () => {
// //
userList.value = await UserApi.getSimpleUserList() userList.value = await UserApi.getSimpleUserList()
}) })
</script> </script>
<style> <style setup lang="scss">
a { a {
color: #409eff; color: #409eff;
text-decoration: none; text-decoration: none;
} }
</style> </style>

@ -4,6 +4,7 @@
<template #header> <template #header>
<span v-text="dialogTitle"></span> <span v-text="dialogTitle"></span>
</template> </template>
<div class="hl-card-scrollable-content">
<el-form <el-form
ref="formRef" ref="formRef"
:model="formData" :model="formData"
@ -167,7 +168,12 @@
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="matCode" label="物料编码" min-width="120" align="center" /> <el-table-column
prop="matCode"
label="物料编码"
min-width="120"
align="center"
/>
<el-table-column prop="matType" label="物料类型" min-width="120" align="center"> <el-table-column prop="matType" label="物料类型" min-width="120" align="center">
<template #default="scope"> <template #default="scope">
<dict-tag <dict-tag
@ -177,7 +183,12 @@
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="matSpec" label="规格/型号" min-width="120" align="center" /> <el-table-column
prop="matSpec"
label="规格/型号"
min-width="120"
align="center"
/>
<el-table-column prop="matUnit" label="系统单位" min-width="120" align="center"> <el-table-column prop="matUnit" label="系统单位" min-width="120" align="center">
<template #default="scope"> <template #default="scope">
@ -232,7 +243,12 @@
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="matRest" label="库存数量" min-width="120" align="center" /> <el-table-column
prop="matRest"
label="库存数量"
min-width="120"
align="center"
/>
<el-table-column prop="storageOkQty" min-width="120" align="center"> <el-table-column prop="storageOkQty" min-width="120" align="center">
<template #header> <span class="hl-table_header">*</span>出库数量</template> <template #header> <span class="hl-table_header">*</span>出库数量</template>
<template #default="scope"> <template #default="scope">
@ -392,6 +408,7 @@
</el-row> </el-row>
</el-card> </el-card>
</el-form> </el-form>
</div>
<div class="text-center hl-footer"> <div class="text-center hl-footer">
<el-button @click="() => router.go(-1)" size="large"> </el-button> <el-button @click="() => router.go(-1)" size="large"> </el-button>
<el-button <el-button
@ -489,10 +506,9 @@ const subFormRules = reactive({
storageOkQty: [{ required: true, message: '出库数量不能为空', trigger: 'blur' }] storageOkQty: [{ required: true, message: '出库数量不能为空', trigger: 'blur' }]
}) })
const handleStatus = async (num) => { const handleStatus = async (num) => {
// //
await formRef.value.validate() await formRef.value.validate()
if(formData.value.matItemDOList.length === 0){ if (formData.value.matItemDOList.length === 0) {
message.alertWarning('请添加物料信息!') message.alertWarning('请添加物料信息!')
return return
} }
@ -547,7 +563,7 @@ const handleStatus = async (num) => {
isShowBtnDelete.value = false isShowBtnDelete.value = false
} }
query.id = storageid.value query.id = storageid.value
query.type= 'update' query.type = 'update'
reload() reload()
} }
const userList = ref<UserApi.UserVO[]>([]) // const userList = ref<UserApi.UserVO[]>([]) //
@ -611,7 +627,7 @@ var commonResult = ''
/** 提交表单 */ /** 提交表单 */
const emit = defineEmits(['success']) // success const emit = defineEmits(['success']) // success
const saveFormData = async () =>{ const saveFormData = async () => {
// //
const matCurrentData = await StorageMatApi.getStorageMatList() const matCurrentData = await StorageMatApi.getStorageMatList()
var hasRestNum = true var hasRestNum = true
@ -660,9 +676,6 @@ const saveFormData = async () =>{
} }
formData.value = await StorageApi.getStorage(storageid.value) formData.value = await StorageApi.getStorage(storageid.value)
message.success(t(commonResult)) message.success(t(commonResult))
} finally { } finally {
formLoading.value = false formLoading.value = false
} }
@ -670,7 +683,7 @@ const saveFormData = async () =>{
const submitForm = async () => { const submitForm = async () => {
// //
await formRef.value.validate() await formRef.value.validate()
if(formData.value.matItemDOList.length === 0){ if (formData.value.matItemDOList.length === 0) {
message.alertWarning('请添加物料信息!') message.alertWarning('请添加物料信息!')
return return
} }
@ -684,7 +697,7 @@ const submitForm = async () => {
await saveFormData() await saveFormData()
// //
query.id = storageid.value query.id = storageid.value
query.type= 'update' query.type = 'update'
reload() reload()
} }
@ -712,7 +725,6 @@ const onAddItem = () => {
} }
matCount = matCount + 1 matCount = matCount + 1
formData.value.matItemDOList.push(newData) formData.value.matItemDOList.push(newData)
} else { } else {
message.alertWarning('请选择出库仓库') message.alertWarning('请选择出库仓库')
@ -748,11 +760,14 @@ const handleWh = async (wid) => {
let matParams = { let matParams = {
pageNo: 1, pageNo: 1,
pageSize: 99, pageSize: 99,
status: "1" status: '1'
} }
const dataMat = await MaterialApi.getMaterialPage(matParams) const dataMat = await MaterialApi.getMaterialPage(matParams)
matList.value = [] matList.value = []
matList.value = dataMat.list.filter((item) => matLastRemoteData.find((fish) => fish.matId === item.id && fish.whId == wid) !== undefined) matList.value = dataMat.list.filter(
(item) =>
matLastRemoteData.find((fish) => fish.matId === item.id && fish.whId == wid) !== undefined
)
formData.value.matItemDOList = [] formData.value.matItemDOList = []
// formData.value.matItemDOList.forEach(item => { // formData.value.matItemDOList.forEach(item => {
@ -792,7 +807,12 @@ const remoteMatCodeSearch = async (name) => {
const dataMat = await MaterialApi.getMaterialPage(matParams) const dataMat = await MaterialApi.getMaterialPage(matParams)
matList.value = [] matList.value = []
matList.value = dataMat.list.filter((item) => matLastRemoteData.find((fish) => fish.matId === item.id && fish.whId == formData.value.whId) !== undefined) matList.value = dataMat.list.filter(
(item) =>
matLastRemoteData.find(
(fish) => fish.matId === item.id && fish.whId == formData.value.whId
) !== undefined
)
matSelectLoading.value = false matSelectLoading.value = false
} }
@ -862,8 +882,6 @@ onMounted(async () => {
dialogTitle.value = t('action.' + query.type) dialogTitle.value = t('action.' + query.type)
dialogTitle.value = query.type === 'review' ? '查看' : dialogTitle.value dialogTitle.value = query.type === 'review' ? '查看' : dialogTitle.value
//------------------- //-------------------
const data = await WarehouseApi.getWarehouseSimpList() const data = await WarehouseApi.getWarehouseSimpList()
warehouseList.value = data warehouseList.value = data

Loading…
Cancel
Save