فهرست منبع

销售合同页面功能优化

lxf 1 سال پیش
والد
کامیت
aad7ce84fd
1فایلهای تغییر یافته به همراه36 افزوده شده و 2 حذف شده
  1. 36 2
      src/views/salesMange/saleContract/contract/index.vue

+ 36 - 2
src/views/salesMange/saleContract/contract/index.vue

@@ -33,7 +33,25 @@
         </template>
         <template #sumClaimMoney="{ item }">
           <div>
-            <span>{{ moneyFormat(item.sumClaimMoney, 2) }}</span>
+            <el-popover placement="bottom" :width="400" trigger="hover" @show="recordShow(item)">
+              <template #reference>
+                <a style="color: #409eff; cursor: pointer; word-break: break-all">{{ moneyFormat(item.sumClaimMoney, 2) }}</a>
+              </template>
+              <template #default>
+                <div style="width: 100%; max-height: 60vh; overflow-y: auto; overflow-x: hidden" v-if="item.claimRecord && item.claimRecord.length > 0">
+                  <div v-for="(record, index) in item.claimRecord" :key="index" style="margin-bottom: 20px">
+                    <div style="display: flex; justify-content: space-between">
+                      <span style="color: #909399">{{ record.createTime }}</span>
+                      <span style="color: #909399">{{ dictValueLabel(record.createUser, userList) }}</span>
+                    </div>
+                    <div style="display: flex; justify-content: space-between; padding: 8px 0">
+                      <span>认领金额: {{ record.currency }} {{ record.money }}</span>
+                      <span>汇率: {{ item.rate }}</span>
+                    </div>
+                  </div>
+                </div>
+              </template>
+            </el-popover>
           </div>
         </template>
         <template #scale="{ item }">
@@ -202,12 +220,19 @@ const config = computed(() => {
       attrs: {
         label: "合同金额",
         slot: "amount",
-        width: 120,
+        width: 140,
         align: "right",
       },
     },
     {
       attrs: {
+        label: "合同汇率",
+        prop: "rate",
+        width: 100,
+      },
+    },
+    {
+      attrs: {
         label: "合同金额(CNY)",
         slot: "amountCNY",
         width: 120,
@@ -587,6 +612,15 @@ const handleClickName = (row) => {
     },
   });
 };
+const recordShow = (item) => {
+  if (!(item.claimRecord && item.claimRecord.length > 0)) {
+    proxy.post("/claimContract/getListByContractIds", [item.id]).then((res) => {
+      if (res && res.length > 0) {
+        item.claimRecord = res;
+      }
+    });
+  }
+};
 </script>
 
 <style lang="scss" scoped>