Răsfoiți Sursa

客户画像更新

cz 1 an în urmă
părinte
comite
1b148ef9ad

+ 10 - 0
src/components/process/EHSD/Contract.vue

@@ -2092,6 +2092,16 @@ const selectContract = (businessId) => {
             e.tradeMethods = obj.tradeMethods;
           }
         }
+        formData.data.contractWaitShipmentList =
+          formData.data.contractProductList.map((x) => ({
+            productCode: x.productCode,
+            productId: x.productId,
+            productName: x.productName,
+            quantity: 0,
+            waitQuantity: "",
+          }));
+        changeWaitQuantity();
+
         let ids = formData.data.contractProductList.map((x) => x.productId);
         proxy
           .post("/fileInfo/getList", {

+ 391 - 129
src/views/EHSD/saleContract/exportTracking/index.vue

@@ -1,6 +1,7 @@
 <template>
   <div class="tenant">
     <byTable
+      :tableHeight="tableHeight"
       :source="sourceList.data"
       :pagination="sourceList.pagination"
       :config="config"
@@ -20,83 +21,128 @@
 
       <template #customer="{ item }">
         <div style="width: 100%">
-          <span class="public-class">{{ item.code }}</span>
+          <span class="public-class">{{ item.buyCorporationName }}</span>
         </div>
       </template>
 
-      <template #remarks="{ item }">
+      <template #contractProduct="{ item }">
         <div style="width: 100%">
-          <el-button type="primary" text @click="handleClickLookRemarks(item)"
-            >查看</el-button
+          <div
+            v-for="(product, index) in item.contractProductList"
+            :key="index"
           >
+            {{ product.productName }}
+          </div>
         </div>
       </template>
 
-      <template #headerSlotOne="{ headerLabel }">
+      <template #tags="{ item }">
         <div style="width: 100%">
-          {{ headerLabel }} <span class="headerSlot">10</span>
+          <div
+            v-for="(product, index) in item.contractProductList"
+            :key="index"
+          >
+            {{ product.tradeMethods }}
+          </div>
         </div>
       </template>
 
-      <template #slotOne="{ item, headerLabel }">
+      <template #supplyName="{ item }">
         <div style="width: 100%">
-          <el-popover placement="bottom" title="" :width="250" trigger="click">
-            <div default>
-              <el-button
-                type="primary"
-                text
-                @click="handleClickAddRecord(item, item)"
-                >添加记录</el-button
+          <div v-if="item.purchaseList && item.purchaseList.length > 0">
+            <div v-for="(purchase, index) in item.purchaseList" :key="index">
+              <el-tooltip
+                class="box-item"
+                effect="dark"
+                :content="purchase.supplyName"
+                placement="top-start"
               >
-              <div>
-                <el-timeline>
-                  <el-timeline-item
-                    v-for="(activity, index) in recordsData"
-                    :key="index"
-                    :timestamp="activity.timestamp"
-                  >
-                    aa
-                  </el-timeline-item>
-                </el-timeline>
-              </div>
+                <div class="hidden-text">
+                  {{ purchase.supplyName }}
+                </div>
+              </el-tooltip>
             </div>
-            <template #reference>
-              <el-button
-                type="primary"
-                text
-                @click="handleClickLook(item, item, headerLabel)"
-                >查看</el-button
-              >
-            </template>
-          </el-popover>
+          </div>
         </div>
       </template>
 
-      <template #headerSlotTwo="{ headerLabel }">
+      <template #purchaseCode="{ item }">
         <div style="width: 100%">
-          {{ headerLabel }} <span class="headerSlot">10</span>
+          <div v-if="item.purchaseList && item.purchaseList.length > 0">
+            <div v-for="(purchase, index) in item.purchaseList" :key="index">
+              {{ purchase.code }}
+            </div>
+          </div>
         </div>
       </template>
-      <template #slotTwo="{ item, headerLabel }">
+
+      <template #purchaseCreateTime="{ item }">
         <div style="width: 100%">
-          <el-popover placement="bottom" title="" :width="250" trigger="click">
-            <div default>
-              <el-button
-                type="primary"
-                text
-                @click="handleClickAddRecord(item, item)"
-                >添加记录</el-button
-              >
+          <div v-if="item.purchaseList && item.purchaseList.length > 0">
+            <div v-for="(purchase, index) in item.purchaseList" :key="index">
+              {{ purchase.createTime }}
+            </div>
+          </div>
+        </div>
+      </template>
+
+      <template #purchaseDeliveryTime="{ item }">
+        <div style="width: 100%">
+          <div v-if="item.purchaseList && item.purchaseList.length > 0">
+            <div v-for="(purchase, index) in item.purchaseList" :key="index">
+              {{ purchase.deliveryTime }}
             </div>
-            <template #reference>
+          </div>
+        </div>
+      </template>
+
+      <template #remarks="{ item }">
+        <div style="width: 100%">
+          <el-button type="primary" text @click="handleClickLookRemarks(item)"
+            >查看</el-button
+          >
+        </div>
+      </template>
+
+      <template #receipt="{ item }">
+        <div style="width: 100%">
+          <el-button
+            type="primary"
+            text
+            @click="handleClickLookContractFile(item, true)"
+            >查看</el-button
+          >
+        </div>
+      </template>
+
+      <template #package="{ item }">
+        <div style="width: 100%">
+          <el-button
+            type="primary"
+            text
+            @click="handleClickLookContractFile(item, false)"
+            >查看</el-button
+          >
+        </div>
+      </template>
+
+      <!-- 动态插槽 -->
+      <template
+        v-for="(documentary, index) in contractDocumentary"
+        v-slot:[documentary.value]="{ item }"
+        :key="index"
+      >
+        <div style="width: 100%">
+          <div v-if="item.purchaseList && item.purchaseList.length > 0">
+            <div v-for="(purchase, index) in item.purchaseList" :key="index">
               <el-button
                 type="primary"
                 text
-                @click="handleClickLook(item, item, headerLabel)"
+                @click="handleClickLook(item, purchase, documentary)"
                 >查看</el-button
               >
-            </template>
-          </el-popover>
+            </div>
+          </div>
         </div>
       </template>
     </byTable>
@@ -111,12 +157,14 @@
         :formConfig="remarksFormConfig"
         :formOption="formOption"
         v-model="formData.remarksFormData"
+        :rules="remarksRules"
         ref="remarksForm"
+        v-loading="formLoading"
       >
         <template #file>
           <div style="width: 100%">
             <el-upload
-              v-model:fileList="formData.remarksFormData.fileList"
+              v-model:fileList="formData.remarksFormData.remarkFileList"
               action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
               :data="uploadData"
               multiple
@@ -136,18 +184,70 @@
         >
       </template>
     </el-dialog>
-    <!-- 添加记录弹窗 -->
+
+    <!-- 交接单、包装指示弹窗 -->
     <el-dialog
-      :title="`添加记录(${rowHeaderLabel})`"
+      :title="fileTitle"
+      v-if="openFiles"
+      v-model="openFiles"
+      width="600"
+    >
+      <byForm
+        :formConfig="filesFormConfig"
+        :formOption="formOption"
+        v-model="formData.filesFormData"
+      >
+        <template #file>
+          <div style="width: 100%">
+            <el-upload
+              v-model:fileList="formData.filesFormData.fileList"
+              action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
+              :data="uploadData"
+              multiple
+              :before-upload="uploadFile"
+              :on-success="handleSuccess"
+              :on-preview="onPreviewFile"
+            >
+              <!-- <el-button type="primary" plain disabled>选择</el-button> -->
+            </el-upload>
+          </div>
+        </template>
+      </byForm>
+      <template #footer>
+        <el-button @click="openFiles = false" size="large">关 闭</el-button>
+      </template>
+    </el-dialog>
+
+    <!-- 记录弹窗 -->
+    <el-dialog
+      :title="`(${selectNode.label})详情记录`"
       v-if="openRecords"
       v-model="openRecords"
       width="600"
     >
+      <el-button type="primary" @click="handleClickAddRecord()"
+        >添加记录</el-button
+      >
+
+      <template #footer>
+        <el-button @click="openRecords = false" size="large">关 闭</el-button>
+      </template>
+    </el-dialog>
+
+    <!-- 添加记录弹窗 -->
+    <el-dialog
+      :title="`添加记录(${selectNode.label})`"
+      v-if="openAddRecords"
+      v-model="openAddRecords"
+      width="600"
+    >
       <byForm
         :formConfig="recordsFormConfig"
         :formOption="formOption"
         v-model="formData.recordsFormData"
-        ref="remarksForm"
+        :rules="recordsRules"
+        ref="recordsForm"
+        v-loading="formLoading"
       >
         <template #file>
           <div style="width: 100%">
@@ -166,7 +266,9 @@
         </template>
       </byForm>
       <template #footer>
-        <el-button @click="openRecords = false" size="large">关 闭</el-button>
+        <el-button @click="openAddRecords = false" size="large"
+          >关 闭</el-button
+        >
         <el-button type="primary" @click="submitRecords()" size="large"
           >确 定</el-button
         >
@@ -180,8 +282,18 @@ import byTable from "@/components/byTable/index";
 import byForm from "@/components/byForm/index";
 import useUserStore from "@/store/modules/user";
 import { ElMessage, ElMessageBox } from "element-plus";
+const tableHeight = ref(0);
+const getTableHeight = () => {
+  tableHeight.value = window.innerHeight - 270;
+};
+getTableHeight();
+window.addEventListener("resize", () => {
+  getTableHeight();
+});
 const { proxy } = getCurrentInstance();
 const uploadData = ref({});
+const tradeMethods = ref([]);
+const contractDocumentary = ref([]);
 const status = ref([
   {
     label: "待采购",
@@ -211,8 +323,7 @@ const sourceList = ref({
     pageNum: 1,
     pageSize: 10,
     keyword: "",
-    status: "",
-    sellCorporationId: "",
+    orderStatus: "",
   },
 });
 const loading = ref(false);
@@ -265,8 +376,7 @@ const config = computed(() => {
     {
       attrs: {
         label: "产品",
-        slot: "buyCorporationName",
-
+        slot: "contractProduct",
         "min-width": 140,
       },
     },
@@ -274,13 +384,13 @@ const config = computed(() => {
       attrs: {
         label: "条款",
         slot: "tags",
-        width: 60,
+        width: 80,
       },
     },
     {
       attrs: {
         label: "定金",
-        slot: "advanceRatio",
+        prop: "earnest",
         width: 100,
       },
       render(money) {
@@ -290,109 +400,133 @@ const config = computed(() => {
     {
       attrs: {
         label: "定金到账时间",
-        prop: "aaa",
-        width: 140,
+        prop: "claimTime",
+        width: 155,
       },
     },
     {
       attrs: {
         label: "交接单",
-        slot: "aaa",
+        slot: "receipt",
         width: 90,
       },
     },
     {
       attrs: {
         label: "包装指示",
-        slot: "aaa",
+        slot: "package",
         width: 90,
       },
     },
     {
       attrs: {
         label: "订单号",
-        slot: "code",
-        width: 150,
+        slot: "purchaseCode",
+        "min-width": 180,
       },
     },
     {
       attrs: {
         label: "供应商",
-        prop: "code",
-        "min-width": 150,
+        slot: "supplyName",
+        width: 150,
       },
     },
     {
       attrs: {
         label: "下单时间",
-        slot: "code",
+        slot: "purchaseCreateTime",
         width: 160,
       },
     },
     {
       attrs: {
         label: "交期",
-        slot: "code",
-        width: 100,
-      },
-    },
-    {
-      attrs: {
-        label: "签样",
-        slot: "slotOne",
-        isNeedHeaderSlot: true,
-        headerSlot: "headerSlotOne",
-        width: 100,
-      },
-    },
-    {
-      attrs: {
-        label: "LOGO",
-        slot: "slotTwo",
-        isNeedHeaderSlot: true,
-        headerSlot: "headerSlotTwo",
+        slot: "purchaseDeliveryTime",
         width: 100,
       },
     },
   ];
 });
 const getDict = () => {
-  proxy
-    .getDictOne([
-      "customer_tag",
-      "trade_mode",
-      "account_currency",
-      "shipping_method",
-    ])
-    .then((res) => {
-      customerTag.value = res["customer_tag"].map((x) => ({
-        label: x.dictValue,
-        value: x.dictKey,
-      }));
-      tradeMethods.value = res["trade_mode"].map((x) => ({
-        label: x.dictValue,
-        value: x.dictKey,
-      }));
-      accountCurrency.value = res["account_currency"].map((x) => ({
-        label: x.dictValue,
-        value: x.dictKey,
-      }));
-      shippingMethod.value = res["shipping_method"].map((x) => ({
+  proxy.getDictOne(["trade_mode", "contract_documentary"]).then((res) => {
+    tradeMethods.value = res["trade_mode"].map((x) => ({
+      label: x.dictValue,
+      value: x.dictKey,
+    }));
+
+    if (res["contract_documentary"] && res["contract_documentary"].length > 0) {
+      contractDocumentary.value = res["contract_documentary"].map((x) => ({
         label: x.dictValue,
         value: x.dictKey,
       }));
-    });
+
+      for (let i = 0; i < contractDocumentary.value.length; i++) {
+        const element = contractDocumentary.value[i];
+        let width = 100;
+        if (element.label.length > 5) {
+          width = 180;
+        }
+        let attrs = {
+          label: element.label,
+          slot: element.value,
+          isNeedHeaderSlot: false,
+          headerSlot: element.value,
+          "min-width": width,
+        };
+
+        config.value.push({
+          attrs,
+          // renderHTML(row) {
+          //   if (row.purchaseList && row.purchaseList.length > 0) {
+          //     return row.purchaseList.map((x) => {
+          //       return {
+          //         attrs: {
+          //           label: "查看",
+          //           type: "primary",
+          //           text: true,
+          //         },
+          //         el: "button",
+          //         click() {
+          //           handleClickLook(row, x, element);
+          //         },
+          //       };
+          //     });
+          //   } else {
+          //     return [];
+          //   }
+          // },
+        });
+      }
+    }
+  });
 };
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
-  proxy.post("/contract/page", sourceList.value.pagination).then((res) => {
-    sourceList.value.data = res.rows;
-    sourceList.value.pagination.total = res.total;
-    setTimeout(() => {
-      loading.value = false;
-    }, 200);
-  });
+  proxy
+    .post("/contract/exportCopy/page", sourceList.value.pagination)
+    .then((res) => {
+      for (let i = 0; i < res.rows.length; i++) {
+        if (
+          res.rows[i].contractProductList &&
+          res.rows[i].contractProductList.length > 0
+        ) {
+          for (let j = 0; j < res.rows[i].contractProductList.length; j++) {
+            let element = res.rows[i].contractProductList[j];
+            if (element.ehsdJson) {
+              let jsonObj = JSON.parse(element.ehsdJson);
+              element.tradeMethods = jsonObj.tradeMethods;
+            }
+          }
+        }
+      }
+      sourceList.value.data = res.rows;
+      sourceList.value.pagination.total = res.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+    });
 };
 getDict();
 
@@ -400,6 +534,7 @@ getList();
 const formData = reactive({
   remarksFormData: {},
   recordsFormData: {},
+  filesFormData: {},
 });
 const formOption = reactive({
   inline: true,
@@ -411,7 +546,7 @@ const remarksFormConfig = computed(() => {
   return [
     {
       type: "input",
-      prop: "code",
+      prop: "documentaryRemark",
       label: "备注内容",
       itemType: "textarea",
       disabled: false,
@@ -423,18 +558,45 @@ const remarksFormConfig = computed(() => {
     },
   ];
 });
+const remarksRules = ref({
+  documentaryRemark: [
+    { required: true, message: "请输入备注内容", trigger: "blur" },
+  ],
+});
+const formLoading = ref(false);
 const openRemarks = ref(false);
 const remarksForm = ref(null);
 const handleClickLookRemarks = (row) => {
   formData.remarksFormData = {
-    fileList: [],
-    remarks: "",
+    id: row.id,
+    remarkFileList: [],
+    documentaryRemark: row.documentaryRemark,
   };
   openRemarks.value = true;
 };
 const submitRemarks = () => {
   remarksForm.value.handleSubmit(() => {
-    console.log("asda");
+    formLoading.value = true;
+    formData.remarksFormData.remarkFileList =
+      formData.remarksFormData.remarkFileList.map((item) => {
+        return {
+          id: item.raw.id,
+          fileName: item.raw.fileName,
+          fileUrl: item.raw.fileUrl,
+          uploadState: item.raw.uploadState,
+        };
+      });
+    proxy
+      .post("/contract/editContractRemark", formData.remarksFormData)
+      .then((res) => {
+        ElMessage({
+          message: "操作成功",
+          type: "success",
+        });
+        getList();
+        formLoading.value = false;
+        openRemarks.value = false;
+      });
   });
 };
 // 上传文件
@@ -454,21 +616,26 @@ const onPreviewFile = (file) => {
   window.open(file.raw.fileUrl, "_blank");
 };
 // 记录
-const rowHeaderLabel = ref("");
+const selectNode = ref({});
+const contractData = ref({});
+const purchaseData = ref({});
 const openRecords = ref(false);
+const openAddRecords = ref(false);
 const recordsLoading = ref(false);
 const recordsData = ref([]);
+const recordsForm = ref(null);
 const recordsFormConfig = computed(() => {
   return [
     {
       type: "date",
-      prop: "code",
+      itemType: "datetime",
+      prop: "documentaryTime",
       label: "跟单时间",
       disabled: false,
     },
     {
       type: "input",
-      prop: "code",
+      prop: "documentaryRemark",
       label: "跟单记录",
       itemType: "textarea",
       disabled: false,
@@ -480,16 +647,105 @@ const recordsFormConfig = computed(() => {
     },
   ];
 });
-const handleClickLook = (row, item, label) => {
-  rowHeaderLabel.value = label;
-  recordsLoading.value = true;
-  setTimeout(() => (recordsLoading.value = false), 1000);
+const recordsRules = ref({
+  documentaryTime: [
+    { required: true, message: "请选择跟单时间", trigger: "change" },
+  ],
+  documentaryRemark: [
+    { required: true, message: "请输入跟单记录", trigger: "blur" },
+  ],
+});
+const getRecordsData = () => {
+  proxy
+    .post("/contractDocumentary/page", {
+      purchaseId: purchaseData.value.id,
+      documentaryType: selectNode.value.value,
+    })
+    .then((res) => {
+      console.log(res, "asda");
+    });
 };
-const handleClickAddRecord = () => {
+const handleClickLook = (row, purchase, node) => {
+  contractData.value = row;
+  purchaseData.value = purchase;
+  selectNode.value = node;
   openRecords.value = true;
+  getRecordsData();
+};
+const handleClickAddRecord = () => {
   formData.recordsFormData = {
+    purchaseId: purchaseData.value.id,
+    documentaryType: selectNode.value,
+    documentaryTime: "",
+    documentaryRemark: "",
+    fileList: [],
+  };
+  openAddRecords.value = true;
+};
+
+const submitRecords = () => {
+  recordsForm.value.handleSubmit(() => {
+    formLoading.value = true;
+    formData.recordsFormData.fileList = formData.recordsFormData.fileList.map(
+      (item) => {
+        return {
+          id: item.raw.id,
+          fileName: item.raw.fileName,
+          fileUrl: item.raw.fileUrl,
+          uploadState: item.raw.uploadState,
+        };
+      }
+    );
+    proxy
+      .post("/contract/editContractRemark", formData.recordsFormData)
+      .then((res) => {
+        ElMessage({
+          message: "操作成功",
+          type: "success",
+        });
+        getRecordsData();
+        getList();
+        formLoading.value = false;
+        openAddRecords.value = false;
+      });
+  });
+};
+// 交接单
+const openFiles = ref(false);
+const fileTitle = ref("");
+const filesFormConfig = computed(() => {
+  return [
+    {
+      type: "slot",
+      slotName: "file",
+      label: "附件",
+    },
+  ];
+});
+const handleClickLookContractFile = (row, flag) => {
+  let id = row.id;
+  fileTitle.value = flag ? "交接单" : "包装指示";
+  openFiles.value = true;
+  formData.filesFormData = {
     fileList: [],
   };
+  proxy
+    .post("/fileInfo/getList", {
+      businessIdList: [id],
+    })
+    .then((fileObj) => {
+      if (fileObj[id] && fileObj[id].length > 0) {
+        if (flag) {
+          formData.filesFormData.fileList = fileObj[id]
+            .filter((x) => x.businessType === "1")
+            .map((x) => ({ raw: x, name: x.fileName, url: x.fileUrl }));
+        } else {
+          formData.filesFormData.fileList = fileObj[id]
+            .filter((x) => x.businessType === "2")
+            .map((x) => ({ raw: x, name: x.fileName, url: x.fileUrl }));
+        }
+      }
+    });
 };
 </script>
 
@@ -508,4 +764,10 @@ const handleClickAddRecord = () => {
   color: #409eff;
   cursor: pointer;
 }
+.hidden-text {
+  overflow: hidden;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+  cursor: pointer;
+}
 </style>

+ 90 - 26
src/views/customer/portrait/com/SalesDetails.vue

@@ -24,36 +24,50 @@
         </template>
         <template #money="{ item }">
           <div>
-            <span>{{ moneyFormat(item.amount, 2) }}</span>
+            <span>{{ item.currency }} {{ moneyFormat(item.amount, 2) }}</span>
           </div>
         </template>
-        <template #advanceCharge="{ item }">
+        <template #amountCNY="{ item }">
           <div>
-            {{ item.currency
-            }}{{ moneyFormat(item.advanceCharge, 2) }}(预付款比列:{{
-              item.advanceRatio
-            }}%)
+            <span>{{ moneyFormat(item.amountCNY, 2) }}</span>
           </div>
         </template>
-        <template #buyContactName="{ item }">
+        <template #sumClaimMoney="{ item }">
+          <div>
+            <span>{{ moneyFormat(item.sumClaimMoney, 2) }}</span>
+          </div>
+        </template>
+
+        <template #advanceRatio="{ item }">
+          <div>{{ item.advanceRatio }} %</div>
+        </template>
+        <!-- <template #buyContactName="{ item }">
           <div>
             客户联系人:<span style="cursor: pointer; color: #409eff">{{
               item.buyContactName
             }}</span>
           </div>
-        </template>
+        </template> -->
       </byTable>
     </div>
 
     <el-dialog title="打印" v-if="openPrint" v-model="openPrint" width="920">
       <!-- <ContractPDFOne :rowData="rowData"></ContractPDFOne> -->
-      <ContractPDFOneNew :rowData="rowData" ref="PdfDom"></ContractPDFOneNew>
+      <ContractPDFOneNew
+        :rowData="rowData"
+        ref="PdfDom"
+        v-if="rowData.type == '外销合同'"
+      ></ContractPDFOneNew>
+      <SamplePDFNew :rowData="rowData" ref="PdfDom" v-else></SamplePDFNew>
       <template #footer>
         <el-button @click="openPrint = false" size="large">取消</el-button>
         <el-button type="primary" v-print="printObj" size="large"
           >打印</el-button
         >
-        <el-button type="primary" @click="clickDownload()" size="large"
+        <el-button
+          type="primary"
+          @click="clickDownload(rowData.type)"
+          size="large"
           >下载PDF</el-button
         >
       </template>
@@ -65,6 +79,7 @@
 import byTable from "@/components/byTable/index";
 import ContractPDFOne from "@/components/PDF/contractPDFOne.vue";
 import ContractPDFOneNew from "@/components/PDF/contractPDFOneNew.vue";
+import SamplePDFNew from "@/components/PDF/samplePDFNew.vue";
 
 const props = defineProps({
   customerId: {
@@ -86,40 +101,75 @@ const config = computed(() => {
   return [
     {
       attrs: {
-        label: "时间",
-        prop: "createTime",
+        label: "订单类型",
+        prop: "type",
+        width: 80,
       },
     },
     {
       attrs: {
-        label: "合同编码",
+        label: "单号",
         slot: "code",
+        "min-width": 120,
       },
     },
     {
       attrs: {
-        label: "合同金额",
-        slot: "money",
+        label: "归属公司",
+        prop: "sellCorporationName",
+        "min-width": 160,
       },
     },
     {
       attrs: {
         label: "业务员",
         prop: "userName",
+        width: 100,
+      },
+    },
+
+    {
+      attrs: {
+        label: "下单时间",
+        prop: "createTime",
+        width: 155,
+      },
+    },
+    {
+      attrs: {
+        label: "预付比例",
+        prop: "advanceRatio",
+        slot: "advanceRatio",
+        width: 100,
+      },
+    },
+
+    {
+      attrs: {
+        label: "合同金额",
+        slot: "money",
+        width: 110,
+      },
+    },
+    {
+      attrs: {
+        label: "汇率",
+        prop: "rate",
+        width: 80,
       },
     },
     {
       attrs: {
-        label: "预付款",
-        prop: "advanceCharge",
-        slot: "advanceCharge",
+        label: "合同金额(CNY)",
+        slot: "amountCNY",
+        width: 140,
       },
     },
     {
       attrs: {
-        label: "客户",
-        prop: "buyContactName",
-        slot: "buyContactName",
+        label: "到账金额(CNY)",
+        slot: "sumClaimMoney",
+        width: 140,
       },
     },
   ];
@@ -127,15 +177,28 @@ const config = computed(() => {
 const getData = (req = {}) => {
   loading.value = true;
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  // proxy
+  //   .post("/saleQuotation/saleDetail", {
+  //     id: props.customerId,
+  //     ...sourceList.value.pagination,
+  //     ...req,
+  //   })
+  //   .then((res) => {
+  //     sourceList.value.data = res.rows;
+  //     sourceList.value.pagination.total = res.total;
+  //     setTimeout(() => {
+  //       loading.value = false;
+  //     }, 200);
+  //   });
   proxy
-    .post("/saleQuotation/saleDetail", {
+    .post("/saleQuotation/salesStatistics", {
       id: props.customerId,
       ...sourceList.value.pagination,
       ...req,
     })
     .then((res) => {
-      sourceList.value.data = res.rows;
-      sourceList.value.pagination.total = res.total;
+      sourceList.value.data = res.contractList.rows;
+      sourceList.value.pagination.total = res.contractList.total;
       setTimeout(() => {
         loading.value = false;
       }, 200);
@@ -152,6 +215,7 @@ const rowData = ref({});
 const clickPrint = (row) => {
   rowData.value = {
     id: row.id,
+    type: row.type,
   };
   openPrint.value = true;
 };
@@ -162,8 +226,8 @@ const printObj = ref({
     "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 clickDownload = () => {
-  proxy.getPdf("外销合同PDF文件");
+const clickDownload = (type) => {
+  proxy.getPdf(type + "PDF文件");
 };
 </script>