cz 1 рік тому
батько
коміт
2924ada976

+ 3 - 3
src/components/byTable/index.vue

@@ -17,7 +17,7 @@
   <div
     class="stat-warp"
     v-if="statConfig.length != 0"
-    :class="statWarpHeight > 116 && isMore ? 'show-more' : ''"
+    :class="statWarpHeight > 110 && isMore ? 'show-more' : ''"
   >
     <div class="title">
       <select
@@ -32,7 +32,7 @@
       <div v-if="statConfig.length === 1">{{ statConfig[0].label }}</div>
     </div>
     <div class="more-btn">
-      <span @click="isMore = !isMore" v-if="statWarpHeight > 116">
+      <span @click="isMore = !isMore" v-if="statWarpHeight > 110">
         {{ isMore ? "收起" : "展开" }}
         <i
           class="el-icon-arrow-down"
@@ -373,7 +373,7 @@ export default defineComponent({
     const changeStatData = () => {
       nextTick(() => {
         statWarpHeight.value = document.getElementById("statWarp").offsetHeight;
-        console.log(statWarpHeight.value, "awda");
+        console.log(statWarpHeight.value, "ada");
       });
     };
     let statWarpHeight = ref(0);

Різницю між файлами не показано, бо вона завелика
+ 550 - 158
src/components/process/EHSD/Contract.vue


Різницю між файлами не показано, бо вона завелика
+ 483 - 144
src/components/process/EHSD/PriceSheet.vue


Різницю між файлами не показано, бо вона завелика
+ 506 - 128
src/components/process/EHSD/Sample.vue


+ 2 - 23
src/views/EHSD/productLibrary/companyProduct/index.vue

@@ -180,7 +180,6 @@ let rules = ref({
     { required: true, message: "请选择产品分类", trigger: "change" },
   ],
   name: [{ required: true, message: "请输入产品名称", trigger: "blur" }],
-  unit: [{ required: true, message: "请选择产品单位", trigger: "change" }],
   productLong: [
     { required: true, message: "请输入长 (cm)", trigger: "blur" },
   ],
@@ -230,16 +229,7 @@ const config = computed(() => {
         prop: "name",
       },
     },
-    {
-      attrs: {
-        label: "单位",
-        prop: "unit",
-        width: 80,
-      },
-      render(unit) {
-        return proxy.dictValueLabel(unit, productUnit.value);
-      },
-    },
+ 
     {
       attrs: {
         label: "尺寸",
@@ -378,18 +368,7 @@ const formConfig = computed(() => {
       itemWidth: 100,
       disabled: false,
     },
-    {
-      type: "select",
-      prop: "unit",
-      label: "单位",
-      required: true,
-      itemWidth: 100,
-      data: productUnit.value,
-      style: {
-        width: "50%",
-      },
-      disabled: false,
-    },
+  
     {
       type: "slot",
       slotName: "productPic",

+ 2 - 23
src/views/EHSD/productLibrary/customerProduct/index.vue

@@ -206,7 +206,6 @@ let rules = ref({
     { required: true, message: "请选择产品分类", trigger: "change" },
   ],
   name: [{ required: true, message: "请输入产品名称", trigger: "blur" }],
-  unit: [{ required: true, message: "请选择产品单位", trigger: "change" }],
   productLong: [
     { required: true, message: "请输入长 (cm)", trigger: "blur" },
   ],
@@ -265,16 +264,7 @@ const config = computed(() => {
         prop: "name",
       },
     },
-    {
-      attrs: {
-        label: "单位",
-        prop: "unit",
-        width: 80,
-      },
-      render(unit) {
-        return proxy.dictValueLabel(unit, productUnit.value);
-      },
-    },
+
     {
       attrs: {
         label: "尺寸",
@@ -435,18 +425,7 @@ const formConfig = computed(() => {
       itemWidth: 100,
       disabled: false,
     },
-    {
-      type: "select",
-      prop: "unit",
-      label: "单位",
-      required: true,
-      itemWidth: 100,
-      data: productUnit.value,
-      style: {
-        width: "50%",
-      },
-      disabled: false,
-    },
+
     {
       type: "slot",
       slotName: "productPic",

+ 417 - 96
src/views/EHSD/saleContract/contractEHSD/index.vue

@@ -14,7 +14,18 @@
             action: () => newContract(),
           },
         ]"
-        @get-list="getList">
+        @get-list="getList"
+      >
+        <template #code="{ item }">
+          <div style="width: 100%">
+            <a
+              style="color: #409eff; cursor: pointer; word-break: break-all"
+              @click="openDetails(item)"
+              >{{ item.code }}</a
+            >
+          </div>
+        </template>
+
         <template #amount="{ item }">
           <div>
             <span style="padding-right: 4px">{{ item.currency }}</span>
@@ -23,12 +34,23 @@
         </template>
         <template #buyCorporationName="{ item }">
           <div style="width: 100%">
-            <a style="color: #409eff; cursor: pointer" @click="clickCorporationName(item.buyCorporationName)">{{ item.buyCorporationName }}</a>
+            <a
+              style="color: #409eff; cursor: pointer"
+              @click="clickCorporationName(item)"
+              >{{ item.buyCorporationName }}</a
+            >
           </div>
         </template>
         <template #tags="{ item }">
           <div style="width: 100%">
-            <el-tag style="margin-right: 8px" type="success" v-for="(tag, index) in item.tags" closable :key="index" @close="tagClose(tag, item)">
+            <el-tag
+              style="margin-right: 8px"
+              type="success"
+              v-for="(tag, index) in item.tags"
+              closable
+              :key="index"
+              @close="tagClose(tag, item)"
+            >
               {{ dictValueLabel(tag, customerTag) }}
             </el-tag>
             <template v-if="item.tags.length !== customerTag.length">
@@ -40,30 +62,66 @@
                   (val) => {
                     return changeTag(val, item);
                   }
-                ">
-                <el-option v-for="tag in customerTag" :key="tag.value" :label="tag.label" :value="tag.value" :disabled="judgeTagSelect(item.tags, tag.value)" />
+                "
+              >
+                <el-option
+                  v-for="tag in customerTag"
+                  :key="tag.value"
+                  :label="tag.label"
+                  :value="tag.value"
+                  :disabled="judgeTagSelect(item.tags, tag.value)"
+                />
               </el-select>
-              <el-tag style="cursor: pointer" type="success" @click="showSelect(item)" v-else> + </el-tag>
+              <el-tag
+                style="cursor: pointer"
+                type="success"
+                @click="showSelect(item)"
+                v-else
+              >
+                +
+              </el-tag>
             </template>
           </div>
         </template>
         <template #advanceRatio="{ item }">
           <div>
-            <span>{{ item.advanceRatio }}%</span>
+            <span>{{ moneyFormat(item.advanceRatio, 2) }}%</span>
+          </div>
+        </template>
+
+        <template #scale="{ item }">
+          <div>
+            {{ computeScale(item) }}
           </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
+        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 }}
+          {{ 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="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>
@@ -73,27 +131,55 @@
             <div style="color: #409eff">VENDOR:</div>
             <div>{{ printDetails.sellCorporationNameEn }}</div>
             <div style="padding: 16px 0">
-              {{ printDetails.sellCountryName }},{{ printDetails.sellProvinceName }},{{ printDetails.sellCityName }},{{ printDetails.sellDetailedAddress }}
+              {{ printDetails.sellCountryName }},{{
+                printDetails.sellProvinceName
+              }},{{ printDetails.sellCityName }},{{
+                printDetails.sellDetailedAddress
+              }}
+            </div>
+            <div>
+              {{ printDetails.sellContactName }},{{
+                printDetails.sellContactNumber
+              }}
             </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 }}
+              {{ printDetails.buyCountryName }},{{
+                printDetails.buyProvinceName
+              }},{{ printDetails.buyCityName }},{{
+                printDetails.buyDetailedAddress
+              }}
+            </div>
+            <div>
+              {{ printDetails.buyContactName }},{{
+                printDetails.buyContactNumber
+              }}
             </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="
+                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="
+                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>
@@ -103,13 +189,25 @@
             </div>
           </div>
           <div style="display: flex; width: 100%">
-            <div style="width: 33%; border-bottom: 1px solid black; border-right: 1px solid black">
+            <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="
+                width: 34%;
+                border-bottom: 1px solid black;
+                border-right: 1px solid black;
+              "
+            >
               <div style="color: #409eff">CURRENCY:</div>
               <div>
                 {{ dictValueLabel(printDetails.currency, accountCurrency) }}
@@ -118,7 +216,9 @@
             <div style="width: 33%; border-bottom: 1px solid black">
               <div style="color: #409eff">EXPORT BY/VIA:</div>
               <div>
-                {{ dictValueLabel(printDetails.transportMethod, shippingMethod) }}
+                {{
+                  dictValueLabel(printDetails.transportMethod, shippingMethod)
+                }}
               </div>
             </div>
           </div>
@@ -135,19 +235,47 @@
         </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 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
+          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">
+            <div
+              class="contentRow"
+              style="width: calc(100% - 450px); text-align: center"
+            >
               {{ item.productName }}
             </div>
             <div class="contentRow" style="width: 100px; text-align: center">
@@ -165,12 +293,23 @@
           </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: 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"
+          ></div>
           <div class="contentRow" style="width: 100px; text-align: center">
             {{ statistics("amount", 2) }}
           </div>
@@ -182,18 +321,38 @@
           </div>
         </div> -->
         <div class="baseRow" style="display: flex">
-          <div class="contentRow" style="width: calc(100% - 100px); text-align: right; color: #409eff">FREIGHT COST:</div>
-          <div class="contentRow" style="width: 100px; text-align: center">0</div>
+          <div
+            class="contentRow"
+            style="width: calc(100% - 100px); text-align: right; color: #409eff"
+          >
+            FREIGHT COST:
+          </div>
+          <div class="contentRow" style="width: 100px; text-align: center">
+            0
+          </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: 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="baseRow"
+          style="display: flex; border-bottom: 1px solid black"
+        >
           <div class="contentRow" style="width: 100%">
-            {{ translateIntoEnglish(printDetails.totalAmount, printDetails.currency) }}
+            {{
+              translateIntoEnglish(
+                printDetails.totalAmount,
+                printDetails.currency
+              )
+            }}
           </div>
         </div>
         <div style="height: 16px"></div>
@@ -202,20 +361,66 @@
         </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">
+            <div
+              style="
+                line-height: 24px;
+                padding-left: 4px;
+                word-break: break-all;
+                word-wrap: break-word;
+              "
+            >
               Beneficiary Name: {{ printDetails.beneficiaryName }}
             </div>
-            <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">
+            <div
+              style="
+                line-height: 24px;
+                padding-left: 4px;
+                word-break: break-all;
+                word-wrap: break-word;
+              "
+            >
               Beneficiary Bank: {{ printDetails.beneficiaryBank }}
             </div>
-            <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">
-              Beneficiary Bank Address: {{ printDetails.beneficiaryBankAddress }}
+            <div
+              style="
+                line-height: 24px;
+                padding-left: 4px;
+                word-break: break-all;
+                word-wrap: break-word;
+              "
+            >
+              Beneficiary Bank Address:
+              {{ printDetails.beneficiaryBankAddress }}
             </div>
-            <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">
-              Beneficiary Account Number: {{ printDetails.beneficiaryAccountNumber }}
+            <div
+              style="
+                line-height: 24px;
+                padding-left: 4px;
+                word-break: break-all;
+                word-wrap: break-word;
+              "
+            >
+              Beneficiary Account Number:
+              {{ printDetails.beneficiaryAccountNumber }}
             </div>
-            <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">Swift Code: {{ printDetails.swiftCode }}</div>
-            <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">
+            <div
+              style="
+                line-height: 24px;
+                padding-left: 4px;
+                word-break: break-all;
+                word-wrap: break-word;
+              "
+            >
+              Swift Code: {{ printDetails.swiftCode }}
+            </div>
+            <div
+              style="
+                line-height: 24px;
+                padding-left: 4px;
+                word-break: break-all;
+                word-wrap: break-word;
+              "
+            >
               Beneficiary Address: {{ printDetails.beneficiaryAddress }}
             </div>
           </div>
@@ -234,12 +439,23 @@
       </div>
       <template #footer>
         <el-button @click="openPrint = false" size="large">取消</el-button>
-        <el-button type="primary" @click="clickDownload()" size="large">下载PDF</el-button>
+        <el-button type="primary" @click="clickDownload()" size="large"
+          >下载PDF</el-button
+        >
       </template>
     </el-dialog>
 
-    <el-dialog title="交接单" v-if="openHandoverSlip" v-model="openHandoverSlip" width="600">
-      <byForm :formConfig="formConfig" :formOption="formOption" v-model="handoverSlipForm">
+    <el-dialog
+      title="交接单"
+      v-if="openHandoverSlip"
+      v-model="openHandoverSlip"
+      width="600"
+    >
+      <byForm
+        :formConfig="formConfig"
+        :formOption="formOption"
+        v-model="handoverSlipForm"
+      >
         <template #file>
           <div style="width: 100%">
             <el-upload
@@ -249,7 +465,8 @@
               multiple
               :before-upload="uploadFile"
               :on-success="handleSuccess"
-              :on-preview="onPreviewFile">
+              :on-preview="onPreviewFile"
+            >
               <el-button type="primary" plain>选择</el-button>
             </el-upload>
           </div>
@@ -263,17 +480,30 @@
               multiple
               :before-upload="indicationUploadFile"
               :on-success="handleSuccess"
-              :on-preview="onPreviewFile">
+              :on-preview="onPreviewFile"
+            >
               <el-button type="primary" plain>选择</el-button>
             </el-upload>
           </div>
         </template>
       </byForm>
       <template #footer>
-        <el-button @click="openHandoverSlip = false" size="large">关 闭</el-button>
-        <el-button type="primary" @click="submitHandoverSlip()" size="large">确 定</el-button>
+        <el-button @click="openHandoverSlip = false" size="large"
+          >关 闭</el-button
+        >
+        <el-button type="primary" @click="submitHandoverSlip()" size="large"
+          >确 定</el-button
+        >
       </template>
     </el-dialog>
+    <el-dialog
+      title="合同详情"
+      v-if="openDetailsDialog"
+      v-model="openDetailsDialog"
+      width="1100"
+    >
+      <ContractDetails :contractId="currentContractId"></ContractDetails>
+    </el-dialog>
   </div>
 </template>
 
@@ -283,6 +513,7 @@ import byTable from "@/components/byTable/index";
 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";
 
 const { proxy } = getCurrentInstance();
 const accountCurrency = ref([]);
@@ -292,6 +523,8 @@ const customerList = ref([]);
 const userList = ref([]);
 const shippingMethod = ref([]);
 const customerTag = ref([]);
+const openDetailsDialog = ref(false);
+
 const status = ref([
   {
     label: "草稿",
@@ -344,8 +577,8 @@ const config = computed(() => {
   return [
     {
       attrs: {
-        label: "合同号",
-        prop: "code",
+        label: "合同号",
+        slot: "code",
         width: 180,
       },
     },
@@ -383,11 +616,19 @@ const config = computed(() => {
         "min-width": 220,
       },
     },
+    // {
+    //   attrs: {
+    //     label: "客户标签",
+    //     slot: "tags",
+    //     width: 180,
+    //   },
+    // },
     {
       attrs: {
-        label: "客户标签",
-        slot: "tags",
-        width: 180,
+        label: "预付比例",
+        slot: "advanceRatio",
+        width: 140,
+        align: "right",
       },
     },
     {
@@ -395,17 +636,53 @@ const config = computed(() => {
         label: "合同金额",
         slot: "amount",
         width: 140,
+        align: "right",
       },
     },
     {
       attrs: {
-        label: "预付比例",
-        slot: "advanceRatio",
-        width: 140,
+        label: "汇率",
+        prop: "rate",
+        width: 80,
+        align: "right",
+      },
+      render(rate) {
+        return proxy.moneyFormat(rate, 4);
       },
     },
     {
       attrs: {
+        label: "合同金额(CNY)",
+        prop: "amountCNY",
+        width: 160,
+        align: "right",
+      },
+      render(amountCNY) {
+        return proxy.moneyFormat(amountCNY, 2);
+      },
+    },
+    {
+      attrs: {
+        label: "到账金额(CNY)",
+        prop: "sumClaimMoney",
+        width: 160,
+        align: "right",
+      },
+      render(sumClaimMoney) {
+        return proxy.moneyFormat(sumClaimMoney, 2);
+      },
+    },
+    {
+      attrs: {
+        label: "到账比例",
+        slot: "scale",
+        width: 100,
+        align: "right",
+      },
+    },
+
+    {
+      attrs: {
         label: "审批状态",
         prop: "status",
         width: 140,
@@ -453,11 +730,15 @@ const config = computed(() => {
             },
             el: "button",
             click() {
-              ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
-                confirmButtonText: "确定",
-                cancelButtonText: "取消",
-                type: "warning",
-              }).then(() => {
+              ElMessageBox.confirm(
+                "此操作将永久删除该数据, 是否继续?",
+                "提示",
+                {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning",
+                }
+              ).then(() => {
                 proxy
                   .post("/contract/edit", {
                     id: row.id,
@@ -479,24 +760,31 @@ const config = computed(() => {
   ];
 });
 const getDict = () => {
-  proxy.getDictOne(["customer_tag", "trade_mode", "account_currency", "shipping_method"]).then((res) => {
-    customerTag.value = res["customer_tag"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    tradeMethods.value = res["trade_mode"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    accountCurrency.value = res["account_currency"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    shippingMethod.value = res["shipping_method"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-  });
+  proxy
+    .getDictOne([
+      "customer_tag",
+      "trade_mode",
+      "account_currency",
+      "shipping_method",
+    ])
+    .then((res) => {
+      customerTag.value = res["customer_tag"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      tradeMethods.value = res["trade_mode"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      accountCurrency.value = res["account_currency"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      shippingMethod.value = res["shipping_method"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+    });
   proxy.post("/corporation/page", { pageNum: 1, pageSize: 999 }).then((res) => {
     corporationList.value = res.rows.map((item) => {
       return {
@@ -576,7 +864,10 @@ const clickDownload = () => {
 };
 const statistics = (label, index) => {
   let num = 0;
-  if (printDetails.value.productInfoList && printDetails.value.productInfoList.length > 0) {
+  if (
+    printDetails.value.productInfoList &&
+    printDetails.value.productInfoList.length > 0
+  ) {
     printDetails.value.productInfoList.map((item) => {
       if (item[label]) {
         num = parseFloat(Number(num) + Number(item[label])).toFixed(index);
@@ -645,13 +936,15 @@ const clickHandoverSlip = (item) => {
     handoverSlipForm.value.fileList = [];
   }
   if (item.packageFileInfoVOList && item.packageFileInfoVOList.length > 0) {
-    handoverSlipForm.value.packageFileList = item.packageFileInfoVOList.map((item) => {
-      return {
-        raw: item,
-        name: item.fileName,
-        url: item.fileUrl,
-      };
-    });
+    handoverSlipForm.value.packageFileList = item.packageFileInfoVOList.map(
+      (item) => {
+        return {
+          raw: item,
+          name: item.fileName,
+          url: item.fileUrl,
+        };
+      }
+    );
   } else {
     handoverSlipForm.value.packageFileList = [];
   }
@@ -682,14 +975,20 @@ const onPreviewFile = (file) => {
   window.open(file.raw.fileUrl, "_blank");
 };
 const submitHandoverSlip = () => {
-  if (handoverSlipForm.value.fileList && handoverSlipForm.value.fileList.length > 0) {
+  if (
+    handoverSlipForm.value.fileList &&
+    handoverSlipForm.value.fileList.length > 0
+  ) {
     for (let i = 0; i < handoverSlipForm.value.fileList.length; i++) {
       if (handoverSlipForm.value.fileList[i].raw.uploadState) {
         return ElMessage("文件上传中,请稍后提交");
       }
     }
   }
-  if (handoverSlipForm.value.packageFileList && handoverSlipForm.value.packageFileList.length > 0) {
+  if (
+    handoverSlipForm.value.packageFileList &&
+    handoverSlipForm.value.packageFileList.length > 0
+  ) {
     for (let i = 0; i < handoverSlipForm.value.packageFileList.length; i++) {
       if (handoverSlipForm.value.packageFileList[i].raw.uploadState) {
         return ElMessage("文件上传中,请稍后提交");
@@ -778,11 +1077,33 @@ const tagClose = (val, item) => {
 const showSelect = (item) => {
   item.addTagShow = true;
 };
-const clickCorporationName = (name) => {
-  proxy.$router.replace({
-    path: "/ERP/customer/privatesea",
+
+const currentContractId = ref("");
+const openDetails = (row) => {
+  currentContractId.value = row.id;
+  openDetailsDialog.value = true;
+};
+
+const computeScale = (item) => {
+  let text = 0;
+  if (
+    item.sumClaimMoney &&
+    Number(item.sumClaimMoney) > 0 &&
+    item.amountCNY &&
+    Number(item.amountCNY) > 0
+  ) {
+    text = parseFloat(
+      (Number(item.sumClaimMoney) / Number(item.amountCNY)) * 100
+    ).toFixed(2);
+  }
+  return text + "%";
+};
+
+const clickCorporationName = (row) => {
+  proxy.$router.push({
+    name: "Portrait",
     query: {
-      name: name,
+      id: row.buyCorporationId,
     },
   });
 };

+ 211 - 57
src/views/EHSD/saleContract/sampleEHSD/index.vue

@@ -13,7 +13,18 @@
           action: () => newSample(),
         },
       ]"
-      @get-list="getList">
+      @get-list="getList"
+    >
+      <template #code="{ item }">
+        <div style="width: 100%">
+          <a
+            style="color: #409eff; cursor: pointer; word-break: break-all"
+            @click="openDetails(item)"
+            >{{ item.code }}</a
+          >
+        </div>
+      </template>
+
       <template #amount="{ item }">
         <div style="width: 100%">
           <span style="padding-right: 4px">{{ item.currency }}</span>
@@ -22,12 +33,23 @@
       </template>
       <template #buyCorporationName="{ item }">
         <div style="width: 100%">
-          <a style="color: #409eff; cursor: pointer" @click="clickCorporationName(item.buyCorporationName)">{{ item.buyCorporationName }}</a>
+          <a
+            style="color: #409eff; cursor: pointer"
+            @click="clickCorporationName(item)"
+            >{{ item.buyCorporationName }}</a
+          >
         </div>
       </template>
       <template #tags="{ item }">
         <div style="width: 100%">
-          <el-tag style="margin-right: 8px" type="success" v-for="(tag, index) in item.tags" closable :key="index" @close="tagClose(tag, item)">
+          <el-tag
+            style="margin-right: 8px"
+            type="success"
+            v-for="(tag, index) in item.tags"
+            closable
+            :key="index"
+            @close="tagClose(tag, item)"
+          >
             {{ dictValueLabel(tag, customerTag) }}
           </el-tag>
           <template v-if="item.tags.length !== customerTag.length">
@@ -39,10 +61,24 @@
                 (val) => {
                   return changeTag(val, item);
                 }
-              ">
-              <el-option v-for="tag in customerTag" :key="tag.value" :label="tag.label" :value="tag.value" :disabled="judgeTagSelect(item.tags, tag.value)" />
+              "
+            >
+              <el-option
+                v-for="tag in customerTag"
+                :key="tag.value"
+                :label="tag.label"
+                :value="tag.value"
+                :disabled="judgeTagSelect(item.tags, tag.value)"
+              />
             </el-select>
-            <el-tag style="cursor: pointer" type="success" @click="showSelect(item)" v-else> + </el-tag>
+            <el-tag
+              style="cursor: pointer"
+              type="success"
+              @click="showSelect(item)"
+              v-else
+            >
+              +
+            </el-tag>
           </template>
         </div>
       </template>
@@ -51,10 +87,24 @@
           <span>{{ item.advanceRatio }}%</span>
         </div>
       </template>
+      <template #scale="{ item }">
+        <div>
+          {{ computeScale(item) }}
+        </div>
+      </template>
     </byTable>
 
-    <el-dialog title="交接单" v-if="openHandoverSlip" v-model="openHandoverSlip" width="600">
-      <byForm :formConfig="formConfig" :formOption="formOption" v-model="handoverSlipForm">
+    <el-dialog
+      title="交接单"
+      v-if="openHandoverSlip"
+      v-model="openHandoverSlip"
+      width="600"
+    >
+      <byForm
+        :formConfig="formConfig"
+        :formOption="formOption"
+        v-model="handoverSlipForm"
+      >
         <template #file>
           <div style="width: 100%">
             <el-upload
@@ -64,7 +114,8 @@
               multiple
               :before-upload="uploadFile"
               :on-success="handleSuccess"
-              :on-preview="onPreviewFile">
+              :on-preview="onPreviewFile"
+            >
               <el-button type="primary" plain>选择</el-button>
             </el-upload>
           </div>
@@ -78,17 +129,31 @@
               multiple
               :before-upload="indicationUploadFile"
               :on-success="handleSuccess"
-              :on-preview="onPreviewFile">
+              :on-preview="onPreviewFile"
+            >
               <el-button type="primary" plain>选择</el-button>
             </el-upload>
           </div>
         </template>
       </byForm>
       <template #footer>
-        <el-button @click="openHandoverSlip = false" size="large">关 闭</el-button>
-        <el-button type="primary" @click="submitHandoverSlip()" size="large">确 定</el-button>
+        <el-button @click="openHandoverSlip = false" size="large"
+          >关 闭</el-button
+        >
+        <el-button type="primary" @click="submitHandoverSlip()" size="large"
+          >确 定</el-button
+        >
       </template>
     </el-dialog>
+
+    <el-dialog
+      title="合同详情"
+      v-if="openDetailsDialog"
+      v-model="openDetailsDialog"
+      width="1100"
+    >
+      <ContractDetails :contractId="currentContractId"></ContractDetails>
+    </el-dialog>
   </div>
 </template>
 
@@ -98,6 +163,7 @@ import byTable from "@/components/byTable/index";
 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";
 
 const { proxy } = getCurrentInstance();
 const accountCurrency = ref([]);
@@ -107,6 +173,8 @@ const customerList = ref([]);
 const userList = ref([]);
 const shippingMethod = ref([]);
 const customerTag = ref([]);
+const openDetailsDialog = ref(false);
+
 const status = ref([
   {
     label: "草稿",
@@ -155,12 +223,13 @@ const selectConfig = computed(() => {
     },
   ];
 });
+
 const config = computed(() => {
   return [
     {
       attrs: {
-        label: "样品单号",
-        prop: "code",
+        label: "样品单号",
+        slot: "code",
         width: 180,
       },
     },
@@ -198,25 +267,69 @@ const config = computed(() => {
         "min-width": 220,
       },
     },
+    // {
+    //   attrs: {
+    //     label: "客户标签",
+    //     slot: "tags",
+    //     width: 180,
+    //   },
+    // },
+
     {
       attrs: {
-        label: "客户标签",
-        slot: "tags",
-        width: 180,
+        label: "预付比例",
+        slot: "advanceRatio",
+        width: 140,
+        align: "right",
       },
     },
     {
       attrs: {
-        label: "合同金额",
+        label: "样品单金额",
         slot: "amount",
         width: 140,
+        align: "right",
       },
     },
     {
       attrs: {
-        label: "预付比例",
-        slot: "advanceRatio",
-        width: 140,
+        label: "汇率",
+        prop: "rate",
+        width: 80,
+        align: "right",
+      },
+      render(rate) {
+        return proxy.moneyFormat(rate, 4);
+      },
+    },
+    {
+      attrs: {
+        label: "样品单金额(CNY)",
+        prop: "amountCNY",
+        width: 160,
+        align: "right",
+      },
+      render(amountCNY) {
+        // return proxy.moneyFormat(amountCNY, 2);
+      },
+    },
+    {
+      attrs: {
+        label: "到账金额(CNY)",
+        prop: "sumClaimMoney",
+        width: 160,
+        align: "right",
+      },
+      render(sumClaimMoney) {
+        // return proxy.moneyFormat(sumClaimMoney, 2);
+      },
+    },
+    {
+      attrs: {
+        label: "到账比例",
+        slot: "scale",
+        width: 100,
+        align: "right",
       },
     },
     {
@@ -257,11 +370,15 @@ const config = computed(() => {
             },
             el: "button",
             click() {
-              ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
-                confirmButtonText: "确定",
-                cancelButtonText: "取消",
-                type: "warning",
-              }).then(() => {
+              ElMessageBox.confirm(
+                "此操作将永久删除该数据, 是否继续?",
+                "提示",
+                {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning",
+                }
+              ).then(() => {
                 proxy
                   .post("/sample/edit", {
                     id: row.id,
@@ -283,24 +400,31 @@ const config = computed(() => {
   ];
 });
 const getDict = () => {
-  proxy.getDictOne(["customer_tag", "trade_mode", "account_currency", "shipping_method"]).then((res) => {
-    customerTag.value = res["customer_tag"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    tradeMethods.value = res["trade_mode"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    accountCurrency.value = res["account_currency"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    shippingMethod.value = res["shipping_method"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-  });
+  proxy
+    .getDictOne([
+      "customer_tag",
+      "trade_mode",
+      "account_currency",
+      "shipping_method",
+    ])
+    .then((res) => {
+      customerTag.value = res["customer_tag"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      tradeMethods.value = res["trade_mode"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      accountCurrency.value = res["account_currency"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      shippingMethod.value = res["shipping_method"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+    });
   proxy.post("/corporation/page", { pageNum: 1, pageSize: 999 }).then((res) => {
     corporationList.value = res.rows.map((item) => {
       return {
@@ -426,13 +550,15 @@ const clickHandoverSlip = (item) => {
     handoverSlipForm.value.fileList = [];
   }
   if (item.packageFileInfoVOList && item.packageFileInfoVOList.length > 0) {
-    handoverSlipForm.value.packageFileList = item.packageFileInfoVOList.map((item) => {
-      return {
-        raw: item,
-        name: item.fileName,
-        url: item.fileUrl,
-      };
-    });
+    handoverSlipForm.value.packageFileList = item.packageFileInfoVOList.map(
+      (item) => {
+        return {
+          raw: item,
+          name: item.fileName,
+          url: item.fileUrl,
+        };
+      }
+    );
   } else {
     handoverSlipForm.value.packageFileList = [];
   }
@@ -463,14 +589,20 @@ const onPreviewFile = (file) => {
   window.open(file.raw.fileUrl, "_blank");
 };
 const submitHandoverSlip = () => {
-  if (handoverSlipForm.value.fileList && handoverSlipForm.value.fileList.length > 0) {
+  if (
+    handoverSlipForm.value.fileList &&
+    handoverSlipForm.value.fileList.length > 0
+  ) {
     for (let i = 0; i < handoverSlipForm.value.fileList.length; i++) {
       if (handoverSlipForm.value.fileList[i].raw.uploadState) {
         return ElMessage("文件上传中,请稍后提交");
       }
     }
   }
-  if (handoverSlipForm.value.packageFileList && handoverSlipForm.value.packageFileList.length > 0) {
+  if (
+    handoverSlipForm.value.packageFileList &&
+    handoverSlipForm.value.packageFileList.length > 0
+  ) {
     for (let i = 0; i < handoverSlipForm.value.packageFileList.length; i++) {
       if (handoverSlipForm.value.packageFileList[i].raw.uploadState) {
         return ElMessage("文件上传中,请稍后提交");
@@ -556,14 +688,36 @@ const tagClose = (val, item) => {
     getList();
   });
 };
+
+const currentContractId = ref("");
+const openDetails = (row) => {
+  currentContractId.value = row.id;
+  openDetailsDialog.value = true;
+};
+
 const showSelect = (item) => {
   item.addTagShow = true;
 };
-const clickCorporationName = (name) => {
-  proxy.$router.replace({
-    path: "/ERP/customer/privatesea",
+
+const computeScale = (item) => {
+  let text = 0;
+  if (
+    item.sumClaimMoney &&
+    Number(item.sumClaimMoney) > 0 &&
+    item.amountCNY &&
+    Number(item.amountCNY) > 0
+  ) {
+    text = parseFloat(
+      (Number(item.sumClaimMoney) / Number(item.amountCNY)) * 100
+    ).toFixed(2);
+  }
+  return text + "%";
+};
+const clickCorporationName = (row) => {
+  proxy.$router.push({
+    name: "Portrait",
     query: {
-      name: name,
+      id: row.buyCorporationId,
     },
   });
 };

+ 0 - 21
src/views/customer/file/index.vue

@@ -857,13 +857,6 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "客户代码",
-        prop: "customerCode",
-        width: 120,
-      },
-    },
-    {
-      attrs: {
         label: "客户来源",
         prop: "source",
         width: 120,
@@ -1033,14 +1026,6 @@ const formConfig = computed(() => {
       label: "详细地址",
     },
     {
-      type: "input",
-      prop: "customerCode",
-      label: "客户代码",
-      required: true,
-      itemWidth: 100,
-      itemType: "text",
-    },
-    {
       type: "select",
       label: "客户来源",
       prop: "source",
@@ -1668,12 +1653,6 @@ const formSearchConfig = computed(() => {
       label: "所在城市",
     },
     {
-      type: "input",
-      prop: "customerCode",
-      label: "客户代码",
-      itemType: "text",
-    },
-    {
       type: "select",
       label: "客户来源",
       prop: "source",

+ 0 - 21
src/views/customer/highseas/index.vue

@@ -788,13 +788,6 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "客户代码",
-        prop: "customerCode",
-        width: 120,
-      },
-    },
-    {
-      attrs: {
         label: "客户来源",
         prop: "source",
         width: 120,
@@ -933,14 +926,6 @@ const formConfig = computed(() => {
       label: "详细地址",
     },
     {
-      type: "input",
-      prop: "customerCode",
-      label: "客户代码",
-      required: true,
-      itemWidth: 100,
-      itemType: "text",
-    },
-    {
       type: "select",
       label: "客户来源",
       prop: "source",
@@ -1524,12 +1509,6 @@ const formSearchConfig = computed(() => {
       label: "所在城市",
     },
     {
-      type: "input",
-      prop: "customerCode",
-      label: "客户代码",
-      itemType: "text",
-    },
-    {
       type: "select",
       label: "客户来源",
       prop: "source",

+ 0 - 21
src/views/customer/privatesea/index.vue

@@ -789,13 +789,6 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "客户代码",
-        prop: "customerCode",
-        width: 120,
-      },
-    },
-    {
-      attrs: {
         label: "客户来源",
         prop: "source",
         width: 120,
@@ -934,14 +927,6 @@ const formConfig = computed(() => {
       label: "详细地址",
     },
     {
-      type: "input",
-      prop: "customerCode",
-      label: "客户代码",
-      required: true,
-      itemWidth: 100,
-      itemType: "text",
-    },
-    {
       type: "select",
       label: "客户来源",
       prop: "source",
@@ -1527,12 +1512,6 @@ const formSearchConfig = computed(() => {
       label: "所在城市",
     },
     {
-      type: "input",
-      prop: "customerCode",
-      label: "客户代码",
-      itemType: "text",
-    },
-    {
       type: "select",
       label: "客户来源",
       prop: "source",

+ 208 - 88
src/views/process/processApproval/index.vue

@@ -6,40 +6,109 @@
           {{ route.query.flowName || "流程标题(发起)" }}
         </div>
         <div class="line"></div>
-        <SendSubscribe ref="makeDom" @auxiliaryChange='(e) => getAuxiliaryData(e)' v-if="flowForm.flowKey == 'subscribe_flow'" :queryData="queryData.data"></SendSubscribe>
-        <SendPurchase ref="makeDom" @auxiliaryChange='(e) => getAuxiliaryData(e)' 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"  @auxiliaryChange='(e) => getAuxiliaryData(e)' v-else-if="flowForm.flowKey == 'pay_flow'" :queryData="queryData.data"></PurchasePayment>
+        <SendSubscribe
+          ref="makeDom"
+          @auxiliaryChange="(e) => getAuxiliaryData(e)"
+          v-if="flowForm.flowKey == 'subscribe_flow'"
+          :queryData="queryData.data"
+        ></SendSubscribe>
+        <SendPurchase
+          ref="makeDom"
+          @auxiliaryChange="(e) => getAuxiliaryData(e)"
+          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"
+          @auxiliaryChange="(e) => getAuxiliaryData(e)"
+          v-else-if="flowForm.flowKey == 'pay_flow'"
+          :queryData="queryData.data"
+        ></PurchasePayment>
         <template v-else-if="flowForm.flowKey == 'sale_quotation_flow'">
-          <PriceSheetEHSD ref="makeDom" v-if="flowForm.tenantType === 'EHSD'" :queryData="queryData.data"></PriceSheetEHSD>
-          <PriceSheet ref="makeDom" v-else :queryData="queryData.data"></PriceSheet>
+          <PriceSheetEHSD
+            ref="makeDom"
+            v-if="flowForm.tenantType === 'EHSD'"
+            :queryData="queryData.data"
+          ></PriceSheetEHSD>
+          <PriceSheet
+            ref="makeDom"
+            v-else
+            :queryData="queryData.data"
+          ></PriceSheet>
         </template>
         <template v-else-if="flowForm.flowKey == 'contract_flow'">
-          <ContractEHSD ref="makeDom" v-if="flowForm.tenantType === 'EHSD'" :queryData="queryData.data"></ContractEHSD>
-          <Contract ref="makeDom" v-else :queryData="queryData.data" @auxiliaryChange='(e) => getAuxiliaryData(e)'></Contract>
+          <ContractEHSD
+            ref="makeDom"
+            v-if="flowForm.tenantType === 'EHSD'"
+            :queryData="queryData.data"
+            @auxiliaryChange="(e) => getAuxiliaryData(e)"
+          ></ContractEHSD>
+          <Contract
+            ref="makeDom"
+            v-else
+            :queryData="queryData.data"
+            @auxiliaryChange="(e) => getAuxiliaryData(e)"
+          ></Contract>
         </template>
         <template v-else-if="flowForm.flowKey == 'contract_update_flow'">
-          <ContractAlteration ref="makeDom" :queryData="queryData.data" @auxiliaryChange='(e) => getAuxiliaryData(e)'></ContractAlteration>
+          <ContractAlteration
+            ref="makeDom"
+            :queryData="queryData.data"
+            @auxiliaryChange="(e) => getAuxiliaryData(e)"
+          ></ContractAlteration>
         </template>
         <template v-else-if="flowForm.flowKey == 'sample_flow'">
           <SampleEHSD ref="makeDom" :queryData="queryData.data"></SampleEHSD>
         </template>
         <template v-else-if="flowForm.flowKey == 'ehsd_purchase_flow'">
-          <PurchaseEHSD ref="makeDom" :queryData="queryData.data"></PurchaseEHSD>
+          <PurchaseEHSD
+            ref="makeDom"
+            :queryData="queryData.data"
+          ></PurchaseEHSD>
         </template>
 
-        <ServiceContract ref="makeDom" v-else-if="flowForm.flowKey == 'service_contract_flow'" :queryData="queryData.data"></ServiceContract>
+        <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'" :queryData="queryData.data"></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'"
+          :queryData="queryData.data"
+        ></SendSubscribeWDLY>
+        <SendPurchaseWDLY
+          ref="makeDom"
+          v-else-if="flowForm.flowKey == 'wdly_purchase'"
+          :queryData="queryData.data"
+        ></SendPurchaseWDLY>
       </div>
       <div class="bottom" v-if="route.query.processType != 20">
         <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 prop="remark" label-width="80px" label="附件上传">
             <el-upload
@@ -49,13 +118,28 @@
               multiple
               :before-upload="uploadFile"
               :on-success="handleSuccess"
-              :on-preview="onPreviewFile">
+              :on-preview="onPreviewFile"
+            >
               <el-button>选择</el-button>
             </el-upload>
           </el-form-item>
           <el-form-item>
-            <el-button type="primary" v-if="approvalRecordData.buttonInfoList.length == 0" @click="handleSubmit" :loading="btnLoading">提交</el-button>
-            <el-button type="primary" v-else v-for="i in approvalRecordData.buttonInfoList" :key="i.type" :loading="btnLoading" @click="handleSubmit(i.type)">{{ i.name }}</el-button>
+            <el-button
+              type="primary"
+              v-if="approvalRecordData.buttonInfoList.length == 0"
+              @click="handleSubmit"
+              :loading="btnLoading"
+              >提交</el-button
+            >
+            <el-button
+              type="primary"
+              v-else
+              v-for="i in approvalRecordData.buttonInfoList"
+              :key="i.type"
+              :loading="btnLoading"
+              @click="handleSubmit(i.type)"
+              >{{ i.name }}</el-button
+            >
           </el-form-item>
         </el-form>
       </div>
@@ -77,7 +161,8 @@
                   : item.status == 3 && route.query.id
                   ? 'flow-grey'
                   : ''
-              ">
+              "
+            >
               <div class="left-icon">
                 <i class="iconfont icon-iconm_daick"></i>
                 <i class="iconfont icon-icomx_quertj1 right-btm-status"></i>
@@ -86,11 +171,20 @@
                 <div class="name">{{ item.nodeName }}</div>
                 <div class="remark">
                   <div class="label">
-                    <span v-if="item.status != 3">办理人:</span>{{ item.processedUser }}<span class="time">{{ item.processedDate }}</span>
+                    <span v-if="item.status != 3">办理人:</span
+                    >{{ item.processedUser
+                    }}<span class="time">{{ item.processedDate }}</span>
                   </div>
                   {{ item.remark }}
-                  <div v-for="j in fileObj[item.flowExampleDetailId]" v-if="fileObj[item.flowExampleDetailId]">
-                    <a :href="j.fileUrl" style="color:#409EFF;line-height: 30px;">{{ j.fileName }}</a>
+                  <div
+                    v-for="j in fileObj[item.flowExampleDetailId]"
+                    v-if="fileObj[item.flowExampleDetailId]"
+                  >
+                    <a
+                      :href="j.fileUrl"
+                      style="color: #409eff; line-height: 30px"
+                      >{{ j.fileName }}</a
+                    >
                   </div>
                 </div>
               </div>
@@ -98,9 +192,13 @@
             </li>
           </ul>
         </el-tab-pane>
-        <el-tab-pane label="决策辅助" name="second" v-if="auxiliaryData.length > 0">
+        <el-tab-pane
+          label="决策辅助"
+          name="second"
+          v-if="auxiliaryData.length > 0"
+        >
           <div style="overflow: auto; height: calc(100vh - 200px)">
-          <auxiliary :data="auxiliaryData"></auxiliary>
+            <auxiliary :data="auxiliaryData"></auxiliary>
           </div>
         </el-tab-pane>
       </el-tabs>
@@ -109,8 +207,18 @@
     <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>
@@ -172,11 +280,11 @@ const route = useRoute();
 // tab切换逻辑
 const activeName = ref("first");
 let auxiliaryData = ref([]);
-const getAuxiliaryData = (data)=>{
-  auxiliaryData.value=data
-}
+const getAuxiliaryData = (data) => {
+  auxiliaryData.value = data;
+};
 
-const btnLoading = ref(false)
+const btnLoading = ref(false);
 // 意见表单
 const flowForm = reactive({
   flowKey: "",
@@ -184,7 +292,7 @@ const flowForm = reactive({
   handleUserId: "",
   remark: "",
   data: {},
-  fileList:[],
+  fileList: [],
 });
 
 const uploadData = ref({});
@@ -215,7 +323,6 @@ const handleResult = (res) => {
   }
 };
 
-
 const uploadFile = async (file) => {
   const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
   uploadData.value = res.uploadBody;
@@ -239,9 +346,9 @@ const handleSubmit = async (_type) => {
     const flag = await makeDom.value.handleSubmit();
     if (flag) {
       flowFormDom.value.validate((valid) => {
-        btnLoading.value  = true
+        btnLoading.value = true;
         if (valid) {
-          const data = {...makeDom.value.getFormData()};
+          const data = { ...makeDom.value.getFormData() };
           if (flowForm.flowKey == "subscribe_flow") {
             // data.subscribeDetailList = data.subscribeDetailList.map((x) => ({
             //   bussinessId: x.bussinessId,
@@ -291,16 +398,18 @@ const handleSubmit = async (_type) => {
               data.ehsdJson = JSON.stringify({
                 deliveryTime: data.deliveryTime,
               });
-              data.quotationProductList = data.quotationProductList.map((item) => {
-                let ehsdJson = JSON.stringify({
-                  packMethod: item.packMethod,
-                  tradeMethods: item.tradeMethods,
-                });
-                return {
-                  ...item,
-                  ehsdJson: ehsdJson,
-                };
-              });
+              data.quotationProductList = data.quotationProductList.map(
+                (item) => {
+                  let ehsdJson = JSON.stringify({
+                    packMethod: item.packMethod,
+                    tradeMethods: item.tradeMethods,
+                  });
+                  return {
+                    ...item,
+                    ehsdJson: ehsdJson,
+                  };
+                }
+              );
             }
           } else if (flowForm.flowKey == "contract_flow") {
             if (flowForm.tenantType === "EHSD") {
@@ -329,16 +438,18 @@ const handleSubmit = async (_type) => {
               data.ehsdJson = JSON.stringify({
                 deliveryTime: data.deliveryTime,
               });
-              data.contractProductList = data.contractProductList.map((item) => {
-                let ehsdJson = JSON.stringify({
-                  packMethod: item.packMethod,
-                  tradeMethods: item.tradeMethods,
-                });
-                return {
-                  ...item,
-                  ehsdJson: ehsdJson,
-                };
-              });
+              data.contractProductList = data.contractProductList.map(
+                (item) => {
+                  let ehsdJson = JSON.stringify({
+                    packMethod: item.packMethod,
+                    tradeMethods: item.tradeMethods,
+                  });
+                  return {
+                    ...item,
+                    ehsdJson: ehsdJson,
+                  };
+                }
+              );
             }
           } else if (flowForm.flowKey == "sample_flow") {
             if (data.fileList && data.fileList.length > 0) {
@@ -380,7 +491,7 @@ const handleSubmit = async (_type) => {
           flowForm.fileList = flowForm.fileList.map((item) => {
             return {
               ...item,
-              ...item.raw
+              ...item.raw,
             };
           });
           if (route.query.processType == 10 || route.query.processType == 30) {
@@ -400,11 +511,14 @@ const handleSubmit = async (_type) => {
                 version: route.query.version,
                 flowId: route.query.id,
               })
-              .then((res) => {
-                handleResult(res);
-              },err=>{
-                 btnLoading.value  = false
-              });
+              .then(
+                (res) => {
+                  handleResult(res);
+                },
+                (err) => {
+                  btnLoading.value = false;
+                }
+              );
             return;
           } else {
             proxy
@@ -412,11 +526,14 @@ const handleSubmit = async (_type) => {
                 ...flowForm,
                 data,
               })
-              .then((res) => {
-                handleResult(res);
-              },err=>{
-                 btnLoading.value  = false
-              });
+              .then(
+                (res) => {
+                  handleResult(res);
+                },
+                (err) => {
+                  btnLoading.value = false;
+                }
+              );
           }
         }
       });
@@ -433,8 +550,6 @@ const skipPage = () => {
     router.replace({
       path: "/oa/1/dealWith",
     });
-    
-    
   } else {
     ElMessage({
       message: "操作成功!",
@@ -490,7 +605,7 @@ const skipPage = () => {
       });
     } else if (flowForm.flowKey == "sample_flow") {
       router.replace({
-        path: "/EHSD/saleContract/sampleEHSD",
+        path: "/ehsd/saleContract/sample",
       });
     } else if (flowForm.flowKey == "ehsd_purchase_flow") {
       router.replace({
@@ -517,7 +632,7 @@ let queryData = reactive({
 // 记录
 const recordList = ref([]);
 const fileIds = ref([]);
-const fileObj = ref({}); 
+const fileObj = ref({});
 const approvalRecordData = ref({
   buttonInfoList: [],
 });
@@ -534,11 +649,13 @@ const getRecords = (_id) => {
         fileIds.value = res.recordList.map((item) => {
           return item.flowExampleDetailId;
         });
-        proxy.post('fileInfo/getList',{businessIdList:fileIds.value}).then(res2=>{
-          console.log(res2)
-          fileObj.value = res2
-        })  
-        console.log(fileObj.value)
+        proxy
+          .post("fileInfo/getList", { businessIdList: fileIds.value })
+          .then((res2) => {
+            console.log(res2);
+            fileObj.value = res2;
+          });
+        console.log(fileObj.value);
       });
   } else {
     proxy
@@ -552,10 +669,16 @@ const getRecords = (_id) => {
 };
 onMounted(async () => {
   //processType 10 为修改 20为查看 30回退发起
-  if (route.query.processType == 10 || route.query.processType == 20 || route.query.processType == 30) {
-    await proxy.post("/flowProcess/getStartData", { flowId: route.query.id }).then((res) => {
-      queryData.data = { ...res };
-    });
+  if (
+    route.query.processType == 10 ||
+    route.query.processType == 20 ||
+    route.query.processType == 30
+  ) {
+    await proxy
+      .post("/flowProcess/getStartData", { flowId: route.query.id })
+      .then((res) => {
+        queryData.data = { ...res };
+      });
   } else {
     queryData.data = { ...route.query };
   }
@@ -565,22 +688,19 @@ onMounted(async () => {
 });
 </script>
 <style>
-.el-upload-list{
+.el-upload-list {
   float: left;
-  margin: 0!important;
-  
+  margin: 0 !important;
 }
-.el-upload-list li{
-  width:100px;
+.el-upload-list li {
+  width: 100px;
   margin-left: 10px;
 }
-.el-upload--text{
+.el-upload--text {
   float: left;
 }
-
 </style>
 <style lang="scss" scoped>
-
 .processApproval {
   display: flex;
   justify-content: space-between;
@@ -601,7 +721,7 @@ onMounted(async () => {
       overflow-y: auto;
       background: #fff;
       padding: 20px 20px 0px 20px;
-      .line{
+      .line {
         border-bottom: 1px solid #ddd;
         margin-bottom: 20px;
       }

+ 10 - 12
src/views/purchaseManage/supplier/supplier/index.vue

@@ -189,7 +189,7 @@ const fileList = ref([]);
 const uploadData = ref({});
 let rules = ref({
   name: [{ required: true, message: "请输入供应商名称", trigger: "blur" }],
-  // type: [{ required: true, message: "请选择供应商类型", trigger: "change" }],
+  type: [{ required: true, message: "请选择供应商类型", trigger: "change" }],
   countryId: [{ required: true, message: "请选择国家", trigger: "change" }],
   // provinceId: [{ required: true, message: "请选择省/洲", trigger: "change" }],
   // cityId: [{ required: true, message: "请选择城市", trigger: "change" }],
@@ -213,6 +213,7 @@ const config = computed(() => {
       attrs: {
         label: "供应商类型",
         prop: "type",
+        width: 120,
       },
       render(type) {
         return proxy.dictDataEcho(type, supplierType.value);
@@ -220,12 +221,6 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "供应商编码",
-        prop: "code",
-      },
-    },
-    {
-      attrs: {
         label: "供应商名称",
         prop: "name",
       },
@@ -241,12 +236,14 @@ const config = computed(() => {
       attrs: {
         label: "联系人",
         prop: "contactPerson",
+        width: 120,
       },
     },
     {
       attrs: {
         label: "联系人电话",
         prop: "contactNumber",
+        width: 150,
       },
     },
     {
@@ -258,8 +255,9 @@ const config = computed(() => {
     {
       attrs: {
         label: "操作",
-        width: "200",
-        align: "right",
+        width: "120",
+        align: "center",
+        fixed: "right",
       },
       renderHTML(row) {
         return [
@@ -325,11 +323,11 @@ const byform = ref(null);
 const formConfig = computed(() => {
   return [
     {
-      type: "radio",
+      type: "select",
       prop: "type",
       label: "供应商类型",
       required: true,
-      border: true,
+      filterable: true,
       data: supplierType.value.map((x) => ({
         label: x.dictValue,
         value: x.dictKey,
@@ -437,7 +435,7 @@ const openModal = () => {
   modalType.value = "add";
   fileList.value = [];
   formData.data = {
-    type: "sales",
+    type: "",
     countryId: "44",
   };
   getCityData(formData.data.countryId, "20");

Деякі файли не було показано, через те що забагато файлів було змінено