Jelajahi Sumber

修改禅道问题

Qukatie 1 Minggu lalu
induk
melakukan
5fa5949039

+ 3 - 3
src/views/iosBasicData/cashier/indexC.vue

@@ -31,8 +31,8 @@
         <template slot="menuLeft">
           <span style="font-size: 24px;font-weight: 600;">
             <el-button type="primary" size="small" @click="allClick('合并')" :disabled="selectionList.length == 0">合并支付</el-button>
-            <span style="color: #67C23A;margin-right: 10px;"> CNY:¥{{ amountSubSum.toFixed(2) }} </span>
-            <span style="color: #E6A23C;"> USD:${{ amountSubUsdSum.toFixed(2) }} </span>
+            <span style="color: #67C23A;margin-right: 10px;"> CNY:¥{{ amountSubSum.toFixed(2) }} </span>
+            <span style="color: #E6A23C;"> USD:${{ amountSubUsdSum.toFixed(2) }} </span>
           </span>
         </template>
         <tempalte slot="feeCnNameSearch">
@@ -338,7 +338,7 @@ export default {
           },
           {
             label: "USD",
-            prop: "amountCrUsd ",
+            prop: "amountCrUsd",
             overHidden: true
           },
           // {

+ 70 - 62
src/views/iosBasicData/financialManagement/finstlbills/components/cashierItem.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <el-dialog title="指示" :visible.sync="dialogVisible" append-to-body width="60%" :before-close="handleClose">
-      <el-tag type="warning" style="margin-right: 10px;">剩余付费(RMB){{ Number(form.amountSub - form.actualAmountCr).toFixed(2) }}</el-tag>
+      <el-tag type="warning" style="margin-right: 10px">剩余付费(RMB){{ Number(form.amountSub - form.actualAmountCr).toFixed(2) }}</el-tag>
       <el-tag type="danger">剩余付费(USD){{ Number(form.amountSubUsd - form.actualAmountCrUsd).toFixed(2) }}</el-tag>
       <avue-crud
         v-if="dialogVisible"
@@ -47,7 +47,7 @@
         <template slot="exrate" slot-scope="{ row }">
           <el-input-number
             v-if="row.$cellEdit"
-            style="width: 100%;"
+            style="width: 100%"
             v-model="row.exrate"
             @change="calculateChange(row)"
             label="请输入汇率"
@@ -77,7 +77,7 @@
         <template slot="taxRate" slot-scope="{ row }">
           <el-input-number
             v-if="row.$cellEdit"
-            style="width: 100%;"
+            style="width: 100%"
             v-model="row.taxRate"
             @change="calculateChange(row)"
             label="请输入税率"
@@ -87,6 +87,9 @@
           ></el-input-number>
           <span v-else>{{ row.taxRate }}</span>
         </template>
+        <tempalte slot="amountLoc" slot-scope="{ row }">{{ row.amountLoc | decimalNumber }}</tempalte>
+        <tempalte slot="amountNet" slot-scope="{ row }">{{ row.amountNet | decimalNumber }}</tempalte>
+        <tempalte slot="amountTax" slot-scope="{ row }">{{ row.amountTax | decimalNumber }}</tempalte>
         <template slot="menu" slot-scope="{ row, index }">
           <el-button type="text" size="small" @click="rowEdit(row)" :disabled="row.status == 1 || disabled">{{
             row.$cellEdit ? "保存" : "编辑"
@@ -116,8 +119,8 @@ export default {
   props: {
     disabled: {
       type: Boolean,
-      default: false
-    }
+      default: false,
+    },
   },
   components: { dicSelect },
   data() {
@@ -127,22 +130,22 @@ export default {
       options: [
         {
           value: 0,
-          label: "不含税"
+          label: "不含税",
         },
         {
           value: 1,
-          label: "含税"
-        }
+          label: "含税",
+        },
       ],
       dcOptions: [
         {
           value: "D",
-          label: "收"
+          label: "收",
         },
         {
           value: "C",
-          label: "付"
-        }
+          label: "付",
+        },
       ],
       dialogVisible: false,
       loading: false,
@@ -164,97 +167,102 @@ export default {
             label: "index",
             prop: "index",
             width: "55",
-            headerslot: true
+            headerslot: true,
           },
           {
             label: "状态",
             prop: "status",
             width: "60",
-            overHidden: true
+            overHidden: true,
           },
           {
             label: "收/付",
             prop: "dc",
             width: "90",
-            overHidden: true
+            overHidden: true,
           },
           {
             label: "币别",
             prop: "curCode",
             width: "100",
-            overHidden: true
+            overHidden: true,
           },
           {
             label: "汇率",
             prop: "exrate",
             width: "70",
-            overHidden: true
+            overHidden: true,
           },
           {
             label: "金额",
             prop: "amount",
             width: "100",
-            overHidden: true
+            overHidden: true,
           },
           {
             label: "转汇后金额",
             prop: "amountLoc",
             width: "100",
-            overHidden: true
+            overHidden: true,
           },
           {
             label: "税率(%)",
             prop: "taxRate",
             width: "80",
-            overHidden: true
+            overHidden: true,
           },
           {
             label: "净额",
             prop: "amountNet",
             width: "100",
-            overHidden: true
+            overHidden: true,
           },
           {
             label: "税额",
             prop: "amountTax",
             width: "80",
-            overHidden: true
+            overHidden: true,
           },
           {
             label: "经办人",
             prop: "cashierName",
             width: "100",
-            overHidden: true
+            overHidden: true,
           },
           {
             label: "经办时间",
             prop: "cashierTime",
             width: "100",
-            overHidden: true
+            overHidden: true,
           },
           {
             label: "创建人",
             prop: "createUserName",
             width: "100",
-            overHidden: true
+            overHidden: true,
           },
           {
             label: "创建时间",
             prop: "createTime",
             width: "100",
-            overHidden: true
+            overHidden: true,
           },
           {
             label: "备注",
             prop: "remarks",
             cell: true,
             width: 120,
-            overHidden: true
-          }
-        ]
-      }
+            overHidden: true,
+          },
+        ],
+      },
     };
   },
+  filters: {
+    decimalNumber(val) {
+      return Number(val ? val : 0).toFixed(2);
+    },
+  },
   async created() {
     // this.option = await this.getColumnData(this.getColumnName(309.6), this.optionBack);
   },
@@ -281,12 +289,12 @@ export default {
       // let amountCr = 0;
       // let amountCrUsd = 0;
       // for (let item of dataList) {
-        // if (item.dc == "D" && item.currentStlCurCode == "CNY") {
-        //   amountDr += Number(item.currentStlAmountRMB);
-        // }
-        // if (item.dc == "D" && item.currentStlCurCode == "USD") {
-        //   amountDrUsd += Number(item.currentStlAmountUSD);
-        // }
+      // if (item.dc == "D" && item.currentStlCurCode == "CNY") {
+      //   amountDr += Number(item.currentStlAmountRMB);
+      // }
+      // if (item.dc == "D" && item.currentStlCurCode == "USD") {
+      //   amountDrUsd += Number(item.currentStlAmountUSD);
+      // }
       //   if (item.dc == "C" && item.currentStlCurCode == "CNY") {
       //     amountCr += Number(item.currentStlAmountRMB);
       //   }
@@ -336,10 +344,10 @@ export default {
         let obj = {
           type: 2,
           date: row.billDate + " 00:00:00",
-          dc: "C"
+          dc: "C",
         };
         const res = await bcurrencyGetExrate(obj);
-        res.data.data.forEach(item => {
+        res.data.data.forEach((item) => {
           if (this.form.amountSub > 0 && item.code == "CNY") {
             this.data.push({
               srcId: row.id,
@@ -351,7 +359,7 @@ export default {
               taxRate: 0,
               amountTax: Number(Number(this.form.amountSub ? this.form.amountSub : 0)).toFixed(2),
               amountNet: 0,
-              applyCashierAmount: 0
+              applyCashierAmount: 0,
             });
           }
           if (this.form.amountSubUsd > 0 && item.code == "USD") {
@@ -365,7 +373,7 @@ export default {
               taxRate: 0,
               amountTax: Number(Number(this.form.amountSubUsd ? this.form.amountSubUsd : 0) * Number(item.exrate ? item.exrate : 0)).toFixed(2),
               amountNet: 0,
-              applyCashierAmount: 0
+              applyCashierAmount: 0,
             });
           }
         });
@@ -397,11 +405,11 @@ export default {
             return this.$message.error("金额不能超过剩余出纳付费(USD):" + Number(this.form.amountSubUsd - this.form.actualAmountCrUsd));
           }
         }
-        submit(row).then(res => {
+        submit(row).then((res) => {
           this.$set(row, "$cellEdit", false);
           this.$message({
             type: "success",
-            message: "保存成功!"
+            message: "保存成功!",
           });
 
           for (let [key, value] of Object.entries(res.data.data)) {
@@ -425,16 +433,16 @@ export default {
           businessTypeCode: "HYDZ",
           businessType: "CHK",
           url: "/iosBasicData/financialManagement/finstlbills/index",
-          pageLabel: "对账中心(J)"
+          pageLabel: "对账中心(J)",
         };
         const loading = this.$loading({
           lock: true,
           text: "加载中",
           spinner: "el-icon-loading",
-          background: "rgba(255,255,255,0.7)"
+          background: "rgba(255,255,255,0.7)",
         });
         settlementApprove(obj)
-          .then(res => {
+          .then((res) => {
             this.$message.success("操作成功");
             this.dialogVisible = false;
             this.$emit("update", this.form.id);
@@ -471,16 +479,16 @@ export default {
         this.$confirm("是否撤销申请" + (this.form.dc == "D" ? "收费?" : "付费?"), "提示", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
-          type: "warning"
+          type: "warning",
         }).then(() => {
           const loading = this.$loading({
             lock: true,
             text: "加载中",
             spinner: "el-icon-loading",
-            background: "rgba(255,255,255,0.7)"
+            background: "rgba(255,255,255,0.7)",
           });
           revokeCashier({ id: this.form.id })
-            .then(res => {
+            .then((res) => {
               this.$emit("update", this.form.id);
             })
             .finally(() => {
@@ -494,12 +502,12 @@ export default {
         this.$confirm("确定删除数据?", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
-          type: "warning"
+          type: "warning",
         }).then(() => {
-          remove({ ids: row.id }).then(res => {
+          remove({ ids: row.id }).then((res) => {
             this.$message({
               type: "success",
-              message: "删除成功!"
+              message: "删除成功!",
             });
             this.data.splice(index, 1);
           });
@@ -523,34 +531,34 @@ export default {
         if (row) {
           el.exrate = row.exrate;
           if (el.dc == "D" && el.curCode == "CNY") {
-            if (this.data.filter(item => el.dc == item.dc && el.curCode == item.curCode).length == 1) {
+            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);
             }
-            if (this.data.filter(item => el.dc == item.dc && el.curCode == item.curCode).length == 2) {
+            if (this.data.filter((item) => el.dc == item.dc && el.curCode == item.curCode).length == 2) {
               el.amount = Number(0).toFixed(2);
             }
           }
           if (el.dc == "D" && el.curCode == "USD") {
-            if (this.data.filter(item => el.dc == item.dc && el.curCode == item.curCode).length == 1) {
+            if (this.data.filter((item) => el.dc == item.dc && el.curCode == item.curCode).length == 1) {
               el.amount = Number(this.form.amountDrUsd - this.form.actualAmountDrUsd).toFixed(2);
             }
-            if (this.data.filter(item => el.dc == item.dc && el.curCode == item.curCode).length == 2) {
+            if (this.data.filter((item) => el.dc == item.dc && el.curCode == item.curCode).length == 2) {
               el.amount = Number(0).toFixed(2);
             }
           }
           if (el.dc == "C" && el.curCode == "CNY") {
-            if (this.data.filter(item => el.dc == item.dc && el.curCode == item.curCode).length == 1) {
+            if (this.data.filter((item) => el.dc == item.dc && el.curCode == item.curCode).length == 1) {
               el.amount = Number(this.form.amountCr - this.form.actualAmountCr).toFixed(2);
             }
-            if (this.data.filter(item => el.dc == item.dc && el.curCode == item.curCode).length == 2) {
+            if (this.data.filter((item) => el.dc == item.dc && el.curCode == item.curCode).length == 2) {
               el.amount = Number(0).toFixed(2);
             }
           }
           if (el.dc == "C" && el.curCode == "USD") {
-            if (this.data.filter(item => el.dc == item.dc && el.curCode == item.curCode).length == 1) {
+            if (this.data.filter((item) => el.dc == item.dc && el.curCode == item.curCode).length == 1) {
               el.amount = Number(this.form.amountCrUsd - this.form.actualAmountCrUsd).toFixed(2);
             }
-            if (this.data.filter(item => el.dc == item.dc && el.curCode == item.curCode).length == 2) {
+            if (this.data.filter((item) => el.dc == item.dc && el.curCode == item.curCode).length == 2) {
               el.amount = Number(0).toFixed(2);
             }
           }
@@ -572,11 +580,11 @@ export default {
       this.selectionList = [];
       this.form = row;
       let obj = {
-        srcId: row.id
+        srcId: row.id,
       };
       this.loading = true;
       getListAllDetail(obj)
-        .then(res => {
+        .then((res) => {
           if (row.cashierStatus == 0 && type == "auto") {
             this.oneClickGeneration(row, res.data.data, dataList);
           }
@@ -623,8 +631,8 @@ export default {
         }
       }
       return back;
-    }
-  }
+    },
+  },
 };
 </script>
 

+ 8 - 1
src/views/iosBasicData/financialManagement/finstlbills/detailsPage.vue

@@ -31,7 +31,7 @@
           @click="allClick('撤销操作')"
           >撤销操作
         </el-button>
-        <el-dropdown v-if="form.operatingStatus == 0" trigger="click" @command="moreClick">
+        <el-dropdown v-if="form.operatingStatus == 0" trigger="click" @command="moreClick" @visible-change="visibleChange">
           <el-button type="success" size="small" style="margin: 0 8px" :disabled="editButton || form.status == 3"
             >更多操作<i class="el-icon-arrow-down el-icon--right"></i>
           </el-button>
@@ -708,6 +708,13 @@ export default {
         }
       }
     },
+    visibleChange(bool) {
+      if (bool) {
+        if (this.roleName.includes("财务") && this.form.dc == "D" && this.compareSizes() == "相等") {
+          return this.$message.error("财务角色不允许申请收付相抵!");
+        }
+      }
+    },
     moreClick(name) {
       if (this.form.finStlBillsItemsList.length == 0) {
         return this.$message.error("选定数据不能为空");

+ 43 - 26
src/views/iosBasicData/fininvoicesOutput/fininvoicesDetails.vue

@@ -130,7 +130,7 @@
                   </el-col>
                   <el-col :span="12">
                     <el-form-item label="发票币种" prop="invCurCode">
-                      <search-query
+                      <!-- <search-query
                         :datalist="invCurCodeData"
                         :selectValue="form.invCurCode"
                         :filterable="true"
@@ -146,7 +146,17 @@
                         @corpChange="corpChange($event, 'invCurCode')"
                         @corpFocus="invCurCodeRateListfun"
                       >
-                      </search-query>
+                      </search-query> -->
+                      <dic-select
+                        :key="form.dc"
+                        v-model="form.invCurCode"
+                        placeholder="币别"
+                        label="code"
+                        :url="'/blade-los/bcurrency/getExrate?type=2&date=' + form.invoiceDate + ' 00:00:00' + '&dc=' + (form.dc?form.dc:'D')"
+                        :filterable="true"
+                        :disabled="editSave || !form.invoiceDate"
+                        @selectChange="dicChange('invCurCode', $event)"
+                      ></dic-select>
                     </el-form-item>
                   </el-col>
                   <el-col :span="12">
@@ -464,9 +474,6 @@
                   </el-col>
                   <el-col :span="8">
                     <el-form-item label="发票汇率" prop="exrate">
-                      <span slot="label">
-                        <span style="color: #1e9fff" @click="allClick('发票汇率')">发票汇率</span>
-                      </span>
                       <el-input
                         style="width: 100%"
                         v-model="form.exrate"
@@ -740,8 +747,8 @@
                     >
                     <el-button size="small" :disabled="editSave || form.srcType == '对账'" type="danger" @click="batchDeletefun">一键删除</el-button>
                     <span style="font-size: 18px; font-weight: 600">
-                      <span style="color: #67c23a; margin-right: 10px"> CNY:¥{{ amountSubSum }} </span>
-                      <span style="color: #e6a23c"> USD:${{ amountSubUsdSum }} </span>
+                      <span style="color: #67c23a; margin-right: 10px"> CNY:¥{{ amountSubSum }} </span>
+                      <span style="color: #e6a23c"> USD:${{ amountSubUsdSum }} </span>
                     </span>
                   </div>
                 </template>
@@ -951,6 +958,7 @@ export default {
       form: {
         dc: "D",
         invCurCode: "CNY",
+        exrate:1,
         isRp: 1,
         invType: "全电发票",
         taxRate: 0,
@@ -1127,15 +1135,24 @@ export default {
       //         }
       //     }
       // })
-      getParamService({ paramKey: "taxRate" }).then((res) => {
-        this.paramForm = res.data.data;
-        if (!this.form.id) {
-          this.$set(this.form, "exrate", res.data.data ? res.data.data.paramValue : 0);
-        }
-      });
+      // getParamService({ paramKey: "taxRate" }).then((res) => {
+      //   this.paramForm = res.data.data;
+      //   if (!this.form.id) {
+      //     this.$set(this.form, "exrate", res.data.data ? res.data.data.paramValue : 0);
+      //   }
+      // });
     }
   },
   methods: {
+    dicChange(name, row) {
+      if (name == "invCurCode") {
+        if (row) {
+          this.form.exrate = row.exrate;
+        } else {
+          this.form.exrate = 0;
+        }
+      }
+    },
     allClick(name) {
       if (name == "新增") {
         this.InvoicingList.push({
@@ -1147,19 +1164,19 @@ export default {
           edit: true,
         });
       }
-      if (name == "发票汇率") {
-        this.$confirm("是否确认修改业务参数配置?", "提示", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
-        }).then(() => {
-          let obj = {
-            ...this.paramForm,
-            paramValue: this.form.exrate,
-          };
-          updateParamService(obj);
-        });
-      }
+      // if (name == "发票汇率") {
+      //   this.$confirm("是否确认修改业务参数配置?", "提示", {
+      //     confirmButtonText: "确定",
+      //     cancelButtonText: "取消",
+      //     type: "warning",
+      //   }).then(() => {
+      //     let obj = {
+      //       ...this.paramForm,
+      //       paramValue: this.form.exrate,
+      //     };
+      //     updateParamService(obj);
+      //   });
+      // }
       if (name == "指示") {
         this.$refs.cashier.openDialog(this.form, this.tableData, "auto");
       }