From f82f5386366fb6ac5749b5288127afff269513c7 Mon Sep 17 00:00:00 2001
From: toesbieya <1647775459@qq.com>
Date: Sun, 21 Jun 2020 13:25:59 +0800
Subject: [PATCH] =?UTF-8?q?=E5=8D=95=E6=8D=AE=E6=A0=B7=E5=BC=8F=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
vue/src/assets/styles/index.scss | 8 ++
vue/src/bizComponents/CategoryTree/index.vue | 3 +
.../bizComponents/DocumentHistory/index.vue | 3 +
vue/src/bizComponents/DocumentSteps/index.vue | 3 +
.../SimpleMultipleUserSelector.vue | 4 +
vue/src/components/AbstractTable/index.vue | 2 +
vue/src/components/BottomTip/main.vue | 2 +
vue/src/components/Charts/PieChart.vue | 3 +
.../ContextMenu/ContextMenuItem.vue | 2 +
vue/src/components/ContextMenu/index.vue | 4 +
.../components/DialogForm/DialogFormItem.vue | 3 +
vue/src/components/DialogForm/index.vue | 4 +
vue/src/components/DropDownMenu/index.vue | 73 +--------------
vue/src/components/DropDownMenu/style.scss | 66 +++++++++++++
.../components/Empty/DefaultEmptyImage.vue | 2 +
vue/src/components/Empty/index.vue | 53 +----------
vue/src/components/Empty/style.scss | 47 ++++++++++
vue/src/components/Guide/main.vue | 92 ++++---------------
vue/src/components/Guide/style.scss | 69 ++++++++++++++
vue/src/components/ImageViewer/main.vue | 3 +
vue/src/components/LinerProgress/index.vue | 42 +--------
vue/src/components/LinerProgress/style.scss | 36 ++++++++
vue/src/components/Link/index.vue | 2 +
vue/src/components/LoadingMask/index.vue | 7 +-
vue/src/components/OrgTree/index.vue | 7 ++
vue/src/components/PuzzleVerify/main.vue | 10 ++
.../components/RegionSelector/Tab/index.vue | 5 +
.../components/SearchForm/SearchFormItem.vue | 3 +
vue/src/components/SearchForm/index.vue | 7 ++
vue/src/components/SignautreBoard/main.vue | 6 ++
vue/src/components/Skeleton/PageSkeleton.vue | 2 +
vue/src/components/Skeleton/index.vue | 3 +
vue/src/components/SvgIcon/index.vue | 3 +
vue/src/components/TinymceEditor/index.vue | 6 ++
vue/src/components/ZoomControl/index.vue | 7 +-
vue/src/layout/components/Header.vue | 13 +++
vue/src/layout/components/Main.vue | 6 ++
.../components/Navbar/components/Bell.vue | 4 +
.../Navbar/components/Breadcrumb.vue | 3 +
.../Navbar/components/Fullscreen.vue | 85 -----------------
.../Navbar/components/Hamburger.vue | 7 +-
.../Navbar/components/HeaderSearch.vue | 12 +++
.../Navbar/components/SettingDrawer.vue | 4 +
vue/src/layout/components/Navbar/index.vue | 64 ++-----------
vue/src/layout/components/Navbar/style.scss | 52 +++++++++++
.../components/Sidebar/components/Logo.vue | 4 +-
.../Sidebar/components/SidebarItem.vue | 2 +
.../Sidebar/components/SidebarItemContent.vue | 3 +
vue/src/layout/components/Sidebar/index.vue | 15 +++
.../layout/components/TagsView/ScrollPane.vue | 6 ++
vue/src/layout/components/TagsView/index.vue | 9 ++
vue/src/layout/index.vue | 10 ++
vue/src/views/app/403.vue | 8 +-
vue/src/views/app/404.vue | 8 +-
vue/src/views/app/login/LoginForm.vue | 18 ++++
vue/src/views/app/login/RegisterForm.vue | 12 +++
vue/src/views/app/login/SetAnimation.vue | 4 +
vue/src/views/app/login/index.vue | 10 ++
vue/src/views/app/redirect.vue | 1 +
.../index/components/DailyFinishOrderStat.vue | 5 +-
.../index/components/DailyProfitStat.vue | 5 +-
.../components/PanelGroup/PanelGroupItem.vue | 3 +
.../index/components/PanelGroup/index.vue | 5 +
.../index/components/TotalProfitGoods.vue | 6 ++
vue/src/views/index/index.vue | 1 +
vue/src/views/message/manage/EditDialog.vue | 7 ++
vue/src/views/message/manage/index.vue | 15 +++
.../inbound/components/EditDialog.vue | 25 +++--
.../inbound/components/OrderSelector.vue | 12 ++-
vue/src/views/purchase/inbound/index.vue | 6 ++
.../purchase/order/components/EditDialog.vue | 61 ++++++++----
.../order/components/SupplierSelector.vue | 2 +-
.../order/components/CustomerSelector.vue | 15 ++-
.../sell/order/components/EditDialog.vue | 63 +++++++++----
.../sell/order/components/StockSelector.vue | 12 ++-
vue/src/views/sell/order/index.vue | 16 +++-
.../sell/outbound/components/EditDialog.vue | 34 +++++--
.../outbound/components/OrderSelector.vue | 12 ++-
.../outbound/components/StockSelector.vue | 11 ++-
vue/src/views/sell/outbound/index.vue | 16 +++-
vue/src/views/stock/current/DetailDialog.vue | 11 +++
vue/src/views/stock/current/index.vue | 18 ++++
.../views/system/category/components/Form.vue | 11 +++
.../views/system/category/components/List.vue | 13 +++
vue/src/views/system/category/index.vue | 1 +
vue/src/views/system/customer/EditDialog.vue | 14 +++
vue/src/views/system/customer/index.vue | 18 ++++
.../department/components/EditDialog.vue | 12 +++
.../department/components/OrgTreeView.vue | 7 ++
vue/src/views/system/department/index.vue | 17 ++++
.../views/system/monitor/components/Cpu.vue | 11 +++
.../views/system/monitor/components/Jvm.vue | 9 ++
.../system/monitor/components/Memory.vue | 9 ++
vue/src/views/system/monitor/index.vue | 10 ++
vue/src/views/system/resource/EditDialog.vue | 26 +++++-
vue/src/views/system/resource/index.vue | 8 ++
.../system/role/components/EditDialog.vue | 13 +++
.../system/role/components/RoleResource.vue | 3 +
vue/src/views/system/role/index.vue | 16 ++++
vue/src/views/system/supplier/EditDialog.vue | 14 +++
vue/src/views/system/supplier/index.vue | 19 ++++
.../system/user/components/EditDialog.vue | 12 +++
.../system/user/components/RoleSelector.vue | 5 +
vue/src/views/system/user/index.vue | 20 ++++
.../views/userCenter/components/Account.vue | 7 ++
.../views/userCenter/components/Avatar.vue | 7 ++
.../userCenter/components/LoginHistory.vue | 6 ++
.../userCenter/components/UserAction.vue | 6 ++
.../views/userCenter/components/UserCard.vue | 6 +-
vue/src/views/userCenter/index.vue | 4 +
110 files changed, 1168 insertions(+), 449 deletions(-)
create mode 100644 vue/src/components/DropDownMenu/style.scss
create mode 100644 vue/src/components/Empty/style.scss
create mode 100644 vue/src/components/Guide/style.scss
create mode 100644 vue/src/components/LinerProgress/style.scss
delete mode 100644 vue/src/layout/components/Navbar/components/Fullscreen.vue
create mode 100644 vue/src/layout/components/Navbar/style.scss
diff --git a/vue/src/assets/styles/index.scss b/vue/src/assets/styles/index.scss
index cafe0ad..ae872dc 100644
--- a/vue/src/assets/styles/index.scss
+++ b/vue/src/assets/styles/index.scss
@@ -198,4 +198,12 @@ a:hover {
}
}
+.table-add-btn {
+ margin: 8px 0;
+
+ .el-button {
+ width: 100%;
+ }
+}
+
diff --git a/vue/src/bizComponents/CategoryTree/index.vue b/vue/src/bizComponents/CategoryTree/index.vue
index dbdbab6..20b0a7a 100644
--- a/vue/src/bizComponents/CategoryTree/index.vue
+++ b/vue/src/bizComponents/CategoryTree/index.vue
@@ -16,12 +16,15 @@
export default {
name: "CategoryTree",
+
props: {filterNodeMethod: Function},
+
computed: {
data() {
return this.$store.state.dataCache.categoryTree
}
},
+
mounted() {
getAllCategories()
.then(data => this.$store.commit('dataCache/categories', data))
diff --git a/vue/src/bizComponents/DocumentHistory/index.vue b/vue/src/bizComponents/DocumentHistory/index.vue
index 761b01d..351c6fe 100644
--- a/vue/src/bizComponents/DocumentHistory/index.vue
+++ b/vue/src/bizComponents/DocumentHistory/index.vue
@@ -1,11 +1,14 @@
-
+
diff --git a/vue/src/components/DropDownMenu/style.scss b/vue/src/components/DropDownMenu/style.scss
new file mode 100644
index 0000000..a6b853b
--- /dev/null
+++ b/vue/src/components/DropDownMenu/style.scss
@@ -0,0 +1,66 @@
+$n: 9; //和items.length 相同
+$t: .1s;
+.share-dropdown-menu {
+ width: 250px;
+ position: relative;
+ z-index: 1;
+
+ &-title {
+ width: 100%;
+ display: block;
+ cursor: pointer;
+ background: black;
+ color: white;
+ height: 60px;
+ line-height: 60px;
+ font-size: 20px;
+ text-align: center;
+ z-index: 2;
+ transform: translate3d(0, 0, 0);
+ }
+
+ &-wrapper {
+ position: relative;
+ }
+
+ &-item {
+ text-align: center;
+ position: absolute;
+ width: 100%;
+ background: #e0e0e0;
+ line-height: 60px;
+ height: 60px;
+ cursor: pointer;
+ font-size: 20px;
+ opacity: 1;
+ transition: transform 0.28s ease;
+
+ &:hover {
+ background: black;
+ color: white;
+ }
+
+ @for $i from 1 through $n {
+ &:nth-of-type(#{$i}) {
+ z-index: -1;
+ transition-delay: $i*$t;
+ transform: translate3d(0, -60px, 0);
+ }
+ }
+ }
+
+ &.active {
+ .share-dropdown-menu-wrapper {
+ z-index: 1;
+ }
+
+ .share-dropdown-menu-item {
+ @for $i from 1 through $n {
+ &:nth-of-type(#{$i}) {
+ transition-delay: ($n - $i)*$t;
+ transform: translate3d(0, ($i - 1)*60px, 0);
+ }
+ }
+ }
+ }
+}
diff --git a/vue/src/components/Empty/DefaultEmptyImage.vue b/vue/src/components/Empty/DefaultEmptyImage.vue
index 1bd2dca..49facbd 100644
--- a/vue/src/components/Empty/DefaultEmptyImage.vue
+++ b/vue/src/components/Empty/DefaultEmptyImage.vue
@@ -1,7 +1,9 @@
-
+
diff --git a/vue/src/components/Empty/style.scss b/vue/src/components/Empty/style.scss
new file mode 100644
index 0000000..a9a891d
--- /dev/null
+++ b/vue/src/components/Empty/style.scss
@@ -0,0 +1,47 @@
+.ant-empty {
+ padding: 20px;
+ margin: 0 8px;
+ font-size: 14px;
+ line-height: 22px;
+ text-align: center;
+
+ &-image {
+ height: 100px;
+ margin-bottom: 8px;
+
+ img {
+ height: 100%;
+ }
+
+ svg {
+ height: 100%;
+ margin: auto;
+ }
+ }
+
+ &-description {
+ margin: 0;
+ }
+
+ &-footer {
+ margin-top: 16px;
+ }
+
+ &-normal {
+ margin: 32px 0;
+ color: rgba(0, 0, 0, .25);
+
+ .ant-empty-image {
+ height: 40px;
+ }
+ }
+
+ &-small {
+ margin: 8px 0;
+ color: rgba(0, 0, 0, .25);
+
+ .ant-empty-image {
+ height: 35px;
+ }
+ }
+}
diff --git a/vue/src/components/Guide/main.vue b/vue/src/components/Guide/main.vue
index 2b64b13..0bad85e 100644
--- a/vue/src/components/Guide/main.vue
+++ b/vue/src/components/Guide/main.vue
@@ -2,6 +2,7 @@
+
@@ -11,6 +12,7 @@
{{step.closeBtnText}}
+
{{step.prevBtnText}}
@@ -20,24 +22,27 @@
+
+
+
-
+
diff --git a/vue/src/components/Guide/style.scss b/vue/src/components/Guide/style.scss
new file mode 100644
index 0000000..7f54130
--- /dev/null
+++ b/vue/src/components/Guide/style.scss
@@ -0,0 +1,69 @@
+.guide-highlighted-element {
+ z-index: 1002 !important;
+}
+
+.guide-position-relative {
+ position: relative !important;
+}
+
+.guide-fix-stacking {
+ z-index: auto !important;
+ opacity: 1.0 !important;
+ transform: none !important;
+ filter: none !important;
+ perspective: none !important;
+ transform-style: flat !important;
+ will-change: unset !important;
+}
+
+.guide-popover-action {
+ position: relative;
+ height: 100%;
+ width: 100%;
+
+ .action-close {
+ display: inline-block;
+ }
+
+ .action-step {
+ display: inline-block;
+ right: 0;
+ position: absolute;
+
+ .prev-btn {
+ position: absolute;
+ right: 90px;
+ }
+
+ .next-btn {
+
+ }
+ }
+}
+
+#guide-stage {
+ position: absolute;
+ background: white;
+ transition: all 0.3s;
+ z-index: 1001 !important;
+ border-radius: 2px;
+ /*background: transparent !important;
+ outline: 5000px solid rgba(0, 0, 0, 0.75);*/
+}
+
+#guide-overlay {
+ background: black;
+ position: fixed;
+ top: 0;
+ left: 0;
+ bottom: 0;
+ right: 0;
+ opacity: 0.75;
+ z-index: 1000 !important;
+}
+
+#guide-highlight-element-cover {
+ position: absolute;
+ background: transparent !important;
+ z-index: 1003 !important;
+}
diff --git a/vue/src/components/ImageViewer/main.vue b/vue/src/components/ImageViewer/main.vue
index abaa181..9db009f 100644
--- a/vue/src/components/ImageViewer/main.vue
+++ b/vue/src/components/ImageViewer/main.vue
@@ -7,7 +7,9 @@
export default {
name: "ImageViewer",
+
components: {ElImageViewer: ImageViewer},
+
data() {
return {
value: false,
@@ -15,6 +17,7 @@
urlList: []
}
},
+
methods: {
close() {
this.value = false
diff --git a/vue/src/components/LinerProgress/index.vue b/vue/src/components/LinerProgress/index.vue
index 8c619b9..95920fd 100644
--- a/vue/src/components/LinerProgress/index.vue
+++ b/vue/src/components/LinerProgress/index.vue
@@ -2,8 +2,11 @@
//从muse-ui处搬运,https://muse-ui.org/#/zh-CN/progress
export default {
name: "LinerProgress",
+
functional: true,
+
props: {show: Boolean},
+
render(h, context) {
if (context.props.show) {
return (
@@ -17,41 +20,4 @@
}
-
+
diff --git a/vue/src/components/LinerProgress/style.scss b/vue/src/components/LinerProgress/style.scss
new file mode 100644
index 0000000..3acc316
--- /dev/null
+++ b/vue/src/components/LinerProgress/style.scss
@@ -0,0 +1,36 @@
+.liner-progress {
+ position: relative;
+ height: 4px;
+ display: block;
+ width: 100%;
+ margin: 0;
+ overflow: hidden;
+
+ .liner-progress-background {
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ background-color: $--color-primary;
+ opacity: .3;
+ }
+
+ .linear-progress-indeterminate {
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ width: 40%;
+ background-color: $--color-primary;
+ animation: linear-progress-animate .84s cubic-bezier(.445, .05, .55, .95) infinite;
+ }
+
+ @keyframes linear-progress-animate {
+ 0% {
+ left: -40%;
+ }
+ 100% {
+ left: 100%;
+ }
+ }
+}
diff --git a/vue/src/components/Link/index.vue b/vue/src/components/Link/index.vue
index e267375..00d032b 100644
--- a/vue/src/components/Link/index.vue
+++ b/vue/src/components/Link/index.vue
@@ -3,7 +3,9 @@
export default {
name: 'Link',
+
functional: true,
+
render(h, context) {
let to = context.props.to
if (isExternal(to)) return (
diff --git a/vue/src/components/LoadingMask/index.vue b/vue/src/components/LoadingMask/index.vue
index dcf5895..7d3323d 100644
--- a/vue/src/components/LoadingMask/index.vue
+++ b/vue/src/components/LoadingMask/index.vue
@@ -1,10 +1,11 @@
diff --git a/vue/src/layout/components/Header.vue b/vue/src/layout/components/Header.vue
index a35e5ee..fe17d45 100644
--- a/vue/src/layout/components/Header.vue
+++ b/vue/src/layout/components/Header.vue
@@ -6,6 +6,7 @@
@mouseleave="mouseOutside=true"
>
+
@@ -17,7 +18,9 @@
export default {
name: "Header",
+
components: {VNavbar, TagsView},
+
data() {
return {
mouseOutside: true,
@@ -26,11 +29,13 @@
appMain: null
}
},
+
computed: {
...mapState('setting', {
useTagsView: state => state.useTagsView,
headerAutoHidden: state => state.headerAutoHidden
}),
+
hideHeader() {
return this.mouseOutside
&& this.headerAutoHidden
@@ -38,35 +43,43 @@
&& !this.navbarMenuShow
},
},
+
watch: {
useTagsView(v) {
!v && this.$store.dispatch('tagsView/delAllViews')
},
+
hideHeader(v) {
this.$store.commit('app/hasHeader', !v)
v ? this.addEvent() : this.removeEvent()
}
},
+
methods: {
moveEvent(e) {
if (e.clientY <= 15) this.mouseOutside = false
},
+
addEvent() {
this.appMain.addEventListener('mousemove', this.moveEvent)
},
+
removeEvent() {
this.appMain.removeEventListener('mousemove', this.moveEvent)
}
},
+
mounted() {
this.appMain = document.querySelector('.app-main')
if (this.headerAutoHidden) this.addEvent()
},
+
beforeDestroy() {
this.removeEvent()
}
}
+
+
diff --git a/vue/src/layout/components/Navbar/style.scss b/vue/src/layout/components/Navbar/style.scss
new file mode 100644
index 0000000..afd7278
--- /dev/null
+++ b/vue/src/layout/components/Navbar/style.scss
@@ -0,0 +1,52 @@
+.navbar {
+ height: $nav-height;
+ overflow: hidden;
+ position: relative;
+ background: #fff;
+ box-shadow: 0 1px 4px rgba(0, 21, 41, .08);
+
+ .navbar-icon {
+ font-size: 18px;
+ cursor: pointer;
+ vertical-align: middle;
+ }
+
+ .right-menu {
+ float: right;
+ height: 100%;
+ line-height: $nav-height;
+
+ &:focus {
+ outline: none;
+ }
+
+ .right-menu-item {
+ display: inline-block;
+ position: relative;
+ padding: 0 8px;
+ height: 100%;
+ font-size: 18px;
+ color: #5a5e66;
+ vertical-align: text-bottom;
+ transition: background .3s;
+ cursor: pointer;
+
+ &:hover:not(#header-search) {
+ background: rgba(0, 0, 0, .025)
+ }
+ }
+
+ .avatar-container {
+ .avatar-wrapper {
+ margin-top: 5px;
+ position: relative;
+
+ .el-avatar {
+ position: relative;
+ top: 5px;
+ margin-right: 5px;
+ }
+ }
+ }
+ }
+}
diff --git a/vue/src/layout/components/Sidebar/components/Logo.vue b/vue/src/layout/components/Sidebar/components/Logo.vue
index 23f69d6..dab03d7 100644
--- a/vue/src/layout/components/Sidebar/components/Logo.vue
+++ b/vue/src/layout/components/Sidebar/components/Logo.vue
@@ -2,7 +2,7 @@
@@ -12,7 +12,9 @@
export default {
name: 'SidebarLogo',
+
props: {collapse: Boolean},
+
data() {
return {
title,
diff --git a/vue/src/layout/components/Sidebar/components/SidebarItem.vue b/vue/src/layout/components/Sidebar/components/SidebarItem.vue
index 24fb8bf..77f0560 100644
--- a/vue/src/layout/components/Sidebar/components/SidebarItem.vue
+++ b/vue/src/layout/components/Sidebar/components/SidebarItem.vue
@@ -61,12 +61,14 @@
export default {
functional: true,
+
props: {
item: Object,
isNest: Boolean,
showParent: Boolean,
collapse: Boolean
},
+
render(h, context) {
return renderNode(h, context.props)
}
diff --git a/vue/src/layout/components/Sidebar/components/SidebarItemContent.vue b/vue/src/layout/components/Sidebar/components/SidebarItemContent.vue
index ea799d8..a1f75e2 100644
--- a/vue/src/layout/components/Sidebar/components/SidebarItemContent.vue
+++ b/vue/src/layout/components/Sidebar/components/SidebarItemContent.vue
@@ -1,11 +1,14 @@
diff --git a/vue/src/views/index/components/DailyFinishOrderStat.vue b/vue/src/views/index/components/DailyFinishOrderStat.vue
index db61afb..726de0a 100644
--- a/vue/src/views/index/components/DailyFinishOrderStat.vue
+++ b/vue/src/views/index/components/DailyFinishOrderStat.vue
@@ -4,12 +4,14 @@
diff --git a/vue/src/views/message/manage/EditDialog.vue b/vue/src/views/message/manage/EditDialog.vue
index 37ffa4c..a6ff0ff 100644
--- a/vue/src/views/message/manage/EditDialog.vue
+++ b/vue/src/views/message/manage/EditDialog.vue
@@ -51,6 +51,7 @@
+
取 消
保 存
@@ -73,8 +74,11 @@
export default {
name: "EditDialog",
+
mixins: [dialogMixin],
+
components: {DialogForm, DialogFormItem, TinymceEditor, UserSelector},
+
props: {
value: {type: Boolean, default: false},
type: {type: String, default: 'see'},
@@ -84,6 +88,7 @@
},
baseUrl: String
},
+
data() {
return {
loading: false,
@@ -111,6 +116,7 @@
}
}
},
+
computed: {
title() {
if (isEmpty(this.type)) return ''
@@ -142,6 +148,7 @@
&& this.form.status === 1
},
},
+
methods: {
open() {
if (this.type === 'add') return
diff --git a/vue/src/views/message/manage/index.vue b/vue/src/views/message/manage/index.vue
index e10ea4b..6451dfc 100644
--- a/vue/src/views/message/manage/index.vue
+++ b/vue/src/views/message/manage/index.vue
@@ -18,6 +18,7 @@
+
查 询
添 加
@@ -25,6 +26,7 @@
编 辑
删 除
+
@@ -43,6 +45,7 @@
{{row.ptime | timestamp2Date}}
+
this.config.loading = false)
},
+
add() {
this.type = 'add'
this.editDialog = true
},
+
see() {
if (isEmpty(this.row)) return elError('请选择要查看的消息')
this.type = 'see'
this.editDialog = true
},
+
edit() {
if (isEmpty(this.row)) return elError('请选择要编辑的消息')
this.type = 'edit'
this.editDialog = true
},
+
del() {
if (isEmpty(this.row)) return elError('请选择要删除的消息')
if (this.row.status !== 0) return elError('只有状态为【拟定】时才能删除')
diff --git a/vue/src/views/purchase/inbound/components/EditDialog.vue b/vue/src/views/purchase/inbound/components/EditDialog.vue
index 532497a..da018e0 100644
--- a/vue/src/views/purchase/inbound/components/EditDialog.vue
+++ b/vue/src/views/purchase/inbound/components/EditDialog.vue
@@ -4,6 +4,7 @@
{{title}}
+
-
+
@@ -22,16 +23,16 @@
选择
-
+
-
+
-
+
-
+
@@ -54,6 +55,7 @@
+
@@ -62,6 +64,7 @@
changeInboundNum(nv,ov,row)"
@@ -70,8 +73,9 @@
+
-
+
已审核
取 消
@@ -81,6 +85,8 @@
通 过
驳 回
+
+
@@ -95,8 +101,11 @@
export default {
name: "EditDialog",
+
mixins: [bizDocumentDialogMixin],
+
components: {OrderSelector},
+
data() {
return {
documentName: '采购入库单',
@@ -113,11 +122,13 @@
parentSubList: []
}
},
+
methods: {
afterInit() {
if (this.type !== 'edit') return
return getParentSubById(this.form.pid).then(data => this.parentSubList = data)
},
+
selectParent(id, sub) {
this.parentSubList = sub
this.form.pid = id
@@ -128,12 +139,14 @@
num: i.remain_num
}))
},
+
changeInboundNum(nv, ov, row) {
let parentSub = this.parentSubList.find(i => i.cid === row.cid)
if (!parentSub || nv > parentSub.remain_num) {
return elAlert(`${row.cname}的入库数量超出采购数量`, () => row.num = ov)
}
},
+
validate() {
if (this.type === 'edit' && isEmpty(this.form.id)) {
return '属性缺失,请关闭弹窗刷新重试'
diff --git a/vue/src/views/purchase/inbound/components/OrderSelector.vue b/vue/src/views/purchase/inbound/components/OrderSelector.vue
index 0bc6faf..4b0505b 100644
--- a/vue/src/views/purchase/inbound/components/OrderSelector.vue
+++ b/vue/src/views/purchase/inbound/components/OrderSelector.vue
@@ -4,7 +4,7 @@
:visible="value"
append-to-body
title="选择采购订单"
- width="50%"
+ width="70%"
top="50px"
@close="cancel"
@open="search"
@@ -14,6 +14,7 @@
查 询
取 消
+
@@ -73,9 +74,13 @@
export default {
name: "OrderSelector",
+
mixins: [dialogMixin, tableMixin],
+
components: {LinerProgress},
+
props: {value: Boolean},
+
data() {
return {
searchForm: {
@@ -84,6 +89,7 @@
}
}
},
+
methods: {
search() {
if (!this.value || this.config.loading) return
@@ -101,6 +107,7 @@
})
.finally(() => this.config.loading = false)
},
+
getSubList(row) {
if (row._loaded || row._loading) return
row._loading = true
@@ -111,11 +118,13 @@
})
.finally(() => row._loading = false)
},
+
confirm(row) {
if (row._selection.length <= 0) return elError('请选择要入库的商品')
this.$emit('select', row.id, row._selection)
this.cancel()
},
+
cancel() {
this.closeDialog()
this.tableData = []
@@ -123,6 +132,7 @@
}
}
+