lxf 1 vuosi sitten
vanhempi
commit
4f62162d6c

+ 1 - 0
src/components/process/SendFunds.vue

@@ -474,6 +474,7 @@ const handleSubmit = async () => {
     }
     if (!(formData.data.accountRequestFundsDetailList.length > 0)) {
       ElMessage("请添加请款明细!");
+      return false;
     }
     return true;
   } else {

+ 1 - 9
src/utils/util.js

@@ -273,15 +273,7 @@ export function getPdfTransverseA4(title) {
 }
 
 export function currencyPrefix(key) {
-  if (["¥", "¥", "1"].includes(key)) {
-    return "SAY RMB ";
-  } else if (["$", "2"].includes(key)) {
-    return "SAY US DOLLARS ";
-  } else if (["€", "3"].includes(key)) {
-    return "SAY EURO ";
-  } else {
-    return "SAY RMB ";
-  }
+  return "SAY " + key + " ";
 }
 
 // 金额英文写法

+ 1 - 0
src/views/finance/fundManage/account/index.vue

@@ -36,6 +36,7 @@
                 <template #default="{ row, $index }">
                   <el-form-item :prop="'accountRemainderList.' + $index + '.remainder'" :rules="rules.remainder" :inline-message="true">
                     <el-input-number
+                      onmousewheel="return false;"
                       v-model="row.remainder"
                       placeholder="请输入余额"
                       style="width: 100%"

+ 40 - 82
src/views/purchaseManage/purchasePayment/invoice/index.vue

@@ -14,34 +14,21 @@
             action: () => openModal('add'),
           },
         ]"
-        @get-list="getList"
-      >
+        @get-list="getList">
       </byTable>
     </div>
 
-    <el-dialog
-      :title="modalType == 'add' ? '添加发票' : '编辑发票'"
-      v-if="dialogVisible"
-      v-model="dialogVisible"
-      width="600"
-      v-loading="loadingDialog"
-    >
-      <byForm
-        :formConfig="formConfig"
-        :formOption="formOption"
-        v-model="formData.data"
-        :rules="rules"
-        ref="submit"
-      >
+    <el-dialog :title="modalType == 'add' ? '添加发票' : '编辑发票'" v-if="dialogVisible" v-model="dialogVisible" width="600" v-loading="loadingDialog">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
         <template #money>
           <div style="width: 100%">
             <el-input-number
+              onmousewheel="return false;"
               v-model="formData.data.money"
               placeholder="请输入开票金额"
               :precision="2"
               :controls="false"
-              :min="0"
-            />
+              :min="0" />
           </div>
         </template>
         <template #file>
@@ -52,39 +39,27 @@
               :data="uploadData"
               multiple
               :before-upload="uploadFile"
-              :on-preview="onPreviewFile"
-            >
+              :on-preview="onPreviewFile">
               <el-button>上传文件</el-button>
             </el-upload>
           </div>
         </template>
         <template #information>
-          <el-table
-            :data="formData.data.invoiceDetailsList"
-            style="width: 100%; margin-top: 16px"
-          >
+          <el-table :data="formData.data.invoiceDetailsList" style="width: 100%; margin-top: 16px">
             <el-table-column prop="code" label="采购合同" width="140" />
             <el-table-column prop="amount" label="合同金额" width="120" />
-            <el-table-column
-              prop="sumInvoiceMoney"
-              label="已收发票金额"
-              width="120"
-            />
+            <el-table-column prop="sumInvoiceMoney" label="已收发票金额" width="120" />
             <el-table-column label="关联金额">
               <template #default="{ row, $index }">
-                <el-form-item
-                  :prop="'invoiceDetailsList.' + $index + '.money'"
-                  :rules="rules.money"
-                  :inline-message="true"
-                >
+                <el-form-item :prop="'invoiceDetailsList.' + $index + '.money'" :rules="rules.money" :inline-message="true">
                   <el-input-number
+                    onmousewheel="return false;"
                     v-model="row.money"
                     placeholder="请输入关联金额"
                     style="width: 100%"
                     :precision="2"
                     :controls="false"
-                    :min="0"
-                  />
+                    :min="0" />
                 </el-form-item>
               </template>
             </el-table-column>
@@ -93,9 +68,7 @@
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitForm()" size="large"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitForm()" size="large">确 定</el-button>
       </template>
     </el-dialog>
   </div>
@@ -197,15 +170,11 @@ const config = computed(() => {
             },
             el: "button",
             click() {
-              ElMessageBox.confirm(
-                "此操作将永久删除该数据, 是否继续?",
-                "提示",
-                {
-                  confirmButtonText: "确定",
-                  cancelButtonText: "取消",
-                  type: "warning",
-                }
-              ).then(() => {
+              ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning",
+              }).then(() => {
                 proxy
                   .post("/invoice/delete", {
                     id: row.id,
@@ -243,18 +212,16 @@ const getDict = () => {
         });
       }
     });
-  proxy
-    .post("/supplierInfo/page", { pageNum: 1, pageSize: 999 })
-    .then((res) => {
-      if (res.rows && res.rows.length > 0) {
-        supplierList.value = res.rows.map((item) => {
-          return {
-            label: item.name,
-            value: item.id,
-          };
-        });
-      }
-    });
+  proxy.post("/supplierInfo/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+    if (res.rows && res.rows.length > 0) {
+      supplierList.value = res.rows.map((item) => {
+        return {
+          label: item.name,
+          value: item.id,
+        };
+      });
+    }
+  });
 };
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
@@ -381,19 +348,12 @@ const submitForm = () => {
         };
       });
     }
-    if (
-      !(
-        formData.data.invoiceDetailsList &&
-        formData.data.invoiceDetailsList.length > 0
-      )
-    ) {
+    if (!(formData.data.invoiceDetailsList && formData.data.invoiceDetailsList.length > 0)) {
       return ElMessage("该供应商暂无关联合同");
     }
     let money = 0;
     for (let i = 0; i < formData.data.invoiceDetailsList.length; i++) {
-      money = parseFloat(
-        Number(money) + Number(formData.data.invoiceDetailsList[i].money)
-      ).toFixed(2);
+      money = parseFloat(Number(money) + Number(formData.data.invoiceDetailsList[i].money)).toFixed(2);
     }
     if (money != formData.data.money) {
       return ElMessage("开票金额不等于关联金额");
@@ -420,19 +380,17 @@ const update = (row) => {
   modalType.value = "edit";
   loadingDialog.value = true;
   proxy.post("/invoice/detail", { id: row.id }).then((res) => {
-    proxy
-      .post("/fileInfo/getList", { businessIdList: [row.id] })
-      .then((res) => {
-        if (res[row.id] && res[row.id].length > 0) {
-          fileList.value = res[row.id].map((item) => {
-            return {
-              raw: item,
-              name: item.fileName,
-              url: item.fileUrl,
-            };
-          });
-        }
-      });
+    proxy.post("/fileInfo/getList", { businessIdList: [row.id] }).then((res) => {
+      if (res[row.id] && res[row.id].length > 0) {
+        fileList.value = res[row.id].map((item) => {
+          return {
+            raw: item,
+            name: item.fileName,
+            url: item.fileUrl,
+          };
+        });
+      }
+    });
     res.invoiceDetailsList = res.invoiceDetailsVoList.map((item) => {
       return {
         code: item.purchaseCode,

+ 19 - 40
src/views/purchaseManage/purchasePayment/refund/index.vue

@@ -14,8 +14,7 @@
             action: () => applyForRefund(),
           },
         ]"
-        @get-list="getList"
-      >
+        @get-list="getList">
         <template #amount="{ item }">
           <div style="color: #409eff">{{ moneyFormat(item.amount, 2) }}</div>
         </template>
@@ -25,38 +24,24 @@
       </byTable>
     </div>
 
-    <el-dialog
-      title="到款登记"
-      v-if="dialogVisible"
-      v-model="dialogVisible"
-      width="600"
-      v-loading="loadingDialog"
-    >
-      <byForm
-        :formConfig="formConfig"
-        :formOption="formOption"
-        v-model="formData.data"
-        :rules="rules"
-        ref="submit"
-      >
+    <el-dialog title="到款登记" v-if="dialogVisible" v-model="dialogVisible" width="600" v-loading="loadingDialog">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
         <template #receiptAmount>
           <div style="width: 100%">
             <el-input-number
+              onmousewheel="return false;"
               v-model="formData.data.receiptAmount"
               placeholder="请输入到款金额"
               :min="0"
               :precision="2"
               :controls="false"
-              style="width: 100%"
-            />
+              style="width: 100%" />
           </div>
         </template>
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitForm()" size="large"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitForm()" size="large">确 定</el-button>
       </template>
     </el-dialog>
   </div>
@@ -228,20 +213,18 @@ const getDict = () => {
         });
       }
     });
-  proxy
-    .post("/accountManagement/page", { pageNum: 1, pageSize: 999 })
-    .then((res) => {
-      accountList.value = res.rows.map((item) => {
-        return {
-          bankName: item.name,
-          accountOpening: item.accountOpening,
-          openingBank: item.openingBank,
-          interbankNumber: item.interbankNumber,
-          label: item.alias,
-          value: item.id,
-        };
-      });
+  proxy.post("/accountManagement/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+    accountList.value = res.rows.map((item) => {
+      return {
+        bankName: item.name,
+        accountOpening: item.accountOpening,
+        openingBank: item.openingBank,
+        interbankNumber: item.interbankNumber,
+        label: item.alias,
+        value: item.id,
+      };
     });
+  });
 };
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
@@ -331,12 +314,8 @@ const formConfig = computed(() => {
   ];
 });
 const rules = ref({
-  receiptAccountManagementId: [
-    { required: true, message: "请选择到款账户", trigger: "change" },
-  ],
-  receiptAmount: [
-    { required: true, message: "请输入到款金额", trigger: "blur" },
-  ],
+  receiptAccountManagementId: [{ required: true, message: "请选择到款账户", trigger: "change" }],
+  receiptAmount: [{ required: true, message: "请输入到款金额", trigger: "blur" }],
 });
 const formData = reactive({
   data: {},