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 @@ + + - + @@ -22,16 +23,16 @@ 选择 - + - + - + - + @@ -54,6 +55,7 @@ + @@ -62,6 +64,7 @@ + - + + + @@ -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 @@ } } +