浏览代码

对账中心修改开票明细

Qukatie 1 周之前
父节点
当前提交
9ed785cd2c

+ 17 - 23
src/views/iosBasicData/PaymentApplication/assembly/cashierItem.vue

@@ -303,7 +303,7 @@ export default {
               taxRate: 0,
               amountTax: Number(Number(amountDr ? amountDr : 0)).toFixed(2),
               amountNet: 0,
-              applyCashierAmount:0
+              applyCashierAmount: 0
             });
           }
           if (amountDrUsd > 0 && item.code == "USD") {
@@ -317,7 +317,7 @@ export default {
               taxRate: 0,
               amountTax: Number(Number(amountDrUsd ? amountDrUsd : 0) * Number(item.exrate ? item.exrate : 0)).toFixed(2),
               amountNet: 0,
-              applyCashierAmount:0
+              applyCashierAmount: 0
             });
           }
         });
@@ -341,7 +341,7 @@ export default {
               taxRate: 0,
               amountTax: Number(Number(amountCr ? amountCr : 0)).toFixed(2),
               amountNet: 0,
-              applyCashierAmount:0
+              applyCashierAmount: 0
             });
           }
           if (amountCrUsd > 0 && item.code == "USD") {
@@ -355,7 +355,7 @@ export default {
               taxRate: 0,
               amountTax: Number(Number(amountCrUsd ? amountCrUsd : 0) * Number(item.exrate ? item.exrate : 0)).toFixed(2),
               amountNet: 0,
-              applyCashierAmount:0
+              applyCashierAmount: 0
             });
           }
         });
@@ -417,25 +417,19 @@ export default {
             return this.$message.error("请保存数据");
           }
         }
-        this.$confirm("是否申请付费?", "提示", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(() => {
-          const loading = this.$loading({
-            lock: true,
-            text: "加载中",
-            spinner: "el-icon-loading",
-            background: "rgba(255,255,255,0.7)"
-          });
-          applyCashier({ id: this.form.id })
-            .then(res => {
-              this.$emit("update");
-            })
-            .finally(() => {
-              loading.close();
-            });
+        const loading = this.$loading({
+          lock: true,
+          text: "加载中",
+          spinner: "el-icon-loading",
+          background: "rgba(255,255,255,0.7)"
         });
+        applyCashier({ id: this.form.id })
+          .then(res => {
+            this.$emit("update");
+          })
+          .finally(() => {
+            loading.close();
+          });
       }
       if (name == "撤销申请出纳") {
         for (let item of this.data) {
@@ -500,7 +494,7 @@ export default {
       if (name == "curCode") {
         if (row) {
           el.exrate = row.exrate;
-             if (el.dc == "D" && el.curCode == "CNY") {
+          if (el.dc == "D" && el.curCode == "CNY") {
             if (this.data.filter(item => el.dc == item.dc && el.curCode == item.curCode).length == 1) {
               el.amount = Number(this.form.amountDr - this.form.actualAmountDr).toFixed(2);
             }

+ 2 - 2
src/views/iosBasicData/SeafreightExportF/bills/index.vue

@@ -587,7 +587,7 @@ export default {
         calcHeight: 6,
         tip: false,
         searchShow: true,
-        searchMenuSpan: 12,
+        searchMenuSpan: 24,
         searchLabelWidth: "100",
         border: true,
         index: true,
@@ -2957,7 +2957,7 @@ export default {
   height: 24px;
 }
 
-::v-deep.el-col-md-8 {
+/deep/ .el-col-md-8 {
   width: 24.33333%;
 }
 ::v-deep.el-form-item {

+ 16 - 22
src/views/iosBasicData/fininvoicesApplyfor/assembly/cashierItem.vue

@@ -303,7 +303,7 @@ export default {
               taxRate: 0,
               amountTax: Number(Number(amountDr ? amountDr : 0)).toFixed(2),
               amountNet: 0,
-              applyCashierAmount:0
+              applyCashierAmount: 0
             });
           }
           if (amountDrUsd > 0 && item.code == "USD") {
@@ -317,7 +317,7 @@ export default {
               taxRate: 0,
               amountTax: Number(Number(amountDrUsd ? amountDrUsd : 0) * Number(item.exrate ? item.exrate : 0)).toFixed(2),
               amountNet: 0,
-              applyCashierAmount:0
+              applyCashierAmount: 0
             });
           }
         });
@@ -341,7 +341,7 @@ export default {
               taxRate: 0,
               amountTax: Number(Number(amountCr ? amountCr : 0)).toFixed(2),
               amountNet: 0,
-              applyCashierAmount:0
+              applyCashierAmount: 0
             });
           }
           if (amountCrUsd > 0 && item.code == "USD") {
@@ -355,7 +355,7 @@ export default {
               taxRate: 0,
               amountTax: Number(Number(amountCrUsd ? amountCrUsd : 0) * Number(item.exrate ? item.exrate : 0)).toFixed(2),
               amountNet: 0,
-              applyCashierAmount:0
+              applyCashierAmount: 0
             });
           }
         });
@@ -418,25 +418,19 @@ export default {
             return this.$message.error("请保存数据");
           }
         }
-        this.$confirm("是否申请收费?", "提示", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(() => {
-          const loading = this.$loading({
-            lock: true,
-            text: "加载中",
-            spinner: "el-icon-loading",
-            background: "rgba(255,255,255,0.7)"
-          });
-          applyCashier2({ id: this.form.id })
-            .then(res => {
-              this.$emit("update");
-            })
-            .finally(() => {
-              loading.close();
-            });
+        const loading = this.$loading({
+          lock: true,
+          text: "加载中",
+          spinner: "el-icon-loading",
+          background: "rgba(255,255,255,0.7)"
         });
+        applyCashier2({ id: this.form.id })
+          .then(res => {
+            this.$emit("update");
+          })
+          .finally(() => {
+            loading.close();
+          });
       }
       if (name == "撤销申请出纳") {
         for (let item of this.data) {

+ 3 - 3
src/views/iosBasicData/fininvoicesApplyfor/assembly/fininvoiceitemdetail.vue

@@ -110,9 +110,9 @@
       </el-table-column>
       <el-table-column fixed="right" label="操作" width="100">
         <template slot-scope="scope">
-          <el-button v-if="scope.row.edit" :disabled="editSave||disabled" type="text" size="small" @click="savefun(scope.row, scope.index)">保存</el-button>
-          <el-button v-else type="text" :disabled="editSave||disabled" size="small" @click="editfun(scope.row, scope.index)">编辑</el-button>
-          <el-button type="text" :disabled="editSave||disabled" size="small" @click="deletefun(scope.row, scope.index)">删除</el-button>
+          <el-button v-if="scope.row.edit" :disabled="editSave||disabled" type="text" size="small" @click="savefun(scope.row, scope.$index)">保存</el-button>
+          <el-button v-else type="text" :disabled="editSave||disabled" size="small" @click="editfun(scope.row, scope.$index)">编辑</el-button>
+          <el-button type="text" :disabled="editSave||disabled" size="small" @click="deletefun(scope.row, scope.$index)">删除</el-button>
         </template>
       </el-table-column>
     </el-table>

+ 19 - 23
src/views/iosBasicData/fininvoicesOutput/assembly/cashierItem.vue

@@ -89,7 +89,9 @@
       </avue-crud>
       <span slot="footer" class="dialog-footer">
         <el-button @click="dialogVisible = false" size="mini">取 消</el-button>
-        <el-button v-if="form.cashierStatus == 0" size="mini" type="success" :disabled="data.length == 0" @click="allClick('申请出纳')">收费申请</el-button>
+        <el-button v-if="form.cashierStatus == 0" size="mini" type="success" :disabled="data.length == 0" @click="allClick('申请出纳')"
+          >收费申请</el-button
+        >
         <el-button v-if="form.cashierStatus == 1" size="mini" type="danger" @click="allClick('撤销申请出纳')">撤销收费申请</el-button>
       </span>
     </el-dialog>
@@ -301,7 +303,7 @@ export default {
               taxRate: 0,
               amountTax: Number(Number(amountDr ? amountDr : 0)).toFixed(2),
               amountNet: 0,
-              applyCashierAmount:0
+              applyCashierAmount: 0
             });
           }
           if (amountDrUsd > 0 && item.code == "USD") {
@@ -315,7 +317,7 @@ export default {
               taxRate: 0,
               amountTax: Number(Number(amountDrUsd ? amountDrUsd : 0) * Number(item.exrate ? item.exrate : 0)).toFixed(2),
               amountNet: 0,
-              applyCashierAmount:0
+              applyCashierAmount: 0
             });
           }
         });
@@ -339,7 +341,7 @@ export default {
               taxRate: 0,
               amountTax: Number(Number(amountCr ? amountCr : 0)).toFixed(2),
               amountNet: 0,
-              applyCashierAmount:0
+              applyCashierAmount: 0
             });
           }
           if (amountCrUsd > 0 && item.code == "USD") {
@@ -353,7 +355,7 @@ export default {
               taxRate: 0,
               amountTax: Number(Number(amountCrUsd ? amountCrUsd : 0) * Number(item.exrate ? item.exrate : 0)).toFixed(2),
               amountNet: 0,
-              applyCashierAmount:0
+              applyCashierAmount: 0
             });
           }
         });
@@ -416,25 +418,19 @@ export default {
             return this.$message.error("请保存数据");
           }
         }
-        this.$confirm("是否申请收费?", "提示", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(() => {
-          const loading = this.$loading({
-            lock: true,
-            text: "加载中",
-            spinner: "el-icon-loading",
-            background: "rgba(255,255,255,0.7)"
-          });
-          applyCashier2({ id: this.form.id })
-            .then(res => {
-              this.$emit("update");
-            })
-            .finally(() => {
-              loading.close();
-            });
+        const loading = this.$loading({
+          lock: true,
+          text: "加载中",
+          spinner: "el-icon-loading",
+          background: "rgba(255,255,255,0.7)"
         });
+        applyCashier2({ id: this.form.id })
+          .then(res => {
+            this.$emit("update");
+          })
+          .finally(() => {
+            loading.close();
+          });
       }
       if (name == "撤销申请出纳") {
         for (let item of this.data) {

+ 21 - 27
src/views/iosBasicData/finstlbills/assembly/cashierItem.vue

@@ -112,7 +112,7 @@
 <script>
 import { MktSlotQuotation, quotationImportBatch } from "@/api/iosBasicData/bills";
 import dicSelect from "@/components/dicSelect/main";
-import { getListAllDetail, submit, remove, applyCashier, revokeCashier,submitList } from "@/api/iosBasicData/cashier.js";
+import { getListAllDetail, submit, remove, applyCashier, revokeCashier, submitList } from "@/api/iosBasicData/cashier.js";
 import { bcurrencyGetExrate } from "@/api/iosBasicData/rateManagement";
 export default {
   props: {
@@ -314,7 +314,7 @@ export default {
               taxRate: 0,
               amountTax: Number(Number(amountDr ? amountDr : 0)).toFixed(2),
               amountNet: 0,
-              applyCashierAmount:0
+              applyCashierAmount: 0
             });
           }
           if (amountDrUsd > 0 && item.code == "USD") {
@@ -328,7 +328,7 @@ export default {
               taxRate: 0,
               amountTax: Number(Number(amountDrUsd ? amountDrUsd : 0) * Number(item.exrate ? item.exrate : 0)).toFixed(2),
               amountNet: 0,
-              applyCashierAmount:0
+              applyCashierAmount: 0
             });
           }
         });
@@ -352,7 +352,7 @@ export default {
               taxRate: 0,
               amountTax: Number(Number(amountCr ? amountCr : 0)).toFixed(2),
               amountNet: 0,
-              applyCashierAmount:0
+              applyCashierAmount: 0
             });
           }
           if (amountCrUsd > 0 && item.code == "USD") {
@@ -366,14 +366,14 @@ export default {
               taxRate: 0,
               amountTax: Number(Number(amountCrUsd ? amountCrUsd : 0) * Number(item.exrate ? item.exrate : 0)).toFixed(2),
               amountNet: 0,
-              applyCashierAmount:0
+              applyCashierAmount: 0
             });
           }
         });
       }
       if (this.data.length) {
-          const res = await submitList(this.data);
-          this.data=res.data.data
+        const res = await submitList(this.data);
+        this.data = res.data.data;
       }
     },
     rowEdit(row) {
@@ -429,25 +429,19 @@ export default {
             return this.$message.error("请保存数据");
           }
         }
-        this.$confirm("是否申请" + (this.form.dc == "D" ? "收费?" : "付费?"), "提示", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(() => {
-          const loading = this.$loading({
-            lock: true,
-            text: "加载中",
-            spinner: "el-icon-loading",
-            background: "rgba(255,255,255,0.7)"
-          });
-          applyCashier({ id: this.form.id })
-            .then(res => {
-              this.$emit("update");
-            })
-            .finally(() => {
-              loading.close();
-            });
+        const loading = this.$loading({
+          lock: true,
+          text: "加载中",
+          spinner: "el-icon-loading",
+          background: "rgba(255,255,255,0.7)"
         });
+        applyCashier({ id: this.form.id })
+          .then(res => {
+            this.$emit("update");
+          })
+          .finally(() => {
+            loading.close();
+          });
       }
       if (name == "撤销申请出纳") {
         for (let item of this.data) {
@@ -556,7 +550,7 @@ export default {
     addRow() {
       this.data.push({ $cellEdit: true, srcId: this.form.id, dc: this.form.dc, taxRate: 0 });
     },
-    openDialog(row, dataList,type) {
+    openDialog(row, dataList, type) {
       this.dialogVisible = true;
       this.form = row;
       let obj = {
@@ -565,7 +559,7 @@ export default {
       this.loading = true;
       getListAllDetail(obj)
         .then(res => {
-          if (row.cashierStatus == 0&&type=='auto') {
+          if (row.cashierStatus == 0 && type == "auto") {
             this.oneClickGeneration(row, res.data.data, dataList);
           }
           this.data = res.data.data;

+ 5 - 5
src/views/iosBasicData/finstlbills/assembly/fininvoiceitemdetail.vue

@@ -161,9 +161,9 @@
       </el-table-column>
       <el-table-column fixed="right" label="操作" width="100">
         <template slot-scope="scope">
-          <el-button v-if="scope.row.edit" :disabled="scope.row.invoiceStatus==1" type="text" size="small" @click="savefun(scope.row, scope.index)">保存</el-button>
-          <el-button v-else type="text" :disabled="scope.row.invoiceStatus==1" size="small" @click="editfun(scope.row, scope.index)">编辑</el-button>
-          <el-button type="text" :disabled="scope.row.invoiceStatus==1" size="small" @click="deletefun(scope.row, scope.index)">删除</el-button>
+          <el-button v-if="scope.row.edit" :disabled="scope.row.invoiceStatus==1" type="text" size="small" @click="savefun(scope.row, scope.$index)">保存</el-button>
+          <el-button v-else type="text" :disabled="scope.row.invoiceStatus==1" size="small" @click="editfun(scope.row, scope.$index)">编辑</el-button>
+          <el-button type="text" :disabled="scope.row.invoiceStatus==1" size="small" @click="deletefun(scope.row, scope.$index)">删除</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -237,8 +237,8 @@ export default {
       this.$set(row, name, value);
     },
     // 保存
-    savefun(row) {
-      this.$emit("savefun", row);
+    savefun(row,index) {
+      this.$emit("savefun", row,index);
     },
     // 编辑
     editfun(row) {

+ 15 - 15
src/views/iosBasicData/finstlbills/assembly/finstlbillsitems.vue

@@ -714,21 +714,21 @@ export default {
       immediate: true // 第一次改变就执行
     }
   },
-  computed: {
-    //实时得到最上行和最下行
-    bottomSelectionRow() {
-      if (this.handleSelectionData.length == 0) return null;
-      return this.handleSelectionData.reduce((start, end) => {
-        return start.rowIndex > end.rowIndex ? start : end;
-      });
-    },
-    topSelectionRow() {
-      if (this.handleSelectionData.length == 0) return null;
-      return this.handleSelectionData.reduce((start, end) => {
-        return start.rowIndex < end.rowIndex ? start : end;
-      });
-    }
-  }
+  // computed: {
+  //   //实时得到最上行和最下行
+  //   bottomSelectionRow() {
+  //     if (this.handleSelectionData.length == 0) return null;
+  //     return this.handleSelectionData.reduce((start, end) => {
+  //       return start.rowIndex > end.rowIndex ? start : end;
+  //     });
+  //   },
+  //   topSelectionRow() {
+  //     if (this.handleSelectionData.length == 0) return null;
+  //     return this.handleSelectionData.reduce((start, end) => {
+  //       return start.rowIndex < end.rowIndex ? start : end;
+  //     });
+  //   }
+  // }
 };
 </script>
 

+ 5 - 2
src/views/iosBasicData/finstlbills/finstlbillsDetails.vue

@@ -1154,7 +1154,7 @@ export default {
       }
     },
     // 开票明细编辑完成保存
-    invoiceSavefun(row) {
+    invoiceSavefun(row, index) {
       if (!row.invoiceCompanyId) {
         return this.$message.error("开票单位不能为空");
       }
@@ -1169,7 +1169,10 @@ export default {
       }
       fininvoiceitemdetailSubmit(row).then(res => {
         this.$message.success("操作成功");
-        this.finstlbillsDetailfun(this.form.id, "finstlbills");
+        for (let [key, value] of Object.entries(res.data.data)) {
+          this.$set(row, key, value);
+        }
+        this.$set(row, 'edit', false);
       });
     },
     // 开票一键删除