样式修改
parent
6cc31cfde5
commit
1155b55c9a
@ -0,0 +1,7 @@
|
|||||||
|
<svg t="1709457490982" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7187" width="200" height="200">
|
||||||
|
<path d="M768 896H256a85.333333 85.333333 0 0 1-85.333333-85.333333V213.333333a85.333333 85.333333 0 0 1 85.333333-85.333333h512a85.333333 85.333333 0 0 1 85.333333 85.333333v597.333334a85.333333 85.333333 0 0 1-85.333333 85.333333z" fill="#FFE8E6" p-id="7188"></path>
|
||||||
|
<path d="M682.666667 213.333333H341.333333a32 32 0 0 1 0-64h341.333334a32 32 0 0 1 0 64zM682.666667 341.333333H341.333333a32 32 0 0 1 0-64h341.333334a32 32 0 0 1 0 64zM512 469.333333H341.333333a32 32 0 0 1 0-64h170.666667a32 32 0 0 1 0 64z" fill="#F56C6C" p-id="7189"></path>
|
||||||
|
<path d="M512 661.333333m-149.333333 0a149.333333 149.333333 0 1 0 298.666666 0 149.333333 149.333333 0 1 0-298.666666 0Z" fill="#FFE8E6" p-id="7190"></path>
|
||||||
|
<path d="M512 682.666667a32 32 0 0 1-32-32v-74.666667a32 32 0 0 1 64 0v74.666667a32 32 0 0 1-32 32zM512 768a32 32 0 1 1 0-64 32 32 0 0 1 0 64z" fill="#F56C6C" p-id="7191"></path>
|
||||||
|
<path d="M768 896H256a85.333333 85.333333 0 0 1-85.333333-85.333333V213.333333a85.333333 85.333333 0 0 1 85.333333-85.333333h512a85.333333 85.333333 0 0 1 85.333333 85.333333v597.333334a85.333333 85.333333 0 0 1-85.333333 85.333333zM256 192a21.333333 21.333333 0 0 0-21.333333 21.333333v597.333334a21.333333 21.333333 0 0 0 21.333333 21.333333h512a21.333333 21.333333 0 0 0 21.333333-21.333333V213.333333a21.333333 21.333333 0 0 0-21.333333-21.333333H256z" fill="#F56C6C" p-id="7192"></path>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.5 KiB |
@ -0,0 +1,7 @@
|
|||||||
|
<svg t="1709457444982" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6187" width="200" height="200">
|
||||||
|
<path d="M853.333333 938.666667H170.666667a85.333333 85.333333 0 0 1-85.333334-85.333334V170.666667a85.333333 85.333333 0 0 1 85.333334-85.333334h682.666666a85.333333 85.333333 0 0 1 85.333334 85.333334v682.666666a85.333333 85.333333 0 0 1-85.333334 85.333334z" fill="#FFE8E6" p-id="6188"></path>
|
||||||
|
<path d="M512 640m-256 0a256 256 0 1 0 512 0 256 256 0 1 0-512 0Z" fill="#FFE8E6" p-id="6189"></path>
|
||||||
|
<path d="M512 661.333333a32 32 0 0 1-32-32V341.333333a32 32 0 0 1 64 0v288a32 32 0 0 1-32 32z" fill="#F56C6C" p-id="6190"></path>
|
||||||
|
<path d="M656 517.333333H368a32 32 0 0 1 0-64h288a32 32 0 0 1 0 64z" fill="#F56C6C" p-id="6191"></path>
|
||||||
|
<path d="M853.333333 938.666667H170.666667a85.333333 85.333333 0 0 1-85.333334-85.333334V170.666667a85.333333 85.333333 0 0 1 85.333334-85.333334h682.666666a85.333333 85.333333 0 0 1 85.333334 85.333334v682.666666a85.333333 85.333333 0 0 1-85.333334 85.333334zM170.666667 149.333333a21.333333 21.333333 0 0 0-21.333334 21.333334v682.666666a21.333333 21.333333 0 0 0 21.333334 21.333334h682.666666a21.333333 21.333333 0 0 0 21.333334-21.333334V170.666667a21.333333 21.333333 0 0 0-21.333334-21.333334H170.666667z" fill="#F56C6C" p-id="6192"></path>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.3 KiB |
@ -0,0 +1,6 @@
|
|||||||
|
<svg t="1709457383982" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5187" width="200" height="200">
|
||||||
|
<path d="M512 85.333333c235.648 0 426.666667 191.018667 426.666667 426.666667s-191.018667 426.666667-426.666667 426.666667S85.333333 747.648 85.333333 512 276.352 85.333333 512 85.333333z m0 64c-200.298667 0-362.666667 162.368-362.666667 362.666667s162.368 362.666667 362.666667 362.666667 362.666667-162.368 362.666667-362.666667-162.368-362.666667-362.666667-362.666667z" fill="#1890ff" p-id="5188"></path>
|
||||||
|
<path d="M512 298.666667c117.824 0 213.333333 95.509333 213.333333 213.333333s-95.509333 213.333333-213.333333 213.333333-213.333333-95.509333-213.333333-213.333333 95.509333-213.333333 213.333333-213.333333z m0 64a149.333333 149.333333 0 1 0 0 298.666666 149.333333 149.333333 0 0 0 0-298.666666z" fill="#1890ff" p-id="5189"></path>
|
||||||
|
<path d="M512 405.333333a32 32 0 0 1 32 32v160a32 32 0 0 1-64 0v-160a32 32 0 0 1 32-32z" fill="#1890ff" p-id="5190"></path>
|
||||||
|
<path d="M405.333333 512a32 32 0 0 1 32-32h160a32 32 0 0 1 0 64h-160a32 32 0 0 1-32-32z" fill="#1890ff" p-id="5191"></path>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.1 KiB |
@ -0,0 +1,254 @@
|
|||||||
|
/*
|
||||||
|
* 列表页面通用样式
|
||||||
|
* 提供现代化的列表页面设计和交互体验
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* 列表页面卡片样式 */
|
||||||
|
.list-card {
|
||||||
|
border-radius: 8px;
|
||||||
|
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.05);
|
||||||
|
margin-bottom: 16px;
|
||||||
|
transition: all 0.3s;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-card__header {
|
||||||
|
padding: 16px 20px;
|
||||||
|
border-bottom: 1px solid #f0f0f0;
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 16px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-card__body {
|
||||||
|
padding: 16px 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 搜索表单样式 */
|
||||||
|
.search-form {
|
||||||
|
.el-form-item {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
|
||||||
|
.el-form-item__label {
|
||||||
|
font-weight: 500;
|
||||||
|
color: #606266;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-input, .el-select, .el-date-editor {
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.el-input__inner {
|
||||||
|
border-radius: 4px;
|
||||||
|
transition: all 0.3s;
|
||||||
|
|
||||||
|
&:hover, &:focus {
|
||||||
|
border-color: #1890ff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 操作按钮组样式 */
|
||||||
|
.action-group {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
|
||||||
|
.left-actions, .right-actions {
|
||||||
|
display: flex;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-button {
|
||||||
|
border-radius: 4px;
|
||||||
|
transition: all 0.3s;
|
||||||
|
|
||||||
|
&.el-button--primary {
|
||||||
|
background-color: #1890ff;
|
||||||
|
border-color: #1890ff;
|
||||||
|
|
||||||
|
&:hover, &:focus {
|
||||||
|
background-color: #40a9ff;
|
||||||
|
border-color: #40a9ff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.el-button--success {
|
||||||
|
background-color: #52c41a;
|
||||||
|
border-color: #52c41a;
|
||||||
|
|
||||||
|
&:hover, &:focus {
|
||||||
|
background-color: #73d13d;
|
||||||
|
border-color: #73d13d;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.el-button--danger {
|
||||||
|
background-color: #f5222d;
|
||||||
|
border-color: #f5222d;
|
||||||
|
|
||||||
|
&:hover, &:focus {
|
||||||
|
background-color: #ff4d4f;
|
||||||
|
border-color: #ff4d4f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.el-button--warning {
|
||||||
|
background-color: #faad14;
|
||||||
|
border-color: #faad14;
|
||||||
|
|
||||||
|
&:hover, &:focus {
|
||||||
|
background-color: #ffc53d;
|
||||||
|
border-color: #ffc53d;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 表格样式 */
|
||||||
|
.list-table {
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 4px;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.el-table__header-wrapper th {
|
||||||
|
background-color: #fafafa;
|
||||||
|
color: #262626;
|
||||||
|
font-weight: 600;
|
||||||
|
height: 48px;
|
||||||
|
padding: 8px 16px;
|
||||||
|
border-bottom: 1px solid #f0f0f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-table__body-wrapper td {
|
||||||
|
padding: 12px 16px;
|
||||||
|
border-bottom: 1px solid #f0f0f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-table__row {
|
||||||
|
transition: all 0.3s;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: #f5f7fa;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.current-row {
|
||||||
|
background-color: #e6f7ff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-table__empty-block {
|
||||||
|
min-height: 200px;
|
||||||
|
|
||||||
|
.el-table__empty-text {
|
||||||
|
color: #8c8c8c;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.operation-column {
|
||||||
|
.el-button {
|
||||||
|
padding: 4px 8px;
|
||||||
|
|
||||||
|
& + .el-button {
|
||||||
|
margin-left: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 分页样式 */
|
||||||
|
.pagination-container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
margin-top: 16px;
|
||||||
|
|
||||||
|
.el-pagination {
|
||||||
|
padding: 0;
|
||||||
|
font-weight: normal;
|
||||||
|
|
||||||
|
.btn-prev, .btn-next {
|
||||||
|
border: 1px solid #d9d9d9;
|
||||||
|
border-radius: 4px;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: #1890ff;
|
||||||
|
border-color: #1890ff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-pager li {
|
||||||
|
border: 1px solid #d9d9d9;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin: 0 4px;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: #1890ff;
|
||||||
|
border-color: #1890ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
background-color: #1890ff;
|
||||||
|
color: #fff;
|
||||||
|
border-color: #1890ff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-pagination__sizes {
|
||||||
|
margin-right: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 响应式适配 */
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.search-form {
|
||||||
|
.el-form-item {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-group {
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
|
||||||
|
.left-actions, .right-actions {
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-table {
|
||||||
|
.el-table__header-wrapper th {
|
||||||
|
padding: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-table__body-wrapper td {
|
||||||
|
padding: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 动画效果 */
|
||||||
|
.fade-enter-active, .fade-leave-active {
|
||||||
|
transition: opacity 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fade-enter, .fade-leave-to {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.slide-enter-active, .slide-leave-active {
|
||||||
|
transition: all 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.slide-enter, .slide-leave-to {
|
||||||
|
transform: translateY(20px);
|
||||||
|
opacity: 0;
|
||||||
|
}
|
@ -0,0 +1,241 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-card class="list-card">
|
||||||
|
<div slot="header">
|
||||||
|
<span>标签样式示例</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section">
|
||||||
|
<h3>基础标签</h3>
|
||||||
|
<div class="example-row">
|
||||||
|
<el-tag>默认标签</el-tag>
|
||||||
|
<el-tag type="primary">主要标签</el-tag>
|
||||||
|
<el-tag type="success">成功标签</el-tag>
|
||||||
|
<el-tag type="info">信息标签</el-tag>
|
||||||
|
<el-tag type="warning">警告标签</el-tag>
|
||||||
|
<el-tag type="danger">危险标签</el-tag>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section">
|
||||||
|
<h3>深色标签</h3>
|
||||||
|
<div class="example-row">
|
||||||
|
<el-tag effect="dark">默认标签</el-tag>
|
||||||
|
<el-tag type="primary" effect="dark">主要标签</el-tag>
|
||||||
|
<el-tag type="success" effect="dark">成功标签</el-tag>
|
||||||
|
<el-tag type="info" effect="dark">信息标签</el-tag>
|
||||||
|
<el-tag type="warning" effect="dark">警告标签</el-tag>
|
||||||
|
<el-tag type="danger" effect="dark">危险标签</el-tag>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section">
|
||||||
|
<h3>朴素标签</h3>
|
||||||
|
<div class="example-row">
|
||||||
|
<el-tag effect="plain">默认标签</el-tag>
|
||||||
|
<el-tag type="primary" effect="plain">主要标签</el-tag>
|
||||||
|
<el-tag type="success" effect="plain">成功标签</el-tag>
|
||||||
|
<el-tag type="info" effect="plain">信息标签</el-tag>
|
||||||
|
<el-tag type="warning" effect="plain">警告标签</el-tag>
|
||||||
|
<el-tag type="danger" effect="plain">危险标签</el-tag>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section">
|
||||||
|
<h3>可关闭标签</h3>
|
||||||
|
<div class="example-row">
|
||||||
|
<el-tag closable>默认标签</el-tag>
|
||||||
|
<el-tag type="primary" closable>主要标签</el-tag>
|
||||||
|
<el-tag type="success" closable>成功标签</el-tag>
|
||||||
|
<el-tag type="info" closable>信息标签</el-tag>
|
||||||
|
<el-tag type="warning" closable>警告标签</el-tag>
|
||||||
|
<el-tag type="danger" closable>危险标签</el-tag>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section">
|
||||||
|
<h3>不同尺寸</h3>
|
||||||
|
<div class="example-row">
|
||||||
|
<el-tag size="mini" type="primary">迷你标签</el-tag>
|
||||||
|
<el-tag size="small" type="success">小型标签</el-tag>
|
||||||
|
<el-tag type="warning">默认标签</el-tag>
|
||||||
|
<el-tag size="medium" type="danger">中等标签</el-tag>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section">
|
||||||
|
<h3>自定义类名</h3>
|
||||||
|
<div class="example-row">
|
||||||
|
<el-tag class="el-tag-rounded" type="primary">圆角标签</el-tag>
|
||||||
|
<el-tag class="el-tag-bordered" type="success">带边框标签</el-tag>
|
||||||
|
<el-tag class="el-tag-with-icon" type="warning">
|
||||||
|
<i class="el-icon-star-on"></i>带图标标签
|
||||||
|
</el-tag>
|
||||||
|
<el-tag class="el-tag-clickable" type="danger" @click="handleClick">可点击标签</el-tag>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section">
|
||||||
|
<h3>状态标签</h3>
|
||||||
|
<div class="example-row">
|
||||||
|
<el-tag class="status-tag" type="primary">处理中</el-tag>
|
||||||
|
<el-tag class="status-tag" type="success">已完成</el-tag>
|
||||||
|
<el-tag class="status-tag" type="warning">待审核</el-tag>
|
||||||
|
<el-tag class="status-tag" type="danger">已拒绝</el-tag>
|
||||||
|
<el-tag class="status-tag" type="info">已关闭</el-tag>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section">
|
||||||
|
<h3>标签组</h3>
|
||||||
|
<div class="el-tag-group">
|
||||||
|
<el-tag type="primary">标签1</el-tag>
|
||||||
|
<el-tag type="success">标签2</el-tag>
|
||||||
|
<el-tag type="warning">标签3</el-tag>
|
||||||
|
<el-tag type="danger">标签4</el-tag>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section">
|
||||||
|
<h3>动态编辑标签</h3>
|
||||||
|
<div class="example-row">
|
||||||
|
<el-tag
|
||||||
|
v-for="tag in dynamicTags"
|
||||||
|
:key="tag"
|
||||||
|
closable
|
||||||
|
type="primary"
|
||||||
|
@close="handleClose(tag)"
|
||||||
|
>
|
||||||
|
{{ tag }}
|
||||||
|
</el-tag>
|
||||||
|
<el-input
|
||||||
|
class="input-new-tag"
|
||||||
|
v-if="inputVisible"
|
||||||
|
v-model="inputValue"
|
||||||
|
ref="saveTagInput"
|
||||||
|
size="small"
|
||||||
|
@keyup.enter.native="handleInputConfirm"
|
||||||
|
@blur="handleInputConfirm"
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
|
<el-button v-else class="button-new-tag" size="small" @click="showInput">+ 新标签</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section">
|
||||||
|
<h3>在表格中使用</h3>
|
||||||
|
<el-table :data="tableData" border style="width: 100%">
|
||||||
|
<el-table-column prop="date" label="日期" width="180"></el-table-column>
|
||||||
|
<el-table-column prop="name" label="姓名" width="180"></el-table-column>
|
||||||
|
<el-table-column prop="status" label="状态">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag :type="scope.row.status | statusFilter">{{ scope.row.statusText }}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "TagExample",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dynamicTags: ['标签一', '标签二', '标签三'],
|
||||||
|
inputVisible: false,
|
||||||
|
inputValue: '',
|
||||||
|
tableData: [
|
||||||
|
{
|
||||||
|
date: '2025-03-04',
|
||||||
|
name: '张三',
|
||||||
|
status: 'success',
|
||||||
|
statusText: '已完成'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
date: '2025-03-03',
|
||||||
|
name: '李四',
|
||||||
|
status: 'warning',
|
||||||
|
statusText: '待审核'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
date: '2025-03-02',
|
||||||
|
name: '王五',
|
||||||
|
status: 'primary',
|
||||||
|
statusText: '处理中'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
date: '2025-03-01',
|
||||||
|
name: '赵六',
|
||||||
|
status: 'danger',
|
||||||
|
statusText: '已拒绝'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleClose(tag) {
|
||||||
|
this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);
|
||||||
|
},
|
||||||
|
showInput() {
|
||||||
|
this.inputVisible = true;
|
||||||
|
this.$nextTick(_ => {
|
||||||
|
this.$refs.saveTagInput.$refs.input.focus();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleInputConfirm() {
|
||||||
|
let inputValue = this.inputValue;
|
||||||
|
if (inputValue) {
|
||||||
|
this.dynamicTags.push(inputValue);
|
||||||
|
}
|
||||||
|
this.inputVisible = false;
|
||||||
|
this.inputValue = '';
|
||||||
|
},
|
||||||
|
handleClick() {
|
||||||
|
this.$message.success('点击了标签');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
filters: {
|
||||||
|
statusFilter(status) {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.section {
|
||||||
|
margin-bottom: 24px;
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.example-row {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 12px;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-new-tag {
|
||||||
|
width: 90px;
|
||||||
|
margin-left: 10px;
|
||||||
|
vertical-align: bottom;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-new-tag {
|
||||||
|
margin-left: 10px;
|
||||||
|
height: 32px;
|
||||||
|
line-height: 30px;
|
||||||
|
padding-top: 0;
|
||||||
|
padding-bottom: 0;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,428 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card class="list-card">
|
||||||
|
<div slot="header">
|
||||||
|
<span>库存管理</span>
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-view"
|
||||||
|
@click="hideSearch"
|
||||||
|
>{{ showSearch ? '隐藏搜索' : '显示搜索' }}</el-button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-form
|
||||||
|
v-show="showSearch"
|
||||||
|
:model="filterQuery"
|
||||||
|
class="search-form"
|
||||||
|
label-width="100px"
|
||||||
|
>
|
||||||
|
<el-row :gutter="16">
|
||||||
|
<el-col :xs="24" :sm="24" :md="24" :lg="24">
|
||||||
|
<el-form-item label="UDI码:">
|
||||||
|
<el-input
|
||||||
|
id="inputer"
|
||||||
|
v-model="filterQuery.udiCode"
|
||||||
|
placeholder="请输入UDI码"
|
||||||
|
ref='inputRef'
|
||||||
|
@keypress.enter.native="enterKey($event)"
|
||||||
|
clearable
|
||||||
|
prefix-icon="el-icon-search"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="16">
|
||||||
|
<el-col :xs="24" :sm="12" :md="8" :lg="6">
|
||||||
|
<el-form-item label="所属仓库:">
|
||||||
|
<el-select
|
||||||
|
v-model="filterQuery.invCode"
|
||||||
|
placeholder="请选择所属仓库"
|
||||||
|
clearable
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in invList"
|
||||||
|
:key="item.name"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.code">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :xs="24" :sm="12" :md="8" :lg="6">
|
||||||
|
<el-form-item label="货位:">
|
||||||
|
<el-input
|
||||||
|
v-model="filterQuery.nameCode"
|
||||||
|
placeholder="请输入货位"
|
||||||
|
clearable
|
||||||
|
prefix-icon="el-icon-location"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :xs="24" :sm="12" :md="8" :lg="6">
|
||||||
|
<el-form-item label="供应商名称:">
|
||||||
|
<el-select
|
||||||
|
v-model="filterQuery.supId"
|
||||||
|
filterable
|
||||||
|
remote
|
||||||
|
clearable
|
||||||
|
reserve-keyword
|
||||||
|
placeholder="请输入供应商名称"
|
||||||
|
:remote-method="findMethod"
|
||||||
|
:loading="corpLoading"
|
||||||
|
@change="corpChange"
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in fromOptions"
|
||||||
|
:key="item.name"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.erpId"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :xs="24" :sm="12" :md="8" :lg="6">
|
||||||
|
<el-form-item label="生产企业:">
|
||||||
|
<el-input
|
||||||
|
v-model="filterQuery.ylqxzcrbarmc"
|
||||||
|
placeholder="请输入生产企业"
|
||||||
|
clearable
|
||||||
|
prefix-icon="el-icon-office-building"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="16">
|
||||||
|
<el-col :xs="24" :sm="12" :md="8" :lg="6">
|
||||||
|
<el-form-item label="注册/备案号:">
|
||||||
|
<el-input
|
||||||
|
v-model="filterQuery.zczbhhzbapzbh"
|
||||||
|
placeholder="请输入注册/备案号"
|
||||||
|
clearable
|
||||||
|
prefix-icon="el-icon-document"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :xs="24" :sm="12" :md="8" :lg="6">
|
||||||
|
<el-form-item label="物资名称:">
|
||||||
|
<el-input
|
||||||
|
v-model="filterQuery.cpmctymc"
|
||||||
|
placeholder="请输入物资名称"
|
||||||
|
clearable
|
||||||
|
prefix-icon="el-icon-goods"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :xs="24" :sm="12" :md="8" :lg="6">
|
||||||
|
<el-form-item label="规格型号:">
|
||||||
|
<el-input
|
||||||
|
v-model="filterQuery.ggxh"
|
||||||
|
placeholder="请输入规格型号"
|
||||||
|
clearable
|
||||||
|
prefix-icon="el-icon-tickets"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :xs="24" :sm="12" :md="8" :lg="6">
|
||||||
|
<el-form-item label="批次号:">
|
||||||
|
<el-input
|
||||||
|
v-model="filterQuery.batchNo"
|
||||||
|
placeholder="请输入批次号"
|
||||||
|
clearable
|
||||||
|
prefix-icon="el-icon-collection-tag"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<div class="action-group">
|
||||||
|
<div class="left-actions">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-refresh"
|
||||||
|
@click="onReset"
|
||||||
|
>重置</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="onSubmit"
|
||||||
|
>查询</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="list"
|
||||||
|
class="list-table"
|
||||||
|
highlight-current-row
|
||||||
|
border
|
||||||
|
>
|
||||||
|
<el-table-column label="序号" type="index" width="60" align="center"></el-table-column>
|
||||||
|
<el-table-column label="仓库" prop="invName" v-if="showSup" min-width="120" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="货位" prop="spaceName" v-if="showSup" min-width="120" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="DI标识" prop="nameCode" min-width="140" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="物资名称" prop="cpmctymc" min-width="150" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="规格型号" prop="ggxh" min-width="120" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="批次号" prop="batchNo" min-width="120" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="价格" prop="price" width="100" align="right">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.price ? '¥' + scope.row.price : '-' }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="库存数量" prop="reCount" width="100" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag :type="scope.row.reCount > 10 ? 'success' : 'danger'">{{ scope.row.reCount }}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="生产企业" prop="ylqxzcrbarmc" v-if="showSup" min-width="150" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh" v-if="showSup" min-width="150" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="供应商" prop="supName" v-if="showSup" min-width="150" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="操作" width="180" align="center" class-name="operation-column" fixed="right">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
size="mini"
|
||||||
|
icon="el-icon-bell"
|
||||||
|
@click.native.stop="invRemindSet(scope.row)"
|
||||||
|
circle
|
||||||
|
title="添加预警设置"
|
||||||
|
></el-button>
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
size="mini"
|
||||||
|
icon="el-icon-view"
|
||||||
|
@click.native.stop="detailDialog(scope.row)"
|
||||||
|
circle
|
||||||
|
title="查看详情"
|
||||||
|
></el-button>
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
size="mini"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click.native.stop="deleteDialog(scope.row.id)"
|
||||||
|
circle
|
||||||
|
title="删除"
|
||||||
|
></el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:limit.sync="filterQuery.limit"
|
||||||
|
:page.sync="filterQuery.page"
|
||||||
|
@pagination="getList"
|
||||||
|
class="pagination-container"
|
||||||
|
></pagination>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
title="库存详情"
|
||||||
|
:visible.sync="detailDialogVisible"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:close-on-press-escape="false"
|
||||||
|
width="85%"
|
||||||
|
v-if="detailDialogVisible"
|
||||||
|
class="form-dialog"
|
||||||
|
>
|
||||||
|
<invProductsDetail
|
||||||
|
:closeDialog="closeDetailDialog"
|
||||||
|
:row="detailRow"
|
||||||
|
></invProductsDetail>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
title="库存预警设置"
|
||||||
|
:visible.sync="remindSetDialogVisible"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:close-on-press-escape="false"
|
||||||
|
width="50%"
|
||||||
|
v-if="remindSetDialogVisible"
|
||||||
|
class="form-dialog"
|
||||||
|
>
|
||||||
|
<addInvRemindSetDialog
|
||||||
|
:closeDialog="closeRemindSetDialog"
|
||||||
|
:row="detailRow"
|
||||||
|
></addInvRemindSetDialog>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {getInvListByUser} from "@/api/system/invWarehouse";
|
||||||
|
import {getInvProduct, deleteInvProduct, getProduct} from "@/api/inventory/invPorduct";
|
||||||
|
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
|
||||||
|
import {isBlank} from "@/utils/strUtil";
|
||||||
|
import invProductsDetail from "@/views/inventory/InvProductsDetail.vue";
|
||||||
|
import addInvRemindSetDialog from "@/views/inventory/addInvRemindSetDialog.vue";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "ModernInvProducts",
|
||||||
|
components: {
|
||||||
|
invProductsDetail,
|
||||||
|
addInvRemindSetDialog
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
showSearch: true,
|
||||||
|
showSup: true,
|
||||||
|
filterQuery: {
|
||||||
|
invCode: "",
|
||||||
|
nameCode: "",
|
||||||
|
cpmctymc: "",
|
||||||
|
ggxh: "",
|
||||||
|
batchNo: "",
|
||||||
|
udiCode: "",
|
||||||
|
zczbhhzbapzbh: "",
|
||||||
|
ylqxzcrbarmc: "",
|
||||||
|
supId: "",
|
||||||
|
page: 1,
|
||||||
|
limit: 10
|
||||||
|
},
|
||||||
|
invList: [],
|
||||||
|
fromOptions: [],
|
||||||
|
corpLoading: false,
|
||||||
|
total: 0,
|
||||||
|
list: [],
|
||||||
|
loading: false,
|
||||||
|
detailDialogVisible: false,
|
||||||
|
remindSetDialogVisible: false,
|
||||||
|
detailRow: null
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getInvList();
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if (this.$refs.inputRef) {
|
||||||
|
this.$refs.inputRef.focus();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onReset() {
|
||||||
|
this.filterQuery = {
|
||||||
|
invCode: "",
|
||||||
|
nameCode: "",
|
||||||
|
cpmctymc: "",
|
||||||
|
ggxh: "",
|
||||||
|
batchNo: "",
|
||||||
|
udiCode: "",
|
||||||
|
zczbhhzbapzbh: "",
|
||||||
|
ylqxzcrbarmc: "",
|
||||||
|
supId: "",
|
||||||
|
page: 1,
|
||||||
|
limit: 10
|
||||||
|
};
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
onSubmit() {
|
||||||
|
this.filterQuery.page = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
hideSearch() {
|
||||||
|
this.showSearch = !this.showSearch;
|
||||||
|
},
|
||||||
|
enterKey(e) {
|
||||||
|
this.onSubmit();
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
getInvProduct(this.filterQuery).then(response => {
|
||||||
|
this.loading = false;
|
||||||
|
if (response.code === 20000) {
|
||||||
|
this.list = response.data.list;
|
||||||
|
this.total = response.data.total;
|
||||||
|
} else {
|
||||||
|
this.$message.error(response.msg);
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getInvList() {
|
||||||
|
getInvListByUser().then(response => {
|
||||||
|
if (response.code === 20000) {
|
||||||
|
this.invList = response.data;
|
||||||
|
} else {
|
||||||
|
this.$message.error(response.msg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
findMethod(key) {
|
||||||
|
if (key) {
|
||||||
|
this.corpLoading = true;
|
||||||
|
getCorpList({
|
||||||
|
name: key,
|
||||||
|
page: 1,
|
||||||
|
limit: 20
|
||||||
|
}).then(response => {
|
||||||
|
this.corpLoading = false;
|
||||||
|
if (response.code === 20000) {
|
||||||
|
this.fromOptions = response.data.list;
|
||||||
|
} else {
|
||||||
|
this.$message.error(response.msg);
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.corpLoading = false;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.fromOptions = [];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
corpChange(value) {
|
||||||
|
this.filterQuery.supId = value;
|
||||||
|
},
|
||||||
|
detailDialog(row) {
|
||||||
|
this.detailRow = row;
|
||||||
|
this.detailDialogVisible = true;
|
||||||
|
},
|
||||||
|
closeDetailDialog() {
|
||||||
|
this.detailDialogVisible = false;
|
||||||
|
this.detailRow = null;
|
||||||
|
},
|
||||||
|
deleteDialog(id) {
|
||||||
|
this.$confirm('是否确认删除该条库存记录?', "警告", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
deleteInvProduct(id).then(response => {
|
||||||
|
if (response.code === 20000) {
|
||||||
|
this.$message.success("删除成功");
|
||||||
|
this.getList();
|
||||||
|
} else {
|
||||||
|
this.$message.error(response.msg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
invRemindSet(row) {
|
||||||
|
this.detailRow = row;
|
||||||
|
this.remindSetDialogVisible = true;
|
||||||
|
},
|
||||||
|
closeRemindSetDialog() {
|
||||||
|
this.remindSetDialogVisible = false;
|
||||||
|
this.detailRow = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.el-card {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-dialog {
|
||||||
|
.el-dialog__body {
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,423 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card class="list-card">
|
||||||
|
<div slot="header">
|
||||||
|
<span>采购申请列表</span>
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-view"
|
||||||
|
@click="hideSearch"
|
||||||
|
>{{ showSearch ? '隐藏搜索' : '显示搜索' }}</el-button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-form
|
||||||
|
v-show="showSearch"
|
||||||
|
:model="filterQuery"
|
||||||
|
class="search-form"
|
||||||
|
label-width="100px"
|
||||||
|
>
|
||||||
|
<el-row :gutter="16">
|
||||||
|
<el-col :xs="24" :sm="12" :md="8" :lg="6">
|
||||||
|
<el-form-item label="单据号:">
|
||||||
|
<el-input
|
||||||
|
v-model="filterQuery.billNo"
|
||||||
|
placeholder="请输入单据号"
|
||||||
|
clearable
|
||||||
|
prefix-icon="el-icon-document"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :xs="24" :sm="12" :md="8" :lg="6">
|
||||||
|
<el-form-item label="单据日期:">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="actDateRange"
|
||||||
|
type="daterange"
|
||||||
|
format="yyyy 年 MM 月 dd 日"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
style="width: 100%"
|
||||||
|
:picker-options="pickerOptions"
|
||||||
|
></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :xs="24" :sm="12" :md="8" :lg="6">
|
||||||
|
<el-form-item label="申购人:">
|
||||||
|
<el-input
|
||||||
|
v-model="filterQuery.createByName"
|
||||||
|
placeholder="请输入申购人"
|
||||||
|
clearable
|
||||||
|
prefix-icon="el-icon-user"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :xs="24" :sm="12" :md="8" :lg="6">
|
||||||
|
<el-form-item label="状态:">
|
||||||
|
<el-select
|
||||||
|
v-model="filterQuery.status"
|
||||||
|
placeholder="请选择状态"
|
||||||
|
clearable
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="(value, key) in statusMap"
|
||||||
|
:key="key"
|
||||||
|
:label="value"
|
||||||
|
:value="key"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<div class="action-group">
|
||||||
|
<div class="left-actions">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-refresh"
|
||||||
|
@click="onReset"
|
||||||
|
>重置</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="onSubmitFind"
|
||||||
|
>查询</el-button>
|
||||||
|
</div>
|
||||||
|
<div class="right-actions">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
@click="newDistributionForm()"
|
||||||
|
:loading="loading"
|
||||||
|
>新增单据</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="list"
|
||||||
|
class="list-table"
|
||||||
|
@current-change="handleDetail"
|
||||||
|
border
|
||||||
|
highlight-current-row
|
||||||
|
>
|
||||||
|
<el-table-column label="序号" type="index" width="60" align="center"></el-table-column>
|
||||||
|
<el-table-column label="单据号" prop="billNo" min-width="120" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="申购日期" prop="billDate" min-width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.billDate, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="申购人" prop="createByName" min-width="100" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="申购仓库" prop="targetInvName" min-width="120" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="申购分库" prop="targetDeptName" min-width="120" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="申购说明" prop="remark" min-width="150" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="状态" prop="status" width="100" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag :type="(scope.row.status) | statusFilterType">
|
||||||
|
{{ statusMap[scope.row.status] }}
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="150" align="center" class-name="operation-column" fixed="right">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
size="mini"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click.native="newDistributionForm(scope.$index, scope.row)"
|
||||||
|
circle
|
||||||
|
title="编辑"
|
||||||
|
></el-button>
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
size="mini"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click.native.stop="deleteDialog(scope.row)"
|
||||||
|
circle
|
||||||
|
title="删除"
|
||||||
|
></el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="filterQuery.page"
|
||||||
|
:limit.sync="filterQuery.limit"
|
||||||
|
@pagination="handleCurrentChange"
|
||||||
|
class="pagination-container"
|
||||||
|
></pagination>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card class="list-card" v-if="detailList.length > 0">
|
||||||
|
<div slot="header">
|
||||||
|
<span>申购明细</span>
|
||||||
|
</div>
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="detailList"
|
||||||
|
class="list-table"
|
||||||
|
border
|
||||||
|
highlight-current-row
|
||||||
|
>
|
||||||
|
<el-table-column label="序号" type="index" width="60" align="center"></el-table-column>
|
||||||
|
<el-table-column label="物资名称" prop="productName" min-width="150" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="规格型号" prop="spec" min-width="120" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="申购数量" prop="count" width="100" align="center"></el-table-column>
|
||||||
|
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh" min-width="150" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="生产企业" prop="manufactory" min-width="150" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="医疗器械注册人" prop="ylqxzcrbarmc" min-width="150" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="供应商" prop="supName" min-width="150" show-overflow-tooltip></el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
:title="formMap[formName]"
|
||||||
|
:visible.sync="newSpDistributionVisible"
|
||||||
|
width="80%"
|
||||||
|
v-if="newSpDistributionVisible"
|
||||||
|
@close='closeDialog'
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:close-on-press-escape="false"
|
||||||
|
:before-close="handleClose"
|
||||||
|
class="form-dialog"
|
||||||
|
>
|
||||||
|
<pureApplyEdit
|
||||||
|
:closeDialog="closeDialog"
|
||||||
|
:idQuery="idQuery"
|
||||||
|
v-on:cancelDialog="getId"
|
||||||
|
:isChang="isChang"
|
||||||
|
></pureApplyEdit>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import pureApplyEdit from "./purApplyEditDiaolog";
|
||||||
|
import {delApply, delApplyDetailAll, inserThrOrderWeb, listApply, listApplyDetail} from "@/api/purchase/purApply";
|
||||||
|
import {parseTime} from "@/utils/ruoyi";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "ModernPurApply",
|
||||||
|
components: {
|
||||||
|
pureApplyEdit
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
showSearch: true,
|
||||||
|
pId: null,
|
||||||
|
filterQuery: {
|
||||||
|
billAction: null,
|
||||||
|
billNo: "",
|
||||||
|
originType: null,
|
||||||
|
thirdSysFk: "",
|
||||||
|
page: 1,
|
||||||
|
limit: 10,
|
||||||
|
corpName: null,
|
||||||
|
type: 1,
|
||||||
|
editStatus: 1,
|
||||||
|
createByName: "",
|
||||||
|
status: ""
|
||||||
|
},
|
||||||
|
isChang: false,
|
||||||
|
formName: null,
|
||||||
|
formMap: {
|
||||||
|
add: "新增申购单据",
|
||||||
|
update: "编辑申购单据",
|
||||||
|
},
|
||||||
|
statusMap: {
|
||||||
|
1: "草稿",
|
||||||
|
2: "未审核",
|
||||||
|
3: "已审核",
|
||||||
|
4: "已拒绝"
|
||||||
|
},
|
||||||
|
idQuery: {},
|
||||||
|
total: 0,
|
||||||
|
thirdSys: [],
|
||||||
|
thirdSysDetail: null,
|
||||||
|
busTypes: [],
|
||||||
|
originTypes: [],
|
||||||
|
list: [],
|
||||||
|
detailList: [],
|
||||||
|
loading: false,
|
||||||
|
actDateRange: [],
|
||||||
|
newSpDistributionVisible: false,
|
||||||
|
pickerOptions: {
|
||||||
|
shortcuts: [
|
||||||
|
{
|
||||||
|
text: "最近一周",
|
||||||
|
onClick(picker) {
|
||||||
|
const end = new Date();
|
||||||
|
const start = new Date();
|
||||||
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
||||||
|
picker.$emit("pick", [start, end]);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "最近一个月",
|
||||||
|
onClick(picker) {
|
||||||
|
const end = new Date();
|
||||||
|
const start = new Date();
|
||||||
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
||||||
|
picker.$emit("pick", [start, end]);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "最近三个月",
|
||||||
|
onClick(picker) {
|
||||||
|
const end = new Date();
|
||||||
|
const start = new Date();
|
||||||
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
|
||||||
|
picker.$emit("pick", [start, end]);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
parseTime,
|
||||||
|
onReset() {
|
||||||
|
this.filterQuery = {
|
||||||
|
billNo: "",
|
||||||
|
thirdSysFk: "",
|
||||||
|
billFlag: null,
|
||||||
|
billAction: null,
|
||||||
|
startDate: null,
|
||||||
|
endDate: null,
|
||||||
|
page: 1,
|
||||||
|
limit: 10,
|
||||||
|
corpName: null,
|
||||||
|
type: 1,
|
||||||
|
editStatus: 1,
|
||||||
|
createByName: "",
|
||||||
|
status: ""
|
||||||
|
};
|
||||||
|
this.actDateRange = [];
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
onSubmitFind() {
|
||||||
|
this.filterQuery.page = 1;
|
||||||
|
if (this.actDateRange && this.actDateRange.length > 0) {
|
||||||
|
this.filterQuery.startDate = this.actDateRange[0];
|
||||||
|
this.filterQuery.endDate = this.actDateRange[1];
|
||||||
|
} else {
|
||||||
|
this.filterQuery.startDate = null;
|
||||||
|
this.filterQuery.endDate = null;
|
||||||
|
}
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
hideSearch() {
|
||||||
|
this.showSearch = !this.showSearch;
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
if (this.actDateRange && this.actDateRange.length > 0) {
|
||||||
|
this.filterQuery.startDate = this.actDateRange[0];
|
||||||
|
this.filterQuery.endDate = this.actDateRange[1];
|
||||||
|
}
|
||||||
|
listApply(this.filterQuery).then(response => {
|
||||||
|
this.loading = false;
|
||||||
|
if (response.code === 20000) {
|
||||||
|
this.list = response.data.list;
|
||||||
|
this.total = response.data.total;
|
||||||
|
} else {
|
||||||
|
this.$message.error(response.msg);
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleDetail(row) {
|
||||||
|
if (!row || !row.id) {
|
||||||
|
this.detailList = [];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.pId = row.id;
|
||||||
|
listApplyDetail({id: row.id}).then(response => {
|
||||||
|
if (response.code === 20000) {
|
||||||
|
this.detailList = response.data;
|
||||||
|
} else {
|
||||||
|
this.$message.error(response.msg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleClose() {
|
||||||
|
this.$confirm('确认关闭?')
|
||||||
|
.then(_ => {
|
||||||
|
this.closeDialog();
|
||||||
|
})
|
||||||
|
.catch(_ => {});
|
||||||
|
},
|
||||||
|
deleteDialog(row) {
|
||||||
|
this.$confirm('是否确认删除单据号为"' + row.billNo + '"的数据项?', "警告", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
this.loading = true;
|
||||||
|
delApplyDetailAll(row.id).then(() => {
|
||||||
|
delApply(row.id).then(response => {
|
||||||
|
this.loading = false;
|
||||||
|
if (response.code === 20000) {
|
||||||
|
this.$message.success("删除成功");
|
||||||
|
this.getList();
|
||||||
|
} else {
|
||||||
|
this.$message.error(response.msg);
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleCurrentChange() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
closeDialog() {
|
||||||
|
this.newSpDistributionVisible = false;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
getId(id) {
|
||||||
|
this.newSpDistributionVisible = false;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
newDistributionForm(index, row) {
|
||||||
|
this.formName = row ? "update" : "add";
|
||||||
|
this.idQuery = row || {};
|
||||||
|
this.isChang = !!row;
|
||||||
|
this.newSpDistributionVisible = true;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
filters: {
|
||||||
|
statusFilterType(status) {
|
||||||
|
const statusMap = {
|
||||||
|
1: "info",
|
||||||
|
2: "warning",
|
||||||
|
3: "success",
|
||||||
|
4: "danger"
|
||||||
|
};
|
||||||
|
return statusMap[status];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.el-card {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-dialog {
|
||||||
|
.el-dialog__body {
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in New Issue