cz 1 年之前
父节点
当前提交
2062173343
共有 100 个文件被更改,包括 2316 次插入2495 次删除
  1. 6 1
      src/assets/styles/index.scss
  2. 1 1
      src/components/byForm/index.vue
  3. 26 95
      src/components/byTable/index copy.vue
  4. 10 14
      src/components/byTable/index.vue
  5. 3 3
      src/components/contractCom/contractDetails.vue
  6. 3 3
      src/components/contractCom/contractDetailsOne.vue
  7. 1 2
      src/components/contractCom/productContract.vue
  8. 1 2
      src/components/contractCom/selectContract.vue
  9. 1 1
      src/components/contractCom/selectPurchase.vue
  10. 1 2
      src/components/contractCom/selectSample.vue
  11. 1 1
      src/components/detailCom/document/index.vue
  12. 2 2
      src/components/detailCom/exportTracking/index.vue
  13. 1 1
      src/components/detailCom/profitBudgetEHSD/index.vue
  14. 1 1
      src/components/detailCom/profitSettlementEHSD/index.vue
  15. 2 3
      src/components/headerBar/header-bar.vue
  16. 9 6
      src/components/headerBar/header.scss
  17. 37 10
      src/components/process/SF/Contract.vue
  18. 1277 0
      src/components/process/SF/PriceSheet.vue
  19. 6 6
      src/components/process/SendFunds.vue
  20. 4 3
      src/components/process/SendSubscribe.vue
  21. 13 5
      src/components/product/SelectCompanyProduct.vue
  22. 2 2
      src/components/product/SelectCustomerProduct.vue
  23. 13 5
      src/components/product/SelectMaterial.vue
  24. 0 485
      src/components/product/SelectMaterialss.vue
  25. 501 167
      src/components/product/SelectProduct.vue
  26. 11 6
      src/components/product/treeList.vue
  27. 1 1
      src/utils/util.js
  28. 1 1
      src/views/EHSD/addressBook/freightForwarding/index.vue
  29. 1 1
      src/views/EHSD/procurement/InspectionGoodsEHSD/index.vue
  30. 2 2
      src/views/EHSD/procurement/handoverSlipEHSD/index.vue
  31. 2 2
      src/views/EHSD/procurement/handoverSlipSampleEHSD/index.vue
  32. 1 1
      src/views/EHSD/procurement/profitBudgetEHSD/index.vue
  33. 1 1
      src/views/EHSD/procurement/profitSettlementEHSD/index.vue
  34. 1 1
      src/views/EHSD/procurement/purchasedEHSD/index.vue
  35. 35 12
      src/views/EHSD/productLibrary/companyProduct/index.vue
  36. 2 2
      src/views/EHSD/productLibrary/customerProduct/index.vue
  37. 55 56
      src/views/EHSD/saleContract/contractEHSD/index.vue
  38. 2 2
      src/views/EHSD/saleContract/exportTracking/index.vue
  39. 3 6
      src/views/EHSD/saleContract/priceSheetEHSD/index.vue
  40. 1 2
      src/views/EHSD/saleContract/sampleEHSD/index.vue
  41. 1 1201
      src/views/JST/shopManage/index.vue
  42. 1 1
      src/views/connect/E-mail/businessConfig/index.vue
  43. 1 1
      src/views/connect/E-mail/personalConfig/index.vue
  44. 1 1
      src/views/connect/E-mail/signature/index.vue
  45. 3 3
      src/views/customer/file/index.vue
  46. 3 3
      src/views/customer/highseas/index.vue
  47. 3 3
      src/views/customer/privatesea/index.vue
  48. 12 42
      src/views/dataBoard/board/employeeAnalysis/index.vue
  49. 1 1
      src/views/finance/fundManage/account/index.vue
  50. 2 2
      src/views/finance/fundManage/accountPayment/index.vue
  51. 1 1
      src/views/finance/fundManage/accountStatement/index.vue
  52. 1 1
      src/views/finance/fundManage/comeAndGo/index.vue
  53. 1 1
      src/views/finance/fundManage/depExpenses/index.vue
  54. 1 1
      src/views/finance/fundManage/flow/index.vue
  55. 1 1
      src/views/finance/fundManage/funds/index.vue
  56. 1 1
      src/views/finance/fundManage/offsetRecord/index.vue
  57. 26 30
      src/views/finance/fundManage/statistics/index.vue
  58. 1 1
      src/views/iot/base/equipment/index.vue
  59. 1 1
      src/views/iot/base/loT/index.vue
  60. 1 1
      src/views/iot/base/product/index.vue
  61. 1 1
      src/views/iot/base/trade/index.vue
  62. 2 2
      src/views/login.vue
  63. 2 2
      src/views/oa/companyDisk/webDiskData/index.vue
  64. 1 1
      src/views/oa/mailList/interior/index.vue
  65. 1 1
      src/views/oa/mailList/outside/index.vue
  66. 1 1
      src/views/oa/work/task/index.vue
  67. 1 1
      src/views/process/dealWith/backlog.vue
  68. 4 13
      src/views/process/dealWith/index.vue
  69. 1 1
      src/views/process/flowExample/index.vue
  70. 1 1
      src/views/process/porcessDefinition/index.vue
  71. 11 28
      src/views/process/processApproval/index.vue
  72. 2 2
      src/views/process/processConfig/index.vue
  73. 12 4
      src/views/product/material/index.vue
  74. 3 3
      src/views/product/product/index.vue
  75. 3 3
      src/views/product/product/index2.vue
  76. 1 1
      src/views/production/factory/farm/index.vue
  77. 1 1
      src/views/production/factory/line/index.vue
  78. 1 1
      src/views/production/project/bom/index.vue
  79. 2 2
      src/views/production/project/processConfig/index.vue
  80. 1 1
      src/views/production/project/processes/index.vue
  81. 1 1
      src/views/production/project/technology/index.vue
  82. 1 1
      src/views/publicModule/KDconfig/index.vue
  83. 1 1
      src/views/publicModule/codingRule/index.vue
  84. 1 1
      src/views/publicModule/companyConfig/index.vue
  85. 1 1
      src/views/publicModule/contractTemplate/index.vue
  86. 1 1
      src/views/publicModule/documentary/index.vue
  87. 1 1
      src/views/publicModule/salesman/index.vue
  88. 1 1
      src/views/purchaseManage/purchaseManage/alreadyPurchase/index.vue
  89. 1 1
      src/views/purchaseManage/purchaseManage/arrival/index.vue
  90. 1 1
      src/views/purchaseManage/purchaseManage/handoverSlip/index.vue
  91. 1 1
      src/views/purchaseManage/purchaseManage/handoverSlipOne/index.vue
  92. 2 2
      src/views/purchaseManage/purchaseManage/purchase/index.vue
  93. 2 2
      src/views/purchaseManage/purchaseManage/returnGoods/index.vue
  94. 11 10
      src/views/purchaseManage/purchaseManage/subscribe/index.vue
  95. 1 1
      src/views/purchaseManage/purchasePayment/invoice/index.vue
  96. 1 1
      src/views/purchaseManage/purchasePayment/payment/index.vue
  97. 28 32
      src/views/purchaseManage/purchasePayment/paymentBill/index.vue
  98. 1 1
      src/views/purchaseManage/purchasePayment/refund/index.vue
  99. 80 108
      src/views/purchaseManage/supplier/supplier/index.vue
  100. 23 43
      src/views/purchaseManage/supplier/supplyPrice/index.vue

+ 6 - 1
src/assets/styles/index.scss

@@ -210,7 +210,7 @@ aside {
   margin-right: 5px;
   position: absolute;
   left: 0;
-  top: 8px;
+  top: 3px;
 }
 
 .cp {
@@ -230,6 +230,11 @@ aside {
   cursor: pointer;
 }
 
+// 页面外层盒子类
+.pageIndexClass {
+  padding: 10px !important;
+}
+
 
 ::-webkit-scrollbar {
   /* 垂直滚动条宽度 */

+ 1 - 1
src/components/byForm/index.vue

@@ -102,7 +102,7 @@
           </slot>
           <div class="upload" v-else-if="i.type == 'upload'">
             <el-upload :file-list="formData[i.prop]" action="https://winfaster.obs.cn-south-1.myhuaweicloud.com" :data="uploadData"
-                       :list-type="i.listType ? i.listType : 'text'" :accept="i.accept?i.accept :'.gif, .jpeg, .jpg, .png'" :limit="i.limit?i.limit:3"
+                       :list-type="i.listType ? i.listType : 'text'" :accept="i.accept?i.accept :''" :limit="i.limit?i.limit:3"
                        :before-upload="(file)=>handleBeforeUpload(file,i.prop)" :on-success="handleSuccess" :on-preview="onPreviewFile">
 
               <el-icon v-if="i.listType=='picture-card'">

+ 26 - 95
src/components/byTable/index copy.vue

@@ -1,15 +1,8 @@
 <template>
   <div class="header-actions" v-if="getActionList.length != 0">
     <div class="overflow-box">
-      <el-button
-        v-for="(item, index) in getActionList"
-        :key="index"
-        :type="item.type || 'primary'"
-        :plain="item.plain || false"
-        v-bind="getHeaderActions(item)"
-        @click="item.action"
-        :disabled="item.disabled || false"
-      >
+      <el-button v-for="(item, index) in getActionList" :key="index" :type="item.type || 'primary'" :plain="item.plain || false"
+                 v-bind="getHeaderActions(item)" @click="item.action" :disabled="item.disabled || false">
         {{ item.text }}
       </el-button>
     </div>
@@ -21,31 +14,16 @@
     </header>
     <div class="by-search" v-if="!hideSearch">
       <div style="display: flex">
-        <div
-          class="by-dropdown"
-          v-for="(i,index) in selectConfigCopy"
-          :key="i.prop"
-          style="margin-right: 10px"
-        >
+        <div class="by-dropdown" v-for="(i,index) in selectConfigCopy" :key="i.prop" style="margin-right: 10px">
           <div class="by-dropdown-title">
             {{ i.label || i.labelCopy
-            }}<i
-              style="margin-left: 5px"
-              class="iconfont icon-iconm_xialan1"
-            ></i>
+            }}<i style="margin-left: 5px" class="iconfont icon-iconm_xialan1"></i>
           </div>
           <ul class="by-dropdown-lists">
-            <li
-              @click="searchItemSelct('all', i,index)"
-              v-if="i.isShowAll === false ? i.isShowAll : true"
-            >
+            <li @click="searchItemSelct('all', i,index)" v-if="i.isShowAll === false ? i.isShowAll : true">
               全部
             </li>
-            <li
-              v-for="j in i.data"
-              :key="j.value"
-              @click="searchItemSelct(j, i)"
-            >
+            <li v-for="j in i.data" :key="j.value" @click="searchItemSelct(j, i)">
               {{ j.label }}
             </li>
           </ul>
@@ -53,21 +31,9 @@
       </div>
 
       <div style="display: flex">
-        <el-input
-          placeholder="请输入关键字"
-          suffix-icon="search"
-          size="mini"
-          v-model="keywrod"
-          @keyup.enter="searchFn"
-        >
+        <el-input placeholder="请输入关键字" suffix-icon="search" size="mini" v-model="keywrod" @keyup.enter="searchFn">
         </el-input>
-        <el-button
-          type="primary"
-          style="margin-left: 10px"
-          size="default"
-          @click="searchFn"
-          >搜索</el-button
-        >
+        <el-button type="primary" style="margin-left: 10px" size="default" @click="searchFn">搜索</el-button>
 
         <div class="more-icon"><i class="el-icon-wind-power"></i></div>
         <div class="more-icon">
@@ -81,46 +47,22 @@
         <slot />
       </div>
 
-      <el-table
-        ref="hocElTable"
-        v-loading="loading"
-        :data="source"
-        v-if="!hideTable"
-        style="width: 100%"
-        v-bind="$attrs"
-        v-on="tableEvents"
-        row-key="id"
-        :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
-      >
-        <el-table-column
-          v-for="(item, index) in config"
-          :key="index"
-          v-bind="getAttrsValue(item)"
-          :type="item.type || ''"
-          :selectable="
+      <el-table ref="hocElTable" v-loading="loading" :data="source" v-if="!hideTable" style="width: 100%" v-bind="$attrs" v-on="tableEvents"
+                row-key="id" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }">
+        <el-table-column v-for="(item, index) in config" :key="index" v-bind="getAttrsValue(item)" :type="item.type || ''" :selectable="
             (rowData, rowIndex) => isSelectable(rowData, rowIndex, item)
-          "
-        >
+          ">
           <template #default="scope" v-if="!item.type">
-            <slot
-              :name="item.attrs.slot"
-              :item="scope.row"
-              v-if="item.attrs.slot"
-            >
+            <slot :name="item.attrs.slot" :item="scope.row" v-if="item.attrs.slot">
               插槽占位符
             </slot>
             <div v-else-if="isFunction(getValue(scope, item))">
-              <component
-                :is="renderTypeList[getMatchRenderFunction(item)].target"
-                :cell-list="getValue(scope, item)()"
-                :row="scope.row"
-                :parent="getParent"
-                @click="
+              <component :is="renderTypeList[getMatchRenderFunction(item)].target" :cell-list="getValue(scope, item)()" :row="scope.row"
+                         :parent="getParent" @click="
                   ($event) => {
                     handleNativeClick(getAttrsValue(item), $event, item);
                   }
-                "
-              />
+                " />
             </div>
             <div v-else>
               {{ getValue(scope, item) }}
@@ -129,21 +71,10 @@
         </el-table-column>
       </el-table>
 
-      <el-row
-        v-if="!hidePagination"
-        class="table-pagination"
-        justify="end"
-        type="flex"
-      >
-        <el-pagination
-          background
-          layout="total, sizes, prev, pager, next, jumper"
-          :current-page="getPagination.pageNum"
-          :page-size="getPagination.pageSize"
-          :total="getPagination.total"
-          @size-change="handleSizeChange"
-          @current-change="handlePageChange"
-        />
+      <el-row v-if="!hidePagination" class="table-pagination" justify="end" type="flex">
+        <el-pagination background layout="total, sizes, prev, pager, next, jumper" :current-page="getPagination.pageNum"
+                       :page-size="getPagination.pageSize" :total="getPagination.total" @size-change="handleSizeChange"
+                       @current-change="handlePageChange" />
       </el-row>
     </component>
   </div>
@@ -268,7 +199,7 @@ export default defineComponent({
     const keywrod = ref("");
     const selectConfigCopy = computed(() => {
       return props.selectConfig.map((item) => {
-        if(!item.labelCopy) item.labelCopy = {...item}.label;
+        if (!item.labelCopy) item.labelCopy = { ...item }.label;
         return item;
       });
     });
@@ -383,10 +314,10 @@ export default defineComponent({
     };
     //下拉搜索相关
 
-    const searchItemSelct = (item, i,index) => {
+    const searchItemSelct = (item, i, index) => {
       if (item == "all") {
-        console.log(props.selectConfig)
-        i.label = {...props.selectConfig[index]}.labelCopy
+        console.log(props.selectConfig);
+        i.label = { ...props.selectConfig[index] }.labelCopy;
         proxy.$emit(
           "getList",
           Object.assign(props.filterParams, { [i.prop]: "" })
@@ -472,7 +403,7 @@ export default defineComponent({
   ul {
     position: absolute;
     left: 0;
-    
+
     top: 32px;
     padding: 0;
     margin: 0;
@@ -532,7 +463,7 @@ export default defineComponent({
 }
 .table-list-container {
   background: #fff;
-  padding: 13px 20px 20px;
+  padding: 10px 15px 15px;
   .table-pagination {
     padding-top: 20px;
   }

+ 10 - 14
src/components/byTable/index.vue

@@ -64,22 +64,15 @@
           </div>
           <div v-else>
             <div class="by-dropdown-title">
-              {{
-              pagination[i.prop]
-                ? i.data.find((j) => j.value === pagination[i.prop])
-                  ? i.data.find((j) => j.value === pagination[i.prop]).label
-                  : i.label
-                : i.labelCopy
-            }}
-              <!-- {{ i.label || i.labelCopy }} -->
+              {{i.label || i.labelCopy}}
               <i style="margin-left: 5px" class="iconfont icon-iconm_xialan1"></i>
             </div>
             <ul class="by-dropdown-lists">
               <li @click="searchItemSelct('all', i, index)" v-if="i.isShowAll === false ? i.isShowAll : true" style="">
                 {{ $t("common.all") }}
               </li>
-              <li v-for="j in i.data" :key="j.value" @click="searchItemSelct(j, i)" style="">
-                {{ j.label }}
+              <li v-for="j in i.data" :key="j.value || j.dictKey" @click="searchItemSelct(j, i)" style="">
+                {{ j.label || j.dictValue }}
               </li>
             </ul>
           </div>
@@ -423,17 +416,20 @@ export default defineComponent({
 
     const searchItemSelct = (item, i, index) => {
       if (item == "all") {
-        i.label = { ...props.selectConfig[index] }.labelCopy;
+        // i.label = { ...props.selectConfig[index] }.labelCopy;
+        i.label = props.selectConfig[index].labelCopy;
         proxy.$emit(
           "getList",
           Object.assign(props.filterParams, { [i.prop]: "" })
         );
         return;
       }
-      i.label = item.label;
+      i.label = item.label || item.dictValue;
       proxy.$emit(
         "getList",
-        Object.assign(props.filterParams, { [i.prop]: item.value })
+        Object.assign(props.filterParams, {
+          [i.prop]: item.value || item.dictKey,
+        })
       );
     };
 
@@ -742,7 +738,7 @@ export default defineComponent({
 }
 .table-list-container {
   background: #fff;
-  padding: 13px 20px 20px;
+  padding: 15px;
   .table-pagination {
     padding-top: 20px;
   }

+ 3 - 3
src/components/contractCom/contractDetails.vue

@@ -184,7 +184,7 @@ const handleItemClick = (item) => {
       processType: 20,
       random: proxy.random(),
       flowName: "销售合同详情",
-      tenantType: "EHSD",
+
       businessId: currentItem.value.id,
     };
   } else if (activeName.value === "second") {
@@ -210,7 +210,7 @@ const pushProcessApproval = (row) => {
       processType: 20,
       random: proxy.random(),
       flowName: "销售合同详情",
-      tenantType: "EHSD",
+
       businessId: row.id,
     },
   });
@@ -227,7 +227,7 @@ const pushProcessApproval = (row) => {
 //       processType: 20,
 //       random: proxy.random(),
 //       flowName: "销售合同详情",
-//       tenantType: "EHSD",
+//
 //       businessId: row.id,
 //     },
 //   });

+ 3 - 3
src/components/contractCom/contractDetailsOne.vue

@@ -161,7 +161,7 @@ const handleItemClick = (item) => {
       processType: 20,
       random: proxy.random(),
       flowName: "样品单详情",
-      tenantType: "EHSD",
+
       businessId: currentItem.value.id,
     };
     // rowData.value = {
@@ -183,7 +183,7 @@ const pushProcessApproval = (row) => {
       processType: 20,
       random: proxy.random(),
       flowName: "样品单详情",
-      tenantType: "EHSD",
+
       businessId: row.id,
     },
   });
@@ -207,7 +207,7 @@ const openPDF = (row) => {
 //       processType: 20,
 //       random: proxy.random(),
 //       flowName: "样品单详情",
-//       tenantType: "EHSD",
+//
 //       businessId: row.id,
 //     },
 //   });

+ 1 - 2
src/components/contractCom/productContract.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
                highlight-current-row :action-list="[]" @get-list="getList">
@@ -389,7 +389,6 @@ const newContract = () => {
       flowKey: "contract_flow",
       flowName: "销售合同审批流程",
       random: proxy.random(),
-      tenantType: "EHSD",
     },
   });
 };

+ 1 - 2
src/components/contractCom/selectContract.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
                highlight-current-row :action-list="[]" @get-list="getList">
@@ -381,7 +381,6 @@ const newContract = () => {
       flowKey: "contract_flow",
       flowName: "销售合同审批流程",
       random: proxy.random(),
-      tenantType: "EHSD",
     },
   });
 };

+ 1 - 1
src/components/contractCom/selectPurchase.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
              :row-class-name="getRowClass" highlight-current-row @get-list="getList">
       <template #code="{ item }">

+ 1 - 2
src/components/contractCom/selectSample.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
              highlight-current-row :action-list="[]" @get-list="getList">
       <template #code="{ item }">
@@ -413,7 +413,6 @@ const newSample = () => {
       flowKey: "sample_flow",
       flowName: "样品单审批流程",
       random: proxy.random(),
-      tenantType: "EHSD",
     },
   });
 };

+ 1 - 1
src/components/detailCom/document/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
                :action-list="[]" @get-list="getList" :hidePagination="true" :hideSearch="true">

+ 2 - 2
src/components/detailCom/exportTracking/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row :action-list="[]"
              :hidePagination="true" :hideSearch="true" @get-list="getList">
       <template #code="{ item }">
@@ -356,7 +356,7 @@ const props = defineProps({
 const userInfo = useUserStore();
 // const tableHeight = ref(0);
 // const getTableHeight = () => {
-//   tableHeight.value = window.innerHeight - 270;
+//   tableHeight.value = window.innerHeight - 245;
 // };
 // getTableHeight();
 window.addEventListener("resize", () => {

+ 1 - 1
src/components/detailCom/profitBudgetEHSD/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <byTable :hideTable="true" :hidePagination="true" :source="sourceList.data" :pagination="sourceList.pagination" :config="config"
              :loading="loading" highlight-current-row :action-list="[]" :hideSearch="true" @get-list="getList">
     </byTable>

+ 1 - 1
src/components/detailCom/profitSettlementEHSD/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <byTable :hideTable="true" :hidePagination="true" :source="sourceList.data" :pagination="sourceList.pagination" :config="config"
              :loading="loading" :hideSearch="true" highlight-current-row @get-list="getList">
     </byTable>

+ 2 - 3
src/components/headerBar/header-bar.vue

@@ -64,11 +64,11 @@
                       </li>
                       <div v-for="(j, index) in i.children" :key="index">
                         <li v-if="i.isNone" class="menu-ul" style="cursor: auto"></li>
-                        <li class="menu-ul" @click="commonsBannerToRouter(j)">
+                        <li class="menu-ul">
                           <i style="cursor: pointer;position:relative;top:0px" @click.stop="editMenu(j)">
                             <svg-icon :icon-class="isHaveCollect(j) ? 'shoucang1' :'shoucang'" />
                           </i>
-                          <span style="margin-left:6px;cursor: pointer">{{ j.menuName }}</span>
+                          <span style="margin-left:6px;cursor: pointer" @click="commonsBannerToRouter(j)">{{ j.menuName }}</span>
                         </li>
                       </div>
                     </ul>
@@ -504,7 +504,6 @@ function logout() {
 
 //使用id计算拼接url
 const commonsBannerToRouter = (i) => {
-  console.log(i, "ss");
   sidebarRoutersCopy.value.map((item) => {
     if (item.children) {
       item.children.map((j) => {

+ 9 - 6
src/components/headerBar/header.scss

@@ -9,7 +9,7 @@
 }
 
 .header-bar {
-	background: #1C3144;
+	background: #1b374c;
 	position: fixed;
 	top: 0;
 	left: 0;
@@ -57,7 +57,7 @@
 						height: 50px;
 						line-height: 50px;
 						padding: 0 50px;
-						font-size: 16px;
+						font-size: 15px;
 						cursor: pointer;
 					}
 
@@ -89,6 +89,7 @@
 				height: 500px;
 				overflow-y: auto;
 				padding: 0 20px;
+				background: #f1f1f1;
 
 				&::-webkit-scrollbar {
 					width: 2px !important;
@@ -101,6 +102,7 @@
 					// color: #333333;
 					// font-size: 15px;
 					// font-weight: bold;
+					// background: #fff;
 				}
 
 				.collect {
@@ -111,7 +113,7 @@
 						justify-content: space-between;
 						align-items: center;
 						padding: 2px 5px;
-						border: 1px solid #eee;
+						// border: 1px solid #eee;
 					}
 				}
 			}
@@ -139,6 +141,7 @@
 			height: 500px;
 			// overflow-y: auto;
 			overflow: auto;
+			box-shadow: 2px 0px 0px #eee;
 
 			&::-webkit-scrollbar {
 				width: 2px !important;
@@ -254,11 +257,11 @@
 
 			.menu-title {
 				font-weight: 600;
-				color: #0084ff;
+				color: #1b374c;
 				height: 40px;
 				line-height: 40px;
-				border-bottom: 1px solid #ddd;
-				font-size: 16px;
+				border-bottom: 1px solid #efebeb;
+				font-size: 15px;
 				width: 140px;
 				margin: 0 5vw 0 0;
 

+ 37 - 10
src/components/process/SF/Contract.vue

@@ -136,12 +136,12 @@
                 <div v-else></div>
               </template>
             </el-table-column>
-            <el-table-column prop="productName" label="商品名称" min-width="130" />
+            <el-table-column prop="productCnName" label="商品名称" min-width="130" />
             <el-table-column prop="productCode" label="商品编码" width="130" />
             <el-table-column label="尺寸 cm*cm*cm" width="180">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  {{row['length']}}*{{row.width}}*{{row.height}}
+                  {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
                 </div>
               </template>
             </el-table-column>
@@ -158,9 +158,10 @@
                 </div>
               </template>
             </el-table-column>
-            <el-table-column label="生产源文件" width="100">
+            <el-table-column label="生产源文件" width="140">
               <template #default="{ row, $index }">
-                <span class="el-click">点击上传</span>
+                <!-- <span class="el-click" v-if="!row.prodFilePath" @click="handleClickUpload('prodFilePath',false)">点击</span> -->
+                <span class="el-click" v-if="row.prodFilePath" @click="handleClickUpload('prodFilePath',false,$index)">点击上传 (查看)</span>
               </template>
             </el-table-column>
             <el-table-column label="数量" width="150">
@@ -232,8 +233,9 @@
               </template>
             </el-table-column>
             <el-table-column prop="amount" label="小计" width="120" />
-            <el-table-column label="操作" width="60" align="center" fixed="right" v-if="!judgeStatus()">
+            <el-table-column label="操作" width="120" align="center" fixed="right" v-if="!judgeStatus()">
               <template #default="{ $index }">
+                <el-button type="primary" link @click="handleClickUpload('prodFilePath',true,$index)">重置</el-button>
                 <el-button type="primary" link @click="handleRemove($index)">删除</el-button>
               </template>
             </el-table-column>
@@ -287,7 +289,8 @@
     </byForm>
 
     <el-dialog v-if="openProductCompany" v-model="openProductCompany" title="公司产品库" width="90%" append-to-body>
-      <SelectCompanyProduct @selectProduct="selectProduct" :alreadySelectData="formData.data.contractProductList"></SelectCompanyProduct>
+      <!-- <SelectCompanyProduct @selectProduct="selectProduct" :alreadySelectData="formData.data.contractProductList"></SelectCompanyProduct> -->
+      <SelectProduct @selectProduct="selectProduct"></SelectProduct>
     </el-dialog>
 
     <!-- <el-dialog v-if="copyContract" v-model="copyContract" :title="copyType === 1 ? '合同选择' : '样品单选择'" width="90%" append-to-body>
@@ -300,6 +303,8 @@
 <script setup>
 import byForm from "@/components/byForm/index";
 import SelectCompanyProduct from "@/components/product/SelectCompanyProduct.vue";
+import SelectProduct from "@/components/product/SelectProduct.vue";
+
 // import SelectCustomerProduct from "@/components/product/SelectCustomerProduct.vue";
 import selectCity from "@/components/selectCity/index.vue";
 import { useRoute } from "vue-router";
@@ -816,11 +821,12 @@ const selectProduct = (goods) => {
     formData.data.contractProductList.push({
       fileUrl: fileUrl,
       productId: goods.id,
-      productName: goods.nameEnglish,
+      productCnName: goods.name,
       productCode: goods.customCode,
-      length: goods["length"],
-      width: goods.width,
-      height: goods.height,
+      productLength: goods["length"],
+      productWidth: goods.width,
+      productHeight: goods.height,
+      prodFilePath: goods.prodFilePath,
       quantity: null,
       price: null,
       amount: "",
@@ -1066,6 +1072,27 @@ const changeShroffAccount = (val) => {
   }
 };
 
+const handleClickUpload = async (att, flag, index) => {
+  let res = null;
+  let path = "";
+  if (flag) {
+    proxy.msgTip("请稍后", 2);
+    res = await proxy.post("/fileService/createTempFolder");
+    if (res && res.path) {
+      formData.data.contractProductList[index][att] = res.path;
+      path = res.path;
+    }
+  } else {
+    path = formData.data.contractProductList[index][att];
+  }
+  let a = document.createElement("a");
+  a.href = "printer://" + "ftp://192.168.1.13/" + path + "/";
+  a.style.display = "none";
+  document.body.appendChild(a);
+  a.click();
+  document.body.removeChild(a);
+};
+
 const getAllData = (businessId) => {
   proxy.post("/contract/detail", { id: businessId }).then((res) => {
     res.countryId = res.buyCountryId;

+ 1277 - 0
src/components/process/SF/PriceSheet.vue

@@ -0,0 +1,1277 @@
+<template>
+  <div style="width: 100%; padding: 0px 15px">
+    <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="formDom">
+      <template #btn>
+        <div>
+          <el-button type="primary" v-if="
+              [30].includes(route.query.processType) || !route.query.processType
+            " @click="clickCopy(1)">复制合同</el-button>
+        </div>
+      </template>
+      <template #seller>
+        <div style="width: 100%">
+          <el-form-item prop="sellCorporationId" label="卖方信息" class="wid100">
+            <el-select v-model="formData.data.sellCorporationId" placeholder="请选择卖方公司" style="width: 100%" @change="sellCorporationIdChange"
+                       filterable>
+              <el-option v-for="item in corporationList" :key="item.value" :label="item.label" :value="item.value" />
+            </el-select>
+          </el-form-item>
+          <el-form-item label="地址" class="wid100">
+            <el-row style="width:100%">
+              <el-col :span="8">
+                <el-form-item label="" prop="sellCountryName" label-width="0px" class="margin-b-0 wid100">
+                  <el-input v-model="formData.data.sellCountryName" placeholder="请输入国家" />
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="" prop="sellProvinceName" label-width="0px" class="margin-b-0 wid100">
+                  <el-input v-model="formData.data.sellProvinceName" placeholder="请输入省/州" />
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="" prop="sellCityName" label-width="0px" class="margin-b-0 wid100">
+                  <el-input v-model="formData.data.sellCityName" placeholder="请输入城市" />
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form-item>
+
+          <el-form-item label="详细地址" prop="sellAddress" class="wid100">
+            <el-input v-model="formData.data.sellAddress" type="textarea">
+            </el-input>
+          </el-form-item>
+
+          <el-form-item label="联系人" class="wid100">
+            <el-row style="width:100%">
+              <el-col :span="8">
+                <el-form-item label="" prop="sellContactName" label-width="0px" class="margin-b-0 wid100">
+                  <el-input v-model="formData.data.sellContactName" placeholder="请输入联系人" />
+                </el-form-item>
+              </el-col>
+              <el-col :span="16">
+                <el-form-item label="" prop="sellContactNumber" label-width="0px" class="margin-b-0 wid100">
+                  <el-input v-model="formData.data.sellContactNumber" placeholder="请输入联系人电话" />
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form-item>
+        </div>
+      </template>
+      <template #buyer>
+        <div style="width: 100%">
+          <el-form-item label="买方信息" prop="buyCorporationId" class="wid100">
+            <el-select v-model="formData.data.buyCorporationId" filterable remote reserve-keyword placeholder="请输入关键字" remote-show-suffix
+                       :remote-method="remoteMethod" :loading="loadingSearch" @input="remoteMethod" style="width: 100%" @change="changeCustomer" v-if="
+                  [30].includes(route.query.processType) ||
+                  !route.query.processType
+                ">
+              <el-option v-for="item in customerList" :key="item.value" :label="item.label" :value="item.value" />
+            </el-select>
+            <el-select v-model="formData.data.buyCorporationName" disabled v-else style="width: 100%">
+            </el-select>
+          </el-form-item>
+          <el-form-item label="地址" class="wid100" required>
+            <el-row style="width: 100%">
+              <el-col :span="6">
+                <el-form-item label="" prop="countryId" class="margin-b-0">
+                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => getCityData(val, '20', true)">
+                    <el-option v-for="item in countryData" :label="item.name" :value="item.id">
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label="" prop="provinceName" class="margin-b-0">
+                  <selectCity placeholder="省/洲" @change="(val) => getCityData(val, '30', true)" addressId="provinceId" addressName="provinceName"
+                              v-model="formData.data" :data="provinceData">
+                  </selectCity>
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label="" prop="cityName" class="margin-b-0">
+                  <selectCity placeholder="城市" addressId="cityId" addressName="cityName" v-model="formData.data" :data="cityData">
+                  </selectCity>
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label="" prop="buyPostalCode" class="margin-b-0">
+                  <el-input v-model="formData.data.buyPostalCode" placeholder="请输入邮编" />
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form-item>
+
+          <el-form-item label="详细地址" prop="buyAddress" class="wid100">
+            <el-input v-model="formData.data.buyAddress" type="textarea">
+            </el-input>
+          </el-form-item>
+          <el-form-item label="联系人" class="wid100" required>
+            <el-row style="width: 100%">
+              <el-col :span="8">
+                <el-form-item label="" prop="buyContactName" label-width="0px" class="margin-b-0 wid100">
+                  <el-autocomplete v-model="formData.data.buyContactName" :fetch-suggestions="querySearchPerson" style="width:100%" 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" label-width="0px" class="margin-b-0 wid100">
+                  <el-input v-model="formData.data.buyContactNumber" placeholder="请输入联系人电话" />
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form-item>
+        </div>
+      </template>
+
+      <template #commodity>
+        <div style="width: 100%">
+          <el-button type="primary" @click="openProductCompany = true" plain style="margin-bottom: 16px" v-if="!judgeStatus()">标准产品库</el-button>
+          <el-table :data="formData.data.quotationProductList" style="width: 100%; ">
+            <el-table-column label="商品图片" width="80">
+              <template #default="{ row }">
+                <div v-if="row.fileUrl">
+                  <img :src="row.fileUrl" class="pic" @click="onPicture(row.fileUrl)" />
+                </div>
+                <div v-else></div>
+              </template>
+            </el-table-column>
+            <el-table-column prop="productCnName" label="商品名称" min-width="130" />
+            <el-table-column prop="productCode" label="商品编码" width="130" />
+            <el-table-column label="尺寸 cm*cm*cm" width="180">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="设计图稿" width="80">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-upload action="https://winfaster.obs.cn-south-1.myhuaweicloud.com" accept=".gif, .jpeg, .jpg, .png" :show-file-list="false"
+                             :data="uploadData" :before-upload="(file)=>handleBeforeUpload(file,$index)" :on-success="()=>handleSuccess($index)">
+                    <img v-if="row.imageUrl" :src="row.imageUrl" class="pic" />
+                    <el-icon v-else class="avatar-uploader-icon">
+                      <Plus />
+                    </el-icon>
+                  </el-upload>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="生产源文件" width="140">
+              <template #default="{ row, $index }">
+                <!-- <span class="el-click" v-if="!row.prodFilePath" @click="handleClickUpload('prodFilePath',false)">点击</span> -->
+                <span class="el-click" v-if="row.prodFilePath" @click="handleClickUpload('prodFilePath',false,$index)">点击上传 (查看)</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="数量" width="150">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item :prop="'quotationProductList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true"
+                                class="margin-b-0 wid100">
+                    <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="0"
+                                     :controls="false" :min="0" @change="calculationAmount('quantity')" />
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="单价" width="150">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item :prop="'quotationProductList.' + $index + '.price'" :rules="rules.price" :inline-message="true"
+                                class="margin-b-0 wid100">
+                    <div style="display:flex;">
+                      <el-input-number onmousewheel="return false;" v-model="row.price" placeholder="请输入" style="width: 100%" :precision="2"
+                                       :controls="false" :min="0" @change="calculationAmount()" />
+                      <!-- <el-popover placement="top-start" :width="400" trigger="hover" @show="showEcharts(row,$index)">
+                        <template #default>
+                          <div>
+                            <div>
+                              <img src="@/assets/images/money1.png" alt="" class="img" /> <span
+                                    style="font-size:14px;font-weight:700;color:#000">销售指导价:</span>
+                              <div style="padding:5px 0px 0px 20px">
+                                {{row.currency}} {{moneyFormat(row.salePrice,2)}}
+                              </div>
+                            </div>
+                            <div style="margin-top:15px">
+                              <img src="@/assets/images/money2.png" alt="" class="img" /> <span
+                                    style="font-size:14px;font-weight:700;color:#000">客户近期购买价格:</span>
+                              <div style="padding:5px 0px 0px 20px">
+                                <div v-for="item in row.customerContractProductList">
+                                  <span>{{item.createTime.slice(0,10)}} </span>
+                                  <span style="margin-left:40px">{{item.code}} </span>
+                                  <span style="margin-left:40px"> {{item.currency}} {{moneyFormat(item.price,2)}} </span>
+                                </div>
+                              </div>
+                            </div>
+                            <div style="margin-top:15px">
+                              <img src="@/assets/images/money3.png" alt="" class="img" /> <span
+                                    style="font-size:14px;font-weight:700;color:#000">产品近期销售价格:</span>
+                              <div style="padding:5px 0px 0px 20px">
+                                <div v-for="item in row.quotationProductList">
+                                  <span>{{item.createTime.slice(0,10)}} </span>
+                                  <span style="margin-left:40px">{{item.code}} </span>
+                                  <span style="margin-left:40px">{{item.currency}} {{moneyFormat(item.price,2)}} </span>
+                                </div>
+                              </div>
+                            </div>
+                            <div :ref="row.productId+$index" style="height:180px">
+                            </div>
+                          </div>
+                        </template>
+                        <template #reference>
+                          <div style="margin-left:10px;cursor:pointer;position:relative;top:4px">
+                            <el-icon :size="20" color="#85c1a6">
+                              <WarningFilled />
+                            </el-icon>
+                          </div>
+                        </template>
+                      </el-popover> -->
+                    </div>
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column prop="amount" label="小计" width="120" />
+            <el-table-column label="操作" width="120" align="center" fixed="right" v-if="!judgeStatus()">
+              <template #default="{ $index }">
+                <el-button type="primary" link @click="handleClickUpload('prodFilePath',true,$index)">重置</el-button>
+                <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()" plain style="margin-bottom: 16px" v-if="!judgeStatus()">添加行</el-button>
+          <el-table :data="formData.data.quotationPayList" style="width: 100%;">
+            <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"
+                                class="margin-b-0 wid100">
+                    <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="备注">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item :prop="'quotationPayList.' + $index + '.remark'" class="margin-b-0 wid100">
+                    <el-input v-model="row.remark" placeholder="请输入备注" />
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column :label="'金额'" width="130">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item :prop="'quotationPayList.' + $index + '.amount'" :rules="rules.amount" :inline-message="true"
+                                class="margin-b-0 wid100">
+                    <el-input-number onmousewheel="return false;" 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="操作" width="60" align="center" fixed="right" v-if="!judgeStatus()">
+              <template #default="{ $index }">
+                <el-button type="primary" link @click="handleDelete($index)">删除</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </template>
+    </byForm>
+
+    <el-dialog v-if="openProductCompany" v-model="openProductCompany" title="公司产品库" width="90%" append-to-body>
+      <!-- <SelectCompanyProduct @selectProduct="selectProduct" :alreadySelectData="formData.data.quotationProductList"></SelectCompanyProduct> -->
+      <SelectProduct @selectProduct="selectProduct"></SelectProduct>
+    </el-dialog>
+
+    <!-- <el-dialog v-if="copyContract" v-model="copyContract" :title="copyType === 1 ? '合同选择' : '样品单选择'" width="90%" append-to-body>
+      <SelectContract @select="selectContract" v-if="copyType === 1"></SelectContract>
+      <SelectSample @select="selectContract" v-if="copyType === 2"></SelectSample>
+    </el-dialog> -->
+  </div>
+</template>
+
+<script setup>
+import byForm from "@/components/byForm/index";
+import SelectCompanyProduct from "@/components/product/SelectCompanyProduct.vue";
+import SelectProduct from "@/components/product/SelectProduct.vue";
+
+// import SelectCustomerProduct from "@/components/product/SelectCustomerProduct.vue";
+import selectCity from "@/components/selectCity/index.vue";
+import { useRoute } from "vue-router";
+import SelectContract from "@/components/contractCom/selectContract.vue";
+import SelectSample from "@/components/contractCom/selectSample.vue";
+// import * as echarts from "echarts";
+// import $bus from "@/bus/index.js";
+const route = useRoute();
+const { proxy } = getCurrentInstance();
+// 接收父组件的传值
+const props = defineProps({
+  queryData: Object,
+});
+const currencyData = computed(
+  () => proxy.useUserStore().allDict["account_currency"]
+);
+const fundsPaymentMethod = computed(
+  () => proxy.useUserStore().allDict["funds_payment_method"]
+);
+const shippingMethod = computed(
+  () => proxy.useUserStore().allDict["shipping_method"]
+);
+const accountList = ref([]);
+const customerList = ref([]);
+const corporationList = ref([]);
+const customerUserList = ref([]);
+const countryData = ref([]);
+const provinceData = ref([]);
+const cityData = ref([]);
+const openProductCompany = ref(false);
+const copyType = ref(1);
+const copyContract = ref(false);
+const formData = reactive({
+  data: {
+    contractType: "2",
+    rate: 1,
+    quotationProductList: [],
+  },
+});
+const uploadData = ref({});
+const formDom = ref(null);
+const judgeStatus = () => {
+  if (route.query.processType == 20 || route.query.processType == 10) {
+    return true;
+  }
+  if (props.queryData.recordList && props.queryData.recordList.length > 0) {
+    let data = props.queryData.recordList.filter(
+      (item) => item.status === 2 && item.nodeType !== 1
+    );
+    if (data && data.length > 0) {
+      return true;
+    }
+  }
+  return false;
+};
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  disabled: false,
+});
+const formConfig = computed(() => {
+  return [
+    // {
+    //   type: "slot",
+    //   slotName: "btn",
+    //   label: "",
+    //   itemWidth: 50,
+    // },
+    {
+      type: "title",
+      title: "合同类型",
+    },
+    {
+      type: "select",
+      prop: "contractType",
+      label: "合同类型",
+      data: [
+        {
+          dictKey: "2",
+          dictValue: "内销",
+        },
+        {
+          dictKey: "1",
+          dictValue: "外销",
+        },
+      ],
+      fn: (val) => {
+        if (val == "2") {
+          formData.data.currency = currencyData.value[0].dictKey;
+          formData.data.rate = 1;
+        }
+        if (formData.data.sellCorporationId) {
+          sellCorporationIdChange(formData.data.sellCorporationId);
+        }
+        if (formData.data.shroffAccountId) {
+          changeShroffAccount(formData.data.shroffAccountId);
+        }
+      },
+    },
+    {
+      type: "title",
+      title: "贸易信息",
+      haveLine: true,
+    },
+    {
+      type: "slot",
+      slotName: "seller",
+      label: "",
+      itemWidth: 50,
+    },
+    {
+      type: "slot",
+      slotName: "buyer",
+      label: "",
+      itemWidth: 50,
+    },
+    {
+      type: "title",
+      title: "付款信息",
+      haveLine: true,
+    },
+    {
+      type: "select",
+      prop: "currency",
+      label: "币种",
+      data: currencyData.value,
+      itemWidth: 25,
+      disabled: formData.data.contractType == "2",
+    },
+    {
+      type: "number",
+      prop: "rate",
+      label: "汇率",
+      precision: 2,
+      min: 0,
+      controls: false,
+      itemWidth: 25,
+      disabled: formData.data.contractType == "2",
+    },
+    {
+      type: "select",
+      prop: "paymentMethod",
+      label: "付款方式",
+      data: fundsPaymentMethod.value,
+      itemWidth: 25,
+    },
+    {
+      type: "number",
+      prop: "advanceRatio",
+      label: "预付款比列(%)",
+      precision: 2,
+      min: 0,
+      controls: false,
+      itemWidth: 25,
+    },
+    {
+      type: "input",
+      prop: "remark",
+      label: "付款条件",
+      itemType: "textarea",
+      itemWidth: 50,
+    },
+    {
+      type: "select",
+      prop: "shroffAccountId",
+      label: "收款账号",
+      data: accountList.value,
+      itemWidth: 100,
+      fn: (val) => {
+        changeShroffAccount(val);
+      },
+    },
+    {
+      type: "input",
+      prop: "beneficiaryName",
+      label: " ",
+      placeholder: "请输入Beneficiary Name",
+      itemWidth: 50,
+      isShow: formData.data.contractType == "1",
+    },
+    {
+      type: "input",
+      prop: "beneficiaryAccountNumber",
+      label: " ",
+      placeholder: "请输入Beneficiary Account Number",
+      itemWidth: 50,
+      isShow: formData.data.contractType == "1",
+    },
+    {
+      type: "input",
+      prop: "beneficiaryBank",
+      label: " ",
+      placeholder: "请输入Beneficiary Bank",
+      itemWidth: 50,
+      isShow: formData.data.contractType == "1",
+    },
+    {
+      type: "input",
+      prop: "swiftCode",
+      label: " ",
+      placeholder: "请输入Swift Code",
+      itemWidth: 50,
+      isShow: formData.data.contractType == "1",
+    },
+    {
+      type: "input",
+      prop: "beneficiaryBankAddress",
+      label: " ",
+      placeholder: "请输入Beneficiary Bank Address",
+      itemWidth: 50,
+      isShow: formData.data.contractType == "1",
+    },
+    {
+      type: "input",
+      prop: "beneficiaryAddress",
+      label: " ",
+      placeholder: "请输入Beneficiary Address",
+      itemWidth: 50,
+      isShow: formData.data.contractType == "1",
+    },
+    {
+      type: "input",
+      prop: "accountName",
+      label: "户名",
+      placeholder: "请输入户名",
+      itemWidth: 50,
+      isShow: formData.data.contractType == "2",
+    },
+    {
+      type: "input",
+      prop: "openingBank",
+      label: "开户行",
+      placeholder: "请输入开户行",
+      itemWidth: 50,
+      isShow: formData.data.contractType == "2",
+    },
+    {
+      type: "input",
+      prop: "accountOpening",
+      label: "账号",
+      placeholder: "请输入账号",
+      itemWidth: 50,
+      isShow: formData.data.contractType == "2",
+    },
+    // {
+    //   type: "slot",
+    //   slotName: "payment",
+    //   label: "",
+    // },
+    {
+      type: "title",
+      title: "交付信息",
+      haveLine: true,
+    },
+    {
+      type: "date",
+      prop: "deliveryTime",
+      label: "交货期限",
+      itemWidth: 50,
+    },
+    {
+      type: "select",
+      prop: "transportMethod",
+      label: "运输方式",
+      data: shippingMethod.value,
+      itemWidth: 50,
+    },
+    {
+      type: "input",
+      prop: "transportRemark",
+      label: "运输说明",
+      itemWidth: 50,
+    },
+    // {
+    //   type: "slot",
+    //   slotName: "delivery",
+    //   label: "",
+    // },
+    {
+      type: "title",
+      title: "商品信息",
+      haveLine: true,
+    },
+    {
+      type: "slot",
+      slotName: "commodity",
+      label: "",
+    },
+    {
+      type: "title",
+      title: "其他收费项目",
+      haveLine: true,
+    },
+    {
+      type: "slot",
+      slotName: "otherCharge",
+      label: "",
+    },
+    {
+      type: "title",
+      title: "合同总金额",
+      haveLine: true,
+    },
+    {
+      type: "input",
+      prop: "amount",
+      label: "合同总金额",
+      itemWidth: 25,
+      disabled: true,
+    },
+  ];
+});
+const rules = ref({
+  contractType: [
+    { required: true, message: "请选择合同类型", trigger: "change" },
+  ],
+  sellCorporationId: [
+    { required: true, message: "请选择卖方公司", trigger: "change" },
+  ],
+  buyCorporationId: [
+    { required: true, message: "请选择买方公司", trigger: "change" },
+  ],
+  countryId: [{ required: true, message: "请选择国家", trigger: "change" }],
+  sellAddress: [{ required: true, message: "请输入详细地址", trigger: "blur" }],
+  buyAddress: [{ required: true, message: "请输入详细地址", trigger: "blur" }],
+  buyContactName: [
+    { required: true, message: "请输入联系人", trigger: ["change", "blur"] },
+  ],
+  buyContactNumber: [
+    { required: true, message: "请输入联系电话", trigger: "blur" },
+  ],
+  quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
+  price: [{ required: true, message: "请输入单价", trigger: "blur" }],
+  payName: [
+    { required: true, message: "请输入收费项目", trigger: ["change", "blur"] },
+  ],
+  currency: [{ required: true, message: "请选择币种", trigger: "change" }],
+  paymentMethod: [
+    { required: true, message: "请选择付款方式", trigger: "change" },
+  ],
+  advanceRatio: [
+    { required: true, message: "请输入预付比例", trigger: "blur" },
+  ],
+  transportMethod: [
+    { required: true, message: "请选择运输方式", trigger: "change" },
+  ],
+  remark: [{ required: true, message: "请输入付款条件", trigger: "blur" }],
+  rate: [{ required: true, message: "请输入汇率", trigger: "blur" }],
+  shroffAccountId: [
+    { required: true, message: "请选择收款账号", trigger: "change" },
+  ],
+});
+const getDict = () => {
+  proxy
+    .post("/customer/selPage", {
+      pageNum: 1,
+      pageSize: 50,
+    })
+    .then((res) => {
+      customerList.value = res.rows.map((x) => ({
+        ...x,
+        label: x.name,
+        value: x.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("/accountManagement/page", { pageNum: 1, pageSize: 999 })
+    .then((res) => {
+      accountList.value = res.rows.map((item) => {
+        return {
+          ...item,
+          label: item.alias,
+          value: item.id,
+        };
+      });
+    });
+};
+const getCityData = (id, type, isChange) => {
+  proxy.post("/customizeArea/list", { parentId: id }).then((res) => {
+    if (type === "20") {
+      provinceData.value = res;
+      if (isChange) {
+        formData.data.provinceId = "";
+        formData.data.provinceName = "";
+        formData.data.cityId = "";
+        formData.data.cityName = "";
+      }
+    } else if (type === "30") {
+      cityData.value = res;
+      if (isChange) {
+        formData.data.cityId = "";
+        formData.data.cityName = "";
+      }
+    } else {
+      countryData.value = res;
+    }
+  });
+};
+getDict();
+getCityData("0");
+
+const sellCorporationIdChange = (val) => {
+  if (val) {
+    proxy.post("/corporation/detail", { id: val }).then((res) => {
+      if (formData.data.contractType == "2") {
+        formData.data.sellCountryName = res.countryName;
+        formData.data.sellProvinceName = res.provinceName;
+        formData.data.sellCityName = res.cityName;
+        formData.data.sellAddress = res.address;
+      } else {
+        formData.data.sellCountryName = res.countryEnStr;
+        formData.data.sellProvinceName = res.provinceEnStr;
+        formData.data.sellCityName = res.cityEnStr;
+        formData.data.sellAddress = res.addressEn;
+      }
+    });
+  }
+};
+
+const changeCustomer = (val) => {
+  formData.data.quotationProductList = [];
+  if (val) {
+    proxy.post("/customer/detail", { id: val }).then(
+      (res) => {
+        formData.data.buyCorporationName = res.name;
+        if (res.customerUserList && res.customerUserList.length > 0) {
+          formData.data.buyContactName = res.customerUserList[0].name;
+          if (res.customerUserList[0].contactJson) {
+            let contactJson = JSON.parse(res.customerUserList[0].contactJson);
+            if (contactJson && contactJson.length > 0) {
+              formData.data.buyContactNumber = contactJson[0].contactNo;
+            }
+          }
+          customerUserList.value = res.customerUserList.map((item) => {
+            return {
+              ...item,
+              value: item.name,
+            };
+          });
+        }
+        // 回填客户的账户信息
+        // formData.data.beneficiaryName = res.beneficiaryName;
+        // formData.data.beneficiaryBank = res.beneficiaryBank;
+        // formData.data.beneficiaryBankAddress = res.beneficiaryBankAddress;
+        // formData.data.beneficiaryAccountNumber = res.beneficiaryAccountNumber;
+        // formData.data.swiftCode = res.swiftCode;
+        // formData.data.beneficiaryAddress = res.beneficiaryAddress;
+
+        formData.data.countryId = res.countryId;
+        formData.data.provinceId = res.provinceId;
+        formData.data.cityId = res.cityId;
+        formData.data.buyPostalCode = res.zipCode;
+        formData.data.buyAddress = res.address;
+        getCityData(formData.data.countryId, "20");
+        if (formData.data.provinceId) {
+          getCityData(formData.data.provinceId, "30");
+        }
+      },
+      (err) => {
+        formData.data.countryId = "";
+        formData.data.provinceId = "";
+        formData.data.cityId = "";
+        formData.data.buyPostalCode = "";
+        formData.data.buyAddress = "";
+      }
+    );
+  } else {
+    formData.data.countryId = "";
+    formData.data.provinceId = "";
+    formData.data.cityId = "";
+    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) => {
+  if (item.contactJson) {
+    let data = JSON.parse(item.contactJson);
+    formData.data.buyContactNumber = data[0].contactNo;
+  }
+};
+
+const selectProduct = (goods) => {
+  if (goods && goods.id) {
+    let fileUrl = "";
+    if (goods.fileList && goods.fileList.length > 0) {
+      fileUrl = goods.fileList[0].fileUrl;
+    }
+    formData.data.quotationProductList.push({
+      fileUrl: fileUrl,
+      productId: goods.id,
+      productCnName: goods.name,
+      productCode: goods.customCode,
+      productLength: goods["length"],
+      productWidth: goods.width,
+      productHeight: goods.height,
+      prodFilePath: goods.prodFilePath,
+      quantity: null,
+      price: null,
+      amount: "",
+      fileList: [],
+    });
+    proxy.msgTip("添加成功", 1);
+  } else {
+    return proxy.msgTip("选择错误", 2);
+  }
+};
+
+const changeProductPrice = () => {
+  let productIds = formData.data.quotationProductList.map((x) => x.productId);
+  if (productIds && productIds.length > 0) {
+    proxy
+      .post("/contract/getProductPriceInfo", {
+        productIds: productIds,
+        customerId: formData.data.buyCorporationId
+          ? formData.data.buyCorporationId
+          : "",
+      })
+      .then((res) => {
+        for (let i = 0; i < formData.data.quotationProductList.length; i++) {
+          const iele = formData.data.quotationProductList[i];
+          for (const key in res) {
+            if (key == iele.productId) {
+              iele.salePrice = res[key].price;
+              iele.currency = res[key].currency;
+              iele.saleCostPrice = res[key].costPrice;
+              iele.quotationProductList = res[key].quotationProductList
+                .map((x) => ({
+                  createTime: x.createTime,
+                  price: x.price,
+                  currency: x.currency,
+                }))
+                .filter((y, index) => index < 3);
+              iele.contractProductListOne = res[key].quotationProductList.map(
+                (x) => ({
+                  createTime: x.createTime,
+                  price: x.price,
+                  currency: x.currency,
+                })
+              );
+              iele.customerContractProductList = res[
+                key
+              ].customerContractProductList.map((x) => ({
+                createTime: x.createTime,
+                price: x.price,
+                currency: x.currency,
+              }));
+            }
+          }
+        }
+      });
+  }
+};
+const onPicture = (path) => {
+  window.open(path, "_blank");
+};
+const handleRemove = (index) => {
+  formData.data.quotationProductList.splice(index, 1);
+  totalAmount();
+};
+const calculationAmount = (att = "") => {
+  nextTick(() => {
+    if (
+      formData.data.quotationProductList &&
+      formData.data.quotationProductList.length > 0
+    ) {
+      for (let i = 0; i < formData.data.quotationProductList.length; i++) {
+        let money = 0;
+        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: null,
+      remark: "",
+    });
+  } else {
+    formData.data.quotationPayList = [
+      { payName: "", amount: null, remark: "" },
+    ];
+  }
+};
+const handleDelete = (index) => {
+  formData.data.quotationPayList.splice(index, 1);
+  totalAmount();
+};
+
+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 handleBeforeUpload = async (file, index) => {
+  const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
+  uploadData.value = res.uploadBody;
+  formData.data.quotationProductList[index].fileList = [
+    {
+      id: res.id,
+      fileName: res.fileName,
+      fileUrl: res.fileUrl,
+      uploadState: false,
+    },
+  ];
+  formData.data.quotationProductList[index].imageUrl = res.fileUrl;
+  return true;
+};
+
+const handleSuccess = (index) => {
+  formData.data.quotationProductList[index].uploadState = true;
+};
+
+const loadingSearch = ref(false);
+const remoteMethod = (keyword) => {
+  if (keyword && typeof keyword === "string") {
+    loadingSearch.value = true;
+    proxy.post("/customer/selPage", { keyword }).then((res) => {
+      customerList.value = res.rows.map((x) => ({
+        ...x,
+        label: x.name,
+        value: x.id,
+      }));
+      loadingSearch.value = false;
+    });
+  }
+  return;
+};
+
+const handleSubmit = async () => {
+  let flag = await formDom.value.handleSubmit(() => {});
+  if (flag) {
+    if (
+      formData.data.quotationProductList &&
+      formData.data.quotationProductList.length > 0
+    ) {
+      return true;
+    } else {
+      proxy.msgTip("请添加至少一件商品", 2);
+      return false;
+    }
+  } else {
+    setTimeout(() => {
+      const errorDiv = document.getElementsByClassName("is-error");
+      errorDiv[0].scrollIntoView();
+    }, 0);
+  }
+  return flag;
+};
+
+const getFormData = () => {
+  return proxy.deepClone(formData.data);
+};
+// 向父组件暴露
+defineExpose({
+  getFormData,
+  handleSubmit,
+});
+
+const changeShroffAccount = (val) => {
+  if (val) {
+    let data = accountList.value.find((item) => item.value == val);
+    if (formData.data.contractType == "2") {
+      if (data) {
+        formData.data.beneficiaryName = "";
+        formData.data.beneficiaryBank = "";
+        formData.data.beneficiaryBankAddress = "";
+        formData.data.beneficiaryAccountNumber = "";
+        formData.data.swiftCode = "";
+        formData.data.beneficiaryAddress = "";
+        formData.data.accountName = data.name;
+        formData.data.openingBank = data.openingBank;
+        formData.data.accountOpening = data.accountOpening;
+      }
+    } else {
+      if (data) {
+        formData.data.accountName = "";
+        formData.data.openingBank = "";
+        formData.data.accountOpening = "";
+        formData.data.beneficiaryName = data.beneficiaryName;
+        formData.data.beneficiaryBank = data.beneficiaryBank;
+        formData.data.beneficiaryBankAddress = data.beneficiaryBankAddress;
+        formData.data.beneficiaryAccountNumber = data.beneficiaryAccountNumber;
+        formData.data.swiftCode = data.swiftCode;
+        formData.data.beneficiaryAddress = data.beneficiaryAddress;
+      }
+    }
+  }
+};
+
+const handleClickUpload = async (att, flag, index) => {
+  let res = null;
+  let path = "";
+  if (flag) {
+    proxy.msgTip("请稍后", 2);
+    res = await proxy.post("/fileService/createTempFolder");
+    if (res && res.path) {
+      formData.data.quotationProductList[index][att] = res.path;
+      path = res.path;
+    }
+  } else {
+    path = formData.data.quotationProductList[index][att];
+  }
+  let a = document.createElement("a");
+  a.href = "printer://" + "ftp://192.168.1.13/" + path + "/";
+  a.style.display = "none";
+  document.body.appendChild(a);
+  a.click();
+  document.body.removeChild(a);
+};
+
+const getAllData = (businessId) => {
+  proxy.post("/saleQuotation/detail", { id: businessId }).then((res) => {
+    res.countryId = res.buyCountryId;
+    res.provinceId = res.buyProvinceId;
+    res.cityId = res.buyCityId;
+    for (const key in res) {
+      formData.data[key] = res[key];
+    }
+    if (
+      formData.data.quotationProductList &&
+      formData.data.quotationProductList.length > 0
+    ) {
+      let productIds = formData.data.quotationProductList.map(
+        (x) => x.productId
+      );
+      proxy
+        .post("/fileInfo/getList", {
+          businessIdList: productIds,
+        })
+        .then((fileObj) => {
+          for (let i = 0; i < formData.data.quotationProductList.length; i++) {
+            const e = formData.data.quotationProductList[i];
+            for (const key in fileObj) {
+              if (e.productId === key) {
+                if (fileObj[key] && fileObj[key].length > 0) {
+                  e.fileUrl = fileObj[key][0].fileUrl;
+                }
+              }
+            }
+          }
+        });
+      let ids = formData.data.quotationProductList.map((x) => x.id);
+      proxy
+        .post("/fileInfo/getList", {
+          businessIdList: ids,
+        })
+        .then((fileObj) => {
+          for (let i = 0; i < formData.data.quotationProductList.length; i++) {
+            const e = formData.data.quotationProductList[i];
+            for (const key in fileObj) {
+              if (e.id === key) {
+                if (fileObj[key] && fileObj[key].length > 0) {
+                  e.fileList = fileObj[key];
+                  e.imageUrl = fileObj[key][0].fileUrl;
+                }
+              }
+            }
+          }
+        });
+    }
+    if (formData.data.countryId) {
+      getCityData(formData.data.countryId, "20");
+    }
+    if (formData.data.provinceId) {
+      getCityData(formData.data.provinceId, "30");
+    }
+  });
+};
+
+onMounted(() => {
+  if (currencyData.value && currencyData.value.length > 0) {
+    formData.data.currency = currencyData.value[0].dictKey;
+  }
+  formOption.disabled = judgeStatus();
+  if (route.query && route.query.businessId && route.query.processType) {
+    let businessId = route.query.businessId;
+    getAllData(businessId);
+  }
+});
+
+watch(
+  () => props.queryData,
+  (val) => {
+    nextTick(() => {
+      formOption.disabled = judgeStatus();
+    });
+    if (val.businessId && val.processType) {
+      getAllData(val.businessId);
+    }
+  },
+  {
+    deep: true,
+    immediate: true,
+  }
+);
+const showPriceInfo = () => {
+  if (props.queryData.processType) {
+    return false;
+  }
+  if (route.query.processType) {
+    return false;
+  } else {
+    return true;
+  }
+};
+const optionTwo = reactive({
+  data: {
+    tooltip: {
+      trigger: "axis",
+    },
+    // legend: {
+    //   data: ["价格"],
+    // },
+    grid: {
+      left: "3%",
+      right: "4%",
+      top: "10%",
+      bottom: "3%",
+      containLabel: true,
+    },
+    // toolbox: {
+    //   feature: {
+    //     saveAsImage: {},
+    //   },
+    // },
+    xAxis: {
+      type: "category",
+      boundaryGap: false,
+      data: [],
+    },
+    yAxis: {
+      type: "value",
+    },
+    series: [
+      {
+        name: "价格",
+        type: "line",
+        data: [],
+      },
+    ],
+  },
+});
+const showEcharts = (row, index) => {
+  let myChart = null;
+  myChart = echarts.init(proxy.$refs[row.productId + index]);
+  window.addEventListener("resize", () => {
+    myChart.resize();
+  });
+  if (row.contractProductListOne && row.contractProductListOne.length > 0) {
+    optionTwo.data.xAxis.data = row.contractProductListOne.map((item) => {
+      return item.createTime.slice(0, 10);
+    });
+    optionTwo.data.series[0].data = row.contractProductListOne.map((item) => {
+      return item.price;
+    });
+  } else {
+    optionTwo.data.xAxis.data = [];
+    optionTwo.data.series[0].data = [];
+  }
+  myChart.setOption(optionTwo.data);
+  myChart.resize();
+};
+
+const clickCopy = (type) => {
+  copyType.value = type;
+  copyContract.value = true;
+};
+</script>
+
+<style lang="scss" scoped>
+.img {
+  object-fit: contain;
+  width: 16px;
+  height: 16px;
+  vertical-align: middle;
+}
+.pic {
+  object-fit: contain;
+  width: 50px;
+  height: 50px;
+  cursor: pointer;
+  vertical-align: middle;
+}
+.el-icon.avatar-uploader-icon {
+  font-size: 20px;
+  color: #8c939d;
+  width: 50px;
+  height: 50px;
+  text-align: center;
+  border: 1px dashed var(--el-border-color);
+}
+</style>

+ 6 - 6
src/components/process/SendFunds.vue

@@ -225,7 +225,7 @@
       <div id="pdfDom" style="width: 776px">
         <div style="padding: 60px 30px; font-size: 12px !important; color: black">
           <div style="font-size: 16px; text-align: center; padding: 8px">
-            <span>{{ dictDataEcho(printDetails.type, fundsType) }}审批单</span>
+            <span>{{ dictKeyValue(printDetails.type, fundsType) }}审批单</span>
           </div>
           <div style="padding: 8px 0">
             <span>{{ printDetails.corporationName }}</span>
@@ -323,7 +323,7 @@
                           border-right: 1px solid black;
                           text-align: center;
                         ">
-                        {{ dictDataEcho(item.costType, fundsCostType) }}
+                        {{ dictKeyValue(item.costType, fundsCostType) }}
                       </div>
                       <div style="
                           width: 120px;
@@ -350,7 +350,7 @@
                           display: flex;
                           align-items: center;
                         ">
-                        {{ dictDataEcho(printDetails.currency, currencyType) }}
+                        {{ dictKeyValue(printDetails.currency, currencyType) }}
                       </div>
                       <div style="
                           width: 100px;
@@ -440,7 +440,7 @@
                           border-right: 1px solid black;
                           text-align: center;
                         ">
-                        {{ dictDataEcho(item.costType, fundsCostType) }}
+                        {{ dictKeyValue(item.costType, fundsCostType) }}
                       </div>
                       <div style="
                           width: 120px;
@@ -467,7 +467,7 @@
                           display: flex;
                           align-items: center;
                         ">
-                        {{ dictDataEcho(printDetails.currency, currencyType) }}
+                        {{ dictKeyValue(printDetails.currency, currencyType) }}
                       </div>
                       <div style="
                           width: 80px;
@@ -638,7 +638,7 @@
                       align-items: center;
                     ">
                     {{
-                      dictDataEcho(
+                      dictKeyValue(
                         printDetails.paymentMethod,
                         fundsPaymentMethod
                       )

+ 4 - 3
src/components/process/SendSubscribe.vue

@@ -77,8 +77,9 @@
         </el-table>
       </el-form-item>
     </el-form>
-    <el-dialog v-if="openProduct" v-model="openProduct" title="选择货品" width="70%" append-to-body>
-      <SelectGoods :selectList="acquireSelectList()" @cancel="openProduct = false" @pushGoods="pushGoods"></SelectGoods>
+    <el-dialog v-if="openProduct" v-model="openProduct" title="选择货品" width="90%" append-to-body>
+      <!-- <SelectGoods :selectList="acquireSelectList()" @cancel="openProduct = false" @pushGoods="pushGoods"></SelectGoods> -->
+      <SelectMaterial @selectMaterial="selectMaterial"></SelectMaterial>
     </el-dialog>
   </div>
 </template>
@@ -88,7 +89,7 @@ import SelectGoods from "@/components/product/SelectGoods";
 import { ElMessage } from "element-plus";
 import useUserStore from "@/store/modules/user";
 import TitleInfo from "@/components/TitleInfo/index.vue";
-
+import SelectMaterial from "@/components/product/SelectMaterial.vue";
 const route = useRoute();
 const { proxy } = getCurrentInstance();
 // 接收父组件的传值

+ 13 - 5
src/components/product/SelectCompanyProduct.vue

@@ -1,13 +1,13 @@
 <template>
   <div class="user">
     <div class="tree">
-      <treeList title="产品分类" submitType="1" :data="treeListData" v-model="sourceList.pagination.productClassifyId" @change="treeChange"
-                @changeTreeList="getTreeList">
+      <treeList title="产品分类" submitType="1" :hiddenBtn="true" :data="treeListData" v-model="sourceList.pagination.productClassifyId"
+                @change="treeChange" @changeTreeList="getTreeList">
       </treeList>
     </div>
     <div class="content">
-      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
-               :selectConfig="selectConfig" :table-events="{
+      <byTable :source="sourceList.data" :tableHeight="tableHeight" :pagination="sourceList.pagination" :config="config" :loading="loading"
+               highlight-current-row :selectConfig="selectConfig" :table-events="{
           //element talbe事件都能传
           select: select,
         }" :action-list="[]" @get-list="getList">
@@ -103,6 +103,14 @@ import ProductContract from "@/components/contractCom/productContract.vue";
 import TitleInfo from "@/components/TitleInfo/index.vue";
 import { watch } from "vue";
 const { proxy } = getCurrentInstance();
+const tableHeight = ref(0);
+const getTableHeight = () => {
+  tableHeight.value = window.innerHeight - 245;
+};
+getTableHeight();
+window.addEventListener("resize", () => {
+  getTableHeight();
+});
 const props = defineProps({
   alreadySelectData: Array,
 });
@@ -216,7 +224,7 @@ const config = computed(() => {
       attrs: {
         label: "尺寸",
         slot: "size",
-        width: 150,
+        width: 180,
       },
     },
     {

+ 2 - 2
src/components/product/SelectCustomerProduct.vue

@@ -784,14 +784,14 @@ const handleOpenProductContract = (row) => {
 
 <style lang="scss" scoped>
 .user {
-  padding: 20px;
+  padding: 10px;
   display: flex;
   justify-content: space-between;
   .tree {
     width: 300px;
   }
   .content {
-    width: calc(100% - 320px - 170px);
+    width: calc(100% - 310px - 170px);
   }
   .right {
     padding-left: 10px;

+ 13 - 5
src/components/product/SelectMaterial.vue

@@ -1,13 +1,13 @@
 <template>
   <div class="user">
     <div class="tree">
-      <treeList title="物料分类" submitType="2" :data="treeListData" v-model="sourceList.pagination.productClassifyId" @change="treeChange"
-                @changeTreeList="getTreeList">
+      <treeList title="物料分类" submitType="2" :hiddenBtn="true" :data="treeListData" v-model="sourceList.pagination.productClassifyId"
+                @change="treeChange" @changeTreeList="getTreeList">
       </treeList>
     </div>
     <div class="content">
-      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
-               :selectConfig="selectConfig" :action-list="[
+      <byTable :source="sourceList.data" :tableHeight="tableHeight" :pagination="sourceList.pagination" :config="config" :loading="loading"
+               highlight-current-row :selectConfig="selectConfig" :action-list="[
          
         ]" @get-list="getList">
         <template #pic="{ item }">
@@ -110,6 +110,14 @@ const backLinesData = computed(
 const frontLinesData = computed(
   () => proxy.useUserStore().allDict["front_lines"]
 );
+const tableHeight = ref(0);
+const getTableHeight = () => {
+  tableHeight.value = window.innerHeight - 245;
+};
+getTableHeight();
+window.addEventListener("resize", () => {
+  getTableHeight();
+});
 const loading = ref(false);
 const submitLoading = ref(false);
 const sourceList = ref({
@@ -544,7 +552,7 @@ const clickSelect = (item) => {
     width: 300px;
   }
   .content {
-    width: calc(100% - 320px);
+    width: calc(100% - 310px);
   }
 }
 .pic {

+ 0 - 485
src/components/product/SelectMaterialss.vue

@@ -1,485 +0,0 @@
-<template>
-  <div class="user">
-    <div class="tree">
-      <treeList title="物料分类" submitType="2" :data="treeListData" v-model="sourceList.pagination.productClassifyId" @change="treeChange"
-                @changeTreeList="getTreeList">
-      </treeList>
-    </div>
-    <div class="content">
-      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
-               :selectConfig="selectConfig" :table-events="{
-          //element talbe事件都能传
-          select: select,
-        }" :action-list="[]" @get-list="getList">
-        <template #pic="{ item }">
-          <div v-if="item.fileList.length > 0">
-            <img :src="item.fileList[0].fileUrl" class="pic" @click="handleClickFile(item.fileList[0])" />
-          </div>
-          <div v-else></div>
-        </template>
-      </byTable>
-    </div>
-    <div class="right">
-      <div style="margin-bottom:30px">
-        <TitleInfo :content="'已选择配件'"></TitleInfo>
-      </div>
-      <el-tag style="margin-right: 10px; margin-bottom: 10px" type="info" v-for="(good, index) in goodList" :key="good.productId">
-        {{  good.productName }}
-      </el-tag>
-    </div>
-    <el-dialog :title="modalType == 'add' ? '添加' : '编辑'" v-model="dialogVisible" width="500" v-loading="loading">
-      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
-        <template #productPic>
-          <div>
-            <el-upload v-model:fileList="fileList" action="https://winfaster.obs.cn-south-1.myhuaweicloud.com" :data="uploadData"
-                       list-type="picture-card" :on-remove="handleRemove" :on-success="handleSuccess" :before-upload="handleBeforeUpload">
-              <el-icon>
-                <Plus />
-              </el-icon>
-            </el-upload>
-          </div>
-        </template>
-      </byForm>
-      <template #footer>
-        <el-button @click="dialogVisible = false" size="default">取 消</el-button>
-        <el-button type="primary" @click="submitForm('byform')" size="default" :loading="submitLoading">
-          确 定
-        </el-button>
-      </template>
-    </el-dialog>
-    <el-dialog title="Excel导入" v-model="openExcelDialog" width="400" v-loading="loading">
-      <template #footer>
-        <el-button @click="openExcelDialog = false" size="default">取 消</el-button>
-        <el-button type="primary" @click="submitExcel()" size="default" :loading="submitLoading">
-          确 定
-        </el-button>
-      </template>
-    </el-dialog>
-  </div>
-</template>
-  
-<script setup>
-/* eslint-disable vue/no-unused-components */
-import { ElMessage, ElMessageBox } from "element-plus";
-import byTable from "@/components/byTable/index";
-import byForm from "@/components/byForm/index";
-import treeList from "@/components/product/treeList";
-import TitleInfo from "@/components/TitleInfo/index.vue";
-
-const { proxy } = getCurrentInstance();
-const props = defineProps({
-  alreadySelectData: Array,
-});
-const goodList = ref([]);
-onMounted(() => {
-  goodList.value = proxy.deepClone(props.alreadySelectData);
-});
-const loading = ref(false);
-const submitLoading = ref(false);
-const materialUnit = ref([]);
-const materialType = ref([]);
-const sourceList = ref({
-  data: [],
-  pagination: {
-    total: 3,
-    pageNum: 1,
-    pageSize: 10,
-    type: "",
-    productClassifyId: "",
-    keyword: "",
-    definition: "2",
-  },
-});
-let dialogVisible = ref(false);
-let openExcelDialog = ref(false);
-
-let modalType = ref("add");
-let rules = ref({
-  productClassifyId: [
-    { required: true, message: "请选择物料分类", trigger: "change" },
-  ],
-  type: [{ required: true, message: "请选择物料类型", trigger: "change" }],
-  name: [{ required: true, message: "请输入物料名称", trigger: "blur" }],
-  unit: [{ required: true, message: "请选择单位", trigger: "change" }],
-});
-const selectConfig = computed(() => {
-  return [
-    {
-      label: "物料类型",
-      prop: "type",
-      data: materialType.value,
-    },
-  ];
-});
-const config = computed(() => {
-  return [
-    {
-      attrs: {
-        label: "物料类型",
-        prop: "type",
-      },
-      render(type) {
-        return proxy.dictValueLabel(type, materialType.value);
-      },
-    },
-    {
-      attrs: {
-        label: "物料编码",
-        prop: "code",
-      },
-    },
-    {
-      attrs: {
-        label: "物料名称",
-        prop: "name",
-      },
-    },
-    {
-      attrs: {
-        label: "图片",
-        slot: "pic",
-      },
-    },
-    {
-      attrs: {
-        label: "单位",
-        prop: "unit",
-      },
-      render(unit) {
-        return proxy.dictValueLabel(unit, materialUnit.value);
-      },
-    },
-    {
-      attrs: {
-        label: "规格型号",
-        prop: "spec",
-      },
-    },
-    {
-      attrs: {
-        label: "物料备注",
-        prop: "remark",
-      },
-    },
-
-    {
-      attrs: {
-        label: "操作",
-        width: "60",
-        align: "center",
-        fixed: "right",
-      },
-      // 渲染 el-button,一般用在最后一列。
-      renderHTML(row) {
-        return [
-          {
-            attrs: {
-              label: "选择",
-              type: "primary",
-              text: true,
-            },
-            el: "button",
-            click() {
-              handleSelect(row);
-            },
-          },
-        ];
-      },
-    },
-  ];
-});
-
-let formData = reactive({
-  data: {},
-});
-const formOption = reactive({
-  inline: true,
-  labelWidth: 100,
-  itemWidth: 100,
-  rules: [],
-});
-const byform = ref(null);
-const treeListData = ref([]);
-const formConfig = computed(() => {
-  return [
-    {
-      type: "treeSelect",
-      prop: "productClassifyId",
-      label: "物料分类",
-      data: [],
-    },
-    {
-      type: "select",
-      prop: "type",
-      label: "物料类型",
-      required: true,
-      data: [
-        {
-          label: "原料",
-          id: "1",
-        },
-        {
-          label: "辅料",
-          id: "2",
-        },
-        {
-          label: "配件",
-          id: "3",
-        },
-        {
-          label: "包材",
-          id: "4",
-        },
-        {
-          label: "其他",
-          id: "5",
-        },
-      ],
-    },
-    {
-      type: "input",
-      prop: "name",
-      label: "物料名称",
-    },
-    {
-      type: "input",
-      prop: "spec",
-      label: "规格型号",
-    },
-    {
-      type: "select",
-      prop: "unit",
-      label: "单位",
-      required: true,
-      data: [
-        {
-          label: "个",
-          id: "个",
-        },
-        {
-          label: "双",
-          id: "双",
-        },
-      ],
-    },
-    {
-      type: "slot",
-      slotName: "productPic",
-      prop: "fileList",
-      label: "产品图片",
-    },
-
-    {
-      type: "input",
-      prop: "remark",
-      label: "备注",
-      itemType: "textarea",
-    },
-  ];
-});
-const newPassword = () => {
-  formData.data.password = generatePassword();
-};
-const generatePassword = () => {
-  var length = 12,
-    charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",
-    password = "";
-  for (var i = 0, n = charset.length; i < length; ++i) {
-    password += charset.charAt(Math.floor(Math.random() * n));
-  }
-  return password;
-};
-
-const getList = async (req) => {
-  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
-  loading.value = true;
-  proxy
-    .post("/productInfo/page", sourceList.value.pagination)
-    .then((message) => {
-      console.log(message);
-      sourceList.value.data = message.rows.map((x) => ({ ...x, fileList: [] }));
-      sourceList.value.pagination.total = message.total;
-      setTimeout(() => {
-        loading.value = false;
-      }, 200);
-
-      const productIdList = message.rows.map((x) => x.id);
-      // 请求文件数据并回显
-      if (productIdList.length > 0) {
-        proxy
-          .post("/fileInfo/getList", { businessIdList: productIdList })
-          .then((fileObj) => {
-            for (let i = 0; i < sourceList.value.data.length; i++) {
-              const e = sourceList.value.data[i];
-              for (const key in fileObj) {
-                if (e.id === key) {
-                  e.fileList = fileObj[key];
-                }
-              }
-            }
-          });
-      }
-    });
-};
-const uploadData = ref({});
-const fileList = ref([]);
-const fileListCopy = ref([]);
-
-const treeChange = (e) => {
-  console.log(e);
-  sourceList.value.pagination.productClassifyId = e.id;
-  getList({ productClassifyId: e.id });
-};
-
-const openModal = () => {
-  dialogVisible.value = true;
-  modalType.value = "add";
-  formData.data = {
-    definition: "2",
-    fileList: [],
-  };
-  fileList.value = [];
-  fileListCopy.value = [];
-};
-
-const openExcel = () => {
-  openExcelDialog.value = true;
-};
-const submitExcel = () => {
-  openExcelDialog.value = false;
-};
-const TreetenantId = ref("");
-const selection = ref({
-  data: [],
-});
-const select = (_selection, row) => {
-  selection.value.data = _selection;
-  console.log(_selection.length);
-};
-
-const tree = ref(null);
-const submitForm = () => {
-  console.log(byform.value);
-  byform.value.handleSubmit((valid) => {
-    formData.data.fileList = fileListCopy.value.map((x) => ({
-      id: x.id,
-      fileName: x.fileName,
-    }));
-    submitLoading.value = true;
-    proxy.post("/productInfo/" + modalType.value, formData.data).then(
-      (res) => {
-        ElMessage({
-          message: modalType.value == "add" ? "添加成功" : "编辑成功",
-          type: "success",
-        });
-        dialogVisible.value = false;
-        submitLoading.value = false;
-        getList();
-      },
-      (err) => {
-        submitLoading.value = false;
-      }
-    );
-  });
-};
-
-const getTreeList = () => {
-  proxy
-    .post("/productClassify/tree", { parentId: "", name: "", definition: "2" })
-    .then((message) => {
-      treeListData.value = message;
-      formConfig.value[0].data = message;
-    });
-};
-
-const getDtl = (row) => {
-  modalType.value = "edit";
-  proxy.post("/productInfo/detail", { id: row.id }).then((res) => {
-    fileList.value = row.fileList.map((x) => ({ ...x, url: x.fileUrl }));
-    fileListCopy.value = [...fileList.value];
-    res.type = res.type + "";
-    res.definition = "2";
-    formData.data = res;
-    dialogVisible.value = true;
-  });
-};
-getTreeList();
-getList();
-const handleBeforeUpload = async (file) => {
-  const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
-  uploadData.value = res.uploadBody;
-  fileListCopy.value.push({
-    id: res.id,
-    fileName: res.fileName,
-    path: res.fileUrl,
-    url: res.fileUrl,
-    uid: file.uid,
-  });
-};
-
-const handleSuccess = (res, file, files) => {
-  // 查当前file的index值去赋值对应的copy变量的值
-  // let uid = file.uid;
-  // const index = fileList.value.findIndex((x) => x.uid === uid);
-  // fileListCopy.value[index].uid = uid;
-};
-
-const handleRemove = (file) => {
-  const index = fileListCopy.value.findIndex(
-    (x) => x.uid === file.uid || x.id === file.id
-  );
-  fileListCopy.value.splice(index, 1);
-};
-
-const handleClickFile = (file) => {
-  window.open(file.fileUrl, "_blank");
-};
-
-const handleSelect = (row) => {
-  goodList.value.push({
-    ...row,
-    productName: row.name,
-  });
-  proxy.$emit("handleSelect", row);
-};
-
-const getDict = () => {
-  proxy.getDictOne(["material_unit", "material_type"]).then((res) => {
-    materialUnit.value = res["material_unit"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    materialType.value = res["material_type"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-  });
-};
-getDict();
-</script>
-  
-<style lang="scss" scoped>
-.user {
-  padding: 20px;
-  display: flex;
-  justify-content: space-between;
-  .tree {
-    width: 300px;
-  }
-  .content {
-    width: calc(100% - 320px - 170px);
-  }
-  .right {
-    padding-left: 10px;
-    width: 170px;
-    border-left: 1px solid #eee;
-  }
-}
-.pic {
-  object-fit: contain;
-  width: 50px;
-  height: 50px;
-  cursor: pointer;
-  vertical-align: middle;
-}
-</style>

+ 501 - 167
src/components/product/SelectProduct.vue

@@ -1,65 +1,132 @@
 <template>
   <div class="user">
     <div class="tree">
-      <treeList title="产品分类" submitType="1" :data="treeListData" v-model="sourceList.pagination.productClassifyId" @change="treeChange"
-                @changeTreeList="getTreeList">
+      <treeList title="产品分类" submitType="1" :hiddenBtn="true" :data="treeListData" v-model="sourceList.pagination.productClassifyId"
+                @change="treeChange" @changeTreeList="getTreeList">
       </treeList>
     </div>
     <div class="content">
-      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
-               :selectConfig="selectConfig" :table-events="{
+      <byTable :source="sourceList.data" :tableHeight="tableHeight" :pagination="sourceList.pagination" :config="config" :loading="loading"
+               highlight-current-row :selectConfig="selectConfig" :table-events="{
           //element talbe事件都能传
           select: select,
         }" :action-list="[]" @get-list="getList">
+        <template #name="{ item }">
+          <div>
+            <span class="el-click">{{ item.name }}</span>
+          </div>
+        </template>
         <template #pic="{ item }">
           <div v-if="item.fileList.length > 0">
             <img :src="item.fileList[0].fileUrl" class="pic" @click="handleClickFile(item.fileList[0])" />
           </div>
           <div v-else></div>
         </template>
-      </byTable>
-    </div>
-    <el-dialog :title="modalType == 'add' ? '添加' : '编辑'" v-model="dialogVisible" width="500" v-loading="loading">
-      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
-        <template #productPic>
-          <div>
-            <el-upload v-model:fileList="fileList" action="https://winfaster.obs.cn-south-1.myhuaweicloud.com" :data="uploadData"
-                       list-type="picture-card" :on-remove="handleRemove" :on-success="handleSuccess" :before-upload="handleBeforeUpload">
-              <el-icon>
-                <Plus />
-              </el-icon>
-            </el-upload>
+        <template #size="{ item }">
+          <div v-if="item['length'] && item.width && item.height">
+            <span>{{ item['length'] }}cm</span>*
+            <span>{{ item.width }}cm</span>*
+            <span>{{ item.height }}cm</span>
           </div>
+          <div v-else></div>
         </template>
-      </byForm>
+        <template #price="{ item }">
+          <div v-if="item.price">
+            <span>{{ item.currency }} {{ moneyFormat(item.price ,2)}}</span>
+          </div>
+          <div v-else></div>
+        </template>
+      </byTable>
+    </div>
+    <!-- <div class="right">
+      <div style="margin-bottom:30px">
+        <TitleInfo :content="'已选择商品'"></TitleInfo>
+      </div>
+      <el-tag style="margin-right: 10px; margin-bottom: 10px" type="info" v-for="(good, index) in goodList" :key="good.productId">
+        {{ good.productCnName || good.productName }}
+      </el-tag>
+    </div> -->
+
+    <el-dialog :title="modalType == 'add' ? '添加产品' : '编辑产品'" v-model="dialogVisible" width="700" v-loading="submitLoading" destroy-on-close>
+      <div class="public_height_dialog">
+        <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
+          <template #nameEnglish>
+            <div style="width: 100%">
+              <el-form-item label="英文名" prop="nameEnglish">
+                <el-input v-model="formData.data.nameEnglish" placeholder="请输入" onkeyup="value=value.replace(/[^\x00-\xff]/g, '')"></el-input>
+                <!-- @input="(val) => handleKeyup(val)" -->
+              </el-form-item>
+            </div>
+          </template>
+          <template #productPic>
+            <div>
+              <el-upload v-model:fileList="fileList" action="https://winfaster.obs.cn-south-1.myhuaweicloud.com" :data="uploadData"
+                         list-type="picture-card" :on-remove="handleRemove" :before-upload="handleBeforeUpload" :on-preview="handlePreview"
+                         accept=".gif, .jpeg, .jpg, .png">
+                <el-icon>
+                  <Plus />
+                </el-icon>
+              </el-upload>
+            </div>
+          </template>
+        </byForm>
+      </div>
       <template #footer>
         <el-button @click="dialogVisible = false" size="default">取 消</el-button>
-        <el-button type="primary" @click="submitForm('byform')" size="default" :loading="submitLoading">
-          确 定
-        </el-button>
+        <el-button type="primary" @click="submitForm('byform')" size="default" :loading="submitLoading">确 定</el-button>
       </template>
     </el-dialog>
-    <el-dialog title="Excel导入" v-model="openExcelDialog" width="400" v-loading="loading">
+
+    <el-dialog title="导入产品" v-model="openExcelDialog" width="400" v-loading="excelLoading">
+      <el-upload :action="actionUrl + '/productInfo/excelImportByEhsd'" :headers="headers" :on-success="handleSuccess" :on-progress="handleProgress"
+                 :show-file-list="false" :on-error="handleError" accept=".xlsx">
+        <el-button type="primary">点击导入</el-button>
+      </el-upload>
       <template #footer>
         <el-button @click="openExcelDialog = false" size="default">取 消</el-button>
-        <el-button type="primary" @click="submitExcel()" size="default" :loading="submitLoading">
-          确 定
-        </el-button>
       </template>
     </el-dialog>
+
+    <el-dialog v-if="productContractDialog" v-model="productContractDialog" :title="'外销合同'" width="80%" append-to-body>
+      <ProductContract :currentProductId="currentProductId"></ProductContract>
+    </el-dialog>
   </div>
 </template>
-  
+
 <script setup>
-/* eslint-disable vue/no-unused-components */
 import { ElMessage, ElMessageBox } from "element-plus";
 import byTable from "@/components/byTable/index";
 import byForm from "@/components/byForm/index";
 import treeList from "@/components/product/treeList";
-
-import { computed, defineComponent, ref } from "vue";
+import { getToken } from "@/utils/auth";
+import ProductContract from "@/components/contractCom/productContract.vue";
+import TitleInfo from "@/components/TitleInfo/index.vue";
+import { watch } from "vue";
+const { proxy } = getCurrentInstance();
+const props = defineProps({
+  alreadySelectData: Array,
+});
+const tableHeight = ref(0);
+const getTableHeight = () => {
+  tableHeight.value = window.innerHeight - 245;
+};
+getTableHeight();
+window.addEventListener("resize", () => {
+  getTableHeight();
+});
+const goodList = ref([]);
+onMounted(() => {
+  // goodList.value = proxy.deepClone(props.alreadySelectData);
+});
+const headers = ref({ Authorization: "Bearer " + getToken() });
+const actionUrl = import.meta.env.VITE_APP_BASE_API;
 const loading = ref(false);
 const submitLoading = ref(false);
+const treeListData = ref([]);
+const innerMethon = ref([]);
+const outsideMethon = ref([]);
+const productUnit = ref([]);
+const accountCurrency = ref([]);
 const sourceList = ref({
   data: [],
   pagination: {
@@ -74,91 +141,122 @@ const sourceList = ref({
 });
 let dialogVisible = ref(false);
 let openExcelDialog = ref(false);
-
+let excelLoading = ref(false);
 let modalType = ref("add");
 let rules = ref({
   productClassifyId: [
     { required: true, message: "请选择产品分类", trigger: "change" },
   ],
-  type: [{ required: true, message: "请选择产品类型", trigger: "change" }],
   name: [{ required: true, message: "请输入产品名称", trigger: "blur" }],
-  unit: [{ required: true, message: "请选择单位", trigger: "change" }],
-});
-const { proxy } = getCurrentInstance();
-const selectConfig = computed(() => {
-  return [
-    {
-      label: "产品类型",
-      prop: "type",
-      data: [
-        {
-          label: "成品",
-          value: "1",
-        },
-        {
-          label: "半成品",
-          value: "2",
-        },
-      ],
-    },
-  ];
+  nameEnglish: [
+    { required: true, message: "请输入产品英文名", trigger: "blur" },
+  ],
+  productLong: [
+    { required: true, message: "请输入长 (cm)", trigger: "blur" },
+  ],
+  productWide: [
+    { required: true, message: "请输入宽 (cm)", trigger: "blur" },
+  ],
+  productHigh: [
+    { required: true, message: "请输入高 (cm)", trigger: "blur" },
+  ],
+  innerPackMethod: [
+    { required: true, message: "请选择内包装方式", trigger: "change" },
+  ],
+  outerPackMethod: [
+    { required: true, message: "请选择外包装方式", trigger: "change" },
+  ],
 });
+
+const selectConfig = reactive([
+  // {
+  //   label: "产品类型",
+  //   prop: "type",
+  //   data: [],
+  // },
+]);
 const config = computed(() => {
   return [
     {
       attrs: {
-        label: "产品类型",
-        prop: "type",
+        label: "图片",
+        slot: "pic",
+        align: "center",
+        width: 80,
       },
-      render(type) {
-        return type == 1 ? "成品" : type == 2 ? "半成品" : "";
+    },
+    {
+      attrs: {
+        label: "产品分类",
+        prop: "classifyName",
+        "min-width": 150,
       },
     },
     {
       attrs: {
         label: "产品编码",
-        prop: "code",
+        prop: "customCode",
+        width: 120,
       },
     },
     {
       attrs: {
         label: "产品名称",
-        prop: "name",
+        slot: "name",
+        "min-width": 150,
       },
     },
     {
       attrs: {
-        label: "图片",
-        prop: "unit",
-        slot: "pic",
+        label: "产品英文名",
+        prop: "nameEnglish",
+        "min-width": 120,
       },
     },
     {
       attrs: {
-        label: "单位",
-        prop: "unit",
+        label: "产品规格",
+        prop: "spec",
+        width: 120,
       },
-      render(unit) {
-        return proxy.dictValueLabel(unit, productUnit.value);
+    },
+    {
+      attrs: {
+        label: "尺寸",
+        slot: "size",
+        width: 180,
       },
     },
     {
       attrs: {
-        label: "规格型号",
-        prop: "spec",
+        label: "净重",
+        prop: "netWeight",
+        width: 100,
+      },
+      render(val) {
+        if (val) {
+          return val + " kg";
+        }
       },
     },
     {
       attrs: {
-        label: "产品备注",
-        prop: "remark",
+        label: "销售价",
+        slot: "price",
+        width: 100,
+      },
+    },
+    {
+      attrs: {
+        label: "海关编码",
+        prop: "hsCode",
+        width: 100,
       },
     },
-
     {
       attrs: {
         label: "操作",
-        width: "60",
+        width: "80",
         align: "center",
         fixed: "right",
       },
@@ -173,7 +271,7 @@ const config = computed(() => {
             },
             el: "button",
             click() {
-              handleSelect(row);
+              clickSelect(row);
             },
           },
         ];
@@ -185,104 +283,192 @@ const config = computed(() => {
 const uploadData = ref({});
 const fileList = ref([]);
 const fileListCopy = ref([]);
-
 let formData = reactive({
   data: {},
 });
 const formOption = reactive({
+  disabled: false,
   inline: true,
   labelWidth: 100,
   itemWidth: 100,
   rules: [],
 });
 const byform = ref(null);
-const treeListData = ref([]);
 const formConfig = computed(() => {
   return [
     {
+      type: "title",
+      title: "基本信息",
+    },
+    {
       type: "treeSelect",
       prop: "productClassifyId",
       label: "产品分类",
-      data: [],
-    },
-    {
-      type: "select",
-      prop: "type",
-      label: "产品类型",
-      required: true,
-      data: [
-        {
-          label: "成品",
-          id: "1",
-        },
-        {
-          label: "半成品",
-          id: "2",
-        },
-      ],
+      data: treeListData.value,
+      itemWidth: 100,
+      disabled: false,
+      style: {
+        width: "100%",
+      },
     },
     {
       type: "input",
       prop: "name",
       label: "产品名称",
+      itemWidth: 100,
+      disabled: false,
+    },
+    {
+      type: "slot",
+      slotName: "nameEnglish",
+      label: "",
+    },
+    {
+      type: "slot",
+      slotName: "productPic",
+      prop: "fileList",
+      label: "产品图片",
+    },
+    {
+      type: "title",
+      title: "价格信息",
+    },
+    {
+      type: "selectInput",
+      prop: "price",
+      selectProp: "currency",
+      label: "销售指导价",
+      itemWidth: 50,
+      style: {
+        width: "100%",
+      },
+      data: accountCurrency.value,
+    },
+    {
+      type: "selectInput",
+      prop: "costPrice",
+      selectProp: "costCurrency",
+      label: "成本价",
+      itemWidth: 50,
+      style: {
+        width: "100%",
+      },
+      data: accountCurrency.value,
+    },
+    {
+      type: "title",
+      title: "属性信息",
     },
     {
       type: "input",
       prop: "spec",
       label: "规格型号",
+      itemWidth: 100,
+      disabled: false,
+    },
+    {
+      type: "input",
+      prop: "productLong",
+      label: "尺寸",
+      itemWidth: 33.33,
+      placeholder: "长(cm)",
+      disabled: false,
+    },
+    {
+      type: "input",
+      prop: "productWide",
+      label: " ",
+      itemWidth: 33.33,
+      placeholder: "宽(cm)",
+      disabled: false,
+    },
+    {
+      type: "input",
+      prop: "productHigh",
+      label: " ",
+      itemWidth: 33.33,
+      placeholder: "高(cm)",
+      disabled: false,
     },
     {
       type: "select",
-      prop: "unit",
-      label: "单位",
+      prop: "innerPackMethod",
+      label: "内包装方式",
       required: true,
-      data: productUnit.value,
+      itemWidth: 50,
+      multiple: true,
+      data: innerMethon.value,
+      filterable: true,
+      placeholder: "内包装方式",
+      style: {
+        width: "100%",
+      },
+      disabled: false,
     },
     {
-      type: "slot",
-      slotName: "productPic",
-      prop: "fileList",
-      label: "产品图片",
+      type: "select",
+      prop: "outerPackMethod",
+      label: "外包装方式",
+      required: true,
+      itemWidth: 50,
+      multiple: true,
+      data: outsideMethon.value,
+      filterable: true,
+      placeholder: "外包装方式",
+      style: {
+        width: "100%",
+      },
+      disabled: false,
+    },
+    {
+      type: "input",
+      prop: "netWeight",
+      label: "净重(kg)",
+      itemWidth: 100,
+      style: {
+        width: "30%",
+      },
+    },
+    {
+      type: "input",
+      prop: "hsCode",
+      label: "海关编码",
+      itemWidth: 100,
+      style: {
+        width: "30%",
+      },
+      disabled: false,
     },
     {
       type: "input",
+      itemType: "textarea",
       prop: "remark",
       label: "备注",
-      itemType: "textarea",
+      itemWidth: 100,
     },
   ];
 });
-const newPassword = () => {
-  formData.data.password = generatePassword();
-};
-const generatePassword = () => {
-  var length = 12,
-    charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",
-    password = "";
-  for (var i = 0, n = charset.length; i < length; ++i) {
-    password += charset.charAt(Math.floor(Math.random() * n));
-  }
-  return password;
-};
 
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
-  proxy
-    .post("/productInfo/page", sourceList.value.pagination)
-    .then((message) => {
-      console.log(message);
-      sourceList.value.data = message.rows.map((x) => ({ ...x, fileList: [] }));
+  proxy.post("/productInfo/page", sourceList.value.pagination).then(
+    (message) => {
+      sourceList.value.data = message.rows.map((x) => ({
+        ...x,
+        fileList: [],
+      }));
       sourceList.value.pagination.total = message.total;
       setTimeout(() => {
         loading.value = false;
       }, 200);
-
       const productIdList = message.rows.map((x) => x.id);
       // 请求文件数据并回显
       if (productIdList.length > 0) {
         proxy
-          .post("/fileInfo/getList", { businessIdList: productIdList })
+          .post("/fileInfo/getList", {
+            businessIdList: productIdList,
+          })
           .then((fileObj) => {
             for (let i = 0; i < sourceList.value.data.length; i++) {
               const e = sourceList.value.data[i];
@@ -294,11 +480,14 @@ const getList = async (req) => {
             }
           });
       }
-    });
+    },
+    (err) => {
+      loading.value = false;
+    }
+  );
 };
 
 const treeChange = (e) => {
-  console.log(e);
   sourceList.value.pagination.productClassifyId = e.id;
   getList({ productClassifyId: e.id });
 };
@@ -308,10 +497,17 @@ const openModal = () => {
   modalType.value = "add";
   formData.data = {
     definition: "1",
-    type: "1",
+    outerPackMethod: [],
+    innerPackMethod: [],
     fileList: [],
+    fileListCopy: [],
+    currency: "",
+    costCurrency: "",
   };
-
+  if (accountCurrency.value && accountCurrency.value.length > 0) {
+    formData.data.currency = accountCurrency.value[0].value;
+    formData.data.costCurrency = accountCurrency.value[0].value;
+  }
   fileList.value = [];
   fileListCopy.value = [];
 };
@@ -319,28 +515,43 @@ const openModal = () => {
 const openExcel = () => {
   openExcelDialog.value = true;
 };
-const submitExcel = () => {
-  openExcelDialog.value = false;
-};
-const TreetenantId = ref("");
-const selection = ref({
-  data: [],
-});
-const select = (_selection, row) => {
-  selection.value.data = _selection;
-  console.log(_selection.length);
-};
 
-const tree = ref(null);
+const needAtt = [
+  "productClassifyId",
+  "name",
+  "spec",
+  "remark",
+  "fileList",
+  "id",
+  "unit",
+  "definition",
+];
 const submitForm = () => {
-  console.log(byform.value);
   byform.value.handleSubmit((valid) => {
+    // if (!fileListCopy.value.length > 0) {
+    //   return ElMessage({
+    //     message: "请上传产品图片",
+    //     type: "info",
+    //   });
+    // }
+    let jsonObj = {};
     formData.data.fileList = fileListCopy.value.map((x) => ({
       id: x.id,
       fileName: x.fileName,
     }));
+    for (const key in formData.data) {
+      if (needAtt.includes(key)) {
+      } else {
+        jsonObj[key] = formData.data[key];
+        delete formData.data[key];
+      }
+    }
+    jsonObj.innerPackMethod = jsonObj.innerPackMethod.join(",");
+    jsonObj.outerPackMethod = jsonObj.outerPackMethod.join(",");
+    jsonObj.type = "1"; //1为公司产品库
+    formData.data.ehsdJson = JSON.stringify(jsonObj);
     submitLoading.value = true;
-    proxy.post("/productInfo/" + modalType.value, formData.data).then(
+    proxy.post(`/productInfo/${modalType.value}ByEhsd`, formData.data).then(
       (res) => {
         ElMessage({
           message: modalType.value == "add" ? "添加成功" : "编辑成功",
@@ -351,34 +562,84 @@ const submitForm = () => {
         getList();
       },
       (err) => {
+        for (const key in jsonObj) {
+          formData.data[key] = jsonObj[key];
+        }
+        formData.data.innerPackMethod =
+          formData.data.innerPackMethod.split(",");
+        formData.data.outerPackMethod =
+          formData.data.outerPackMethod.split(",");
         submitLoading.value = false;
       }
     );
   });
 };
-
 const getTreeList = () => {
   proxy
     .post("/productClassify/tree", { parentId: "", name: "", definition: "1" })
     .then((message) => {
       treeListData.value = message;
-      formConfig.value[0].data = message;
     });
 };
-
 const getDtl = (row) => {
   modalType.value = "edit";
-  proxy.post("/productInfo/detail", { id: row.id }).then((res) => {
-    fileList.value = row.fileList.map((x) => ({ ...x, url: x.fileUrl }));
-    fileListCopy.value = [...fileList.value];
-    res.type = res.type + ""; //type回显
+  proxy.post("/productInfo/detailByEhsd", { id: row.id }).then((res) => {
     res.definition = "1"; //产品
+    let jsonObj = JSON.parse(res.ehsdJson);
+    res = {
+      ...res,
+      currency: jsonObj.currency
+        ? jsonObj.currency
+        : accountCurrency.value[0].value,
+      costCurrency: jsonObj.costCurrency
+        ? jsonObj.costCurrency
+        : accountCurrency.value[0].value,
+      ...jsonObj,
+    };
+    if (res.innerPackMethod) {
+      res.innerPackMethod = res.innerPackMethod.split(",");
+    } else {
+      res.innerPackMethod = [];
+    }
+    if (res.outerPackMethod) {
+      res.outerPackMethod = res.outerPackMethod.split(",");
+    } else {
+      res.outerPackMethod = [];
+    }
     formData.data = res;
     dialogVisible.value = true;
+    proxy
+      .post("/fileInfo/getList", { businessIdList: [row.id] })
+      .then((fileObj) => {
+        if (fileObj[row.id]) {
+          fileList.value = fileObj[row.id].map((x) => ({
+            ...x,
+            url: x.fileUrl,
+          }));
+          fileListCopy.value = fileObj[row.id].map((x) => ({
+            ...x,
+            url: x.fileUrl,
+          }));
+        } else {
+          fileList.value = [];
+          fileListCopy.value = [];
+        }
+      });
   });
 };
-getTreeList();
-getList();
+const isdisabled = ["price", "costPrice", "remark", "netWeight"];
+// watch(modalType, (val) => {
+//   if (val) {
+//     for (let i = 0; i < formConfig.value.length; i++) {
+//       const element = formConfig.value[i];
+//       if (element.type != "title" || element.type != "slot") {
+//         if (!isdisabled.includes(element.prop)) {
+//           element.disabled = val == "edit" ? true : false;
+//         }
+//       }
+//     }
+//   }
+// });
 const handleBeforeUpload = async (file) => {
   const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
   uploadData.value = res.uploadBody;
@@ -390,51 +651,124 @@ const handleBeforeUpload = async (file) => {
     uid: file.uid,
   });
 };
-
-const handleSuccess = (res, file, files) => {
-  // 查当前file的index值去赋值对应的copy变量的值
-  // let uid = file.uid;
-  // const index = fileList.value.findIndex((x) => x.uid === uid);
-  // fileListCopy.value[index].uid = uid;
-};
-
 const handleRemove = (file) => {
   const index = fileListCopy.value.findIndex(
     (x) => x.uid === file.uid || x.id === file.id
   );
   fileListCopy.value.splice(index, 1);
 };
-
 const handleClickFile = (file) => {
   window.open(file.fileUrl, "_blank");
 };
-
-const handleSelect = (row) => {
-  proxy.$emit("handleSelect", toRaw(row));
+const handleProgress = () => {
+  excelLoading.value = true;
 };
-
-const productUnit = ref([]);
-const getDict = () => {
-  proxy.getDictOne(["unit"]).then((res) => {
-    productUnit.value = res["unit"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
+const handleError = (err) => {
+  ElMessage({
+    message: `${err},请重试!`,
+    type: "info",
   });
+  openExcelDialog.value = false;
+  excelLoading.value = false;
+};
+const handleSuccess = (res) => {
+  if (res.code != 200) {
+    return ElMessage({
+      message: `${res.msg},请重试!`,
+      type: "info",
+    });
+  } else {
+    ElMessage({
+      message: "导入成功!",
+      type: "success",
+    });
+    openExcelDialog.value = false;
+    excelLoading.value = false;
+    getList();
+  }
+};
+const getDict = () => {
+  proxy
+    .getDictOne([
+      "inner_packaging_method_ehsd",
+      "outside_packaging_method_ehsd",
+      "unit",
+      "account_currency",
+    ])
+    .then((res) => {
+      innerMethon.value = res["inner_packaging_method_ehsd"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      outsideMethon.value = res["outside_packaging_method_ehsd"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      productUnit.value = res["unit"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      accountCurrency.value = res["account_currency"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+    });
 };
 getDict();
+getTreeList();
+getList();
+const clickSelect = (item) => {
+  item.selectType = "1";
+  goodList.value.push({
+    ...item,
+    productName: item.name,
+  });
+  proxy.$emit("selectProduct", item);
+};
+
+const handleKeypress = (event) => {
+  // 判断输入字符是否为中文字符
+  if (event.key.match(/[\u4e00-\u9fa5]/)) {
+    // 阻止输入
+    event.preventDefault();
+  }
+};
+const handleKeyup = (val) => {
+  // 过滤掉中文字符
+  formData.data.nameEnglish = formData.data.nameEnglish.replace(
+    /[\u4e00-\u9fa5]/g,
+    ""
+  );
+};
+
+const handlePreview = (file) => {
+  if (file && file.fileUrl) {
+    window.open(file.fileUrl, "_black");
+  }
+};
+const productContractDialog = ref(false);
+const currentProductId = ref("");
+const handleOpenProductContract = (row) => {
+  currentProductId.value = row.id;
+  productContractDialog.value = true;
+};
 </script>
-  
+
 <style lang="scss" scoped>
 .user {
-  padding: 20px;
+  // padding: 20px;
   display: flex;
   justify-content: space-between;
   .tree {
     width: 300px;
   }
   .content {
-    width: calc(100% - 320px);
+    width: calc(100% - 310px);
+  }
+  .right {
+    padding-left: 10px;
+    width: 170px;
+    border-left: 1px solid #eee;
   }
 }
 .pic {
@@ -444,4 +778,4 @@ getDict();
   cursor: pointer;
   vertical-align: middle;
 }
-</style>
+</style>

+ 11 - 6
src/components/product/treeList.vue

@@ -6,7 +6,7 @@
     <div class="search">
       <el-input v-model="search" placeholder="请输入搜索内容" clearable @clear="search = ''" @keyup.enter="searchChange"></el-input>
       <!-- <el-button type="primary" @click="searchChange">搜索</el-button> -->
-      <el-button type="primary" plain @click="add({ id: 0 })">
+      <el-button type="primary" plain @click="add({ id: 0 })" v-if="!hiddenBtn">
         <el-icon :size="20">
           <Plus />
         </el-icon>
@@ -43,7 +43,7 @@
               </div>
               <template #reference>
                 <span class="iconfont icon_more iconColor" style="padding-bottom: 5px; margin-left: auto;margin-right:8px"
-                      v-if="node.label != '全部'">...</span>
+                      v-if="node.label != '全部' && !hiddenBtn">...</span>
               </template>
             </el-popover>
           </div>
@@ -77,6 +77,10 @@ const props = defineProps({
     type: String,
     default: "1", //默认产品
   },
+  hiddenBtn: {
+    type: Boolean,
+    default: false,
+  },
   data: {
     type: Array,
     default: [],
@@ -256,13 +260,14 @@ const getShowIcon = (data) => {
   display: block;
   height: 100%;
   background: #fff;
-  padding: 20px;
-  height: calc(100vh - 140px);
+  padding: 10px 15px 15px;
+  height: calc(100vh - 122px);
 
   .search {
+    display: flex;
     margin-bottom: 20px;
     .el-input {
-      width: calc(100% - 70px);
+      // width: calc(100% - 70px);
       margin-right: 10px;
       text-align: center;
     }
@@ -272,7 +277,7 @@ const getShowIcon = (data) => {
   // }
   .box {
     padding-right: 0px;
-    height: calc(100vh - 270px);
+    height: calc(100vh - 245px);
     overflow-y: auto;
     overflow-x: auto;
     .el-tree {

+ 1 - 1
src/utils/util.js

@@ -12,7 +12,7 @@ import {
   ElMessageBox
 } from 'element-plus'
 
-//根据value值回显字典label值
+//根据dictKey值回显字典label值
 export function dictKeyValue(value, arr) {
   if ((value || value == 0) && arr) {
     value = value + "";

+ 1 - 1
src/views/EHSD/addressBook/freightForwarding/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row :action-list="[
           {

+ 1 - 1
src/views/EHSD/procurement/InspectionGoodsEHSD/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
              highlight-current-row @get-list="getList">
       <template #amount="{ item }">

+ 2 - 2
src/views/EHSD/procurement/handoverSlipEHSD/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row :table-events="{
           select: selectRow,
@@ -219,7 +219,7 @@ const clickPurchase = (row) => {
       flowKey: "ehsd_purchase_flow",
       flowName: "销售合同采购审批",
       random: proxy.random(),
-      tenantType: "EHSD",
+
       ids: ids,
       type: 1,
       submitType: "10",

+ 2 - 2
src/views/EHSD/procurement/handoverSlipSampleEHSD/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row :table-events="{
           select: selectRow,
@@ -231,7 +231,7 @@ const clickPurchase = (row) => {
       flowKey: "ehsd_purchase_flow",
       flowName: "样品单采购申请",
       random: proxy.random(),
-      tenantType: "EHSD",
+
       ids: ids,
       type: 2,
       submitType: "10",

+ 1 - 1
src/views/EHSD/procurement/profitBudgetEHSD/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <byTable :hideTable="true" :hidePagination="true" :source="sourceList.data" :pagination="sourceList.pagination" :config="config"
              :statConfig="statConfig" :selectConfig="selectConfig" highlight-current-row :onMoreSearch="true" @moreSearch="clickMoreSearch"
              :action-list="[

+ 1 - 1
src/views/EHSD/procurement/profitSettlementEHSD/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <byTable :hideTable="true" :hidePagination="true" :source="sourceList.data" :pagination="sourceList.pagination" :config="config"
              :selectConfig="selectConfig" highlight-current-row :onMoreSearch="true" @moreSearch="clickMoreSearch" @get-list="getList">
     </byTable>

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

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
              :row-class-name="getRowClass" highlight-current-row @get-list="getList">
       <template #code="{ item }">

+ 35 - 12
src/views/EHSD/productLibrary/companyProduct/index.vue

@@ -6,8 +6,8 @@
       </treeList>
     </div>
     <div class="content">
-      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
-               :selectConfig="selectConfig" :action-list="[
+      <byTable :source="sourceList.data" :tableHeight="tableHeight" :pagination="sourceList.pagination" :config="config" :loading="loading"
+               highlight-current-row :selectConfig="selectConfig" :action-list="[
                {
                 text: 'Excel导入',
                 action: () => openExcel(),
@@ -56,12 +56,17 @@
           </template>
           <template #productionFile>
             <div style="width: 100%">
-              <span style="color:#409eff;cursor:pointer" @click="handleClickUpload">点击上传</span>
+              <span style="color:#409eff;cursor:pointer" @click="handleClickUpload('prodFilePath',true)"
+                    v-if="!formData.data.prodFilePath">点击上传</span>
+              <span style="color:#409eff;cursor:pointer" @click="handleClickUpload('prodFilePath',false)" v-else>点击查看</span>
+
             </div>
           </template>
           <template #productionFileOne>
             <div style="width: 100%">
-              <span style="color:#409eff;cursor:pointer" @click="handleClickUpload">点击上传</span>
+              <span style="color:#409eff;cursor:pointer" @click="handleClickUpload('prodImgPath',true)" v-if="!formData.data.prodImgPath">点击上传</span>
+              <span style="color:#409eff;cursor:pointer" @click="handleClickUpload('prodImgPath',false)" v-else>点击查看</span>
+
             </div>
           </template>
           <template #size>
@@ -133,7 +138,7 @@
       </template>
     </el-dialog>
 
-    <el-dialog :title="'物料选择'" v-model="openSelectMaterial" width="80%" destroy-on-close>
+    <el-dialog :title="'物料选择'" v-model="openSelectMaterial" width="90%" destroy-on-close>
       <SelectMaterial :isNeRawMaterial="'1'" @selectMaterial="selectMaterial"></SelectMaterial>
       <template #footer>
         <el-button @click="bomDialog = false" size="defualt" v-debounce>取 消</el-button>
@@ -161,6 +166,7 @@ import byForm from "@/components/byForm/index";
 import treeList from "@/components/product/treeList";
 import SelectMaterial from "@/components/product/SelectMaterial.vue";
 import { getToken } from "@/utils/auth";
+import { async } from "@antv/x6/lib/registry/marker/async";
 const { proxy } = getCurrentInstance();
 const actionUrl = import.meta.env.VITE_APP_BASE_API;
 const loading = ref(false);
@@ -171,6 +177,14 @@ const currencyData = computed(
   () => proxy.useUserStore().allDict["account_currency"]
 );
 const headers = ref({ Authorization: "Bearer " + getToken() });
+const tableHeight = ref(0);
+const getTableHeight = () => {
+  tableHeight.value = window.innerHeight - 245;
+};
+getTableHeight();
+window.addEventListener("resize", () => {
+  getTableHeight();
+});
 const sourceList = ref({
   data: [],
   pagination: {
@@ -757,12 +771,21 @@ const clickSelect = (item) => {
   proxy.$emit("selectProduct", item);
 };
 
-const handleClickUpload = () => {
-  proxy.post("/fileService/createTempFolder").then((res) => {
-    console.log(res, "asd");
-  });
+const handleClickUpload = async (att, flag) => {
+  let res = null;
+  let path = "";
+  if (flag) {
+    proxy.msgTip("请稍后", 2);
+    res = await proxy.post("/fileService/createTempFolder");
+    if (res && res.path) {
+      formData.data[att] = res.path;
+      path = res.path;
+    }
+  } else {
+    path = formData.data[att];
+  }
   let a = document.createElement("a");
-  a.href = "printer://" + "ftp://192.168.1.13/123/";
+  a.href = "printer://" + "ftp://192.168.1.13/" + path + "/";
   a.style.display = "none";
   document.body.appendChild(a);
   a.click();
@@ -775,14 +798,14 @@ getList();
 
 <style lang="scss" scoped>
 .box {
-  padding: 20px;
+  padding: 10px;
   display: flex;
   justify-content: space-between;
   .tree {
     width: 300px;
   }
   .content {
-    width: calc(100% - 320px);
+    width: calc(100% - 310px);
   }
 }
 .pic {

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

@@ -826,14 +826,14 @@ const handleOpenProductContract = (row) => {
 
 <style lang="scss" scoped>
 .user {
-  padding: 20px;
+  padding: 10px;
   display: flex;
   justify-content: space-between;
   .tree {
     width: 300px;
   }
   .content {
-    width: calc(100% - 320px);
+    width: calc(100% - 310px);
   }
 }
 .pic {

+ 55 - 56
src/views/EHSD/saleContract/contractEHSD/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
                :statConfig="statConfig" :onMoreSearch="true" @moreSearch="clickMoreSearch" highlight-current-row :action-list="[
@@ -286,49 +286,49 @@ const selectConfig = computed(() => {
 });
 const headerData = ref({});
 const statConfig = computed(() => [
-  {
-    label: "统计",
-    data: [
-      //一个卡牌多数据配置
-      {
-        label: "订单统计(CNY)",
-        type: 2,
-        data: [
-          {
-            label: "订单数",
-            num: headerData.value.count,
-            color: "#C280FF",
-          },
-          {
-            label: "客户数",
-            num: headerData.value.customerCount,
-            color: "#C280FF",
-          },
-          {
-            label: "订单金额",
-            num: proxy.moneyFormat(headerData.value.sumAmount, 2),
-            color: "#C280FF",
-          },
-        ],
-      },
-      {
-        label: "款项统计(CNY)",
-        type: 3,
-        data: [
-          {
-            label: "已收款",
-            num: proxy.moneyFormat(headerData.value.sumClaimMoney, 2),
-            color: "#FF9315",
-          },
-          {
-            label: "待收款",
-            num: proxy.moneyFormat(headerData.value.sumClaimMoneyOne, 2),
-            color: "#FF9315",
-          },
-        ],
-      },
-    ],
-  },
+  // {
+  //   label: "统计",
+  //   data: [
+  //     //一个卡牌多数据配置
+  //     {
+  //       label: "订单统计(CNY)",
+  //       type: 2,
+  //       data: [
+  //         {
+  //           label: "订单数",
+  //           num: headerData.value.count,
+  //           color: "#C280FF",
+  //         },
+  //         {
+  //           label: "客户数",
+  //           num: headerData.value.customerCount,
+  //           color: "#C280FF",
+  //         },
+  //         {
+  //           label: "订单金额",
+  //           num: proxy.moneyFormat(headerData.value.sumAmount, 2),
+  //           color: "#C280FF",
+  //         },
+  //       ],
+  //     },
+  //     {
+  //       label: "款项统计(CNY)",
+  //       type: 3,
+  //       data: [
+  //         {
+  //           label: "已收款",
+  //           num: proxy.moneyFormat(headerData.value.sumClaimMoney, 2),
+  //           color: "#FF9315",
+  //         },
+  //         {
+  //           label: "待收款",
+  //           num: proxy.moneyFormat(headerData.value.sumClaimMoneyOne, 2),
+  //           color: "#FF9315",
+  //         },
+  //       ],
+  //     },
+  //   ],
+  // },
 ]);
 const config = computed(() => {
   return [
@@ -467,17 +467,17 @@ const config = computed(() => {
       },
       renderHTML(row) {
         return [
-          {
-            attrs: {
-              label: "交接单",
-              type: "primary",
-              text: true,
-            },
-            el: "button",
-            click() {
-              clickHandoverSlip(row);
-            },
-          },
+          // {
+          //   attrs: {
+          //     label: "交接单",
+          //     type: "primary",
+          //     text: true,
+          //   },
+          //   el: "button",
+          //   click() {
+          //     clickHandoverSlip(row);
+          //   },
+          // },
           row.status == 30
             ? {
                 attrs: {
@@ -682,7 +682,6 @@ const newContract = () => {
       flowKey: "contract_flow",
       flowName: "销售合同审批流程",
       random: proxy.random(),
-      tenantType: "EHSD",
     },
   });
 };

+ 2 - 2
src/views/EHSD/saleContract/exportTracking/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <byTable :tableHeight="tableHeight" :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading"
              :selectConfig="selectConfig" highlight-current-row :action-list="[]" @get-list="getList">
       <template #code="{ item }">
@@ -351,7 +351,7 @@ import useUserStore from "@/store/modules/user";
 const userInfo = useUserStore();
 const tableHeight = ref(0);
 const getTableHeight = () => {
-  tableHeight.value = window.innerHeight - 270;
+  tableHeight.value = window.innerHeight - 245;
 };
 getTableHeight();
 window.addEventListener("resize", () => {

+ 3 - 6
src/views/EHSD/saleContract/priceSheetEHSD/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
                highlight-current-row :action-list="[
@@ -568,7 +568,6 @@ const newPriceSheet = () => {
       flowKey: "sale_quotation_flow",
       flowName: "报价审批流程",
       random: proxy.random(),
-      tenantType: "EHSD",
     },
   });
 };
@@ -576,11 +575,10 @@ const clickCode = (row) => {
   proxy.$router.push({
     path: "/platform_manage/process/processApproval",
     query: {
-      priceSheetId: row.id,
+      businessId: row.id,
       flowKey: "sale_quotation_flow",
       flowName: "报价单详情",
       random: proxy.random(),
-      tenantType: "EHSD",
       processType: 20,
     },
   });
@@ -591,9 +589,8 @@ const clickCopy = (item) => {
     query: {
       flowKey: "sale_quotation_flow",
       flowName: "报价审批流程",
-      priceSheetId: item.id,
+      businessId: item.id,
       random: proxy.random(),
-      tenantType: "EHSD",
     },
   });
 };

+ 1 - 2
src/views/EHSD/saleContract/sampleEHSD/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
              highlight-current-row :action-list="[
         {
@@ -537,7 +537,6 @@ const newSample = () => {
       flowKey: "sample_flow",
       flowName: "样品单审批流程",
       random: proxy.random(),
-      tenantType: "EHSD",
     },
   });
 };

文件差异内容过多而无法显示
+ 1 - 1201
src/views/JST/shopManage/index.vue


+ 1 - 1
src/views/connect/E-mail/businessConfig/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <!-- <Banner /> -->
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row

+ 1 - 1
src/views/connect/E-mail/personalConfig/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <!-- <Banner /> -->
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row

+ 1 - 1
src/views/connect/E-mail/signature/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
                :selectConfig="selectConfig" :action-list="[

+ 3 - 3
src/views/customer/file/index.vue

@@ -1,11 +1,11 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <!-- <div style="padding: 20px; background: #fff; margin-bottom: 20px">
       <el-button type="primary" style="margin-left: 10px" @click="openModal()">添加客户</el-button>
     </div> -->
 
-    <div style="display:flex;height:calc(100vh - 140px);">
-      <div style="width:240px;height:100%;overflow:auto;background:#fff;padding:10px">
+    <div style="display:flex;height:calc(100vh - 120px);">
+      <div style="width:240px;height:100%;overflow:auto;background:#fff;padding:15px">
         <div style="margin-bottom:10px">
           <el-button type="primary" style="width:100%" @click="handleSearch()">全部客户</el-button>
         </div>

+ 3 - 3
src/views/customer/highseas/index.vue

@@ -1,11 +1,11 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <!-- <div style="padding: 20px; background: #fff; margin-bottom: 20px">
       <el-button type="primary" style="margin-left: 10px" @click="openModal()">添加客户</el-button>
     </div> -->
 
-    <div style="display:flex;height:calc(100vh - 140px);">
-      <div style="width:240px;height:100%;overflow:auto;background:#fff;padding:10px">
+    <div style="display:flex;height:calc(100vh - 120px);">
+      <div style="width:240px;height:100%;overflow:auto;background:#fff;padding:15px">
         <div style="margin-bottom:10px">
           <el-button type="primary" style="width:100%" @click="handleSearch()">全部客户</el-button>
         </div>

+ 3 - 3
src/views/customer/privatesea/index.vue

@@ -1,11 +1,11 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <!-- <div style="padding: 20px; background: #fff; margin-bottom: 20px">
       <el-button type="primary" style="margin-left: 10px" @click="openModal()">添加客户</el-button>
     </div> -->
 
-    <div style="display:flex;height:calc(100vh - 140px);">
-      <div style="width:240px;height:100%;overflow:auto;background:#fff;padding:10px">
+    <div style="display:flex;height:calc(100vh - 120px);">
+      <div style="width:240px;height:100%;overflow:auto;background:#fff;padding:15px">
         <div style="margin-bottom:10px">
           <el-button type="primary" style="width:100%" @click="handleSearch()">全部客户</el-button>
         </div>

+ 12 - 42
src/views/dataBoard/board/employeeAnalysis/index.vue

@@ -1,54 +1,24 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <div class="query bck" style="padding-bottom: 0px">
       <el-form :inline="true" :model="queryForm">
         <el-form-item label="查看用户">
-          <el-select
-            v-model="selectUser"
-            multiple
-            placeholder="请选择用户"
-            @change="changeUser"
-          >
-            <el-option
-              v-for="item in userList"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
-              :disabled="item.value !== 'all' && selectUser.includes('all')"
-            />
+          <el-select v-model="selectUser" multiple placeholder="请选择用户" @change="changeUser">
+            <el-option v-for="item in userList" :key="item.value" :label="item.label" :value="item.value"
+                       :disabled="item.value !== 'all' && selectUser.includes('all')" />
           </el-select>
         </el-form-item>
         <el-form-item label="日期">
-          <el-date-picker
-            v-model="queryForm.timeArr"
-            type="daterange"
-            unlink-panels
-            range-separator="-"
-            start-placeholder="开始日期"
-            end-placeholder="结束日期"
-            value-format="YYYY-MM-DD"
-            @change="onQuery"
-          />
+          <el-date-picker v-model="queryForm.timeArr" type="daterange" unlink-panels range-separator="-" start-placeholder="开始日期"
+                          end-placeholder="结束日期" value-format="YYYY-MM-DD" @change="onQuery" />
         </el-form-item>
         <el-form-item>
-          <el-button @click="clickBtn(1)" :class="{ btnBck: selectBtn === 1 }"
-            >近30天</el-button
-          >
-          <el-button @click="clickBtn(2)" :class="{ btnBck: selectBtn === 2 }"
-            >本月</el-button
-          >
-          <el-button @click="clickBtn(3)" :class="{ btnBck: selectBtn === 3 }"
-            >上月</el-button
-          >
-          <el-button @click="clickBtn(4)" :class="{ btnBck: selectBtn === 4 }"
-            >近一年</el-button
-          >
-          <el-button @click="clickBtn(5)" :class="{ btnBck: selectBtn === 5 }"
-            >去年</el-button
-          >
-          <el-button @click="clickBtn(6)" :class="{ btnBck: selectBtn === 6 }"
-            >今年</el-button
-          >
+          <el-button @click="clickBtn(1)" :class="{ btnBck: selectBtn === 1 }">近30天</el-button>
+          <el-button @click="clickBtn(2)" :class="{ btnBck: selectBtn === 2 }">本月</el-button>
+          <el-button @click="clickBtn(3)" :class="{ btnBck: selectBtn === 3 }">上月</el-button>
+          <el-button @click="clickBtn(4)" :class="{ btnBck: selectBtn === 4 }">近一年</el-button>
+          <el-button @click="clickBtn(5)" :class="{ btnBck: selectBtn === 5 }">去年</el-button>
+          <el-button @click="clickBtn(6)" :class="{ btnBck: selectBtn === 6 }">今年</el-button>
         </el-form-item>
       </el-form>
     </div>

+ 1 - 1
src/views/finance/fundManage/account/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row :action-list="[
           {

+ 2 - 2
src/views/finance/fundManage/accountPayment/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="user">
+  <div class="pageIndexClass">
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
                :selectConfig="selectConfig" :table-events="{
@@ -986,7 +986,7 @@ const printObj = ref({
 
 <style lang="scss" scoped>
 .user {
-  padding: 20px;
+  padding: 10px;
 }
 ::v-deep(.el-input-number .el-input__inner) {
   text-align: left;

+ 1 - 1
src/views/finance/fundManage/accountStatement/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <div style="background: #fff; padding: 15px 15px 0 15px">
       <el-form :inline="true" class="demo-form-inline">
         <el-form-item label="">

+ 1 - 1
src/views/finance/fundManage/comeAndGo/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
              highlight-current-row :action-list="[
         {

+ 1 - 1
src/views/finance/fundManage/depExpenses/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <!-- <Banner /> -->
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row

+ 1 - 1
src/views/finance/fundManage/flow/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <div style="background: #fff; padding: 15px 15px 0 15px">
       <el-form :inline="true" class="demo-form-inline">
         <el-form-item label="">

+ 1 - 1
src/views/finance/fundManage/funds/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
                :selectConfig="selectConfig" :action-list="[

+ 1 - 1
src/views/finance/fundManage/offsetRecord/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
              highlight-current-row @get-list="getList">
       <template #amount="{ item }">

+ 26 - 30
src/views/finance/fundManage/statistics/index.vue

@@ -1,35 +1,20 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <el-form :inline="true" :model="sourceList.pagination" class="demo-form-inline">
       <el-form-item label="起止时间:">
         <el-col :span="11">
-          <el-date-picker
-            type="month"
-            placeholder="选择开始月份"
-            v-model="sourceList.pagination.beginTime"
-            value-format="YYYY-MM-01"
-            style="width: 100%"
-            @change="getList"></el-date-picker>
+          <el-date-picker type="month" placeholder="选择开始月份" v-model="sourceList.pagination.beginTime" value-format="YYYY-MM-01" style="width: 100%"
+                          @change="getList"></el-date-picker>
         </el-col>
         <el-col class="line" :span="2" style="text-align: center">至</el-col>
         <el-col :span="11">
-          <el-date-picker
-            type="month"
-            placeholder="选择结束月份"
-            v-model="sourceList.pagination.endTime"
-            value-format="YYYY-MM-31"
-            style="width: 100%"
-            @change="getList"></el-date-picker>
+          <el-date-picker type="month" placeholder="选择结束月份" v-model="sourceList.pagination.endTime" value-format="YYYY-MM-31" style="width: 100%"
+                          @change="getList"></el-date-picker>
         </el-col>
       </el-form-item>
       <el-form-item label="部门:" prop="deptId">
-        <el-tree-select
-          v-model="sourceList.pagination.deptId"
-          :data="deptList"
-          :render-after-expand="false"
-          check-strictly
-          :node-key="'deptId'"
-          :props="defaultProps" />
+        <el-tree-select v-model="sourceList.pagination.deptId" :data="deptList" :render-after-expand="false" check-strictly :node-key="'deptId'"
+                        :props="defaultProps" />
       </el-form-item>
       <el-form-item>
         <el-button type="primary" @click="getList">搜索</el-button>
@@ -95,7 +80,10 @@ const getMonthBetween = (start, end) => {
   var curr = min;
   while (curr <= max) {
     var month = curr.getMonth();
-    var str = (month == 0 ? curr.getFullYear() - 1 : curr.getFullYear()) + "-" + (month == 0 ? 12 : month < 10 ? "0" + month : month);
+    var str =
+      (month == 0 ? curr.getFullYear() - 1 : curr.getFullYear()) +
+      "-" +
+      (month == 0 ? 12 : month < 10 ? "0" + month : month);
     var s = curr.getFullYear() + "-12";
     if (str == s) {
       str = curr.getFullYear() + "-12";
@@ -123,14 +111,22 @@ const getList = async () => {
   if (!sourceList.value.pagination.endTime) {
     return ElMessage("请选择结束月份");
   }
-  monthList.value = getMonthBetween(sourceList.value.pagination.beginTime.substring(0, 7), sourceList.value.pagination.endTime.substring(0, 7));
+  monthList.value = getMonthBetween(
+    sourceList.value.pagination.beginTime.substring(0, 7),
+    sourceList.value.pagination.endTime.substring(0, 7)
+  );
   loading.value = true;
-  proxy.post("/accountDeptRunningWater/DeptRunningWaterReport", sourceList.value.pagination).then((res) => {
-    sourceList.value.data = res;
-    setTimeout(() => {
-      loading.value = false;
-    }, 200);
-  });
+  proxy
+    .post(
+      "/accountDeptRunningWater/DeptRunningWaterReport",
+      sourceList.value.pagination
+    )
+    .then((res) => {
+      sourceList.value.data = res;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+    });
 };
 getDict();
 getList();

+ 1 - 1
src/views/iot/base/equipment/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <!-- <Banner /> -->
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row

+ 1 - 1
src/views/iot/base/loT/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <!-- <Banner /> -->
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row

+ 1 - 1
src/views/iot/base/product/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <!-- <Banner /> -->
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row

+ 1 - 1
src/views/iot/base/trade/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <!-- <Banner /> -->
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row

+ 2 - 2
src/views/login.vue

@@ -7,7 +7,7 @@
         <div class="left-logo">
           <img src="../assets/images/logosanfan.png" alt="" />
         </div>
-        <div class="swiper-text">
+        <!-- <div class="swiper-text">
           <el-carousel height="100px" direction="vertical" indicator-position="none" :autoplay="true">
             <el-carousel-item>
               <h3>{{ $t("login.li1H3") }}</h3>
@@ -22,7 +22,7 @@
               <p>{{ $t("login.li3P") }}</p>
             </el-carousel-item>
           </el-carousel>
-        </div>
+        </div> -->
       </div>
       <div class="right-bg">
         <el-form ref="loginRef" :model="loginForm" :rules="loginRules" class="login-form">

+ 2 - 2
src/views/oa/companyDisk/webDiskData/index.vue

@@ -289,14 +289,14 @@ const getSize = (item) => {
 
 <style lang="scss" scoped>
 .user {
-  padding: 20px;
+  padding: 10px;
   display: flex;
   justify-content: space-between;
   .tree {
     width: 300px;
   }
   .content {
-    width: calc(100% - 320px);
+    width: calc(100% - 310px);
   }
 }
 .pic {

+ 1 - 1
src/views/oa/mailList/interior/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <!-- <Banner /> -->
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row

+ 1 - 1
src/views/oa/mailList/outside/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <!-- <Banner /> -->
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row

+ 1 - 1
src/views/oa/work/task/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
                highlight-current-row :action-list="[

+ 1 - 1
src/views/process/dealWith/backlog.vue

@@ -1,7 +1,7 @@
 
 <!-- 2无缓存,只展示代办数据 -->
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <!-- <Banner /> -->
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row

+ 4 - 13
src/views/process/dealWith/index.vue

@@ -1,20 +1,11 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <!-- <Banner /> -->
     <div class="content">
-      <byTable
-        :source="sourceList.data"
-        :pagination="sourceList.pagination"
-        :config="config"
-        :loading="loading"
-        highlight-current-row
-        :selectConfig="selectConfig"
-        :table-events="{
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
+               :selectConfig="selectConfig" :table-events="{
           //element talbe事件都能传
-        }"
-        @get-list="getList"
-        ref="table"
-      >
+        }" @get-list="getList" ref="table">
         <template #slotName="{ item }">
           {{ item.createTime }}
         </template>

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

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <!-- <Banner /> -->
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row

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

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <!-- <Banner /> -->
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row

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

@@ -8,7 +8,8 @@
         <div class="line"></div>
         <!-- 报价单 -->
         <template v-if="flowForm.flowKey == 'sale_quotation_flow'">
-          <PriceSheetEHSD ref="makeDom" :queryData="queryData.data"></PriceSheetEHSD>
+          <!-- <PriceSheetEHSD ref="makeDom" :queryData="queryData.data"></PriceSheetEHSD> -->
+          <PriceSheet ref="makeDom" :queryData="queryData.data"></PriceSheet>
         </template>
 
         <!-- 样品单 -->
@@ -217,6 +218,8 @@
 import useTagsViewStore from "@/store/modules/tagsView.js";
 import { useRouter, useRoute } from "vue-router";
 import Contract from "@/components/process/SF/Contract";
+import PriceSheet from "@/components/process/SF/PriceSheet";
+
 // 消息提示
 import { ElMessage, ElMessageBox } from "element-plus";
 //决策辅助
@@ -272,7 +275,6 @@ const btnLoading = ref(false);
 // 意见表单
 const flowForm = reactive({
   flowKey: "",
-  tenantType: "",
   handleUserId: "",
   remark: "",
   data: {},
@@ -343,23 +345,6 @@ const handleSubmit = async (_type) => {
           if (flowForm.flowKey == "subscribe_flow") {
           } else if (flowForm.flowKey == "account_request_funds_flow") {
           } else if (flowForm.flowKey == "sale_quotation_flow") {
-            if (flowForm.tenantType === "EHSD") {
-              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,
-                  };
-                }
-              );
-            }
           } else if (flowForm.flowKey == "contract_flow") {
           } else if (flowForm.flowKey == "contract_update_flow") {
             data.dataJson = JSON.stringify(proxy.deepClone(data));
@@ -534,6 +519,7 @@ const skipPage = () => {
   let pageObj = {
     subscribe_flow: "Subscribe",
     contract_flow: "Contract",
+    sale_quotation_flow: "Quotation",
   };
   const useTagsStore = useTagsViewStore();
   useTagsStore.delVisitedView(router.currentRoute.value);
@@ -544,7 +530,7 @@ const skipPage = () => {
   } else {
     proxy.msgTip("操作成功");
     router.replace({
-      name: pageObj[router.query.flowKey],
+      name: pageObj[route.query.flowKey],
     });
   }
 };
@@ -674,7 +660,6 @@ onMounted(async () => {
       queryData.data = { ...route.query };
     }
     flowForm.flowKey = route.query.flowKey;
-    flowForm.tenantType = route.query.tenantType;
     flowForm.submitType = route.query.submitType;
     getRecords(route.query.id);
   }
@@ -723,7 +708,6 @@ watch(
         queryData.data = { ...props.query };
       }
       flowForm.flowKey = props.query.flowKey;
-      flowForm.tenantType = props.query.tenantType;
       flowForm.submitType = props.query.submitType;
       getRecords(props.query.id);
     }
@@ -747,11 +731,11 @@ const processApprovalDom = ref(null);
 const flowChartDom = ref(null);
 const getTableHeight = () => {
   if (route.query.currentContractId) {
-    processApprovalDom.value.style.height = window.innerHeight - 180 + "px";
+    processApprovalDom.value.style.height = window.innerHeight - 160 + "px";
     flowChartDom.value.style.height = window.innerHeight - 250 + "px";
   } else {
-    processApprovalDom.value.style.height = window.innerHeight - 130 + "px";
-    flowChartDom.value.style.height = window.innerHeight - 200 + "px";
+    processApprovalDom.value.style.height = window.innerHeight - 100 + "px";
+    flowChartDom.value.style.height = window.innerHeight - 210 + "px";
   }
 };
 nextTick(() => {
@@ -765,9 +749,8 @@ window.addEventListener("resize", () => {
 .processApproval {
   display: flex;
   justify-content: space-between;
-  margin-top: 20px;
-  padding: 0 20px;
-  height: calc(100vh - 130px);
+  padding: 10px;
+  // height: calc(100vh - 100px);
   .left-card {
     // background: #fff;
     border-radius: 4px;

+ 2 - 2
src/views/process/processConfig/index.vue

@@ -343,14 +343,14 @@ getList();
     
 <style lang="scss" scoped>
 .user {
-  padding: 20px;
+  padding: 10px;
   display: flex;
   justify-content: space-between;
   .tree {
     width: 300px;
   }
   .content {
-    width: calc(100% - 320px);
+    width: calc(100% - 310px);
   }
 }
 </style>

+ 12 - 4
src/views/product/material/index.vue

@@ -6,8 +6,8 @@
       </treeList>
     </div>
     <div class="content">
-      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
-               :selectConfig="selectConfig" :action-list="[
+      <byTable :source="sourceList.data" :tableHeight="tableHeight" :pagination="sourceList.pagination" :config="config" :loading="loading"
+               highlight-current-row :selectConfig="selectConfig" :action-list="[
               {
                 text: '添加物料',
                 action: () => openModal('add'),
@@ -107,6 +107,14 @@ const backLinesData = computed(
 const frontLinesData = computed(
   () => proxy.useUserStore().allDict["front_lines"]
 );
+const tableHeight = ref(0);
+const getTableHeight = () => {
+  tableHeight.value = window.innerHeight - 245;
+};
+getTableHeight();
+window.addEventListener("resize", () => {
+  getTableHeight();
+});
 const loading = ref(false);
 const submitLoading = ref(false);
 const sourceList = ref({
@@ -581,14 +589,14 @@ const clickSelect = (item) => {
 
 <style lang="scss" scoped>
 .user {
-  padding: 20px;
+  padding: 10px;
   display: flex;
   justify-content: space-between;
   .tree {
     width: 300px;
   }
   .content {
-    width: calc(100% - 320px);
+    width: calc(100% - 310px);
   }
 }
 .pic {

+ 3 - 3
src/views/product/product/index.vue

@@ -137,7 +137,7 @@ const config = computed(() => {
         prop: "type",
       },
       render(type) {
-        return proxy.dictDataEcho(type, productType.value);
+        return proxy.dictKeyValue(type, productType.value);
       },
     },
     {
@@ -638,14 +638,14 @@ const clickSearch = () => {
   
 <style lang="scss" scoped>
 .user {
-  padding: 20px;
+  padding: 10px;
   display: flex;
   justify-content: space-between;
   .tree {
     width: 300px;
   }
   .content {
-    width: calc(100% - 320px);
+    width: calc(100% - 310px);
   }
 }
 .pic {

+ 3 - 3
src/views/product/product/index2.vue

@@ -115,7 +115,7 @@ const config = computed(() => {
         prop: "type",
       },
       render(type) {
-        return proxy.dictDataEcho(type, productType.value);
+        return proxy.dictKeyValue(type, productType.value);
       },
     },
     {
@@ -505,14 +505,14 @@ getDict();
   
 <style lang="scss" scoped>
 .user {
-  padding: 20px;
+  padding: 10px;
   display: flex;
   justify-content: space-between;
   .tree {
     width: 300px;
   }
   .content {
-    width: calc(100% - 320px);
+    width: calc(100% - 310px);
   }
 }
 .pic {

+ 1 - 1
src/views/production/factory/farm/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <!-- <Banner /> -->
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row

+ 1 - 1
src/views/production/factory/line/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <!-- <Banner /> -->
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row

+ 1 - 1
src/views/production/project/bom/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <!-- <Banner /> -->
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row

+ 2 - 2
src/views/production/project/processConfig/index.vue

@@ -344,14 +344,14 @@ getList();
     
 <style lang="scss" scoped>
 .user {
-  padding: 20px;
+  padding: 10px;
   display: flex;
   justify-content: space-between;
   .tree {
     width: 300px;
   }
   .content {
-    width: calc(100% - 320px);
+    width: calc(100% - 310px);
   }
 }
 </style>

+ 1 - 1
src/views/production/project/processes/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <div>
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
                :selectConfig="selectConfig" :table-events="{

+ 1 - 1
src/views/production/project/technology/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <!-- <Banner /> -->
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row

+ 1 - 1
src/views/publicModule/KDconfig/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <!-- <Banner /> -->
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row

+ 1 - 1
src/views/publicModule/codingRule/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
                @get-list="getList">

+ 1 - 1
src/views/publicModule/companyConfig/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
              :selectConfig="selectConfig" :table-events="{
         select: select,

+ 1 - 1
src/views/publicModule/contractTemplate/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
                highlight-current-row :action-list="[

+ 1 - 1
src/views/publicModule/documentary/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
                highlight-current-row :action-list="[

+ 1 - 1
src/views/publicModule/salesman/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
                @get-list="getList">

+ 1 - 1
src/views/purchaseManage/purchaseManage/alreadyPurchase/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <!-- <Banner /> -->
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row

+ 1 - 1
src/views/purchaseManage/purchaseManage/arrival/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <!-- <Banner /> -->
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row

+ 1 - 1
src/views/purchaseManage/purchaseManage/handoverSlip/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
              :selectConfig="selectConfig" :row-class-name="getRowClass" :table-events="{
         select: selectRow,

+ 1 - 1
src/views/purchaseManage/purchaseManage/handoverSlipOne/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
              :selectConfig="selectConfig" :table-events="{
         select: selectRow,

+ 2 - 2
src/views/purchaseManage/purchaseManage/purchase/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <!-- <Banner /> -->
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
@@ -191,7 +191,7 @@ const config = computed(() => {
         prop: "productUnit",
       },
       render(unit) {
-        return proxy.dictDataEcho(unit, productUnit.value);
+        return proxy.dictKeyValue(unit, productUnit.value);
       },
     },
     {

+ 2 - 2
src/views/purchaseManage/purchaseManage/returnGoods/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <!-- <Banner /> -->
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
@@ -174,7 +174,7 @@ const config = computed(() => {
         width: 100,
       },
       render(unit) {
-        return proxy.dictDataEcho(unit, productUnit.value);
+        return proxy.dictKeyValue(unit, productUnit.value);
       },
     },
     {

+ 11 - 10
src/views/purchaseManage/purchaseManage/subscribe/index.vue

@@ -1,11 +1,10 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <!-- <Banner /> -->
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
                :selectConfig="selectConfig" :table-events="{
-          //element talbe事件都能传
-          select: select,
+    
         }" :action-list="[
           {
             text: '发起申购',
@@ -333,16 +332,18 @@ const formConfig = computed(() => {
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
-  proxy
-    .post("/subscribeDetail/page", sourceList.value.pagination)
-    .then((message) => {
-      console.log(message);
-      sourceList.value.data = message.rows;
-      sourceList.value.pagination.total = message.total;
+  proxy.post("/subscribeDetail/page", sourceList.value.pagination).then(
+    (res) => {
+      sourceList.value.data = res.rows;
+      sourceList.value.pagination.total = res.total;
       setTimeout(() => {
         loading.value = false;
       }, 200);
-    });
+    },
+    (err) => {
+      loading.value = false;
+    }
+  );
 };
 
 const openModal = () => {

+ 1 - 1
src/views/purchaseManage/purchasePayment/invoice/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
                highlight-current-row :action-list="[

+ 1 - 1
src/views/purchaseManage/purchasePayment/payment/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
              highlight-current-row :action-list="[
         {

+ 28 - 32
src/views/purchaseManage/purchasePayment/paymentBill/index.vue

@@ -1,24 +1,16 @@
 <template>
-  <div class="tenant">
-    <byTable
-      :source="sourceList.data"
-      :pagination="sourceList.pagination"
-      :config="config"
-      :loading="loading"
-      :selectConfig="selectConfig"
-      highlight-current-row
-      :table-events="{
+  <div class="pageIndexClass">
+    <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
+             highlight-current-row :table-events="{
         select: selectRow,
         // 'select-all': selectRow,
-      }"
-      :action-list="[
+      }" :action-list="[
         {
           text: '合并付款',
           disabled: selectData.length === 0,
           action: () => start(),
         },
-      ]"
-      @get-list="getList">
+      ]" @get-list="getList">
       <template #amount="{ item }">
         <div style="width: 100%">
           <span style="padding-right: 4px">{{ item.currency }}</span>
@@ -181,30 +173,34 @@ const config = computed(() => {
   ];
 });
 const getDict = () => {
-  proxy.post("/supplierInfo/page", { pageNum: 1, pageSize: 999 }).then((res) => {
-    if (res.rows && res.rows.length > 0) {
-      supplierList.value = res.rows.map((item) => {
-        return {
-          label: item.name,
-          value: item.id,
-        };
-      });
-    }
-  });
+  proxy
+    .post("/supplierInfo/page", { pageNum: 1, pageSize: 999 })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        supplierList.value = res.rows.map((item) => {
+          return {
+            label: item.name,
+            value: item.id,
+          };
+        });
+      }
+    });
 };
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
-  proxy.post("/purchase/paymentBill", sourceList.value.pagination).then((message) => {
-    message.rows.forEach((x) => {
-      x.isCheck = true;
+  proxy
+    .post("/purchase/paymentBill", sourceList.value.pagination)
+    .then((message) => {
+      message.rows.forEach((x) => {
+        x.isCheck = true;
+      });
+      sourceList.value.data = message.rows;
+      sourceList.value.pagination.total = message.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
     });
-    sourceList.value.data = message.rows;
-    sourceList.value.pagination.total = message.total;
-    setTimeout(() => {
-      loading.value = false;
-    }, 200);
-  });
 };
 getDict();
 getList();

+ 1 - 1
src/views/purchaseManage/purchasePayment/refund/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
                highlight-current-row :action-list="[

+ 80 - 108
src/views/purchaseManage/supplier/supplier/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
                :selectConfig="selectConfig" :table-events="{
@@ -20,70 +20,73 @@
     </div>
     <el-dialog :title="modalType == 'add' ? '添加供应商' : '编辑供应商'" v-model="dialogVisible" width="600" v-loading="loading" destroy-on-close>
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
-        <template #countryId>
-          <div>
-            <el-select v-model="formData.data.countryId" placeholder="国家" @change="(val) => getCityData(val, '20', true)">
-              <el-option v-for="item in countryData" :label="item.chineseName" :value="item.id">
-              </el-option>
-            </el-select>
-          </div>
-        </template>
 
-        <template #provinceId>
-          <div>
-            <selectCity placeholder="省/洲" @change="(val) => getCityData(val, '30', true)" addressId="provinceId" addressName="provinceName"
-                        v-model="formData.data" :data="provinceData">
-            </selectCity>
-          </div>
-        </template>
-
-        <template #cityId>
-          <div>
-            <selectCity placeholder="城市" addressId="cityId" addressName="cityName" v-model="formData.data" :data="cityData">
-            </selectCity>
+        <template #address>
+          <div style="width:100%">
+            <el-row style="width:100%">
+              <el-col :span="8">
+                <el-form-item label="" prop="countryId">
+                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => getCityData(val, '20', true)">
+                    <el-option v-for="item in countryData" :label="item.name" :value="item.id">
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="" prop="provinceName">
+                  <selectCity placeholder="省/洲" @change="(val) => getCityData(val, '30', true)" addressId="provinceId" addressName="provinceName"
+                              v-model="formData.data" :data="provinceData">
+                  </selectCity>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="" prop="cityName">
+                  <selectCity placeholder="城市" addressId="cityId" addressName="cityName" v-model="formData.data" :data="cityData">
+                  </selectCity>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-form-item label="" label-width="0px" prop="areaDetail" class="margin-b-0 wid100">
+              <el-input v-model="formData.data.areaDetail" type="textarea" placeholder="详细地址">
+              </el-input>
+            </el-form-item>
           </div>
         </template>
 
         <template #contact>
-          <el-row :gutter="10" style="width: 100%">
-            <el-col :span="8">
-              <el-form-item prop="contactPerson">
-                <el-input v-model="formData.data.contactPerson" placeholder="联系人">
-                </el-input>
-              </el-form-item>
-            </el-col>
-            <el-col :span="16">
-              <el-form-item prop="contactNumber">
-                <el-input v-model="formData.data.contactNumber" placeholder="联系电话" :formatter="(val) => val.replace(/[^\d\-]/g, '')"
-                          :parser="(val) => val.replace(/[^\d\-]/g, '')">
-                </el-input>
-              </el-form-item>
-            </el-col>
-          </el-row>
+          <el-form-item label="联系信息" required class="margin-b-0 wid100">
+            <el-row style="width: 100%">
+              <el-col :span="8">
+                <el-form-item label="" label-width="0px" prop="contactPerson" class="margin-b-0 wid100">
+                  <el-input v-model="formData.data.contactPerson" placeholder="联系人">
+                  </el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="16">
+                <el-form-item label="" label-width="0px" prop="contactNumber" class="margin-b-0 wid100">
+                  <el-input v-model="formData.data.contactNumber" placeholder="联系电话" :formatter="(val) => val.replace(/[^\d\-]/g, '')"
+                            :parser="(val) => val.replace(/[^\d\-]/g, '')">
+                  </el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form-item>
         </template>
         <template #paymentDays>
-          <el-row :gutter="10" style="width: 100%">
+          <el-row style="width: 100%">
             <el-col :span="8">
-              <el-form-item prop="accountPeriod">
+              <el-form-item label="" label-width="0px" prop="accountPeriod" class="margin-b-0 wid100">
                 <el-input-number v-model="formData.data.accountPeriod" placeholder="请输入账期 (天)" style="width: 100%" :precision="0" :controls="false"
                                  :min="0" />
               </el-form-item>
             </el-col>
             <el-col :span="16">
-              <el-form-item prop="accountPeriodRemark">
+              <el-form-item label="" label-width="0px" prop="accountPeriodRemark" class="margin-b-0 wid100">
                 <el-input v-model="formData.data.accountPeriodRemark" placeholder="请输入账期说明" />
               </el-form-item>
             </el-col>
           </el-row>
         </template>
-        <template #fileSlot>
-          <div style="width: 100%">
-            <el-upload v-model:fileList="fileList" action="https://winfaster.obs.cn-south-1.myhuaweicloud.com" :data="uploadData" multiple
-                       :before-upload="uploadFile" :on-preview="onPreviewFile">
-              <el-button>选择</el-button>
-            </el-upload>
-          </div>
-        </template>
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="default">取 消</el-button>
@@ -117,7 +120,6 @@ const sourceList = ref({
 });
 let dialogVisible = ref(false);
 let modalType = ref("add");
-const fileList = ref([]);
 const uploadData = ref({});
 let rules = ref({
   name: [{ required: true, message: "请输入供应商名称", trigger: "blur" }],
@@ -148,7 +150,7 @@ const config = computed(() => {
         width: 120,
       },
       render(type) {
-        return proxy.dictDataEcho(type, supplierType.value);
+        return proxy.dictKeyValue(type, supplierType.value);
       },
     },
     {
@@ -255,15 +257,16 @@ const byform = ref(null);
 const formConfig = computed(() => {
   return [
     {
+      type: "title1",
+      title: "基本信息",
+    },
+    {
       type: "select",
       prop: "type",
       label: "供应商类型",
       required: true,
       filterable: true,
-      data: supplierType.value.map((x) => ({
-        label: x.dictValue,
-        value: x.dictKey,
-      })),
+      data: supplierType.value,
     },
     {
       type: "input",
@@ -273,35 +276,14 @@ const formConfig = computed(() => {
     },
     {
       type: "slot",
-      slotName: "countryId",
-      prop: "countryId",
-      label: "详细地址",
-      itemWidth: 33.33,
-    },
-    {
-      type: "slot",
-      slotName: "provinceId",
-      label: " ",
-      itemWidth: 33.33,
-    },
-    {
-      type: "slot",
-      slotName: "cityId",
-      prop: "cityId",
-      label: " ",
-      itemWidth: 33.33,
-    },
-    {
-      type: "input",
-      itemType: "textarea",
-      prop: "areaDetail",
+      slotName: "address",
+      label: "地址",
     },
     {
       type: "slot",
       slotName: "contact",
       prop: "",
-      label: "联系信息",
-      // required: true,
+      label: "",
     },
     {
       type: "slot",
@@ -309,8 +291,10 @@ const formConfig = computed(() => {
       label: "账期信息",
     },
     {
-      type: "slot",
-      slotName: "fileSlot",
+      type: "upload",
+      listType: "text",
+      accept: "",
+      prop: "fileList",
       label: "上传附件",
     },
     {
@@ -320,7 +304,8 @@ const formConfig = computed(() => {
       itemType: "textarea",
     },
     {
-      label: "银行信息",
+      type: "title1",
+      title: "银行信息",
     },
     {
       type: "input",
@@ -351,24 +336,21 @@ const formConfig = computed(() => {
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
-  proxy
-    .post("/supplierInfo/page", sourceList.value.pagination)
-    .then((message) => {
-      console.log(message);
-      sourceList.value.data = message.rows;
-      sourceList.value.pagination.total = message.total;
-      setTimeout(() => {
-        loading.value = false;
-      }, 200);
-    });
+  proxy.post("/supplierInfo/page", sourceList.value.pagination).then((res) => {
+    sourceList.value.data = res.rows;
+    sourceList.value.pagination.total = res.total;
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
+  });
 };
 const openModal = () => {
   dialogVisible.value = true;
   modalType.value = "add";
-  fileList.value = [];
   formData.data = {
     type: "",
     countryId: "44",
+    fileList: [],
   };
   getCityData(formData.data.countryId, "20");
 };
@@ -385,15 +367,6 @@ const onPreviewFile = (file) => {
 };
 const submitForm = () => {
   byform.value.handleSubmit(() => {
-    if (fileList.value && fileList.value.length > 0) {
-      formData.data.fileList = fileList.value.map((item) => {
-        return {
-          id: item.raw.id,
-          fileName: item.raw.fileName,
-          fileUrl: item.raw.fileUrl,
-        };
-      });
-    }
     submitLoading.value = true;
     proxy.post("/supplierInfo/" + modalType.value, formData.data).then(
       () => {
@@ -413,26 +386,25 @@ const submitForm = () => {
   });
 };
 const getDtl = (row) => {
-  fileList.value = [];
   modalType.value = "edit";
   proxy.post("/supplierInfo/detail", { id: row.id }).then((res) => {
+    getCityData(res.countryId, "20");
+    getCityData(res.provinceId, "30");
+    res.type = res.type + "";
+    formData.data = res;
+    dialogVisible.value = true;
     proxy
       .post("/fileInfo/getList", { businessIdList: [row.id] })
       .then((fileObj) => {
         if (fileObj[row.id] && fileObj[row.id].length > 0) {
-          fileList.value = fileObj[row.id].map((item) => {
+          formData.data.fileList = fileObj[row.id].map((item) => {
             return {
-              raw: item,
+              ...item,
               name: item.fileName,
               url: item.fileUrl,
             };
           });
         }
-        getCityData(res.countryId, "20");
-        getCityData(res.provinceId, "30");
-        res.type = res.type + "";
-        formData.data = res;
-        dialogVisible.value = true;
       });
   });
 };

+ 23 - 43
src/views/purchaseManage/supplier/supplyPrice/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="tenant">
+  <div class="pageIndexClass">
     <!-- <Banner /> -->
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
@@ -32,7 +32,7 @@
                 <el-table-column prop="customCode" label="货品编码" />
                 <el-table-column prop="name" label="货品名称" min-width="150" />
                 <el-table-column prop="spec" label="规格型号" />
-                <el-table-column prop="unit" label="单位" :formatter="(row) => dictValueLabel(row.unit, productUnit)" />
+                <el-table-column prop="unit" label="单位" :formatter="(row) => dictKeyValue(row.unit, materialUnit)" />
                 <el-table-column prop="price" label="供应单价" min-width="150">
                   <template #default="{ row, $index }">
                     <el-form-item :prop="'supplierPriceList.' + $index + '.price'" :rules="rules.price" :inline-message="true"
@@ -75,6 +75,13 @@ import { computed, defineComponent, ref } from "vue";
 import { getToken } from "@/utils/auth";
 import SelectMaterial from "@/components/product/SelectMaterial.vue";
 
+const { proxy } = getCurrentInstance();
+const supplierType = computed(
+  () => proxy.useUserStore().allDict["supplier_type"]
+);
+const materialUnit = computed(
+  () => proxy.useUserStore().allDict["material_unit"]
+);
 const uploadFileUrl = ref(import.meta.env.VITE_APP_BASE_API + "/common/upload"); // 上传文件服务器地址
 const headers = ref({ Authorization: "Bearer " + getToken() });
 const uploadData = ref({});
@@ -99,21 +106,12 @@ let rules = ref({
   ],
   price: [{ required: true, message: "请输入供应单价", trigger: "blur" }],
 });
-const { proxy } = getCurrentInstance();
-const selectConfig = reactive([
+
+const selectConfig = computed(() => [
   {
     label: "供应商类型",
     prop: "supplierType",
-    data: [
-      {
-        label: "贸易商",
-        value: "1",
-      },
-      {
-        label: "工厂",
-        value: "2",
-      },
-    ],
+    data: supplierType.value,
   },
   {
     label: "货品类型",
@@ -171,7 +169,7 @@ const config = computed(() => {
         prop: "productUnit",
       },
       render(unit) {
-        return proxy.dictValueLabel(unit, productUnit.value);
+        return proxy.dictKeyValue(unit, materialUnit.value);
       },
     },
     {
@@ -180,7 +178,7 @@ const config = computed(() => {
         prop: "supplierType",
       },
       render(type) {
-        return proxy.dictDataEcho(type, supplierType.value);
+        return proxy.dictKeyValue(type, supplierType.value);
       },
     },
     {
@@ -293,19 +291,16 @@ const formConfig = reactive([
     required: true,
   },
 ]);
-const getList = async (req) => {
+const getList = (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
-  proxy
-    .post("/supplierPrice/page", sourceList.value.pagination)
-    .then((message) => {
-      console.log(message);
-      sourceList.value.data = message.rows;
-      sourceList.value.pagination.total = message.total;
-      setTimeout(() => {
-        loading.value = false;
-      }, 200);
-    });
+  proxy.post("/supplierPrice/page", sourceList.value.pagination).then((res) => {
+    sourceList.value.data = res.rows;
+    sourceList.value.pagination.total = res.total;
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
+  });
 };
 const openModal = () => {
   dialogVisible.value = true;
@@ -506,22 +501,7 @@ const pushGoods = (goods) => {
     ElMessage("请选择至少一件物品");
   }
 };
-const supplierType = ref([]);
-const productUnit = ref([]);
-const getDict = () => {
-  proxy.getDictOne(["supplier_type", "unit"]).then((res) => {
-    supplierType.value = res["supplier_type"];
-    selectConfig[0].data = supplierType.value.map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    productUnit.value = res["unit"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-  });
-};
-getDict();
+
 getList();
 const acquireSelectList = () => {
   let data = [];

部分文件因为文件数量过多而无法显示