From e6422d10099ab4ae02b795c748f5f4a318af19b3 Mon Sep 17 00:00:00 2001 From: zhaoxiao Date: Mon, 11 Oct 2021 14:36:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=B9=E9=87=8F=E5=BC=80=E7=A5=A8=E3=80=81?= =?UTF-8?q?=E5=BC=80=E7=A5=A8=E9=82=AE=E5=AF=84=E5=9B=BE=E6=A0=87=E9=9C=80?= =?UTF-8?q?=E6=B1=82=E5=8F=98=E6=9B=B4=EF=BC=8C=E5=AF=86=E7=A0=81=E7=A6=81?= =?UTF-8?q?=E6=AD=A2=E7=B2=98=E8=B4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/tools/StatusSlot.vue | 69 +++--- src/components/tools/UserPassword.vue | 228 ++++++++++-------- .../ArriveAndInvoivingList.vue | 5 +- src/views/system/modules/UserModal.vue | 6 + src/views/user/Login.vue | 5 + src/views/user/alteration/Alteration.vue | 9 +- 6 files changed, 186 insertions(+), 136 deletions(-) diff --git a/src/components/tools/StatusSlot.vue b/src/components/tools/StatusSlot.vue index 0191007..72ed18b 100644 --- a/src/components/tools/StatusSlot.vue +++ b/src/components/tools/StatusSlot.vue @@ -7,8 +7,7 @@ :title="currentTitle" arrow-point-at-center :mouse-enter-delay="0.1" - @visibleChange="visibleChange" - > + @visibleChange="visibleChange"> @@ -32,7 +31,7 @@ export default { data() { return { currentTitle: ' ', // 气泡中显示的文字,必须有内容,否则dom选择时不会解析 - hasInfo: false, // 是否有详情信息可以显示,即是否通过接口请求过数据 + hasInfo: false // 是否有详情信息可以显示,即是否通过接口请求过数据 } }, props: { @@ -50,7 +49,7 @@ export default { statusType: { type: Boolean, required: false, - default:false + default: false }, /* * 具体的状态值 @@ -60,8 +59,8 @@ export default { required: false }, // 当前需要转换key的属性, 悬浮显示实际具体内容信息时需要 - // paymentRecord 来款 mail -- 邮寄 bill--邮寄 - statusKey:{ + // paymentRecord 来款 mail -- 邮寄 bill--开票 + statusKey: { type: String, required: false, default: 'paymentRecord' @@ -76,32 +75,37 @@ export default { computed: { // eslint-disable-next-line vue/return-in-computed-property status() { - if (this.statuObj.amountReceivable === '0.00' || this.statuObj.receivableAmount === '0.00' ) { - if(this.statusType){ + if (this.statuObj.amountReceivable === '0.00' || this.statuObj.receivableAmount === '0.00') { + if (this.statusType) { // 应收金额为0 未到账 未邮寄 未开票的状态 return zero - }else { + } else { // 应收金额为0 打包 与需要开票的状态 - if(this.statusNo === 0 ){ + if (this.statusNo === 0) { return error - }else if(this.statusNo === 1){ + } else if (this.statusNo === 1) { return finished - }else if(this.statusNo === 2){ + } else if (this.statusNo === 2) { return half } } - }else { + } else { // 应收金额不为0 都正常判断 - if(this.statusNo === 0 ){ - return error - }else if(this.statusNo === 1){ + if (this.statusNo === 0) { + // 开票或邮寄时,不需要发票 + if ((this.statusKey === 'bill' || this.statusKey === 'mail') && this.statuObj.needInvoice === 0) { + return zero + } else { + return error + } + } else if (this.statusNo === 1) { return finished - }else if(this.statusNo === 2){ + } else if (this.statusNo === 2) { // 如果不是打包和需要发票 - if(this.statusType){ + if (this.statusType) { return half - }else { + } else { return finished } } @@ -110,11 +114,14 @@ export default { // 操作返回数据的key值,此处是根据业务逻辑处理的 opeStatusKey() { let result = this.statusKey - if(this.statusKey === 'mail' || this.statusKey === 'bill') { + if (this.statusKey === 'mail' || this.statusKey === 'bill') { result = 'mailBill' } return result } + }, + created() { + }, methods: { s() { @@ -123,9 +130,9 @@ export default { visibleChange(visible) { // 到账、开票、邮寄 的时候,请求接口获得相应的数据 // 判断条件 tooltip显示、 有不同的统计状态,统计状态值不为0 没有请求过详情数据 - if(visible && this.statusType && this.statusNo && !this.hasInfo) { - this.getInfoFunc({id: this.statuObj.id}).then(res =>{ - if(res.success) { + if (visible && this.statusType && this.statusNo && !this.hasInfo) { + this.getInfoFunc({ id: this.statuObj.id }).then(res => { + if (res.success) { let arr = res.result[this.opeStatusKey] || [] let result = [] arr.map(tt => { @@ -147,12 +154,12 @@ export default { let result = '' console.log(item) // 来款 - if(this.statusKey === 'paymentRecord') { - result = `${item.paymentDate}到账${item.amountReceived}` - } else if(this.statusKey === 'bill') { - result = `${item.billDate}新增发票,发票单号:${item.billNo}` - } else if(this.statusKey === 'mail') { - result = `${item.sendDate}新增邮寄信息,邮寄单号:${item.postNo}` + if (this.statusKey === 'paymentRecord') { + result = `${ item.paymentDate }到账${ item.amountReceived }` + } else if (this.statusKey === 'bill') { + result = `${ item.billDate }新增发票,发票单号:${ item.billNo }` + } else if (this.statusKey === 'mail') { + result = `${ item.sendDate }新增邮寄信息,邮寄单号:${ item.postNo }` } return result } @@ -165,7 +172,7 @@ export default { diff --git a/src/components/tools/UserPassword.vue b/src/components/tools/UserPassword.vue index 4bb0ea1..05252c5 100644 --- a/src/components/tools/UserPassword.vue +++ b/src/components/tools/UserPassword.vue @@ -14,22 +14,35 @@ - + - + - + @@ -39,116 +52,125 @@