From 5019ed6016b47221321bf395cd102dc4b51b4724 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期一, 05 二月 2024 09:40:43 +0800
Subject: [PATCH] Mr.Shi
---
company/src/components/enterprise/entrustedInvoicingApplication.vue | 86 ++++++++++++++++++++++++++++++++++++++++---
1 files changed, 80 insertions(+), 6 deletions(-)
diff --git a/company/src/components/enterprise/entrustedInvoicingApplication.vue b/company/src/components/enterprise/entrustedInvoicingApplication.vue
index 1406ffc..95a98d1 100644
--- a/company/src/components/enterprise/entrustedInvoicingApplication.vue
+++ b/company/src/components/enterprise/entrustedInvoicingApplication.vue
@@ -34,10 +34,19 @@
<div class="info_list_item_label">寮�绁ㄩ噾棰濓細</div>
<div class="info_list_item_val" style="color:rgba(249, 86, 1, 0.996078431372549);">{{total}}</div>
</div>
- <div class="info_list_item" style="width: 100%;">
- <div class="info_list_item_label">鎺ユ敹鏂瑰紡锛�</div>
- <div class="info_list_item_val">鐢靛瓙鍙戠エ</div>
-<!-- <div v-if="model.type === 1" class="info_list_item_val">绾歌川鍙戠エ</div>-->
+ <div class="list" style="width: 100%;">
+ <el-radio v-model="type" label="0">鐢靛瓙鍙戠エ</el-radio>
+ <div class="list_val">
+ <div class="list_val_label">鎺ユ敹鍦板潃锛�</div>
+ <el-input v-model="val" :disabled="type === '1'" placeholder="111222333@qq.com"></el-input>
+ </div>
+ </div>
+ <div class="list" style="width: 100%;">
+ <el-radio v-model="type" label="1">绾歌川鍙戠エ</el-radio>
+ <div class="list_val">
+ <div class="list_val_label">鎺ユ敹鍦板潃锛�</div>
+ <el-input v-model="val1" :disabled="type === '0'" placeholder="瀹夊窘鐪佸悎鑲ュ競缁忔祹鎶�鏈紑鍙戝尯鑾茶姳璺互涓溿�佺煶闂ㄨ矾浠ュ崡鑾茶姳璺�1锛� 0551-63450845"></el-input>
+ </div>
</div>
</div>
<el-table
@@ -79,6 +88,7 @@
<script>
import BaseOpera from '@/components/base/BaseOpera'
import GlobalWindow from '@/components/common/GlobalWindow'
+ import { entrustInvoicing } from '@/api/business/taxes'
import { mapState } from 'vuex'
export default {
name: 'entrustedInvoicingApplication',
@@ -91,6 +101,9 @@
backInfo:'',
list: []
},
+ val: '',
+ val1: '',
+ type: '0',
rules: {
backInfo: [
{ required: true, message: '璇疯緭鍏ラ��鍥炶鏄�' }
@@ -99,11 +112,18 @@
}
},
created () {
- console.log(this.userInfo)
this.config({
api: '/business/taxes',
'field.id': 'id'
})
+ },
+ watch: {
+ type: {
+ handler(news) {
+ this.val = ''
+ this.val1 = ''
+ }
+ }
},
computed: {
...mapState(['userInfo']),
@@ -118,11 +138,41 @@
methods: {
open (title, target) {
this.title = title
+ this.type = '0'
+ this.val = ''
+ this.val1 = ''
this.visible = true
this.$nextTick(() => {
for (const key in this.form) {
this.form[key] = target[key]
}
+ })
+ },
+ confirm () {
+ if (!this.val && !this.val1) {
+ this.$message.warning('璇疯緭鍏ユ帴鏀跺湴鍧�')
+ return
+ }
+ this.isWorking = true
+ entrustInvoicing({
+ address: this.val || this.val1,
+ invoicingMoney: this.total,
+ taxDetialList: this.form.list.map(item => {
+ return {
+ insuranceApplyId: item.id,
+ fee: item.totalPrice,
+ applyCode: item.code
+ }
+ }),
+ type: this.type
+ }).then(res => {
+ this.visible = false
+ this.$tip.apiSuccess('鎿嶄綔鎴愬姛')
+ this.$emit('success')
+ }).catch(e => {
+ this.$tip.apiFailed(e)
+ }).finally(() => {
+ this.isWorking = false
})
},
getSummaries (param) {
@@ -131,7 +181,8 @@
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '鍚堣'
- } else if (index == 4) {
+ return
+ } else if (index == 3) {
let price = 0
data.forEach(item => {
price += item.totalPrice
@@ -139,6 +190,7 @@
sums[index] = price
}
})
+ return sums;
}
}
}
@@ -184,6 +236,28 @@
display: flex;
align-items: left;
flex-wrap: wrap;
+ .list::v-deep {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin-bottom: 15px;
+ .el-radio__label {
+ color: black;
+ font-size: 14px;
+ }
+ .list_val {
+ flex: 1;
+ display: flex;
+ align-items: center;
+ .list_val_label {
+ font-size: 14px;
+ color: black;
+ flex-shrink: 0;
+ margin-right: 15px;
+ }
+ }
+ }
.info_list_item {
width: 50%;
display: flex;
--
Gitblit v1.9.3