瀏覽代碼

ehsd 报价单,销售合同列表页

lxf 2 年之前
父節點
當前提交
ef26c350a4

+ 825 - 0
src/components/process/EHSD/PriceSheet.vue

@@ -0,0 +1,825 @@
+<template>
+  <div style="width: 100%; padding: 0px 15px">
+    <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
+      <template #seller>
+        <div style="width: 100%">
+          <el-form-item prop="sellCorporationId">
+            <el-select v-model="formData.data.sellCorporationId" style="width: 100%" disabled>
+              <el-option v-for="item in corporationList" :key="item.value" :label="item.label" :value="item.value" />
+            </el-select>
+          </el-form-item>
+          <el-row style="margin-top: 20px; width: 100%">
+            <el-col :span="8">
+              <el-form-item label="地址" prop="sellCountryId">
+                <el-input v-model="formData.data.sellCountryId" placeholder="请输入国家" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label=" " prop="sellProvinceId">
+                <el-input v-model="formData.data.sellProvinceId" placeholder="请输入省/州" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label=" " prop="sellCityId">
+                <el-input v-model="formData.data.sellCityId" placeholder="请输入城市" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row style="margin-top: 20px; width: 100%">
+            <el-col :span="24">
+              <el-form-item prop="sellAddress">
+                <el-input v-model="formData.data.sellAddress" type="textarea"> </el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row style="margin-top: 20px; width: 100%">
+            <el-col :span="8">
+              <el-form-item label="联系人" prop="sellContactName">
+                <el-input v-model="formData.data.sellContactName" placeholder="请输入联系人" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="16">
+              <el-form-item label=" " prop="sellContactNumber">
+                <el-input v-model="formData.data.sellContactNumber" placeholder="请输入联系人电话" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </div>
+      </template>
+      <template #buyer>
+        <div style="width: 100%">
+          <div style="width: 100%">
+            <el-form-item prop="buyCorporationId">
+              <el-select v-model="formData.data.buyCorporationId" style="width: 100%" @change="changeCustomer">
+                <el-option v-for="item in customerList" :key="item.value" :label="item.label" :value="item.value" />
+              </el-select>
+            </el-form-item>
+            <el-row style="margin-top: 20px; width: 100%">
+              <el-col :span="6">
+                <el-form-item label="地址" prop="buyCountryId">
+                  <el-select v-model="formData.data.buyCountryId" placeholder="国家" @change="(val) => getCityData(val, '20', true)">
+                    <el-option v-for="item in countryData" :label="item.chineseName" :value="item.id"> </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label=" " prop="buyProvinceId">
+                  <el-select v-model="formData.data.buyProvinceId" placeholder="省/洲" @change="(val) => getCityData(val, '30', true)">
+                    <el-option v-for="item in provinceData" :label="item.name" :value="item.id"> </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label=" " prop="buyCityId">
+                  <el-select v-model="formData.data.buyCityId" placeholder="城市">
+                    <el-option v-for="item in cityData" :label="item.name" :value="item.id"> </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label=" " prop="buyPostalCode">
+                  <el-input v-model="formData.data.buyPostalCode" placeholder="请输入邮编" />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row style="margin-top: 20px; width: 100%">
+              <el-col :span="24">
+                <el-form-item prop="buyAddress">
+                  <el-input v-model="formData.data.buyAddress" type="textarea"> </el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row style="margin-top: 20px; width: 100%">
+              <el-col :span="8">
+                <el-form-item label="联系人" prop="buyContactName">
+                  <el-autocomplete
+                    v-model="formData.data.buyContactName"
+                    :fetch-suggestions="querySearchPerson"
+                    clearable
+                    class="inline-input w-50"
+                    placeholder="请输入联系人"
+                    @select="handlePerson">
+                  </el-autocomplete>
+                </el-form-item>
+              </el-col>
+              <el-col :span="16">
+                <el-form-item label=" " prop="buyContactNumber">
+                  <el-input v-model="formData.data.buyContactNumber" placeholder="请输入联系人电话" />
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </div>
+        </div>
+      </template>
+      <template #commodity>
+        <div style="width: 100%">
+          <el-button @click="openProduct = true">添加商品</el-button>
+          <el-table :data="formData.data.quotationProductList" style="width: 100%; margin-top: 16px">
+            <el-table-column label="商品图片" width="80">
+              <template #default="{ row }">
+                <div v-if="row.productId">
+                  <img :src="row.fileUrl" class="pic" @click="onPicture(row.fileUrl)" />
+                </div>
+                <div v-else></div>
+              </template>
+            </el-table-column>
+            <el-table-column prop="code" label="商品编码" width="120" />
+            <el-table-column label="商品名称" min-width="200">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item :prop="'quotationProductList.' + $index + '.productName'" :rules="rules.productName" :inline-message="true">
+                    <el-input v-model="row.productName" placeholder="请输入商品名称" />
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="规格型号" width="180">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item :prop="'quotationProductList.' + $index + '.productModel'" :rules="rules.productModel" :inline-message="true">
+                    <el-input v-model="row.productModel" placeholder="请输入规格型号" />
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column prop="unit" label="单位" width="100" />
+            <el-table-column label="数量" width="160">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item :prop="'quotationProductList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true">
+                    <el-input-number
+                      v-model="row.quantity"
+                      placeholder="请输入数量"
+                      style="width: 100%"
+                      :precision="0"
+                      :controls="false"
+                      :min="0"
+                      @change="calculationAmount()" />
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="单价" width="160">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item :prop="'quotationProductList.' + $index + '.price'" :rules="rules.price" :inline-message="true">
+                    <el-input-number
+                      v-model="row.price"
+                      placeholder="请输入单价"
+                      style="width: 100%"
+                      :precision="2"
+                      :controls="false"
+                      :min="0"
+                      @change="calculationAmount()" />
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column prop="amount" label="金额" width="140" />
+            <el-table-column label="操作" width="80" fixed="right">
+              <template #default="{ row, $index }">
+                <el-button type="primary" link @click="handleRemove($index)">删除</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </template>
+      <template #otherCharge>
+        <div style="width: 100%">
+          <el-button type="primary" @click="clickAdd()">添加行</el-button>
+          <el-table :data="formData.data.quotationPayList" style="width: 100%; margin-top: 16px">
+            <el-table-column label="收费项目" width="220">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item :prop="'quotationPayList.' + $index + '.payName'" :rules="rules.payName" :inline-message="true">
+                    <el-autocomplete v-model="row.payName" :fetch-suggestions="querySearch" clearable class="inline-input w-50" placeholder="请输入收费项目" />
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="金额" width="180">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item :prop="'quotationPayList.' + $index + '.amount'" :rules="rules.amount" :inline-message="true">
+                    <el-input-number
+                      v-model="row.amount"
+                      placeholder="请输入金额"
+                      style="width: 100%"
+                      :precision="2"
+                      :controls="false"
+                      :min="0"
+                      @change="totalAmount()" />
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="备注">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item :prop="'quotationPayList.' + $index + '.remark'">
+                    <el-input v-model="row.remark" placeholder="请输入备注" />
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="操作" width="80" fixed="right">
+              <template #default="{ row, $index }">
+                <el-button type="primary" link @click="handleDelete($index)">删除</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </template>
+      <template #offerMoney>
+        <div style="width: 100%">
+          <el-row style="margin-top: 20px; width: 100%">
+            <el-col :span="4">
+              <el-form-item label="币种" prop="currency">
+                <el-select v-model="formData.data.currency" placeholder="请选择币种" style="width: 100%">
+                  <el-option v-for="item in accountCurrency" :key="item.value" :label="item.label" :value="item.value" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="合同总金额" prop="amount">
+                <el-input v-model="formData.data.amount" placeholder="合同总金额" disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :span="4">
+              <el-form-item label="报价有效期 (天)" prop="effective">
+                <el-input-number v-model="formData.data.effective" placeholder="请输入有效期" style="width: 100%" :precision="0" :controls="false" :min="0" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row style="margin-top: 20px; width: 100%">
+            <el-col :span="7">
+              <el-form-item label="付款方式" prop="paymentMethod">
+                <el-select v-model="formData.data.paymentMethod" placeholder="请选择付款方式" style="width: 100%">
+                  <el-option v-for="item in fundsPaymentMethod" :key="item.value" :label="item.label" :value="item.value" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="7">
+              <el-form-item label="预付比例 (%)" prop="advanceRatio">
+                <el-input-number
+                  v-model="formData.data.advanceRatio"
+                  placeholder="请输入预付比例"
+                  style="width: 100%"
+                  :precision="2"
+                  :controls="false"
+                  :min="0"
+                  :max="100" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </div>
+      </template>
+      <template #delivery>
+        <div style="width: 100%">
+          <el-row style="margin-top: 20px; width: 100%">
+            <el-col :span="7">
+              <el-form-item label="贸易方式" prop="tradeMethods">
+                <el-select v-model="formData.data.tradeMethods" placeholder="请选择贸易方式" style="width: 100%">
+                  <el-option v-for="item in tradeMethods" :key="item.value" :label="item.label" :value="item.value" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row style="margin-top: 20px; width: 100%">
+            <el-col :span="7">
+              <el-form-item label="运输方式" prop="transportMethod">
+                <el-select v-model="formData.data.transportMethod" placeholder="请选择运输方式" style="width: 100%">
+                  <el-option v-for="item in shippingMethod" :key="item.value" :label="item.label" :value="item.value" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="7">
+              <el-form-item label="运输说明" prop="transportRemark">
+                <el-input v-model="formData.data.transportRemark" placeholder="请输入运输说明" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row style="margin-top: 20px; width: 100%">
+            <el-col :span="14">
+              <el-form-item label="付款条件" prop="remark">
+                <el-input v-model="formData.data.remark" :rows="2" type="textarea" placeholder="请输入付款条件" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row style="margin-top: 20px; width: 100%">
+            <el-col :span="7">
+              <el-form-item label="质保期 (天)" prop="warranty">
+                <el-input-number v-model="formData.data.warranty" placeholder="请输入质保期" style="width: 100%" :precision="0" :controls="false" :min="0" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </div>
+      </template>
+    </byForm>
+
+    <el-dialog v-model="openProduct" title="选择商品" width="70%" append-to-body>
+      <SelectGoods @cancel="openProduct = false" @pushGoods="pushGoods"></SelectGoods>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import byForm from "@/components/byForm/index";
+import useUserStore from "@/store/modules/user";
+import SelectGoods from "@/components/product/SelectGoods";
+import { ElMessage } from "element-plus";
+
+const { proxy } = getCurrentInstance();
+const accountCurrency = ref([]);
+const fundsPaymentMethod = ref([]);
+const tradeMethods = ref([]);
+const shippingMethod = ref([]);
+const templateList = ref([]);
+const corporationList = ref([]);
+const customerList = ref([]);
+const countryData = ref([]);
+const provinceData = ref([]);
+const cityData = ref([]);
+const customerUserList = ref([]);
+const openProduct = ref(false);
+const formData = reactive({
+  data: {
+    amount: undefined,
+    quotationProductList: [],
+    quotationPayList: [],
+  },
+});
+const submit = ref(null);
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  rules: [],
+});
+const formConfig = computed(() => {
+  return [
+    {
+      label: "合同模板",
+    },
+    {
+      type: "select",
+      label: "选择合同模板",
+      prop: "contractTemplateId",
+      data: templateList.value,
+      fn: (val) => {
+        changeTemplate(val);
+      },
+    },
+    {
+      type: "slot",
+      slotName: "seller",
+      label: "卖方信息",
+      itemWidth: 50,
+    },
+    {
+      type: "slot",
+      slotName: "buyer",
+      label: "买方信息",
+      itemWidth: 50,
+    },
+    {
+      type: "slot",
+      slotName: "commodity",
+      label: "商品信息",
+    },
+    {
+      type: "slot",
+      slotName: "otherCharge",
+      label: "其他收费项目",
+    },
+    {
+      type: "slot",
+      slotName: "offerMoney",
+      label: "报价金额",
+    },
+    {
+      type: "slot",
+      slotName: "delivery",
+      label: "交付信息",
+    },
+  ];
+});
+const rules = ref({
+  contractTemplateId: [{ required: true, message: "请选择合同模板", trigger: "change" }],
+  buyCorporationId: [{ required: true, message: "请选择公司", trigger: "change" }],
+  buyCountryId: [{ required: true, message: "请选择国家", trigger: "change" }],
+  buyProvinceId: [{ required: true, message: "请选择省/州", trigger: "change" }],
+  buyCityId: [{ required: true, message: "请选择城市", trigger: "change" }],
+  // buyAddress: [{ required: true, message: "请输入详细地址", trigger: "blur" }],
+  buyContactName: [{ required: true, message: "请输入联系人", trigger: ["change", "blur"] }],
+  buyContactNumber: [{ required: true, message: "请输入联系电话", trigger: "blur" }],
+  productName: [{ required: true, message: "请输入商品名称", trigger: "blur" }],
+  productModel: [{ required: true, message: "请输入规格型号", trigger: "blur" }],
+  quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
+  amount: [{ required: true, message: "请输入金额", trigger: "blur" }],
+  payName: [{ required: true, message: "请输入收费项目", trigger: ["change", "blur"] }],
+  currency: [{ required: true, message: "请选择币种", trigger: "change" }],
+  effective: [{ required: true, message: "请输入报价有效期", trigger: "blur" }],
+  paymentMethod: [{ required: true, message: "请选择付款方式", trigger: "change" }],
+  advanceRatio: [{ required: true, message: "请输入预付比例", trigger: "blur" }],
+  tradeMethods: [{ required: true, message: "请选择贸易方式", trigger: "change" }],
+  transportMethod: [{ required: true, message: "请选择运输方式", trigger: "change" }],
+  transportRemark: [{ required: true, message: "请输入运输说明", trigger: "blur" }],
+  remark: [{ required: true, message: "请输入付款条件", trigger: "blur" }],
+});
+const getDict = () => {
+  proxy
+    .post("/dictTenantData/page", {
+      pageNum: 1,
+      pageSize: 999,
+      dictCode: "account_currency",
+      tenantId: useUserStore().user.tenantId,
+    })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        accountCurrency.value = res.rows.map((item) => {
+          return {
+            label: item.dictValue,
+            value: item.dictKey,
+          };
+        });
+      }
+    });
+  proxy
+    .post("/dictTenantData/page", {
+      pageNum: 1,
+      pageSize: 999,
+      dictCode: "funds_payment_method",
+      tenantId: useUserStore().user.tenantId,
+    })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        fundsPaymentMethod.value = res.rows.map((item) => {
+          return {
+            label: item.dictValue,
+            value: item.dictKey,
+          };
+        });
+      }
+    });
+  proxy
+    .post("/dictTenantData/page", {
+      pageNum: 1,
+      pageSize: 999,
+      dictCode: "trade_methods",
+      tenantId: useUserStore().user.tenantId,
+    })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        tradeMethods.value = res.rows.map((item) => {
+          return {
+            label: item.dictValue,
+            value: item.dictKey,
+          };
+        });
+      }
+    });
+  proxy
+    .post("/dictTenantData/page", {
+      pageNum: 1,
+      pageSize: 999,
+      dictCode: "shipping_method",
+      tenantId: useUserStore().user.tenantId,
+    })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        shippingMethod.value = res.rows.map((item) => {
+          return {
+            label: item.dictValue,
+            value: item.dictKey,
+          };
+        });
+      }
+    });
+  proxy.post("/contractTemplate/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+    templateList.value = res.rows.map((item) => {
+      return {
+        ...item,
+        label: item.templateName,
+        value: item.id,
+      };
+    });
+  });
+  proxy.post("/corporation/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+    corporationList.value = res.rows.map((item) => {
+      return {
+        ...item,
+        label: item.name,
+        value: item.id,
+      };
+    });
+  });
+  proxy.post("/customer/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+    customerList.value = res.rows.map((item) => {
+      return {
+        ...item,
+        label: item.name,
+        value: item.id,
+      };
+    });
+  });
+};
+getDict();
+const changeTemplate = (val) => {
+  if (val) {
+    proxy.post("/contractTemplate/detail", { id: val }).then(
+      (res) => {
+        proxy.post("/areaInfo/list", { parentId: "0" }).then((resCountry) => {
+          let sellCountryData = resCountry.filter((item) => item.id === res.countryId);
+          if (sellCountryData && sellCountryData.length > 0) {
+            formData.data.sellCountryId = sellCountryData[0].chineseName;
+          } else {
+            formData.data.sellCountryId = "";
+          }
+        });
+        if (res.countryId) {
+          proxy.post("/areaInfo/list", { parentId: res.countryId }).then((resProvince) => {
+            let sellProvinceData = resProvince.filter((item) => item.id === res.provinceId);
+            if (sellProvinceData && sellProvinceData.length > 0) {
+              formData.data.sellProvinceId = sellProvinceData[0].name;
+            } else {
+              formData.data.sellProvinceId = "";
+            }
+          });
+        } else {
+          formData.data.sellProvinceId = "";
+        }
+        if (res.provinceId) {
+          proxy.post("/areaInfo/list", { parentId: res.provinceId }).then((resCity) => {
+            let sellCityData = resCity.filter((item) => item.id === res.cityId);
+            if (sellCityData && sellCityData.length > 0) {
+              formData.data.sellCityId = sellCityData[0].name;
+            } else {
+              formData.data.sellCityId = "";
+            }
+          });
+        } else {
+          formData.data.sellCityId = "";
+        }
+        formData.data.sellCorporationId = res.corporationId;
+        formData.data.sellContactName = res.contactName;
+        formData.data.sellContactNumber = res.contactNumber;
+        formData.data.sellAddress = res.address;
+      },
+      (err) => {
+        console.log(err);
+        formData.data.sellCorporationId = "";
+        formData.data.sellContactName = "";
+        formData.data.sellContactNumber = "";
+        formData.data.sellCountryId = "";
+        formData.data.sellProvinceId = "";
+        formData.data.sellCityId = "";
+        formData.data.sellAddress = "";
+      }
+    );
+  } else {
+    formData.data.sellCorporationId = "";
+    formData.data.sellContactName = "";
+    formData.data.sellContactNumber = "";
+    formData.data.sellCountryId = "";
+    formData.data.sellProvinceId = "";
+    formData.data.sellCityId = "";
+    formData.data.sellAddress = "";
+  }
+};
+const getCityData = (id, type, isChange) => {
+  proxy.post("/areaInfo/list", { parentId: id }).then((res) => {
+    if (type === "20") {
+      provinceData.value = res;
+      if (isChange) {
+        formData.data.buyProvinceId = "";
+        formData.data.buyCityId = "";
+      }
+    } else if (type === "30") {
+      cityData.value = res;
+      if (isChange) {
+        formData.data.buyCityId = "";
+      }
+    } else {
+      countryData.value = res;
+    }
+  });
+};
+getCityData("0");
+const changeCustomer = (val) => {
+  formData.data.buyContactName = "";
+  formData.data.buyContactNumber = "";
+  if (val) {
+    proxy.post("/customer/detail", { id: val }).then(
+      (res) => {
+        if (res.customerUserList && res.customerUserList.length > 0) {
+          formData.data.buyContactName = res.customerUserList[0].name;
+          formData.data.buyContactNumber = res.customerUserList[0].phone;
+          customerUserList.value = res.customerUserList.map((item) => {
+            return {
+              ...item,
+              value: item.name,
+            };
+          });
+        }
+        formData.data.buyCountryId = res.countryId;
+        formData.data.buyProvinceId = res.provinceId;
+        formData.data.buyCityId = res.cityId;
+        formData.data.buyPostalCode = res.zipCode;
+        formData.data.buyAddress = res.address;
+        getCityData(formData.data.buyCountryId, "20");
+        getCityData(formData.data.buyProvinceId, "30");
+      },
+      (err) => {
+        console.log(err);
+        formData.data.buyCountryId = "";
+        formData.data.buyProvinceId = "";
+        formData.data.buyCityId = "";
+        formData.data.buyPostalCode = "";
+        formData.data.buyAddress = "";
+      }
+    );
+  } else {
+    formData.data.buyCountryId = "";
+    formData.data.buyProvinceId = "";
+    formData.data.buyCityId = "";
+    formData.data.buyPostalCode = "";
+    formData.data.buyAddress = "";
+  }
+};
+const createFilter = (queryString) => {
+  return (restaurant) => {
+    return restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0;
+  };
+};
+const querySearchPerson = (queryString, callback) => {
+  const results = queryString ? customerUserList.value.filter(createFilter(queryString)) : customerUserList.value;
+  callback(results);
+};
+const handlePerson = (item) => {
+  formData.data.buyContactNumber = item.phone;
+};
+const pushGoods = (goods) => {
+  if (goods && goods.length > 0) {
+    formData.data.quotationProductList = formData.data.quotationProductList.concat(
+      goods.map((item) => {
+        let fileUrl = "";
+        if (item.fileList && item.fileList.length > 0) {
+          fileUrl = item.fileList[0].fileUrl;
+        }
+        return {
+          fileUrl: fileUrl,
+          code: item.code,
+          productId: item.id,
+          productName: item.name,
+          productModel: item.spec,
+          unit: item.unit,
+          quantity: undefined,
+          price: undefined,
+          amount: "",
+          remark: item.remark,
+        };
+      })
+    );
+    ElMessage({
+      message: "添加成功!",
+      type: "success",
+    });
+    openProduct.value = false;
+  } else {
+    ElMessage("请选择至少一件商品");
+  }
+};
+const onPicture = (path) => {
+  window.open(path, "_blank");
+};
+const handleRemove = (index) => {
+  formData.data.quotationProductList.splice(index, 1);
+};
+const calculationAmount = () => {
+  nextTick(() => {
+    if (formData.data.quotationProductList && formData.data.quotationProductList.length > 0) {
+      for (let i = 0; i < formData.data.quotationProductList.length; i++) {
+        let money = 0;
+        if (formData.data.quotationProductList[i].quantity && formData.data.quotationProductList[i].price) {
+          money = parseFloat(Number(formData.data.quotationProductList[i].quantity) * Number(formData.data.quotationProductList[i].price)).toFixed(2);
+        }
+        formData.data.quotationProductList[i].amount = money;
+      }
+    }
+    nextTick(() => {
+      totalAmount();
+    });
+  });
+};
+const totalAmount = () => {
+  let money = 0;
+  if (formData.data.quotationProductList && formData.data.quotationProductList.length > 0) {
+    for (let i = 0; i < formData.data.quotationProductList.length; i++) {
+      if (formData.data.quotationProductList[i].amount) {
+        money = parseFloat(Number(money) + Number(formData.data.quotationProductList[i].amount)).toFixed(2);
+      }
+    }
+  }
+  if (formData.data.quotationPayList && formData.data.quotationPayList.length > 0) {
+    for (let i = 0; i < formData.data.quotationPayList.length; i++) {
+      if (formData.data.quotationPayList[i].amount) {
+        money = parseFloat(Number(money) + Number(formData.data.quotationPayList[i].amount)).toFixed(2);
+      }
+    }
+  }
+  formData.data.amount = money;
+};
+const clickAdd = () => {
+  if (formData.data.quotationPayList && formData.data.quotationPayList.length > 0) {
+    formData.data.quotationPayList.push({
+      payName: "",
+      amount: undefined,
+      remark: "",
+    });
+  } else {
+    formData.data.quotationPayList = [{ payName: "", amount: undefined, remark: "" }];
+  }
+};
+const handleDelete = (index) => {
+  formData.data.quotationPayList.splice(index, 1);
+};
+const querySearch = (queryString, callback) => {
+  proxy.post("/quotationPay/page", { payName: queryString }).then((res) => {
+    if (res.rows && res.rows.length > 0) {
+      res.rows = res.rows.map((item) => {
+        return {
+          ...item,
+          value: item.payName,
+        };
+      });
+      callback(res.rows);
+    } else {
+      callback([]);
+    }
+  });
+};
+const handleSubmit = async () => {
+  let status = await submit.value.handleSubmit(() => {});
+  if (status) {
+    if (formData.data.quotationProductList && formData.data.quotationProductList.length > 0) {
+      return true;
+    } else {
+      ElMessage("请添加至少一件商品");
+    }
+    return false;
+  }
+  return status;
+};
+// 接收父组件的传值
+const props = defineProps({
+  queryData: String,
+});
+onMounted(() => {
+  if (props.queryData.id) {
+    proxy.post("/saleQuotation/detail", { id: props.queryData.id }).then((res) => {
+      for (var text in res) {
+        formData.data[text] = res[text];
+      }
+      delete formData.data.id;
+      delete formData.data.code;
+      getCityData(formData.data.buyCountryId, "20");
+      getCityData(formData.data.buyProvinceId, "30");
+      if (formData.data.quotationProductList && formData.data.quotationProductList.length > 0) {
+        formData.data.quotationProductList = formData.data.quotationProductList.map((item) => {
+          delete item.id;
+          return {
+            ...item,
+          };
+        });
+      }
+      if (formData.data.quotationPayList && formData.data.quotationPayList.length > 0) {
+        formData.data.quotationPayList = formData.data.quotationPayList.map((item) => {
+          delete item.id;
+          return {
+            ...item,
+          };
+        });
+      }
+    });
+  }
+});
+// 向父组件暴露
+defineExpose({
+  submitData: formData.data,
+  handleSubmit,
+});
+</script>
+
+<style lang="scss" scoped>
+::v-deep(.el-input-number .el-input__inner) {
+  text-align: left;
+}
+.pic {
+  object-fit: contain;
+  width: 50px;
+  height: 50px;
+  cursor: pointer;
+  vertical-align: middle;
+}
+</style>

+ 609 - 0
src/views/EHSD/saleContract/contract/index.vue

@@ -0,0 +1,609 @@
+<template>
+  <div class="tenant">
+    <div class="content">
+      <byTable
+        :source="sourceList.data"
+        :pagination="sourceList.pagination"
+        :config="config"
+        :loading="loading"
+        :selectConfig="selectConfig"
+        highlight-current-row
+        :action-list="[
+          {
+            text: '创建合同',
+            action: () => newContract(),
+          },
+        ]"
+        @get-list="getList">
+        <template #amount="{ item }">
+          <div>
+            <span style="padding-right: 4px">{{ item.currency }}</span>
+            <span>{{ moneyFormat(item.amount, 2) }}</span>
+          </div>
+        </template>
+        <template #refundMoney="{ item }">
+          <div>
+            <span style="padding-right: 4px">{{ item.currency }}</span>
+            <span>{{ moneyFormat(item.refundMoney, 2) }}</span>
+          </div>
+        </template>
+        <template #advanceRatio="{ item }">
+          <div>
+            <span>{{ item.advanceRatio }}%</span>
+          </div>
+        </template>
+      </byTable>
+    </div>
+
+    <el-dialog title="打印" v-if="openPrint" v-model="openPrint" width="860">
+      <div id="pdfDom" style="width: 800px; padding: 16px; font-size: 12px !important">
+        <div style="font-size: 18px; text-align: center">
+          {{ printDetails.sellCorporationNameEn }}
+        </div>
+        <div style="text-align: center">
+          {{ printDetails.sellCountryName }},{{ printDetails.sellProvinceName }},{{ printDetails.sellCityName }},{{ printDetails.sellDetailedAddress }}
+        </div>
+        <div style="font-size: 14px; color: #409eff; text-align: center; padding-top: 16px">PROFORMA INVOICE</div>
+        <div style="padding-top: 8px">
+          <div>PI NO. : {{ printDetails.contractCode }}</div>
+          <div>PI DATE: {{ printDetails.createTimeEn }}</div>
+        </div>
+        <div style="border: 1px solid black; display: flex">
+          <div style="width: 50%; border-right: 1px solid black">
+            <div style="color: #409eff">VENDOR:</div>
+            <div>{{ printDetails.sellCorporationNameEn }}</div>
+            <div style="padding: 16px 0">
+              {{ printDetails.sellCountryName }},{{ printDetails.sellProvinceName }},{{ printDetails.sellCityName }},{{ printDetails.sellDetailedAddress }}
+            </div>
+            <div>{{ printDetails.sellContactName }},{{ printDetails.sellContactNumber }}</div>
+          </div>
+          <div style="width: 50%">
+            <div style="color: #409eff">BUYER:</div>
+            <div>{{ printDetails.buyCorporationName }}</div>
+            <div style="padding: 16px 0">
+              {{ printDetails.buyCountryName }},{{ printDetails.buyProvinceName }},{{ printDetails.buyCityName }},{{ printDetails.buyDetailedAddress }}
+            </div>
+            <div>{{ printDetails.buyContactName }},{{ printDetails.buyContactNumber }}</div>
+          </div>
+        </div>
+        <div style="height: 16px"></div>
+        <div style="border: 1px solid black">
+          <div style="display: flex; width: 100%">
+            <div style="width: 33%; border-bottom: 1px solid black; border-right: 1px solid black">
+              <div style="color: #409eff">COUNTRY OF ORIGIN:</div>
+              <div>{{ printDetails.sellCountryName }}</div>
+            </div>
+            <div style="width: 34%; border-bottom: 1px solid black; border-right: 1px solid black">
+              <div style="color: #409eff">COUNTRY OF DESTINATION:</div>
+              <div>{{ printDetails.buyCountryName }}</div>
+            </div>
+            <div style="width: 33%; border-bottom: 1px solid black">
+              <div style="color: #409eff">PLACE OF DISCHARGE:</div>
+              <div>{{ printDetails.transportRemark }}</div>
+            </div>
+          </div>
+          <div style="display: flex; width: 100%">
+            <div style="width: 33%; border-bottom: 1px solid black; border-right: 1px solid black">
+              <div style="color: #409eff">TERMS OF DELIVERY:</div>
+              <div>
+                {{ dictValueLabel(printDetails.tradeMethods, tradeMethods) }}
+              </div>
+            </div>
+            <div style="width: 34%; border-bottom: 1px solid black; border-right: 1px solid black">
+              <div style="color: #409eff">CURRENCY:</div>
+              <div>
+                {{ dictValueLabel(printDetails.currency, accountCurrency) }}
+              </div>
+            </div>
+            <div style="width: 33%; border-bottom: 1px solid black">
+              <div style="color: #409eff">EXPORT BY/VIA:</div>
+              <div>
+                {{ dictValueLabel(printDetails.transportMethod, shippingMethod) }}
+              </div>
+            </div>
+          </div>
+          <div style="display: flex; width: 100%">
+            <div style="width: 33%; border-right: 1px solid black">
+              <div style="color: #409eff">DELIVERY TIME:</div>
+              <div>{{ printDetails.deliveryTime }}</div>
+            </div>
+            <div style="width: 67%">
+              <div style="color: #409eff">TERMS OF PAYMENT:</div>
+              <div>{{ printDetails.remark }}</div>
+            </div>
+          </div>
+        </div>
+        <div style="height: 16px"></div>
+        <div class="baseRow" style="display: flex; color: #409eff">
+          <div class="contentRow" style="width: 50px; text-align: center">NO.</div>
+          <div class="contentRow" style="width: calc(100% - 450px); text-align: center">COMMODITY, SPECIFICATION</div>
+          <div class="contentRow" style="width: 100px; text-align: center">UNIT</div>
+          <div class="contentRow" style="width: 100px; text-align: center">QUANTITY</div>
+          <div class="contentRow" style="width: 100px; text-align: center">UNIT PRICE</div>
+          <div class="contentRow" style="width: 100px; text-align: center">TOTAL PRICE</div>
+        </div>
+        <div v-if="printDetails.productInfoList && printDetails.productInfoList.length > 0">
+          <div class="baseRow" style="display: flex" v-for="(item, index) in printDetails.productInfoList" :key="item.productId">
+            <div class="contentRow" style="width: 50px; text-align: center">
+              {{ index + 1 }}
+            </div>
+            <div class="contentRow" style="width: calc(100% - 450px); text-align: center">
+              {{ item.productName }}
+            </div>
+            <div class="contentRow" style="width: 100px; text-align: center">
+              {{ item.productUnit }}
+            </div>
+            <div class="contentRow" style="width: 100px; text-align: center">
+              {{ item.productQuantity }}
+            </div>
+            <div class="contentRow" style="width: 100px; text-align: center">
+              {{ item.productPrice }}
+            </div>
+            <div class="contentRow" style="width: 100px; text-align: center">
+              {{ item.amount }}
+            </div>
+          </div>
+        </div>
+        <div class="baseRow" style="display: flex; color: #409eff">
+          <div class="contentRow" style="width: calc(100% - 400px); text-align: center">SUBTOTAL:</div>
+          <div class="contentRow" style="width: 100px; text-align: center"></div>
+          <div class="contentRow" style="width: 100px; text-align: center">
+            {{ statistics("productQuantity", 0) }}
+          </div>
+          <div class="contentRow" style="width: 100px; text-align: center"></div>
+          <div class="contentRow" style="width: 100px; text-align: center">
+            {{ statistics("amount", 2) }}
+          </div>
+        </div>
+        <!-- <div v-if="printDetails.quotationPayList && printDetails.quotationPayList.length > 0">
+          <div class="baseRow" style="display: flex" v-for="(item, index) in printDetails.quotationPayList" :key="index">
+            <div class="contentRow" style="width: calc(100% - 100px); text-align: right; color: #409eff">{{ item.payName }}:</div>
+            <div class="contentRow" style="width: 100px; text-align: center">{{ item.amount }}</div>
+          </div>
+        </div> -->
+        <div class="baseRow" style="display: flex">
+          <div class="contentRow" style="width: calc(100% - 100px); text-align: right; color: #409eff">TOTAL PRICE:</div>
+          <div class="contentRow" style="width: 100px; text-align: center">
+            {{ statistics("amount", 2) }}
+          </div>
+        </div>
+        <div class="baseRow" style="display: flex; border-bottom: 1px solid black">
+          <div class="contentRow" style="width: 100%">
+            {{ translateIntoEnglish(printDetails.totalAmount, printDetails.currency) }}
+          </div>
+        </div>
+        <div style="height: 16px"></div>
+        <div class="baseRow" style="color: #409eff">
+          <div class="contentRow" style="width: 100%">ACCOUNT INFORMATION:</div>
+        </div>
+        <div class="baseRow" style="border-bottom: 1px solid black">
+          <div class="contentRow" style="width: 100%">
+            <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">Beneficiary Name: {{}}</div>
+            <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">Beneficiary Bank: {{}}</div>
+            <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">Beneficiary Bank Address: {{}}</div>
+            <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">Beneficiary Account Number: {{}}</div>
+            <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">Swift Code: {{}}</div>
+            <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">Beneficiary Address: {{}}</div>
+          </div>
+        </div>
+        <div style="height: 32px"></div>
+        <div style="display: flex">
+          <div style="width: 50%">
+            <div style="color: #409eff">CONFIRMED BY VENDOR:</div>
+            <div>{{ printDetails.sellCorporationNameEn }}</div>
+          </div>
+          <div style="width: 50%">
+            <div style="color: #409eff">CONFIRMED BY BUYER:</div>
+            <div>{{ printDetails.buyCorporationName }}</div>
+          </div>
+        </div>
+      </div>
+      <template #footer>
+        <el-button @click="openPrint = false" size="large">取消</el-button>
+        <el-button type="primary" @click="clickDownload()" size="large">下载PDF</el-button>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import { computed, ref } from "vue";
+import byTable from "@/components/byTable/index";
+import useUserStore from "@/store/modules/user";
+import { ElMessage, ElMessageBox } from "element-plus";
+
+const { proxy } = getCurrentInstance();
+const contractType = ref([]);
+const accountCurrency = ref([]);
+const tradeMethods = ref([]);
+const corporationList = ref([]);
+const customerList = ref([]);
+const shippingMethod = ref([]);
+const status = ref([
+  {
+    label: "草稿",
+    value: 0,
+  },
+  {
+    label: "审批中",
+    value: 10,
+  },
+  {
+    label: "驳回",
+    value: 20,
+  },
+  {
+    label: "审批通过",
+    value: 30,
+  },
+  {
+    label: "终止",
+    value: 99,
+  },
+]);
+const refundStatus = ref([
+  {
+    label: "未到款",
+    value: 0,
+  },
+  {
+    label: "部分到款",
+    value: 10,
+  },
+  {
+    label: "已到款",
+    value: 20,
+  },
+]);
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 0,
+    pageNum: 1,
+    pageSize: 10,
+    keyword: "",
+    status: "",
+    sellCorporationId: "",
+  },
+});
+const loading = ref(false);
+const selectConfig = computed(() => {
+  return [
+    {
+      label: "审批状态",
+      prop: "status",
+      data: status.value,
+    },
+    {
+      label: "到款状态",
+      prop: "refundStatus",
+      data: refundStatus.value,
+    },
+    // {
+    //   label: "归属公司",
+    //   prop: "sellCorporationId",
+    //   data: corporationList.value,
+    // },
+  ];
+});
+const config = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "归属公司",
+        prop: "sellCorporationId",
+        "min-width": 220,
+      },
+      render(type) {
+        let text = "";
+        if (corporationList.value && corporationList.value.length > 0) {
+          let data = corporationList.value.filter((item) => item.value == type);
+          if (data && data.length > 0) {
+            text = data[0].label;
+          }
+        }
+        return text;
+      },
+    },
+    {
+      attrs: {
+        label: "合同类型",
+        prop: "contractType",
+        width: 120,
+      },
+      render(type) {
+        let text = "";
+        if (contractType.value && contractType.value.length > 0) {
+          let data = contractType.value.filter((item) => item.value == type);
+          if (data && data.length > 0) {
+            text = data[0].label;
+          }
+        }
+        return text;
+      },
+    },
+    {
+      attrs: {
+        label: "合同编码",
+        prop: "code",
+        width: 180,
+      },
+    },
+    {
+      attrs: {
+        label: "客户",
+        prop: "buyCorporationId",
+        "min-width": 220,
+      },
+      render(type) {
+        let text = "";
+        if (customerList.value && customerList.value.length > 0) {
+          let data = customerList.value.filter((item) => item.value == type);
+          if (data && data.length > 0) {
+            text = data[0].label;
+          }
+        }
+        return text;
+      },
+    },
+    {
+      attrs: {
+        label: "版本号",
+        prop: "version",
+        width: 120,
+      },
+    },
+    {
+      attrs: {
+        label: "合同金额",
+        slot: "amount",
+        width: 140,
+      },
+    },
+    {
+      attrs: {
+        label: "已到账金额",
+        slot: "refundMoney",
+        width: 140,
+      },
+    },
+    {
+      attrs: {
+        label: "业务员",
+        prop: "userName",
+        width: 140,
+      },
+    },
+    {
+      attrs: {
+        label: "创建时间",
+        prop: "createTime",
+        width: 160,
+      },
+    },
+    {
+      attrs: {
+        label: "审批状态",
+        prop: "status",
+        width: 140,
+      },
+      render(type) {
+        let text = "";
+        if (status.value && status.value.length > 0) {
+          let data = status.value.filter((item) => item.value == type);
+          if (data && data.length > 0) {
+            text = data[0].label;
+          }
+        }
+        return text;
+      },
+    },
+    {
+      attrs: {
+        label: "操作",
+        width: "120",
+        align: "center",
+        fixed: "right",
+      },
+      renderHTML(row) {
+        return [
+          {
+            attrs: {
+              label: "打印",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              clickPrint(row);
+            },
+          },
+          {
+            attrs: {
+              label: "作废",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning",
+              }).then(() => {
+                proxy
+                  .post("/contract/edit", {
+                    id: row.id,
+                    status: 88,
+                  })
+                  .then(() => {
+                    ElMessage({
+                      message: "作废成功",
+                      type: "success",
+                    });
+                    getList();
+                  });
+              });
+            },
+          },
+        ];
+      },
+    },
+  ];
+});
+const getDict = () => {
+  proxy
+    .post("/dictTenantData/page", {
+      pageNum: 1,
+      pageSize: 999,
+      dictCode: "contract_type",
+      tenantId: useUserStore().user.tenantId,
+    })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        contractType.value = res.rows.map((item) => {
+          return {
+            label: item.dictValue,
+            value: item.dictKey,
+          };
+        });
+      }
+    });
+
+  proxy
+    .post("/dictTenantData/page", {
+      pageNum: 1,
+      pageSize: 999,
+      dictCode: "account_currency",
+      tenantId: useUserStore().user.tenantId,
+    })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        accountCurrency.value = res.rows.map((item) => {
+          return {
+            label: item.dictValue,
+            value: item.dictKey,
+          };
+        });
+      }
+    });
+  proxy
+    .post("/dictTenantData/page", {
+      pageNum: 1,
+      pageSize: 999,
+      dictCode: "trade_methods",
+      tenantId: useUserStore().user.tenantId,
+    })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        tradeMethods.value = res.rows.map((item) => {
+          return {
+            label: item.dictValue,
+            value: item.dictKey,
+          };
+        });
+      }
+    });
+  proxy.post("/corporation/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+    corporationList.value = res.rows.map((item) => {
+      return {
+        ...item,
+        label: item.name,
+        value: item.id,
+      };
+    });
+  });
+  proxy.post("/customer/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+    customerList.value = res.rows.map((item) => {
+      return {
+        ...item,
+        label: item.name,
+        value: item.id,
+      };
+    });
+  });
+  proxy
+    .post("/dictTenantData/page", {
+      pageNum: 1,
+      pageSize: 999,
+      dictCode: "shipping_method",
+      tenantId: useUserStore().user.tenantId,
+    })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        shippingMethod.value = res.rows.map((item) => {
+          return {
+            label: item.dictValue,
+            value: item.dictKey,
+          };
+        });
+      }
+    });
+};
+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);
+  });
+};
+getDict();
+getList();
+const newContract = () => {
+  proxy.$router.replace({
+    path: "/platform_manage/process/processApproval",
+    query: {
+      flowKey: "contract_flow",
+      flowName: "销售合同审批流程",
+      random: proxy.random(),
+    },
+  });
+};
+const openPrint = ref(false);
+const printDetails = ref({});
+const clickPrint = (row) => {
+  printDetails.value = {};
+  openPrint.value = true;
+  proxy.post("/contract/getContractPdfInfo", { id: row.id }).then((res) => {
+    printDetails.value = res;
+  });
+};
+const clickDownload = () => {
+  proxy.getPdf("外销合同PDF文件");
+};
+const statistics = (label, index) => {
+  let num = 0;
+  if (printDetails.value.productInfoList && printDetails.value.productInfoList.length > 0) {
+    printDetails.value.productInfoList.map((item) => {
+      console.log(item, label, item[label]);
+      if (item[label]) {
+        num = parseFloat(Number(num) + Number(item[label])).toFixed(index);
+      }
+    });
+  }
+  return num;
+};
+</script>
+
+<style lang="scss" scoped>
+.tenant {
+  padding: 20px;
+}
+::v-deep(.el-input-number .el-input__inner) {
+  text-align: left;
+}
+.baseRow {
+  min-height: 24px;
+  border-top: 1px solid black;
+  border-left: 1px solid black;
+}
+.contentRow {
+  border-right: 1px solid black;
+  line-height: 24px;
+  padding-left: 4px;
+}
+</style>

+ 578 - 0
src/views/EHSD/saleContract/priceSheet/index.vue

@@ -0,0 +1,578 @@
+<template>
+  <div class="tenant">
+    <div class="content">
+      <byTable
+        :source="sourceList.data"
+        :pagination="sourceList.pagination"
+        :config="config"
+        :loading="loading"
+        :selectConfig="selectConfig"
+        highlight-current-row
+        :action-list="[
+          {
+            text: '新建报价单',
+            action: () => newPriceSheet(),
+          },
+        ]"
+        @get-list="getList">
+        <template #amount="{ item }">
+          <div>
+            <span style="padding-right: 4px">{{ item.currency }}</span>
+            <span>{{ moneyFormat(item.amount, 2) }}</span>
+          </div>
+        </template>
+        <template #advanceRatio="{ item }">
+          <div>
+            <span>{{ item.advanceRatio }}%</span>
+          </div>
+        </template>
+      </byTable>
+    </div>
+
+    <el-dialog title="打印" v-if="openPrint" v-model="openPrint" width="860">
+      <div id="pdfDom" style="width: 800px; padding: 16px; font-size: 12px !important">
+        <div style="font-size: 18px; text-align: center">
+          {{ getLabel(printDetails.sellCorporationId, corporationList, "nameEn") }}
+        </div>
+        <div style="text-align: center">
+          {{ printDetails.sellCountryId }},{{ printDetails.sellProvinceId }},{{ printDetails.sellCityId }},{{ printDetails.sellAddress }}
+        </div>
+        <div style="font-size: 14px; color: #409eff; text-align: center; padding-top: 16px">QUOTATION</div>
+        <div style="padding-top: 8px">
+          <div>Reference NO. : {{ printDetails.code }}</div>
+          <div style="display: flex">
+            <div style="width: 50%">DATE: {{ moment(printDetails.createTime).format("DD/MMM/yyyy") }}</div>
+            <div style="width: 50%">Valid Date:</div>
+          </div>
+        </div>
+        <div style="border: 1px solid black; display: flex">
+          <div style="width: 50%; border-right: 1px solid black">
+            <div style="color: #409eff">VENDOR:</div>
+            <div>
+              {{ getLabel(printDetails.sellCorporationId, corporationList, "nameEn") }}
+            </div>
+            <div style="padding: 16px 0">
+              {{ printDetails.sellCountryId }},{{ printDetails.sellProvinceId }},{{ printDetails.sellCityId }},{{ printDetails.sellAddress }}
+            </div>
+            <div>{{ printDetails.sellContactName }},{{ printDetails.sellContactNumber }}</div>
+          </div>
+          <div style="width: 50%">
+            <div style="color: #409eff">BUYER:</div>
+            <div>
+              {{ getLabel(printDetails.buyCorporationId, customerList, "name") }}
+            </div>
+            <div style="padding: 16px 0">
+              {{ printDetails.buyCountryName }},{{ printDetails.buyProvinceName }},{{ printDetails.buyCityName }},{{ printDetails.buyAddress }}
+            </div>
+            <div>{{ printDetails.buyContactName }},{{ printDetails.buyContactNumber }}</div>
+          </div>
+        </div>
+        <div style="height: 16px"></div>
+        <div style="border: 1px solid black">
+          <div style="display: flex; width: 100%">
+            <div style="width: 33%; border-bottom: 1px solid black; border-right: 1px solid black">
+              <div style="color: #409eff">COUNTRY OF ORIGIN:</div>
+              <div>{{ printDetails.sellCountryId }}</div>
+            </div>
+            <div style="width: 34%; border-bottom: 1px solid black; border-right: 1px solid black">
+              <div style="color: #409eff">COUNTRY OF DESTINATION:</div>
+              <div>{{ printDetails.buyCountryName }}</div>
+            </div>
+            <div style="width: 33%; border-bottom: 1px solid black">
+              <div style="color: #409eff">PLACE OF DISCHARGE:</div>
+              <div>{{ printDetails.transportRemark }}</div>
+            </div>
+          </div>
+          <div style="display: flex; width: 100%">
+            <div style="width: 33%; border-bottom: 1px solid black; border-right: 1px solid black">
+              <div style="color: #409eff">TERMS OF DELIVERY:</div>
+              <div>
+                {{ dictValueLabel(printDetails.tradeMethods, tradeMethods) }}
+              </div>
+            </div>
+            <div style="width: 34%; border-bottom: 1px solid black; border-right: 1px solid black">
+              <div style="color: #409eff">CURRENCY:</div>
+              <div>
+                {{ dictValueLabel(printDetails.currency, accountCurrency) }}
+              </div>
+            </div>
+            <div style="width: 33%; border-bottom: 1px solid black">
+              <div style="color: #409eff">EXPORT BY/VIA:</div>
+              <div>
+                {{ dictValueLabel(printDetails.transportMethod, shippingMethod) }}
+              </div>
+            </div>
+          </div>
+          <div style="display: flex; width: 100%">
+            <div style="width: 33%; border-right: 1px solid black">
+              <div style="color: #409eff">DELIVERY TIME:</div>
+            </div>
+            <div style="width: 67%">
+              <div style="color: #409eff">TERMS OF PAYMENT:</div>
+              <div>{{ printDetails.remark }}</div>
+            </div>
+          </div>
+        </div>
+        <div style="height: 16px"></div>
+        <div class="baseRow" style="display: flex; color: #409eff">
+          <div class="contentRow" style="width: 50px; text-align: center">NO.</div>
+          <div class="contentRow" style="width: calc(100% - 450px); text-align: center">COMMODITY, SPECIFICATION</div>
+          <div class="contentRow" style="width: 100px; text-align: center">UNIT</div>
+          <div class="contentRow" style="width: 100px; text-align: center">QUANTITY</div>
+          <div class="contentRow" style="width: 100px; text-align: center">UNIT PRICE</div>
+          <div class="contentRow" style="width: 100px; text-align: center">TOTAL PRICE</div>
+        </div>
+        <div v-if="printDetails.quotationProductList && printDetails.quotationProductList.length > 0">
+          <div class="baseRow" style="display: flex" v-for="(item, index) in printDetails.quotationProductList" :key="item.productId">
+            <div class="contentRow" style="width: 50px; text-align: center">
+              {{ index + 1 }}
+            </div>
+            <div class="contentRow" style="width: calc(100% - 450px); text-align: center">
+              {{ item.productName }}
+            </div>
+            <div class="contentRow" style="width: 100px; text-align: center">
+              {{ item.productUnit }}
+            </div>
+            <div class="contentRow" style="width: 100px; text-align: center">
+              {{ item.quantity }}
+            </div>
+            <div class="contentRow" style="width: 100px; text-align: center">
+              {{ item.price }}
+            </div>
+            <div class="contentRow" style="width: 100px; text-align: center">
+              {{ item.amount }}
+            </div>
+          </div>
+        </div>
+        <div class="baseRow" style="display: flex; color: #409eff">
+          <div class="contentRow" style="width: calc(100% - 400px); text-align: center">SUBTOTAL:</div>
+          <div class="contentRow" style="width: 100px; text-align: center"></div>
+          <div class="contentRow" style="width: 100px; text-align: center">
+            {{ statistics("quantity", 0) }}
+          </div>
+          <div class="contentRow" style="width: 100px; text-align: center"></div>
+          <div class="contentRow" style="width: 100px; text-align: center">
+            {{ statistics("amount", 2) }}
+          </div>
+        </div>
+        <div v-if="printDetails.quotationPayList && printDetails.quotationPayList.length > 0">
+          <div class="baseRow" style="display: flex" v-for="(item, index) in printDetails.quotationPayList" :key="index">
+            <div class="contentRow" style="width: calc(100% - 100px); text-align: right; color: #409eff">{{ item.payName }}:</div>
+            <div class="contentRow" style="width: 100px; text-align: center">
+              {{ item.amount }}
+            </div>
+          </div>
+        </div>
+        <div class="baseRow" style="display: flex">
+          <div class="contentRow" style="width: calc(100% - 100px); text-align: right; color: #409eff">TOTAL PRICE:</div>
+          <div class="contentRow" style="width: 100px; text-align: center">
+            {{ getAllMoney(statistics("amount", 2)) }}
+          </div>
+        </div>
+        <div class="baseRow" style="display: flex; border-bottom: 1px solid black">
+          <div class="contentRow" style="width: 100%">
+            {{ translateIntoEnglish(printDetails.amount, printDetails.currency) }}
+          </div>
+        </div>
+        <!-- <div style="height: 16px"></div>
+        <div class="baseRow" style="color: #409eff">
+          <div class="contentRow" style="width: 100%">ACCOUNT INFORMATION:</div>
+        </div>
+        <div class="baseRow" style="border-bottom: 1px solid black">
+          <div class="contentRow" style="width: 100%">
+            <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">Beneficiary Name: {{}}</div>
+            <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">Beneficiary Bank: {{}}</div>
+            <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">Beneficiary Bank Address: {{}}</div>
+            <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">Beneficiary Account Number: {{}}</div>
+            <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">Swift Code: {{}}</div>
+            <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">Beneficiary Address: {{}}</div>
+          </div>
+        </div> -->
+        <div style="height: 32px"></div>
+        <div style="display: flex">
+          <div style="width: 50%">
+            <div style="color: #409eff">CONFIRMED BY VENDOR:</div>
+            <div>
+              {{ getLabel(printDetails.sellCorporationId, corporationList, "nameEn") }}
+            </div>
+          </div>
+          <div style="width: 50%">
+            <div style="color: #409eff">CONFIRMED BY BUYER:</div>
+            <div>
+              {{ getLabel(printDetails.buyCorporationId, customerList, "name") }}
+            </div>
+          </div>
+        </div>
+      </div>
+      <template #footer>
+        <el-button @click="openPrint = false" size="large">取消</el-button>
+        <el-button type="primary" @click="clickDownload()" size="large">下载PDF</el-button>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import { computed, ref } from "vue";
+import byTable from "@/components/byTable/index";
+import moment from "moment";
+import useUserStore from "@/store/modules/user";
+
+const { proxy } = getCurrentInstance();
+const accountList = ref([]);
+const corporationList = ref([]);
+const customerList = ref([]);
+const tradeMethods = ref([]);
+const accountCurrency = ref([]);
+const shippingMethod = ref([]);
+const status = ref([
+  {
+    label: "草稿",
+    value: 0,
+  },
+  {
+    label: "审批中",
+    value: 10,
+  },
+  {
+    label: "驳回",
+    value: 20,
+  },
+  {
+    label: "审批通过",
+    value: 30,
+  },
+  {
+    label: "终止",
+    value: 99,
+  },
+]);
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 0,
+    pageNum: 1,
+    pageSize: 10,
+    keyword: "",
+    status: "",
+    sellCorporationId: "",
+  },
+});
+const loading = ref(false);
+const selectConfig = computed(() => {
+  return [
+    {
+      label: "审批状态",
+      prop: "status",
+      data: status.value,
+    },
+    {
+      label: "归属公司",
+      prop: "sellCorporationId",
+      data: corporationList.value,
+    },
+  ];
+});
+const config = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "报价单号",
+        prop: "code",
+        width: 200,
+      },
+    },
+    {
+      attrs: {
+        label: "归属公司",
+        prop: "sellCorporationId",
+        "min-width": 220,
+      },
+      render(type) {
+        let text = "";
+        if (corporationList.value && corporationList.value.length > 0) {
+          let data = corporationList.value.filter((item) => item.value == type);
+          if (data && data.length > 0) {
+            text = data[0].label;
+          }
+        }
+        return text;
+      },
+    },
+    {
+      attrs: {
+        label: "报价人",
+        prop: "userName",
+        width: 120,
+      },
+    },
+    {
+      attrs: {
+        label: "报价时间",
+        prop: "createTime",
+        width: 160,
+      },
+    },
+    {
+      attrs: {
+        label: "客户名称",
+        prop: "buyCorporationId",
+        "min-width": 220,
+      },
+      render(type) {
+        let text = "";
+        if (customerList.value && customerList.value.length > 0) {
+          let data = customerList.value.filter((item) => item.value == type);
+          if (data && data.length > 0) {
+            text = data[0].label;
+          }
+        }
+        return text;
+      },
+    },
+    {
+      attrs: {
+        label: "报价金额",
+        slot: "amount",
+        width: 140,
+      },
+    },
+    {
+      attrs: {
+        label: "预付比例",
+        slot: "advanceRatio",
+        width: 120,
+      },
+    },
+    {
+      attrs: {
+        label: "审批状态",
+        prop: "status",
+        width: 140,
+      },
+      render(type) {
+        let text = "";
+        if (status.value && status.value.length > 0) {
+          let data = status.value.filter((item) => item.value == type);
+          if (data && data.length > 0) {
+            text = data[0].label;
+          }
+        }
+        return text;
+      },
+    },
+    {
+      attrs: {
+        label: "操作",
+        width: "120",
+        align: "center",
+        fixed: "right",
+      },
+      renderHTML(row) {
+        return [
+          {
+            attrs: {
+              label: "复制",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              clickCopy(row);
+            },
+          },
+          {
+            attrs: {
+              label: "打印",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              clickPrint(row);
+            },
+          },
+        ];
+      },
+    },
+  ];
+});
+const getDict = () => {
+  proxy.post("/saleQuotation/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+    accountList.value = res.rows.map((item) => {
+      return {
+        label: item.alias,
+        value: item.id,
+      };
+    });
+  });
+  proxy.post("/corporation/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+    corporationList.value = res.rows.map((item) => {
+      return {
+        ...item,
+        label: item.name,
+        value: item.id,
+      };
+    });
+  });
+  proxy.post("/customer/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+    customerList.value = res.rows.map((item) => {
+      return {
+        ...item,
+        label: item.name,
+        value: item.id,
+      };
+    });
+  });
+  proxy
+    .post("/dictTenantData/page", {
+      pageNum: 1,
+      pageSize: 999,
+      dictCode: "trade_methods",
+      tenantId: useUserStore().user.tenantId,
+    })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        tradeMethods.value = res.rows.map((item) => {
+          return {
+            label: item.dictValue,
+            value: item.dictKey,
+          };
+        });
+      }
+    });
+  proxy
+    .post("/dictTenantData/page", {
+      pageNum: 1,
+      pageSize: 999,
+      dictCode: "account_currency",
+      tenantId: useUserStore().user.tenantId,
+    })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        accountCurrency.value = res.rows.map((item) => {
+          return {
+            label: item.dictValue,
+            value: item.dictKey,
+          };
+        });
+      }
+    });
+  proxy
+    .post("/dictTenantData/page", {
+      pageNum: 1,
+      pageSize: 999,
+      dictCode: "shipping_method",
+      tenantId: useUserStore().user.tenantId,
+    })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        shippingMethod.value = res.rows.map((item) => {
+          return {
+            label: item.dictValue,
+            value: item.dictKey,
+          };
+        });
+      }
+    });
+};
+const getList = async (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy.post("/saleQuotation/page", sourceList.value.pagination).then((res) => {
+    sourceList.value.data = res.rows;
+    sourceList.value.pagination.total = res.total;
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
+  });
+};
+getDict();
+getList();
+const newPriceSheet = () => {
+  proxy.$router.replace({
+    path: "/platform_manage/process/processApproval",
+    query: {
+      flowKey: "sale_quotation_flow",
+      flowName: "报价审批流程",
+      random: proxy.random(),
+      tenantType: "EHSD",
+    },
+  });
+};
+const clickCopy = (item) => {
+  proxy.$router.replace({
+    path: "/platform_manage/process/processApproval",
+    query: {
+      flowKey: "sale_quotation_flow",
+      flowName: "报价审批流程",
+      id: item.id,
+      random: proxy.random(),
+      tenantType: "EHSD",
+    },
+  });
+};
+const openPrint = ref(false);
+const printDetails = ref({});
+const clickPrint = (row) => {
+  printDetails.value = {};
+  openPrint.value = true;
+  proxy.post("/saleQuotation/detail", { id: row.id }).then((res) => {
+    printDetails.value = res;
+  });
+};
+const clickDownload = () => {
+  proxy.getPdf("报价单PDF文件");
+};
+const statistics = (label, index) => {
+  let num = 0;
+  if (printDetails.value.quotationProductList && printDetails.value.quotationProductList.length > 0) {
+    printDetails.value.quotationProductList.map((item) => {
+      if (item[label]) {
+        num = parseFloat(Number(num) + Number(item[label])).toFixed(index);
+      }
+    });
+  }
+  return num;
+};
+const getLabel = (key, list, label) => {
+  let text = "";
+  if (list && list.length > 0) {
+    let data = list.filter((item) => item.id === key);
+    if (data && data.length > 0) {
+      text = data[0][label];
+    }
+  }
+  return text;
+};
+const getAllMoney = (num) => {
+  let money = num;
+  if (printDetails.value.quotationPayList && printDetails.value.quotationPayList.length > 0) {
+    printDetails.value.quotationPayList.map((item) => {
+      if (item.amount) {
+        money = parseFloat(Number(money) + Number(item.amount)).toFixed(2);
+      }
+    });
+  }
+  return money;
+};
+</script>
+
+<style lang="scss" scoped>
+.tenant {
+  padding: 20px;
+}
+::v-deep(.el-input-number .el-input__inner) {
+  text-align: left;
+}
+.baseRow {
+  min-height: 24px;
+  border-top: 1px solid black;
+  border-left: 1px solid black;
+}
+.contentRow {
+  border-right: 1px solid black;
+  line-height: 24px;
+  padding-left: 4px;
+}
+</style>

+ 1 - 1
src/views/dataBoard/board/productAnalysis/index.vue

@@ -370,7 +370,7 @@ const getProductTypeRanking = () => {
   query.orderBy = orderBy.value[productTypeRankingOrder.value] || 20;
   proxy.post("/productInfo/productTypeRanking", query).then(
     (res) => {
-      // allData.productTypeRanking = res;
+      allData.productTypeRanking = res;
       setTimeout(() => {
         loadingTwo.value = false;
       }, 200);

+ 28 - 70
src/views/process/processApproval/index.vue

@@ -5,71 +5,31 @@
         <div class="commons-title title">
           {{ route.query.flowName || "流程标题(发起)" }}
         </div>
-        <SendSubscribe
-          ref="makeDom"
-          v-if="flowForm.flowKey == 'subscribe_flow'"
-        ></SendSubscribe>
-        <SendPurchase
-          ref="makeDom"
-          v-else-if="flowForm.flowKey == 'purchase_flow'"
-          :queryData="queryData.data"
-        ></SendPurchase>
-        <SendFunds
-          ref="makeDom"
-          v-else-if="flowForm.flowKey == 'account_request_funds_flow'"
-          :queryData="queryData.data"
-        ></SendFunds>
-        <ReturnGood
-          ref="makeDom"
-          v-else-if="flowForm.flowKey == 'sales_return_flow'"
-          :queryData="queryData.data"
-        ></ReturnGood>
-        <PurchaseRefund
-          ref="makeDom"
-          v-else-if="flowForm.flowKey == 'refund_flow'"
-          :queryData="queryData.data"
-        ></PurchaseRefund>
-        <PurchasePayment
-          ref="makeDom"
-          v-else-if="flowForm.flowKey == 'pay_flow'"
-          :queryData="queryData.data"
-        ></PurchasePayment>
+        <SendSubscribe ref="makeDom" v-if="flowForm.flowKey == 'subscribe_flow'"></SendSubscribe>
+        <SendPurchase ref="makeDom" v-else-if="flowForm.flowKey == 'purchase_flow'" :queryData="queryData.data"></SendPurchase>
+        <SendFunds ref="makeDom" v-else-if="flowForm.flowKey == 'account_request_funds_flow'" :queryData="queryData.data"></SendFunds>
+        <ReturnGood ref="makeDom" v-else-if="flowForm.flowKey == 'sales_return_flow'" :queryData="queryData.data"></ReturnGood>
+        <PurchaseRefund ref="makeDom" v-else-if="flowForm.flowKey == 'refund_flow'" :queryData="queryData.data"></PurchaseRefund>
+        <PurchasePayment ref="makeDom" v-else-if="flowForm.flowKey == 'pay_flow'" :queryData="queryData.data"></PurchasePayment>
         <PriceSheet
           ref="makeDom"
-          v-else-if="flowForm.flowKey == 'sale_quotation_flow'"
-          :queryData="queryData.data"
-        ></PriceSheet>
-        <Contract
+          v-else-if="flowForm.flowKey == 'sale_quotation_flow' && flowForm.tenantType !== 'EHSD'"
+          :queryData="queryData.data"></PriceSheet>
+        <PriceSheetEHSD
           ref="makeDom"
-          v-else-if="flowForm.flowKey == 'contract_flow'"
-          :queryData="queryData.data"
-        ></Contract>
-        <ServiceContract
-          ref="makeDom"
-          v-else-if="flowForm.flowKey == 'service_contract_flow'"
-          :queryData="queryData.data"
-        ></ServiceContract>
+          v-else-if="flowForm.flowKey == 'sale_quotation_flow' && flowForm.tenantType === 'EHSD'"
+          :queryData="queryData.data"></PriceSheetEHSD>
+        <Contract ref="makeDom" v-else-if="flowForm.flowKey == 'contract_flow'" :queryData="queryData.data"></Contract>
+        <ServiceContract ref="makeDom" v-else-if="flowForm.flowKey == 'service_contract_flow'" :queryData="queryData.data"></ServiceContract>
         <!-- 维多利亚 -->
-        <SendSubscribeWDLY
-          ref="makeDom"
-          v-else-if="flowForm.flowKey == 'wdly_apply_purchase'"
-        ></SendSubscribeWDLY>
-        <SendPurchaseWDLY
-          ref="makeDom"
-          v-else-if="flowForm.flowKey == 'wdly_purchase'"
-          :queryData="queryData.data"
-        ></SendPurchaseWDLY>
+        <SendSubscribeWDLY ref="makeDom" v-else-if="flowForm.flowKey == 'wdly_apply_purchase'"></SendSubscribeWDLY>
+        <SendPurchaseWDLY ref="makeDom" v-else-if="flowForm.flowKey == 'wdly_purchase'" :queryData="queryData.data"></SendPurchaseWDLY>
       </div>
       <div class="bottom">
         <div class="commons-title title">处理意见</div>
         <el-form :model="flowForm" :rules="flowRules" ref="flowFormDom">
           <el-form-item prop="remark" label-width="0px" label="">
-            <el-input
-              type="textarea"
-              placeholder="请输入"
-              v-model="flowForm.remark"
-            >
-            </el-input>
+            <el-input type="textarea" placeholder="请输入" v-model="flowForm.remark"> </el-input>
           </el-form-item>
           <el-form-item>
             <el-button type="primary" @click="handleSubmit">提交</el-button>
@@ -107,18 +67,8 @@
     <el-dialog title="下一处理人" width="400" v-model="dialogVisible">
       <el-form :model="flowForm">
         <el-form-item prop="remark" label="处理人">
-          <el-select
-            v-model="flowForm.handleUserId"
-            placeholder="请选择"
-            filterable
-            style="width: 100%"
-          >
-            <el-option
-              v-for="item in nextHandleUser"
-              :label="item.name"
-              :value="item.id"
-            >
-            </el-option>
+          <el-select v-model="flowForm.handleUserId" placeholder="请选择" filterable style="width: 100%">
+            <el-option v-for="item in nextHandleUser" :label="item.name" :value="item.id"> </el-option>
           </el-select>
         </el-form-item>
         <el-form-item>
@@ -131,7 +81,7 @@
   </div>
 </template>
 
-<script setup name='ProcessApproval'>
+<script setup name="ProcessApproval">
 import useTagsViewStore from "@/store/modules/tagsView.js";
 import { useRouter, useRoute } from "vue-router";
 //决策辅助
@@ -152,6 +102,8 @@ import PurchaseRefund from "@/components/process/PurchaseRefund";
 import PurchasePayment from "@/components/process/PurchasePayment";
 // 报价单
 import PriceSheet from "@/components/process/PriceSheet";
+// 报价单-EHSD
+import PriceSheetEHSD from "@/components/process/EHSD/PriceSheet";
 // 销售合同
 import Contract from "@/components/process/Contract";
 // 服务合同
@@ -172,6 +124,7 @@ const handleClick = (tab, event) => {
 // 意见表单
 const flowForm = reactive({
   flowKey: "",
+  tenantType: "",
   handleUserId: "",
   remark: "",
   data: {},
@@ -302,10 +255,14 @@ const skipPage = () => {
     router.replace({
       path: "/purchaseManage/purchasePayment/payment",
     });
-  } else if (flowForm.flowKey == "sale_quotation_flow") {
+  } else if (flowForm.flowKey == "sale_quotation_flow" && flowForm.tenantType !== "EHSD") {
     router.replace({
       path: "/salesMange/saleContract/priceSheet",
     });
+  } else if (flowForm.flowKey == "sale_quotation_flow" && flowForm.tenantType === "EHSD") {
+    router.replace({
+      path: "/EHSD/saleContract/priceSheet",
+    });
   } else if (flowForm.flowKey == "contract_flow") {
     router.replace({
       path: "/salesMange/saleContract/contract",
@@ -342,6 +299,7 @@ const getRecords = () => {
 onMounted(() => {
   queryData.data = { ...route.query };
   flowForm.flowKey = route.query.flowKey;
+  flowForm.tenantType = route.query.tenantType;
   getRecords();
 });
 </script>