Browse Source

搜索样式,bug修改

master
zhang_li 1 year ago
parent
commit
73ba5ceef6
  1. 1
      src/api/wms/itembasic/index.ts
  2. 2
      src/components/BasicForm/src/BasicForm.vue
  3. 37
      src/components/Search/src/Search.vue
  4. 8
      src/views/wms/basicDataManage/factoryModeling/enterprise/index.vue
  5. 2
      src/views/wms/basicDataManage/itemManage/itembasic/index.vue

1
src/api/wms/itembasic/index.ts

@ -32,7 +32,6 @@ export interface ItembasicVO {
// 查询物品基本信息列表
export const getItembasicPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return request.post({ url: '/wms/itembasic/senior', data })
} else {

2
src/components/BasicForm/src/BasicForm.vue

@ -249,7 +249,7 @@ const submitForm = async () => {
return item.field === 'activeTime' || item.field === 'expireTime';
});
if(isHave){
if(data.activeTime >=data.expireTime){
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){
message.error('失效时间要大于生效时间')
return;
}

37
src/components/Search/src/Search.vue

@ -101,15 +101,22 @@ const setVisible = () => {
visible.value = !unref(visible)
}
const Search = ref()
onMounted(() => {
})
onMounted(() => {})
</script>
<template>
<!-- update by 芋艿class="-mb-15px" 用于降低和 ContentWrap 组件的底部距离避免空隙过大 -->
<div ref="Search">
<Form :inline="inline" :is-col="isCol" :is-custom="false" :label-width="labelWidth" :schema="newSchema"
class="-mb-15px" hide-required-asterisk @register="register">
<Form
:inline="inline"
:is-col="isCol"
:is-custom="false"
:label-width="labelWidth"
:schema="newSchema"
class="-mb-15px search"
hide-required-asterisk
@register="register"
>
<template #action>
<div v-if="layout === 'inline'">
<!-- update by 芋艿去除搜索的 type="primary"颜色变淡一点 -->
@ -136,7 +143,6 @@ onMounted(() => {
</Form>
</div>
<template v-if="layout === 'bottom'">
<div :style="bottonButtonStyle">
<ElButton v-if="showSearch" type="primary" @click="search">
@ -156,3 +162,24 @@ onMounted(() => {
</div>
</template>
</template>
<style lang="scss" scoped>
.search ::v-deep(.el-form-item) {
margin-right: 1%;
width: 20%;
}
.search ::v-deep(.el-form-item:nth-last-child(1)) {
margin-right: 0px;
width: 16%;
.el-form-item__content {
flex: 1;
>div{
flex: 1;
button {
width: 46%;
max-width: 80px;
}
}
}
}
</style>

8
src/views/wms/basicDataManage/factoryModeling/enterprise/index.vue

@ -52,8 +52,6 @@
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="Enterprise.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/enterprise/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
@ -191,11 +189,6 @@ const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '企业导入模版.xls'
})
//
const importSuccess = () => {
@ -214,6 +207,5 @@ const searchFormClick = (searchData) => {
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await EnterpriseApi.importTemplate()
})
</script>

2
src/views/wms/basicDataManage/itemManage/itembasic/index.vue

@ -65,7 +65,6 @@ defineOptions({ name: 'Itembasic' })
const { tableObject, tableMethods } = useTable({
getListApi: ItembasicApi.getItembasicPage //
})
console.log(tableObject)
const importFormRef = ref()
//
const HeadButttondata = [
@ -165,6 +164,7 @@ const openDetail = (row: any, titleName: any, titleValue: any) => {
const handleDelete = async (id: number) => {
try {
//
console.log(tableObject.params)
await message.delConfirm()
//
await ItembasicApi.deleteItembasic(id)

Loading…
Cancel
Save