cz 1 ano atrás
pai
commit
1ce6b23990

+ 442 - 0
src/components/PDF/contractPDFOneNew.vue

@@ -0,0 +1,442 @@
+<template>
+  <div>
+    <div
+      id="pdfDom"
+      ref="pdfDom"
+      style="padding: 30px 60px"
+      v-loading="loading"
+    >
+      <table border="1" style="width: 100%" class="table">
+        <tr>
+          <td>
+            <img
+              :src="pdfData.companyPic"
+              alt=""
+              fit="scale-down"
+              style="height: 60px; width: 60px"
+              v-if="pdfData.companyPic && isShowImg"
+            />
+          </td>
+          <td style="padding: 10px" colspan="6">
+            <div style="font-size: 18px; color: #7f197f">
+              {{ pdfData.sellCorporationNameEn }}
+            </div>
+            <div style="font-size: 18px; color: #7f197f">
+              {{ pdfData.sellCorporationName }}
+            </div>
+
+            <div style="font-size: 14px; color: #000">
+              Address: {{ pdfData.sellDetailedAddressEn }}
+            </div>
+            <div style="font-size: 14px; color: #000; margin-top: 5px">
+              {{ pdfData.sellCityNameEn }} , {{ pdfData.sellProvinceNameEn }} ,
+              {{ pdfData.sellCountryNameEn }}
+            </div>
+
+            <div style="font-size: 14px; color: #000; margin-top: 10px">
+              地址: {{ pdfData.sellCountryName }} ,
+              {{ pdfData.sellProvinceName }} , {{ pdfData.sellCityName }}
+            </div>
+            <div style="font-size: 14px; color: #000; margin-top: 5px">
+              {{ pdfData.sellDetailedAddress }}
+            </div>
+            <div style="margin: 8px 0; color: black">
+              Tel: <span>{{ pdfData.sellContactNumber }}</span>
+              <!-- Fax:
+              <span>{{ pdfData.fax }}</span>
+               Website:
+              <span>{{ pdfData.Website }}</span> -->
+            </div>
+          </td>
+        </tr>
+        <tr>
+          <td colspan="7">
+            <div style="text-align: center; font-size: 18px; color: #7f197f">
+              Proforma Invoice
+            </div>
+          </td>
+        </tr>
+        <tr>
+          <td colspan="7" style="padding: 0; background: #7f197f">
+            <div style="height: 15px"></div>
+          </td>
+        </tr>
+        <tr>
+          <td colspan="3" style="text-align: left">
+            Buyer: {{ pdfData.buyCorporationName }}
+          </td>
+          <td colspan="4" style="text-align: left">
+            Seller: {{ pdfData.sellCorporationNameEn }}
+          </td>
+        </tr>
+        <tr>
+          <td>PI No.</td>
+          <td colspan="2">{{ pdfData.contractCode }}</td>
+          <td>Date:</td>
+          <td colspan="3">{{ pdfData.createTimeEn }}</td>
+        </tr>
+        <tr>
+          <!-- 客户合同号 -->
+          <td>PO No.</td>
+          <td colspan="2"></td>
+          <td>Loading Port:</td>
+          <td colspan="3">{{ pdfData.transportRemark }}</td>
+        </tr>
+        <tr>
+          <td colspan="7" style="padding: 0; background: #7f197f">
+            <div style="height: 15px"></div>
+          </td>
+        </tr>
+        <!-- 产品内容 -->
+        <tr>
+          <td style="width: 17%">Image</td>
+          <td style="width: 18%">Description</td>
+          <td style="width: 15%">Size</td>
+          <td style="width: 12%">Packaging</td>
+          <td style="width: 13%">
+            Order <br />
+            Quantity
+          </td>
+          <td style="width: 12%">Unit <br />Price</td>
+          <td style="width: 13%">Total <br />Amount</td>
+        </tr>
+
+        <tr
+          v-if="pdfData.productInfoList && pdfData.productInfoList.length > 0"
+          v-for="(item, index) in pdfData.productInfoList"
+          :key="item.productId"
+        >
+          <td>
+            <img
+              :src="item.fileList[0].fileUrl"
+              alt=""
+              fit="scale-down"
+              style="height: 60px; width: 60px"
+              v-if="item.fileList && item.fileList.length > 0 && isShowImg"
+            />
+          </td>
+          <td>{{ item.productName }}</td>
+          <td>
+            <span v-if="item.productModel">{{ item.productModel }} cm</span>
+          </td>
+          <td>{{ item.packMethod }}</td>
+          <td>
+            {{ item.productQuantity }}
+          </td>
+          <td>
+            {{ pdfData.currency }} {{ moneyFormat(item.productPrice, 2) }}
+          </td>
+          <td>{{ pdfData.currency }} {{ moneyFormat(item.amount, 2) }}</td>
+        </tr>
+        <template
+          v-if="
+            pdfData.contractProjectList &&
+            pdfData.contractProjectList.length > 0
+          "
+        >
+          <tr>
+            <td colspan="6" style="text-align: right">
+              <div
+                v-for="(item, index) in pdfData.contractProjectList"
+                :key="item.id"
+              >
+                {{ item.payName }}:
+              </div>
+            </td>
+            <td>
+              <div
+                v-for="(item, index) in pdfData.contractProjectList"
+                :key="item.id"
+              >
+                {{ pdfData.currency }}
+                {{ moneyFormat(item.amount, 2) }}
+              </div>
+            </td>
+          </tr>
+        </template>
+        <tr>
+          <td colspan="6" style="text-align: right">Total Amount:</td>
+          <td>
+            {{ pdfData.currency }}
+            {{ moneyFormat(pdfData.totalAmount, 2) }}
+          </td>
+        </tr>
+        <tr>
+          <td colspan="6" style="text-align: right">
+            Deposit( {{ pdfData.advanceRatio }} %):
+          </td>
+          <td>{{ pdfData.currency }} {{ getBalance(pdfData.advanceRatio) }}</td>
+        </tr>
+        <tr>
+          <td colspan="6" style="text-align: right">
+            Balance( {{ pdfData.advanceRatioOne }} %):
+          </td>
+          <td>
+            {{ pdfData.currency }} {{ getBalance(pdfData.advanceRatioOne) }}
+          </td>
+        </tr>
+        <tr>
+          <td colspan="7" style="padding: 0; background: #7f197f">
+            <div style="height: 15px"></div>
+          </td>
+        </tr>
+        <!-- 其他内容 -->
+        <tr>
+          <td style="text-align: left">1.Lead Time:</td>
+          <td colspan="6" style="text-align: left">
+            {{ pdfData.deliveryTime }}
+          </td>
+        </tr>
+        <tr>
+          <td style="text-align: left">2.Payment Term:</td>
+          <td colspan="6" style="text-align: left">
+            <div v-html="pdfData.remark"></div>
+          </td>
+        </tr>
+        <tr>
+          <td style="text-align: left">3.Shipping Mode</td>
+          <td colspan="6" style="text-align: left">
+            {{ dictValueLabel(pdfData.transportMethod, shippingMethod) }}
+          </td>
+        </tr>
+        <tr>
+          <td style="text-align: left">4.Insurance</td>
+          <td colspan="6" style="text-align: left">By Buyer</td>
+        </tr>
+        <tr>
+          <td style="text-align: left">5.Banking Info</td>
+          <td colspan="6" style="text-align: left">
+            <div>Beneficiary Name: {{ pdfData.beneficiaryName }}</div>
+            <div>Beneficiary Bank: {{ pdfData.beneficiaryBank }}</div>
+            <div>
+              Beneficiary Bank Address:
+              {{ pdfData.beneficiaryBankAddress }}
+            </div>
+            <div>
+              Beneficiary Account Number:
+              {{ pdfData.beneficiaryAccountNumber }}
+            </div>
+            <div>Swift Code: {{ pdfData.swiftCode }}</div>
+            <div>Beneficiary Address: {{ pdfData.beneficiaryAddress }}</div>
+          </td>
+        </tr>
+        <tr>
+          <td style="text-align: left">6.Important Clauses:</td>
+          <td colspan="6" style="text-align: left">
+            A:Making payment will be considered as confirmation and
+            countersignature of this order. Order can not be canceled after
+            confirmation and countersignature except acceptance by the seller.
+            The Buyer has obligation to make full payment of order including
+            canceled orders.
+            <br />
+            B:The seller should not be responsible for the delay cause by the
+            buyer and force majeure.
+            <br />
+            C:Modification of products will not be allowed after the deposit has
+            been arranged unless acceptance by the seller. All costs and
+            <br />consequences arising from modifying the product or other
+            things will be borne by the buyer.
+            <br />
+            D:Packging details including shipping marks, barcodes, artworks,etc
+            .should be provided 30 days before cargo readty agreed by both
+            <br />parties.The delay caused by the buyer's failure to submit the
+            packaging materials on time will be borne the buyer.
+            <br />
+            E: Shipping information including consignee and notify party,
+            discharge port, loading port ects should be provided 20 before
+            cargo<br />
+            ready date. The delay caused by the buyer's failure to provide
+            shipping information on time will be borne by the buyer.
+            <br />
+            F:Please notify the seller of the special requirements of shipping
+            documents and certificates when placing an order.
+          </td>
+        </tr>
+        <!-- 盖章 -->
+        <tr>
+          <td colspan="3" style="text-align: left">
+            The Buyer's Signature
+            <div style="width: 200px; height: 200px"></div>
+          </td>
+          <td colspan="4" style="text-align: left">
+            The Seller's Signature
+            <div style="width: 200px; height: 200px">
+              <img
+                v-if="pdfData.companySeal && isShowImg"
+                :src="pdfData.companySeal"
+                alt=""
+                fit="scale-down"
+                style="height: 200px; width: 200px"
+              />
+            </div>
+          </td>
+        </tr>
+      </table>
+    </div>
+  </div>
+</template>
+
+<script setup>
+import { NumberToChinese } from "@/utils/util.js";
+import { watch } from "vue";
+import $ from "jquery";
+
+const { proxy } = getCurrentInstance();
+const pdfData = ref({});
+const props = defineProps({
+  rowData: Object,
+});
+const loading = ref(false);
+const getPdfData = (query) => {
+  loading.value = true;
+  proxy.post("/contract/getContractPdfInfo", query).then((res) => {
+    pdfData.value = res;
+    if (pdfData.value.advanceRatio) {
+      pdfData.value.advanceRatio = parseFloat(
+        pdfData.value.advanceRatio
+      ).toFixed(2);
+      pdfData.value.advanceRatioOne = (
+        100 - Number(pdfData.value.advanceRatio)
+      ).toFixed(2);
+    }
+    if (pdfData.value.sellCorporationId) {
+      proxy
+        .post("/fileInfo/getList", {
+          businessIdList: [pdfData.value.sellCorporationId],
+          fileType: 1,
+        })
+        .then((fileObj) => {
+          proxy
+            .getImgBase64(fileObj[pdfData.value.sellCorporationId][0].fileUrl)
+            .then((res) => {
+              pdfData.value.companyPic = res;
+            });
+        });
+      proxy
+        .post("/fileInfo/getList", {
+          businessIdList: [pdfData.value.sellCorporationId],
+          fileType: 4,
+        })
+        .then((fileObj) => {
+          proxy
+            .getImgBase64(fileObj[pdfData.value.sellCorporationId][0].fileUrl)
+            .then((res) => {
+              pdfData.value.companySeal = res;
+            });
+        });
+    }
+    loading.value = false;
+    // 拿取产品图
+    if (
+      pdfData.value.productInfoList &&
+      pdfData.value.productInfoList.length > 0
+    ) {
+      let arr = pdfData.value.productInfoList.map((x) => x.productId);
+      proxy
+        .post("/fileInfo/getList", {
+          businessIdList: arr,
+        })
+        .then(async (fileObj) => {
+          for (let i = 0; i < pdfData.value.productInfoList.length; i++) {
+            const e = pdfData.value.productInfoList[i];
+            for (const key in fileObj) {
+              if (e.productId === key) {
+                if (fileObj[key] && fileObj[key].length > 0) {
+                  const res = await proxy.getImgBase64(fileObj[key][0].fileUrl);
+                  fileObj[key][0].fileUrl = res;
+                  e.fileList = fileObj[key];
+                }
+              }
+            }
+          }
+        });
+    }
+  });
+};
+const productUnit = ref([]);
+const tradeMethods = ref([]);
+const shippingMethod = ref([]);
+const getDict = () => {
+  proxy.getDictOne(["trade_mode", "shipping_method", "unit"]).then((res) => {
+    tradeMethods.value = res["trade_mode"].map((x) => ({
+      label: x.dictValue,
+      value: x.dictKey,
+    }));
+    shippingMethod.value = res["shipping_method"].map((x) => ({
+      label: x.dictValue,
+      value: x.dictKey,
+    }));
+    productUnit.value = res["unit"].map((x) => ({
+      label: x.dictValue,
+      value: x.dictKey,
+    }));
+  });
+};
+getDict();
+const getBalance = (val) => {
+  if (val) {
+    return proxy.moneyFormat(
+      parseFloat(pdfData.value.totalAmount * (val / 100)).toFixed(2),
+      2
+    );
+  }
+};
+const isShowImg = ref(true);
+const exportExcel = () => {
+  isShowImg.value = false;
+  loading.value = true;
+  setTimeout(() => {
+    $("#pdfDom").table2excel({
+      exclude: ".noExl",
+      sheetName: `外销合同${pdfData.value.contractCode}`,
+      filename: `外销合同${pdfData.value.contractCode}`,
+      exclude_img: false,
+      exclude_links: false,
+      exclude_inputs: true,
+    });
+    isShowImg.value = true;
+    loading.value = false;
+  }, 500);
+};
+
+defineExpose({
+  exportExcel,
+});
+
+watch(
+  () => props.rowData,
+  (val) => {
+    if (props.rowData.id) {
+      getPdfData({ id: props.rowData.id });
+    } else if (props.rowData.code) {
+      getPdfData({ code: props.rowData.code });
+    }
+  },
+  {
+    immediate: true,
+    deep: true,
+  }
+);
+</script>
+
+<style lang="scss" scoped>
+.color-class {
+  color: #7f197f;
+}
+.bck {
+  background: #7f197f;
+}
+.width-one {
+  width: 140px;
+}
+.table {
+  border-collapse: collapse;
+  border-spacing: 0;
+
+  td {
+    text-align: center;
+    padding: 2px 4px;
+    // padding: 5px 10px;
+  }
+}
+</style>

+ 401 - 0
src/components/PDF/purchasePDFOneNew.vue

@@ -0,0 +1,401 @@
+<template>
+  <div>
+    <div id="pdfDom" ref="pdfDom" style="width: 840px" v-loading="loading">
+      <table style="width: 100%" class="table">
+        <tr>
+          <td style="width: 15%">
+            <img
+              :src="pdfData.companyPic"
+              alt=""
+              fit="scale-down"
+              style="height: 60px; width: 60px"
+              v-if="pdfData.companyPic && isShowImg"
+            />
+          </td>
+          <td colspan="5">
+            <div style="font-size: 16px; color: #8497b0; font-weight: 700">
+              {{ pdfData.buyCorporationName }}
+            </div>
+            <div>
+              Add:
+              {{ pdfData.buyAddress }} , {{ pdfData.buyCityName }} ,
+              {{ pdfData.buyProvinceName }} , {{ pdfData.buyCountryName }} ,
+              {{ pdfData.buyPostalCode }}
+            </div>
+            <div>
+              TEL: {{ pdfData.buyContactNumber }}
+              <span style="margin: 0 10px">FAX:0591-38165700</span>
+              WEB:https://www.bridgestylefurnishings.com/
+            </div>
+          </td>
+        </tr>
+        <tr>
+          <td
+            colspan="6"
+            style="padding-top: 30px; font-size: 16px; font-weight: 700"
+          >
+            采购合同
+          </td>
+        </tr>
+        <tr>
+          <td colspan="6" style="padding: 10px 0px 20px 0px">
+            {{ pdfData.code }}
+          </td>
+        </tr>
+        <tr>
+          <td colspan="3" style="text-align: left">
+            甲方: <br />
+            公司名称:{{ pdfData.buyCorporationName }}<br />
+            联系人:{{ pdfData.buyContactName }} <br />
+            电话:{{ pdfData.buyContactNumber }}
+          </td>
+          <td colspan="3">
+            <div style="float: right">
+              乙方: <br />
+              公司名称:{{ pdfData.sellCorporationName }} <br />
+              联系人:{{ pdfData.sellContactName }}<br />
+              电话:{{ pdfData.sellContactNumber }}
+            </div>
+          </td>
+        </tr>
+      </table>
+      <table border="1" style="width: 100%" class="table">
+        <tr>
+          <td style="width: 15%">产品图片</td>
+          <td style="width: 20%">产品名称</td>
+          <td style="width: 15%">尺寸cm</td>
+          <td style="width: 17%">数量</td>
+          <td style="width: 16%">单价</td>
+          <td style="width: 17%">总价</td>
+        </tr>
+        <template
+          v-if="
+            pdfData.ehsdPurchaseProductList &&
+            pdfData.ehsdPurchaseProductList.length > 0
+          "
+        >
+          <tr v-for="item in pdfData.ehsdPurchaseProductList" :key="item.id">
+            <td>
+              <img
+                :src="item.fileList[0].fileUrl"
+                alt=""
+                fit="scale-down"
+                style="height: 60px; width: 60px"
+                v-if="item.fileList && item.fileList.length > 0 && isShowImg"
+              />
+            </td>
+
+            <td>
+              {{ item.productName }}
+            </td>
+            <td>
+              {{ item.productModel }}
+            </td>
+            <td>
+              {{ item.quantity }}
+            </td>
+            <td>{{ pdfData.currency }} {{ item.price }}</td>
+            <td>{{ pdfData.currency }} {{ moneyFormat(item.amount, 2) }}</td>
+          </tr>
+        </template>
+        <template
+          v-if="
+            pdfData.purchaseProjectList &&
+            pdfData.purchaseProjectList.length > 0
+          "
+        >
+          <tr>
+            <td colspan="5" style="text-align: right">
+              <div
+                v-for="(item, index) in pdfData.purchaseProjectList"
+                :key="item.id"
+              >
+                {{ item.payName }}:
+              </div>
+            </td>
+            <td>
+              <div
+                v-for="(item, index) in pdfData.purchaseProjectList"
+                :key="item.id"
+              >
+                {{ pdfData.currency }}
+                {{ moneyFormat(item.amount, 2) }}
+              </div>
+            </td>
+          </tr>
+        </template>
+
+        <tr>
+          <td colspan="5" style="text-align: right">合计:</td>
+          <td>{{ pdfData.currency }} {{ moneyFormat(pdfData.amount, 2) }}</td>
+        </tr>
+        <tr>
+          <td colspan="6" style="text-align: left">
+            大写: {{ NumberToChinese(pdfData.amount) }}
+          </td>
+        </tr>
+        <tr>
+          <td style="text-align: left">乙方收款账户:</td>
+          <td colspan="5" style="text-align: left">
+            银行: {{ pdfData.openingBank }}<br />
+            账户名: {{ pdfData.openingName }}<br />
+            联系人: {{ pdfData.contactPerson }}<br />
+            账户: {{ pdfData.accountOpening }}
+          </td>
+        </tr>
+        <tr>
+          <td style="text-align: left">收货地址:</td>
+          <td colspan="5" style="text-align: left">
+            {{ pdfData.address }}
+          </td>
+        </tr>
+        <tr>
+          <td style="text-align: left">交货日期:</td>
+          <td colspan="5" style="text-align: left">
+            <span v-if="pdfData.deliveryTime">{{
+              pdfData.deliveryTime.slice(0, 10)
+            }}</span>
+          </td>
+        </tr>
+        <tr>
+          <td style="text-align: left">付款方式:</td>
+          <td colspan="5" style="text-align: left">
+            {{ dictValueLabel(pdfData.paymentMethod, fundsPaymentMethod) }}
+          </td>
+        </tr>
+        <tr>
+          <td colspan="6" style="text-align: left">
+            <div>
+              二、相关约定 <br />
+              1.所有与食品直接接触的产品,如菜板,芝士板需通过食品级测试,(LFGB测试-过甲醛和重金属测试)。请
+              各供应商在采购板材和生产过程中务必使用合格的胶水和油漆等,否则客户会取消订单或由此产生的费用由工厂承担。
+              <br />
+              2.供货方应在收到订单后的一个有效工作日内回复确认,否则视供方默认订单条款。<br />
+              3.需在7个工作日内提供1套产前确认样给我方确认。<br />
+              4.产品应无碰伤,无开裂,无缺口,无毛刺,不得有不平整不光滑现象。<br />
+              5.必须按规定日期和双方确认的品质标准交货。如由于工厂的交期延期,导致客户取消订单或者由此产生额外费用
+              ,全由工厂承担。<br />
+              6.包装前须将产品上灰尘清理干净,做好清洁工作。<br />
+              7.如有合同附件,同样具有法律效力。本合同壹式两份,双方各执壹份,合同传真件与正本具有同等法津效力。<br />
+              8.如果我司的产品的结构有不合理,请工厂告知!<br />
+              9.竹子湿度控制在12%以下,如有需要的可配合一包干燥剂,避免霉变。<br />
+              10.订单出货后,每单每款产品需提供2个不计价大货样给我司,未提供,则每单扣款500元,且货款暂缓。<br />
+              三、违约责任
+              <br />1.
+              如因质量问题导致交货期延迟,或因产品结构及包装等造成的返工损失由供方自负。因质量或交期导致需方客
+              户的索赔由供方承担(质量标准经由需方或第三方出厂前出具验货报告为准)。<br />
+              2.
+              如在约定时间内无法完成订单供客人验货,或因验货不合格而造成客人产生额外费用,将由供方承担。<br />
+              3.
+              逾期交货(含合格品数量不足,)的,按合同总额的千分之五支付日违约金至履约日(不含需方不能及时提供
+              的约定材料或相关资料导致的逾期)。逾期交货15日的,需方有权解除合同,供方应按合同总额的30%支付违约金
+              。<br />
+              四、合同发生争议时,双方应协商解决,协商不成时,任何一方均可向当地人民法院起诉。
+            </div>
+          </td>
+        </tr>
+        <tr>
+          <td colspan="3" style="text-align: left">
+            甲方:<br />
+            {{ pdfData.buyCorporationName }}
+          </td>
+          <td colspan="3" style="text-align: left">
+            乙方:<br />
+            {{ pdfData.sellCorporationName }}
+          </td>
+        </tr>
+        <tr>
+          <td colspan="6" style="padding: 0">
+            <!-- background: #7f197f -->
+            <div style="height: 20px"></div>
+          </td>
+        </tr>
+        <tr>
+          <td colspan="2">产品名称</td>
+          <td colspan="2">出货时间</td>
+          <td colspan="2">出货数量</td>
+        </tr>
+        <template
+          v-if="
+            pdfData.purchaseArrivalList &&
+            pdfData.purchaseArrivalList.length > 0
+          "
+        >
+          <tr v-for="item in pdfData.purchaseArrivalList" :key="item.id">
+            <td colspan="2">
+              {{ item.productName }}
+            </td>
+            <td colspan="2">
+              <span v-if="item.arrivalTime"
+                >{{ item.arrivalTime.slice(0, 10) }}
+              </span>
+            </td>
+            <td colspan="2">{{ item.quantity }}</td>
+          </tr>
+        </template>
+
+        <tr>
+          <td colspan="6" style="padding: 0">
+            <!-- background: #7f197f -->
+            <div style="height: 20px"></div>
+          </td>
+        </tr>
+        <template
+          v-for="item in pdfData.ehsdPurchaseProductList"
+          :key="item.id"
+        >
+          <tr>
+            <td colspan="6" style="font-weight: 700">{{ item.productName }}</td>
+          </tr>
+          <tr>
+            <td colspan="6" style="text-align: left">
+              <div v-if="item.remark">
+                <span v-html="item.remark"></span>
+              </div>
+              <div v-else style="height: 15px"></div>
+            </td>
+          </tr>
+        </template>
+      </table>
+    </div>
+  </div>
+</template>
+
+<script setup>
+import { NumberToChinese } from "@/utils/util.js";
+import $ from "jquery";
+
+const { proxy } = getCurrentInstance();
+const pdfData = ref({});
+const props = defineProps({
+  rowData: Object,
+});
+const loading = ref(false);
+const fundsPaymentMethod = ref([]);
+proxy.getDictOne(["unit", "funds_payment_method"]).then((res) => {
+  fundsPaymentMethod.value = res["funds_payment_method"].map((x) => ({
+    label: x.dictValue,
+    value: x.dictKey,
+  }));
+});
+
+const getHtml = (str) => {
+  if (str) {
+    let newStr = str.replace(/<p\b/gi, "<div"); // 使用正则表达式替换<p>为<div
+    return newStr.replace(/<\/p>/gi, "</div>"); // 使用正则表达式替换</p>为</div>
+  }
+};
+
+const handlePrintPdf = (row) => {
+  loading.value = true;
+  proxy.post("/ehsdPurchase/detail", { id: row.id }).then((res) => {
+    pdfData.value = res;
+    // 拿去多公司配置的logo图
+    if (pdfData.value.buyCorporationId) {
+      proxy
+        .post("/fileInfo/getList", {
+          businessIdList: [pdfData.value.buyCorporationId],
+          fileType: 1,
+        })
+        .then((fileObj) => {
+          proxy
+            .getImgBase64(fileObj[pdfData.value.buyCorporationId][0].fileUrl)
+            .then((res) => {
+              pdfData.value.companyPic = res;
+            });
+        });
+    }
+    loading.value = false;
+    // 拿取产品图
+    let arr = [];
+    for (let i = 0; i < pdfData.value.ehsdPurchaseProductList.length; i++) {
+      const e = pdfData.value.ehsdPurchaseProductList[i];
+      if (
+        e.purchaseProductMountingsList &&
+        e.purchaseProductMountingsList.length > 0
+      ) {
+        arr = arr.concat(e.purchaseProductMountingsList);
+      }
+    }
+    pdfData.value.ehsdPurchaseProductList = arr;
+    if (
+      pdfData.value.ehsdPurchaseProductList &&
+      pdfData.value.ehsdPurchaseProductList.length > 0
+    ) {
+      let arr = pdfData.value.ehsdPurchaseProductList.map((x) => x.productId);
+      proxy
+        .post("/fileInfo/getList", {
+          businessIdList: arr,
+        })
+        .then(async (fileObj) => {
+          for (
+            let i = 0;
+            i < pdfData.value.ehsdPurchaseProductList.length;
+            i++
+          ) {
+            const e = pdfData.value.ehsdPurchaseProductList[i];
+            for (const key in fileObj) {
+              if (e.productId === key) {
+                if (fileObj[key] && fileObj[key].length > 0) {
+                  const res = await proxy.getImgBase64(fileObj[key][0].fileUrl);
+                  fileObj[key][0].fileUrl = res;
+                  e.fileList = fileObj[key];
+                }
+              }
+            }
+          }
+        });
+    }
+  });
+};
+
+if (props.rowData && props.rowData.id) {
+  handlePrintPdf(props.rowData);
+}
+
+const isShowImg = ref(true);
+const exportExcel = () => {
+  isShowImg.value = false;
+  loading.value = true;
+  setTimeout(() => {
+    $("#pdfDom").table2excel({
+      exclude: ".noExl",
+      sheetName: `采购合同${pdfData.value.code}`,
+      filename: `采购合同${pdfData.value.code}`,
+      exclude_img: false,
+      exclude_links: false,
+      exclude_inputs: true,
+    });
+    isShowImg.value = true;
+    loading.value = false;
+  }, 500);
+};
+
+defineExpose({
+  exportExcel,
+});
+
+watch(
+  () => props.rowData.id,
+  (val) => {
+    if (props.rowData && props.rowData.id) {
+      handlePrintPdf(props.rowData);
+    }
+  }
+);
+</script>
+
+<style lang="scss" scoped>
+#pdfDom {
+  font-size: 13px;
+  padding: 30px 60px;
+}
+.table {
+  border-collapse: collapse;
+  border-spacing: 0;
+  td {
+    padding: 2px 5px;
+    text-align: center;
+  }
+}
+</style>

+ 304 - 0
src/components/PDF/samplePDFNew.vue

@@ -0,0 +1,304 @@
+<template>
+  <div>
+    <div
+      id="pdfDom"
+      ref="pdfDom"
+      style="padding: 30px 60px"
+      v-loading="loading"
+    >
+      <table border="1" style="width: 100%" class="table">
+        <tr>
+          <td>
+            <img
+              :src="pdfData.companyPic"
+              alt=""
+              fit="scale-down"
+              style="height: 60px; width: 60px"
+              v-if="isShowImg"
+            />
+          </td>
+          <td style="padding: 10px" colspan="5">
+            <div style="font-size: 18px; color: #7f197f">
+              {{ pdfData.sellCorporationNameEn }}
+            </div>
+            <div style="font-size: 18px; color: #7f197f">
+              {{ pdfData.sellCorporationName }}
+            </div>
+
+            <div style="font-size: 14px; color: #000">
+              Address: {{ pdfData.sellDetailedAddressEn }}
+            </div>
+            <div style="font-size: 14px; color: #000; margin-top: 5px">
+              {{ pdfData.sellCityNameEn }} , {{ pdfData.sellProvinceNameEn }} ,
+              {{ pdfData.sellCountryNameEn }}
+            </div>
+            <div style="font-size: 14px; color: #000; margin-top: 10px">
+              地址: {{ pdfData.sellCountryName }} ,
+              {{ pdfData.sellProvinceName }} , {{ pdfData.sellCityName }}
+            </div>
+            <div style="font-size: 14px; color: #000; margin-top: 5px">
+              {{ pdfData.sellDetailedAddress }}
+            </div>
+            <div style="margin: 8px 0; color: black">
+              Tel: <span>{{ pdfData.sellContactNumber }}</span>
+              <!-- Fax:
+              <span>{{ pdfData.fax }}</span>
+               Website:
+              <span>{{ pdfData.Website }}</span> -->
+            </div>
+          </td>
+        </tr>
+        <tr>
+          <td colspan="6">
+            <div style="text-align: center; font-size: 18px; color: #7f197f">
+              Sample Proforma Invoice
+            </div>
+          </td>
+        </tr>
+        <tr>
+          <td colspan="6" style="padding: 0; background: #7f197f">
+            <div style="height: 15px"></div>
+          </td>
+        </tr>
+        <tr>
+          <td style="text-align: left" colspan="3">
+            Buyer: {{ pdfData.buyCorporationName }}
+          </td>
+          <td style="text-align: left" colspan="3">
+            Seller: {{ pdfData.sellCorporationNameEn }}
+          </td>
+        </tr>
+        <tr>
+          <td>Sample PI No</td>
+          <td colspan="2">{{ pdfData.contractCode }}</td>
+          <td>Date:</td>
+          <td colspan="2">{{ pdfData.createTimeEn }}</td>
+        </tr>
+        <tr>
+          <td>Contact Person:</td>
+          <td colspan="2">{{ pdfData.createUserNameEn }}</td>
+          <td>Email:</td>
+          <td colspan="2">
+            {{ pdfData.createUserEmail }}
+          </td>
+        </tr>
+        <tr>
+          <td>Payment Teams:</td>
+          <td colspan="2">{{ pdfData.remark }}</td>
+          <td>Lead Time:</td>
+          <td colspan="2">{{ pdfData.deliveryTime }}</td>
+        </tr>
+        <tr>
+          <td colspan="6" style="padding: 0; background: #7f197f">
+            <div style="height: 15px"></div>
+          </td>
+        </tr>
+        <tr>
+          <td style="width: 15%">Image</td>
+          <td style="width: 20%">Description</td>
+          <td style="width: 15%">Size</td>
+          <td style="width: 15%">Quantity</td>
+          <td style="width: 17%">Sample <br />Fee</td>
+          <td style="width: 18%">Total <br />Amount</td>
+        </tr>
+
+        <tr
+          v-if="pdfData.productInfoList && pdfData.productInfoList.length > 0"
+          v-for="(item, index) in pdfData.productInfoList"
+          :key="item.productId"
+        >
+          <td style="width: 15%">
+            <img
+              :src="item.fileList[0].fileUrl"
+              alt=""
+              fit="scale-down"
+              style="height: 60px; width: 60px"
+              v-if="item.fileList && item.fileList.length > 0 && isShowImg"
+            />
+          </td>
+          <td style="width: 20%">{{ item.productName }}</td>
+          <td style="width: 15%">
+            <span v-if="item.productModel">{{ item.productModel }} cm</span>
+          </td>
+          <td style="width: 15%">
+            {{ item.productQuantity }}
+          </td>
+          <td style="width: 17%">
+            {{ pdfData.currency }} {{ moneyFormat(item.productPrice, 2) }}
+          </td>
+          <td style="width: 18%">
+            {{ pdfData.currency }} {{ moneyFormat(item.amount, 2) }}
+          </td>
+        </tr>
+        <template
+          v-if="
+            pdfData.sampleProjectList && pdfData.sampleProjectList.length > 0
+          "
+        >
+          <tr>
+            <td colspan="5" style="text-align: right">
+              <div
+                v-for="(item, index) in pdfData.sampleProjectList"
+                :key="item.id"
+              >
+                {{ item.payName }}:
+              </div>
+            </td>
+            <td class="center-class">
+              <div
+                v-for="(item, index) in pdfData.sampleProjectList"
+                :key="item.id"
+              >
+                {{ pdfData.currency }}
+                {{ moneyFormat(item.amount, 2) }}
+              </div>
+            </td>
+          </tr>
+        </template>
+        <tr>
+          <td colspan="5" style="text-align: right">Total Amount:</td>
+          <td style="width: 10%">
+            {{ pdfData.currency }}
+            {{ moneyFormat(pdfData.totalAmount, 2) }}
+          </td>
+        </tr>
+        <tr>
+          <td colspan="6" style="padding: 0; background: #7f197f">
+            <div style="height: 15px"></div>
+          </td>
+        </tr>
+        <tr>
+          <td style="text-align: left">5.Banking Info</td>
+          <td style="text-align: left" colspan="5">
+            <div>Beneficiary Name: {{ pdfData.beneficiaryName }}</div>
+            <div>Beneficiary Bank: {{ pdfData.beneficiaryBank }}</div>
+            <div>
+              Beneficiary Bank Address:
+              {{ pdfData.beneficiaryBankAddress }}
+            </div>
+            <div>
+              Beneficiary Account Number:
+              {{ pdfData.beneficiaryAccountNumber }}
+            </div>
+            <div>Swift Code: {{ pdfData.swiftCode }}</div>
+            <div>Beneficiary Address: {{ pdfData.beneficiaryAddress }}</div>
+          </td>
+        </tr>
+      </table>
+    </div>
+  </div>
+</template>
+
+<script setup>
+import { NumberToChinese } from "@/utils/util.js";
+import { watch } from "vue";
+import $ from "jquery";
+const { proxy } = getCurrentInstance();
+const pdfData = ref({});
+const props = defineProps({
+  rowData: Object,
+});
+const loading = ref(false);
+const getPdfData = (query) => {
+  loading.value = true;
+  proxy.post("/sample/getSamplePdfInfo", query).then((res) => {
+    pdfData.value = res;
+    if (pdfData.value.sellCorporationId) {
+      proxy
+        .post("/fileInfo/getList", {
+          businessIdList: [pdfData.value.sellCorporationId],
+          fileType: 1,
+        })
+        .then((fileObj) => {
+          proxy
+            .getImgBase64(fileObj[pdfData.value.sellCorporationId][0].fileUrl)
+            .then((res) => {
+              pdfData.value.companyPic = res;
+            });
+        });
+    }
+    loading.value = false;
+    // 拿取产品图
+    if (
+      pdfData.value.productInfoList &&
+      pdfData.value.productInfoList.length > 0
+    ) {
+      let arr = pdfData.value.productInfoList.map((x) => x.productId);
+      proxy
+        .post("/fileInfo/getList", {
+          businessIdList: arr,
+        })
+        .then(async (fileObj) => {
+          for (let i = 0; i < pdfData.value.productInfoList.length; i++) {
+            const e = pdfData.value.productInfoList[i];
+            for (const key in fileObj) {
+              if (e.productId === key) {
+                if (fileObj[key] && fileObj[key].length > 0) {
+                  const res = await proxy.getImgBase64(fileObj[key][0].fileUrl);
+                  fileObj[key][0].fileUrl = res;
+                  e.fileList = fileObj[key];
+                }
+              }
+            }
+          }
+        });
+    }
+  });
+};
+const isShowImg = ref(true);
+const exportExcel = () => {
+  isShowImg.value = false;
+  loading.value = true;
+  setTimeout(() => {
+    $("#pdfDom").table2excel({
+      exclude: ".noExl",
+      sheetName: `样品单${pdfData.value.contractCode}`,
+      filename: `样品单${pdfData.value.contractCode}`,
+      exclude_img: false,
+      exclude_links: false,
+      exclude_inputs: true,
+    });
+    isShowImg.value = true;
+    loading.value = false;
+  }, 500);
+};
+
+defineExpose({
+  exportExcel,
+});
+
+watch(
+  () => props.rowData,
+  () => {
+    if (props.rowData.id) {
+      getPdfData({ id: props.rowData.id });
+    }
+  },
+  {
+    immediate: true,
+    deep: true,
+  }
+);
+</script>
+
+<style lang="scss" scoped>
+.color-class {
+  color: #7f197f;
+}
+.bck {
+  background: #7f197f;
+}
+.width-one {
+  width: 140px;
+}
+.table {
+  border-collapse: collapse;
+  border-spacing: 0;
+
+  td {
+    text-align: center;
+    padding: 2px 4px;
+    // padding: 5px 10px;
+  }
+}
+</style>

+ 6 - 2
src/components/contractCom/contractDetails.vue

@@ -44,7 +44,8 @@
             <ApprovalDetails :query="approvalData"></ApprovalDetails>
           </div>
           <div v-if="activeName === 'second'">
-            <PurchasePDFOne :rowData="rowDataOne"></PurchasePDFOne>
+            <!-- <PurchasePDFOne :rowData="rowDataOne"></PurchasePDFOne> -->
+            <PurchasePDFOneNew :rowData="rowDataOne"></PurchasePDFOneNew>
           </div>
         </div>
         <div v-else style="padding-left: 300px">暂无数据</div>
@@ -73,7 +74,8 @@
     </div>
 
     <el-dialog title="PDF查看" v-if="pdfDialog" v-model="pdfDialog" width="920">
-      <ContractPDFOne :rowData="rowData"></ContractPDFOne>
+      <!-- <ContractPDFOne :rowData="rowData"></ContractPDFOne> -->
+      <ContractPDFOneNew :rowData="rowData" ref="PdfDom"></ContractPDFOneNew>
       <template #footer>
         <el-button @click="pdfDialog = false" size="large">关闭</el-button>
       </template>
@@ -83,7 +85,9 @@
 
 <script setup  >
 import PurchasePDFOne from "@/components/PDF/purchasePDFOne.vue";
+import PurchasePDFOneNew from "@/components/PDF/purchasePDFOneNew.vue";
 import ContractPDFOne from "@/components/PDF/contractPDFOne.vue";
+import ContractPDFOneNew from "@/components/PDF/contractPDFOneNew.vue";
 import ApprovalDetails from "@/views/process/processApproval/index.vue";
 
 import byTable from "@/components/byTable/index";

+ 6 - 2
src/components/contractCom/contractDetailsOne.vue

@@ -47,7 +47,8 @@
             <ApprovalDetails :query="approvalData"></ApprovalDetails>
           </div>
           <div v-if="activeName === 'second'">
-            <PurchasePDFOne :rowData="rowDataOne"></PurchasePDFOne>
+            <!-- <PurchasePDFOne :rowData="rowDataOne"></PurchasePDFOne> -->
+            <PurchasePDFOneNew :rowData="rowDataOne"></PurchasePDFOneNew>
           </div>
         </div>
         <div v-else style="padding-left: 300px">暂无数据</div>
@@ -75,7 +76,8 @@
       </byTable>
     </div>
     <el-dialog title="PDF查看" v-if="pdfDialog" v-model="pdfDialog" width="920">
-      <SamplePDF :rowData="rowData"></SamplePDF>
+      <!-- <SamplePDF :rowData="rowData"></SamplePDF> -->
+      <SamplePDFNew :rowData="rowData" ref="PdfDom"></SamplePDFNew>
       <template #footer>
         <el-button @click="pdfDialog = false" size="large">关闭</el-button>
       </template>
@@ -85,7 +87,9 @@
 
 <script setup>
 import PurchasePDFOne from "@/components/PDF/purchasePDFOne.vue";
+import PurchasePDFOneNew from "@/components/PDF/purchasePDFOneNew.vue";
 import SamplePDF from "@/components/PDF/samplePDF.vue";
+import SamplePDFNew from "@/components/PDF/samplePDFNew.vue";
 import byTable from "@/components/byTable/index";
 import ApprovalDetails from "@/views/process/processApproval/index.vue";
 

+ 0 - 14
src/components/contractCom/selectContract.vue

@@ -92,19 +92,6 @@
       </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>
-
     <el-dialog
       title="交接单"
       v-if="openHandoverSlip"
@@ -175,7 +162,6 @@ import byForm from "@/components/byForm/index";
 import useUserStore from "@/store/modules/user";
 import { ElMessage, ElMessageBox } from "element-plus";
 import ContractDetails from "@/components/contractCom/contractDetails.vue";
-import ContractPDFOne from "@/components/PDF/contractPDFOne.vue";
 
 const { proxy } = getCurrentInstance();
 const accountCurrency = ref([]);

+ 7 - 1
src/components/process/EHSD/Purchase.vue

@@ -362,12 +362,18 @@
                   <span>金额小计: {{ item.amount }}</span>
                 </el-col>
                 <el-col :span="2">
-                  <el-button
+                  <!-- <el-button
                     type="primary"
                     text
                     @click="handleHandover(item, index)"
                     >编辑备注</el-button
+                  > -->
+                  <div
+                    style="color: #409eff; cursor: pointer"
+                    @click="handleHandover(item, index)"
                   >
+                    编辑备注
+                  </div>
                 </el-col>
                 <el-col :span="2">
                   <el-button type="primary" text @click="handleMaterial(index)"

+ 1 - 1
src/utils/table2excel.js

@@ -6,7 +6,7 @@
  *  Made by rainabba
  *  Under MIT License
  */
-//table2excel.js
+//table2excel.js 此导出方法如需样式生效,请把行内样式写在td身上
 import jQuery from 'jquery';
 (function ($, window, document, undefined) {
   var pluginName = 'table2excel',

+ 13 - 2
src/views/EHSD/procurement/purchasedEHSD/index.vue

@@ -40,7 +40,8 @@
       </template>
     </byTable>
     <el-dialog title="打印" v-if="openPdf" v-model="openPdf" width="900px">
-      <PurchasePDFOne :rowData="rowData"></PurchasePDFOne>
+      <!-- <PurchasePDFOne :rowData="rowData"></PurchasePDFOne> -->
+      <PurchasePDFOneNew :rowData="rowData" ref="PdfDom"></PurchasePDFOneNew>
       <template #footer ref="printBtn">
         <el-button @click="openPdf = false" size="large">关闭</el-button>
         <el-button type="primary" v-print="printObj" size="large"
@@ -49,6 +50,9 @@
         <el-button type="primary" @click="clickDownload()" size="large"
           >下载PDF</el-button
         >
+        <el-button type="primary" @click="exportExcel()" size="large"
+          >导出Excel</el-button
+        >
       </template>
     </el-dialog>
   </div>
@@ -59,6 +63,8 @@ import { computed, ref } from "vue";
 import byTable from "@/components/byTable/index";
 import { ElMessage, ElMessageBox } from "element-plus";
 import PurchasePDFOne from "@/components/PDF/purchasePDFOne.vue";
+import PurchasePDFOneNew from "@/components/PDF/purchasePDFOneNew.vue";
+
 const route = useRoute();
 const { proxy } = getCurrentInstance();
 const supplierList = ref([]);
@@ -262,7 +268,7 @@ const config = computed(() => {
                     }
                   ).then(() => {
                     proxy
-                      .post("/ehsdPurchase/edit", {
+                      .post("/ehsdPurchase/cancellation", {
                         id: row.id,
                         status: 88,
                       })
@@ -411,6 +417,11 @@ const handleChange = (row) => {
     },
   });
 };
+
+const PdfDom = ref(null);
+const exportExcel = () => {
+  PdfDom.value.exportExcel();
+};
 </script>
 
 <style lang="scss" scoped>

+ 16 - 5
src/views/EHSD/saleContract/contractEHSD/index.vue

@@ -98,7 +98,8 @@
     </div>
 
     <el-dialog title="打印" v-if="openPrint" v-model="openPrint" width="920">
-      <ContractPDFOne :rowData="rowData"></ContractPDFOne>
+      <!-- <ContractPDFOne :rowData="rowData"></ContractPDFOne> -->
+      <ContractPDFOneNew :rowData="rowData" ref="PdfDom"></ContractPDFOneNew>
       <template #footer>
         <el-button @click="openPrint = false" size="large">取消</el-button>
         <el-button type="primary" v-print="printObj" size="large"
@@ -107,6 +108,9 @@
         <el-button type="primary" @click="clickDownload()" size="large"
           >下载PDF</el-button
         >
+        <el-button type="primary" @click="exportExcel()" size="large"
+          >导出Excel</el-button
+        >
       </template>
     </el-dialog>
 
@@ -181,6 +185,8 @@ import useUserStore from "@/store/modules/user";
 import { ElMessage, ElMessageBox } from "element-plus";
 import ContractDetails from "@/components/contractCom/contractDetails.vue";
 import ContractPDFOne from "@/components/PDF/contractPDFOne.vue";
+import ContractPDFOneNew from "@/components/PDF/contractPDFOneNew.vue";
+
 const route = useRoute();
 const { proxy } = getCurrentInstance();
 const accountCurrency = ref([]);
@@ -279,12 +285,12 @@ const config = computed(() => {
     {
       attrs: {
         label: "业务员",
-        prop: "createUser",
+        prop: "userName",
         width: 100,
       },
-      render(type) {
-        return proxy.dictValueLabel(type, userList.value);
-      },
+      // render(type) {
+      //   return proxy.dictValueLabel(type, userList.value);
+      // },
     },
     {
       attrs: {
@@ -820,6 +826,11 @@ const clickAlteration = (row) => {
     },
   });
 };
+
+const PdfDom = ref(null);
+const exportExcel = () => {
+  PdfDom.value.exportExcel();
+};
 </script>
 
 <style lang="scss" scoped>

+ 11 - 17
src/views/EHSD/saleContract/sampleEHSD/index.vue

@@ -159,9 +159,8 @@
     </el-dialog>
 
     <el-dialog title="打印" v-if="openPrint" v-model="openPrint" width="920">
-      <div id="tableId">
-        <SamplePDF :rowData="rowData"></SamplePDF>
-      </div>
+      <!-- <SamplePDF :rowData="rowData"></SamplePDF> -->
+      <SamplePDFNew :rowData="rowData" ref="PdfDom"></SamplePDFNew>
       <template #footer>
         <el-button @click="openPrint = false" size="large">取消</el-button>
         <el-button type="primary" v-print="printObj" size="large"
@@ -170,9 +169,9 @@
         <el-button type="primary" @click="clickDownload()" size="large"
           >下载PDF</el-button
         >
-        <!-- <el-button type="primary" @click="deriveExcel()" size="large"
-          >导出</el-button
-        > -->
+        <el-button type="primary" @click="exportExcel()" size="large"
+          >导出Excel</el-button
+        >
       </template>
     </el-dialog>
   </div>
@@ -186,18 +185,8 @@ import useUserStore from "@/store/modules/user";
 import { ElMessage, ElMessageBox } from "element-plus";
 import ContractDetailsOne from "@/components/contractCom/contractDetailsOne.vue";
 import SamplePDF from "@/components/PDF/samplePDF.vue";
+import SamplePDFNew from "@/components/PDF/samplePDFNew.vue";
 
-import $ from "jquery";
-const deriveExcel = () => {
-  $("#tableId").table2excel({
-    exclude: ".noExl",
-    sheetName: "订单对账单",
-    filename: "订单对账单",
-    exclude_img: false,
-    exclude_links: false,
-    exclude_inputs: true,
-  });
-};
 const route = useRoute();
 const { proxy } = getCurrentInstance();
 const accountCurrency = ref([]);
@@ -841,6 +830,11 @@ const clickAlteration = (row) => {
     },
   });
 };
+
+const PdfDom = ref(null);
+const exportExcel = () => {
+  PdfDom.value.exportExcel();
+};
 </script>
 
 <style lang="scss" scoped>

+ 3 - 1
src/views/customer/portrait/com/SalesDetails.vue

@@ -46,7 +46,8 @@
     </div>
 
     <el-dialog title="打印" v-if="openPrint" v-model="openPrint" width="920">
-      <ContractPDFOne :rowData="rowData"></ContractPDFOne>
+      <!-- <ContractPDFOne :rowData="rowData"></ContractPDFOne> -->
+      <ContractPDFOneNew :rowData="rowData" ref="PdfDom"></ContractPDFOneNew>
       <template #footer>
         <el-button @click="openPrint = false" size="large">取消</el-button>
         <el-button type="primary" v-print="printObj" size="large"
@@ -63,6 +64,7 @@
 <script setup>
 import byTable from "@/components/byTable/index";
 import ContractPDFOne from "@/components/PDF/contractPDFOne.vue";
+import ContractPDFOneNew from "@/components/PDF/contractPDFOneNew.vue";
 
 const props = defineProps({
   customerId: {