Browse Source

修改发票bug

Qukatie 5 months ago
parent
commit
2ee63c3761

+ 2 - 1
src/views/iosBasicData/businessCenter/customerBooking/detailsPage.vue

@@ -194,7 +194,8 @@
                       </el-form-item>
                     </el-col>
                     <el-col span="12">
-                      <el-form-item label="HS CODE" prop="hscode">
+                      <el-form-item label="HS CODE" prop="hscode"
+                      :rules="[{ required: true, message: ' ', trigger: 'blur' }]">
                         <el-input style="width: 100%;" v-model="form.hscode" size="small" :disabled="editDisabled"
                           clearable placeholder="HS CODE"></el-input>
                         <el-input style="width: 100%;" v-model="form.commodityCnName" size="small"

+ 8 - 2
src/views/iosBasicData/fininvoices/fininvoicesDetails.vue

@@ -698,7 +698,7 @@ export default {
         if (!this.form.id) {
             this.form.invCurCode = this.getLocalCurrency()
 
-            this.$set(this.form, 'exrate', this.getExchangeRate(this.getLocalCurrency(), this.form.dc?this.form.dc:'D', 2))
+            this.$set(this.form, 'exrate', this.getExchangeRate(this.getLocalCurrency(), this.form.dc ? this.form.dc : 'D', 2))
             // getRateList({ current: 1, size: 30 }).then(res => {
             //     for (let item of res.data.data.records) {
             //         if (item.code == "USD") {
@@ -916,6 +916,7 @@ export default {
                 if (itemsWithId.length != 0) {
                     fininvoicesitemsRemove(arrIds.join(',')).then(res => {
                         this.$message.success('操作成功')
+                        this.fininvoicesDetailfun(this.form.id)
                     })
                 }
             })
@@ -1049,7 +1050,7 @@ export default {
             }
             else if (name == 'invCurCode') {
                 this.$set(this.form, 'invCurCode', value)
-                this.$set(this.form, 'exrate', this.getExchangeRate(value, this.form.dc?this.form.dc:'D', 2))
+                this.$set(this.form, 'exrate', this.getExchangeRate(value, this.form.dc ? this.form.dc : 'D', 2))
             }
             else {
                 this.$set(this.form, name, value)
@@ -1136,6 +1137,11 @@ export default {
                         }
                         return item
                     })
+                    for (let item of this.handleSelectionData) {
+                        if (!item.id) {
+                            this.form.finInvoicesItemsList.push(item)
+                        }
+                    }
                 } else {
                     this.form.finInvoicesItemsList = this.handleSelectionData.map(item => {
                         if (item.currentCurCode == this.getLocalCurrency()) {

+ 4 - 3
src/views/iosBasicData/fininvoicesApplyfor/fininvoicesDetails.vue

@@ -759,7 +759,7 @@ export default {
         this.saberUserInfo = JSON.parse(localStorage.getItem('saber-userInfo')).content
         if (!this.form.id) {
             this.form.curCode = this.getLocalCurrency()
-            this.$set(this.form, 'exrate', this.getExchangeRate(this.getLocalCurrency(), this.form.dc?this.form.dc:'D', 2))
+            this.$set(this.form, 'exrate', this.getExchangeRate(this.getLocalCurrency(), this.form.dc ? this.form.dc : 'D', 2))
         }
         if (this.$route.query.mblno) {
             // console.log(111111)
@@ -794,7 +794,7 @@ export default {
                 isExchangeToCny: 0,
                 billDate: getCurrentDate(),
             }
-            this.$set(this.form, 'exrate', this.getExchangeRate(this.getLocalCurrency(), this.form.dc?this.form.dc:'D', 2))
+            this.$set(this.form, 'exrate', this.getExchangeRate(this.getLocalCurrency(), this.form.dc ? this.form.dc : 'D', 2))
             // getRateList({ current: 1, size: 30 }).then(res => {
             //     for (let item of res.data.data.records) {
             //         if (item.code == "USD") {
@@ -971,6 +971,7 @@ export default {
                 if (itemsWithId.length != 0) {
                     fininvoicesitemsRemove(arrIds.join(',')).then(res => {
                         this.$message.success('操作成功')
+                        this.fininvoicesDetailfun(this.form.id)
                     })
                 }
             })
@@ -1158,7 +1159,7 @@ export default {
             }
             else if (name == 'curCode') {
                 this.$set(this.form, 'curCode', value)
-                this.$set(this.form, 'exrate', this.getExchangeRate(value, this.form.dc?this.form.dc:'D', 2))
+                this.$set(this.form, 'exrate', this.getExchangeRate(value, this.form.dc ? this.form.dc : 'D', 2))
             }
             else {
                 this.$set(this.form, name, value)

+ 8 - 2
src/views/iosBasicData/fininvoicesOutput/fininvoicesDetails.vue

@@ -752,7 +752,7 @@ export default {
         this.saberUserInfo = JSON.parse(localStorage.getItem('saber-userInfo')).content
         if (!this.form.id) {
             this.form.invCurCode = this.getLocalCurrency()
-            this.$set(this.form, 'exrate', this.getExchangeRate(this.getLocalCurrency(), this.form.dc?this.form.dc:'D', 2))
+            this.$set(this.form, 'exrate', this.getExchangeRate(this.getLocalCurrency(), this.form.dc ? this.form.dc : 'D', 2))
             // getRateList({ current: 1, size: 30 }).then(res => {
             //     for (let item of res.data.data.records) {
             //         if (item.code == "USD") {
@@ -974,6 +974,7 @@ export default {
                 if (itemsWithId.length != 0) {
                     fininvoicesitemsRemove(arrIds.join(',')).then(res => {
                         this.$message.success('操作成功')
+                        this.fininvoicesDetailfun(this.form.id)
                     })
                 }
             })
@@ -1107,7 +1108,7 @@ export default {
             }
             else if (name == 'invCurCode') {
                 this.$set(this.form, 'invCurCode', value)
-                this.$set(this.form, 'exrate', this.getExchangeRate(value, this.form.dc?this.form.dc:'D', 2))
+                this.$set(this.form, 'exrate', this.getExchangeRate(value, this.form.dc ? this.form.dc : 'D', 2))
             }
             else {
                 this.$set(this.form, name, value)
@@ -1203,6 +1204,11 @@ export default {
                         }
                         return item
                     })
+                    for (let item of this.handleSelectionData) {
+                        if (!item.id) {
+                            this.form.finInvoicesItemsList.push(item)
+                        }
+                    }
                 } else {
                     this.form.finInvoicesItemsList = this.handleSelectionData.map(item => {
                         if (item.currentCurCode == this.getLocalCurrency()) {