cz 1 год назад
Родитель
Сommit
1accfde7b3

+ 547 - 116
src/components/PDF/fundsPDF.vue

@@ -7,50 +7,165 @@
         </div>
         <div style="padding: 8px 0">
           <span>{{ printDetails.corporationName }}</span>
-          <span style="padding-left: 32px">创建时间: {{ printDetails.createTime }}</span>
+          <span style="padding-left: 32px"
+            >创建时间: {{ printDetails.createTime }}</span
+          >
         </div>
         <div style="border: 1px solid black">
           <div style="display: flex; border-bottom: 1px solid black">
-            <div style="width: 126px; border-right: 1px solid black; padding: 8px">创建人</div>
+            <div
+              style="width: 126px; border-right: 1px solid black; padding: 8px"
+            >
+              创建人
+            </div>
             <div style="width: calc(100% - 126px); padding: 8px">
               {{ dictValueLabel(printDetails.createUser, userList) }}
             </div>
           </div>
           <div style="display: flex; border-bottom: 1px solid black">
-            <div style="width: 126px; border-right: 1px solid black; padding: 8px">创建人部门</div>
+            <div
+              style="width: 126px; border-right: 1px solid black; padding: 8px"
+            >
+              创建人部门
+            </div>
             <div style="width: calc(100% - 126px); padding: 8px">
               {{ printDetails.deptName }}
             </div>
           </div>
-          <div style="display: flex; border-bottom: 1px solid black" v-if="printDetails.type !== '3'">
-            <div style="width: 126px; border-right: 1px solid black; padding: 4px 8px; display: flex; align-items: center">费用明细</div>
+          <div
+            style="display: flex; border-bottom: 1px solid black"
+            v-if="printDetails.type !== '3'"
+          >
+            <div
+              style="
+                width: 126px;
+                border-right: 1px solid black;
+                padding: 4px 8px;
+                display: flex;
+                align-items: center;
+              "
+            >
+              费用明细
+            </div>
             <div style="width: calc(100% - 126px)">
               <div style="border-bottom: 1px solid black; display: flex">
-                <div style="width: 80px; padding: 4px 8px; border-right: 1px solid black; text-align: center">费用类型</div>
-                <div style="width: 120px; padding: 4px 8px; border-right: 1px solid black; text-align: center">关联合同</div>
-                <div style="width: calc(100% - 360px); padding: 4px 8px; border-right: 1px solid black; text-align: center">款项说明</div>
-                <div style="width: 60px; padding: 4px 8px; border-right: 1px solid black; text-align: center">货币</div>
-                <div style="width: 100px; padding: 4px 8px; text-align: center">付款金额</div>
+                <div
+                  style="
+                    width: 80px;
+                    padding: 4px 8px;
+                    border-right: 1px solid black;
+                    text-align: center;
+                  "
+                >
+                  费用类型
+                </div>
+                <div
+                  style="
+                    width: 120px;
+                    padding: 4px 8px;
+                    border-right: 1px solid black;
+                    text-align: center;
+                  "
+                >
+                  关联合同
+                </div>
+                <div
+                  style="
+                    width: calc(100% - 360px);
+                    padding: 4px 8px;
+                    border-right: 1px solid black;
+                    text-align: center;
+                  "
+                >
+                  款项说明
+                </div>
+                <div
+                  style="
+                    width: 60px;
+                    padding: 4px 8px;
+                    border-right: 1px solid black;
+                    text-align: center;
+                  "
+                >
+                  货币
+                </div>
+                <div style="width: 100px; padding: 4px 8px; text-align: center">
+                  付款金额
+                </div>
               </div>
-              <template v-if="printDetails.accountRequestFundsDetailList && printDetails.accountRequestFundsDetailList.length > 0">
-                <div v-for="(item, index) in printDetails.accountRequestFundsDetailList" :key="index">
+              <template
+                v-if="
+                  printDetails.accountRequestFundsDetailList &&
+                  printDetails.accountRequestFundsDetailList.length > 0
+                "
+              >
+                <div
+                  v-for="(
+                    item, index
+                  ) in printDetails.accountRequestFundsDetailList"
+                  :key="index"
+                >
                   <div
                     :style="
-                      index + 1 !== printDetails.accountRequestFundsDetailList.length ? 'border-bottom: 1px solid black;  display: flex' : ' display: flex'
-                    ">
-                    <div style="width: 80px; padding: 4px 8px; border-right: 1px solid black; text-align: center">
+                      index + 1 !==
+                      printDetails.accountRequestFundsDetailList.length
+                        ? 'border-bottom: 1px solid black;  display: flex'
+                        : ' display: flex'
+                    "
+                  >
+                    <div
+                      style="
+                        width: 80px;
+                        padding: 4px 8px;
+                        border-right: 1px solid black;
+                        text-align: center;
+                      "
+                    >
                       {{ dictValueLabel(item.costType, fundsCostType) }}
                     </div>
-                    <div style="width: 120px; padding: 4px 8px; border-right: 1px solid black; display: flex; align-items: center">
+                    <div
+                      style="
+                        width: 120px;
+                        padding: 4px 8px;
+                        border-right: 1px solid black;
+                        display: flex;
+                        align-items: center;
+                      "
+                    >
                       {{ item.contractCode }}
                     </div>
-                    <div style="width: calc(100% - 360px); padding: 4px 8px; border-right: 1px solid black; display: flex; align-items: center">
+                    <div
+                      style="
+                        width: calc(100% - 360px);
+                        padding: 4px 8px;
+                        border-right: 1px solid black;
+                        display: flex;
+                        align-items: center;
+                      "
+                    >
                       {{ item.remarks }}
                     </div>
-                    <div style="width: 60px; padding: 4px 8px; border-right: 1px solid black; display: flex; align-items: center">
-                      {{ dictValueLabel(printDetails.currency, accountCurrency) }}
+                    <div
+                      style="
+                        width: 60px;
+                        padding: 4px 8px;
+                        border-right: 1px solid black;
+                        display: flex;
+                        align-items: center;
+                      "
+                    >
+                      {{
+                        dictValueLabel(printDetails.currency, accountCurrency)
+                      }}
                     </div>
-                    <div style="width: 100px; padding: 4px 8px; display: flex; align-items: center">
+                    <div
+                      style="
+                        width: 100px;
+                        padding: 4px 8px;
+                        display: flex;
+                        align-items: center;
+                      "
+                    >
                       {{ item.amount }}
                     </div>
                   </div>
@@ -59,38 +174,157 @@
             </div>
           </div>
           <div style="display: flex; border-bottom: 1px solid black" v-else>
-            <div style="width: 126px; border-right: 1px solid black; padding: 4px 8px; display: flex; align-items: center">费用明细</div>
+            <div
+              style="
+                width: 126px;
+                border-right: 1px solid black;
+                padding: 4px 8px;
+                display: flex;
+                align-items: center;
+              "
+            >
+              费用明细
+            </div>
             <div style="width: calc(100% - 126px)">
               <div style="border-bottom: 1px solid black; display: flex">
-                <div style="width: 80px; padding: 4px 8px; border-right: 1px solid black; text-align: center">费用类型</div>
-                <div style="width: 120px; padding: 4px 8px; border-right: 1px solid black; text-align: center">关联合同</div>
-                <div style="width: calc(100% - 420px); padding: 4px 8px; border-right: 1px solid black; text-align: center">款项说明</div>
-                <div style="width: 60px; padding: 4px 8px; border-right: 1px solid black; text-align: center">货币</div>
-                <div style="width: 80px; padding: 4px 8px; border-right: 1px solid black; text-align: center">预支金额</div>
-                <div style="width: 80px; padding: 4px 8px; text-align: center">付款金额</div>
+                <div
+                  style="
+                    width: 80px;
+                    padding: 4px 8px;
+                    border-right: 1px solid black;
+                    text-align: center;
+                  "
+                >
+                  费用类型
+                </div>
+                <div
+                  style="
+                    width: 120px;
+                    padding: 4px 8px;
+                    border-right: 1px solid black;
+                    text-align: center;
+                  "
+                >
+                  关联合同
+                </div>
+                <div
+                  style="
+                    width: calc(100% - 420px);
+                    padding: 4px 8px;
+                    border-right: 1px solid black;
+                    text-align: center;
+                  "
+                >
+                  款项说明
+                </div>
+                <div
+                  style="
+                    width: 60px;
+                    padding: 4px 8px;
+                    border-right: 1px solid black;
+                    text-align: center;
+                  "
+                >
+                  货币
+                </div>
+                <div
+                  style="
+                    width: 80px;
+                    padding: 4px 8px;
+                    border-right: 1px solid black;
+                    text-align: center;
+                  "
+                >
+                  预支金额
+                </div>
+                <div style="width: 80px; padding: 4px 8px; text-align: center">
+                  付款金额
+                </div>
               </div>
-              <template v-if="printDetails.accountRequestFundsDetailList && printDetails.accountRequestFundsDetailList.length > 0">
-                <div v-for="(item, index) in printDetails.accountRequestFundsDetailList" :key="index">
+              <template
+                v-if="
+                  printDetails.accountRequestFundsDetailList &&
+                  printDetails.accountRequestFundsDetailList.length > 0
+                "
+              >
+                <div
+                  v-for="(
+                    item, index
+                  ) in printDetails.accountRequestFundsDetailList"
+                  :key="index"
+                >
                   <div
                     :style="
-                      index + 1 !== printDetails.accountRequestFundsDetailList.length ? 'border-bottom: 1px solid black;  display: flex' : ' display: flex'
-                    ">
-                    <div style="width: 80px; padding: 4px 8px; border-right: 1px solid black; text-align: center">
+                      index + 1 !==
+                      printDetails.accountRequestFundsDetailList.length
+                        ? 'border-bottom: 1px solid black;  display: flex'
+                        : ' display: flex'
+                    "
+                  >
+                    <div
+                      style="
+                        width: 80px;
+                        padding: 4px 8px;
+                        border-right: 1px solid black;
+                        text-align: center;
+                      "
+                    >
                       {{ dictValueLabel(item.costType, fundsCostType) }}
                     </div>
-                    <div style="width: 120px; padding: 4px 8px; border-right: 1px solid black; display: flex; align-items: center">
+                    <div
+                      style="
+                        width: 120px;
+                        padding: 4px 8px;
+                        border-right: 1px solid black;
+                        display: flex;
+                        align-items: center;
+                      "
+                    >
                       {{ item.contractCode }}
                     </div>
-                    <div style="width: calc(100% - 420px); padding: 4px 8px; border-right: 1px solid black; display: flex; align-items: center">
+                    <div
+                      style="
+                        width: calc(100% - 420px);
+                        padding: 4px 8px;
+                        border-right: 1px solid black;
+                        display: flex;
+                        align-items: center;
+                      "
+                    >
                       {{ item.remarks }}
                     </div>
-                    <div style="width: 60px; padding: 4px 8px; border-right: 1px solid black; display: flex; align-items: center">
-                      {{ dictValueLabel(printDetails.currency, accountCurrency) }}
+                    <div
+                      style="
+                        width: 60px;
+                        padding: 4px 8px;
+                        border-right: 1px solid black;
+                        display: flex;
+                        align-items: center;
+                      "
+                    >
+                      {{
+                        dictValueLabel(printDetails.currency, accountCurrency)
+                      }}
                     </div>
-                    <div style="width: 80px; padding: 4px 8px; border-right: 1px solid black; display: flex; align-items: center">
+                    <div
+                      style="
+                        width: 80px;
+                        padding: 4px 8px;
+                        border-right: 1px solid black;
+                        display: flex;
+                        align-items: center;
+                      "
+                    >
                       {{ item.advanceAmount }}
                     </div>
-                    <div style="width: 80px; padding: 4px 8px; display: flex; align-items: center">
+                    <div
+                      style="
+                        width: 80px;
+                        padding: 4px 8px;
+                        display: flex;
+                        align-items: center;
+                      "
+                    >
                       {{ item.amount }}
                     </div>
                   </div>
@@ -98,10 +332,23 @@
               </template>
             </div>
           </div>
-          <div style="display: flex; border-bottom: 1px solid black" v-if="printDetails.type !== '3'">
-            <div style="width: 126px; border-right: 1px solid black; padding: 8px">总报销金额</div>
+          <div
+            style="display: flex; border-bottom: 1px solid black"
+            v-if="printDetails.type !== '3'"
+          >
+            <div
+              style="width: 126px; border-right: 1px solid black; padding: 8px"
+            >
+              总报销金额
+            </div>
             <div style="width: calc(100% - 126px); display: flex">
-              <div style="width: calc(100% - 100px); padding: 8px; border-right: 1px solid black">
+              <div
+                style="
+                  width: calc(100% - 100px);
+                  padding: 8px;
+                  border-right: 1px solid black;
+                "
+              >
                 {{ NumberToChinese(computeMoney("amount")) }}
               </div>
               <div style="width: 100px; padding: 8px">
@@ -111,9 +358,23 @@
           </div>
           <div v-else>
             <div style="display: flex; border-bottom: 1px solid black">
-              <div style="width: 126px; border-right: 1px solid black; padding: 8px">核销总金额</div>
+              <div
+                style="
+                  width: 126px;
+                  border-right: 1px solid black;
+                  padding: 8px;
+                "
+              >
+                核销总金额
+              </div>
               <div style="width: calc(100% - 126px); display: flex">
-                <div style="width: calc(100% - 80px); padding: 8px; border-right: 1px solid black">
+                <div
+                  style="
+                    width: calc(100% - 80px);
+                    padding: 8px;
+                    border-right: 1px solid black;
+                  "
+                >
                   {{ NumberToChinese(computeMoney("amount")) }}
                 </div>
                 <div style="width: 80px; padding: 8px">
@@ -122,9 +383,23 @@
               </div>
             </div>
             <div style="display: flex; border-bottom: 1px solid black">
-              <div style="width: 126px; border-right: 1px solid black; padding: 8px">预支总金额</div>
+              <div
+                style="
+                  width: 126px;
+                  border-right: 1px solid black;
+                  padding: 8px;
+                "
+              >
+                预支总金额
+              </div>
               <div style="width: calc(100% - 126px); display: flex">
-                <div style="width: calc(100% - 80px); padding: 8px; border-right: 1px solid black">
+                <div
+                  style="
+                    width: calc(100% - 80px);
+                    padding: 8px;
+                    border-right: 1px solid black;
+                  "
+                >
                   {{ NumberToChinese(computeMoney("advanceAmount")) }}
                 </div>
                 <div style="width: 80px; padding: 8px">
@@ -133,9 +408,23 @@
               </div>
             </div>
             <div style="display: flex; border-bottom: 1px solid black">
-              <div style="width: 126px; border-right: 1px solid black; padding: 8px">差额 (核销 - 预支)</div>
+              <div
+                style="
+                  width: 126px;
+                  border-right: 1px solid black;
+                  padding: 8px;
+                "
+              >
+                差额 (核销 - 预支)
+              </div>
               <div style="width: calc(100% - 126px); display: flex">
-                <div style="width: calc(100% - 80px); padding: 8px; border-right: 1px solid black">
+                <div
+                  style="
+                    width: calc(100% - 80px);
+                    padding: 8px;
+                    border-right: 1px solid black;
+                  "
+                >
                   {{ NumberToChinese(computeBalance()) }}
                 </div>
                 <div style="width: 80px; padding: 8px">
@@ -145,56 +434,161 @@
             </div>
           </div>
           <div style="display: flex; border-bottom: 1px solid black">
-            <div style="width: 126px; border-right: 1px solid black; padding: 8px">单据数量</div>
+            <div
+              style="width: 126px; border-right: 1px solid black; padding: 8px"
+            >
+              单据数量
+            </div>
             <div style="width: calc(100% - 126px); padding: 8px">
               {{ printDetails.quantity }}
             </div>
           </div>
           <div style="display: flex; border-bottom: 1px solid black">
-            <div style="width: 126px; border-right: 1px solid black; padding: 0 8px; display: flex; align-items: center">收款信息</div>
+            <div
+              style="
+                width: 126px;
+                border-right: 1px solid black;
+                padding: 0 8px;
+                display: flex;
+                align-items: center;
+              "
+            >
+              收款信息
+            </div>
             <div style="width: calc(100% - 126px)">
               <div style="border-bottom: 1px solid black; display: flex">
-                <div style="width: 19%; padding: 0 8px; border-right: 1px solid black; text-align: center">支付方式</div>
-                <div style="width: 27%; padding: 0 8px; border-right: 1px solid black; text-align: center">收款方户名</div>
-                <div style="width: 27%; padding: 0 8px; border-right: 1px solid black; text-align: center">开户行</div>
-                <div style="width: 27%; padding: 0 8px; text-align: center">收款方账号</div>
+                <div
+                  style="
+                    width: 19%;
+                    padding: 0 8px;
+                    border-right: 1px solid black;
+                    text-align: center;
+                  "
+                >
+                  支付方式
+                </div>
+                <div
+                  style="
+                    width: 27%;
+                    padding: 0 8px;
+                    border-right: 1px solid black;
+                    text-align: center;
+                  "
+                >
+                  收款方户名
+                </div>
+                <div
+                  style="
+                    width: 27%;
+                    padding: 0 8px;
+                    border-right: 1px solid black;
+                    text-align: center;
+                  "
+                >
+                  开户行
+                </div>
+                <div style="width: 27%; padding: 0 8px; text-align: center">
+                  收款方账号
+                </div>
               </div>
               <div style="display: flex">
-                <div style="width: 19%; padding: 0 8px; border-right: 1px solid black; display: flex; align-items: center">
-                  {{ dictValueLabel(printDetails.paymentMethod, fundsPaymentMethod) }}
+                <div
+                  style="
+                    width: 19%;
+                    padding: 0 8px;
+                    border-right: 1px solid black;
+                    display: flex;
+                    align-items: center;
+                  "
+                >
+                  {{
+                    dictValueLabel(
+                      printDetails.paymentMethod,
+                      fundsPaymentMethod
+                    )
+                  }}
                 </div>
-                <div style="width: 27%; padding: 0 8px; border-right: 1px solid black; display: flex; align-items: center">
+                <div
+                  style="
+                    width: 27%;
+                    padding: 0 8px;
+                    border-right: 1px solid black;
+                    display: flex;
+                    align-items: center;
+                  "
+                >
                   {{ printDetails.name }}
                 </div>
-                <div style="width: 27%; padding: 0 8px; border-right: 1px solid black; display: flex; align-items: center">
+                <div
+                  style="
+                    width: 27%;
+                    padding: 0 8px;
+                    border-right: 1px solid black;
+                    display: flex;
+                    align-items: center;
+                  "
+                >
                   {{ printDetails.openingBank }}
                 </div>
-                <div style="width: 27%; padding: 0 8px; display: flex; align-items: center">
+                <div
+                  style="
+                    width: 27%;
+                    padding: 0 8px;
+                    display: flex;
+                    align-items: center;
+                  "
+                >
                   {{ printDetails.accountOpening }}
                 </div>
               </div>
             </div>
           </div>
           <div style="display: flex; border-bottom: 1px solid black">
-            <div style="width: 126px; border-right: 1px solid black; padding: 8px">电子发票(PDF/JPG)</div>
+            <div
+              style="width: 126px; border-right: 1px solid black; padding: 8px"
+            >
+              电子发票(PDF/JPG)
+            </div>
             <div style="width: calc(100% - 126px); padding: 8px">
               {{ printDetails.electronicInvoiceText }}
             </div>
           </div>
           <div style="display: flex">
-            <div style="width: 126px; border-right: 1px solid black; padding: 4px 8px; display: flex; align-items: center">审批流程</div>
+            <div
+              style="
+                width: 126px;
+                border-right: 1px solid black;
+                padding: 4px 8px;
+                display: flex;
+                align-items: center;
+              "
+            >
+              审批流程
+            </div>
             <div style="width: calc(100% - 126px)">
-              <template v-if="printDetails.recordList && printDetails.recordList.length > 0">
-                <div v-for="(item, index) in printDetails.recordList" :key="index">
+              <template
+                v-if="
+                  printDetails.recordList && printDetails.recordList.length > 0
+                "
+              >
+                <div
+                  v-for="(item, index) in printDetails.recordList"
+                  :key="index"
+                >
                   <div
                     :style="
                       index + 1 !== printDetails.recordList.length
                         ? 'border-bottom: 1px solid black; padding: 4px 8px; display: flex'
                         : 'padding: 4px 8px; display: flex'
-                    ">
-                    <div style="width: calc(100% - 120px); word-wrap: break-word">
+                    "
+                  >
+                    <div
+                      style="width: calc(100% - 120px); word-wrap: break-word"
+                    >
                       <span>{{ item.nodeName }}: </span>
-                      <span style="padding-left: 4px">{{ item.processedUser }}</span>
+                      <span style="padding-left: 4px">{{
+                        item.processedUser
+                      }}</span>
                       <span style="padding-left: 4px">{{ item.remark }}</span>
                     </div>
                     <div style="width: 120px">{{ item.processedDate }}</div>
@@ -206,7 +600,9 @@
         </div>
         <div style="padding-top: 16px">
           <span>打印时间: {{ presentTime }}</span>
-          <span style="padding-left: 32px">打印人: {{ useUserStore().user.nickName }}</span>
+          <span style="padding-left: 32px"
+            >打印人: {{ useUserStore().user.nickName }}</span
+          >
         </div>
       </div>
     </div>
@@ -227,24 +623,31 @@ const accountCurrency = ref([]);
 const fundsCostType = ref([]);
 const fundsPaymentMethod = ref([]);
 const getDictData = () => {
-  proxy.getDictOne(["founds_type", "funds_payment_method", "account_currency", "funds_cost_type"]).then((res) => {
-    fundsType.value = res["founds_type"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    fundsPaymentMethod.value = res["funds_payment_method"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    accountCurrency.value = res["account_currency"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    fundsCostType.value = res["funds_cost_type"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-  });
+  proxy
+    .getDictOne([
+      "founds_type",
+      "funds_payment_method",
+      "account_currency",
+      "funds_cost_type",
+    ])
+    .then((res) => {
+      fundsType.value = res["founds_type"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      fundsPaymentMethod.value = res["funds_payment_method"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      accountCurrency.value = res["account_currency"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      fundsCostType.value = res["funds_cost_type"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+    });
   proxy
     .get("/tenantUser/list", {
       pageNum: 1,
@@ -262,26 +665,40 @@ const getDictData = () => {
         });
       }
     });
-  proxy.post("/corporation/page", { pageNum: 1, pageSize: 9999 }).then((res) => {
-    if (res.rows && res.rows.length > 0) {
-      companyData.value = res.rows.map((item) => {
-        return {
-          label: item.name,
-          value: item.id,
-        };
-      });
-    }
-  });
+  proxy
+    .post("/corporation/page", { pageNum: 1, pageSize: 9999 })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        companyData.value = res.rows.map((item) => {
+          return {
+            label: item.name,
+            value: item.id,
+          };
+        });
+      }
+    });
 };
 getDictData();
 const printDetails = ref({});
 const presentTime = ref(moment().format("yyyy-MM-DD HH:mm:ss"));
 const computeMoney = (label) => {
   let amount = 0;
-  if (printDetails.value.accountRequestFundsDetailList && printDetails.value.accountRequestFundsDetailList.length > 0) {
-    for (let i = 0; i < printDetails.value.accountRequestFundsDetailList.length; i++) {
+  if (
+    printDetails.value.accountRequestFundsDetailList &&
+    printDetails.value.accountRequestFundsDetailList.length > 0
+  ) {
+    for (
+      let i = 0;
+      i < printDetails.value.accountRequestFundsDetailList.length;
+      i++
+    ) {
       if (printDetails.value.accountRequestFundsDetailList[i][label]) {
-        amount = Number(parseFloat(Number(amount) + Number(printDetails.value.accountRequestFundsDetailList[i][label])).toFixed(2));
+        amount = Number(
+          parseFloat(
+            Number(amount) +
+              Number(printDetails.value.accountRequestFundsDetailList[i][label])
+          ).toFixed(2)
+        );
       }
     }
   }
@@ -295,7 +712,9 @@ const computeBalance = () => {
     balance = Number(amount);
   }
   if (advanceAmount) {
-    balance = Number(parseFloat(Number(balance) - Number(advanceAmount)).toFixed(2));
+    balance = Number(
+      parseFloat(Number(balance) - Number(advanceAmount)).toFixed(2)
+    );
   }
   return balance;
 };
@@ -304,27 +723,39 @@ const props = defineProps({
 });
 onMounted(() => {
   if (props.rowData && props.rowData.id) {
-    proxy.post("/accountRequestFunds/detail", { id: props.rowData.id }).then((res) => {
-      printDetails.value = res;
-      proxy.post("/fileInfo/getList", { businessIdList: [props.rowData.id] }).then((resFile) => {
-        let electronicInvoiceText = "";
-        if (resFile[props.rowData.id] && resFile[props.rowData.id].length > 0) {
-          for (let i = 0; i < resFile[props.rowData.id].length; i++) {
-            if (i === 0) {
-              electronicInvoiceText = resFile[props.rowData.id][0].fileName;
-            } else {
-              electronicInvoiceText = electronicInvoiceText + ", " + resFile[props.rowData.id][i].fileName;
+    proxy
+      .post("/accountRequestFunds/detail", { id: props.rowData.id })
+      .then((res) => {
+        printDetails.value = res;
+        proxy
+          .post("/fileInfo/getList", { businessIdList: [props.rowData.id] })
+          .then((resFile) => {
+            let electronicInvoiceText = "";
+            if (
+              resFile[props.rowData.id] &&
+              resFile[props.rowData.id].length > 0
+            ) {
+              for (let i = 0; i < resFile[props.rowData.id].length; i++) {
+                if (i === 0) {
+                  electronicInvoiceText = resFile[props.rowData.id][0].fileName;
+                } else {
+                  electronicInvoiceText =
+                    electronicInvoiceText +
+                    ", " +
+                    resFile[props.rowData.id][i].fileName;
+                }
+              }
             }
-          }
+            printDetails.value.electronicInvoiceText = electronicInvoiceText;
+          });
+        if (res.flowInfoId) {
+          proxy
+            .post("/flowExample/getApprovalRecord", { id: res.flowInfoId })
+            .then((record) => {
+              printDetails.value.recordList = record.recordList;
+            });
         }
-        printDetails.value.electronicInvoiceText = electronicInvoiceText;
       });
-      // if (res.flowInfoId) {
-      //   proxy.post("/flowExample/getApprovalRecord", { id: res.flowInfoId }).then((record) => {
-      //     printDetails.value.recordList = record.recordList;
-      //   });
-      // }
-    });
   }
 });
 </script>

+ 255 - 67
src/views/EHSD/procurement/profitBudgetEHSD/index.vue

@@ -15,16 +15,25 @@
           action: () => openModal(),
         },
       ]"
-      @get-list="getList">
+      @get-list="getList"
+    >
     </byTable>
-    <div style="padding: 0 20px 20px 20px; background-color: white" v-if="rateStatus">
-      <el-table v-loading="loading" :data="sourceList.data">
+    <div
+      style="padding: 0 20px 20px 20px; background-color: white"
+      v-if="rateStatus"
+    >
+      <el-table :data="sourceList.data">
         <el-table-column label="合同编号" prop="code" width="160" fixed />
-        <el-table-column label="客户名称" prop="customerName" min-width="200" fixed />
+        <el-table-column
+          label="客户名称"
+          prop="customerName"
+          min-width="200"
+          fixed
+        />
         <el-table-column label="业务员" prop="userName" width="140" fixed />
         <el-table-column label="合同金额" width="140">
           <template #default="{ row }">
-            <div>{{ row.amount }}</div>
+            <div>{{ row.currency }} {{ row.amount }}</div>
           </template>
         </el-table-column>
         <el-table-column label="应付货款" width="140">
@@ -40,65 +49,79 @@
             <div>13%</div>
           </template>
         </el-table-column>
-        <el-table-column label="应退税金额" prop="refundableAmount" width="140" />
+        <el-table-column
+          label="应退税金额"
+          prop="refundableAmount"
+          width="140"
+        />
         <el-table-column label="包材金额" width="140">
           <template #default="{ row }">
-            <div>{{ row.otherCurrency }}{{ row.other }}</div>
+            <div>{{ row.other }}</div>
           </template>
         </el-table-column>
         <el-table-column label="配件金额" width="140">
           <template #default="{ row }">
-            <div>{{ row.otherCurrency }}{{ row.other }}</div>
+            <div>{{ row.other }}</div>
           </template>
         </el-table-column>
         <el-table-column label="拖车费" width="140">
           <template #default="{ row }">
-            <div>{{ row.trailerFeeCurrency }}{{ row.trailerFee }}</div>
+            <div>{{ row.trailerFee }}</div>
           </template>
         </el-table-column>
         <el-table-column label="报关费" width="140">
           <template #default="{ row }">
-            <div>{{ row.customsFeeCurrency }}{{ row.customsFee }}</div>
+            <div>{{ row.customsFee }}</div>
           </template>
         </el-table-column>
         <el-table-column label="代理费" width="140">
           <template #default="{ row }">
-            <div>{{ row.agencyFeeCurrency }}{{ row.agencyFee }}</div>
+            <div>{{ row.agencyFee }}</div>
           </template>
         </el-table-column>
         <el-table-column label="港杂费" width="140">
           <template #default="{ row }">
-            <div>{{ row.portMixedFeeCurrency }}{{ row.portMixedFee }}</div>
+            <div>{{ row.portMixedFee }}</div>
           </template>
         </el-table-column>
         <el-table-column label="验货红包" width="140">
           <template #default="{ row }">
-            <div>{{ row.inspectionRedPackCurrency }}{{ row.inspectionRedPack }}</div>
+            <div>
+              {{ row.inspectionRedPack }}
+            </div>
           </template>
         </el-table-column>
         <el-table-column label="佣金" width="140">
           <template #default="{ row }">
-            <div>{{ row.commissionCurrency }}{{ row.commission }}</div>
+            <div>{{ row.commission }}</div>
           </template>
         </el-table-column>
         <el-table-column label="其他" width="140">
           <template #default="{ row }">
-            <div>{{ row.otherCurrency }}{{ row.other }}</div>
+            <div>{{ row.other }}</div>
           </template>
         </el-table-column>
         <el-table-column label="收入总计" prop="incomeAmount" width="140" />
-        <el-table-column label="支出总计" prop="expenditureAmount" width="140" />
+        <el-table-column
+          label="支出总计"
+          prop="expenditureAmount"
+          width="140"
+        />
         <el-table-column label="毛利率" width="140">
           <template #default="{ row }">
-            <div>{{ row.grossRate }}%</div>
+            <div>{{ parseFloat(row.grossRate).toFixed(2) }}%</div>
           </template>
         </el-table-column>
         <el-table-column label="毛利" prop="gross" width="140" />
         <el-table-column label="操作" align="center" width="160" fixed="right">
           <template #default="{ row }">
             <div>
-              <el-button type="primary" @click="changeExchangeRate(row)" link>汇率</el-button>
-              <el-button type="primary" @click="changeBudget(row)" link>预算</el-button>
+              <el-button type="primary" @click="changeExchangeRate(row)" link
+                >汇率</el-button
+              >
+              <el-button type="primary" @click="changeBudget(row)" link
+                >预算</el-button
+              >
             </div>
           </template>
         </el-table-column>
@@ -111,14 +134,30 @@
           :page-size="sourceList.pagination.pageSize"
           :total="sourceList.pagination.total"
           @size-change="handleSizeChange"
-          @current-change="handlePageChange" />
+          @current-change="handlePageChange"
+        />
       </el-row>
     </div>
 
-    <el-dialog title="默认汇率" v-if="dialogVisible" v-model="dialogVisible" width="600">
-      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
+    <el-dialog
+      title="默认汇率"
+      v-if="dialogVisible"
+      v-model="dialogVisible"
+      width="600"
+    >
+      <byForm
+        :formConfig="formConfig"
+        :formOption="formOption"
+        v-model="formData.data"
+        :rules="rules"
+        ref="submit"
+      >
         <template #currencyList>
-          <el-table :data="formData.data.list" style="width: 100%" v-loading="loadingDialog">
+          <el-table
+            :data="formData.data.list"
+            style="width: 100%"
+            v-loading="loadingDialog"
+          >
             <el-table-column label="币种">
               <template #default="{ row }">
                 <div>{{ dictValueLabel(row.type, accountCurrency) }}</div>
@@ -126,7 +165,11 @@
             </el-table-column>
             <el-table-column label="兑 CHY 汇率">
               <template #default="{ row, $index }">
-                <el-form-item :prop="'list.' + $index + '.rate'" :rules="rules.rate" :inline-message="true">
+                <el-form-item
+                  :prop="'list.' + $index + '.rate'"
+                  :rules="rules.rate"
+                  :inline-message="true"
+                >
                   <el-input-number
                     onmousewheel="return false;"
                     v-model="row.rate"
@@ -134,7 +177,8 @@
                     style="width: 100%"
                     :precision="6"
                     :controls="false"
-                    :min="0" />
+                    :min="0"
+                  />
                 </el-form-item>
               </template>
             </el-table-column>
@@ -143,14 +187,31 @@
       </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>
 
-    <el-dialog title="调整汇率" v-if="openChange" v-model="openChange" width="600">
-      <byForm :formConfig="formChangeConfig" :formOption="formOption" v-model="formChangeData.data" :rules="rules" ref="change">
+    <el-dialog
+      title="调整汇率"
+      v-if="openChange"
+      v-model="openChange"
+      width="600"
+    >
+      <byForm
+        :formConfig="formChangeConfig"
+        :formOption="formOption"
+        v-model="formChangeData.data"
+        :rules="rules"
+        ref="change"
+      >
         <template #currencyList>
-          <el-table :data="formChangeData.data.list" style="width: 100%" v-loading="loadingDialog">
+          <el-table
+            :data="formChangeData.data.list"
+            style="width: 100%"
+            v-loading="loadingDialog"
+          >
             <el-table-column label="币种">
               <template #default="{ row }">
                 <div>{{ dictValueLabel(row.type, accountCurrency) }}</div>
@@ -158,7 +219,11 @@
             </el-table-column>
             <el-table-column label="兑 CHY 汇率">
               <template #default="{ row, $index }">
-                <el-form-item :prop="'list.' + $index + '.rate'" :rules="rules.rate" :inline-message="true">
+                <el-form-item
+                  :prop="'list.' + $index + '.rate'"
+                  :rules="rules.rate"
+                  :inline-message="true"
+                >
                   <el-input-number
                     onmousewheel="return false;"
                     v-model="row.rate"
@@ -166,7 +231,8 @@
                     style="width: 100%"
                     :precision="6"
                     :controls="false"
-                    :min="0" />
+                    :min="0"
+                  />
                 </el-form-item>
               </template>
             </el-table-column>
@@ -175,73 +241,191 @@
       </byForm>
       <template #footer>
         <el-button @click="openChange = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitChangeForm()" size="large">确 定</el-button>
+        <el-button type="primary" @click="submitChangeForm()" size="large"
+          >确 定</el-button
+        >
       </template>
     </el-dialog>
 
     <el-dialog title="预算" v-if="openBudget" v-model="openBudget" width="400">
-      <byForm :formConfig="formBudgetConfig" :formOption="formOption" v-model="formBudgetData.data" ref="budget">
+      <byForm
+        :formConfig="formBudgetConfig"
+        :formOption="formOption"
+        v-model="formBudgetData.data"
+        ref="budget"
+      >
         <template #budgetMoney>
           <div style="width: 100%">
             <el-form-item label="拖车费" prop="trailerFee">
-              <el-input v-model="formBudgetData.data.trailerFee" placeholder="请输入拖车费" class="input-with-select">
+              <el-input
+                v-model="formBudgetData.data.trailerFee"
+                placeholder="请输入拖车费"
+                class="input-with-select"
+              >
                 <template #prepend>
-                  <el-select v-model="formBudgetData.data.trailerFeeCurrency" placeholder="请选择货币" style="width: 115px">
-                    <el-option v-for="(item, index) in accountCurrency" :key="index" :label="item.label" :value="item.value" />
+                  <el-select
+                    v-model="formBudgetData.data.trailerFeeCurrency"
+                    placeholder="请选择货币"
+                    style="width: 115px"
+                  >
+                    <el-option
+                      v-for="(item, index) in accountCurrency"
+                      :key="index"
+                      :label="item.label"
+                      :value="item.value"
+                    />
                   </el-select>
                 </template>
               </el-input>
             </el-form-item>
-            <el-form-item label="报关费" prop="customsFee" style="margin-top: 20px">
-              <el-input v-model="formBudgetData.data.customsFee" placeholder="请输入报关费" class="input-with-select">
+            <el-form-item
+              label="报关费"
+              prop="customsFee"
+              style="margin-top: 20px"
+            >
+              <el-input
+                v-model="formBudgetData.data.customsFee"
+                placeholder="请输入报关费"
+                class="input-with-select"
+              >
                 <template #prepend>
-                  <el-select v-model="formBudgetData.data.customsFeeCurrency" placeholder="请选择货币" style="width: 115px">
-                    <el-option v-for="(item, index) in accountCurrency" :key="index" :label="item.label" :value="item.value" />
+                  <el-select
+                    v-model="formBudgetData.data.customsFeeCurrency"
+                    placeholder="请选择货币"
+                    style="width: 115px"
+                  >
+                    <el-option
+                      v-for="(item, index) in accountCurrency"
+                      :key="index"
+                      :label="item.label"
+                      :value="item.value"
+                    />
                   </el-select>
                 </template>
               </el-input>
             </el-form-item>
-            <el-form-item label="代理费" prop="agencyFee" style="margin-top: 20px">
-              <el-input v-model="formBudgetData.data.agencyFee" placeholder="请输入代理费" class="input-with-select">
+            <el-form-item
+              label="代理费"
+              prop="agencyFee"
+              style="margin-top: 20px"
+            >
+              <el-input
+                v-model="formBudgetData.data.agencyFee"
+                placeholder="请输入代理费"
+                class="input-with-select"
+              >
                 <template #prepend>
-                  <el-select v-model="formBudgetData.data.agencyFeeCurrency" placeholder="请选择货币" style="width: 115px">
-                    <el-option v-for="(item, index) in accountCurrency" :key="index" :label="item.label" :value="item.value" />
+                  <el-select
+                    v-model="formBudgetData.data.agencyFeeCurrency"
+                    placeholder="请选择货币"
+                    style="width: 115px"
+                  >
+                    <el-option
+                      v-for="(item, index) in accountCurrency"
+                      :key="index"
+                      :label="item.label"
+                      :value="item.value"
+                    />
                   </el-select>
                 </template>
               </el-input>
             </el-form-item>
-            <el-form-item label="港杂费" prop="portMixedFee" style="margin-top: 20px">
-              <el-input v-model="formBudgetData.data.portMixedFee" placeholder="请输入港杂费" class="input-with-select">
+            <el-form-item
+              label="港杂费"
+              prop="portMixedFee"
+              style="margin-top: 20px"
+            >
+              <el-input
+                v-model="formBudgetData.data.portMixedFee"
+                placeholder="请输入港杂费"
+                class="input-with-select"
+              >
                 <template #prepend>
-                  <el-select v-model="formBudgetData.data.portMixedFeeCurrency" placeholder="请选择货币" style="width: 115px">
-                    <el-option v-for="(item, index) in accountCurrency" :key="index" :label="item.label" :value="item.value" />
+                  <el-select
+                    v-model="formBudgetData.data.portMixedFeeCurrency"
+                    placeholder="请选择货币"
+                    style="width: 115px"
+                  >
+                    <el-option
+                      v-for="(item, index) in accountCurrency"
+                      :key="index"
+                      :label="item.label"
+                      :value="item.value"
+                    />
                   </el-select>
                 </template>
               </el-input>
             </el-form-item>
-            <el-form-item label="验货红包" prop="inspectionRedPack" style="margin-top: 20px">
-              <el-input v-model="formBudgetData.data.inspectionRedPack" placeholder="请输入验货红包" class="input-with-select">
+            <el-form-item
+              label="验货红包"
+              prop="inspectionRedPack"
+              style="margin-top: 20px"
+            >
+              <el-input
+                v-model="formBudgetData.data.inspectionRedPack"
+                placeholder="请输入验货红包"
+                class="input-with-select"
+              >
                 <template #prepend>
-                  <el-select v-model="formBudgetData.data.inspectionRedPackCurrency" placeholder="请选择货币" style="width: 115px">
-                    <el-option v-for="(item, index) in accountCurrency" :key="index" :label="item.label" :value="item.value" />
+                  <el-select
+                    v-model="formBudgetData.data.inspectionRedPackCurrency"
+                    placeholder="请选择货币"
+                    style="width: 115px"
+                  >
+                    <el-option
+                      v-for="(item, index) in accountCurrency"
+                      :key="index"
+                      :label="item.label"
+                      :value="item.value"
+                    />
                   </el-select>
                 </template>
               </el-input>
             </el-form-item>
-            <el-form-item label="佣金" prop="commission" style="margin-top: 20px">
-              <el-input v-model="formBudgetData.data.commission" placeholder="请输入佣金" class="input-with-select">
+            <el-form-item
+              label="佣金"
+              prop="commission"
+              style="margin-top: 20px"
+            >
+              <el-input
+                v-model="formBudgetData.data.commission"
+                placeholder="请输入佣金"
+                class="input-with-select"
+              >
                 <template #prepend>
-                  <el-select v-model="formBudgetData.data.commissionCurrency" placeholder="请选择货币" style="width: 115px">
-                    <el-option v-for="(item, index) in accountCurrency" :key="index" :label="item.label" :value="item.value" />
+                  <el-select
+                    v-model="formBudgetData.data.commissionCurrency"
+                    placeholder="请选择货币"
+                    style="width: 115px"
+                  >
+                    <el-option
+                      v-for="(item, index) in accountCurrency"
+                      :key="index"
+                      :label="item.label"
+                      :value="item.value"
+                    />
                   </el-select>
                 </template>
               </el-input>
             </el-form-item>
             <el-form-item label="其他" prop="other" style="margin-top: 20px">
-              <el-input v-model="formBudgetData.data.other" placeholder="请输入其他" class="input-with-select">
+              <el-input
+                v-model="formBudgetData.data.other"
+                placeholder="请输入其他"
+                class="input-with-select"
+              >
                 <template #prepend>
-                  <el-select v-model="formBudgetData.data.otherCurrency" placeholder="请选择货币" style="width: 115px">
-                    <el-option v-for="(item, index) in accountCurrency" :key="index" :label="item.label" :value="item.value" />
+                  <el-select
+                    v-model="formBudgetData.data.otherCurrency"
+                    placeholder="请选择货币"
+                    style="width: 115px"
+                  >
+                    <el-option
+                      v-for="(item, index) in accountCurrency"
+                      :key="index"
+                      :label="item.label"
+                      :value="item.value"
+                    />
                   </el-select>
                 </template>
               </el-input>
@@ -251,7 +435,9 @@
       </byForm>
       <template #footer>
         <el-button @click="openBudget = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitBudgetForm()" size="large">确 定</el-button>
+        <el-button type="primary" @click="submitBudgetForm()" size="large"
+          >确 定</el-button
+        >
       </template>
     </el-dialog>
   </div>
@@ -329,13 +515,15 @@ const getDict = () => {
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
-  proxy.post("/contract/getProfitBudgetPage", sourceList.value.pagination).then((res) => {
-    sourceList.value.data = res.rows;
-    sourceList.value.pagination.total = res.total;
-    setTimeout(() => {
-      loading.value = false;
-    }, 200);
-  });
+  proxy
+    .post("/contract/getProfitBudgetPage", sourceList.value.pagination)
+    .then((res) => {
+      sourceList.value.data = res.rows;
+      sourceList.value.pagination.total = res.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+    });
 };
 const rateStatus = ref(false);
 const judgeRate = () => {

+ 14 - 3
src/views/process/processApproval/index.vue

@@ -196,7 +196,12 @@
       </el-tabs>
     </div>
 
-    <el-dialog title="下一处理人" width="400" v-model="dialogVisible">
+    <el-dialog
+      title="下一处理人"
+      width="400"
+      v-model="dialogVisible"
+      v-if="dialogVisible"
+    >
       <el-form :model="flowForm">
         <el-form-item prop="remark" label="处理人">
           <el-select
@@ -295,11 +300,16 @@ const handleSelectUser = () => {
   handleSubmit();
 };
 const handleResult = (res) => {
-  if (res !== null && res.success) {
+  if (res.userList == null && res.success) {
     skipPage();
-  } else {
+  } else if (res.userList && res.userList.length > 0) {
     dialogVisible.value = true;
     nextHandleUser.value = res.userList;
+  } else {
+    return ElMessage({
+      message: "请联系管理员!",
+      type: "info",
+    });
   }
 };
 
@@ -312,6 +322,7 @@ const uploadFile = async (file) => {
   file.uploadState = true;
   return true;
 };
+
 const handleSuccess = (any, UploadFile) => {
   UploadFile.raw.uploadState = false;
 };