From 8cb4d32cd900876bfd7c5d734cb8eea198ce7485 Mon Sep 17 00:00:00 2001 From: toesbieya <1647775459@qq.com> Date: Wed, 26 Feb 2020 16:05:52 +0800 Subject: [PATCH] none --- vue/src/assets/styles/variables.scss | 4 +- vue/src/components/Skeleton/index.vue | 2 +- vue/src/config/index.js | 2 +- vue/src/directive/ripple/style.sass | 42 +++++++++---------- vue/src/utils/file.js | 4 +- .../inbound/components/EditDialog.vue | 8 ++-- .../sell/order/components/EditDialog.vue | 4 +- .../sell/outbound/components/EditDialog.vue | 12 +++--- 8 files changed, 39 insertions(+), 39 deletions(-) diff --git a/vue/src/assets/styles/variables.scss b/vue/src/assets/styles/variables.scss index b22edac..6191025 100644 --- a/vue/src/assets/styles/variables.scss +++ b/vue/src/assets/styles/variables.scss @@ -20,8 +20,8 @@ $--color-gray: #9E9E9E; $--color-blue-gray: #607D8B; //覆盖element颜色 -$--color-primary: $--color-blue; -$--color-success: $--color-green; +$--color-primary: #1890ff; +$--color-success: #21BA45; $--color-warning: $--color-deep-orange; $--color-danger: $--color-red; $--color-info: $--color-teal; diff --git a/vue/src/components/Skeleton/index.vue b/vue/src/components/Skeleton/index.vue index 6357e58..27afd1a 100644 --- a/vue/src/components/Skeleton/index.vue +++ b/vue/src/components/Skeleton/index.vue @@ -32,7 +32,7 @@ (animation !== 'none' ? ` q-skeleton--anim-${animation}` : '') + (square === true ? ' q-skeleton--square' : '') + (bordered === true ? ' q-skeleton--bordered' : '') + - (className !== undefined ? ' '+className : '') + (className !== undefined ? ' ' + className : '') return h(tag, { staticClass: 'q-skeleton', diff --git a/vue/src/config/index.js b/vue/src/config/index.js index b0256c7..ad4cfb3 100644 --- a/vue/src/config/index.js +++ b/vue/src/config/index.js @@ -31,5 +31,5 @@ module.exports = { attachmentPrefix: 'https://static.toesbieya.cn/', //省市地区json数据请求地址 - regionDataUrl:'/static/json/region-pca.json' + regionDataUrl: '/static/json/region-pca.json' } diff --git a/vue/src/directive/ripple/style.sass b/vue/src/directive/ripple/style.sass index 709bcd3..4b11933 100644 --- a/vue/src/directive/ripple/style.sass +++ b/vue/src/directive/ripple/style.sass @@ -1,29 +1,29 @@ .q-ripple - position: absolute - top: 0 - left: 0 - width: 100% - height: 100% - color: inherit - border-radius: inherit - z-index: 0 - pointer-events: none - overflow: hidden - contain: strict - - &__inner position: absolute top: 0 left: 0 - opacity: 0 + width: 100% + height: 100% color: inherit - border-radius: 50% - background: currentColor + border-radius: inherit + z-index: 0 pointer-events: none - will-change: transform, opacity + overflow: hidden + contain: strict + + &__inner + position: absolute + top: 0 + left: 0 + opacity: 0 + color: inherit + border-radius: 50% + background: currentColor + pointer-events: none + will-change: transform, opacity - &--enter - transition: transform .225s cubic-bezier(.4, 0, .2, 1), opacity .1s cubic-bezier(.4, 0, .2, 1) + &--enter + transition: transform .225s cubic-bezier(.4, 0, .2, 1), opacity .1s cubic-bezier(.4, 0, .2, 1) - &--leave - transition: opacity .25s cubic-bezier(.4, 0, .2, 1) + &--leave + transition: opacity .25s cubic-bezier(.4, 0, .2, 1) diff --git a/vue/src/utils/file.js b/vue/src/utils/file.js index 282a5e0..d4a7038 100644 --- a/vue/src/utils/file.js +++ b/vue/src/utils/file.js @@ -1,5 +1,5 @@ import request from '@/config/request' -import {attachmentUploadUrl,attachmentPrefix} from '@/config' +import {attachmentUploadUrl, attachmentPrefix} from '@/config' import {isEmpty, timeFormat} from "@/utils" const baseUrl = '/file' @@ -47,6 +47,6 @@ export function upload(blob, filename = '快照.png') { //自动补全附件链接前缀 export function autoCompleteUrl(url) { if (isEmpty(url)) return '' - if (['http','https'].some(i=>url.startsWith(i))) return url + if (['http', 'https'].some(i => url.startsWith(i))) return url return attachmentPrefix + url } diff --git a/vue/src/views/purchase/inbound/components/EditDialog.vue b/vue/src/views/purchase/inbound/components/EditDialog.vue index a3742cb..3980345 100644 --- a/vue/src/views/purchase/inbound/components/EditDialog.vue +++ b/vue/src/views/purchase/inbound/components/EditDialog.vue @@ -64,7 +64,7 @@ v-model="row.num" :min="0" size="small" - @change="changeInboundNum($event,row)" + @change="(nv,ov)=>changeInboundNum(nv,ov,row)" /> {{row.num}} @@ -128,10 +128,10 @@ num: i.remain_num })) }, - changeInboundNum(v, row) { + changeInboundNum(nv, ov, row) { let parentSub = this.parentSubList.find(i => i.cid === row.cid) - if (!parentSub || v > parentSub.remain_num) { - return elAlert(`${row.cname}的入库数量超出采购数量`, () => row.num = parentSub.remain_num) + if (!parentSub || nv > parentSub.remain_num) { + return elAlert(`${row.cname}的入库数量超出采购数量`, () => row.num = ov) } }, validate() { diff --git a/vue/src/views/sell/order/components/EditDialog.vue b/vue/src/views/sell/order/components/EditDialog.vue index ab72a02..464bb41 100644 --- a/vue/src/views/sell/order/components/EditDialog.vue +++ b/vue/src/views/sell/order/components/EditDialog.vue @@ -126,7 +126,7 @@ customer_name: null, finish: 0, ftime: null, - total:0 + total: 0 }, rules: { customer_name: [{required: true, message: '客户不能为空', trigger: 'change'}] @@ -174,7 +174,7 @@ if (isEmpty(sub.price)) return `第${index + 1}个商品单价不能为空` if (sub.num < 0 || !isInteger(sub.num)) return `第${index}个商品数量有误` if (sub.price <= 0 || !isInteger(sub.price)) return `第${index}个商品单价有误` - this.form.total=plus(this.form.total,mul(sub.num, sub.price)) + this.form.total = plus(this.form.total, mul(sub.num, sub.price)) index++ } return null diff --git a/vue/src/views/sell/outbound/components/EditDialog.vue b/vue/src/views/sell/outbound/components/EditDialog.vue index 79e6b9c..9376ce1 100644 --- a/vue/src/views/sell/outbound/components/EditDialog.vue +++ b/vue/src/views/sell/outbound/components/EditDialog.vue @@ -69,7 +69,7 @@ v-model="d.row.num" :min="0" size="small" - @change="changeOutboundNum($event,d.row,row)" + @change="(nv,ov)=>changeOutboundNum(nv,ov,d.row,row)" /> {{d.row.num}} @@ -208,9 +208,9 @@ return sum } }, - changeOutboundNum(v, row, displayTableRow) { - if (v > row.max_num) { - return elAlert(`${row.cname}的出库数量超出库存数量`, () => row.num = row.max_num) + changeOutboundNum(nv, ov, row, displayTableRow) { + if (nv > row.max_num) { + return elAlert(`${row.cname}的出库数量超出库存数量`, () => row.num = ov) } let outboundNum = displayTableRow.data.map(i => i.num) @@ -219,10 +219,10 @@ if (!outboundNum) return if (outboundNum > displayTableRow.remain_num) { - let correctNum = sub(displayTableRow.remain_num, sub(outboundNum, v)) + let correctNum = sub(displayTableRow.remain_num, sub(outboundNum, nv)) if (correctNum < 0) correctNum = 0 else if (correctNum > row.max_num) correctNum = row.max_num - return elAlert(`${displayTableRow.cname}的出库数量超出销售数量`, () => row.num = correctNum) + return elAlert(`${displayTableRow.cname}的出库数量超出销售数量`, () => row.num = ov) } }, validate() {