cz 1 年之前
父節點
當前提交
61ca81a908

+ 14 - 8
src/components/process/EHSD/Contract.vue

@@ -1729,18 +1729,21 @@ onMounted(() => {
         }
         res.countryId = res.buyCountryId;
         res.provinceId = res.buyProvinceId;
+        res.cityId = res.buyCityId;
         formData.data = res;
         proxy
           .post("/fileInfo/getList", {
             businessIdList: [route.query.businessId],
           })
           .then((fileObj) => {
-            formData.data.fileList = fileObj[route.query.businessId]
-              .filter((x) => x.businessType === "1")
-              .map((x) => ({ raw: x, name: x.fileName, url: x.fileUrl }));
-            formData.data.packageFileList = fileObj[route.query.businessId]
-              .filter((x) => x.businessType === "2")
-              .map((x) => ({ raw: x, name: x.fileName, url: x.fileUrl }));
+            if (fileObj[route.query.businessId]) {
+              formData.data.fileList = fileObj[route.query.businessId]
+                .filter((x) => x.businessType === "1")
+                .map((x) => ({ raw: x, name: x.fileName, url: x.fileUrl }));
+              formData.data.packageFileList = fileObj[route.query.businessId]
+                .filter((x) => x.businessType === "2")
+                .map((x) => ({ raw: x, name: x.fileName, url: x.fileUrl }));
+            }
           });
         if (
           formData.data.contractProductList &&
@@ -1766,8 +1769,10 @@ onMounted(() => {
                 const e = formData.data.contractProductList[i];
                 for (const key in fileObj) {
                   if (e.productId === key) {
-                    e.fileList = fileObj[key];
-                    e.fileUrl = e.fileList[0].fileUrl;
+                    e.fileList = fileObj[key] || [];
+                    if (e.fileList && e.fileList.length > 0) {
+                      e.fileUrl = e.fileList[0].fileUrl;
+                    }
                   }
                 }
               }
@@ -1779,6 +1784,7 @@ onMounted(() => {
         if (formData.data.provinceId) {
           getCityData(formData.data.provinceId, "30");
         }
+        console.log(formData.data, "2222222");
       });
   }
 });

+ 65 - 3
src/components/process/EHSD/Purchase.vue

@@ -640,7 +640,7 @@
             :data="formData.data.purchaseArrivalList"
             style="width: 100%; margin-top: 16px"
           >
-            <el-table-column prop="code" label="商品编码" width="120" />
+            <el-table-column prop="productCode" label="商品编码" width="120" />
             <el-table-column prop="productName" label="商品名称" />
             <el-table-column label="到货日期" width="220">
               <template #default="{ row, $index }">
@@ -1385,6 +1385,7 @@ watch(
   props.queryData,
   () => {
     formOption.disabled = judgeStatus();
+    return;
     if (
       props.queryData &&
       ["10", "20", "30"].includes(route.query.processType)
@@ -1454,7 +1455,7 @@ onMounted(() => {
         });
         formData.data.purchaseArrivalList = res.rows.map((item) => {
           return {
-            code: item.productCode,
+            productCode: item.productCode,
             productId: item.productId,
             productName: item.productName,
             arrivalTime: "",
@@ -1491,10 +1492,71 @@ onMounted(() => {
       }
     });
   }
+  console.log(route, "wada");
+  formOption.disabled = judgeStatus();
+  if (route.query && route.query.processType) {
+    proxy
+      .post("/ehsdPurchase/detail", { id: route.query.businessId })
+      .then((res) => {
+        res.purchaseProductList = res.ehsdPurchaseProductList || [];
+        if (!res.fileList) {
+          res.fileList = [];
+        }
+        res.countryId = res.sellCountryId;
+        res.provinceId = res.sellProvinceId;
+        res.cityId = res.sellCityId;
+        formData.data = res;
+        proxy
+          .post("/fileInfo/getList", {
+            businessIdList: [route.query.businessId],
+          })
+          .then((fileObj) => {
+            if (fileObj[route.query.businessId]) {
+              formData.data.fileList = fileObj[route.query.businessId]
+                .filter((x) => x.businessType === "1")
+                .map((x) => ({ raw: x, name: x.fileName, url: x.fileUrl }));
+              formData.data.packageFileList = fileObj[route.query.businessId]
+                .filter((x) => x.businessType === "2")
+                .map((x) => ({ raw: x, name: x.fileName, url: x.fileUrl }));
+            }
+          });
+        if (
+          formData.data.purchaseProductList &&
+          formData.data.purchaseProductList.length > 0
+        ) {
+          let ids = formData.data.purchaseProductList.map((x) => x.productId);
+          proxy
+            .post("/fileInfo/getList", {
+              businessIdList: ids,
+            })
+            .then((fileObj) => {
+              for (
+                let i = 0;
+                i < formData.data.purchaseProductList.length;
+                i++
+              ) {
+                const e = formData.data.purchaseProductList[i];
+                for (const key in fileObj) {
+                  if (e.productId === key) {
+                    e.fileList = fileObj[key] || [];
+                    e.fileUrl = e.fileList[0].fileUrl;
+                  }
+                }
+              }
+            });
+        }
+        if (formData.data.countryId) {
+          getCityData(formData.data.countryId, "20");
+        }
+        if (formData.data.provinceId) {
+          getCityData(formData.data.provinceId, "30");
+        }
+      });
+  }
 });
 const clickSplit = (item) => {
   formData.data.purchaseArrivalList.push({
-    code: item.code,
+    productCode: item.code,
     productId: item.productId,
     productName: item.productName,
     arrivalTime: "",

+ 13 - 8
src/components/process/EHSD/Sample.vue

@@ -1650,12 +1650,14 @@ onMounted(() => {
           businessIdList: [route.query.businessId],
         })
         .then((fileObj) => {
-          formData.data.fileList = fileObj[route.query.businessId]
-            .filter((x) => x.businessType === "1")
-            .map((x) => ({ raw: x, name: x.fileName, url: x.fileUrl }));
-          formData.data.packageFileList = fileObj[route.query.businessId]
-            .filter((x) => x.businessType === "2")
-            .map((x) => ({ raw: x, name: x.fileName, url: x.fileUrl }));
+          if (fileObj[route.query.businessId]) {
+            formData.data.fileList = fileObj[route.query.businessId]
+              .filter((x) => x.businessType === "1")
+              .map((x) => ({ raw: x, name: x.fileName, url: x.fileUrl }));
+            formData.data.packageFileList = fileObj[route.query.businessId]
+              .filter((x) => x.businessType === "2")
+              .map((x) => ({ raw: x, name: x.fileName, url: x.fileUrl }));
+          }
         });
       if (
         formData.data.sampleProductList &&
@@ -1677,8 +1679,11 @@ onMounted(() => {
               const e = formData.data.sampleProductList[i];
               for (const key in fileObj) {
                 if (e.productId === key) {
-                  e.fileList = fileObj[key];
-                  e.fileUrl = e.fileList[0].fileUrl;
+                  e.fileList = fileObj[key] || [];
+
+                  if (e.fileList && e.fileList.length > 0) {
+                    e.fileUrl = e.fileList[0].fileUrl;
+                  }
                 }
               }
             }

+ 1 - 0
src/views/EHSD/procurement/purchasedEHSD/index.vue

@@ -331,6 +331,7 @@ const handleClickCode = (row) => {
       flowKey: row.processInstanceId,
       id: row.flowId,
       processType: 20,
+      businessId: row.id,
     },
   });
 };

+ 202 - 47
src/views/customer/portrait/com/CustomerInfo.vue

@@ -1,9 +1,35 @@
 <template>
   <div class="content" v-loading="loading">
+    <div
+      style="
+        border-bottom: 1px solid #f1f1f1;
+        padding-bottom: 15px;
+        margin-bottom: 15px;
+      "
+    >
+      <span
+        class="iconfont icon-icon_factory1"
+        style="margin-right: 8px; color: #0084ff"
+      ></span>
+      <span style="font-size: 14px; color: #000">{{ detailsData.name }}</span>
+    </div>
     <div class="line">
-      <span class="title_" v-if="detailsData.customerCode">客户代码:{{ detailsData.customerCode }}</span>
-      <span class="title_" v-if="detailsData.customerCode && detailsData.status" style="margin: 0 6px">|</span>
-      <span class="title_" v-if="detailsData.status">客户类型:{{ dictValueLabel(detailsData.status, customerStatus) }}</span>
+      <span class="title_" v-if="detailsData.customerCode"
+        >客户代码:<span style="color: #000">{{
+          detailsData.customerCode
+        }}</span></span
+      >
+      <span
+        class="title_"
+        v-if="detailsData.customerCode && detailsData.status"
+        style="margin: 0 6px"
+        >|</span
+      >
+      <span class="title_" v-if="detailsData.status"
+        >客户类型:<span style="color: #000">{{
+          dictValueLabel(detailsData.status, customerStatus)
+        }}</span></span
+      >
     </div>
     <div class="line" v-if="detailsData.source">
       <span class="title_">客户来源:</span>
@@ -20,46 +46,100 @@
     <div class="contacts" v-if="detailsData.customerUserList.length > 0">
       <div style="display: flex; justify-content: space-between">
         <span> 相关联系人: </span>
-        <el-button type="primary" size="small" style="padding: 0px" text @click="handleAddUserList(detailsData)">添加</el-button>
+        <el-button
+          type="primary"
+          size="small"
+          style="padding: 0px"
+          text
+          @click="handleAddUserList(detailsData)"
+          >添加</el-button
+        >
       </div>
       <div>
-        <div v-for="(item, index) in detailsData.customerUserList" :key="index" class="item" v-show="!(index > 1)">
+        <div
+          v-for="(item, index) in detailsData.customerUserList"
+          :key="index"
+          class="item"
+          v-show="!(index > 1)"
+        >
           <div class="img">
-            <i class="iconfont icon-iconm_kehd" style="font-size: 26px; color: #cccccc; margin-top: 2px"></i>
+            <i
+              class="iconfont icon-iconm_kehd"
+              style="font-size: 26px; color: #cccccc; margin-top: 2px"
+            ></i>
           </div>
           <div class="details">
             <div>
               <span> {{ item.name }} </span>
             </div>
             <div class="information">
-              <div class="first"><span class="val">Tel:</span>{{ getPhone(item) }}</div>
-              <div style="display: flex; justify-content: space-between; height: 20px; line-height: 20px">
+              <div class="first">
+                <span class="val">Tel:</span>{{ getPhone(item) }}
+              </div>
+              <div
+                style="
+                  display: flex;
+                  justify-content: space-between;
+                  height: 20px;
+                  line-height: 20px;
+                "
+              >
                 <span class="val" style="flex: 1">Email:</span>{{ item.email }}
                 <img
                   src="@/assets/images/portrait/icon_email.png"
                   alt=""
-                  style="cursor: pointer; margin-left: 10px; transform: translateY(-1px)"
+                  style="
+                    cursor: pointer;
+                    margin-left: 10px;
+                    transform: translateY(-1px);
+                  "
                   @click="handleSendEmail(item)"
-                  v-show="item.email" />
+                  v-show="item.email"
+                />
               </div>
             </div>
           </div>
         </div>
-        <div style="float: right" v-if="detailsData.customerUserList && detailsData.customerUserList.length > 1">
+        <div
+          style="float: right"
+          v-if="
+            detailsData.customerUserList &&
+            detailsData.customerUserList.length > 1
+          "
+        >
           <el-button type="primary" link size="small">更多联系人</el-button>
         </div>
       </div>
     </div>
 
-    <el-dialog :title="'添加联系人'" v-if="dialogVisible" v-model="dialogVisible" width="800" v-loading="loadingOperation">
-      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
+    <el-dialog
+      :title="'添加联系人'"
+      v-if="dialogVisible"
+      v-model="dialogVisible"
+      width="800"
+      v-loading="loadingOperation"
+    >
+      <byForm
+        :formConfig="formConfig"
+        :formOption="formOption"
+        v-model="formData.data"
+        :rules="rules"
+        ref="submit"
+      >
         <template #person>
           <div style="width: 100%">
-            <el-table :data="formData.data.customerUserList" style="width: 100%; margin-top: 16px">
+            <el-table
+              :data="formData.data.customerUserList"
+              style="width: 100%; margin-top: 16px"
+            >
               <el-table-column label="联系人" width="160">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
-                    <el-form-item :prop="'customerUserList.' + $index + '.name'" :rules="rules.name2" :inline-message="true">
+                    <el-form-item
+                      :prop="'customerUserList.' + $index + '.name'"
+                      :rules="rules.name2"
+                      :inline-message="true"
+                    >
                       <el-input v-model="row.name" placeholder="请输入联系人" />
                     </el-form-item>
                   </div>
@@ -68,15 +148,32 @@
               <el-table-column label="电子邮箱">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
-                    <el-form-item :prop="'customerUserList.' + $index + '.email'" :rules="rules.email" :inline-message="true">
-                      <el-input v-model="row.email" placeholder="请输入电子邮箱" />
+                    <el-form-item
+                      :prop="'customerUserList.' + $index + '.email'"
+                      :rules="rules.email"
+                      :inline-message="true"
+                    >
+                      <el-input
+                        v-model="row.email"
+                        placeholder="请输入电子邮箱"
+                      />
                     </el-form-item>
                   </div>
                 </template>
               </el-table-column>
-              <el-table-column align="center" label="操作" width="120" fixed="right">
+              <el-table-column
+                align="center"
+                label="操作"
+                width="120"
+                fixed="right"
+              >
                 <template #default="{ row, $index }">
-                  <el-button type="primary" link @click="clickInformationMore(row, $index)">更多</el-button>
+                  <el-button
+                    type="primary"
+                    link
+                    @click="clickInformationMore(row, $index)"
+                    >更多</el-button
+                  >
                 </template>
               </el-table-column>
             </el-table>
@@ -85,12 +182,28 @@
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitForm()" size="large" :loading="submitLoading">确 定</el-button>
+        <el-button
+          type="primary"
+          @click="submitForm()"
+          size="large"
+          :loading="submitLoading"
+          >确 定</el-button
+        >
       </template>
     </el-dialog>
 
-    <el-dialog title="更多联系方式" v-if="openPerson" v-model="openPerson" width="700">
-      <el-form :label-position="'top'" :model="formPerson.data" :rules="rulesPerson" ref="person">
+    <el-dialog
+      title="更多联系方式"
+      v-if="openPerson"
+      v-model="openPerson"
+      width="700"
+    >
+      <el-form
+        :label-position="'top'"
+        :model="formPerson.data"
+        :rules="rulesPerson"
+        ref="person"
+      >
         <el-form-item label="联系人" prop="name">
           <el-input v-model="formPerson.data.name" />
         </el-form-item>
@@ -99,14 +212,32 @@
         </el-form-item>
         <el-form-item label="更多联系方式">
           <div style="width: 100%">
-            <el-button type="primary" @click="clickAddMoreInformation">添 加</el-button>
-            <el-table :data="formPerson.data.contact" style="width: 100%; margin-top: 16px">
+            <el-button type="primary" @click="clickAddMoreInformation"
+              >添 加</el-button
+            >
+            <el-table
+              :data="formPerson.data.contact"
+              style="width: 100%; margin-top: 16px"
+            >
               <el-table-column label="类型" width="180">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
-                    <el-form-item :prop="'contact.' + $index + '.type'" :rules="rulesPerson.type" :inline-message="true">
-                      <el-select v-model="row.type" placeholder="请选择类型" style="width: 100%">
-                        <el-option v-for="item in contactType" :key="item.value" :label="item.label" :value="item.value" />
+                    <el-form-item
+                      :prop="'contact.' + $index + '.type'"
+                      :rules="rulesPerson.type"
+                      :inline-message="true"
+                    >
+                      <el-select
+                        v-model="row.type"
+                        placeholder="请选择类型"
+                        style="width: 100%"
+                      >
+                        <el-option
+                          v-for="item in contactType"
+                          :key="item.value"
+                          :label="item.label"
+                          :value="item.value"
+                        />
                       </el-select>
                     </el-form-item>
                   </div>
@@ -115,15 +246,32 @@
               <el-table-column label="联系号码">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
-                    <el-form-item :prop="'contact.' + $index + '.contactNo'" :rules="rulesPerson.contactNo" :inline-message="true">
-                      <el-input v-model="row.contactNo" placeholder="请输入联系号码" />
+                    <el-form-item
+                      :prop="'contact.' + $index + '.contactNo'"
+                      :rules="rulesPerson.contactNo"
+                      :inline-message="true"
+                    >
+                      <el-input
+                        v-model="row.contactNo"
+                        placeholder="请输入联系号码"
+                      />
                     </el-form-item>
                   </div>
                 </template>
               </el-table-column>
-              <el-table-column align="center" label="操作" width="120" fixed="right">
+              <el-table-column
+                align="center"
+                label="操作"
+                width="120"
+                fixed="right"
+              >
                 <template #default="{ $index }">
-                  <el-button type="primary" link @click="clickInformationDelete($index)">删除</el-button>
+                  <el-button
+                    type="primary"
+                    link
+                    @click="clickInformationDelete($index)"
+                    >删除</el-button
+                  >
                 </template>
               </el-table-column>
             </el-table>
@@ -132,7 +280,9 @@
       </el-form>
       <template #footer>
         <el-button @click="openPerson = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitPerson()" size="large">确 定</el-button>
+        <el-button type="primary" @click="submitPerson()" size="large"
+          >确 定</el-button
+        >
       </template>
     </el-dialog>
   </div>
@@ -204,20 +354,22 @@ const customerSource = ref([]);
 const customerStatus = ref([]);
 const contactType = ref([]);
 const getDict = () => {
-  proxy.getDictOne(["customer_source", "customer_status", "contact_type"]).then((res) => {
-    customerSource.value = res["customer_source"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    customerStatus.value = res["customer_status"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    contactType.value = res["contact_type"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-  });
+  proxy
+    .getDictOne(["customer_source", "customer_status", "contact_type"])
+    .then((res) => {
+      customerSource.value = res["customer_source"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      customerStatus.value = res["customer_status"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      contactType.value = res["contact_type"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+    });
 };
 getDict();
 onMounted(() => {
@@ -285,7 +437,10 @@ const submitPerson = () => {
 };
 const submitForm = () => {
   submit.value.handleSubmit(() => {
-    if (formData.data.customerUserList && formData.data.customerUserList.length > 0) {
+    if (
+      formData.data.customerUserList &&
+      formData.data.customerUserList.length > 0
+    ) {
       submitLoading.value = true;
       const data = {
         customerId: detailsData.value.id,

+ 64 - 3
src/views/customer/portrait/com/LatestProgress.vue

@@ -12,7 +12,24 @@
           <div class="t">{{ getTitle(item.type) }}</div>
           <div class="content11" v-if="item.type != 30">
             <span class="gray">跟进摘要: </span>
-            <span class="val"> {{ getContent(item) }} </span>
+            <span class="val">
+              <!-- {{ getContent(item) }} -->
+              <span v-if="item.type === 10">报价单总金额</span>
+              <span v-if="item.type === 20">合同总金额</span>
+              <span>{{ moneyFormat(item.amount, 2) }}</span>
+              <span
+                v-if="item.type === 10 && item.code"
+                :class="{ 'code-class': isHave }"
+                @click="isHaveOne ? handlePushRoute(item) : () => {}"
+                >({{ item.code }})</span
+              >
+              <span
+                v-if="item.type === 20 && item.contractCode"
+                :class="{ 'code-class': isHaveOne }"
+                @click="isHave ? handlePushRoute(item) : () => {}"
+                >({{ item.contractCode }})</span
+              >
+            </span>
           </div>
           <div class="content11" v-else>
             <span class="gray">跟进记录: </span>
@@ -41,6 +58,8 @@
 </template>
 
 <script setup>
+import useUserStore from "@/store/modules/user";
+
 const props = defineProps({
   customerId: {
     type: String,
@@ -49,13 +68,34 @@ const props = defineProps({
 const { proxy } = getCurrentInstance();
 const loading = ref(false);
 const progressList = ref([]);
+// 判断当前用户有无销售合同页面权限
+const isHave = ref(false);
+if (
+  useUserStore().permissions &&
+  useUserStore().permissions.includes("contract")
+) {
+  isHave.value = true;
+}
+// 判断当前用户有无报价单页面权限
+const isHaveOne = ref(false);
+if (
+  useUserStore().permissions &&
+  useUserStore().permissions.includes("priceSheet")
+) {
+  isHaveOne.value = true;
+}
+
 const getData = () => {
   loading.value = true;
   proxy
     .post("/saleQuotation/latestFollowUp", { id: props.customerId })
     .then((res) => {
       progressList.value = res.rows;
-      if (res.rows && res.rows.length) {
+      if (
+        res.rows &&
+        res.rows.length > 0 &&
+        res.rows.map((rows) => rows.id).length > 0
+      ) {
         proxy
           .post("/fileInfo/getList", {
             businessIdList: res.rows.map((rows) => rows.id),
@@ -67,7 +107,6 @@ const getData = () => {
             }
           });
       }
-
       setTimeout(() => {
         loading.value = false;
       }, 200);
@@ -115,9 +154,31 @@ const getColor = (type) => {
   };
   return "background-color: " + obj[type];
 };
+
+const handlePushRoute = (row) => {
+  if (row.type === 10) {
+    proxy.$router.push({
+      name: "PriceSheet",
+      query: {
+        code: row.code,
+      },
+    });
+  } else if (row.type === 20) {
+    proxy.$router.push({
+      name: "Contract",
+      query: {
+        code: row.contractCode,
+      },
+    });
+  }
+};
 </script>
 
 <style lang="scss" scoped>
+.code-class {
+  cursor: pointer;
+  color: #409eff;
+}
 :deep(.el-timeline-item) {
   padding-bottom: 10px;
 }

+ 16 - 10
src/views/customer/portrait/com/SaleStatistics.vue

@@ -5,7 +5,9 @@
         <div class="money">
           {{ moneyFormat(detailsData.amount, 2) }}
         </div>
-        <div style="font-size: 12px !important">销售额({{ detailsData.currency || "¥" }})</div>
+        <div style="font-size: 12px !important">
+          销售额({{ detailsData.currency }})
+        </div>
       </div>
       <div class="right_">
         <div class="icon">
@@ -18,7 +20,9 @@
         <div class="money">
           {{ moneyFormat(detailsData.profitAmount, 2) }}
         </div>
-        <div style="font-size: 12px !important">利润额(¥)</div>
+        <div style="font-size: 12px !important">
+          利润额({{ detailsData.currency }})
+        </div>
       </div>
       <div class="right_">
         <div class="icon">
@@ -79,14 +83,16 @@ let detailsData = ref({});
 const { proxy } = getCurrentInstance();
 const getData = () => {
   loading.value = true;
-  proxy.post("/saleQuotation/salesStatistics", { id: props.customerId }).then((res) => {
-    if (res.contractVo) {
-      detailsData.value = res.contractVo;
-    }
-    setTimeout(() => {
-      loading.value = false;
-    }, 200);
-  });
+  proxy
+    .post("/saleQuotation/salesStatistics", { id: props.customerId })
+    .then((res) => {
+      if (res.contractVo) {
+        detailsData.value = res.contractVo;
+      }
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+    });
 };
 onMounted(() => {
   if (props.customerId) {

+ 68 - 12
src/views/customer/portrait/com/SalesDetails.vue

@@ -10,9 +10,23 @@
         :selectConfig="[]"
         :table-events="{}"
         :action-list="[]"
-        @get-list="getList"
+        @get-list="getData"
         :hideSearch="true"
       >
+        <template #code="{ item }">
+          <div>
+            <span
+              style="cursor: pointer; color: #409eff"
+              @click="clickPrint(item)"
+              >{{ item.code }}</span
+            >
+          </div>
+        </template>
+        <template #money="{ item }">
+          <div>
+            <span>{{ moneyFormat(item.amount, 2) }}</span>
+          </div>
+        </template>
         <template #advanceCharge="{ item }">
           <div>
             {{ item.currency
@@ -30,11 +44,26 @@
         </template>
       </byTable>
     </div>
+
+    <el-dialog title="打印" v-if="openPrint" v-model="openPrint" width="920">
+      <ContractPDFOne :rowData="rowData"></ContractPDFOne>
+      <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"
+          >下载PDF</el-button
+        >
+      </template>
+    </el-dialog>
   </div>
 </template>
   
 <script setup>
 import byTable from "@/components/byTable/index";
+import ContractPDFOne from "@/components/PDF/contractPDFOne.vue";
+
 const props = defineProps({
   customerId: {
     type: String,
@@ -59,15 +88,18 @@ const config = computed(() => {
         prop: "createTime",
       },
     },
-    // {
-    //   attrs: {
-    //     label: "样品单",
-    //     prop: "type",
-    //   },
-    //   render(type) {
-    //     return type == 10 ? "报价单" : type == 20 ? "合同" : "";
-    //   },
-    // },
+    {
+      attrs: {
+        label: "合同编码",
+        slot: "code",
+      },
+    },
+    {
+      attrs: {
+        label: "合同金额",
+        slot: "money",
+      },
+    },
     {
       attrs: {
         label: "业务员",
@@ -90,10 +122,15 @@ const config = computed(() => {
     },
   ];
 });
-const getData = () => {
+const getData = (req = {}) => {
   loading.value = true;
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   proxy
-    .post("/saleQuotation/saleDetail", { id: props.customerId })
+    .post("/saleQuotation/saleDetail", {
+      id: props.customerId,
+      ...sourceList.value.pagination,
+      ...req,
+    })
     .then((res) => {
       sourceList.value.data = res.rows;
       sourceList.value.pagination.total = res.total;
@@ -107,6 +144,25 @@ onMounted(() => {
     getData();
   }
 });
+
+const openPrint = ref(false);
+const rowData = ref({});
+const clickPrint = (row) => {
+  rowData.value = {
+    id: row.id,
+  };
+  openPrint.value = true;
+};
+const printObj = ref({
+  id: "pdfDom",
+  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",
+  extraHead: '<meta http-equiv="Content-Language"content="zh-cn"/>',
+});
+const clickDownload = () => {
+  proxy.getPdf("外销合同PDF文件");
+};
 </script>
   
 <style lang="scss" scoped>

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

@@ -685,7 +685,7 @@ onMounted(async () => {
   }
   flowForm.flowKey = route.query.flowKey;
   flowForm.tenantType = route.query.tenantType;
-  // getRecords(route.query.id);
+  getRecords(route.query.id);
 });
 </script>
 <style>