瀏覽代碼

金额转大写更换

cz 1 年之前
父節點
當前提交
43ae2aa9b5

+ 4 - 51
src/components/process/SendFunds.vue

@@ -399,6 +399,8 @@ import { ElMessage } from "element-plus";
 import useUserStore from "@/store/modules/user";
 import { useRoute } from "vue-router";
 import moment from "moment";
+import { NumberToChinese } from "@/utils/util.js";
+
 
 const route = useRoute();
 const { proxy } = getCurrentInstance();
@@ -799,57 +801,8 @@ const computeMoney = (label) => {
   }
   return amount;
 };
-const toDx = (n) => {
-  //阿拉伯数字转换函数
-  switch (n) {
-    case "0":
-      return "零";
-    case "1":
-      return "壹";
-    case "2":
-      return "贰";
-    case "3":
-      return "叁";
-    case "4":
-      return "肆";
-    case "5":
-      return "伍";
-    case "6":
-      return "陆";
-    case "7":
-      return "柒";
-    case "8":
-      return "捌";
-    case "9":
-      return "玖";
-  }
-};
-const NumberToChinese = (m) => {
-  let unit = ["仟", "佰", "拾", "", "仟", "佰", "拾", "", "角", "分", "厘"];
-  m *= 1000;
-  m = Number(parseFloat(m).toFixed(0));
-  m += "";
-  var x = m.length;
-  var result = "";
-  for (var i = 0; i < x; i++) {
-    if (i == 3) {
-      result = "元" + result;
-    } else if (i == 7) {
-      result = "万" + result;
-    }
-    if (m.charAt(x - i - 1) == 0) {
-      if (i != 0 && i != 1 && i != 2) {
-        if (result.charAt(0) != "零" && result.charAt(0) != "元" && result.charAt(0) != "万") {
-          result = "零" + result;
-        }
-      }
-      continue;
-    }
-    result = toDx(m.charAt(x - i - 1)) + unit[unit.length - i - 1] + result;
-  }
-  result += result.charAt(result.length - 1) == "元" ? "整" : "";
-  return result;
-};
+
+
 const computeBalance = () => {
   let balance = 0;
   let advanceAmount = computeMoney("advanceAmount");

+ 48 - 83
src/utils/util.js

@@ -381,92 +381,57 @@ export function compareTime(date1, date2) {
     return false; //第二个大
   }
 }
+export function toDx(n) {
+  //阿拉伯数字转换函数
+  switch (n) {
+    case "0":
+      return "零";
+    case "1":
+      return "壹";
+    case "2":
+      return "贰";
+    case "3":
+      return "叁";
+    case "4":
+      return "肆";
+    case "5":
+      return "伍";
+    case "6":
+      return "陆";
+    case "7":
+      return "柒";
+    case "8":
+      return "捌";
+    case "9":
+      return "玖";
+  }
+};
+
 
 // 金额转大写
-export function numberChinese(money) {
-  // 汉字的数字
-  let cnNums = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖']
-  // 基本单位
-  let cnIntRadice = ['', '拾', '佰', '仟']
-  // 对应整数部分扩展单位
-  let cnIntUnits = ['', '万', '亿', '兆']
-  // 对应小数部分单位
-  let cnDecUnits = ['角', '分', '厘', '毫']
-  // 整数金额时后面跟的字符
-  let cnInteger = '整'
-  // 整型完以后的单位
-  let cnIntLast = '元'
-  // 最大处理的数字
-  let maxNum = 999999999999999.9999
-  // 金额整数部分
-  let integerNum
-  // 金额小数部分
-  let decimalNum
-  // 输出的中文金额字符串
-  let chineseStr = ''
-  // 分离金额后用的数组,预定义
-  let parts
-  if (money === '') {
-    return ''
-  }
-  money = parseFloat(money)
-  if (money >= maxNum) {
-    // 超出最大处理数字
-    return ''
-  }
-  if (money === 0) {
-    chineseStr = cnNums[0] + cnIntLast + cnInteger
-    return chineseStr
-  }
-  // 转换为字符串
-  money = money.toString()
-  if (money.indexOf('.') === -1) {
-    integerNum = money
-    decimalNum = ''
-  } else {
-    parts = money.split('.')
-    integerNum = parts[0]
-    decimalNum = parts[1].substr(0, 4)
-  }
-  // 获取整型部分转换
-  if (parseInt(integerNum, 10) > 0) {
-    let zeroCount = 0
-    let IntLen = integerNum.length
-    for (let i = 0; i < IntLen; i++) {
-      let n = integerNum.substr(i, 1)
-      let p = IntLen - i - 1
-      let q = p / 4
-      let m = p % 4
-      if (n === '0') {
-        zeroCount++
-      } else {
-        if (zeroCount > 0) {
-          chineseStr += cnNums[0]
-        }
-        // 归零
-        zeroCount = 0
-        chineseStr += cnNums[parseInt(n)] + cnIntRadice[m]
-      }
-      if (m === 0 && zeroCount < 4) {
-        chineseStr += cnIntUnits[q]
-      }
+export function NumberToChinese(m) {
+  let unit = ["仟", "佰", "拾", "", "仟", "佰", "拾", "", "角", "分", "厘"];
+  m *= 1000;
+  m = Number(parseFloat(m).toFixed(0));
+  m += "";
+  var x = m.length;
+  var result = "";
+  for (var i = 0; i < x; i++) {
+    if (i == 3) {
+      result = "元" + result;
+    } else if (i == 7) {
+      result = "万" + result;
     }
-    chineseStr += cnIntLast
-  }
-  // 小数部分
-  if (decimalNum !== '') {
-    let decLen = decimalNum.length
-    for (let i = 0; i < decLen; i++) {
-      const n = decimalNum.substr(i, 1)
-      if (n !== '0') {
-        chineseStr += cnNums[Number(n)] + cnDecUnits[i]
+    if (m.charAt(x - i - 1) == 0) {
+      if (i != 0 && i != 1 && i != 2) {
+        if (result.charAt(0) != "零" && result.charAt(0) != "元" && result.charAt(0) != "万") {
+          result = "零" + result;
+        }
       }
+      continue;
     }
+    result = toDx(m.charAt(x - i - 1)) + unit[unit.length - i - 1] + result;
   }
-  if (chineseStr === '') {
-    chineseStr += cnNums[0] + cnIntLast + cnInteger
-  } else if (decimalNum === '') {
-    chineseStr += cnInteger
-  }
-  return chineseStr
-}
+  result += result.charAt(result.length - 1) == "元" ? "整" : "";
+  return result;
+};

+ 4 - 51
src/views/finance/fundManage/funds/index.vue

@@ -303,6 +303,8 @@ import useUserStore from "@/store/modules/user";
 import { ref } from "vue";
 import moment from "moment";
 import byForm from "@/components/byForm/index";
+import { NumberToChinese } from "@/utils/util.js";
+
 
 const loading = ref(false);
 const sourceList = ref({
@@ -648,57 +650,8 @@ const computeMoney = (label) => {
   }
   return amount;
 };
-const toDx = (n) => {
-  //阿拉伯数字转换函数
-  switch (n) {
-    case "0":
-      return "零";
-    case "1":
-      return "壹";
-    case "2":
-      return "贰";
-    case "3":
-      return "叁";
-    case "4":
-      return "肆";
-    case "5":
-      return "伍";
-    case "6":
-      return "陆";
-    case "7":
-      return "柒";
-    case "8":
-      return "捌";
-    case "9":
-      return "玖";
-  }
-};
-const NumberToChinese = (m) => {
-  let unit = ["仟", "佰", "拾", "", "仟", "佰", "拾", "", "角", "分", "厘"];
-  m *= 1000;
-  m = Number(parseFloat(m).toFixed(0));
-  m += "";
-  var x = m.length;
-  var result = "";
-  for (var i = 0; i < x; i++) {
-    if (i == 3) {
-      result = "元" + result;
-    } else if (i == 7) {
-      result = "万" + result;
-    }
-    if (m.charAt(x - i - 1) == 0) {
-      if (i != 0 && i != 1 && i != 2) {
-        if (result.charAt(0) != "零" && result.charAt(0) != "元" && result.charAt(0) != "万") {
-          result = "零" + result;
-        }
-      }
-      continue;
-    }
-    result = toDx(m.charAt(x - i - 1)) + unit[unit.length - i - 1] + result;
-  }
-  result += result.charAt(result.length - 1) == "元" ? "整" : "";
-  return result;
-};
+
+
 const computeBalance = () => {
   let balance = 0;
   let advanceAmount = computeMoney("advanceAmount");

+ 1 - 1
src/views/process/processApproval/index.vue

@@ -205,7 +205,7 @@ const handleSubmit = async (_type) => {
       flowFormDom.value.validate((valid) => {
         btnLoading.value  = true
         if (valid) {
-          const data = makeDom.value.getFormData();
+          const data = {...makeDom.value.getFormData()};
           if (flowForm.flowKey == "subscribe_flow") {
             // data.subscribeDetailList = data.subscribeDetailList.map((x) => ({
             //   bussinessId: x.bussinessId,

+ 19 - 4
src/views/purchaseManage/purchaseManage/alreadyPurchase/index.vue

@@ -194,12 +194,21 @@
               </td>
             </tr>
             <tr>
+              <td colspan="4" style="text-align: right">其他收费项目:</td>
+              <td></td>
+              <td></td>
+              <td>
+                <span v-if="pdfData.currency">{{ pdfData.currency }}</span
+                >{{ pdfData.otherMoney }}
+              </td>
+            </tr>
+            <tr>
               <td colspan="4" style="text-align: right">合计:</td>
               <td>{{ pdfData.countTotal }}</td>
               <td></td>
               <td>
                 <span v-if="pdfData.currency">{{ pdfData.currency }}</span
-                >{{ pdfData.productMoney }}
+                >{{ pdfData.amount }}
               </td>
             </tr>
             <tr>
@@ -321,7 +330,7 @@
 import { ElMessage, ElMessageBox } from "element-plus";
 import byTable from "@/components/byTable/index";
 import byForm from "@/components/byForm/index";
-import { numberChinese } from "@/utils/util.js";
+import { NumberToChinese } from "@/utils/util.js";
 
 const loading = ref(false);
 const submitLoading = ref(false);
@@ -426,6 +435,7 @@ const config = computed(() => {
       attrs: {
         label: "采购金额",
         prop: "amount",
+        width: 120,
       },
       render(amount) {
         return proxy.moneyFormat(amount, 2);
@@ -441,12 +451,14 @@ const config = computed(() => {
       attrs: {
         label: "采购时间",
         prop: "createTime",
+        width: 155,
       },
     },
     {
       attrs: {
         label: "采购状态",
         prop: "purchaseStatus",
+        width: 80,
       },
       render(status) {
         return proxy.dictValueLabel(status, statusData.value);
@@ -457,6 +469,7 @@ const config = computed(() => {
       attrs: {
         label: "到货状态",
         prop: "arrivalStatus",
+        width: 80,
       },
       render(status) {
         return proxy.dictValueLabel(status, arrivalStatus.value);
@@ -466,6 +479,7 @@ const config = computed(() => {
       attrs: {
         label: "付款状态",
         prop: "payStatus",
+        width: 80,
       },
       render(status) {
         return proxy.dictValueLabel(status, paymentStatus.value);
@@ -474,7 +488,7 @@ const config = computed(() => {
     {
       attrs: {
         label: "操作",
-        width: "200",
+        width: "250",
         align: "center",
         fixed: "right",
       },
@@ -754,7 +768,8 @@ const handlePrintPdf = (row) => {
         }
         res.countTotal = countTotal;
         res.productMoney = productMoney;
-        res.moneyChinese = numberChinese(res.productMoney);
+        res.otherMoney = res.amount - res.productMoney;
+        res.moneyChinese = NumberToChinese(res.amount);
         res.supplyAddress = {
           countryName: supplyData.countryName,
           provinceName: supplyData.provinceName,

+ 3 - 51
src/views/purchaseManage/purchasePayment/payment/index.vue

@@ -156,6 +156,7 @@ import { computed, ref } from "vue";
 import byTable from "@/components/byTable/index";
 import useUserStore from "@/store/modules/user";
 import moment from "moment";
+import { NumberToChinese } from "@/utils/util.js";
 
 const { proxy } = getCurrentInstance();
 const payStatus = ref([]);
@@ -462,57 +463,8 @@ const computeMoney = () => {
   }
   return money;
 };
-const toDx = (n) => {
-  //阿拉伯数字转换函数
-  switch (n) {
-    case "0":
-      return "零";
-    case "1":
-      return "壹";
-    case "2":
-      return "贰";
-    case "3":
-      return "叁";
-    case "4":
-      return "肆";
-    case "5":
-      return "伍";
-    case "6":
-      return "陆";
-    case "7":
-      return "柒";
-    case "8":
-      return "捌";
-    case "9":
-      return "玖";
-  }
-};
-const NumberToChinese = (m) => {
-  let unit = ["仟", "佰", "拾", "", "仟", "佰", "拾", "", "角", "分", "厘"];
-  m *= 1000;
-  m = Number(parseFloat(m).toFixed(0));
-  m += "";
-  var x = m.length;
-  var result = "";
-  for (var i = 0; i < x; i++) {
-    if (i == 3) {
-      result = "元" + result;
-    } else if (i == 7) {
-      result = "万" + result;
-    }
-    if (m.charAt(x - i - 1) == 0) {
-      if (i != 0 && i != 1 && i != 2) {
-        if (result.charAt(0) != "零" && result.charAt(0) != "元" && result.charAt(0) != "万") {
-          result = "零" + result;
-        }
-      }
-      continue;
-    }
-    result = toDx(m.charAt(x - i - 1)) + unit[unit.length - i - 1] + result;
-  }
-  result += result.charAt(result.length - 1) == "元" ? "整" : "";
-  return result;
-};
+
+
 </script>
 
 <style lang="scss" scoped>

+ 308 - 84
src/views/salesMange/saleContract/contract/index.vue

@@ -14,10 +14,15 @@
             action: () => newContract(),
           },
         ]"
-        @get-list="getList">
+        @get-list="getList"
+      >
         <template #code="{ item }">
           <div style="width: 100%">
-            <a style="color: #409eff; cursor: pointer; word-break: break-all" @click="pushProcessApproval(item)">{{ item.code }}</a>
+            <a
+              style="color: #409eff; cursor: pointer; word-break: break-all"
+              @click="pushProcessApproval(item)"
+              >{{ item.code }}</a
+            >
           </div>
         </template>
         <template #amount="{ item }">
@@ -42,7 +47,16 @@
             <span v-if="item.refundStatus && item.refundStatus !== 0">
               {{ dictValueLabel(item.refundStatus, refundStatusNew) }}
             </span>
-            <span v-else>{{ dictValueLabel(item.refundStatusNew, refundStatusNew) }}</span>
+            <span v-else>{{
+              dictValueLabel(item.refundStatusNew, refundStatusNew)
+            }}</span>
+          </div>
+        </template>
+        <template #status="{ item }">
+          <div>
+            <span :style="getStyle(item.status)">{{
+              dictValueLabel(item.status, status)
+            }}</span>
           </div>
         </template>
       </byTable>
@@ -50,14 +64,30 @@
 
     <el-dialog title="打印" v-if="openPrint" v-model="openPrint" width="860">
       <div id="printMe">
-        <div id="pdfDom" style="width: 800px; padding: 16px; font-size: 12px !important">
+        <div
+          id="pdfDom"
+          style="width: 800px; padding: 16px; font-size: 12px !important"
+        >
           <div style="font-size: 18px; text-align: center">
             {{ printDetails.sellCorporationNameEn }}
           </div>
           <div style="text-align: center">
-            {{ printDetails.sellCountryName }},{{ printDetails.sellProvinceName }},{{ printDetails.sellCityName }},{{ printDetails.sellDetailedAddress }}
+            {{ printDetails.sellCountryName }},{{
+              printDetails.sellProvinceName
+            }},{{ printDetails.sellCityName }},{{
+              printDetails.sellDetailedAddress
+            }}
+          </div>
+          <div
+            style="
+              font-size: 14px;
+              color: #409eff;
+              text-align: center;
+              padding-top: 16px;
+            "
+          >
+            PROFORMA INVOICE
           </div>
-          <div style="font-size: 14px; color: #409eff; text-align: center; padding-top: 16px">PROFORMA INVOICE</div>
           <div style="padding-top: 8px">
             <div>PI NO. : {{ printDetails.contractCode }}</div>
             <div>PI DATE: {{ printDetails.createTimeEn }}</div>
@@ -67,7 +97,11 @@
               <div style="color: #409eff">VENDOR:</div>
               <div>{{ printDetails.sellCorporationNameEn }}</div>
               <div style="padding: 16px 0">
-                {{ printDetails.sellCountryName }},{{ printDetails.sellProvinceName }},{{ printDetails.sellCityName }},{{ printDetails.sellDetailedAddress }}
+                {{ printDetails.sellCountryName }},{{
+                  printDetails.sellProvinceName
+                }},{{ printDetails.sellCityName }},{{
+                  printDetails.sellDetailedAddress
+                }}
               </div>
               <div>CONTACT: {{ printDetails.sellContactName }}</div>
               <div>TEL.: {{ printDetails.sellContactNumber }}</div>
@@ -76,7 +110,11 @@
               <div style="color: #409eff">BUYER:</div>
               <div>{{ printDetails.buyCorporationName }}</div>
               <div style="padding: 16px 0">
-                {{ printDetails.buyDetailedAddress }},{{ printDetails.buyCityName }},{{ printDetails.buyProvinceName }},{{ printDetails.buyCountryName }}
+                {{ printDetails.buyDetailedAddress }},{{
+                  printDetails.buyCityName
+                }},{{ printDetails.buyProvinceName }},{{
+                  printDetails.buyCountryName
+                }}
               </div>
               <div>CONTACT: {{ printDetails.buyContactName }}</div>
               <div>TEL.: {{ printDetails.buyContactNumber }}</div>
@@ -85,11 +123,23 @@
           <div style="height: 16px"></div>
           <div style="border: 1px solid black">
             <div style="display: flex; width: 100%">
-              <div style="width: 33%; border-bottom: 1px solid black; border-right: 1px solid black">
+              <div
+                style="
+                  width: 33%;
+                  border-bottom: 1px solid black;
+                  border-right: 1px solid black;
+                "
+              >
                 <div style="color: #409eff">COUNTRY OF ORIGIN:</div>
                 <div>{{ printDetails.sellCountryName }}</div>
               </div>
-              <div style="width: 34%; border-bottom: 1px solid black; border-right: 1px solid black">
+              <div
+                style="
+                  width: 34%;
+                  border-bottom: 1px solid black;
+                  border-right: 1px solid black;
+                "
+              >
                 <div style="color: #409eff">COUNTRY OF DESTINATION:</div>
                 <div>{{ printDetails.buyCountryName }}</div>
               </div>
@@ -99,13 +149,25 @@
               </div>
             </div>
             <div style="display: flex; width: 100%">
-              <div style="width: 33%; border-bottom: 1px solid black; border-right: 1px solid black">
+              <div
+                style="
+                  width: 33%;
+                  border-bottom: 1px solid black;
+                  border-right: 1px solid black;
+                "
+              >
                 <div style="color: #409eff">TERMS OF DELIVERY:</div>
                 <div>
                   {{ dictValueLabel(printDetails.tradeMethods, tradeMethods) }}
                 </div>
               </div>
-              <div style="width: 34%; border-bottom: 1px solid black; border-right: 1px solid black">
+              <div
+                style="
+                  width: 34%;
+                  border-bottom: 1px solid black;
+                  border-right: 1px solid black;
+                "
+              >
                 <div style="color: #409eff">CURRENCY:</div>
                 <div>
                   {{ printDetails.currency }}
@@ -114,7 +176,9 @@
               <div style="width: 33%; border-bottom: 1px solid black">
                 <div style="color: #409eff">EXPORT BY/VIA:</div>
                 <div>
-                  {{ dictValueLabel(printDetails.transportMethod, shippingMethod) }}
+                  {{
+                    dictValueLabel(printDetails.transportMethod, shippingMethod)
+                  }}
                 </div>
               </div>
             </div>
@@ -131,19 +195,47 @@
           </div>
           <div style="height: 16px"></div>
           <div class="baseRow" style="display: flex; color: #409eff">
-            <div class="contentRow" style="width: 50px; text-align: center">NO.</div>
-            <div class="contentRow" style="width: calc(100% - 450px); text-align: center">COMMODITY, SPECIFICATION</div>
-            <div class="contentRow" style="width: 100px; text-align: center">UNIT</div>
-            <div class="contentRow" style="width: 100px; text-align: center">QUANTITY</div>
-            <div class="contentRow" style="width: 100px; text-align: center">UNIT PRICE</div>
-            <div class="contentRow" style="width: 100px; text-align: center">TOTAL PRICE</div>
+            <div class="contentRow" style="width: 50px; text-align: center">
+              NO.
+            </div>
+            <div
+              class="contentRow"
+              style="width: calc(100% - 450px); text-align: center"
+            >
+              COMMODITY, SPECIFICATION
+            </div>
+            <div class="contentRow" style="width: 100px; text-align: center">
+              UNIT
+            </div>
+            <div class="contentRow" style="width: 100px; text-align: center">
+              QUANTITY
+            </div>
+            <div class="contentRow" style="width: 100px; text-align: center">
+              UNIT PRICE
+            </div>
+            <div class="contentRow" style="width: 100px; text-align: center">
+              TOTAL PRICE
+            </div>
           </div>
-          <div v-if="printDetails.productInfoList && printDetails.productInfoList.length > 0">
-            <div class="baseRow" style="display: flex" v-for="(item, index) in printDetails.productInfoList" :key="item.productId">
+          <div
+            v-if="
+              printDetails.productInfoList &&
+              printDetails.productInfoList.length > 0
+            "
+          >
+            <div
+              class="baseRow"
+              style="display: flex"
+              v-for="(item, index) in printDetails.productInfoList"
+              :key="item.productId"
+            >
               <div class="contentRow" style="width: 50px; text-align: center">
                 {{ index + 1 }}
               </div>
-              <div class="contentRow" style="width: calc(100% - 450px); text-align: center">
+              <div
+                class="contentRow"
+                style="width: calc(100% - 450px); text-align: center"
+              >
                 {{ item.productName }}
               </div>
               <div class="contentRow" style="width: 100px; text-align: center">
@@ -161,12 +253,23 @@
             </div>
           </div>
           <div class="baseRow" style="display: flex; color: #409eff">
-            <div class="contentRow" style="width: calc(100% - 400px); text-align: center">SUBTOTAL:</div>
-            <div class="contentRow" style="width: 100px; text-align: center"></div>
+            <div
+              class="contentRow"
+              style="width: calc(100% - 400px); text-align: center"
+            >
+              SUBTOTAL:
+            </div>
+            <div
+              class="contentRow"
+              style="width: 100px; text-align: center"
+            ></div>
             <div class="contentRow" style="width: 100px; text-align: center">
               {{ statistics("productQuantity", 0) }}
             </div>
-            <div class="contentRow" style="width: 100px; text-align: center"></div>
+            <div
+              class="contentRow"
+              style="width: 100px; text-align: center"
+            ></div>
             <div class="contentRow" style="width: 100px; text-align: center">
               {{ statistics("amount", 2) }}
             </div>
@@ -178,42 +281,116 @@
             </div>
           </div> -->
           <div class="baseRow" style="display: flex">
-            <div class="contentRow" style="width: calc(100% - 100px); text-align: right; color: #409eff">FREIGHT COST:</div>
+            <div
+              class="contentRow"
+              style="
+                width: calc(100% - 100px);
+                text-align: right;
+                color: #409eff;
+              "
+            >
+              FREIGHT COST:
+            </div>
             <div class="contentRow" style="width: 100px; text-align: center">
               {{ statisticsTwo("amount", 2) }}
             </div>
           </div>
           <div class="baseRow" style="display: flex">
-            <div class="contentRow" style="width: calc(100% - 100px); text-align: right; color: #409eff">TOTAL PRICE:</div>
+            <div
+              class="contentRow"
+              style="
+                width: calc(100% - 100px);
+                text-align: right;
+                color: #409eff;
+              "
+            >
+              TOTAL PRICE:
+            </div>
             <div class="contentRow" style="width: 100px; text-align: center">
               {{ printDetails.totalAmount }}
             </div>
           </div>
-          <div class="baseRow" style="display: flex; border-bottom: 1px solid black">
+          <div
+            class="baseRow"
+            style="display: flex; border-bottom: 1px solid black"
+          >
             <div class="contentRow" style="width: 100%">
-              {{ translateIntoEnglish(printDetails.totalAmount, printDetails.currency) }}
+              {{
+                translateIntoEnglish(
+                  printDetails.totalAmount,
+                  printDetails.currency
+                )
+              }}
             </div>
           </div>
           <div style="height: 16px"></div>
           <div class="baseRow" style="color: #409eff">
-            <div class="contentRow" style="width: 100%">ACCOUNT INFORMATION:</div>
+            <div class="contentRow" style="width: 100%">
+              ACCOUNT INFORMATION:
+            </div>
           </div>
           <div class="baseRow" style="border-bottom: 1px solid black">
             <div class="contentRow" style="width: 100%">
-              <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">
+              <div
+                style="
+                  line-height: 24px;
+                  padding-left: 4px;
+                  word-break: break-all;
+                  word-wrap: break-word;
+                "
+              >
                 Beneficiary Name: {{ printDetails.beneficiaryName }}
               </div>
-              <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">
+              <div
+                style="
+                  line-height: 24px;
+                  padding-left: 4px;
+                  word-break: break-all;
+                  word-wrap: break-word;
+                "
+              >
                 Beneficiary Bank: {{ printDetails.beneficiaryBank }}
               </div>
-              <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">
-                Beneficiary Bank Address: {{ printDetails.beneficiaryBankAddress }}
+              <div
+                style="
+                  line-height: 24px;
+                  padding-left: 4px;
+                  word-break: break-all;
+                  word-wrap: break-word;
+                "
+              >
+                Beneficiary Bank Address:
+                {{ printDetails.beneficiaryBankAddress }}
+              </div>
+              <div
+                style="
+                  line-height: 24px;
+                  padding-left: 4px;
+                  word-break: break-all;
+                  word-wrap: break-word;
+                "
+              >
+                Beneficiary Account Number:
+                {{ printDetails.beneficiaryAccountNumber }}
               </div>
-              <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">
-                Beneficiary Account Number: {{ printDetails.beneficiaryAccountNumber }}
+              <div
+                style="
+                  line-height: 24px;
+                  padding-left: 4px;
+                  word-break: break-all;
+                  word-wrap: break-word;
+                "
+              >
+                Swift Code: {{ printDetails.swiftCode }}
               </div>
-              <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">Swift Code: {{ printDetails.swiftCode }}</div>
-              <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">
+              <div
+                style="
+                  line-height: 24px;
+                  padding-left: 4px;
+                  word-break: break-all;
+                  word-wrap: break-word;
+                "
+              >
                 Beneficiary Address: {{ printDetails.beneficiaryAddress }}
               </div>
             </div>
@@ -234,7 +411,9 @@
       <template #footer>
         <el-button @click="openPrint = false" size="large">取消</el-button>
         <el-button v-print="printObj" size="large">打印</el-button>
-        <el-button type="primary" @click="clickDownload()" size="large">下载PDF</el-button>
+        <el-button type="primary" @click="clickDownload()" size="large"
+          >下载PDF</el-button
+        >
       </template>
     </el-dialog>
   </div>
@@ -412,10 +591,11 @@ const config = computed(() => {
         label: "审批状态",
         prop: "status",
         width: 120,
+        slot: "status",
       },
-      render(type) {
-        return proxy.dictValueLabel(type, status.value);
-      },
+      // render(type) {
+      //   return proxy.dictValueLabel(type, status.value);
+      // },
     },
     {
       attrs: {
@@ -478,11 +658,15 @@ const config = computed(() => {
             },
             el: "button",
             click() {
-              ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
-                confirmButtonText: "确定",
-                cancelButtonText: "取消",
-                type: "warning",
-              }).then(() => {
+              ElMessageBox.confirm(
+                "此操作将永久删除该数据, 是否继续?",
+                "提示",
+                {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning",
+                }
+              ).then(() => {
                 proxy
                   .post("/contract/edit", {
                     id: row.id,
@@ -504,38 +688,46 @@ const config = computed(() => {
   ];
 });
 const getDict = () => {
-  proxy.getDictOne(["contract_type", "account_currency", "trade_mode", "shipping_method", "unit"]).then((res) => {
-    if (res.contract_type && res.contract_type.length > 0) {
-      contractType.value = res.contract_type.map((x) => ({
-        label: x.dictValue,
-        value: x.dictKey,
-      }));
-    }
-    if (res.account_currency && res.account_currency.length > 0) {
-      accountCurrency.value = res.account_currency.map((x) => ({
-        label: x.dictValue,
-        value: x.dictKey,
-      }));
-    }
-    if (res.trade_mode && res.trade_mode.length > 0) {
-      tradeMethods.value = res.trade_mode.map((x) => ({
-        label: x.dictValue,
-        value: x.dictKey,
-      }));
-    }
-    if (res.shipping_method && res.shipping_method.length > 0) {
-      shippingMethod.value = res.shipping_method.map((x) => ({
-        label: x.dictValue,
-        value: x.dictKey,
-      }));
-    }
-    if (res.unit && res.unit.length > 0) {
-      productUnit.value = res.unit.map((x) => ({
-        label: x.dictValue,
-        value: x.dictKey,
-      }));
-    }
-  });
+  proxy
+    .getDictOne([
+      "contract_type",
+      "account_currency",
+      "trade_mode",
+      "shipping_method",
+      "unit",
+    ])
+    .then((res) => {
+      if (res.contract_type && res.contract_type.length > 0) {
+        contractType.value = res.contract_type.map((x) => ({
+          label: x.dictValue,
+          value: x.dictKey,
+        }));
+      }
+      if (res.account_currency && res.account_currency.length > 0) {
+        accountCurrency.value = res.account_currency.map((x) => ({
+          label: x.dictValue,
+          value: x.dictKey,
+        }));
+      }
+      if (res.trade_mode && res.trade_mode.length > 0) {
+        tradeMethods.value = res.trade_mode.map((x) => ({
+          label: x.dictValue,
+          value: x.dictKey,
+        }));
+      }
+      if (res.shipping_method && res.shipping_method.length > 0) {
+        shippingMethod.value = res.shipping_method.map((x) => ({
+          label: x.dictValue,
+          value: x.dictKey,
+        }));
+      }
+      if (res.unit && res.unit.length > 0) {
+        productUnit.value = res.unit.map((x) => ({
+          label: x.dictValue,
+          value: x.dictKey,
+        }));
+      }
+    });
   proxy.post("/corporation/page", { pageNum: 1, pageSize: 999 }).then((res) => {
     corporationList.value = res.rows.map((item) => {
       return {
@@ -609,7 +801,10 @@ const clickDownload = () => {
 };
 const statistics = (label, index) => {
   let num = 0;
-  if (printDetails.value.productInfoList && printDetails.value.productInfoList.length > 0) {
+  if (
+    printDetails.value.productInfoList &&
+    printDetails.value.productInfoList.length > 0
+  ) {
     printDetails.value.productInfoList.map((item) => {
       if (item[label]) {
         num = parseFloat(Number(num) + Number(item[label])).toFixed(index);
@@ -620,7 +815,10 @@ const statistics = (label, index) => {
 };
 const statisticsTwo = (label, index) => {
   let num = 0;
-  if (printDetails.value.contractProjectList && printDetails.value.contractProjectList.length > 0) {
+  if (
+    printDetails.value.contractProjectList &&
+    printDetails.value.contractProjectList.length > 0
+  ) {
     printDetails.value.contractProjectList.map((item) => {
       if (item[label]) {
         num = parseFloat(Number(num) + Number(item[label])).toFixed(index);
@@ -631,8 +829,15 @@ const statisticsTwo = (label, index) => {
 };
 const computeScale = (item) => {
   let text = 0;
-  if (item.sumClaimMoney && Number(item.sumClaimMoney) > 0 && item.amount && Number(item.amount) > 0) {
-    text = parseFloat((Number(item.sumClaimMoney) / Number(item.amount)) * 100).toFixed(2);
+  if (
+    item.sumClaimMoney &&
+    Number(item.sumClaimMoney) > 0 &&
+    item.amount &&
+    Number(item.amount) > 0
+  ) {
+    text = parseFloat(
+      (Number(item.sumClaimMoney) / Number(item.amount)) * 100
+    ).toFixed(2);
   }
   return text + "%";
 };
@@ -657,7 +862,8 @@ const pushProcessApproval = (row) => {
 const printObj = ref({
   id: "printMe",
   popTitle: "",
-  extraCss: "https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.compat.css, https://cdn.bootcdn.net/ajax/libs/hover.css/2.3.1/css/hover-min.css",
+  extraCss:
+    "https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.compat.css, https://cdn.bootcdn.net/ajax/libs/hover.css/2.3.1/css/hover-min.css",
   extraHead: '<meta http-equiv="Content-Language"content="zh-cn"/>',
 });
 const clickAlteration = (row) => {
@@ -671,6 +877,24 @@ const clickAlteration = (row) => {
     },
   });
 };
+
+const getStyle = (status) => {
+  if (status == 10) {
+    return {
+      color: "#FF9315",
+    };
+  } else if (status == 30) {
+    return {
+      color: "#39C55A",
+    };
+  } else if (status == 20 || status == 99) {
+    return {
+      color: "#FF655B",
+    };
+  } else {
+    return {};
+  }
+};
 </script>
 
 <style lang="scss" scoped>

+ 242 - 59
src/views/salesMange/saleContract/priceSheet/index.vue

@@ -14,10 +14,15 @@
             action: () => newPriceSheet(),
           },
         ]"
-        @get-list="getList">
+        @get-list="getList"
+      >
         <template #code="{ item }">
           <div style="width: 100%">
-            <a style="color: #409eff; cursor: pointer; word-break: break-all" @click="pushProcessApproval(item)">{{ item.code }}</a>
+            <a
+              style="color: #409eff; cursor: pointer; word-break: break-all"
+              @click="pushProcessApproval(item)"
+              >{{ item.code }}</a
+            >
           </div>
         </template>
         <template #amount="{ item }">
@@ -31,23 +36,53 @@
             <span>{{ item.advanceRatio }}%</span>
           </div>
         </template>
+        <template #status="{ item }">
+          <div>
+            <span :style="getStyle(item.status)">{{
+              dictValueLabel(item.status, status)
+            }}</span>
+          </div>
+        </template>
       </byTable>
     </div>
 
     <el-dialog title="打印" v-if="openPrint" v-model="openPrint" width="860">
       <div id="printMe">
-        <div id="pdfDom" style="width: 800px; padding: 16px; font-size: 12px !important">
+        <div
+          id="pdfDom"
+          style="width: 800px; padding: 16px; font-size: 12px !important"
+        >
           <div style="font-size: 18px; text-align: center">
-            {{ getLabel(printDetails.sellCorporationId, corporationList, "nameEn") }}
+            {{
+              getLabel(
+                printDetails.sellCorporationId,
+                corporationList,
+                "nameEn"
+              )
+            }}
           </div>
           <div style="text-align: center">
-            {{ printDetails.sellCountryName }},{{ printDetails.sellProvinceName }},{{ printDetails.sellCityName }},{{ printDetails.sellAddress }}
+            {{ printDetails.sellCountryName }},{{
+              printDetails.sellProvinceName
+            }},{{ printDetails.sellCityName }},{{ printDetails.sellAddress }}
+          </div>
+          <div
+            style="
+              font-size: 14px;
+              color: #409eff;
+              text-align: center;
+              padding-top: 16px;
+            "
+          >
+            QUOTATION
           </div>
-          <div style="font-size: 14px; color: #409eff; text-align: center; padding-top: 16px">QUOTATION</div>
           <div style="padding-top: 8px">
             <div>Reference NO. : {{ printDetails.code }}</div>
             <div style="display: flex">
-              <div style="width: 50%">DATE: {{ moment(printDetails.createTime).format("DD/MMM/yyyy") }}</div>
+              <div style="width: 50%">
+                DATE:
+                {{ moment(printDetails.createTime).format("DD/MMM/yyyy") }}
+              </div>
               <div style="width: 50%">Valid Date:</div>
             </div>
           </div>
@@ -55,32 +90,66 @@
             <div style="width: 50%; border-right: 1px solid black">
               <div style="color: #409eff">VENDOR:</div>
               <div>
-                {{ getLabel(printDetails.sellCorporationId, corporationList, "nameEn") }}
+                {{
+                  getLabel(
+                    printDetails.sellCorporationId,
+                    corporationList,
+                    "nameEn"
+                  )
+                }}
               </div>
               <div style="padding: 16px 0">
-                {{ printDetails.sellCountryName }},{{ printDetails.sellProvinceName }},{{ printDetails.sellCityName }},{{ printDetails.sellAddress }}
+                {{ printDetails.sellCountryName }},{{
+                  printDetails.sellProvinceName
+                }},{{ printDetails.sellCityName }},{{
+                  printDetails.sellAddress
+                }}
+              </div>
+              <div>
+                {{ printDetails.sellContactName }},{{
+                  printDetails.sellContactNumber
+                }}
               </div>
-              <div>{{ printDetails.sellContactName }},{{ printDetails.sellContactNumber }}</div>
             </div>
             <div style="width: 50%">
               <div style="color: #409eff">BUYER:</div>
               <div>
-                {{ getLabel(printDetails.buyCorporationId, customerList, "name") }}
+                {{
+                  getLabel(printDetails.buyCorporationId, customerList, "name")
+                }}
               </div>
               <div style="padding: 16px 0">
-                {{ printDetails.buyCountryName }},{{ printDetails.buyProvinceName }},{{ printDetails.buyCityName }},{{ printDetails.buyAddress }}
+                {{ printDetails.buyCountryName }},{{
+                  printDetails.buyProvinceName
+                }},{{ printDetails.buyCityName }},{{ printDetails.buyAddress }}
+              </div>
+              <div>
+                {{ printDetails.buyContactName }},{{
+                  printDetails.buyContactNumber
+                }}
               </div>
-              <div>{{ printDetails.buyContactName }},{{ printDetails.buyContactNumber }}</div>
             </div>
           </div>
           <div style="height: 16px"></div>
           <div style="border: 1px solid black">
             <div style="display: flex; width: 100%">
-              <div style="width: 33%; border-bottom: 1px solid black; border-right: 1px solid black">
+              <div
+                style="
+                  width: 33%;
+                  border-bottom: 1px solid black;
+                  border-right: 1px solid black;
+                "
+              >
                 <div style="color: #409eff">COUNTRY OF ORIGIN:</div>
                 <div>{{ printDetails.sellCountryName }}</div>
               </div>
-              <div style="width: 34%; border-bottom: 1px solid black; border-right: 1px solid black">
+              <div
+                style="
+                  width: 34%;
+                  border-bottom: 1px solid black;
+                  border-right: 1px solid black;
+                "
+              >
                 <div style="color: #409eff">COUNTRY OF DESTINATION:</div>
                 <div>{{ printDetails.buyCountryName }}</div>
               </div>
@@ -90,13 +159,25 @@
               </div>
             </div>
             <div style="display: flex; width: 100%">
-              <div style="width: 33%; border-bottom: 1px solid black; border-right: 1px solid black">
+              <div
+                style="
+                  width: 33%;
+                  border-bottom: 1px solid black;
+                  border-right: 1px solid black;
+                "
+              >
                 <div style="color: #409eff">TERMS OF DELIVERY:</div>
                 <div>
                   {{ dictValueLabel(printDetails.tradeMethods, tradeMethods) }}
                 </div>
               </div>
-              <div style="width: 34%; border-bottom: 1px solid black; border-right: 1px solid black">
+              <div
+                style="
+                  width: 34%;
+                  border-bottom: 1px solid black;
+                  border-right: 1px solid black;
+                "
+              >
                 <div style="color: #409eff">CURRENCY:</div>
                 <div>
                   {{ dictValueLabel(printDetails.currency, accountCurrency) }}
@@ -105,7 +186,9 @@
               <div style="width: 33%; border-bottom: 1px solid black">
                 <div style="color: #409eff">EXPORT BY/VIA:</div>
                 <div>
-                  {{ dictValueLabel(printDetails.transportMethod, shippingMethod) }}
+                  {{
+                    dictValueLabel(printDetails.transportMethod, shippingMethod)
+                  }}
                 </div>
               </div>
             </div>
@@ -121,19 +204,47 @@
           </div>
           <div style="height: 16px"></div>
           <div class="baseRow" style="display: flex; color: #409eff">
-            <div class="contentRow" style="width: 50px; text-align: center">NO.</div>
-            <div class="contentRow" style="width: calc(100% - 450px); text-align: center">COMMODITY, SPECIFICATION</div>
-            <div class="contentRow" style="width: 100px; text-align: center">UNIT</div>
-            <div class="contentRow" style="width: 100px; text-align: center">QUANTITY</div>
-            <div class="contentRow" style="width: 100px; text-align: center">UNIT PRICE</div>
-            <div class="contentRow" style="width: 100px; text-align: center">TOTAL PRICE</div>
+            <div class="contentRow" style="width: 50px; text-align: center">
+              NO.
+            </div>
+            <div
+              class="contentRow"
+              style="width: calc(100% - 450px); text-align: center"
+            >
+              COMMODITY, SPECIFICATION
+            </div>
+            <div class="contentRow" style="width: 100px; text-align: center">
+              UNIT
+            </div>
+            <div class="contentRow" style="width: 100px; text-align: center">
+              QUANTITY
+            </div>
+            <div class="contentRow" style="width: 100px; text-align: center">
+              UNIT PRICE
+            </div>
+            <div class="contentRow" style="width: 100px; text-align: center">
+              TOTAL PRICE
+            </div>
           </div>
-          <div v-if="printDetails.quotationProductList && printDetails.quotationProductList.length > 0">
-            <div class="baseRow" style="display: flex" v-for="(item, index) in printDetails.quotationProductList" :key="item.productId">
+          <div
+            v-if="
+              printDetails.quotationProductList &&
+              printDetails.quotationProductList.length > 0
+            "
+          >
+            <div
+              class="baseRow"
+              style="display: flex"
+              v-for="(item, index) in printDetails.quotationProductList"
+              :key="item.productId"
+            >
               <div class="contentRow" style="width: 50px; text-align: center">
                 {{ index + 1 }}
               </div>
-              <div class="contentRow" style="width: calc(100% - 450px); text-align: center">
+              <div
+                class="contentRow"
+                style="width: calc(100% - 450px); text-align: center"
+              >
                 {{ item.productName }}
               </div>
               <div class="contentRow" style="width: 100px; text-align: center">
@@ -151,33 +262,77 @@
             </div>
           </div>
           <div class="baseRow" style="display: flex; color: #409eff">
-            <div class="contentRow" style="width: calc(100% - 400px); text-align: center">SUBTOTAL:</div>
-            <div class="contentRow" style="width: 100px; text-align: center"></div>
+            <div
+              class="contentRow"
+              style="width: calc(100% - 400px); text-align: center"
+            >
+              SUBTOTAL:
+            </div>
+            <div
+              class="contentRow"
+              style="width: 100px; text-align: center"
+            ></div>
             <div class="contentRow" style="width: 100px; text-align: center">
               {{ statistics("quantity", 0) }}
             </div>
-            <div class="contentRow" style="width: 100px; text-align: center"></div>
+            <div
+              class="contentRow"
+              style="width: 100px; text-align: center"
+            ></div>
             <div class="contentRow" style="width: 100px; text-align: center">
               {{ statistics("amount", 2) }}
             </div>
           </div>
-          <div v-if="printDetails.quotationPayList && printDetails.quotationPayList.length > 0">
-            <div class="baseRow" style="display: flex" v-for="(item, index) in printDetails.quotationPayList" :key="index">
-              <div class="contentRow" style="width: calc(100% - 100px); text-align: right; color: #409eff">{{ item.payName }}:</div>
+          <div
+            v-if="
+              printDetails.quotationPayList &&
+              printDetails.quotationPayList.length > 0
+            "
+          >
+            <div
+              class="baseRow"
+              style="display: flex"
+              v-for="(item, index) in printDetails.quotationPayList"
+              :key="index"
+            >
+              <div
+                class="contentRow"
+                style="
+                  width: calc(100% - 100px);
+                  text-align: right;
+                  color: #409eff;
+                "
+              >
+                {{ item.payName }}:
+              </div>
               <div class="contentRow" style="width: 100px; text-align: center">
                 {{ item.amount }}
               </div>
             </div>
           </div>
           <div class="baseRow" style="display: flex">
-            <div class="contentRow" style="width: calc(100% - 100px); text-align: right; color: #409eff">TOTAL PRICE:</div>
+            <div
+              class="contentRow"
+              style="
+                width: calc(100% - 100px);
+                text-align: right;
+                color: #409eff;
+              "
+            >
+              TOTAL PRICE:
+            </div>
             <div class="contentRow" style="width: 100px; text-align: center">
               {{ getAllMoney(statistics("amount", 2)) }}
             </div>
           </div>
-          <div class="baseRow" style="display: flex; border-bottom: 1px solid black">
+          <div
+            class="baseRow"
+            style="display: flex; border-bottom: 1px solid black"
+          >
             <div class="contentRow" style="width: 100%">
-              {{ translateIntoEnglish(printDetails.amount, printDetails.currency) }}
+              {{
+                translateIntoEnglish(printDetails.amount, printDetails.currency)
+              }}
             </div>
           </div>
           <!-- <div style="height: 16px"></div>
@@ -209,13 +364,21 @@
             <div style="width: 50%">
               <div style="color: #409eff">CONFIRMED BY VENDOR:</div>
               <div>
-                {{ getLabel(printDetails.sellCorporationId, corporationList, "nameEn") }}
+                {{
+                  getLabel(
+                    printDetails.sellCorporationId,
+                    corporationList,
+                    "nameEn"
+                  )
+                }}
               </div>
             </div>
             <div style="width: 50%">
               <div style="color: #409eff">CONFIRMED BY BUYER:</div>
               <div>
-                {{ getLabel(printDetails.buyCorporationId, customerList, "name") }}
+                {{
+                  getLabel(printDetails.buyCorporationId, customerList, "name")
+                }}
               </div>
             </div>
           </div>
@@ -224,7 +387,9 @@
       <template #footer>
         <el-button @click="openPrint = false" size="large">取消</el-button>
         <el-button v-print="printObj" size="large">打印</el-button>
-        <el-button type="primary" @click="clickDownload()" size="large">下载PDF</el-button>
+        <el-button type="primary" @click="clickDownload()" size="large"
+          >下载PDF</el-button
+        >
       </template>
     </el-dialog>
   </div>
@@ -368,16 +533,7 @@ const config = computed(() => {
         label: "审批状态",
         prop: "status",
         width: 140,
-      },
-      render(type) {
-        let text = "";
-        if (status.value && status.value.length > 0) {
-          let data = status.value.filter((item) => item.value == type);
-          if (data && data.length > 0) {
-            text = data[0].label;
-          }
-        }
-        return text;
+        slot: "status",
       },
     },
     {
@@ -430,14 +586,16 @@ const config = computed(() => {
   ];
 });
 const getDict = () => {
-  proxy.post("/saleQuotation/page", { pageNum: 1, pageSize: 999 }).then((res) => {
-    accountList.value = res.rows.map((item) => {
-      return {
-        label: item.alias,
-        value: item.id,
-      };
+  proxy
+    .post("/saleQuotation/page", { pageNum: 1, pageSize: 999 })
+    .then((res) => {
+      accountList.value = res.rows.map((item) => {
+        return {
+          label: item.alias,
+          value: item.id,
+        };
+      });
     });
-  });
   proxy.post("/corporation/page", { pageNum: 1, pageSize: 999 }).then((res) => {
     corporationList.value = res.rows.map((item) => {
       return {
@@ -559,7 +717,10 @@ const clickDownload = () => {
 };
 const statistics = (label, index) => {
   let num = 0;
-  if (printDetails.value.quotationProductList && printDetails.value.quotationProductList.length > 0) {
+  if (
+    printDetails.value.quotationProductList &&
+    printDetails.value.quotationProductList.length > 0
+  ) {
     printDetails.value.quotationProductList.map((item) => {
       if (item[label]) {
         num = parseFloat(Number(num) + Number(item[label])).toFixed(index);
@@ -580,7 +741,10 @@ const getLabel = (key, list, label) => {
 };
 const getAllMoney = (num) => {
   let money = num;
-  if (printDetails.value.quotationPayList && printDetails.value.quotationPayList.length > 0) {
+  if (
+    printDetails.value.quotationPayList &&
+    printDetails.value.quotationPayList.length > 0
+  ) {
     printDetails.value.quotationPayList.map((item) => {
       if (item.amount) {
         money = parseFloat(Number(money) + Number(item.amount)).toFixed(2);
@@ -616,9 +780,28 @@ const pushProcessApproval = (row) => {
 const printObj = ref({
   id: "printMe",
   popTitle: "",
-  extraCss: "https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.compat.css, https://cdn.bootcdn.net/ajax/libs/hover.css/2.3.1/css/hover-min.css",
+  extraCss:
+    "https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.compat.css, https://cdn.bootcdn.net/ajax/libs/hover.css/2.3.1/css/hover-min.css",
   extraHead: '<meta http-equiv="Content-Language"content="zh-cn"/>',
 });
+
+const getStyle = (status) => {
+  if (status == 10) {
+    return {
+      color: "#FF9315",
+    };
+  } else if (status == 30) {
+    return {
+      color: "#39C55A",
+    };
+  } else if (status == 20 || status == 99) {
+    return {
+      color: "#FF655B",
+    };
+  } else {
+    return {};
+  }
+};
 </script>
 
 <style lang="scss" scoped>