Commit c2ea7e08 by yubin

页面修改

parent a885a8a9
...@@ -54,13 +54,14 @@ ...@@ -54,13 +54,14 @@
<!-- 页面容器 --> <!-- 页面容器 -->
<div class="page-container"> <div class="page-container">
<!-- 搜索区域 --> <!-- 搜索区域 - 参考样式修改 -->
<page-wrapper-search <el-form
:model="queryParams" :model="queryParams"
ref="queryForm" ref="queryForm"
size="small" size="small"
@search="handleQuery" :inline="true"
@reset="resetQuery" v-show="showSearch"
label-width="100px"
> >
<el-form-item label="出库单号" prop="orderId"> <el-form-item label="出库单号" prop="orderId">
<el-input <el-input
...@@ -96,7 +97,7 @@ ...@@ -96,7 +97,7 @@
v-model="queryParams.orderTypeId" v-model="queryParams.orderTypeId"
placeholder="请输入出库类型" placeholder="请输入出库类型"
clearable clearable
style="width: 100%" style="width: 150px"
> >
<el-option <el-option
v-for="dict in dict.type.inbound_outbound_type" v-for="dict in dict.type.inbound_outbound_type"
...@@ -120,7 +121,7 @@ ...@@ -120,7 +121,7 @@
v-model="queryParams.orderStatus" v-model="queryParams.orderStatus"
placeholder="请选择订单状态" placeholder="请选择订单状态"
clearable clearable
style="width: 100%" style="width: 150px"
> >
<el-option <el-option
v-for="dict in dict.type.outbound_order_status" v-for="dict in dict.type.outbound_order_status"
...@@ -150,7 +151,13 @@ ...@@ -150,7 +151,13 @@
</template> </template>
</el-input> </el-input>
</el-form-item> </el-form-item>
</page-wrapper-search>
<!-- 新增搜索和重置按钮 -->
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<!-- 表格容器 --> <!-- 表格容器 -->
<div class="table-container"> <div class="table-container">
...@@ -1271,6 +1278,13 @@ export default { ...@@ -1271,6 +1278,13 @@ export default {
ownerId: false, ownerId: false,
outboundOrderId: false outboundOrderId: false
} }
// 核心修改:设置出库日期默认值为当前日期
const today = new Date()
const year = today.getFullYear()
const month = String(today.getMonth() + 1).padStart(2, '0')
const day = String(today.getDate()).padStart(2, '0')
this.form.inboundDate = `${year}-${month}-${day}`
this.open = true this.open = true
this.title = "添加出库单" this.title = "添加出库单"
}, },
...@@ -1563,3 +1577,41 @@ export default { ...@@ -1563,3 +1577,41 @@ export default {
} }
} }
</script> </script>
<style scoped>
.page-container {
padding: 16px;
background: #fff;
border-radius: 4px;
margin-bottom: 16px;
display: flex;
flex-direction: column;
height: calc(100vh - 140px);
min-height: 600px;
}
.table-container {
flex: 1;
min-height: 0;
margin-top: 16px;
display: flex;
flex-direction: column;
overflow-x: auto;
}
/* 补充样式,保持和参考页面一致 */
.el-form-item {
margin-bottom: 16px;
}
.material-group {
margin-bottom: 16px;
}
.mb8 {
margin-bottom: 8px;
}
.mb10 {
margin-bottom: 10px;
}
</style>
\ No newline at end of file
<template> <template>
<div class="app-container"> <div class="app-container">
<PageTitle> <PageTitle>
<template #buttons> <template #buttons>
<el-button <el-button
type="primary" type="primary"
plain plain
...@@ -12,7 +10,6 @@ ...@@ -12,7 +10,6 @@
@click="handleAdd" @click="handleAdd"
v-hasPermi="['inventory:owners:add']" v-hasPermi="['inventory:owners:add']"
>新增</el-button> >新增</el-button>
<el-button <el-button
type="success" type="success"
plain plain
...@@ -22,7 +19,6 @@ ...@@ -22,7 +19,6 @@
@click="handleUpdate" @click="handleUpdate"
v-hasPermi="['inventory:owners:edit']" v-hasPermi="['inventory:owners:edit']"
>修改</el-button> >修改</el-button>
<el-button <el-button
type="danger" type="danger"
plain plain
...@@ -32,7 +28,6 @@ ...@@ -32,7 +28,6 @@
@click="handleDelete" @click="handleDelete"
v-hasPermi="['inventory:owners:remove']" v-hasPermi="['inventory:owners:remove']"
>删除</el-button> >删除</el-button>
<el-button <el-button
type="success" type="success"
plain plain
...@@ -41,7 +36,6 @@ ...@@ -41,7 +36,6 @@
@click="handleImport" @click="handleImport"
v-hasPermi="['inventory:owners:add']" v-hasPermi="['inventory:owners:add']"
>导入</el-button> >导入</el-button>
<el-button <el-button
type="warning" type="warning"
plain plain
...@@ -50,19 +44,18 @@ ...@@ -50,19 +44,18 @@
@click="handleExport" @click="handleExport"
v-hasPermi="['inventory:owners:export']" v-hasPermi="['inventory:owners:export']"
>导出</el-button> >导出</el-button>
</template> </template>
</PageTitle> </PageTitle>
<div class="page-container"> <div class="page-container">
<page-wrapper-search <!-- 替换原有page-wrapper-search为原生el-form -->
<el-form
:model="queryParams" :model="queryParams"
ref="queryForm" ref="queryForm"
size="small" size="small"
@search="handleQuery" :inline="true"
@reset="resetQuery" v-show="showSearch"
label-width="100px"
> >
<el-form-item label="货主编码" prop="ownerCode"> <el-form-item label="货主编码" prop="ownerCode">
<el-input <el-input
...@@ -80,7 +73,6 @@ ...@@ -80,7 +73,6 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<!-- 新增英文名称查询项 -->
<el-form-item label="英文名称" prop="englishName"> <el-form-item label="英文名称" prop="englishName">
<el-input <el-input
v-model="queryParams.englishName" v-model="queryParams.englishName"
...@@ -97,14 +89,12 @@ ...@@ -97,14 +89,12 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="是否激活" prop="isActive"> <el-form-item label="是否激活" prop="isActive">
<el-select <el-select
v-model="queryParams.isActive" v-model="queryParams.isActive"
placeholder="请选择是否激活" placeholder="请选择是否激活"
clearable clearable
@keyup.enter.native="handleQuery" style="width: 150px"
style="width: 100%"
> >
<el-option <el-option
v-for="dict in dict.type.yes_no" v-for="dict in dict.type.yes_no"
...@@ -114,14 +104,19 @@ ...@@ -114,14 +104,19 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</page-wrapper-search> <!-- 独立的搜索和重置按钮 -->
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<div class="table-container"> <div class="table-container">
<el-table v-loading="loading" :data="ownersList" height="100%" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="ownersList" height="100%" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" fixed /> <el-table-column type="selection" width="55" align="center" fixed />
<el-table-column label="货主编码" align="center" prop="ownerCode" width="120" fixed/> <el-table-column label="货主编码" align="center" prop="ownerCode" width="120" fixed/>
<el-table-column label="货主名称" align="center" prop="ownerName"width="220" /> <el-table-column label="货主名称" align="center" prop="ownerName" width="220" />
<!-- 新增英文名称表格列 --> <el-table-column label="英文名称" align="center" prop="englishName" width="220" />
<el-table-column label="英文名称" align="center" prop="englishName"width="220" />
<el-table-column label="货主类型" align="center" prop="ownerType"> <el-table-column label="货主类型" align="center" prop="ownerType">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.owner_type" :value="scope.row.ownerType"/> <dict-tag :options="dict.type.owner_type" :value="scope.row.ownerType"/>
...@@ -131,14 +126,13 @@ ...@@ -131,14 +126,13 @@
<el-table-column label="联系电话" align="center" prop="contactPhone" width="120"/> <el-table-column label="联系电话" align="center" prop="contactPhone" width="120"/>
<el-table-column label="邮箱" align="center" prop="email" width="200"/> <el-table-column label="邮箱" align="center" prop="email" width="200"/>
<el-table-column label="地址" align="center" prop="address" width="220"/> <el-table-column label="地址" align="center" prop="address" width="220"/>
<el-table-column label="税号" align="center" prop="taxNumber"width="180" /> <el-table-column label="税号" align="center" prop="taxNumber" width="180" />
<el-table-column label="银行账户" align="center" prop="bankAccount" width="180"/> <el-table-column label="银行账户" align="center" prop="bankAccount" width="180"/>
<el-table-column label="是否激活" align="center" prop="isActive"> <el-table-column label="是否激活" align="center" prop="isActive">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.yes_no" :value="scope.row.isActive"/> <dict-tag :options="dict.type.yes_no" :value="scope.row.isActive"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建日期" align="center" prop="createTime" width="160" /> <el-table-column label="创建日期" align="center" prop="createTime" width="160" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120" fixed="right"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -161,7 +155,6 @@ ...@@ -161,7 +155,6 @@
</el-table> </el-table>
</div> </div>
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
...@@ -171,9 +164,6 @@ ...@@ -171,9 +164,6 @@
/> />
</div> </div>
<!-- 添加或修改货主信息对话框 --> <!-- 添加或修改货主信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
...@@ -189,7 +179,6 @@ ...@@ -189,7 +179,6 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<!-- 新增英文名称表单项 -->
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="24"> <el-col :span="24">
<el-form-item label="英文名称" prop="englishName"> <el-form-item label="英文名称" prop="englishName">
...@@ -249,7 +238,6 @@ ...@@ -249,7 +238,6 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="银行账户" prop="bankAccount"> <el-form-item label="银行账户" prop="bankAccount">
<el-input v-model="form.bankAccount" placeholder="请输入银行账户" /> <el-input v-model="form.bankAccount" placeholder="请输入银行账户" />
...@@ -271,11 +259,10 @@ ...@@ -271,11 +259,10 @@
template-name="owners_importTemplate" template-name="owners_importTemplate"
@success="getList" @success="getList"
/> />
</div> </div>
</template> </template>
<script>
<script>
import { listOwners, getOwners, delOwners, addOwners, updateOwners } from "@/api/inventory/owners" import { listOwners, getOwners, delOwners, addOwners, updateOwners } from "@/api/inventory/owners"
import ImportExcel from "@/components/ImportExcel/index" import ImportExcel from "@/components/ImportExcel/index"
...@@ -309,7 +296,7 @@ export default { ...@@ -309,7 +296,7 @@ export default {
pageSize: 10, pageSize: 10,
ownerCode: null, ownerCode: null,
ownerName: null, ownerName: null,
englishName: null, // 新增英文名称查询参数 englishName: null,
ownerType: null, ownerType: null,
contactPerson: null, contactPerson: null,
contactPhone: null, contactPhone: null,
...@@ -332,7 +319,7 @@ export default { ...@@ -332,7 +319,7 @@ export default {
ownerName: [ ownerName: [
{ required: true, message: '货主名称不能为空', trigger: 'blur' } { required: true, message: '货主名称不能为空', trigger: 'blur' }
], ],
englishName: [ // 新增英文名称校验规则(非必填,可根据需求调整) englishName: [
{ required: false, message: '英文名称不能为空', trigger: 'blur' } { required: false, message: '英文名称不能为空', trigger: 'blur' }
], ],
contactPerson: [ contactPerson: [
...@@ -377,7 +364,7 @@ export default { ...@@ -377,7 +364,7 @@ export default {
id: null, id: null,
ownerCode: null, ownerCode: null,
ownerName: null, ownerName: null,
englishName: null, // 新增英文名称表单重置 englishName: null,
ownerType: null, ownerType: null,
contactPerson: null, contactPerson: null,
contactPhone: null, contactPhone: null,
...@@ -401,12 +388,15 @@ export default { ...@@ -401,12 +388,15 @@ export default {
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.queryParams={ // 使用el-form的resetFields方法重置表单
this.$refs.queryForm.resetFields()
// 手动重置复杂类型的参数(如下拉框)
this.queryParams = {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
ownerCode: null, ownerCode: null,
ownerName: null, ownerName: null,
englishName: null, // 新增英文名称查询参数重置 englishName: null,
ownerType: null, ownerType: null,
contactPerson: null, contactPerson: null,
contactPhone: null, contactPhone: null,
...@@ -418,7 +408,7 @@ export default { ...@@ -418,7 +408,7 @@ export default {
sortNo: null, sortNo: null,
createUserCode: null, createUserCode: null,
updateUserCode: null updateUserCode: null
}, }
this.handleQuery() this.handleQuery()
}, },
// 多选框选中数据 // 多选框选中数据
...@@ -486,3 +476,26 @@ export default { ...@@ -486,3 +476,26 @@ export default {
} }
} }
</script> </script>
<style scoped>
/* 添加参考页面的样式,保证布局一致 */
.page-container {
padding: 16px;
background: #fff;
border-radius: 4px;
margin-bottom: 16px;
display: flex;
flex-direction: column;
height: calc(100vh - 140px);
min-height: 600px;
}
.table-container {
flex: 1;
min-height: 0;
margin-top: 16px;
display: flex;
flex-direction: column;
overflow-x: auto;
}
</style>
\ No newline at end of file
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
<if test="orderId != null and orderId != ''"> and oo.order_id like concat('%', #{orderId}, '%')</if> <if test="orderId != null and orderId != ''"> and oo.order_id like concat('%', #{orderId}, '%')</if>
<if test="batchCode != null and batchCode != ''"> and oo.batch_code like concat('%', #{batchCode}, '%')</if> <if test="batchCode != null and batchCode != ''"> and oo.batch_code like concat('%', #{batchCode}, '%')</if>
<if test="systemNo != null and systemNo != ''"> and oo.system_no like concat('%', #{systemNo}, '%')</if> <if test="systemNo != null and systemNo != ''"> and oo.system_no like concat('%', #{systemNo}, '%')</if>
<if test="orderTypeId != null and orderTypeId != ''"> and oo.order_type_id = {orderTypeId}</if> <if test="orderTypeId != null and orderTypeId != ''"> and oo.order_type_id = #{orderTypeId}</if>
<if test="orderType != null and orderType != ''"> and oo.order_type = #{orderType}</if> <if test="orderType != null and orderType != ''"> and oo.order_type = #{orderType}</if>
<if test="batchCode != null and batchCode != ''"> and oo.batch_code like concat('%', #{batchCode}, '%')</if> <if test="batchCode != null and batchCode != ''"> and oo.batch_code like concat('%', #{batchCode}, '%')</if>
<if test="warehouseId != null and warehouseId != ''"> and oo.warehouse_id = #{warehouseId}</if> <if test="warehouseId != null and warehouseId != ''"> and oo.warehouse_id = #{warehouseId}</if>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论