Kaynağa Gözat

连接地址更改,附近上传地址全局更换

cz 1 yıl önce
ebeveyn
işleme
545bc2ba6d
67 değiştirilmiş dosya ile 5049 ekleme ve 8755 silme
  1. 4 0
      .env.development
  2. 4 0
      .env.production
  3. 5 1
      .env.staging
  4. 20 102
      connect/E-mail/mail/com/mailWrite.vue
  5. 33 30
      src/components/WDLY/process/SendFunds.vue
  6. 34 141
      src/components/WDLY/product/SelectProduct.vue
  7. 78 156
      src/components/byForm/index.vue
  8. 98 434
      src/components/process/Contract.vue
  9. 346 401
      src/components/process/ContractAlteration.vue
  10. 231 187
      src/components/process/EHSD/Contract.vue
  11. 289 183
      src/components/process/EHSD/Purchase.vue
  12. 233 185
      src/components/process/EHSD/Sample.vue
  13. 20 101
      src/components/process/PurchasePayment.vue
  14. 138 425
      src/components/process/SendFunds.vue
  15. 70 313
      src/components/process/ServiceContract.vue
  16. 17 69
      src/components/product/SelectMaterial.vue
  17. 17 69
      src/components/product/SelectProduct.vue
  18. 9 0
      src/main.js
  19. 73 59
      src/router/index.js
  20. 253 186
      src/views/EHSD/procurement/InspectionGoodsEHSD/index.vue
  21. 19 75
      src/views/EHSD/productLibrary/companyProduct/index.vue
  22. 19 75
      src/views/EHSD/productLibrary/customerProduct/index.vue
  23. 67 66
      src/views/EHSD/saleContract/contractEHSD/index.vue
  24. 61 64
      src/views/EHSD/saleContract/sampleEHSD/index.vue
  25. 28 134
      src/views/JXSK/production/bom/index.vue
  26. 35 153
      src/views/JXSK/production/workOrder/index.vue
  27. 103 394
      src/views/WDLY/basic/customer/index.vue
  28. 44 192
      src/views/WDLY/basic/product/index.vue
  29. 19 84
      src/views/WDLY/basic/supplier/index.vue
  30. 26 124
      src/views/WDLY/salesMange/afterSale/index.vue
  31. 64 89
      src/views/XMHJC/aboutUs/basic/index.vue
  32. 80 103
      src/views/XMHJC/aboutUs/honor/index.vue
  33. 58 78
      src/views/XMHJC/carousel/index.vue
  34. 154 210
      src/views/XMHJC/column/article.vue
  35. 84 93
      src/views/XMHJC/product/category/index.vue
  36. 454 479
      src/views/XMHJC/product/info/index.vue
  37. 23 123
      src/views/connect/E-mail/mail/com/mailWrite.vue
  38. 161 149
      src/views/customer/file/index.vue
  39. 150 144
      src/views/customer/highseas/index.vue
  40. 166 158
      src/views/customer/privatesea/index.vue
  41. 4 4
      src/views/error/404.vue
  42. 35 163
      src/views/finance/fundManage/accountPayment/index.vue
  43. 267 274
      src/views/index.vue
  44. 25 34
      src/views/oa/companyDisk/webDiskData/index.vue
  45. 142 76
      src/views/oa/work/dailyPaper/index.vue
  46. 12 61
      src/views/oa/work/task/index.vue
  47. 37 166
      src/views/process/processApproval/index.vue
  48. 18 71
      src/views/product/material/index.vue
  49. 23 83
      src/views/product/product/index.vue
  50. 18 72
      src/views/product/product/index2.vue
  51. 12 57
      src/views/production/project/processes/index.vue
  52. 107 175
      src/views/publicModule/companyConfig/index.vue
  53. 36 179
      src/views/purchaseManage/purchaseManage/handoverSlip/index.vue
  54. 36 179
      src/views/purchaseManage/purchaseManage/handoverSlipNew/index.vue
  55. 10 50
      src/views/purchaseManage/purchaseManage/handoverSlipOne/index.vue
  56. 12 57
      src/views/purchaseManage/purchaseManage/purchase/index.vue
  57. 49 44
      src/views/purchaseManage/purchaseManage/purchaseDocumentary/index.vue
  58. 12 57
      src/views/purchaseManage/purchaseManage/subscribe/index.vue
  59. 70 76
      src/views/purchaseManage/purchasePayment/invoice/index.vue
  60. 27 116
      src/views/purchaseManage/supplier/supplier/index.vue
  61. 20 36
      src/views/salesMange/saleContract/claim/index.vue
  62. 41 35
      src/views/salesMange/saleContract/salesDocumentary/index.vue
  63. 75 67
      src/views/salesMange/saleContract/serviceContract/index.vue
  64. 29 141
      src/views/salesMange/salesMange/afterSales/index.vue
  65. 134 438
      src/views/salesMange/shipmentMange/document/index.vue
  66. 10 14
      src/views/systemTenant/tenant/logoConfiguration/index.vue
  67. 1 1
      vite.config.js

+ 4 - 0
.env.development

@@ -10,3 +10,7 @@ VITE_APP_BASE_API = '/dev-api'
 VITE_APP_WS_API = ':20001/test-api'
 
 VITE_APP_IP = '127.0.0.1'
+
+#上传文件地址
+VITE_APP_UPLOAD_API='admin.haijiacheng.com'
+VITE_APP_UPLOAD_BASE_API = '/prod-api'

+ 4 - 0
.env.production

@@ -14,3 +14,7 @@ VITE_APP_IP = '139.159.251.109'
 # 是否在打包时开启压缩,支持 gzip 和 brotli
 VITE_BUILD_COMPRESS = gzip
 
+#上传文件地址
+VITE_APP_UPLOAD_API='admin.haijiacheng.com'
+VITE_APP_UPLOAD_BASE_API = '/prod-api'
+

+ 5 - 1
.env.staging

@@ -12,4 +12,8 @@ VITE_APP_WS_API = ':20001/test-api'
 # 是否在打包时开启压缩,支持 gzip 和 brotli
 VITE_BUILD_COMPRESS = gzip
 
-VITE_APP_IP = '121.37.194.75'
+VITE_APP_IP = '121.37.194.75'
+
+#上传文件地址
+VITE_APP_UPLOAD_API='121.37.194.75:20010'
+VITE_APP_UPLOAD_BASE_API = '/test-api'

+ 20 - 102
connect/E-mail/mail/com/mailWrite.vue

@@ -4,13 +4,7 @@
       <el-button type="primary" @click="handleSend">发 送</el-button>
     </div> -->
     <div style="width: 100%">
-      <el-form
-        ref="submit"
-        :model="formData.data"
-        :rules="rules"
-        label-width="65px"
-        labelPosition="right"
-      >
+      <el-form ref="submit" :model="formData.data" :rules="rules" label-width="65px" labelPosition="right">
         <el-form-item>
           <el-button type="primary" @click="handleSend()"> 发 送 </el-button>
         </el-form-item>
@@ -27,11 +21,7 @@
                 @keyup.enter.native="handleAdd(10)"
               >
               </el-autocomplete> -->
-              <el-input
-                v-model="formData.data.to"
-                placeholder="请输入"
-                @keyup.enter.native="handleAdd(10)"
-              />
+              <el-input v-model="formData.data.to" placeholder="请输入" @keyup.enter.native="handleAdd(10)" />
               <!-- <el-button
                 type="primary"
                 @click="handleAdd(10)"
@@ -41,32 +31,16 @@
               > -->
             </div>
             <div style="margin-top: 15px" v-if="to && to.length > 0">
-              <el-tag
-                style="margin-right: 10px"
-                class="ml-2"
-                type="info"
-                v-for="(item, index) in to"
-                :key="index"
-                closable
-                @close="handleClose(index, 10)"
-                >{{ item.address }}</el-tag
-              >
+              <el-tag style="margin-right: 10px" class="ml-2" type="info" v-for="(item, index) in to" :key="index" closable
+                      @close="handleClose(index, 10)">{{ item.address }}</el-tag>
             </div>
           </div>
         </el-form-item>
         <el-form-item label="" prop="">
           <div style="display: flex">
-            <span
-              style="color: #666666; cursor: pointer"
-              @click="showcc = !showcc"
-              >抄送</span
-            >
+            <span style="color: #666666; cursor: pointer" @click="showcc = !showcc">抄送</span>
             <span style="color: ##dddddd; margin: 0 8px">|</span>
-            <span
-              style="color: #666666; cursor: pointer"
-              @click="showbcc = !showbcc"
-              >密送</span
-            >
+            <span style="color: #666666; cursor: pointer" @click="showbcc = !showbcc">密送</span>
           </div>
         </el-form-item>
         <el-form-item label="抄送人" prop="cc" v-if="showcc">
@@ -82,11 +56,7 @@
                 @keyup.enter.native="handleAdd(20)"
               >
               </el-autocomplete> -->
-              <el-input
-                v-model="formData.data.cc"
-                placeholder="请输入"
-                @keyup.enter.native="handleAdd(20)"
-              />
+              <el-input v-model="formData.data.cc" placeholder="请输入" @keyup.enter.native="handleAdd(20)" />
               <!-- <el-button
                 type="primary"
                 @click="handleAdd(20)"
@@ -96,16 +66,8 @@
               > -->
             </div>
             <div style="margin-top: 15px" v-if="cc && cc.length > 0">
-              <el-tag
-                style="margin-right: 10px"
-                class="ml-2"
-                type="info"
-                v-for="(item, index) in cc"
-                :key="index"
-                closable
-                @close="handleClose(index, 20)"
-                >{{ item.address }}</el-tag
-              >
+              <el-tag style="margin-right: 10px" class="ml-2" type="info" v-for="(item, index) in cc" :key="index" closable
+                      @close="handleClose(index, 20)">{{ item.address }}</el-tag>
             </div>
           </div>
         </el-form-item>
@@ -121,11 +83,7 @@
                 @keyup.enter.native="handleAdd(30)"
               >
               </el-autocomplete> -->
-              <el-input
-                v-model="formData.data.bcc"
-                placeholder="请输入"
-                @keyup.enter.native="handleAdd(30)"
-              />
+              <el-input v-model="formData.data.bcc" placeholder="请输入" @keyup.enter.native="handleAdd(30)" />
               <!-- <el-button
                 type="primary"
                 @click="handleAdd(30)"
@@ -135,16 +93,8 @@
               > -->
             </div>
             <div style="margin-top: 15px" v-if="bcc && bcc.length > 0">
-              <el-tag
-                style="margin-right: 10px"
-                class="ml-2"
-                type="info"
-                v-for="(item, index) in bcc"
-                :key="index"
-                closable
-                @close="handleClose(index, 30)"
-                >{{ item.address }}</el-tag
-              >
+              <el-tag style="margin-right: 10px" class="ml-2" type="info" v-for="(item, index) in bcc" :key="index" closable
+                      @close="handleClose(index, 30)">{{ item.address }}</el-tag>
             </div>
           </div>
         </el-form-item>
@@ -153,45 +103,21 @@
         </el-form-item>
         <el-form-item label="附件">
           <div style="width: 100%">
-            <el-upload
-              v-model:fileList="fileList"
-              class="upload-demo"
-              action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-              :data="uploadData"
-              drag
-              multiple
-              :show-file-list="false"
-              :before-upload="handleBeforeUpload"
-            >
+            <el-upload v-model:fileList="fileList" class="upload-demo" :action="uploadUrl" :data="uploadData" drag multiple :show-file-list="false"
+                       :before-upload="handleBeforeUpload">
               <div>
-                <img
-                  src="@/assets/images/icon_attachment.svg"
-                  class="att-img"
-                  fit="scale-down"
-                />
-                <span style="padding-left: 8px"
-                  >将文件拖到此处,或<span style="color: #409eff"
-                    >点击上传</span
-                  ></span
-                >
+                <img src="@/assets/images/icon_attachment.svg" class="att-img" fit="scale-down" />
+                <span style="padding-left: 8px">将文件拖到此处,或<span style="color: #409eff">点击上传</span></span>
               </div>
             </el-upload>
             <div class="att-box" v-if="fileListCopy && fileListCopy.length > 0">
               <div v-for="(itemFile, index) in fileListCopy" :key="index">
                 <div class="att-item">
-                  <img
-                    src="@/assets/images/icon_dz.svg"
-                    style="cursor: pointer"
-                    fit="scale-down"
-                  />
+                  <img src="@/assets/images/icon_dz.svg" style="cursor: pointer" fit="scale-down" />
                   <div class="att-name">
                     {{ itemFile.fileName }}
                   </div>
-                  <img
-                    src="@/assets/images/icon_delete.svg"
-                    class="att-img"
-                    fit="scale-down"
-                  />
+                  <img src="@/assets/images/icon_delete.svg" class="att-img" fit="scale-down" />
                 </div>
               </div>
             </div>
@@ -199,19 +125,11 @@
         </el-form-item>
         <el-form-item label="正文" prop="content">
           <div style="width: 100%">
-            <Editor
-              :value="formData.data.content"
-              @updateValue="updateContent"
-              ref="contentEditor"
-            />
+            <Editor :value="formData.data.content" @updateValue="updateContent" ref="contentEditor" />
           </div>
         </el-form-item>
         <el-form-item label="发件人" prop="replyTo">
-          <el-input
-            v-model="formData.data.replyTo"
-            placeholder="请输入"
-            style="width: 50%"
-          />
+          <el-input v-model="formData.data.replyTo" placeholder="请输入" style="width: 50%" />
         </el-form-item>
         <el-form-item>
           <el-button type="primary" @click="handleSend()"> 发 送 </el-button>

+ 33 - 30
src/components/WDLY/process/SendFunds.vue

@@ -12,16 +12,9 @@
         </el-col>
         <el-col :span="6">
           <el-form-item label="归属部门" prop="departmentId">
-            <el-cascader
-              v-model="formData.data.departmentId"
-              :options="deptTreeData"
-              :props="{
+            <el-cascader v-model="formData.data.departmentId" :options="deptTreeData" :props="{
                 value: 'deptId',
-              }"
-              clearable
-              filterable
-              style="width: 100%"
-              @change="handleChangeDept" />
+              }" clearable filterable style="width: 100%" @change="handleChangeDept" />
           </el-form-item>
         </el-col>
       </el-row>
@@ -52,19 +45,14 @@
         <el-input v-model="formData.data.paymentRemarks" placeholder="请输入" type="textarea"> </el-input>
       </el-form-item>
       <el-form-item label="上传附件">
-        <el-upload
-          v-model="fileList"
-          :show-file-list="false"
-          class="upload-demo"
-          action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-          :data="uploadData"
-          :on-preview="handlePreview"
-          :before-upload="handleBeforeUpload">
+        <el-upload v-model="fileList" :show-file-list="false" class="upload-demo" :action="uploadUrl" :data="uploadData" :on-preview="handlePreview"
+                   :before-upload="handleBeforeUpload">
           <el-button type="primary">选择</el-button>
         </el-upload>
       </el-form-item>
       <div style="margin-bottom: 15px">
-        <el-tag style="margin-right: 10px" class="ml-2" type="info" v-for="(item, index) in fileList" :key="index" closable @close="handleClose(index)">{{
+        <el-tag style="margin-right: 10px" class="ml-2" type="info" v-for="(item, index) in fileList" :key="index" closable
+                @close="handleClose(index)">{{
           item.fileName
         }}</el-tag>
       </div>
@@ -91,7 +79,8 @@
           <el-table-column prop="amount" label="请款金额" min-width="150">
             <template #default="{ row, $index }">
               <el-form-item :prop="'accountRequestFundsDetailList.' + $index + '.amount'" :rules="rules.amount" :inline-message="true">
-                <el-input-number onmousewheel="return false;" v-model="row.amount" :precision="4" :controls="false" :min="0" @change="handleChangeAmount" />
+                <el-input-number onmousewheel="return false;" v-model="row.amount" :precision="4" :controls="false" :min="0"
+                                 @change="handleChangeAmount" />
               </el-form-item>
             </template>
           </el-table-column>
@@ -173,13 +162,23 @@ let formData = reactive({
   },
 });
 let rules = ref({
-  corporationId: [{ required: true, message: "请选择归属公司", trigger: "change" }],
-  departmentId: [{ required: true, message: "请选择归属部门", trigger: "change" }],
+  corporationId: [
+    { required: true, message: "请选择归属公司", trigger: "change" },
+  ],
+  departmentId: [
+    { required: true, message: "请选择归属部门", trigger: "change" },
+  ],
   type: [{ required: true, message: "请选择请款类型", trigger: "change" }],
-  paymentTime: [{ required: true, message: "请选择用款时间", trigger: "change" }],
+  paymentTime: [
+    { required: true, message: "请选择用款时间", trigger: "change" },
+  ],
   currency: [{ required: true, message: "请选择币种", trigger: "change" }],
-  paymentMethod: [{ required: true, message: "请选择付款方式", trigger: "change" }],
-  accountManagementId: [{ required: true, message: "请选择付款账号", trigger: "change" }],
+  paymentMethod: [
+    { required: true, message: "请选择付款方式", trigger: "change" },
+  ],
+  accountManagementId: [
+    { required: true, message: "请选择付款账号", trigger: "change" },
+  ],
   costType: [{ required: true, message: "请选择费用类型", trigger: "change" }],
   remarks: [{ required: true, message: "请输入款项说明", trigger: "blur" }],
   amount: [{ required: true, message: "请输入请款金额", trigger: "blur" }],
@@ -233,13 +232,17 @@ const currencyType = ref([]);
 
 const getDictData = () => {
   // 获取归属公司数据
-  proxy.post("/corporation/page", { pageNum: 1, pageSize: 9999 }).then((res) => {
-    companyData.value = res.rows;
-  });
+  proxy
+    .post("/corporation/page", { pageNum: 1, pageSize: 9999 })
+    .then((res) => {
+      companyData.value = res.rows;
+    });
   // 账户数据
-  proxy.post("/accountManagement/page", { pageNum: 1, pageSize: 9999 }).then((res) => {
-    accountData.value = res.rows;
-  });
+  proxy
+    .post("/accountManagement/page", { pageNum: 1, pageSize: 9999 })
+    .then((res) => {
+      accountData.value = res.rows;
+    });
 
   // 部门树
   proxy

+ 34 - 141
src/components/WDLY/product/SelectProduct.vue

@@ -12,110 +12,53 @@
       </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" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
+               :selectConfig="selectConfig" :table-events="{
           //element talbe事件都能传
           select: select,
-        }"
-        :action-list="[]"
-        @get-list="getList"
-      >
+        }" :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])"
-            />
+            <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"
-      >
+    <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 v-model:fileList="fileList" :action="uploadUrl" :data="uploadData" list-type="picture-card" :on-remove="handleRemove"
+                       :on-success="handleSuccess" :before-upload="handleBeforeUpload">
+              <el-icon>
+                <Plus />
+              </el-icon>
             </el-upload>
           </div>
         </template>
 
         <template #combination>
-          <el-form
-            ref="tableForm"
-            :model="formData.data"
-            :rules="rules"
-            style="margin-top: 15px"
-          >
-            <el-form-item
-              label="组合明细"
-              v-show="formData.data.combination == 1"
-            >
-              <el-button
-                type="primary"
-                @click="openProduct = true"
-                style="margin-bottom: 10px"
-              >
+          <el-form ref="tableForm" :model="formData.data" :rules="rules" style="margin-top: 15px">
+            <el-form-item label="组合明细" v-show="formData.data.combination == 1">
+              <el-button type="primary" @click="openProduct = true" style="margin-bottom: 10px">
                 添加
               </el-button>
               <el-table :data="formData.data.productCombinationList">
                 <el-table-column prop="code" label="产品编码" />
                 <el-table-column prop="name" label="产品名称" />
-                <el-table-column
-                  prop="linkQuantity"
-                  label="组合数量"
-                  min-width="150"
-                >
+                <el-table-column prop="linkQuantity" label="组合数量" min-width="150">
                   <template #default="{ row, $index }">
-                    <el-form-item
-                      :prop="
+                    <el-form-item :prop="
                         'productCombinationList.' + $index + '.linkQuantity'
-                      "
-                      :rules="rules.linkQuantity"
-                      :inline-message="true"
-                    >
-                      <el-input
-                        v-model="row.linkQuantity"
-                        placeholder="请输入"
-                      />
+                      " :rules="rules.linkQuantity" :inline-message="true">
+                      <el-input v-model="row.linkQuantity" placeholder="请输入" />
                     </el-form-item>
                   </template>
                 </el-table-column>
                 <el-table-column prop="zip" label="操作" width="100">
                   <template #default="{ $index }">
-                    <el-button
-                      type="primary"
-                      link
-                      @click="handleRemoveProduct($index)"
-                      >删除</el-button
-                    >
+                    <el-button type="primary" link @click="handleRemoveProduct($index)">删除</el-button>
                   </template>
                 </el-table-column>
               </el-table>
@@ -126,29 +69,18 @@
           <div style="width: 100%">
             <el-row>
               <el-col :span="4">
-                <el-input
-                  v-model="formData.data.victoriatouristJson.newProductsDay1"
-                  placeholder="请输入"
-                  disabled
-                />
+                <el-input v-model="formData.data.victoriatouristJson.newProductsDay1" placeholder="请输入" disabled />
               </el-col>
               <el-col :span="1" style="text-align: center"> ~ </el-col>
               <el-col :span="4">
-                <el-input
-                  v-model="formData.data.victoriatouristJson.newProductsDay"
-                  placeholder="请输入"
-                  @change="changeDay(10)"
-                >
+                <el-input v-model="formData.data.victoriatouristJson.newProductsDay" placeholder="请输入" @change="changeDay(10)">
                 </el-input>
               </el-col>
               <el-col :span="1" style="text-align: center"> : </el-col>
               <el-col :span="6">
-                <el-input
-                  v-model="
+                <el-input v-model="
                     formData.data.victoriatouristJson.newProductsExpectedSales
-                  "
-                  placeholder="预期销量"
-                />
+                  " placeholder="预期销量" />
               </el-col>
             </el-row>
           </div>
@@ -157,29 +89,18 @@
           <div style="width: 100%">
             <el-row>
               <el-col :span="4">
-                <el-input
-                  v-model="formData.data.victoriatouristJson.growUpDay1"
-                  placeholder="请输入"
-                  disabled
-                />
+                <el-input v-model="formData.data.victoriatouristJson.growUpDay1" placeholder="请输入" disabled />
               </el-col>
               <el-col :span="1" style="text-align: center"> ~ </el-col>
               <el-col :span="4">
-                <el-input
-                  v-model="formData.data.victoriatouristJson.growUpDay"
-                  placeholder="请输入"
-                  @change="changeDay(20)"
-                >
+                <el-input v-model="formData.data.victoriatouristJson.growUpDay" placeholder="请输入" @change="changeDay(20)">
                 </el-input>
               </el-col>
               <el-col :span="1" style="text-align: center"> : </el-col>
               <el-col :span="6">
-                <el-input
-                  v-model="
+                <el-input v-model="
                     formData.data.victoriatouristJson.growUpExpectedSales
-                  "
-                  placeholder="预期销量"
-                />
+                  " placeholder="预期销量" />
               </el-col>
             </el-row>
           </div>
@@ -190,56 +111,28 @@
               大于{{ formData.data.victoriatouristJson.attDay }}天:
             </el-col>
             <el-col :span="6">
-              <el-input
-                v-model="formData.data.victoriatouristJson.matureExpectedSales"
-                placeholder="预期销量"
-              />
+              <el-input v-model="formData.data.victoriatouristJson.matureExpectedSales" placeholder="预期销量" />
             </el-col>
           </el-row>
         </template>
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button
-          type="primary"
-          v-no-double-click="submitForm"
-          size="large"
-          :loading="submitLoading"
-        >
+        <el-button type="primary" v-no-double-click="submitForm" size="large" :loading="submitLoading">
           确 定
         </el-button>
       </template>
     </el-dialog>
-    <el-dialog
-      title="Excel导入"
-      v-model="openExcelDialog"
-      width="400"
-      v-loading="loading"
-    >
+    <el-dialog title="Excel导入" v-model="openExcelDialog" width="400" v-loading="loading">
       <template #footer>
-        <el-button @click="openExcelDialog = false" size="large"
-          >取 消</el-button
-        >
-        <el-button
-          type="primary"
-          @click="submitExcel()"
-          size="large"
-          :loading="submitLoading"
-        >
+        <el-button @click="openExcelDialog = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitExcel()" size="large" :loading="submitLoading">
           确 定
         </el-button>
       </template>
     </el-dialog>
-    <el-dialog
-      v-model="openProduct"
-      title="选择货品"
-      width="70%"
-      append-to-body
-    >
-      <SelectGoods
-        @cancel="openProduct = false"
-        @pushGoods="pushGoods"
-      ></SelectGoods>
+    <el-dialog v-model="openProduct" title="选择货品" width="70%" append-to-body>
+      <SelectGoods @cancel="openProduct = false" @pushGoods="pushGoods"></SelectGoods>
     </el-dialog>
   </div>
 </template>

+ 78 - 156
src/components/byForm/index.vue

@@ -1,22 +1,12 @@
 <template>
   <div class="by-form">
-    <el-form
-      :model="formData"
-      :label-width="formOption.labelWidth"
-      :inline="formOption.inline || false"
-      :rules="rules"
-      :labelPosition="formOption.labelPosition || 'top'"
-      ref="byForm"
-      :disabled="formOption.disabled || false">
+    <el-form :model="formData" :label-width="formOption.labelWidth" :inline="formOption.inline || false" :rules="rules"
+             :labelPosition="formOption.labelPosition || 'top'" ref="byForm" :disabled="formOption.disabled || false">
       <template v-for="i in formConfig" :key="i.model">
         <div v-if="i.type == 'title'" class="form-title">
           {{ i.title }}
         </div>
-        <el-form-item
-          :label="i.label"
-          :prop="i.prop"
-          v-if="i.isShow || i.isShow == undefined && i.type"
-          :style="
+        <el-form-item :label="i.label" :prop="i.prop" v-if="i.isShow || i.isShow == undefined && i.type" :style="
             i.type == 'title'
               ? 'width:100%;display:none'
               : i.itemWidth
@@ -24,13 +14,11 @@
               : formOption.itemWidth
               ? 'width:' + formOption.itemWidth + '%'
               : '100%'
-          "
-          :class="i.type == 'json' ? (i.isHide ? 'by-form-json dn' : 'by-form-json') : i.isHide ? 'dn' : ''">
+          " :class="i.type == 'json' ? (i.isHide ? 'by-form-json dn' : 'by-form-json') : i.isHide ? 'dn' : ''">
           <template #label>
-            <el-popover placement="top"  trigger="hover" :width="i.tipWidth"  v-if="i.isTip">
+            <el-popover placement="top" trigger="hover" :width="i.tipWidth" v-if="i.isTip">
               <template #reference>
-                <span 
-                  style="color:red">
+                <span style="color:red">
                   {{ i.label }}
                 </span>
               </template>
@@ -38,166 +26,87 @@
             </el-popover>
             <span v-else> {{ i.label }}</span>
           </template>
-          <el-input
-            v-if="i.type == 'input'"
-            v-model="formData[i.prop]"
-            :placeholder="i.placeholder || $t('common.pleaseEnter')"
-            @input="(e) => commonsEmit(e, i)"
-            @change="(e) => commonsEmitChange(e, i)"
-            :type="i.itemType ? i.itemType : 'text'"
-            :disabled="i.disabled ? i.disabled : false"
-            :max="i.max"
-            :min="i.min"
-            :maxlength="i.maxlength"
-            :readonly="i.readonly ? i.readonly : false"
-            :style="i.style" />
-          <el-input
-            v-if="i.type == 'selectInput'"
-            v-model="formData[i.prop]"
-            :placeholder="i.placeholder || $t('common.pleaseEnter')"
-            @input="(e) => commonsEmit(e, i)"
-            :type="'number'"
-            :precision="4"
-            :disabled="i.disabled ? i.disabled : false"
-            :max="i.max"
-            :min="i.min"
-            :maxlength="i.maxlength"
-            :readonly="i.readonly ? i.readonly : false"
-            :clearable="i.clearable ? i.clearable : false"  onmousewheel="return false;">
+          <el-input v-if="i.type == 'input'" v-model="formData[i.prop]" :placeholder="i.placeholder || $t('common.pleaseEnter')"
+                    @input="(e) => commonsEmit(e, i)" @change="(e) => commonsEmitChange(e, i)" :type="i.itemType ? i.itemType : 'text'"
+                    :disabled="i.disabled ? i.disabled : false" :max="i.max" :min="i.min" :maxlength="i.maxlength"
+                    :readonly="i.readonly ? i.readonly : false" :style="i.style" />
+          <el-input v-if="i.type == 'selectInput'" v-model="formData[i.prop]" :placeholder="i.placeholder || $t('common.pleaseEnter')"
+                    @input="(e) => commonsEmit(e, i)" :type="'number'" :precision="4" :disabled="i.disabled ? i.disabled : false" :max="i.max"
+                    :min="i.min" :maxlength="i.maxlength" :readonly="i.readonly ? i.readonly : false" :clearable="i.clearable ? i.clearable : false"
+                    onmousewheel="return false;">
             <template #prepend>
-              <el-select
-                v-model="formData[i.selectProp]"
-                :placeholder="i.selectPlaceholder || $t('common.pleaseSelect')"
-                @change="(e) => commonsEmit(e, i)"
-                :disabled="i.disabled || i.selectDisabled ? true : false"
-                :readonly="i.readonly ? i.readonly : false"
-                style="width: 80px">
+              <el-select v-model="formData[i.selectProp]" :placeholder="i.selectPlaceholder || $t('common.pleaseSelect')"
+                         @change="(e) => commonsEmit(e, i)" :disabled="i.disabled || i.selectDisabled ? true : false"
+                         :readonly="i.readonly ? i.readonly : false" style="width: 80px">
                 <el-option :label="j.title || j.name || j.label" :value="j.id || j.value" v-for="j in i.data" :key="j.id"> </el-option>
               </el-select>
             </template>
           </el-input>
-          <el-select
-            v-model="formData[i.prop]"
-            :multiple="i.multiple || false"
-            v-else-if="i.type == 'select'"
-            :placeholder="i.placeholder || $t('common.pleaseSelect')"
-            @change="(e) => commonsEmit(e, i)"
-            :disabled="i.disabled ? i.disabled : false"
-            :clearable="i.clearable ? i.clearable : false"
-            :filterable="i.filterable ? true : false"
-            :style="i.style"
-            :readonly="i.readonly ? i.readonly : false">
+          <el-select v-model="formData[i.prop]" :multiple="i.multiple || false" v-else-if="i.type == 'select'"
+                     :placeholder="i.placeholder || $t('common.pleaseSelect')" @change="(e) => commonsEmit(e, i)"
+                     :disabled="i.disabled ? i.disabled : false" :clearable="i.clearable ? i.clearable : false"
+                     :filterable="i.filterable ? true : false" :style="i.style" :readonly="i.readonly ? i.readonly : false">
             <el-option :label="j.title || j.name || j.label" :value="j.id || j.value" v-for="j in i.data" :key="j.id"> </el-option>
           </el-select>
-          <el-tree-select
-            v-model="formData[i.prop]"
-            v-else-if="i.type == 'treeSelect'"
-            :data="i.data"
-            :readonly="i.readonly ? i.readonly : false"
-            :props="{
+          <el-tree-select v-model="formData[i.prop]" v-else-if="i.type == 'treeSelect'" :data="i.data" :readonly="i.readonly ? i.readonly : false"
+                          :props="{
               value: i.propsTreeValue || 'id',
               label: i.propsTreeLabel || 'label',
               children: i.propsTreeChildren || 'children',
-            }"
-            value-key="id"
-            :placeholder="i.placeholder || $t('common.pleaseSelect')"
-            :disabled="i.disabled ? i.disabled : false"
-            check-strictly
-            :style="i.style" />
-          <el-date-picker
-            v-model="formData[i.prop]"
-            :readonly="i.readonly ? i.readonly : false"
-            v-else-if="i.type == 'date'"
-            :type="i.itemType"
-            :placeholder="i.placeholder || $t('common.pleaseSelectTime')"
-            @change="(e) => commonsEmit(e, i)"
-            :disabled="i.disabled ? i.disabled : false"
-            :format="i.format ? i.format : dateFormatInit(i.itemType)"
-            :value-format="i.format ? i.format : dateFormatInit(i.itemType)" :style="i.style" />
-          <el-switch
-            :disabled="i.disabled ? i.disabled : false"
-            v-else-if="i.type == 'switch'"
-            :readonly="i.readonly ? i.readonly : false"
-            v-model="formData[i.prop]" />
-          <el-checkbox-group
-            v-else-if="i.type == 'checkbox'"
-            v-model="formData[i.prop]"
-            :readonly="i.readonly ? i.readonly : false"
-            :disabled="i.disabled ? i.disabled : false">
+            }" value-key="id" :placeholder="i.placeholder || $t('common.pleaseSelect')" :disabled="i.disabled ? i.disabled : false" check-strictly
+                          :style="i.style" />
+          <el-date-picker v-model="formData[i.prop]" :readonly="i.readonly ? i.readonly : false" v-else-if="i.type == 'date'" :type="i.itemType"
+                          :placeholder="i.placeholder || $t('common.pleaseSelectTime')" @change="(e) => commonsEmit(e, i)"
+                          :disabled="i.disabled ? i.disabled : false" :format="i.format ? i.format : dateFormatInit(i.itemType)"
+                          :value-format="i.format ? i.format : dateFormatInit(i.itemType)" :style="i.style" />
+          <el-switch :disabled="i.disabled ? i.disabled : false" v-else-if="i.type == 'switch'" :readonly="i.readonly ? i.readonly : false"
+                     v-model="formData[i.prop]" />
+          <el-checkbox-group v-else-if="i.type == 'checkbox'" v-model="formData[i.prop]" :readonly="i.readonly ? i.readonly : false"
+                             :disabled="i.disabled ? i.disabled : false">
             <el-checkbox v-for="j in i.data" :key="j.id || j.value" :label="j.id || j.value" name="type">
               {{ j.name || j.label }}
             </el-checkbox>
           </el-checkbox-group>
-          <el-radio-group
-            v-else-if="i.type == 'radio'"
-            v-model="formData[i.prop]"
-            @change="(e) => commonsEmit(e, i)"
-            :readonly="i.readonly ? i.readonly : false"
-            :disabled="i.disabled ? i.disabled : false">
+          <el-radio-group v-else-if="i.type == 'radio'" v-model="formData[i.prop]" @change="(e) => commonsEmit(e, i)"
+                          :readonly="i.readonly ? i.readonly : false" :disabled="i.disabled ? i.disabled : false">
             <el-radio :border="i.border ? i.border : false" v-for="j in i.data" :key="j.id || j.value" :label="j.id || j.value" name="type">
               {{ j.name || j.label }}
             </el-radio>
           </el-radio-group>
-          <el-input-number
-            v-else-if="i.type == 'number'"
-            v-model="formData[i.prop]"
-            :readonly="i.readonly ? i.readonly : false"
-            :placeholder="i.placeholder || $t('common.pleaseEnter')"
-            @change="(e) => commonsEmit(e, i)"
-            :disabled="i.disabled ? i.disabled : false"
-            :min="i.min ? i.min : 0"
-            :max="i.max ? i.max : 9999999999"
-            :step="i.step ? i.step : 1"
-            :precision="i.precision !== '' ? i.precision : 2"
-            :controls="i.controls === false ? false : true"
-            :style="i.style"
-            onmousewheel="return false;">
+          <el-input-number v-else-if="i.type == 'number'" v-model="formData[i.prop]" :readonly="i.readonly ? i.readonly : false"
+                           :placeholder="i.placeholder || $t('common.pleaseEnter')" @change="(e) => commonsEmit(e, i)"
+                           :disabled="i.disabled ? i.disabled : false" :min="i.min ? i.min : 0" :max="i.max ? i.max : 9999999999"
+                           :step="i.step ? i.step : 1" :precision="i.precision !== '' ? i.precision : 2"
+                           :controls="i.controls === false ? false : true" :style="i.style" onmousewheel="return false;">
           </el-input-number>
-          <el-tree
-            v-else-if="i.type == 'tree'"
-            :data="i.data"
-            :props="i.props"
-            :readonly="i.readonly ? i.readonly : false"
-            :show-checkbox="i.showCheckbox || true">
+          <el-tree v-else-if="i.type == 'tree'" :data="i.data" :props="i.props" :readonly="i.readonly ? i.readonly : false"
+                   :show-checkbox="i.showCheckbox || true">
           </el-tree>
-          <el-cascader
-            v-else-if="i.type == 'cascader'"
-            :options="i.data"
-            :props="i.props"
-            :readonly="i.readonly ? i.readonly : false"
-            :placeholder="i.placeholder || $t('common.pleaseSelect')"
-            @change="(e) => commonsEmit(e, i)"
-            :disabled="i.disabled ? i.disabled : false"
-            :style="i.style">
+          <el-cascader v-else-if="i.type == 'cascader'" :options="i.data" :props="i.props" :readonly="i.readonly ? i.readonly : false"
+                       :placeholder="i.placeholder || $t('common.pleaseSelect')" @change="(e) => commonsEmit(e, i)"
+                       :disabled="i.disabled ? i.disabled : false" :style="i.style">
           </el-cascader>
           <!-- <div class="form-title" v-else-if="i.type == 'title'">
             {{ i.title }}
           </div> -->
           <slot :name="i.slotName" v-else-if="i.type == 'slot'"> {{ i.slotName }}插槽占位符 </slot>
           <div class="upload" v-else-if="i.type == 'upload'">
-            <el-upload
-              v-model="formData[i.prop]"
-              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-upload v-model="formData[i.prop]" :action="uploadUrl" :data="uploadData" list-type="picture-card" :on-remove="handleRemove"
+                       :on-success="handleSuccess" :before-upload="handleBeforeUpload">
               <!-- <el-icon class="el-icon--upload"><upload-filled /></el-icon> -->
-              <el-icon><Plus /></el-icon>
+              <el-icon>
+                <Plus />
+              </el-icon>
             </el-upload>
           </div>
           <div v-else-if="i.type == 'table'" class="by-form-table" style="width: 100%">
             <el-table :data="formData[i.prop]" style="width: 100%">
               <el-table-column :prop="j.prop" :label="j.label" :width="i.width" v-for="(j, jindex) in i.column">
                 <template #default="scope" v-if="j.type">
-                  <component
-                    @change="(e) => formTableChange(e, scope, j)"
-                    v-model="scope.row[j.prop]"
-                    :is="formTableObj[j.type]"
-                    :placeholder="j.placeholder || $t('common.pleaseEnter')"
-                    :type="j.type == 'number' ? 'number' : 'text'">
-                    <el-option :label="n.title || n.name || n.label" :value="n.id || n.value" v-for="n in j.data" :key="n.id" v-if="j.type == 'select'">
+                  <component @change="(e) => formTableChange(e, scope, j)" v-model="scope.row[j.prop]" :is="formTableObj[j.type]"
+                             :placeholder="j.placeholder || $t('common.pleaseEnter')" :type="j.type == 'number' ? 'number' : 'text'">
+                    <el-option :label="n.title || n.name || n.label" :value="n.id || n.value" v-for="n in j.data" :key="n.id"
+                               v-if="j.type == 'select'">
                     </el-option>
                   </component>
                 </template>
@@ -243,8 +152,6 @@ defineProps({
   },
 });
 
-
-
 const formTableChange = (e, scope, column) => {
   if (column.fn) {
     column.fn(e, scope);
@@ -267,12 +174,14 @@ const handleSuccess = (res, file, files) => {
 };
 
 const handleRemove = (file) => {
-  const index = fileListCopy.value.findIndex((x) => x.uid === file.uid || x.id === file.id);
+  const index = fileListCopy.value.findIndex(
+    (x) => x.uid === file.uid || x.id === file.id
+  );
   fileListCopy.value.splice(index, 1);
 };
 
 const getLegacyData = (i) => {
-  console.log(i)
+  console.log(i);
 };
 
 const handleBeforeUpload = async (file) => {
@@ -294,7 +203,6 @@ const formData = computed(() => {
   return proxy.modelValue;
 });
 
-
 const formDataReset = ref({ ...proxy.modelValue });
 const commonsEmit = (prop, item) => {
   if (item.type == "input" && item.itemType == "number") {
@@ -311,7 +219,7 @@ const commonsEmitChange = (prop, item) => {
     formData.value[item.prop] = prop.trim();
   }
   if (item.fn) {
-    console.log(proxy.formConfig)
+    console.log(proxy.formConfig);
     item.fn(prop);
   }
   emit("update:modelValue", formData.value);
@@ -358,9 +266,16 @@ const commonRecursive = (arr, labelKey, labelVal, childrenName) => {
       arr[i].children = arr[i][childrenName];
     }
     arr[i].checked = false;
-    typeof arr[i][labelVal] == String ? (arr[i].key = arr[i][labelVal]) : (arr[i].key = JSON.stringify(arr[i][labelVal]));
+    typeof arr[i][labelVal] == String
+      ? (arr[i].key = arr[i][labelVal])
+      : (arr[i].key = JSON.stringify(arr[i][labelVal]));
     if (childrenName) {
-      this.commonRecursive(arr[i][childrenName], labelKey, labelVal, childrenName);
+      this.commonRecursive(
+        arr[i][childrenName],
+        labelKey,
+        labelVal,
+        childrenName
+      );
     }
   }
 };
@@ -375,7 +290,12 @@ const commonGetdata = (isLoad, i) => {
     }
     proxy.formConfig[i].data = getFormat(isLoad.resUrl, message);
     if (isLoad.labelKey) {
-      commonRecursive(proxy.formConfig[i].data, isLoad.labelKey, isLoad.labelVal, isLoad.childrenName);
+      commonRecursive(
+        proxy.formConfig[i].data,
+        isLoad.labelKey,
+        isLoad.labelVal,
+        isLoad.childrenName
+      );
     }
     console.log(proxy.formConfig[i].data);
   });
@@ -384,7 +304,9 @@ const commonGetdata = (isLoad, i) => {
 //根据resurl获取数据
 const getFormat = (formatStr, props) => {
   if (!formatStr) return props;
-  return formatStr.split(".").reduce((total, cur) => (!total ? "" : total[cur]), props);
+  return formatStr
+    .split(".")
+    .reduce((total, cur) => (!total ? "" : total[cur]), props);
 };
 
 //初始化所有表单
@@ -461,7 +383,7 @@ loadInit();
 </script>
 
 <style>
-.box-item{
+.box-item {
   background-color: red;
 }
 .form-title {

+ 98 - 434
src/components/process/Contract.vue

@@ -1,53 +1,29 @@
 <template>
   <div style="width: 100%; padding: 0px 15px">
-    <byForm
-      :formConfig="formConfig"
-      :formOption="formOption"
-      v-model="formData.data"
-      :rules="rules"
-      ref="submit"
-    >
+    <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
       <template #seller>
         <div style="width: 100%">
           <el-form-item prop="sellCorporationId">
-            <el-select
-              v-model="formData.data.sellCorporationId"
-              style="width: 100%"
-              disabled
-            >
-              <el-option
-                v-for="item in corporationList"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value"
-              />
+            <el-select v-model="formData.data.sellCorporationId" style="width: 100%" disabled>
+              <el-option v-for="item in corporationList" :key="item.value" :label="item.label" :value="item.value" />
             </el-select>
           </el-form-item>
           <el-row style="margin-top: 20px; width: 100%">
             <el-col :span="8">
               <el-form-item label="地址" prop="sellCountryName">
-                <el-input
-                  v-model="formData.data.sellCountryName"
-                  placeholder="请输入国家"
-                />
+                <el-input v-model="formData.data.sellCountryName" placeholder="请输入国家" />
               </el-form-item>
             </el-col>
             <el-col :span="1"></el-col>
             <el-col :span="7">
               <el-form-item label=" " prop="sellProvinceName">
-                <el-input
-                  v-model="formData.data.sellProvinceName"
-                  placeholder="请输入省/州"
-                />
+                <el-input v-model="formData.data.sellProvinceName" placeholder="请输入省/州" />
               </el-form-item>
             </el-col>
             <el-col :span="1"></el-col>
             <el-col :span="7">
               <el-form-item label=" " prop="sellCityName">
-                <el-input
-                  v-model="formData.data.sellCityName"
-                  placeholder="请输入城市"
-                />
+                <el-input v-model="formData.data.sellCityName" placeholder="请输入城市" />
               </el-form-item>
             </el-col>
           </el-row>
@@ -62,19 +38,13 @@
           <el-row style="margin-top: 20px; width: 100%">
             <el-col :span="8">
               <el-form-item label="联系人" prop="sellContactName">
-                <el-input
-                  v-model="formData.data.sellContactName"
-                  placeholder="请输入联系人"
-                />
+                <el-input v-model="formData.data.sellContactName" placeholder="请输入联系人" />
               </el-form-item>
             </el-col>
             <el-col :span="1"></el-col>
             <el-col :span="15">
               <el-form-item label=" " prop="sellContactNumber">
-                <el-input
-                  v-model="formData.data.sellContactNumber"
-                  placeholder="请输入联系人电话"
-                />
+                <el-input v-model="formData.data.sellContactNumber" placeholder="请输入联系人电话" />
               </el-form-item>
             </el-col>
           </el-row>
@@ -84,67 +54,39 @@
         <div style="width: 100%">
           <div style="width: 100%">
             <el-form-item prop="buyCorporationId">
-              <el-select
-                v-model="formData.data.buyCorporationId"
-                filterable
-                style="width: 100%"
-                @change="changeCustomer"
-              >
-                <el-option
-                  v-for="item in customerList"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
-                />
+              <el-select v-model="formData.data.buyCorporationId" filterable style="width: 100%" @change="changeCustomer">
+                <el-option v-for="item in customerList" :key="item.value" :label="item.label" :value="item.value" />
               </el-select>
             </el-form-item>
             <el-row style="margin-top: 20px; width: 100%">
               <el-col :span="6">
                 <el-form-item label="地址" prop="countryId">
-                  <el-select
-                    v-model="formData.data.countryId"
-                    placeholder="国家"
-                    filterable
-                    @change="(val) => getCityData(val, '20', true)"
-                    :no-match-text="'无数据,请联系管理员添加'">
-                    <el-option v-for="item in countryData" :key="item.id" :label="item.chineseName + '(' + item.name + ')'" :value="item.id"> </el-option>
+                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => getCityData(val, '20', true)"
+                             :no-match-text="'无数据,请联系管理员添加'">
+                    <el-option v-for="item in countryData" :key="item.id" :label="item.chineseName + '(' + item.name + ')'" :value="item.id">
+                    </el-option>
                   </el-select>
                 </el-form-item>
               </el-col>
               <el-col :span="1"></el-col>
               <el-col :span="5">
                 <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 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="1"></el-col>
               <el-col :span="5">
                 <el-form-item label=" " prop="cityName">
-                  <selectCity
-                    placeholder="城市"
-                    addressId="cityId"
-                    addressName="cityName"
-                    v-model="formData.data"
-                    :data="cityData"
-                  >
+                  <selectCity placeholder="城市" addressId="cityId" addressName="cityName" v-model="formData.data" :data="cityData">
                   </selectCity>
                 </el-form-item>
               </el-col>
               <el-col :span="1"></el-col>
               <el-col :span="5">
                 <el-form-item label=" " prop="buyPostalCode">
-                  <el-input
-                    v-model="formData.data.buyPostalCode"
-                    placeholder="请输入邮编"
-                  />
+                  <el-input v-model="formData.data.buyPostalCode" placeholder="请输入邮编" />
                 </el-form-item>
               </el-col>
             </el-row>
@@ -159,24 +101,15 @@
             <el-row style="margin-top: 20px; width: 100%">
               <el-col :span="8">
                 <el-form-item label="联系人" prop="buyContactName">
-                  <el-autocomplete
-                    v-model="formData.data.buyContactName"
-                    :fetch-suggestions="querySearchPerson"
-                    clearable
-                    class="inline-input w-50"
-                    placeholder="请输入联系人"
-                    @select="handlePerson"
-                  >
+                  <el-autocomplete v-model="formData.data.buyContactName" :fetch-suggestions="querySearchPerson" clearable class="inline-input w-50"
+                                   placeholder="请输入联系人" @select="handlePerson">
                   </el-autocomplete>
                 </el-form-item>
               </el-col>
               <el-col :span="1"></el-col>
               <el-col :span="15">
                 <el-form-item label=" " prop="buyContactNumber">
-                  <el-input
-                    v-model="formData.data.buyContactNumber"
-                    placeholder="请输入联系人电话"
-                  />
+                  <el-input v-model="formData.data.buyContactNumber" placeholder="请输入联系人电话" />
                 </el-form-item>
               </el-col>
             </el-row>
@@ -186,18 +119,11 @@
       <template #commodity>
         <div style="width: 100%">
           <el-button @click="openProduct = true">添加商品</el-button>
-          <el-table
-            :data="formData.data.contractProductList"
-            style="width: 100%; margin-top: 16px"
-          >
+          <el-table :data="formData.data.contractProductList" style="width: 100%; margin-top: 16px">
             <el-table-column label="商品图片" width="80">
               <template #default="{ row }">
                 <div v-if="row.fileUrl">
-                  <img
-                    :src="row.fileUrl"
-                    class="pic"
-                    @click="onPicture(row.fileUrl)"
-                  />
+                  <img :src="row.fileUrl" class="pic" @click="onPicture(row.fileUrl)" />
                 </div>
                 <div v-else></div>
               </template>
@@ -207,15 +133,8 @@
             <el-table-column label="商品英文名" min-width="200">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item
-                    :prop="'contractProductList.' + $index + '.productName'"
-                    :rules="rules.productName"
-                    :inline-message="true"
-                  >
-                    <el-input
-                      v-model="row.productName"
-                      placeholder="请输入商品英文名"
-                    />
+                  <el-form-item :prop="'contractProductList.' + $index + '.productName'" :rules="rules.productName" :inline-message="true">
+                    <el-input v-model="row.productName" placeholder="请输入商品英文名" />
                   </el-form-item>
                 </div>
               </template>
@@ -223,40 +142,19 @@
             <el-table-column label="规格型号" width="180">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item
-                    :prop="'contractProductList.' + $index + '.productModel'"
-                    :inline-message="true"
-                  >
-                    <el-input
-                      v-model="row.productModel"
-                      placeholder="请输入规格型号"
-                    />
+                  <el-form-item :prop="'contractProductList.' + $index + '.productModel'" :inline-message="true">
+                    <el-input v-model="row.productModel" placeholder="请输入规格型号" />
                   </el-form-item>
                 </div>
               </template>
             </el-table-column>
-            <el-table-column
-              prop="unit"
-              label="单位"
-              width="100"
-              :formatter="(row) => dictValueLabel(row.unit, productUnit)"
-            />
+            <el-table-column prop="unit" label="单位" width="100" :formatter="(row) => dictValueLabel(row.unit, productUnit)" />
             <el-table-column label="数量" width="160">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item
-                    :prop="'contractProductList.' + $index + '.quantity'"
-                    :rules="rules.quantity"
-                    :inline-message="true"
-                  >
-                    <el-input-number
-                      onmousewheel="return false;"
-                      v-model="row.quantity"
-                      placeholder="请输入数量"
-                      style="width: 100%"
-                      :controls="false"
-                      :min="0"
-                      @change="
+                  <el-form-item :prop="'contractProductList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true">
+                    <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入数量" style="width: 100%" :controls="false"
+                                     :min="0" @change="
                         () => {
                           return calculationAmount(
                             'contractProductList',
@@ -264,8 +162,7 @@
                             'quantity'
                           );
                         }
-                      "
-                    />
+                      " />
                   </el-form-item>
                 </div>
               </template>
@@ -273,19 +170,9 @@
             <el-table-column label="单价" width="160">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item
-                    :prop="'contractProductList.' + $index + '.price'"
-                    :rules="rules.price"
-                    :inline-message="true"
-                  >
-                    <el-input-number
-                      onmousewheel="return false;"
-                      v-model="row.price"
-                      placeholder="请输入单价"
-                      style="width: 100%"
-                      :controls="false"
-                      :min="0"
-                      @change="
+                  <el-form-item :prop="'contractProductList.' + $index + '.price'" :rules="rules.price" :inline-message="true">
+                    <el-input-number onmousewheel="return false;" v-model="row.price" placeholder="请输入单价" style="width: 100%" :controls="false"
+                                     :min="0" @change="
                         () => {
                           return calculationAmount(
                             'contractProductList',
@@ -293,32 +180,16 @@
                             'price'
                           );
                         }
-                      "
-                    />
+                      " />
                   </el-form-item>
                 </div>
               </template>
             </el-table-column>
             <el-table-column prop="amount" label="金额" width="100" />
-            <el-table-column
-              align="center"
-              label="操作"
-              width="120"
-              fixed="right"
-            >
+            <el-table-column align="center" label="操作" width="120" fixed="right">
               <template #default="{ row, $index }">
-                <el-button
-                  type="primary"
-                  link
-                  @click="handleHandover(row, $index)"
-                  >交接单</el-button
-                >
-                <el-button
-                  type="primary"
-                  link
-                  @click="handleRemove($index, row)"
-                  >删除</el-button
-                >
+                <el-button type="primary" link @click="handleHandover(row, $index)">交接单</el-button>
+                <el-button type="primary" link @click="handleRemove($index, row)">删除</el-button>
               </template>
             </el-table-column>
           </el-table>
@@ -327,25 +198,13 @@
       <template #otherCharge>
         <div style="width: 100%">
           <el-button type="primary" @click="clickAdd()">添加行</el-button>
-          <el-table
-            :data="formData.data.contractProjectList"
-            style="width: 100%; margin-top: 16px"
-          >
+          <el-table :data="formData.data.contractProjectList" style="width: 100%; margin-top: 16px">
             <el-table-column label="收费项目" width="220">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item
-                    :prop="'contractProjectList.' + $index + '.payName'"
-                    :rules="rules.payName"
-                    :inline-message="true"
-                  >
-                    <el-autocomplete
-                      v-model="row.payName"
-                      :fetch-suggestions="querySearch"
-                      clearable
-                      class="inline-input w-50"
-                      placeholder="请输入收费项目"
-                    />
+                  <el-form-item :prop="'contractProjectList.' + $index + '.payName'" :rules="rules.payName" :inline-message="true">
+                    <el-autocomplete v-model="row.payName" :fetch-suggestions="querySearch" clearable class="inline-input w-50"
+                                     placeholder="请输入收费项目" />
                   </el-form-item>
                 </div>
               </template>
@@ -353,19 +212,9 @@
             <el-table-column label="金额" width="180">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item
-                    :prop="'contractProjectList.' + $index + '.amount'"
-                    :rules="rules.amount"
-                    :inline-message="true"
-                  >
-                    <el-input-number
-                      onmousewheel="return false;"
-                      v-model="row.amount"
-                      placeholder="请输入金额"
-                      style="width: 100%"
-                      :controls="false"
-                      :min="0"
-                      @change="
+                  <el-form-item :prop="'contractProjectList.' + $index + '.amount'" :rules="rules.amount" :inline-message="true">
+                    <el-input-number onmousewheel="return false;" v-model="row.amount" placeholder="请输入金额" style="width: 100%" :controls="false"
+                                     :min="0" @change="
                         () => {
                           return totalAmount(
                             'contractProjectList',
@@ -373,8 +222,7 @@
                             'amount'
                           );
                         }
-                      "
-                    />
+                      " />
                   </el-form-item>
                 </div>
               </template>
@@ -382,24 +230,15 @@
             <el-table-column label="备注">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item
-                    :prop="'contractProjectList.' + $index + '.remark'"
-                  >
+                  <el-form-item :prop="'contractProjectList.' + $index + '.remark'">
                     <el-input v-model="row.remark" placeholder="请输入备注" />
                   </el-form-item>
                 </div>
               </template>
             </el-table-column>
-            <el-table-column
-              align="center"
-              label="操作"
-              width="80"
-              fixed="right"
-            >
+            <el-table-column align="center" label="操作" width="80" fixed="right">
               <template #default="{ row, $index }">
-                <el-button type="primary" link @click="handleDelete($index)"
-                  >删除</el-button
-                >
+                <el-button type="primary" link @click="handleDelete($index)">删除</el-button>
               </template>
             </el-table-column>
           </el-table>
@@ -410,78 +249,38 @@
           <el-row style="margin-top: 20px; width: 100%">
             <el-col :span="4">
               <el-form-item label="币种" prop="currency">
-                <el-select
-                  v-model="formData.data.currency"
-                  placeholder="请选择币种"
-                  style="width: 100%"
-                >
-                  <el-option
-                    v-for="item in accountCurrency"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value"
-                  />
+                <el-select v-model="formData.data.currency" placeholder="请选择币种" style="width: 100%">
+                  <el-option v-for="item in accountCurrency" :key="item.value" :label="item.label" :value="item.value" />
                 </el-select>
               </el-form-item>
             </el-col>
             <el-col :span="1"></el-col>
             <el-col :span="6">
               <el-form-item label="合同总金额" prop="amount">
-                <el-input
-                  v-model="formData.data.amount"
-                  placeholder="合同总金额"
-                  disabled
-                />
+                <el-input v-model="formData.data.amount" placeholder="合同总金额" disabled />
               </el-form-item>
             </el-col>
           </el-row>
           <el-row style="margin-top: 20px; width: 100%">
             <el-col :span="6">
               <el-form-item label="付款方式" prop="paymentMethod">
-                <el-select
-                  v-model="formData.data.paymentMethod"
-                  placeholder="请选择付款方式"
-                  style="width: 100%"
-                >
-                  <el-option
-                    v-for="item in fundsPaymentMethod"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value"
-                  />
+                <el-select v-model="formData.data.paymentMethod" placeholder="请选择付款方式" style="width: 100%">
+                  <el-option v-for="item in fundsPaymentMethod" :key="item.value" :label="item.label" :value="item.value" />
                 </el-select>
               </el-form-item>
             </el-col>
             <el-col :span="1"></el-col>
             <el-col :span="6">
               <el-form-item label="预付比例 (%)" prop="advanceRatio">
-                <el-input-number
-                  onmousewheel="return false;"
-                  v-model="formData.data.advanceRatio"
-                  placeholder="请输入预付比例"
-                  style="width: 100%"
-                  :precision="2"
-                  :controls="false"
-                  :min="0"
-                  :max="100"
-                />
+                <el-input-number onmousewheel="return false;" v-model="formData.data.advanceRatio" placeholder="请输入预付比例" style="width: 100%"
+                                 :precision="2" :controls="false" :min="0" :max="100" />
               </el-form-item>
             </el-col>
             <el-col :span="1"></el-col>
             <el-col :span="6">
               <el-form-item label="收款账号" prop="shroffAccountId">
-                <el-select
-                  v-model="formData.data.shroffAccountId"
-                  placeholder="请选择收款账号"
-                  style="width: 100%"
-                  @change="changeShroffAccount"
-                >
-                  <el-option
-                    v-for="item in accountList"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value"
-                  />
+                <el-select v-model="formData.data.shroffAccountId" placeholder="请选择收款账号" style="width: 100%" @change="changeShroffAccount">
+                  <el-option v-for="item in accountList" :key="item.value" :label="item.label" :value="item.value" />
                 </el-select>
               </el-form-item>
             </el-col>
@@ -500,62 +299,29 @@
               <el-collapse-item title="" name="1">
                 <el-row style="width: 100%">
                   <el-col :span="9">
-                    <el-form-item
-                      label="Beneficiary Name"
-                      prop="beneficiaryName"
-                    >
-                      <el-input
-                        v-model="formData.data.beneficiaryName"
-                        placeholder="请输入Beneficiary Name"
-                      />
+                    <el-form-item label="Beneficiary Name" prop="beneficiaryName">
+                      <el-input v-model="formData.data.beneficiaryName" placeholder="请输入Beneficiary Name" />
                     </el-form-item>
                     <div style="height: 20px"></div>
-                    <el-form-item
-                      label="Beneficiary Bank"
-                      prop="beneficiaryBank"
-                    >
-                      <el-input
-                        v-model="formData.data.beneficiaryBank"
-                        placeholder="请输入Beneficiary Bank"
-                      />
+                    <el-form-item label="Beneficiary Bank" prop="beneficiaryBank">
+                      <el-input v-model="formData.data.beneficiaryBank" placeholder="请输入Beneficiary Bank" />
                     </el-form-item>
                     <div style="height: 20px"></div>
-                    <el-form-item
-                      label="Beneficiary Bank Address"
-                      prop="beneficiaryBankAddress"
-                    >
-                      <el-input
-                        v-model="formData.data.beneficiaryBankAddress"
-                        placeholder="请输入Beneficiary Bank Address"
-                      />
+                    <el-form-item label="Beneficiary Bank Address" prop="beneficiaryBankAddress">
+                      <el-input v-model="formData.data.beneficiaryBankAddress" placeholder="请输入Beneficiary Bank Address" />
                     </el-form-item>
                   </el-col>
                   <el-col :span="9">
-                    <el-form-item
-                      label="Beneficiary Account Number"
-                      prop="beneficiaryAccountNumber"
-                    >
-                      <el-input
-                        v-model="formData.data.beneficiaryAccountNumber"
-                        placeholder="请输入Beneficiary Account Number"
-                      />
+                    <el-form-item label="Beneficiary Account Number" prop="beneficiaryAccountNumber">
+                      <el-input v-model="formData.data.beneficiaryAccountNumber" placeholder="请输入Beneficiary Account Number" />
                     </el-form-item>
                     <div style="height: 20px"></div>
                     <el-form-item label="Swift Code" prop="swiftCode">
-                      <el-input
-                        v-model="formData.data.swiftCode"
-                        placeholder="请输入Swift Code"
-                      />
+                      <el-input v-model="formData.data.swiftCode" placeholder="请输入Swift Code" />
                     </el-form-item>
                     <div style="height: 20px"></div>
-                    <el-form-item
-                      label="Beneficiary Address"
-                      prop="beneficiaryAddress"
-                    >
-                      <el-input
-                        v-model="formData.data.beneficiaryAddress"
-                        placeholder="请输入Beneficiary Address"
-                      />
+                    <el-form-item label="Beneficiary Address" prop="beneficiaryAddress">
+                      <el-input v-model="formData.data.beneficiaryAddress" placeholder="请输入Beneficiary Address" />
                     </el-form-item>
                   </el-col>
                 </el-row>
@@ -569,17 +335,8 @@
           <el-row style="margin-top: 20px; width: 100%">
             <el-col :span="7">
               <el-form-item label="贸易方式" prop="tradeMethods">
-                <el-select
-                  v-model="formData.data.tradeMethods"
-                  placeholder="请选择贸易方式"
-                  style="width: 100%"
-                >
-                  <el-option
-                    v-for="item in tradeMethods"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value"
-                  />
+                <el-select v-model="formData.data.tradeMethods" placeholder="请选择贸易方式" style="width: 100%">
+                  <el-option v-for="item in tradeMethods" :key="item.value" :label="item.label" :value="item.value" />
                 </el-select>
               </el-form-item>
             </el-col>
@@ -587,68 +344,37 @@
           <el-row style="margin-top: 20px; width: 100%">
             <el-col :span="7">
               <el-form-item label="运输方式" prop="transportMethod">
-                <el-select
-                  v-model="formData.data.transportMethod"
-                  placeholder="请选择运输方式"
-                  style="width: 100%"
-                >
-                  <el-option
-                    v-for="item in shippingMethod"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value"
-                  />
+                <el-select v-model="formData.data.transportMethod" placeholder="请选择运输方式" style="width: 100%">
+                  <el-option v-for="item in shippingMethod" :key="item.value" :label="item.label" :value="item.value" />
                 </el-select>
               </el-form-item>
             </el-col>
             <el-col :span="1"></el-col>
             <el-col :span="7">
               <el-form-item label="运输说明" prop="transportRemark">
-                <el-input
-                  v-model="formData.data.transportRemark"
-                  placeholder="请输入运输说明"
-                />
+                <el-input v-model="formData.data.transportRemark" placeholder="请输入运输说明" />
               </el-form-item>
             </el-col>
           </el-row>
           <el-row style="margin-top: 20px; width: 100%">
             <el-col :span="15">
               <el-form-item label="付款条件" prop="remark">
-                <el-input
-                  v-model="formData.data.remark"
-                  :rows="2"
-                  type="textarea"
-                  placeholder="请输入付款条件"
-                />
+                <el-input v-model="formData.data.remark" :rows="2" type="textarea" placeholder="请输入付款条件" />
               </el-form-item>
             </el-col>
           </el-row>
           <el-row style="margin-top: 20px; width: 100%">
             <el-col :span="7">
               <el-form-item label="交货期限 (天)" prop="deliveryTime">
-                <el-input-number
-                  onmousewheel="return false;"
-                  v-model="formData.data.deliveryTime"
-                  placeholder="请输入交货期限"
-                  style="width: 100%"
-                  :precision="0"
-                  :controls="false"
-                  :min="0"
-                />
+                <el-input-number onmousewheel="return false;" v-model="formData.data.deliveryTime" placeholder="请输入交货期限" style="width: 100%"
+                                 :precision="0" :controls="false" :min="0" />
               </el-form-item>
             </el-col>
             <el-col :span="1"></el-col>
             <el-col :span="7">
               <el-form-item label="质保期 (天)" prop="warranty">
-                <el-input-number
-                  onmousewheel="return false;"
-                  v-model="formData.data.warranty"
-                  placeholder="请输入质保期"
-                  style="width: 100%"
-                  :precision="0"
-                  :controls="false"
-                  :min="0"
-                />
+                <el-input-number onmousewheel="return false;" v-model="formData.data.warranty" placeholder="请输入质保期" style="width: 100%" :precision="0"
+                                 :controls="false" :min="0" />
               </el-form-item>
             </el-col>
           </el-row>
@@ -656,26 +382,14 @@
       </template>
       <template #shipment>
         <div style="width: 100%">
-          <el-table
-            :data="formData.data.contractShipmentList"
-            style="width: 100%; margin-top: 16px"
-          >
+          <el-table :data="formData.data.contractShipmentList" style="width: 100%; margin-top: 16px">
             <el-table-column prop="code" label="商品编码" width="120" />
             <el-table-column prop="productName" label="商品名称" />
             <el-table-column label="出货日期" width="220">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item
-                    :prop="'contractShipmentList.' + $index + '.shipmentTime'"
-                    :rules="rules.shipmentTime"
-                    :inline-message="true"
-                  >
-                    <el-date-picker
-                      v-model="row.shipmentTime"
-                      type="date"
-                      placeholder="请选择出货日期"
-                      value-format="YYYY-MM-DD HH:mm:ss"
-                    />
+                  <el-form-item :prop="'contractShipmentList.' + $index + '.shipmentTime'" :rules="rules.shipmentTime" :inline-message="true">
+                    <el-date-picker v-model="row.shipmentTime" type="date" placeholder="请选择出货日期" value-format="YYYY-MM-DD HH:mm:ss" />
                   </el-form-item>
                 </div>
               </template>
@@ -683,18 +397,9 @@
             <el-table-column label="数量" width="160">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item
-                    :prop="'contractShipmentList.' + $index + '.quantity'"
-                    :inline-message="true"
-                  >
-                    <el-input-number
-                      onmousewheel="return false;"
-                      v-model="row.quantity"
-                      placeholder="请输入数量"
-                      style="width: 100%"
-                      :controls="false"
-                      :min="0"
-                      @change="
+                  <el-form-item :prop="'contractShipmentList.' + $index + '.quantity'" :inline-message="true">
+                    <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入数量" style="width: 100%" :controls="false"
+                                     :min="0" @change="
                         () => {
                           return calculationAmount(
                             'contractShipmentList',
@@ -702,25 +407,15 @@
                             'quantity'
                           );
                         }
-                      "
-                    />
+                      " />
                   </el-form-item>
                 </div>
               </template>
             </el-table-column>
-            <el-table-column
-              align="center"
-              label="操作"
-              width="120"
-              fixed="right"
-            >
+            <el-table-column align="center" label="操作" width="120" fixed="right">
               <template #default="{ row, $index }">
-                <el-button type="primary" link @click="clickSplit(row)"
-                  >拆分</el-button
-                >
-                <el-button type="primary" link @click="clickDelete($index)"
-                  >删除</el-button
-                >
+                <el-button type="primary" link @click="clickSplit(row)">拆分</el-button>
+                <el-button type="primary" link @click="clickDelete($index)">删除</el-button>
               </template>
             </el-table-column>
           </el-table>
@@ -728,50 +423,21 @@
       </template>
     </byForm>
 
-    <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="70%" append-to-body>
+      <SelectGoods :selectList="acquireSelectList()" @cancel="openProduct = false" @pushGoods="pushGoods"></SelectGoods>
     </el-dialog>
 
-    <el-dialog
-      title="交接单"
-      v-if="openHandover"
-      v-model="openHandover"
-      width="800"
-    >
-      <byForm
-        :formConfig="formHandoverConfig"
-        :formOption="formOption"
-        v-model="productRow.data"
-      >
+    <el-dialog title="交接单" v-if="openHandover" v-model="openHandover" width="800">
+      <byForm :formConfig="formHandoverConfig" :formOption="formOption" v-model="productRow.data">
         <template #remark>
           <div style="width: 100%">
-            <Editor
-              :value="productRow.data.remark"
-              @updateValue="updateContent"
-            />
+            <Editor :value="productRow.data.remark" @updateValue="updateContent" />
           </div>
         </template>
         <template #file>
           <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-success="handleSuccess"
-              :on-preview="onPreviewFile"
-            >
+            <el-upload v-model:fileList="fileList" :action="uploadUrl" :data="uploadData" multiple :before-upload="uploadFile"
+                       :on-success="handleSuccess" :on-preview="onPreviewFile">
               <el-button>选择</el-button>
             </el-upload>
           </div>
@@ -779,9 +445,7 @@
       </byForm>
       <template #footer>
         <el-button @click="openHandover = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitHandoverForm()" size="large"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitHandoverForm()" size="large">确 定</el-button>
       </template>
     </el-dialog>
   </div>

Dosya farkı çok büyük olduğundan ihmal edildi
+ 346 - 401
src/components/process/ContractAlteration.vue


+ 231 - 187
src/components/process/EHSD/Contract.vue

@@ -64,13 +64,8 @@
               </el-col>
               <el-col :span="6">
                 <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 placeholder="省/洲" @change="(val) => getCityData(val, '30', true)" addressId="provinceId" addressName="provinceName"
+                              v-model="formData.data" :data="provinceData">
                   </selectCity>
                 </el-form-item>
               </el-col>
@@ -95,13 +90,8 @@
             <el-row style="margin-top: 20px; width: 100%">
               <el-col :span="8">
                 <el-form-item label="联系人" prop="buyContactName">
-                  <el-autocomplete
-                    v-model="formData.data.buyContactName"
-                    :fetch-suggestions="querySearchPerson"
-                    clearable
-                    class="inline-input w-50"
-                    placeholder="请输入联系人"
-                    @select="handlePerson">
+                  <el-autocomplete v-model="formData.data.buyContactName" :fetch-suggestions="querySearchPerson" clearable class="inline-input w-50"
+                                   placeholder="请输入联系人" @select="handlePerson">
                   </el-autocomplete>
                 </el-form-item>
               </el-col>
@@ -133,15 +123,8 @@
             </el-col>
             <el-col :span="6">
               <el-form-item label="预付比例 (%)" prop="advanceRatio">
-                <el-input-number
-                  onmousewheel="return false;"
-                  v-model="formData.data.advanceRatio"
-                  placeholder="请输入预付比例"
-                  style="width: 100%"
-                  :precision="2"
-                  :controls="false"
-                  :min="0"
-                  :max="100" />
+                <el-input-number onmousewheel="return false;" v-model="formData.data.advanceRatio" placeholder="请输入预付比例" style="width: 100%"
+                                 :precision="2" :controls="false" :min="0" :max="100" />
               </el-form-item>
             </el-col>
           </el-row>
@@ -210,14 +193,8 @@
           <el-row style="margin-top: 20px; width: 100%">
             <el-col :span="6">
               <el-form-item label="报价有效期 (天)" prop="effective">
-                <el-input-number
-                  onmousewheel="return false;"
-                  v-model="formData.data.effective"
-                  placeholder="请输入有效期"
-                  style="width: 100%"
-                  :precision="0"
-                  :controls="false"
-                  :min="0" />
+                <el-input-number onmousewheel="return false;" v-model="formData.data.effective" placeholder="请输入有效期" style="width: 100%"
+                                 :precision="0" :controls="false" :min="0" />
               </el-form-item>
             </el-col>
             <el-col :span="6">
@@ -256,11 +233,8 @@
             <el-table-column label="商品名称" min-width="180">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item
-                    :prop="'contractProductList.' + $index + '.productName'"
-                    :rules="rules.productName"
-                    :inline-message="true"
-                    class="shrinkPadding">
+                  <el-form-item :prop="'contractProductList.' + $index + '.productName'" :rules="rules.productName" :inline-message="true"
+                                class="shrinkPadding">
                     <el-input v-model="row.productName" placeholder="请输入商品名称" />
                   </el-form-item>
                 </div>
@@ -269,11 +243,8 @@
             <el-table-column label="尺寸 cm*cm*cm" width="140">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item
-                    :prop="'contractProductList.' + $index + '.productModel'"
-                    :rules="rules.productModel"
-                    :inline-message="true"
-                    class="shrinkPadding">
+                  <el-form-item :prop="'contractProductList.' + $index + '.productModel'" :rules="rules.productModel" :inline-message="true"
+                                class="shrinkPadding">
                     <el-input v-model="row.productModel" placeholder="请输入" />
                   </el-form-item>
                 </div>
@@ -282,16 +253,10 @@
             <el-table-column label="数量" width="130">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item :prop="'contractProductList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="shrinkPadding">
-                    <el-input-number
-                      onmousewheel="return false;"
-                      v-model="row.quantity"
-                      placeholder="请输入"
-                      style="width: 100%"
-                      :precision="0"
-                      :controls="false"
-                      :min="0"
-                      @change="calculationAmount()" />
+                  <el-form-item :prop="'contractProductList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true"
+                                class="shrinkPadding">
+                    <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="0"
+                                     :controls="false" :min="0" @change="calculationAmount()" />
                   </el-form-item>
                 </div>
               </template>
@@ -300,15 +265,8 @@
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   <el-form-item :prop="'contractProductList.' + $index + '.price'" :rules="rules.price" :inline-message="true" class="shrinkPadding">
-                    <el-input-number
-                      onmousewheel="return false;"
-                      v-model="row.price"
-                      placeholder="请输入"
-                      style="width: 100%"
-                      :precision="2"
-                      :controls="false"
-                      :min="0"
-                      @change="calculationAmount()" />
+                    <el-input-number onmousewheel="return false;" v-model="row.price" placeholder="请输入" style="width: 100%" :precision="2"
+                                     :controls="false" :min="0" @change="calculationAmount()" />
                   </el-form-item>
                 </div>
               </template>
@@ -316,11 +274,8 @@
             <el-table-column label="贸易方式" width="140">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item
-                    :prop="'contractProductList.' + $index + '.tradeMethods'"
-                    :rules="rules.tradeMethods"
-                    :inline-message="true"
-                    class="shrinkPadding">
+                  <el-form-item :prop="'contractProductList.' + $index + '.tradeMethods'" :rules="rules.tradeMethods" :inline-message="true"
+                                class="shrinkPadding">
                     <el-select v-model="row.tradeMethods" placeholder="请选择" style="width: 100%">
                       <el-option v-for="item in tradeMethods" :key="item.value" :label="item.label" :value="item.value" />
                     </el-select>
@@ -331,7 +286,8 @@
             <el-table-column label="包装方式" width="180">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item :prop="'contractProductList.' + $index + '.packMethod'" :rules="rules.packMethod" :inline-message="true" class="shrinkPadding">
+                  <el-form-item :prop="'contractProductList.' + $index + '.packMethod'" :rules="rules.packMethod" :inline-message="true"
+                                class="shrinkPadding">
                     <el-input v-model="row.packMethod" placeholder="请输入" />
                   </el-form-item>
                 </div>
@@ -348,28 +304,16 @@
       </template>
       <template #file>
         <div style="width: 100%">
-          <el-upload
-            v-model:fileList="formData.data.fileList"
-            action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-            :data="uploadData"
-            multiple
-            :before-upload="uploadFile"
-            :on-success="handleSuccess"
-            :on-preview="onPreviewFile">
+          <el-upload v-model:fileList="formData.data.fileList" :action="uploadUrl" :data="uploadData" multiple :before-upload="uploadFile"
+                     :on-success="handleSuccess" :on-preview="onPreviewFile">
             <el-button type="primary" plain>选择</el-button>
           </el-upload>
         </div>
       </template>
       <template #indication>
         <div style="width: 100%">
-          <el-upload
-            v-model:fileList="formData.data.packageFileList"
-            action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-            :data="indicationUploadData"
-            multiple
-            :before-upload="indicationUploadFile"
-            :on-success="handleSuccess"
-            :on-preview="onPreviewFile">
+          <el-upload v-model:fileList="formData.data.packageFileList" :action="uploadUrl" :data="indicationUploadData" multiple
+                     :before-upload="indicationUploadFile" :on-success="handleSuccess" :on-preview="onPreviewFile">
             <el-button type="primary" plain>选择</el-button>
           </el-upload>
         </div>
@@ -382,7 +326,8 @@
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   <el-form-item :prop="'contractProjectList.' + $index + '.payName'" :rules="rules.payName" :inline-message="true">
-                    <el-autocomplete v-model="row.payName" :fetch-suggestions="querySearch" clearable class="inline-input w-50" placeholder="请输入收费项目" />
+                    <el-autocomplete v-model="row.payName" :fetch-suggestions="querySearch" clearable class="inline-input w-50"
+                                     placeholder="请输入收费项目" />
                   </el-form-item>
                 </div>
               </template>
@@ -399,16 +344,10 @@
             <el-table-column :label="'金额 ( ' + formData.data.currency + ' )'" width="130">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item :prop="'contractProjectList.' + $index + '.amount'" :rules="rules.amount" :inline-message="true" class="shrinkPadding">
-                    <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 :prop="'contractProjectList.' + $index + '.amount'" :rules="rules.amount" :inline-message="true"
+                                class="shrinkPadding">
+                    <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>
@@ -449,15 +388,8 @@
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   <el-form-item :prop="'contractShipmentList.' + $index + '.quantity'" :inline-message="true">
-                    <el-input-number
-                      onmousewheel="return false;"
-                      v-model="row.quantity"
-                      placeholder="请输入数量"
-                      style="width: 100%"
-                      :precision="0"
-                      :controls="false"
-                      :min="0"
-                      @change="calculationAmount()" />
+                    <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入数量" style="width: 100%" :precision="0"
+                                     :controls="false" :min="0" @change="calculationAmount()" />
                   </el-form-item>
                 </div>
               </template>
@@ -527,7 +459,9 @@ const judgeStatus = () => {
     return true;
   }
   if (props.queryData.recordList && props.queryData.recordList.length > 0) {
-    let data = props.queryData.recordList.filter((item) => item.status === 2 && item.nodeType !== 1);
+    let data = props.queryData.recordList.filter(
+      (item) => item.status === 2 && item.nodeType !== 1
+    );
     if (data && data.length > 0) {
       return true;
     }
@@ -613,29 +547,55 @@ const formConfig = computed(() => {
   ];
 });
 const rules = ref({
-  contractTemplateId: [{ required: true, message: "请选择合同模板", trigger: "change" }],
-  buyCorporationId: [{ required: true, message: "请选择公司", trigger: "change" }],
+  contractTemplateId: [
+    { 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" }],
+  buyContactName: [
+    { required: true, message: "请输入联系人", trigger: ["change", "blur"] },
+  ],
+  buyContactNumber: [
+    { required: true, message: "请输入联系电话", trigger: "blur" },
+  ],
   productName: [{ required: true, message: "请输入商品名称", trigger: "blur" }],
-  productModel: [{ required: true, message: "请输入尺寸 cm*cm*cm", trigger: "blur" }],
+  productModel: [
+    { required: true, message: "请输入尺寸 cm*cm*cm", trigger: "blur" },
+  ],
   quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
   price: [{ required: true, message: "请输入单价", trigger: "blur" }],
   packMethod: [{ required: true, message: "请输入包装方式", trigger: "blur" }],
   amount: [{ required: true, message: "请输入金额", trigger: "blur" }],
-  payName: [{ required: true, message: "请输入收费项目", trigger: ["change", "blur"] }],
+  payName: [
+    { required: true, message: "请输入收费项目", trigger: ["change", "blur"] },
+  ],
   currency: [{ required: true, message: "请选择币种", trigger: "change" }],
   effective: [{ required: true, message: "请输入报价有效期", trigger: "blur" }],
-  deliveryTime: [{ required: true, message: "请选择交货期限", trigger: "change" }],
-  paymentMethod: [{ required: true, message: "请选择付款方式", trigger: "change" }],
-  advanceRatio: [{ required: true, message: "请输入预付比例", trigger: "blur" }],
-  shroffAccountId: [{ required: true, message: "请选择收款账号", trigger: "change" }],
-  tradeMethods: [{ required: true, message: "请选择贸易方式", trigger: "change" }],
-  transportMethod: [{ required: true, message: "请选择运输方式", trigger: "change" }],
-  transportRemark: [{ required: true, message: "请输入运输说明", trigger: "blur" }],
+  deliveryTime: [
+    { required: true, message: "请选择交货期限", trigger: "change" },
+  ],
+  paymentMethod: [
+    { required: true, message: "请选择付款方式", trigger: "change" },
+  ],
+  advanceRatio: [
+    { required: true, message: "请输入预付比例", trigger: "blur" },
+  ],
+  shroffAccountId: [
+    { required: true, message: "请选择收款账号", trigger: "change" },
+  ],
+  tradeMethods: [
+    { required: true, message: "请选择贸易方式", trigger: "change" },
+  ],
+  transportMethod: [
+    { required: true, message: "请选择运输方式", trigger: "change" },
+  ],
+  transportRemark: [
+    { required: true, message: "请输入运输说明", trigger: "blur" },
+  ],
   remark: [{ required: true, message: "请输入付款条件", trigger: "blur" }],
 });
 const getDict = () => {
@@ -674,15 +634,17 @@ const getDict = () => {
         value: x.dictKey,
       }));
     });
-  proxy.post("/contractTemplate/page", { pageNum: 1, pageSize: 999 }).then((res) => {
-    templateList.value = res.rows.map((item) => {
-      return {
-        ...item,
-        label: item.templateName,
-        value: item.id,
-      };
+  proxy
+    .post("/contractTemplate/page", { pageNum: 1, pageSize: 999 })
+    .then((res) => {
+      templateList.value = res.rows.map((item) => {
+        return {
+          ...item,
+          label: item.templateName,
+          value: item.id,
+        };
+      });
     });
-  });
   proxy.post("/corporation/page", { pageNum: 1, pageSize: 999 }).then((res) => {
     corporationList.value = res.rows.map((item) => {
       return {
@@ -701,15 +663,17 @@ const getDict = () => {
       };
     });
   });
-  proxy.post("/accountManagement/page", { pageNum: 1, pageSize: 999 }).then((res) => {
-    accountList.value = res.rows.map((item) => {
-      return {
-        ...item,
-        label: item.alias,
-        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,
+        };
+      });
     });
-  });
 };
 getDict();
 const changeTemplate = (val) => {
@@ -724,41 +688,60 @@ const changeTemplate = (val) => {
     proxy.post("/contractTemplate/detail", { id: val }).then((res) => {
       formData.data.sellCorporationId = res.corporationId;
       if (res.corporationId) {
-        proxy.post("/corporation/detail", { id: res.corporationId }).then((detailCorporation) => {
-          proxy.post("/customizeArea/list", { parentId: "0" }).then((resCountry) => {
-            let sellCountryData = resCountry.filter((item) => item.id === detailCorporation.countryId);
-            if (sellCountryData && sellCountryData.length > 0) {
-              formData.data.sellCountryName = sellCountryData[0].chineseName;
+        proxy
+          .post("/corporation/detail", { id: res.corporationId })
+          .then((detailCorporation) => {
+            proxy
+              .post("/customizeArea/list", { parentId: "0" })
+              .then((resCountry) => {
+                let sellCountryData = resCountry.filter(
+                  (item) => item.id === detailCorporation.countryId
+                );
+                if (sellCountryData && sellCountryData.length > 0) {
+                  formData.data.sellCountryName =
+                    sellCountryData[0].chineseName;
+                } else {
+                  formData.data.sellCountryName = "";
+                }
+              });
+            if (detailCorporation.countryId) {
+              proxy
+                .post("/customizeArea/list", {
+                  parentId: detailCorporation.countryId,
+                })
+                .then((resProvince) => {
+                  let sellProvinceData = resProvince.filter(
+                    (item) => item.id === detailCorporation.provinceId
+                  );
+                  if (sellProvinceData && sellProvinceData.length > 0) {
+                    formData.data.sellProvinceName = sellProvinceData[0].name;
+                  } else {
+                    formData.data.sellProvinceName = "";
+                  }
+                });
+            } else {
+              formData.data.sellProvinceName = "";
+            }
+            if (detailCorporation.provinceId) {
+              proxy
+                .post("/customizeArea/list", {
+                  parentId: detailCorporation.provinceId,
+                })
+                .then((resCity) => {
+                  let sellCityData = resCity.filter(
+                    (item) => item.id === detailCorporation.cityId
+                  );
+                  if (sellCityData && sellCityData.length > 0) {
+                    formData.data.sellCityName = sellCityData[0].name;
+                  } else {
+                    formData.data.sellCityName = "";
+                  }
+                });
             } else {
-              formData.data.sellCountryName = "";
+              formData.data.sellCityName = "";
             }
+            formData.data.sellAddress = detailCorporation.address;
           });
-          if (detailCorporation.countryId) {
-            proxy.post("/customizeArea/list", { parentId: detailCorporation.countryId }).then((resProvince) => {
-              let sellProvinceData = resProvince.filter((item) => item.id === detailCorporation.provinceId);
-              if (sellProvinceData && sellProvinceData.length > 0) {
-                formData.data.sellProvinceName = sellProvinceData[0].name;
-              } else {
-                formData.data.sellProvinceName = "";
-              }
-            });
-          } else {
-            formData.data.sellProvinceName = "";
-          }
-          if (detailCorporation.provinceId) {
-            proxy.post("/customizeArea/list", { parentId: detailCorporation.provinceId }).then((resCity) => {
-              let sellCityData = resCity.filter((item) => item.id === detailCorporation.cityId);
-              if (sellCityData && sellCityData.length > 0) {
-                formData.data.sellCityName = sellCityData[0].name;
-              } else {
-                formData.data.sellCityName = "";
-              }
-            });
-          } else {
-            formData.data.sellCityName = "";
-          }
-          formData.data.sellAddress = detailCorporation.address;
-        });
       }
       formData.data.sellContactName = res.contactName;
       formData.data.sellContactNumber = res.contactNumber;
@@ -838,11 +821,15 @@ const changeCustomer = (val) => {
 };
 const createFilter = (queryString) => {
   return (restaurant) => {
-    return restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0;
+    return (
+      restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0
+    );
   };
 };
 const querySearchPerson = (queryString, callback) => {
-  const results = queryString ? customerUserList.value.filter(createFilter(queryString)) : customerUserList.value;
+  const results = queryString
+    ? customerUserList.value.filter(createFilter(queryString))
+    : customerUserList.value;
   callback(results);
 };
 const handlePerson = (item) => {
@@ -850,7 +837,9 @@ const handlePerson = (item) => {
 };
 const selectProduct = (goods) => {
   if (goods && goods.id) {
-    let data = formData.data.contractProductList.filter((item) => item.productId === goods.id);
+    let data = formData.data.contractProductList.filter(
+      (item) => item.productId === goods.id
+    );
     if (data && data.length > 0) {
       return ElMessage("该产品已添加");
     }
@@ -863,7 +852,8 @@ const selectProduct = (goods) => {
       let innerPackMethod = goods.innerPackMethod.split(",");
       innerPackMethod.map((item) => {
         if (packMethod) {
-          packMethod = packMethod + "," + proxy.dictValueLabel(item, innerMethod.value);
+          packMethod =
+            packMethod + "," + proxy.dictValueLabel(item, innerMethod.value);
         } else {
           packMethod = proxy.dictValueLabel(item, innerMethod.value);
         }
@@ -873,18 +863,23 @@ const selectProduct = (goods) => {
       let outerPackMethod = goods.outerPackMethod.split(",");
       outerPackMethod.map((item) => {
         if (packMethod) {
-          packMethod = packMethod + "," + proxy.dictValueLabel(item, outsideMethod.value);
+          packMethod =
+            packMethod + "," + proxy.dictValueLabel(item, outsideMethod.value);
         } else {
           packMethod = proxy.dictValueLabel(item, outsideMethod.value);
         }
       });
     }
-    if (formData.data.contractProductList && formData.data.contractProductList.length > 0) {
+    if (
+      formData.data.contractProductList &&
+      formData.data.contractProductList.length > 0
+    ) {
       formData.data.contractProductList.push({
         fileUrl: fileUrl,
         productId: goods.id,
         productName: goods.name,
-        productModel: goods.productLong + "*" + goods.productWide + "*" + goods.productHigh,
+        productModel:
+          goods.productLong + "*" + goods.productWide + "*" + goods.productHigh,
         quantity: undefined,
         price: undefined,
         amount: "",
@@ -897,7 +892,12 @@ const selectProduct = (goods) => {
           fileUrl: fileUrl,
           productId: goods.id,
           productName: goods.name,
-          productModel: goods.productLong + "*" + goods.productWide + "*" + goods.productHigh,
+          productModel:
+            goods.productLong +
+            "*" +
+            goods.productWide +
+            "*" +
+            goods.productHigh,
           quantity: undefined,
           price: undefined,
           amount: "",
@@ -925,17 +925,29 @@ const onPicture = (path) => {
   window.open(path, "_blank");
 };
 const handleRemove = async (index, row) => {
-  formData.data.contractShipmentList = formData.data.contractShipmentList.filter((item) => item.productId !== row.productId);
+  formData.data.contractShipmentList =
+    formData.data.contractShipmentList.filter(
+      (item) => item.productId !== row.productId
+    );
   await formData.data.contractProductList.splice(index, 1);
   totalAmount();
 };
 const calculationAmount = () => {
   nextTick(() => {
-    if (formData.data.contractProductList && formData.data.contractProductList.length > 0) {
+    if (
+      formData.data.contractProductList &&
+      formData.data.contractProductList.length > 0
+    ) {
       for (let i = 0; i < formData.data.contractProductList.length; i++) {
         let money = 0;
-        if (formData.data.contractProductList[i].quantity && formData.data.contractProductList[i].price) {
-          money = parseFloat(Number(formData.data.contractProductList[i].quantity) * Number(formData.data.contractProductList[i].price)).toFixed(2);
+        if (
+          formData.data.contractProductList[i].quantity &&
+          formData.data.contractProductList[i].price
+        ) {
+          money = parseFloat(
+            Number(formData.data.contractProductList[i].quantity) *
+              Number(formData.data.contractProductList[i].price)
+          ).toFixed(2);
         }
         formData.data.contractProductList[i].amount = money;
       }
@@ -947,31 +959,46 @@ const calculationAmount = () => {
 };
 const totalAmount = () => {
   let money = 0;
-  if (formData.data.contractProductList && formData.data.contractProductList.length > 0) {
+  if (
+    formData.data.contractProductList &&
+    formData.data.contractProductList.length > 0
+  ) {
     for (let i = 0; i < formData.data.contractProductList.length; i++) {
       if (formData.data.contractProductList[i].amount) {
-        money = parseFloat(Number(money) + Number(formData.data.contractProductList[i].amount)).toFixed(2);
+        money = parseFloat(
+          Number(money) + Number(formData.data.contractProductList[i].amount)
+        ).toFixed(2);
       }
     }
   }
-  if (formData.data.contractProjectList && formData.data.contractProjectList.length > 0) {
+  if (
+    formData.data.contractProjectList &&
+    formData.data.contractProjectList.length > 0
+  ) {
     for (let i = 0; i < formData.data.contractProjectList.length; i++) {
       if (formData.data.contractProjectList[i].amount) {
-        money = parseFloat(Number(money) + Number(formData.data.contractProjectList[i].amount)).toFixed(2);
+        money = parseFloat(
+          Number(money) + Number(formData.data.contractProjectList[i].amount)
+        ).toFixed(2);
       }
     }
   }
   formData.data.amount = money;
 };
 const clickAdd = () => {
-  if (formData.data.contractProjectList && formData.data.contractProjectList.length > 0) {
+  if (
+    formData.data.contractProjectList &&
+    formData.data.contractProjectList.length > 0
+  ) {
     formData.data.contractProjectList.push({
       payName: "",
       amount: undefined,
       remark: "",
     });
   } else {
-    formData.data.contractProjectList = [{ payName: "", amount: undefined, remark: "" }];
+    formData.data.contractProjectList = [
+      { payName: "", amount: undefined, remark: "" },
+    ];
   }
 };
 const handleDelete = async (index) => {
@@ -996,7 +1023,12 @@ const querySearch = (queryString, callback) => {
 const handleSubmit = async () => {
   let status = await submit.value.handleSubmit(() => {});
   if (status) {
-    if (!(formData.data.contractProductList && formData.data.contractProductList.length > 0)) {
+    if (
+      !(
+        formData.data.contractProductList &&
+        formData.data.contractProductList.length > 0
+      )
+    ) {
       ElMessage("请添加至少一件商品");
       return false;
     }
@@ -1008,7 +1040,10 @@ const handleSubmit = async () => {
         }
       }
     }
-    if (formData.data.packageFileList && formData.data.packageFileList.length > 0) {
+    if (
+      formData.data.packageFileList &&
+      formData.data.packageFileList.length > 0
+    ) {
       for (let i = 0; i < formData.data.packageFileList.length; i++) {
         if (formData.data.packageFileList[i].raw.uploadState) {
           ElMessage("文件上传中,请稍后提交");
@@ -1016,9 +1051,15 @@ const handleSubmit = async () => {
         }
       }
     }
-    if (formData.data.contractShipmentList && formData.data.contractShipmentList.length > 0) {
+    if (
+      formData.data.contractShipmentList &&
+      formData.data.contractShipmentList.length > 0
+    ) {
       for (let i = 0; i < formData.data.contractProductList.length; i++) {
-        let data = formData.data.contractShipmentList.filter((item) => item.productId === formData.data.contractProductList[i].productId);
+        let data = formData.data.contractShipmentList.filter(
+          (item) =>
+            item.productId === formData.data.contractProductList[i].productId
+        );
         if (data && data.length > 0) {
           let quantity = 0;
           for (let j = 0; j < data.length; j++) {
@@ -1118,7 +1159,10 @@ watch(
   props.queryData,
   () => {
     formOption.disabled = judgeStatus();
-    if (props.queryData && ["10", "20", "30"].includes(route.query.processType)) {
+    if (
+      props.queryData &&
+      ["10", "20", "30"].includes(route.query.processType)
+    ) {
       for (var text in props.queryData) {
         if (text === "fileList" || text === "packageFileList") {
           if (props.queryData[text] && props.queryData[text].length > 0) {

+ 289 - 183
src/components/process/EHSD/Purchase.vue

@@ -64,19 +64,15 @@
               </el-col>
               <el-col :span="6">
                 <el-form-item label=" " prop="provinceName">
-                  <selectCity
-                    placeholder="省/洲"
-                    @change="(val) => changeSellAddress(val, '30')"
-                    addressId="provinceId"
-                    addressName="provinceName"
-                    v-model="formData.data"
-                    :data="provinceData">
+                  <selectCity placeholder="省/洲" @change="(val) => changeSellAddress(val, '30')" 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">
-                  <selectCity placeholder="城市" addressId="cityId" addressName="cityName" v-model="formData.data" :data="cityData" @change="changeAddress">
+                  <selectCity placeholder="城市" addressId="cityId" addressName="cityName" v-model="formData.data" :data="cityData"
+                              @change="changeAddress">
                   </selectCity>
                 </el-form-item>
               </el-col>
@@ -154,14 +150,8 @@
             </el-col>
             <el-col :span="6">
               <el-form-item label="质保期 (天)" prop="warranty">
-                <el-input-number
-                  onmousewheel="return false;"
-                  v-model="formData.data.warranty"
-                  placeholder="请输入质保期"
-                  style="width: 100%"
-                  :precision="0"
-                  :controls="false"
-                  :min="0" />
+                <el-input-number onmousewheel="return false;" v-model="formData.data.warranty" placeholder="请输入质保期" style="width: 100%" :precision="0"
+                                 :controls="false" :min="0" />
               </el-form-item>
             </el-col>
           </el-row>
@@ -169,10 +159,8 @@
       </template>
       <template #commodity>
         <div style="width: 100%" v-if="formData.data.purchaseProductList && formData.data.purchaseProductList.length > 0">
-          <div
-            :style="index !== formData.data.purchaseProductList.length - 1 ? 'margin-bottom: 20px' : ''"
-            v-for="(item, index) in formData.data.purchaseProductList"
-            :key="item.dataResourceId">
+          <div :style="index !== formData.data.purchaseProductList.length - 1 ? 'margin-bottom: 20px' : ''"
+               v-for="(item, index) in formData.data.purchaseProductList" :key="item.dataResourceId">
             <div style="border: 1px solid #ccc; padding: 20px 10px 0 10px; width: 100%">
               <el-row style="width: 100%" :gutter="5" type="flex" align="middle">
                 <el-col :span="2" style="text-align: center">
@@ -219,22 +207,14 @@
                       <el-table-column label="单价" width="140">
                         <template #default="{ row, $index }">
                           <div style="width: 100%" class="removePadding">
-                            <el-form-item
-                              :prop="'purchaseProductList.' + index + '.purchaseProductMountingsList.' + $index + '.price'"
-                              :rules="rules.price"
-                              :inline-message="true"
-                              @change="
+                            <el-form-item :prop="'purchaseProductList.' + index + '.purchaseProductMountingsList.' + $index + '.price'"
+                                          :rules="rules.price" :inline-message="true" @change="
                                 () => {
                                   return changeProductMaterial(index, $index);
                                 }
                               ">
-                              <el-input-number
-                                onmousewheel="return false;"
-                                v-model="row.price"
-                                placeholder="请输入单价"
-                                :precision="2"
-                                :controls="false"
-                                :min="0" />
+                              <el-input-number onmousewheel="return false;" v-model="row.price" placeholder="请输入单价" :precision="2" :controls="false"
+                                               :min="0" />
                             </el-form-item>
                           </div>
                         </template>
@@ -242,22 +222,14 @@
                       <el-table-column label="数量" width="140">
                         <template #default="{ row, $index }">
                           <div style="width: 100%" class="removePadding">
-                            <el-form-item
-                              :prop="'purchaseProductList.' + index + '.purchaseProductMountingsList.' + $index + '.quantity'"
-                              :rules="rules.quantity"
-                              :inline-message="true"
-                              @change="
+                            <el-form-item :prop="'purchaseProductList.' + index + '.purchaseProductMountingsList.' + $index + '.quantity'"
+                                          :rules="rules.quantity" :inline-message="true" @change="
                                 () => {
                                   return changeProductMaterial(index, $index);
                                 }
                               ">
-                              <el-input-number
-                                onmousewheel="return false;"
-                                v-model="row.quantity"
-                                placeholder="请输入数量"
-                                :precision="0"
-                                :controls="false"
-                                :min="0" />
+                              <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入数量" :precision="0"
+                                               :controls="false" :min="0" />
                             </el-form-item>
                           </div>
                         </template>
@@ -276,11 +248,15 @@
                 <el-button type="primary" @click="item.activeName = !item.activeName" style="margin-bottom: -28px" text>
                   <span v-if="item.activeName">
                     <span style="vertical-align: middle">收起明细</span>
-                    <el-icon style="margin-left: 8px; transform: rotate(-90deg); vertical-align: middle"><DArrowRight /></el-icon>
+                    <el-icon style="margin-left: 8px; transform: rotate(-90deg); vertical-align: middle">
+                      <DArrowRight />
+                    </el-icon>
                   </span>
                   <span v-else>
                     <span style="vertical-align: middle">查看明细</span>
-                    <el-icon style="margin-left: 8px; transform: rotate(90deg); vertical-align: middle"><DArrowRight /></el-icon>
+                    <el-icon style="margin-left: 8px; transform: rotate(90deg); vertical-align: middle">
+                      <DArrowRight />
+                    </el-icon>
                   </span>
                 </el-button>
               </div>
@@ -296,7 +272,8 @@
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   <el-form-item :prop="'purchaseProjectList.' + $index + '.payName'" :rules="rules.payName" :inline-message="true">
-                    <el-autocomplete v-model="row.payName" :fetch-suggestions="querySearch" clearable class="inline-input w-50" placeholder="请输入收费项目" />
+                    <el-autocomplete v-model="row.payName" :fetch-suggestions="querySearch" clearable class="inline-input w-50"
+                                     placeholder="请输入收费项目" />
                   </el-form-item>
                 </div>
               </template>
@@ -313,20 +290,10 @@
             <el-table-column label="金额" width="130">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item
-                    :prop="'purchaseProjectList.' + $index + '.amount'"
-                    :rules="rules.amount"
-                    :inline-message="true"
-                    class="shrinkPadding"
-                    @change="changeProject">
-                    <el-input-number
-                      onmousewheel="return false;"
-                      v-model="row.amount"
-                      placeholder="请输入金额"
-                      style="width: 100%"
-                      :precision="2"
-                      :controls="false"
-                      :min="0" />
+                  <el-form-item :prop="'purchaseProjectList.' + $index + '.amount'" :rules="rules.amount" :inline-message="true" class="shrinkPadding"
+                                @change="changeProject">
+                    <el-input-number onmousewheel="return false;" v-model="row.amount" placeholder="请输入金额" style="width: 100%" :precision="2"
+                                     :controls="false" :min="0" />
                   </el-form-item>
                 </div>
               </template>
@@ -388,14 +355,8 @@
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   <el-form-item :prop="'purchaseArrivalList.' + $index + '.quantity'" :inline-message="true">
-                    <el-input-number
-                      onmousewheel="return false;"
-                      v-model="row.quantity"
-                      placeholder="请输入到货数量"
-                      style="width: 100%"
-                      :precision="0"
-                      :controls="false"
-                      :min="0" />
+                    <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入到货数量" style="width: 100%" :precision="0"
+                                     :controls="false" :min="0" />
                   </el-form-item>
                 </div>
               </template>
@@ -419,14 +380,8 @@
       <byForm :formConfig="formHandoverConfig" :formOption="formOption" v-model="productRow.data">
         <template #file>
           <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-success="handleSuccess"
-              :on-preview="onPreviewFile">
+            <el-upload v-model:fileList="fileList" :action="uploadUrl" :data="uploadData" multiple :before-upload="uploadFile"
+                       :on-success="handleSuccess" :on-preview="onPreviewFile">
               <el-button>选择</el-button>
             </el-upload>
           </div>
@@ -504,13 +459,15 @@ const judgeStatus = () => {
     return true;
   }
   if (props.queryData.recordList && props.queryData.recordList.length > 0) {
-    let data = props.queryData.recordList.filter((item) => item.status === 2 && item.nodeType !== 1);
+    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,
@@ -569,24 +526,44 @@ const formConfig = computed(() => {
   ];
 });
 const rules = ref({
-  buyCorporationId: [{ required: true, message: "请选择买方公司", trigger: "change" }],
-  sellCorporationId: [{ required: true, message: "请选择卖方公司", trigger: "change" }],
+  buyCorporationId: [
+    { required: true, message: "请选择买方公司", trigger: "change" },
+  ],
+  sellCorporationId: [
+    { required: true, message: "请选择卖方公司", trigger: "change" },
+  ],
   countryId: [{ required: true, message: "请选择国家", trigger: "change" }],
   sellAddress: [{ required: true, message: "请输入详细地址", trigger: "blur" }],
   buyAddress: [{ required: true, message: "请输入详细地址", trigger: "blur" }],
-  sellContactName: [{ required: true, message: "请输入联系人", trigger: "blur" }],
-  sellContactNumber: [{ required: true, message: "请输入联系电话", trigger: "blur" }],
+  sellContactName: [
+    { required: true, message: "请输入联系人", trigger: "blur" },
+  ],
+  sellContactNumber: [
+    { required: true, message: "请输入联系电话", trigger: "blur" },
+  ],
   quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
   price: [{ required: true, message: "请输入单价", trigger: "blur" }],
   amount: [{ required: true, message: "请输入金额", trigger: "blur" }],
-  payName: [{ required: true, message: "请输入收费项目", trigger: ["change", "blur"] }],
+  payName: [
+    { required: true, message: "请输入收费项目", trigger: ["change", "blur"] },
+  ],
   warranty: [{ required: true, message: "请输入质保期", trigger: "blur" }],
-  deliveryType: [{ required: true, message: "请选择交货类型", trigger: "change" }],
+  deliveryType: [
+    { required: true, message: "请选择交货类型", trigger: "change" },
+  ],
   address: [{ required: true, message: "请输入详细地址", trigger: "blur" }],
-  deliveryTime: [{ required: true, message: "请选择交付日期", trigger: "change" }],
-  paymentMethod: [{ required: true, message: "请选择付款方式", trigger: "change" }],
-  invoiceType: [{ required: true, message: "请选择付款方式", trigger: "change" }],
-  contractTemplateId: [{ required: true, message: "请选择合同模板", trigger: "change" }],
+  deliveryTime: [
+    { required: true, message: "请选择交付日期", trigger: "change" },
+  ],
+  paymentMethod: [
+    { required: true, message: "请选择付款方式", trigger: "change" },
+  ],
+  invoiceType: [
+    { required: true, message: "请选择付款方式", trigger: "change" },
+  ],
+  contractTemplateId: [
+    { required: true, message: "请选择合同模板", trigger: "change" },
+  ],
   remark: [{ required: true, message: "请输入条款内容", trigger: "change" }],
 });
 const getDict = () => {
@@ -600,15 +577,17 @@ const getDict = () => {
       value: x.dictKey,
     }));
   });
-  proxy.post("/contractTemplate/page", { pageNum: 1, pageSize: 999 }).then((res) => {
-    templateList.value = res.rows.map((item) => {
-      return {
-        ...item,
-        label: item.templateName,
-        value: item.id,
-      };
+  proxy
+    .post("/contractTemplate/page", { pageNum: 1, pageSize: 999 })
+    .then((res) => {
+      templateList.value = res.rows.map((item) => {
+        return {
+          ...item,
+          label: item.templateName,
+          value: item.id,
+        };
+      });
     });
-  });
   proxy.post("/corporation/page", { pageNum: 1, pageSize: 999 }).then((res) => {
     corporationList.value = res.rows.map((item) => {
       return {
@@ -618,15 +597,17 @@ const getDict = () => {
       };
     });
   });
-  proxy.post("/supplierInfo/page", { pageNum: 1, pageSize: 999 }).then((res) => {
-    supplierList.value = res.rows.map((item) => {
-      return {
-        ...item,
-        label: item.name,
-        value: item.id,
-      };
+  proxy
+    .post("/supplierInfo/page", { pageNum: 1, pageSize: 999 })
+    .then((res) => {
+      supplierList.value = res.rows.map((item) => {
+        return {
+          ...item,
+          label: item.name,
+          value: item.id,
+        };
+      });
     });
-  });
 };
 getDict();
 const getCityData = (id, type, isChange) => {
@@ -659,11 +640,13 @@ const changeBuyCorporation = (val) => {
   if (val) {
     proxy.post("/corporation/detail", { id: val }).then((res) => {
       formData.data.buyAddress = res.address;
-      Promise.all([getBuyCountryName(res.countryId), getBuyProvinceName(res.provinceId, res.countryId), getBuyCityName(res.cityId, res.provinceId)]).then(
-        () => {
-          changeAddress();
-        }
-      );
+      Promise.all([
+        getBuyCountryName(res.countryId),
+        getBuyProvinceName(res.provinceId, res.countryId),
+        getBuyCityName(res.cityId, res.provinceId),
+      ]).then(() => {
+        changeAddress();
+      });
     });
   }
 };
@@ -685,16 +668,27 @@ const changeAddress = () => {
     if (formData.data.buyAddress) {
       buyAddress = formData.data.buyAddress;
     }
-    formData.data.address = buyCountryName + ", " + buyProvinceName + ", " + buyCityName + "," + buyAddress;
+    formData.data.address =
+      buyCountryName +
+      ", " +
+      buyProvinceName +
+      ", " +
+      buyCityName +
+      "," +
+      buyAddress;
   } else if (formData.data.deliveryType === 2) {
     let countryName = "";
     if (formData.data.countryId) {
-      let data = countryData.value.filter((item) => item.id === formData.data.countryId);
+      let data = countryData.value.filter(
+        (item) => item.id === formData.data.countryId
+      );
       if (data && data.length > 0) countryName = data[0].chineseName;
     }
     let provinceName = "";
     if (formData.data.provinceId) {
-      let data = provinceData.value.filter((item) => item.id === formData.data.provinceId);
+      let data = provinceData.value.filter(
+        (item) => item.id === formData.data.provinceId
+      );
       if (data && data.length > 0) provinceName = data[0].name;
     } else {
       if (formData.data.provinceName) {
@@ -703,7 +697,9 @@ const changeAddress = () => {
     }
     let cityName = "";
     if (formData.data.cityId) {
-      let data = cityData.value.filter((item) => item.id === formData.data.cityId);
+      let data = cityData.value.filter(
+        (item) => item.id === formData.data.cityId
+      );
       if (data && data.length > 0) cityName = data[0].name;
     } else {
       if (formData.data.cityName) {
@@ -714,7 +710,8 @@ const changeAddress = () => {
     if (formData.data.sellAddress) {
       sellAddress = formData.data.sellAddress;
     }
-    formData.data.address = countryName + ", " + provinceName + ", " + cityName + "," + sellAddress;
+    formData.data.address =
+      countryName + ", " + provinceName + ", " + cityName + "," + sellAddress;
   }
 };
 const changeSellAddress = (val, index) => {
@@ -723,25 +720,29 @@ const changeSellAddress = (val, index) => {
   });
 };
 const getBuyCountryName = (val) => {
-  return proxy.post("/customizeArea/list", { parentId: "0" }).then((resCountry) => {
-    let buyCountryData = resCountry.filter((item) => item.id === val);
-    if (buyCountryData && buyCountryData.length > 0) {
-      formData.data.buyCountryName = buyCountryData[0].chineseName;
-    } else {
-      formData.data.buyCountryName = "";
-    }
-  });
-};
-const getBuyProvinceName = (val, countryId) => {
-  if (val) {
-    return proxy.post("/customizeArea/list", { parentId: countryId }).then((resProvince) => {
-      let buyProvinceData = resProvince.filter((item) => item.id === val);
-      if (buyProvinceData && buyProvinceData.length > 0) {
-        formData.data.buyProvinceName = buyProvinceData[0].name;
+  return proxy
+    .post("/customizeArea/list", { parentId: "0" })
+    .then((resCountry) => {
+      let buyCountryData = resCountry.filter((item) => item.id === val);
+      if (buyCountryData && buyCountryData.length > 0) {
+        formData.data.buyCountryName = buyCountryData[0].chineseName;
       } else {
-        formData.data.buyProvinceName = "";
+        formData.data.buyCountryName = "";
       }
     });
+};
+const getBuyProvinceName = (val, countryId) => {
+  if (val) {
+    return proxy
+      .post("/customizeArea/list", { parentId: countryId })
+      .then((resProvince) => {
+        let buyProvinceData = resProvince.filter((item) => item.id === val);
+        if (buyProvinceData && buyProvinceData.length > 0) {
+          formData.data.buyProvinceName = buyProvinceData[0].name;
+        } else {
+          formData.data.buyProvinceName = "";
+        }
+      });
   } else {
     formData.data.buyProvinceName = "";
     return;
@@ -749,14 +750,16 @@ const getBuyProvinceName = (val, countryId) => {
 };
 const getBuyCityName = (val, provinceId) => {
   if (val) {
-    return proxy.post("/customizeArea/list", { parentId: provinceId }).then((resCity) => {
-      let buyCityData = resCity.filter((item) => item.id === val);
-      if (buyCityData && buyCityData.length > 0) {
-        formData.data.buyCityName = buyCityData[0].name;
-      } else {
-        formData.data.buyCityName = "";
-      }
-    });
+    return proxy
+      .post("/customizeArea/list", { parentId: provinceId })
+      .then((resCity) => {
+        let buyCityData = resCity.filter((item) => item.id === val);
+        if (buyCityData && buyCityData.length > 0) {
+          formData.data.buyCityName = buyCityData[0].name;
+        } else {
+          formData.data.buyCityName = "";
+        }
+      });
   } else {
     formData.data.buyCityName = "";
     return;
@@ -780,7 +783,10 @@ const changeSupplier = (val) => {
       formData.data.sellContactName = data[0].contactPerson;
       formData.data.sellContactNumber = data[0].contactNumber;
       if (formData.data.provinceId) {
-        Promise.all([getCityData(formData.data.countryId, "20"), getCityData(formData.data.provinceId, "30")]).then(() => {
+        Promise.all([
+          getCityData(formData.data.countryId, "20"),
+          getCityData(formData.data.provinceId, "30"),
+        ]).then(() => {
           changeAddress();
         });
       } else {
@@ -801,17 +807,31 @@ const changeProject = () => {
 };
 const calculationAllAmount = () => {
   let amount = 0;
-  if (formData.data.purchaseProductList && formData.data.purchaseProductList.length > 0) {
+  if (
+    formData.data.purchaseProductList &&
+    formData.data.purchaseProductList.length > 0
+  ) {
     for (let i = 0; i < formData.data.purchaseProductList.length; i++) {
       if (formData.data.purchaseProductList[i].amount) {
-        amount = Number(parseFloat(Number(amount) + Number(formData.data.purchaseProductList[i].amount)).toFixed(2));
+        amount = Number(
+          parseFloat(
+            Number(amount) + Number(formData.data.purchaseProductList[i].amount)
+          ).toFixed(2)
+        );
       }
     }
   }
-  if (formData.data.purchaseProjectList && formData.data.purchaseProjectList.length > 0) {
+  if (
+    formData.data.purchaseProjectList &&
+    formData.data.purchaseProjectList.length > 0
+  ) {
     for (let i = 0; i < formData.data.purchaseProjectList.length; i++) {
       if (formData.data.purchaseProjectList[i].amount) {
-        amount = Number(parseFloat(Number(amount) + Number(formData.data.purchaseProjectList[i].amount)).toFixed(2));
+        amount = Number(
+          parseFloat(
+            Number(amount) + Number(formData.data.purchaseProjectList[i].amount)
+          ).toFixed(2)
+        );
       }
     }
   }
@@ -822,18 +842,41 @@ const calculationProductAmount = (index) => {
     formData.data.purchaseProductList &&
     formData.data.purchaseProductList.length > 0 &&
     formData.data.purchaseProductList[index].purchaseProductMountingsList &&
-    formData.data.purchaseProductList[index].purchaseProductMountingsList.length > 0
+    formData.data.purchaseProductList[index].purchaseProductMountingsList
+      .length > 0
   ) {
     let amount = 0;
-    for (let i = 0; i < formData.data.purchaseProductList[index].purchaseProductMountingsList.length; i++) {
-      if (formData.data.purchaseProductList[index].purchaseProductMountingsList[i].amount) {
-        amount = Number(parseFloat(Number(amount) + Number(formData.data.purchaseProductList[index].purchaseProductMountingsList[i].amount)).toFixed(2));
+    for (
+      let i = 0;
+      i <
+      formData.data.purchaseProductList[index].purchaseProductMountingsList
+        .length;
+      i++
+    ) {
+      if (
+        formData.data.purchaseProductList[index].purchaseProductMountingsList[i]
+          .amount
+      ) {
+        amount = Number(
+          parseFloat(
+            Number(amount) +
+              Number(
+                formData.data.purchaseProductList[index]
+                  .purchaseProductMountingsList[i].amount
+              )
+          ).toFixed(2)
+        );
       }
     }
     formData.data.purchaseProductList[index].amount = amount;
     let price = 0;
     if (formData.data.purchaseProductList[index].quantity && amount) {
-      price = Number(parseFloat(Number(amount) / Number(formData.data.purchaseProductList[index].quantity)).toFixed(4));
+      price = Number(
+        parseFloat(
+          Number(amount) /
+            Number(formData.data.purchaseProductList[index].quantity)
+        ).toFixed(4)
+      );
     }
     formData.data.purchaseProductList[index].price = price;
   }
@@ -847,23 +890,46 @@ const changeProductMaterial = (index, indexTwo) => {
       formData.data.purchaseProductList &&
       formData.data.purchaseProductList.length > 0 &&
       formData.data.purchaseProductList[index].purchaseProductMountingsList &&
-      formData.data.purchaseProductList[index].purchaseProductMountingsList.length > 0
+      formData.data.purchaseProductList[index].purchaseProductMountingsList
+        .length > 0
     ) {
-      if (indexTwo === 0 && formData.data.purchaseProductList[index].purchaseProductMountingsList[indexTwo].quantity) {
-        formData.data.purchaseProductList[index].quantity = formData.data.purchaseProductList[index].purchaseProductMountingsList[indexTwo].quantity;
+      if (
+        indexTwo === 0 &&
+        formData.data.purchaseProductList[index].purchaseProductMountingsList[
+          indexTwo
+        ].quantity
+      ) {
+        formData.data.purchaseProductList[index].quantity =
+          formData.data.purchaseProductList[index].purchaseProductMountingsList[
+            indexTwo
+          ].quantity;
       }
       if (
-        formData.data.purchaseProductList[index].purchaseProductMountingsList[indexTwo].quantity &&
-        formData.data.purchaseProductList[index].purchaseProductMountingsList[indexTwo].price
+        formData.data.purchaseProductList[index].purchaseProductMountingsList[
+          indexTwo
+        ].quantity &&
+        formData.data.purchaseProductList[index].purchaseProductMountingsList[
+          indexTwo
+        ].price
       ) {
-        formData.data.purchaseProductList[index].purchaseProductMountingsList[indexTwo].amount = Number(
+        formData.data.purchaseProductList[index].purchaseProductMountingsList[
+          indexTwo
+        ].amount = Number(
           parseFloat(
-            Number(formData.data.purchaseProductList[index].purchaseProductMountingsList[indexTwo].quantity) *
-              Number(formData.data.purchaseProductList[index].purchaseProductMountingsList[indexTwo].price)
+            Number(
+              formData.data.purchaseProductList[index]
+                .purchaseProductMountingsList[indexTwo].quantity
+            ) *
+              Number(
+                formData.data.purchaseProductList[index]
+                  .purchaseProductMountingsList[indexTwo].price
+              )
           ).toFixed(2)
         );
       } else {
-        formData.data.purchaseProductList[index].purchaseProductMountingsList[indexTwo].amount = 0;
+        formData.data.purchaseProductList[index].purchaseProductMountingsList[
+          indexTwo
+        ].amount = 0;
       }
     }
     nextTick(() => {
@@ -872,20 +938,27 @@ const changeProductMaterial = (index, indexTwo) => {
   });
 };
 const handleRemove = async (index, indexTwo) => {
-  await formData.data.purchaseProductList[index].purchaseProductMountingsList.splice(indexTwo, 1);
+  await formData.data.purchaseProductList[
+    index
+  ].purchaseProductMountingsList.splice(indexTwo, 1);
   nextTick(() => {
     calculationProductAmount(index);
   });
 };
 const clickAdd = () => {
-  if (formData.data.purchaseProjectList && formData.data.purchaseProjectList.length > 0) {
+  if (
+    formData.data.purchaseProjectList &&
+    formData.data.purchaseProjectList.length > 0
+  ) {
     formData.data.purchaseProjectList.push({
       payName: "",
       amount: undefined,
       remark: "",
     });
   } else {
-    formData.data.purchaseProjectList = [{ payName: "", amount: undefined, remark: "" }];
+    formData.data.purchaseProjectList = [
+      { payName: "", amount: undefined, remark: "" },
+    ];
   }
 };
 const handleDelete = async (index) => {
@@ -912,9 +985,15 @@ const querySearch = (queryString, callback) => {
 const handleSubmit = async () => {
   let status = await submit.value.handleSubmit(() => {});
   if (status) {
-    if (formData.data.purchaseArrivalList && formData.data.purchaseArrivalList.length > 0) {
+    if (
+      formData.data.purchaseArrivalList &&
+      formData.data.purchaseArrivalList.length > 0
+    ) {
       for (let i = 0; i < formData.data.purchaseProductList.length; i++) {
-        let data = formData.data.purchaseArrivalList.filter((item) => item.productId === formData.data.purchaseProductList[i].productId);
+        let data = formData.data.purchaseArrivalList.filter(
+          (item) =>
+            item.productId === formData.data.purchaseProductList[i].productId
+        );
         if (data && data.length > 0) {
           let quantity = 0;
           for (let j = 0; j < data.length; j++) {
@@ -944,7 +1023,10 @@ watch(
   props.queryData,
   () => {
     formOption.disabled = judgeStatus();
-    if (props.queryData && ["10", "20", "30"].includes(route.query.processType)) {
+    if (
+      props.queryData &&
+      ["10", "20", "30"].includes(route.query.processType)
+    ) {
       for (var text in props.queryData) {
         formData.data[text] = props.queryData[text];
       }
@@ -1013,15 +1095,31 @@ onMounted(() => {
             quantity: undefined,
           };
         });
-        let fileIds = formData.data.purchaseProductList.map((item) => item.productId);
-        proxy.post("/fileInfo/getList", { businessIdList: fileIds }).then((resFile) => {
-          for (let i = 0; i < formData.data.purchaseProductList.length; i++) {
-            if (resFile[formData.data.purchaseProductList[i].productId] && resFile[formData.data.purchaseProductList[i].productId].length > 0) {
-              formData.data.purchaseProductList[i].fileUrl = resFile[formData.data.purchaseProductList[i].productId][0].fileUrl;
-              formData.data.purchaseProductList[i].purchaseProductMountingsList[0].fileUrl = resFile[formData.data.purchaseProductList[i].productId][0].fileUrl;
+        let fileIds = formData.data.purchaseProductList.map(
+          (item) => item.productId
+        );
+        proxy
+          .post("/fileInfo/getList", { businessIdList: fileIds })
+          .then((resFile) => {
+            for (let i = 0; i < formData.data.purchaseProductList.length; i++) {
+              if (
+                resFile[formData.data.purchaseProductList[i].productId] &&
+                resFile[formData.data.purchaseProductList[i].productId].length >
+                  0
+              ) {
+                formData.data.purchaseProductList[i].fileUrl =
+                  resFile[
+                    formData.data.purchaseProductList[i].productId
+                  ][0].fileUrl;
+                formData.data.purchaseProductList[
+                  i
+                ].purchaseProductMountingsList[0].fileUrl =
+                  resFile[
+                    formData.data.purchaseProductList[i].productId
+                  ][0].fileUrl;
+              }
             }
-          }
-        });
+          });
       } else {
         formData.data.purchaseProductList = [];
       }
@@ -1145,23 +1243,29 @@ const submitHandoverForm = () => {
         return;
       }
     }
-    formData.data.purchaseProductList[productIndex.value].fileList = fileList.value.map((item) => {
-      return {
-        id: item.raw.id,
-        fileName: item.raw.fileName,
-        fileUrl: item.raw.fileUrl,
-        uploadState: item.raw.uploadState,
-      };
-    });
+    formData.data.purchaseProductList[productIndex.value].fileList =
+      fileList.value.map((item) => {
+        return {
+          id: item.raw.id,
+          fileName: item.raw.fileName,
+          fileUrl: item.raw.fileUrl,
+          uploadState: item.raw.uploadState,
+        };
+      });
   } else {
     formData.data.purchaseProductList[productIndex.value].fileList = [];
   }
-  formData.data.purchaseProductList[productIndex.value].remark = productRow.data.remark;
+  formData.data.purchaseProductList[productIndex.value].remark =
+    productRow.data.remark;
   openHandover.value = false;
 };
 const selectMaterial = (goods) => {
   if (goods && goods.id) {
-    let data = formData.data.purchaseProductList[productIndex.value].purchaseProductMountingsList.filter((item) => item.productId === goods.id);
+    let data = formData.data.purchaseProductList[
+      productIndex.value
+    ].purchaseProductMountingsList.filter(
+      (item) => item.productId === goods.id
+    );
     if (data && data.length > 0) {
       return ElMessage("该物料已添加");
     }
@@ -1169,7 +1273,9 @@ const selectMaterial = (goods) => {
     if (goods.fileList && goods.fileList.length > 0) {
       fileUrl = goods.fileList[0].fileUrl;
     }
-    formData.data.purchaseProductList[productIndex.value].purchaseProductMountingsList.push({
+    formData.data.purchaseProductList[
+      productIndex.value
+    ].purchaseProductMountingsList.push({
       productId: goods.id,
       productType: 2,
       productName: goods.name,

+ 233 - 185
src/components/process/EHSD/Sample.vue

@@ -64,13 +64,8 @@
               </el-col>
               <el-col :span="6">
                 <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 placeholder="省/洲" @change="(val) => getCityData(val, '30', true)" addressId="provinceId" addressName="provinceName"
+                              v-model="formData.data" :data="provinceData">
                   </selectCity>
                 </el-form-item>
               </el-col>
@@ -95,13 +90,8 @@
             <el-row style="margin-top: 20px; width: 100%">
               <el-col :span="8">
                 <el-form-item label="联系人" prop="buyContactName">
-                  <el-autocomplete
-                    v-model="formData.data.buyContactName"
-                    :fetch-suggestions="querySearchPerson"
-                    clearable
-                    class="inline-input w-50"
-                    placeholder="请输入联系人"
-                    @select="handlePerson">
+                  <el-autocomplete v-model="formData.data.buyContactName" :fetch-suggestions="querySearchPerson" clearable class="inline-input w-50"
+                                   placeholder="请输入联系人" @select="handlePerson">
                   </el-autocomplete>
                 </el-form-item>
               </el-col>
@@ -133,15 +123,8 @@
             </el-col>
             <el-col :span="6">
               <el-form-item label="预付比例 (%)" prop="advanceRatio">
-                <el-input-number
-                  onmousewheel="return false;"
-                  v-model="formData.data.advanceRatio"
-                  placeholder="请输入预付比例"
-                  style="width: 100%"
-                  :precision="2"
-                  :controls="false"
-                  :min="0"
-                  :max="100" />
+                <el-input-number onmousewheel="return false;" v-model="formData.data.advanceRatio" placeholder="请输入预付比例" style="width: 100%"
+                                 :precision="2" :controls="false" :min="0" :max="100" />
               </el-form-item>
             </el-col>
           </el-row>
@@ -210,14 +193,8 @@
           <el-row style="margin-top: 20px; width: 100%">
             <el-col :span="6">
               <el-form-item label="报价有效期 (天)" prop="effective">
-                <el-input-number
-                  onmousewheel="return false;"
-                  v-model="formData.data.effective"
-                  placeholder="请输入有效期"
-                  style="width: 100%"
-                  :precision="0"
-                  :controls="false"
-                  :min="0" />
+                <el-input-number onmousewheel="return false;" v-model="formData.data.effective" placeholder="请输入有效期" style="width: 100%"
+                                 :precision="0" :controls="false" :min="0" />
               </el-form-item>
             </el-col>
             <el-col :span="6">
@@ -256,7 +233,8 @@
             <el-table-column label="商品名称" min-width="180">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item :prop="'sampleProductList.' + $index + '.productName'" :rules="rules.productName" :inline-message="true" class="shrinkPadding">
+                  <el-form-item :prop="'sampleProductList.' + $index + '.productName'" :rules="rules.productName" :inline-message="true"
+                                class="shrinkPadding">
                     <el-input v-model="row.productName" placeholder="请输入商品名称" />
                   </el-form-item>
                 </div>
@@ -265,11 +243,8 @@
             <el-table-column label="尺寸 cm*cm*cm" width="140">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item
-                    :prop="'sampleProductList.' + $index + '.productModel'"
-                    :rules="rules.productModel"
-                    :inline-message="true"
-                    class="shrinkPadding">
+                  <el-form-item :prop="'sampleProductList.' + $index + '.productModel'" :rules="rules.productModel" :inline-message="true"
+                                class="shrinkPadding">
                     <el-input v-model="row.productModel" placeholder="请输入" />
                   </el-form-item>
                 </div>
@@ -278,16 +253,10 @@
             <el-table-column label="数量" width="130">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item :prop="'sampleProductList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="shrinkPadding">
-                    <el-input-number
-                      onmousewheel="return false;"
-                      v-model="row.quantity"
-                      placeholder="请输入"
-                      style="width: 100%"
-                      :precision="0"
-                      :controls="false"
-                      :min="0"
-                      @change="calculationAmount()" />
+                  <el-form-item :prop="'sampleProductList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true"
+                                class="shrinkPadding">
+                    <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="0"
+                                     :controls="false" :min="0" @change="calculationAmount()" />
                   </el-form-item>
                 </div>
               </template>
@@ -296,15 +265,8 @@
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   <el-form-item :prop="'sampleProductList.' + $index + '.price'" :rules="rules.price" :inline-message="true" class="shrinkPadding">
-                    <el-input-number
-                      onmousewheel="return false;"
-                      v-model="row.price"
-                      placeholder="请输入"
-                      style="width: 100%"
-                      :precision="2"
-                      :controls="false"
-                      :min="0"
-                      @change="calculationAmount()" />
+                    <el-input-number onmousewheel="return false;" v-model="row.price" placeholder="请输入" style="width: 100%" :precision="2"
+                                     :controls="false" :min="0" @change="calculationAmount()" />
                   </el-form-item>
                 </div>
               </template>
@@ -312,11 +274,8 @@
             <el-table-column label="贸易方式" width="140">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item
-                    :prop="'sampleProductList.' + $index + '.tradeMethods'"
-                    :rules="rules.tradeMethods"
-                    :inline-message="true"
-                    class="shrinkPadding">
+                  <el-form-item :prop="'sampleProductList.' + $index + '.tradeMethods'" :rules="rules.tradeMethods" :inline-message="true"
+                                class="shrinkPadding">
                     <el-select v-model="row.tradeMethods" placeholder="请选择" style="width: 100%">
                       <el-option v-for="item in tradeMethods" :key="item.value" :label="item.label" :value="item.value" />
                     </el-select>
@@ -327,7 +286,8 @@
             <el-table-column label="包装方式" width="180">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item :prop="'sampleProductList.' + $index + '.packMethod'" :rules="rules.packMethod" :inline-message="true" class="shrinkPadding">
+                  <el-form-item :prop="'sampleProductList.' + $index + '.packMethod'" :rules="rules.packMethod" :inline-message="true"
+                                class="shrinkPadding">
                     <el-input v-model="row.packMethod" placeholder="请输入" />
                   </el-form-item>
                 </div>
@@ -344,28 +304,16 @@
       </template>
       <template #file>
         <div style="width: 100%">
-          <el-upload
-            v-model:fileList="formData.data.fileList"
-            action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-            :data="uploadData"
-            multiple
-            :before-upload="uploadFile"
-            :on-success="handleSuccess"
-            :on-preview="onPreviewFile">
+          <el-upload v-model:fileList="formData.data.fileList" :action="uploadUrl" :data="uploadData" multiple :before-upload="uploadFile"
+                     :on-success="handleSuccess" :on-preview="onPreviewFile">
             <el-button type="primary" plain>选择</el-button>
           </el-upload>
         </div>
       </template>
       <template #indication>
         <div style="width: 100%">
-          <el-upload
-            v-model:fileList="formData.data.packageFileList"
-            action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-            :data="indicationUploadData"
-            multiple
-            :before-upload="indicationUploadFile"
-            :on-success="handleSuccess"
-            :on-preview="onPreviewFile">
+          <el-upload v-model:fileList="formData.data.packageFileList" :action="uploadUrl" :data="indicationUploadData" multiple
+                     :before-upload="indicationUploadFile" :on-success="handleSuccess" :on-preview="onPreviewFile">
             <el-button type="primary" plain>选择</el-button>
           </el-upload>
         </div>
@@ -378,7 +326,8 @@
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   <el-form-item :prop="'sampleProjectList.' + $index + '.payName'" :rules="rules.payName" :inline-message="true">
-                    <el-autocomplete v-model="row.payName" :fetch-suggestions="querySearch" clearable class="inline-input w-50" placeholder="请输入收费项目" />
+                    <el-autocomplete v-model="row.payName" :fetch-suggestions="querySearch" clearable class="inline-input w-50"
+                                     placeholder="请输入收费项目" />
                   </el-form-item>
                 </div>
               </template>
@@ -396,15 +345,8 @@
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   <el-form-item :prop="'sampleProjectList.' + $index + '.amount'" :rules="rules.amount" :inline-message="true" class="shrinkPadding">
-                    <el-input-number
-                      onmousewheel="return false;"
-                      v-model="row.amount"
-                      placeholder="请输入金额"
-                      style="width: 100%"
-                      :precision="2"
-                      :controls="false"
-                      :min="0"
-                      @change="totalAmount()" />
+                    <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>
@@ -445,15 +387,8 @@
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   <el-form-item :prop="'sampleShipmentList.' + $index + '.quantity'" :inline-message="true">
-                    <el-input-number
-                      onmousewheel="return false;"
-                      v-model="row.quantity"
-                      placeholder="请输入数量"
-                      style="width: 100%"
-                      :precision="0"
-                      :controls="false"
-                      :min="0"
-                      @change="calculationAmount()" />
+                    <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入数量" style="width: 100%" :precision="0"
+                                     :controls="false" :min="0" @change="calculationAmount()" />
                   </el-form-item>
                 </div>
               </template>
@@ -525,19 +460,21 @@ const judgeStatus = () => {
     return true;
   }
   if (props.queryData.recordList && props.queryData.recordList.length > 0) {
-    let data = props.queryData.recordList.filter((item) => item.status === 2 && item.nodeType !== 1);
+    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,
   rules: [],
-  disabled: false
+  disabled: false,
 });
 const uploadData = ref({});
 const indicationUploadData = ref({});
@@ -617,31 +554,59 @@ const formConfig = computed(() => {
   ];
 });
 const rules = ref({
-  contractTemplateId: [{ required: true, message: "请选择合同模板", trigger: "change" }],
-  buyCorporationId: [{ required: true, message: "请选择公司", trigger: "change" }],
+  contractTemplateId: [
+    { 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" }],
+  buyContactName: [
+    { required: true, message: "请输入联系人", trigger: ["change", "blur"] },
+  ],
+  buyContactNumber: [
+    { required: true, message: "请输入联系电话", trigger: "blur" },
+  ],
   productName: [{ required: true, message: "请输入商品名称", trigger: "blur" }],
-  productModel: [{ required: true, message: "请输入尺寸 cm*cm*cm", trigger: "blur" }],
+  productModel: [
+    { required: true, message: "请输入尺寸 cm*cm*cm", trigger: "blur" },
+  ],
   quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
   price: [{ required: true, message: "请输入单价", trigger: "blur" }],
   packMethod: [{ required: true, message: "请输入包装方式", trigger: "blur" }],
   amount: [{ required: true, message: "请输入金额", trigger: "blur" }],
-  payName: [{ required: true, message: "请输入收费项目", trigger: ["change", "blur"] }],
+  payName: [
+    { required: true, message: "请输入收费项目", trigger: ["change", "blur"] },
+  ],
   currency: [{ required: true, message: "请选择币种", trigger: "change" }],
   effective: [{ required: true, message: "请输入报价有效期", trigger: "blur" }],
-  deliveryTime: [{ required: true, message: "请选择交货期限", trigger: "change" }],
-  paymentMethod: [{ required: true, message: "请选择付款方式", trigger: "change" }],
-  advanceRatio: [{ required: true, message: "请输入预付比例", trigger: "blur" }],
-  shroffAccountId: [{ required: true, message: "请选择收款账号", trigger: "change" }],
-  tradeMethods: [{ required: true, message: "请选择贸易方式", trigger: "change" }],
-  transportMethod: [{ required: true, message: "请选择运输方式", trigger: "change" }],
-  transportRemark: [{ required: true, message: "请输入运输说明", trigger: "blur" }],
+  deliveryTime: [
+    { required: true, message: "请选择交货期限", trigger: "change" },
+  ],
+  paymentMethod: [
+    { required: true, message: "请选择付款方式", trigger: "change" },
+  ],
+  advanceRatio: [
+    { required: true, message: "请输入预付比例", trigger: "blur" },
+  ],
+  shroffAccountId: [
+    { required: true, message: "请选择收款账号", trigger: "change" },
+  ],
+  tradeMethods: [
+    { required: true, message: "请选择贸易方式", trigger: "change" },
+  ],
+  transportMethod: [
+    { required: true, message: "请选择运输方式", trigger: "change" },
+  ],
+  transportRemark: [
+    { required: true, message: "请输入运输说明", trigger: "blur" },
+  ],
   remark: [{ required: true, message: "请输入付款条件", trigger: "blur" }],
-  submitType: [{ required: true, message: "请选择提交类型", trigger: "change" }],
+  submitType: [
+    { required: true, message: "请选择提交类型", trigger: "change" },
+  ],
 });
 const getDict = () => {
   proxy
@@ -684,15 +649,17 @@ const getDict = () => {
         value: x.dictKey,
       }));
     });
-  proxy.post("/contractTemplate/page", { pageNum: 1, pageSize: 999 }).then((res) => {
-    templateList.value = res.rows.map((item) => {
-      return {
-        ...item,
-        label: item.templateName,
-        value: item.id,
-      };
+  proxy
+    .post("/contractTemplate/page", { pageNum: 1, pageSize: 999 })
+    .then((res) => {
+      templateList.value = res.rows.map((item) => {
+        return {
+          ...item,
+          label: item.templateName,
+          value: item.id,
+        };
+      });
     });
-  });
   proxy.post("/corporation/page", { pageNum: 1, pageSize: 999 }).then((res) => {
     corporationList.value = res.rows.map((item) => {
       return {
@@ -711,15 +678,17 @@ const getDict = () => {
       };
     });
   });
-  proxy.post("/accountManagement/page", { pageNum: 1, pageSize: 999 }).then((res) => {
-    accountList.value = res.rows.map((item) => {
-      return {
-        ...item,
-        label: item.alias,
-        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,
+        };
+      });
     });
-  });
 };
 getDict();
 const changeTemplate = (val) => {
@@ -734,41 +703,60 @@ const changeTemplate = (val) => {
     proxy.post("/contractTemplate/detail", { id: val }).then((res) => {
       formData.data.sellCorporationId = res.corporationId;
       if (res.corporationId) {
-        proxy.post("/corporation/detail", { id: res.corporationId }).then((detailCorporation) => {
-          proxy.post("/customizeArea/list", { parentId: "0" }).then((resCountry) => {
-            let sellCountryData = resCountry.filter((item) => item.id === detailCorporation.countryId);
-            if (sellCountryData && sellCountryData.length > 0) {
-              formData.data.sellCountryName = sellCountryData[0].chineseName;
+        proxy
+          .post("/corporation/detail", { id: res.corporationId })
+          .then((detailCorporation) => {
+            proxy
+              .post("/customizeArea/list", { parentId: "0" })
+              .then((resCountry) => {
+                let sellCountryData = resCountry.filter(
+                  (item) => item.id === detailCorporation.countryId
+                );
+                if (sellCountryData && sellCountryData.length > 0) {
+                  formData.data.sellCountryName =
+                    sellCountryData[0].chineseName;
+                } else {
+                  formData.data.sellCountryName = "";
+                }
+              });
+            if (detailCorporation.countryId) {
+              proxy
+                .post("/customizeArea/list", {
+                  parentId: detailCorporation.countryId,
+                })
+                .then((resProvince) => {
+                  let sellProvinceData = resProvince.filter(
+                    (item) => item.id === detailCorporation.provinceId
+                  );
+                  if (sellProvinceData && sellProvinceData.length > 0) {
+                    formData.data.sellProvinceName = sellProvinceData[0].name;
+                  } else {
+                    formData.data.sellProvinceName = "";
+                  }
+                });
             } else {
-              formData.data.sellCountryName = "";
+              formData.data.sellProvinceName = "";
             }
+            if (detailCorporation.provinceId) {
+              proxy
+                .post("/customizeArea/list", {
+                  parentId: detailCorporation.provinceId,
+                })
+                .then((resCity) => {
+                  let sellCityData = resCity.filter(
+                    (item) => item.id === detailCorporation.cityId
+                  );
+                  if (sellCityData && sellCityData.length > 0) {
+                    formData.data.sellCityName = sellCityData[0].name;
+                  } else {
+                    formData.data.sellCityName = "";
+                  }
+                });
+            } else {
+              formData.data.sellCityName = "";
+            }
+            formData.data.sellAddress = detailCorporation.address;
           });
-          if (detailCorporation.countryId) {
-            proxy.post("/customizeArea/list", { parentId: detailCorporation.countryId }).then((resProvince) => {
-              let sellProvinceData = resProvince.filter((item) => item.id === detailCorporation.provinceId);
-              if (sellProvinceData && sellProvinceData.length > 0) {
-                formData.data.sellProvinceName = sellProvinceData[0].name;
-              } else {
-                formData.data.sellProvinceName = "";
-              }
-            });
-          } else {
-            formData.data.sellProvinceName = "";
-          }
-          if (detailCorporation.provinceId) {
-            proxy.post("/customizeArea/list", { parentId: detailCorporation.provinceId }).then((resCity) => {
-              let sellCityData = resCity.filter((item) => item.id === detailCorporation.cityId);
-              if (sellCityData && sellCityData.length > 0) {
-                formData.data.sellCityName = sellCityData[0].name;
-              } else {
-                formData.data.sellCityName = "";
-              }
-            });
-          } else {
-            formData.data.sellCityName = "";
-          }
-          formData.data.sellAddress = detailCorporation.address;
-        });
       }
       formData.data.sellContactName = res.contactName;
       formData.data.sellContactNumber = res.contactNumber;
@@ -848,11 +836,15 @@ const changeCustomer = (val) => {
 };
 const createFilter = (queryString) => {
   return (restaurant) => {
-    return restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0;
+    return (
+      restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0
+    );
   };
 };
 const querySearchPerson = (queryString, callback) => {
-  const results = queryString ? customerUserList.value.filter(createFilter(queryString)) : customerUserList.value;
+  const results = queryString
+    ? customerUserList.value.filter(createFilter(queryString))
+    : customerUserList.value;
   callback(results);
 };
 const handlePerson = (item) => {
@@ -860,7 +852,9 @@ const handlePerson = (item) => {
 };
 const selectProduct = (goods) => {
   if (goods && goods.id) {
-    let data = formData.data.sampleProductList.filter((item) => item.productId === goods.id);
+    let data = formData.data.sampleProductList.filter(
+      (item) => item.productId === goods.id
+    );
     if (data && data.length > 0) {
       return ElMessage("该产品已添加");
     }
@@ -873,7 +867,8 @@ const selectProduct = (goods) => {
       let innerPackMethod = goods.innerPackMethod.split(",");
       innerPackMethod.map((item) => {
         if (packMethod) {
-          packMethod = packMethod + "," + proxy.dictValueLabel(item, innerMethod.value);
+          packMethod =
+            packMethod + "," + proxy.dictValueLabel(item, innerMethod.value);
         } else {
           packMethod = proxy.dictValueLabel(item, innerMethod.value);
         }
@@ -883,18 +878,23 @@ const selectProduct = (goods) => {
       let outerPackMethod = goods.outerPackMethod.split(",");
       outerPackMethod.map((item) => {
         if (packMethod) {
-          packMethod = packMethod + "," + proxy.dictValueLabel(item, outsideMethod.value);
+          packMethod =
+            packMethod + "," + proxy.dictValueLabel(item, outsideMethod.value);
         } else {
           packMethod = proxy.dictValueLabel(item, outsideMethod.value);
         }
       });
     }
-    if (formData.data.sampleProductList && formData.data.sampleProductList.length > 0) {
+    if (
+      formData.data.sampleProductList &&
+      formData.data.sampleProductList.length > 0
+    ) {
       formData.data.sampleProductList.push({
         fileUrl: fileUrl,
         productId: goods.id,
         productName: goods.name,
-        productModel: goods.productLong + "*" + goods.productWide + "*" + goods.productHigh,
+        productModel:
+          goods.productLong + "*" + goods.productWide + "*" + goods.productHigh,
         quantity: undefined,
         price: undefined,
         amount: "",
@@ -907,7 +907,12 @@ const selectProduct = (goods) => {
           fileUrl: fileUrl,
           productId: goods.id,
           productName: goods.name,
-          productModel: goods.productLong + "*" + goods.productWide + "*" + goods.productHigh,
+          productModel:
+            goods.productLong +
+            "*" +
+            goods.productWide +
+            "*" +
+            goods.productHigh,
           quantity: undefined,
           price: undefined,
           amount: "",
@@ -935,17 +940,28 @@ const onPicture = (path) => {
   window.open(path, "_blank");
 };
 const handleRemove = async (index, row) => {
-  formData.data.sampleShipmentList = formData.data.sampleShipmentList.filter((item) => item.productId !== row.productId);
+  formData.data.sampleShipmentList = formData.data.sampleShipmentList.filter(
+    (item) => item.productId !== row.productId
+  );
   await formData.data.sampleProductList.splice(index, 1);
   totalAmount();
 };
 const calculationAmount = () => {
   nextTick(() => {
-    if (formData.data.sampleProductList && formData.data.sampleProductList.length > 0) {
+    if (
+      formData.data.sampleProductList &&
+      formData.data.sampleProductList.length > 0
+    ) {
       for (let i = 0; i < formData.data.sampleProductList.length; i++) {
         let money = 0;
-        if (formData.data.sampleProductList[i].quantity && formData.data.sampleProductList[i].price) {
-          money = parseFloat(Number(formData.data.sampleProductList[i].quantity) * Number(formData.data.sampleProductList[i].price)).toFixed(2);
+        if (
+          formData.data.sampleProductList[i].quantity &&
+          formData.data.sampleProductList[i].price
+        ) {
+          money = parseFloat(
+            Number(formData.data.sampleProductList[i].quantity) *
+              Number(formData.data.sampleProductList[i].price)
+          ).toFixed(2);
         }
         formData.data.sampleProductList[i].amount = money;
       }
@@ -957,31 +973,46 @@ const calculationAmount = () => {
 };
 const totalAmount = () => {
   let money = 0;
-  if (formData.data.sampleProductList && formData.data.sampleProductList.length > 0) {
+  if (
+    formData.data.sampleProductList &&
+    formData.data.sampleProductList.length > 0
+  ) {
     for (let i = 0; i < formData.data.sampleProductList.length; i++) {
       if (formData.data.sampleProductList[i].amount) {
-        money = parseFloat(Number(money) + Number(formData.data.sampleProductList[i].amount)).toFixed(2);
+        money = parseFloat(
+          Number(money) + Number(formData.data.sampleProductList[i].amount)
+        ).toFixed(2);
       }
     }
   }
-  if (formData.data.sampleProjectList && formData.data.sampleProjectList.length > 0) {
+  if (
+    formData.data.sampleProjectList &&
+    formData.data.sampleProjectList.length > 0
+  ) {
     for (let i = 0; i < formData.data.sampleProjectList.length; i++) {
       if (formData.data.sampleProjectList[i].amount) {
-        money = parseFloat(Number(money) + Number(formData.data.sampleProjectList[i].amount)).toFixed(2);
+        money = parseFloat(
+          Number(money) + Number(formData.data.sampleProjectList[i].amount)
+        ).toFixed(2);
       }
     }
   }
   formData.data.amount = money;
 };
 const clickAdd = () => {
-  if (formData.data.sampleProjectList && formData.data.sampleProjectList.length > 0) {
+  if (
+    formData.data.sampleProjectList &&
+    formData.data.sampleProjectList.length > 0
+  ) {
     formData.data.sampleProjectList.push({
       payName: "",
       amount: undefined,
       remark: "",
     });
   } else {
-    formData.data.sampleProjectList = [{ payName: "", amount: undefined, remark: "" }];
+    formData.data.sampleProjectList = [
+      { payName: "", amount: undefined, remark: "" },
+    ];
   }
 };
 const handleDelete = async (index) => {
@@ -1006,7 +1037,12 @@ const querySearch = (queryString, callback) => {
 const handleSubmit = async () => {
   let status = await submit.value.handleSubmit(() => {});
   if (status) {
-    if (!(formData.data.sampleProductList && formData.data.sampleProductList.length > 0)) {
+    if (
+      !(
+        formData.data.sampleProductList &&
+        formData.data.sampleProductList.length > 0
+      )
+    ) {
       ElMessage("请添加至少一件商品");
       return false;
     }
@@ -1018,7 +1054,10 @@ const handleSubmit = async () => {
         }
       }
     }
-    if (formData.data.packageFileList && formData.data.packageFileList.length > 0) {
+    if (
+      formData.data.packageFileList &&
+      formData.data.packageFileList.length > 0
+    ) {
       for (let i = 0; i < formData.data.packageFileList.length; i++) {
         if (formData.data.packageFileList[i].raw.uploadState) {
           ElMessage("文件上传中,请稍后提交");
@@ -1026,9 +1065,15 @@ const handleSubmit = async () => {
         }
       }
     }
-    if (formData.data.sampleShipmentList && formData.data.sampleShipmentList.length > 0) {
+    if (
+      formData.data.sampleShipmentList &&
+      formData.data.sampleShipmentList.length > 0
+    ) {
       for (let i = 0; i < formData.data.sampleProductList.length; i++) {
-        let data = formData.data.sampleShipmentList.filter((item) => item.productId === formData.data.sampleProductList[i].productId);
+        let data = formData.data.sampleShipmentList.filter(
+          (item) =>
+            item.productId === formData.data.sampleProductList[i].productId
+        );
         if (data && data.length > 0) {
           let quantity = 0;
           for (let j = 0; j < data.length; j++) {
@@ -1058,7 +1103,10 @@ watch(
   props.queryData,
   () => {
     formOption.disabled = judgeStatus();
-    if (props.queryData && ["10", "20", "30"].includes(route.query.processType)) {
+    if (
+      props.queryData &&
+      ["10", "20", "30"].includes(route.query.processType)
+    ) {
       for (var text in props.queryData) {
         if (text === "fileList" || text === "packageFileList") {
           if (props.queryData[text] && props.queryData[text].length > 0) {

+ 20 - 101
src/components/process/PurchasePayment.vue

@@ -1,60 +1,27 @@
 <template>
   <div style="width: 100%; padding: 0px 15px">
-    <byForm
-      :formConfig="formConfig"
-      :formOption="formOption"
-      v-model="formData.data"
-      :rules="rules"
-      ref="submit"
-    >
+    <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
       <template #deadline>
         <div style="width: 100%">
-          <el-date-picker
-            v-model="formData.data.deadline"
-            type="date"
-            placeholder="请选择付款期限"
-            value-format="YYYY-MM-DD"
-            style="width: 100%"
-          />
+          <el-date-picker v-model="formData.data.deadline" type="date" placeholder="请选择付款期限" value-format="YYYY-MM-DD" style="width: 100%" />
         </div>
       </template>
       <template #receiptsNum>
         <div style="width: 100%">
-          <el-input-number
-            onmousewheel="return false;"
-            v-model="formData.data.receiptsNum"
-            placeholder="请输入单据数量"
-            :min="0"
-            :precision="0"
-            :controls="false"
-            style="width: 100%"
-          />
+          <el-input-number onmousewheel="return false;" v-model="formData.data.receiptsNum" placeholder="请输入单据数量" :min="0" :precision="0"
+                           :controls="false" style="width: 100%" />
         </div>
       </template>
       <template #taxRate>
         <div style="width: 100%">
-          <el-input-number
-            onmousewheel="return false;"
-            v-model="formData.data.taxRate"
-            placeholder="请输入税率"
-            :min="0"
-            :max="100"
-            :precision="2"
-            :controls="false"
-            style="width: 100%"
-          />
+          <el-input-number onmousewheel="return false;" v-model="formData.data.taxRate" placeholder="请输入税率" :min="0" :max="100" :precision="2"
+                           :controls="false" style="width: 100%" />
         </div>
       </template>
       <template #fileList>
         <div style="width: 100%">
-          <el-upload
-            v-model:fileList="fileList"
-            action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-            multiple
-            :data="uploadData"
-            :before-upload="uploadFile"
-            :on-preview="onPreviewFile"
-          >
+          <el-upload v-model:fileList="fileList" :action="uploadUrl" multiple :data="uploadData" :before-upload="uploadFile"
+                     :on-preview="onPreviewFile">
             <el-button>选择</el-button>
           </el-upload>
         </div>
@@ -62,59 +29,26 @@
       <template #payDetailList>
         <div style="width: 100%">
           <el-button type="primary" @click="clickAdd()">添加行</el-button>
-          <el-table
-            :data="formData.data.payDetailList"
-            style="width: 100%; margin-top: 16px"
-          >
+          <el-table :data="formData.data.payDetailList" style="width: 100%; margin-top: 16px">
             <el-table-column label="采购合同" width="220">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item
-                    :prop="'payDetailList.' + $index + '.purchaseId'"
-                    :rules="rules.purchaseId"
-                    :inline-message="true"
-                  >
-                    <el-select
-                      v-model="row.purchaseId"
-                      placeholder="请选择采购合同"
-                      style="width: 100%"
-                      @change="changePurchaseId(row, true)"
-                    >
-                      <el-option
-                        v-for="item in contractList"
-                        :key="item.value"
-                        :label="item.label"
-                        :value="item.value"
-                      />
+                  <el-form-item :prop="'payDetailList.' + $index + '.purchaseId'" :rules="rules.purchaseId" :inline-message="true">
+                    <el-select v-model="row.purchaseId" placeholder="请选择采购合同" style="width: 100%" @change="changePurchaseId(row, true)">
+                      <el-option v-for="item in contractList" :key="item.value" :label="item.label" :value="item.value" />
                     </el-select>
                   </el-form-item>
                 </div>
               </template>
             </el-table-column>
             <el-table-column prop="amount" label="合同金额" width="140" />
-            <el-table-column
-              prop="sumPayMoney"
-              label="已付款金额"
-              width="140"
-            />
-            <el-table-column
-              prop="sumInvoiceMoney"
-              label="已收发票金额"
-              width="140"
-            />
+            <el-table-column prop="sumPayMoney" label="已付款金额" width="140" />
+            <el-table-column prop="sumInvoiceMoney" label="已收发票金额" width="140" />
             <el-table-column label="款项说明">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item
-                    :prop="'payDetailList.' + $index + '.remark'"
-                    :rules="rules.remark"
-                    :inline-message="true"
-                  >
-                    <el-input
-                      v-model="row.remark"
-                      placeholder="请输入款项说明"
-                      style="width: 100%"
-                    />
+                  <el-form-item :prop="'payDetailList.' + $index + '.remark'" :rules="rules.remark" :inline-message="true">
+                    <el-input v-model="row.remark" placeholder="请输入款项说明" style="width: 100%" />
                   </el-form-item>
                 </div>
               </template>
@@ -122,31 +56,16 @@
             <el-table-column label="付款金额" width="180">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item
-                    :prop="'payDetailList.' + $index + '.money'"
-                    :rules="rules.money"
-                    :inline-message="true"
-                  >
-                    <el-input-number
-                      onmousewheel="return false;"
-                      v-model="row.money"
-                      placeholder="请输入金额"
-                      style="width: 100%"
-                      :precision="2"
-                      :controls="false"
-                      :min="0"
-                      :disabled="row.id"
-                      @change="changeMoney()"
-                    />
+                  <el-form-item :prop="'payDetailList.' + $index + '.money'" :rules="rules.money" :inline-message="true">
+                    <el-input-number onmousewheel="return false;" v-model="row.money" placeholder="请输入金额" style="width: 100%" :precision="2"
+                                     :controls="false" :min="0" :disabled="row.id" @change="changeMoney()" />
                   </el-form-item>
                 </div>
               </template>
             </el-table-column>
             <el-table-column label="操作" width="80">
               <template #default="{ row, $index }">
-                <el-button type="primary" link @click="handleRemove($index)"
-                  >删除</el-button
-                >
+                <el-button type="primary" link @click="handleRemove($index)">删除</el-button>
               </template>
             </el-table-column>
           </el-table>

Dosya farkı çok büyük olduğundan ihmal edildi
+ 138 - 425
src/components/process/SendFunds.vue


+ 70 - 313
src/components/process/ServiceContract.vue

@@ -1,51 +1,27 @@
 <template>
   <div style="width: 100%; padding: 0px 15px">
-    <byForm
-      :formConfig="formConfig"
-      :formOption="formOption"
-      v-model="formData.data"
-      :rules="rules"
-      ref="submit"
-    >
+    <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
       <template #seller>
         <div style="width: 100%">
           <el-form-item prop="sellCorporationId">
-            <el-select
-              v-model="formData.data.sellCorporationId"
-              style="width: 100%"
-              disabled
-            >
-              <el-option
-                v-for="item in corporationList"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value"
-              />
+            <el-select v-model="formData.data.sellCorporationId" style="width: 100%" disabled>
+              <el-option v-for="item in corporationList" :key="item.value" :label="item.label" :value="item.value" />
             </el-select>
           </el-form-item>
           <el-row style="margin-top: 20px; width: 100%">
             <el-col :span="8">
               <el-form-item label="地址" prop="sellCountryName">
-                <el-input
-                  v-model="formData.data.sellCountryName"
-                  placeholder="请输入国家"
-                />
+                <el-input v-model="formData.data.sellCountryName" placeholder="请输入国家" />
               </el-form-item>
             </el-col>
             <el-col :span="8">
               <el-form-item label=" " prop="sellProvinceName">
-                <el-input
-                  v-model="formData.data.sellProvinceName"
-                  placeholder="请输入省/州"
-                />
+                <el-input v-model="formData.data.sellProvinceName" placeholder="请输入省/州" />
               </el-form-item>
             </el-col>
             <el-col :span="8">
               <el-form-item label=" " prop="sellCityName">
-                <el-input
-                  v-model="formData.data.sellCityName"
-                  placeholder="请输入城市"
-                />
+                <el-input v-model="formData.data.sellCityName" placeholder="请输入城市" />
               </el-form-item>
             </el-col>
           </el-row>
@@ -60,18 +36,12 @@
           <el-row style="margin-top: 20px; width: 100%">
             <el-col :span="8">
               <el-form-item label="联系人" prop="sellContactName">
-                <el-input
-                  v-model="formData.data.sellContactName"
-                  placeholder="请输入联系人"
-                />
+                <el-input v-model="formData.data.sellContactName" placeholder="请输入联系人" />
               </el-form-item>
             </el-col>
             <el-col :span="16">
               <el-form-item label=" " prop="sellContactNumber">
-                <el-input
-                  v-model="formData.data.sellContactNumber"
-                  placeholder="请输入联系人电话"
-                />
+                <el-input v-model="formData.data.sellContactNumber" placeholder="请输入联系人电话" />
               </el-form-item>
             </el-col>
           </el-row>
@@ -79,15 +49,8 @@
       </template>
       <template #file>
         <div style="width: 100%">
-          <el-upload
-            v-model:fileList="formData.data.fileList"
-            action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-            :data="uploadData"
-            multiple
-            :before-upload="uploadFile"
-            :on-success="handleSuccess"
-            :on-preview="onPreviewFile"
-          >
+          <el-upload v-model:fileList="formData.data.fileList" :action="uploadUrl" :data="uploadData" multiple :before-upload="uploadFile"
+                     :on-success="handleSuccess" :on-preview="onPreviewFile">
             <el-button>选择</el-button>
           </el-upload>
         </div>
@@ -96,71 +59,36 @@
         <div style="width: 100%">
           <div style="width: 100%">
             <el-form-item prop="buyCorporationId">
-              <el-select
-                v-model="formData.data.buyCorporationId"
-                filterable
-                style="width: 100%"
-                @change="changeCustomer"
-              >
-                <el-option
-                  v-for="item in customerList"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
-                />
+              <el-select v-model="formData.data.buyCorporationId" filterable style="width: 100%" @change="changeCustomer">
+                <el-option v-for="item in customerList" :key="item.value" :label="item.label" :value="item.value" />
               </el-select>
             </el-form-item>
             <el-row style="margin-top: 20px; width: 100%">
               <el-col :span="6">
                 <el-form-item label="地址" prop="countryId">
-                  <el-select
-                    v-model="formData.data.countryId"
-                    placeholder="国家"
-                    filterable
-                    @change="(val) => getCityData(val, '20', true)"
-                    :no-match-text="'无数据,请联系管理员添加'"
-                  >
-                    <el-option
-                      v-for="item in countryData"
-                      :key="item.id"
-                      :label="item.chineseName + '(' + item.name + ')'"
-                      :value="item.id"
-                    >
+                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => getCityData(val, '20', true)"
+                             :no-match-text="'无数据,请联系管理员添加'">
+                    <el-option v-for="item in countryData" :key="item.id" :label="item.chineseName + '(' + item.name + ')'" :value="item.id">
                     </el-option>
                   </el-select>
                 </el-form-item>
               </el-col>
               <el-col :span="6">
                 <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 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">
-                  <selectCity
-                    placeholder="城市"
-                    addressId="cityId"
-                    addressName="cityName"
-                    v-model="formData.data"
-                    :data="cityData"
-                  >
+                  <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">
-                  <el-input
-                    v-model="formData.data.buyPostalCode"
-                    placeholder="请输入邮编"
-                  />
+                  <el-input v-model="formData.data.buyPostalCode" placeholder="请输入邮编" />
                 </el-form-item>
               </el-col>
             </el-row>
@@ -175,23 +103,14 @@
             <el-row style="margin-top: 20px; width: 100%">
               <el-col :span="8">
                 <el-form-item label="联系人" prop="buyContactName">
-                  <el-autocomplete
-                    v-model="formData.data.buyContactName"
-                    :fetch-suggestions="querySearchPerson"
-                    clearable
-                    class="inline-input w-50"
-                    placeholder="请输入联系人"
-                    @select="handlePerson"
-                  >
+                  <el-autocomplete v-model="formData.data.buyContactName" :fetch-suggestions="querySearchPerson" clearable class="inline-input w-50"
+                                   placeholder="请输入联系人" @select="handlePerson">
                   </el-autocomplete>
                 </el-form-item>
               </el-col>
               <el-col :span="16">
                 <el-form-item label=" " prop="buyContactNumber">
-                  <el-input
-                    v-model="formData.data.buyContactNumber"
-                    placeholder="请输入联系人电话"
-                  />
+                  <el-input v-model="formData.data.buyContactNumber" placeholder="请输入联系人电话" />
                 </el-form-item>
               </el-col>
             </el-row>
@@ -205,29 +124,17 @@
               <div v-html="getStyle(formData.data.remark)"></div>
             </div>
           </div>
-          <Editor
-            v-else
-            :value="formData.data.remark"
-            @updateValue="updateContentSeller"
-            ref="remarkEditor"
-          />
+          <Editor v-else :value="formData.data.remark" @updateValue="updateContentSeller" ref="remarkEditor" />
         </div>
       </template>
       <template #commodity>
         <div style="width: 100%">
           <el-button @click="openProduct = true">添加商品</el-button>
-          <el-table
-            :data="formData.data.serviceContractProductList"
-            style="width: 100%; margin-top: 16px"
-          >
+          <el-table :data="formData.data.serviceContractProductList" style="width: 100%; margin-top: 16px">
             <el-table-column label="商品图片" width="80">
               <template #default="{ row }">
                 <div v-if="row.fileUrl">
-                  <img
-                    :src="row.fileUrl"
-                    class="pic"
-                    @click="onPicture(row.fileUrl)"
-                  />
+                  <img :src="row.fileUrl" class="pic" @click="onPicture(row.fileUrl)" />
                 </div>
                 <div v-else></div>
               </template>
@@ -237,17 +144,10 @@
             <el-table-column label="商品英文名" min-width="200">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item
-                    :prop="
+                  <el-form-item :prop="
                       'serviceContractProductList.' + $index + '.productName'
-                    "
-                    :rules="rules.productName"
-                    :inline-message="true"
-                  >
-                    <el-input
-                      v-model="row.productName"
-                      placeholder="请输入商品英文名"
-                    />
+                    " :rules="rules.productName" :inline-message="true">
+                    <el-input v-model="row.productName" placeholder="请输入商品英文名" />
                   </el-form-item>
                 </div>
               </template>
@@ -255,17 +155,10 @@
             <el-table-column label="规格型号" width="180">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item
-                    :prop="
+                  <el-form-item :prop="
                       'serviceContractProductList.' + $index + '.productModel'
-                    "
-                    :rules="rules.productModel"
-                    :inline-message="true"
-                  >
-                    <el-input
-                      v-model="row.productModel"
-                      placeholder="请输入规格型号"
-                    />
+                    " :rules="rules.productModel" :inline-message="true">
+                    <el-input v-model="row.productModel" placeholder="请输入规格型号" />
                   </el-form-item>
                 </div>
               </template>
@@ -274,19 +167,9 @@
             <el-table-column label="数量" width="150">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item
-                    :prop="'serviceContractProductList.' + $index + '.quantity'"
-                    :rules="rules.quantity"
-                    :inline-message="true"
-                  >
-                    <el-input-number
-                      onmousewheel="return false;"
-                      v-model="row.quantity"
-                      placeholder="请输入数量"
-                      style="width: 100%"
-                      :controls="false"
-                      :min="0"
-                      @change="
+                  <el-form-item :prop="'serviceContractProductList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true">
+                    <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入数量" style="width: 100%" :controls="false"
+                                     :min="0" @change="
                         () => {
                           return calculationAmount(
                             'serviceContractProductList',
@@ -294,8 +177,7 @@
                             'quantity'
                           );
                         }
-                      "
-                    />
+                      " />
                   </el-form-item>
                 </div>
               </template>
@@ -303,19 +185,9 @@
             <el-table-column label="单价" width="160">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item
-                    :prop="'serviceContractProductList.' + $index + '.price'"
-                    :rules="rules.price"
-                    :inline-message="true"
-                  >
-                    <el-input-number
-                      onmousewheel="return false;"
-                      v-model="row.price"
-                      placeholder="请输入单价"
-                      style="width: 100%"
-                      :controls="false"
-                      :min="0"
-                      @change="
+                  <el-form-item :prop="'serviceContractProductList.' + $index + '.price'" :rules="rules.price" :inline-message="true">
+                    <el-input-number onmousewheel="return false;" v-model="row.price" placeholder="请输入单价" style="width: 100%" :controls="false"
+                                     :min="0" @change="
                         () => {
                           return calculationAmount(
                             'serviceContractProductList',
@@ -323,29 +195,16 @@
                             'price'
                           );
                         }
-                      "
-                    />
+                      " />
                   </el-form-item>
                 </div>
               </template>
             </el-table-column>
             <el-table-column prop="amount" label="金额" width="100" />
-            <el-table-column
-              align="center"
-              label="操作"
-              width="120"
-              fixed="right"
-            >
+            <el-table-column align="center" label="操作" width="120" fixed="right">
               <template #default="{ row, $index }">
-                <el-button
-                  type="primary"
-                  link
-                  @click="handleHandover(row, $index)"
-                  >交接单</el-button
-                >
-                <el-button type="primary" link @click="handleRemove($index)"
-                  >删除</el-button
-                >
+                <el-button type="primary" link @click="handleHandover(row, $index)">交接单</el-button>
+                <el-button type="primary" link @click="handleRemove($index)">删除</el-button>
               </template>
             </el-table-column>
           </el-table>
@@ -354,25 +213,13 @@
       <template #otherCharge>
         <div style="width: 100%">
           <el-button type="primary" @click="clickAdd()">添加行</el-button>
-          <el-table
-            :data="formData.data.serviceContractPayList"
-            style="width: 100%; margin-top: 16px"
-          >
+          <el-table :data="formData.data.serviceContractPayList" style="width: 100%; margin-top: 16px">
             <el-table-column label="收费项目" width="220">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item
-                    :prop="'serviceContractPayList.' + $index + '.payName'"
-                    :rules="rules.payName"
-                    :inline-message="true"
-                  >
-                    <el-autocomplete
-                      v-model="row.payName"
-                      :fetch-suggestions="querySearch"
-                      clearable
-                      class="inline-input w-50"
-                      placeholder="请输入收费项目"
-                    />
+                  <el-form-item :prop="'serviceContractPayList.' + $index + '.payName'" :rules="rules.payName" :inline-message="true">
+                    <el-autocomplete v-model="row.payName" :fetch-suggestions="querySearch" clearable class="inline-input w-50"
+                                     placeholder="请输入收费项目" />
                   </el-form-item>
                 </div>
               </template>
@@ -380,19 +227,9 @@
             <el-table-column label="金额" width="180">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item
-                    :prop="'serviceContractPayList.' + $index + '.amount'"
-                    :rules="rules.amount"
-                    :inline-message="true"
-                  >
-                    <el-input-number
-                      onmousewheel="return false;"
-                      v-model="row.amount"
-                      placeholder="请输入金额"
-                      style="width: 100%"
-                      :controls="false"
-                      :min="0"
-                      @change="
+                  <el-form-item :prop="'serviceContractPayList.' + $index + '.amount'" :rules="rules.amount" :inline-message="true">
+                    <el-input-number onmousewheel="return false;" v-model="row.amount" placeholder="请输入金额" style="width: 100%" :controls="false"
+                                     :min="0" @change="
                         () => {
                           return totalAmount(
                             'serviceContractPayList',
@@ -400,8 +237,7 @@
                             'amount'
                           );
                         }
-                      "
-                    />
+                      " />
                   </el-form-item>
                 </div>
               </template>
@@ -409,24 +245,15 @@
             <el-table-column label="备注">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item
-                    :prop="'serviceContractPayList.' + $index + '.remark'"
-                  >
+                  <el-form-item :prop="'serviceContractPayList.' + $index + '.remark'">
                     <el-input v-model="row.remark" placeholder="请输入备注" />
                   </el-form-item>
                 </div>
               </template>
             </el-table-column>
-            <el-table-column
-              align="center"
-              label="操作"
-              width="80"
-              fixed="right"
-            >
+            <el-table-column align="center" label="操作" width="80" fixed="right">
               <template #default="{ row, $index }">
-                <el-button type="primary" link @click="handleDelete($index)"
-                  >删除</el-button
-                >
+                <el-button type="primary" link @click="handleDelete($index)">删除</el-button>
               </template>
             </el-table-column>
           </el-table>
@@ -437,74 +264,35 @@
           <el-row style="margin-top: 20px; width: 100%">
             <el-col :span="4">
               <el-form-item label="币种" prop="currency">
-                <el-select
-                  v-model="formData.data.currency"
-                  placeholder="请选择币种"
-                  style="width: 100%"
-                >
-                  <el-option
-                    v-for="item in accountCurrency"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value"
-                  />
+                <el-select v-model="formData.data.currency" placeholder="请选择币种" style="width: 100%">
+                  <el-option v-for="item in accountCurrency" :key="item.value" :label="item.label" :value="item.value" />
                 </el-select>
               </el-form-item>
             </el-col>
             <el-col :span="6">
               <el-form-item label="合同总金额" prop="amount">
-                <el-input
-                  v-model="formData.data.amount"
-                  placeholder="合同总金额"
-                  disabled
-                />
+                <el-input v-model="formData.data.amount" placeholder="合同总金额" disabled />
               </el-form-item>
             </el-col>
           </el-row>
           <el-row style="margin-top: 20px; width: 100%">
             <el-col :span="7">
               <el-form-item label="付款方式" prop="paymentMethod">
-                <el-select
-                  v-model="formData.data.paymentMethod"
-                  placeholder="请选择付款方式"
-                  style="width: 100%"
-                >
-                  <el-option
-                    v-for="item in fundsPaymentMethod"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value"
-                  />
+                <el-select v-model="formData.data.paymentMethod" placeholder="请选择付款方式" style="width: 100%">
+                  <el-option v-for="item in fundsPaymentMethod" :key="item.value" :label="item.label" :value="item.value" />
                 </el-select>
               </el-form-item>
             </el-col>
             <el-col :span="7">
               <el-form-item label="预付比例 (%)" prop="advanceRatio">
-                <el-input-number
-                  onmousewheel="return false;"
-                  v-model="formData.data.advanceRatio"
-                  placeholder="请输入预付比例"
-                  style="width: 100%"
-                  :precision="2"
-                  :controls="false"
-                  :min="0"
-                  :max="100"
-                />
+                <el-input-number onmousewheel="return false;" v-model="formData.data.advanceRatio" placeholder="请输入预付比例" style="width: 100%"
+                                 :precision="2" :controls="false" :min="0" :max="100" />
               </el-form-item>
             </el-col>
             <el-col :span="7">
               <el-form-item label="收款账号" prop="shroffAccountId">
-                <el-select
-                  v-model="formData.data.shroffAccountId"
-                  placeholder="请选择收款账号"
-                  style="width: 100%"
-                >
-                  <el-option
-                    v-for="item in accountList"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value"
-                  />
+                <el-select v-model="formData.data.shroffAccountId" placeholder="请选择收款账号" style="width: 100%">
+                  <el-option v-for="item in accountList" :key="item.value" :label="item.label" :value="item.value" />
                 </el-select>
               </el-form-item>
             </el-col>
@@ -513,50 +301,21 @@
       </template>
     </byForm>
 
-    <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="70%" append-to-body>
+      <SelectGoods :selectList="acquireSelectList()" @cancel="openProduct = false" @pushGoods="pushGoods"></SelectGoods>
     </el-dialog>
 
-    <el-dialog
-      title="交接单"
-      v-if="openHandover"
-      v-model="openHandover"
-      width="800"
-    >
-      <byForm
-        :formConfig="formHandoverConfig"
-        :formOption="formOption"
-        v-model="productRow.data"
-      >
+    <el-dialog title="交接单" v-if="openHandover" v-model="openHandover" width="800">
+      <byForm :formConfig="formHandoverConfig" :formOption="formOption" v-model="productRow.data">
         <template #remark>
           <div style="width: 100%">
-            <Editor
-              :value="productRow.data.remark"
-              @updateValue="updateContent"
-            />
+            <Editor :value="productRow.data.remark" @updateValue="updateContent" />
           </div>
         </template>
         <template #file>
           <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-success="handleSuccess"
-              :on-preview="onPreviewFile"
-            >
+            <el-upload v-model:fileList="fileList" :action="uploadUrl" :data="uploadData" multiple :before-upload="uploadFile"
+                       :on-success="handleSuccess" :on-preview="onPreviewFile">
               <el-button>选择</el-button>
             </el-upload>
           </div>
@@ -564,9 +323,7 @@
       </byForm>
       <template #footer>
         <el-button @click="openHandover = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitHandoverForm()" size="large"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitHandoverForm()" size="large">确 定</el-button>
       </template>
     </el-dialog>
   </div>

+ 17 - 69
src/components/product/SelectMaterial.vue

@@ -1,100 +1,48 @@
 <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" :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" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
+               :selectConfig="selectConfig" :table-events="{
           //element talbe事件都能传
           select: select,
-        }"
-        :action-list="[]"
-        @get-list="getList"
-      >
+        }" :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])"
-            />
+            <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"
-      >
+    <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 v-model:fileList="fileList" :action="uploadUrl" :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="large">取 消</el-button>
-        <el-button
-          type="primary"
-          v-no-double-click="submitForm"
-          size="large"
-          :loading="submitLoading"
-        >
+        <el-button type="primary" v-no-double-click="submitForm" size="large" :loading="submitLoading">
           确 定
         </el-button>
       </template>
     </el-dialog>
-    <el-dialog
-      title="Excel导入"
-      v-model="openExcelDialog"
-      width="400"
-      v-loading="loading"
-    >
+    <el-dialog title="Excel导入" v-model="openExcelDialog" width="400" v-loading="loading">
       <template #footer>
-        <el-button @click="openExcelDialog = false" size="large"
-          >取 消</el-button
-        >
-        <el-button
-          type="primary"
-          @click="submitExcel()"
-          size="large"
-          :loading="submitLoading"
-        >
+        <el-button @click="openExcelDialog = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitExcel()" size="large" :loading="submitLoading">
           确 定
         </el-button>
       </template>

+ 17 - 69
src/components/product/SelectProduct.vue

@@ -1,100 +1,48 @@
 <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" :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" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
+               :selectConfig="selectConfig" :table-events="{
           //element talbe事件都能传
           select: select,
-        }"
-        :action-list="[]"
-        @get-list="getList"
-      >
+        }" :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])"
-            />
+            <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"
-      >
+    <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 v-model:fileList="fileList" :action="uploadUrl" :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="large">取 消</el-button>
-        <el-button
-          type="primary"
-          v-no-double-click="submitForm"
-          size="large"
-          :loading="submitLoading"
-        >
+        <el-button type="primary" v-no-double-click="submitForm" size="large" :loading="submitLoading">
           确 定
         </el-button>
       </template>
     </el-dialog>
-    <el-dialog
-      title="Excel导入"
-      v-model="openExcelDialog"
-      width="400"
-      v-loading="loading"
-    >
+    <el-dialog title="Excel导入" v-model="openExcelDialog" width="400" v-loading="loading">
       <template #footer>
-        <el-button @click="openExcelDialog = false" size="large"
-          >取 消</el-button
-        >
-        <el-button
-          type="primary"
-          @click="submitExcel()"
-          size="large"
-          :loading="submitLoading"
-        >
+        <el-button @click="openExcelDialog = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitExcel()" size="large" :loading="submitLoading">
           确 定
         </el-button>
       </template>

+ 9 - 0
src/main.js

@@ -15,6 +15,14 @@ import router from './router'
 import directive from './directive' // directive
 import './assets/styles/iconfont.js'
 
+// 全局文件上传地址
+let prefix =
+  window.location.protocol.indexOf("https") >= 0 ? "https://" : "http://";
+const uploadUrl =
+  prefix +
+  import.meta.env.VITE_APP_UPLOAD_API +
+  import.meta.env.VITE_APP_UPLOAD_BASE_API + '/open/fileInfo/upload'
+console.log(uploadUrl, 'ssssswwwwwwwww');
 
 // 注册指令
 import plugins from './plugins' // plugins
@@ -84,6 +92,7 @@ import print from "vue3-print-nb"
 const app = createApp(App)
 console.log(i18n.global.t('login.welcomeToLogin'))
 // 全局方法挂载
+app.config.globalProperties.uploadUrl = uploadUrl
 app.config.globalProperties.useDict = useDict
 app.config.globalProperties.get = get
 app.config.globalProperties.post = post

+ 73 - 59
src/router/index.js

@@ -1,4 +1,7 @@
-import { createWebHistory, createRouter } from "vue-router";
+import {
+  createWebHistory,
+  createRouter
+} from "vue-router";
 /* Layout */
 import Layout from "@/layout";
 
@@ -25,17 +28,14 @@ import Layout from "@/layout";
  */
 
 // 公共路由
-export const constantRoutes = [
-  {
+export const constantRoutes = [{
     path: "/redirect",
     component: Layout,
     hidden: true,
-    children: [
-      {
-        path: "/redirect/:path(.*)",
-        component: () => import("@/views/redirect/index.vue"),
-      },
-    ],
+    children: [{
+      path: "/redirect/:path(.*)",
+      component: () => import("@/views/redirect/index.vue"),
+    }, ],
   },
   {
     path: "/login",
@@ -65,18 +65,25 @@ export const constantRoutes = [
     path: "",
     component: Layout,
     redirect: "/index",
-    children: [
-      {
+    children: [{
         path: "/index",
         component: () => import("@/views/index"),
         name: "Index",
-        meta: { title: "首页", icon: "dashboard", affix: true },
+        meta: {
+          title: "首页",
+          icon: "dashboard",
+          affix: false
+        },
       },
       {
         path: "/platform_manage/process/processApproval",
         component: () => import("@/views/process/processApproval/index.vue"),
         name: "ProcessApproval",
-        meta: { title: "流程审批", icon: "dashboard", affix: false },
+        meta: {
+          title: "流程审批",
+          icon: "dashboard",
+          affix: false
+        },
       },
     ],
   },
@@ -85,87 +92,92 @@ export const constantRoutes = [
     component: Layout,
     hidden: true,
     redirect: "noredirect",
-    children: [
-      {
-        path: "profile",
-        component: () => import("@/views/system/user/profile/index"),
-        name: "Profile",
-        meta: { title: "个人中心", icon: "user" },
+    children: [{
+      path: "profile",
+      component: () => import("@/views/system/user/profile/index"),
+      name: "Profile",
+      meta: {
+        title: "个人中心",
+        icon: "user"
       },
-    ],
+    }, ],
   },
 ];
 // 动态路由,基于用户权限动态去加载
-export const dynamicRoutes = [
-  {
+export const dynamicRoutes = [{
     path: "/system/user-auth",
     component: Layout,
     hidden: true,
     permissions: ["system:user:edit"],
-    children: [
-      {
-        path: "role/:userId(\\d+)",
-        component: () => import("@/views/system/user/authRole"),
-        name: "AuthRole",
-        meta: { title: "分配角色", activeMenu: "/system/user" },
+    children: [{
+      path: "role/:userId(\\d+)",
+      component: () => import("@/views/system/user/authRole"),
+      name: "AuthRole",
+      meta: {
+        title: "分配角色",
+        activeMenu: "/system/user"
       },
-    ],
+    }, ],
   },
   {
     path: "/system/role-auth",
     component: Layout,
     hidden: true,
     permissions: ["system:role:edit"],
-    children: [
-      {
-        path: "user/:roleId(\\d+)",
-        component: () => import("@/views/system/role/authUser"),
-        name: "AuthUser",
-        meta: { title: "分配用户", activeMenu: "/system/role" },
+    children: [{
+      path: "user/:roleId(\\d+)",
+      component: () => import("@/views/system/role/authUser"),
+      name: "AuthUser",
+      meta: {
+        title: "分配用户",
+        activeMenu: "/system/role"
       },
-    ],
+    }, ],
   },
   {
     path: "/system/dict-data",
     component: Layout,
     hidden: true,
     permissions: ["system:dict:list"],
-    children: [
-      {
-        path: "index/:dictId(\\d+)",
-        component: () => import("@/views/system/dict/data"),
-        name: "Data",
-        meta: { title: "字典数据", activeMenu: "/system/dict" },
+    children: [{
+      path: "index/:dictId(\\d+)",
+      component: () => import("@/views/system/dict/data"),
+      name: "Data",
+      meta: {
+        title: "字典数据",
+        activeMenu: "/system/dict"
       },
-    ],
+    }, ],
   },
   {
     path: "/monitor/job-log",
     component: Layout,
     hidden: true,
     permissions: ["monitor:job:list"],
-    children: [
-      {
-        path: "index/:jobId(\\d+)",
-        component: () => import("@/views/monitor/job/log"),
-        name: "JobLog",
-        meta: { title: "调度日志", activeMenu: "/monitor/job" },
+    children: [{
+      path: "index/:jobId(\\d+)",
+      component: () => import("@/views/monitor/job/log"),
+      name: "JobLog",
+      meta: {
+        title: "调度日志",
+        activeMenu: "/monitor/job"
       },
-    ],
+    }, ],
   },
   {
     path: "/tool/gen-edit",
     component: Layout,
     hidden: true,
     permissions: ["tool:gen:edit"],
-    children: [
-      {
-        path: "index/:tableId(\\d+)",
-        component: () => import("@/views/tool/gen/editTable"),
-        name: "GenEdit",
-        meta: { title: "修改生成配置", activeMenu: "/tool/gen" },
+    children: [{
+      path: "index/:tableId(\\d+)",
+      component: () => import("@/views/tool/gen/editTable"),
+      name: "GenEdit",
+      meta: {
+        title: "修改生成配置",
+        activeMenu: "/tool/gen"
       },
-    ],
+    }, ],
   },
 ];
 
@@ -176,9 +188,11 @@ const router = createRouter({
     if (savedPosition) {
       return savedPosition;
     } else {
-      return { top: 0 };
+      return {
+        top: 0
+      };
     }
   },
 });
 
-export default router;
+export default router;

+ 253 - 186
src/views/EHSD/procurement/InspectionGoodsEHSD/index.vue

@@ -1,13 +1,7 @@
 <template>
   <div class="tenant">
-    <byTable
-      :source="sourceList.data"
-      :pagination="sourceList.pagination"
-      :config="config"
-      :loading="loading"
-      :selectConfig="selectConfig"
-      highlight-current-row
-      @get-list="getList">
+    <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
+             highlight-current-row @get-list="getList">
       <template #amount="{ item }">
         <div>
           <span style="padding-right: 4px">{{ item.currency }}</span>
@@ -19,13 +13,8 @@
     <el-dialog title="质检" v-if="openInspection" v-model="openInspection" width="90%">
       <div style="width: 100%">
         <el-steps align-center>
-          <el-step
-            v-for="(item, index) in steps"
-            :key="index"
-            :title="item.label"
-            style="cursor: pointer"
-            :status="getStepStatus(item)"
-            @click="clickSteps(item.value)" />
+          <el-step v-for="(item, index) in steps" :key="index" :title="item.label" style="cursor: pointer" :status="getStepStatus(item)"
+                   @click="clickSteps(item.value)" />
         </el-steps>
         <div v-show="selectSteps === 1" style="width: 100%">
           <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit1">
@@ -82,7 +71,8 @@
                     <el-table-column>
                       <template #default="{ row, $index }">
                         <div style="width: 100%">
-                          <el-form-item :prop="'inspectionSummaryList.' + $index + '.summaryLabel'" :rules="rules.summaryLabel" :inline-message="true">
+                          <el-form-item :prop="'inspectionSummaryList.' + $index + '.summaryLabel'" :rules="rules.summaryLabel"
+                                        :inline-message="true">
                             <el-input v-model="row.summaryLabel" />
                           </el-form-item>
                         </div>
@@ -91,7 +81,8 @@
                     <el-table-column>
                       <template #default="{ row, $index }">
                         <div style="width: 100%">
-                          <el-form-item :prop="'inspectionSummaryList.' + $index + '.summaryValue'" :rules="rules.summaryValue" :inline-message="true">
+                          <el-form-item :prop="'inspectionSummaryList.' + $index + '.summaryValue'" :rules="rules.summaryValue"
+                                        :inline-message="true">
                             <el-radio-group v-model="row.summaryValue" class="ml-4">
                               <el-radio v-for="(item, index) in summaryType" :key="index" :label="item.label"></el-radio>
                             </el-radio-group>
@@ -211,15 +202,11 @@
                   </el-table>
                 </div>
                 <el-form-item label="Sample Collection Record" style="margin-top: 20px">
-                  <el-upload
-                    v-model:fileList="fileListOne"
-                    action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-                    :data="uploadDataOne"
-                    multiple
-                    list-type="picture-card"
-                    :before-upload="uploadFileOne"
-                    accept=".gif, .jpeg, .jpg, .png">
-                    <el-icon><Plus /></el-icon>
+                  <el-upload v-model:fileList="fileListOne" :action="uploadUrl" :data="uploadDataOne" multiple list-type="picture-card"
+                             :before-upload="uploadFileOne" accept=".gif, .jpeg, .jpg, .png">
+                    <el-icon>
+                      <Plus />
+                    </el-icon>
                     <template #file="{ file }">
                       <div>
                         <div>
@@ -229,7 +216,9 @@
                               <el-icon><zoom-in /></el-icon>
                             </span>
                             <span class="el-upload-list__item-delete" @click="onRemoveOne(file)">
-                              <el-icon><Delete /></el-icon>
+                              <el-icon>
+                                <Delete />
+                              </el-icon>
                             </span>
                           </span>
                           <el-button type="primary" @click="clickFileRemark(file, 1)" text>Remark</el-button>
@@ -280,7 +269,8 @@
                       <el-table-column label="Order Cartons" width="150">
                         <template #default="{ row, $index }">
                           <div style="width: 100%">
-                            <el-form-item :prop="'ehsdQualityProductList.' + $index + '.orderCartons'" :rules="rules.orderCartons" :inline-message="true">
+                            <el-form-item :prop="'ehsdQualityProductList.' + $index + '.orderCartons'" :rules="rules.orderCartons"
+                                          :inline-message="true">
                               <el-input-number onmousewheel="return false;" v-model="row.orderCartons" :precision="0" :controls="false" :min="0" />
                             </el-form-item>
                           </div>
@@ -320,7 +310,8 @@
                       <el-table-column label="Packed" width="150">
                         <template #default="{ row, $index }">
                           <div style="width: 100%">
-                            <el-form-item :prop="'ehsdQualityProductList.' + $index + '.samplePacked'" :rules="rules.samplePacked" :inline-message="true">
+                            <el-form-item :prop="'ehsdQualityProductList.' + $index + '.samplePacked'" :rules="rules.samplePacked"
+                                          :inline-message="true">
                               <el-input-number onmousewheel="return false;" v-model="row.samplePacked" :precision="0" :controls="false" :min="0" />
                             </el-form-item>
                           </div>
@@ -329,7 +320,8 @@
                       <el-table-column label="Unpacked" width="150">
                         <template #default="{ row, $index }">
                           <div style="width: 100%">
-                            <el-form-item :prop="'ehsdQualityProductList.' + $index + '.sampleUnpacked'" :rules="rules.sampleUnpacked" :inline-message="true">
+                            <el-form-item :prop="'ehsdQualityProductList.' + $index + '.sampleUnpacked'" :rules="rules.sampleUnpacked"
+                                          :inline-message="true">
                               <el-input-number onmousewheel="return false;" v-model="row.sampleUnpacked" :precision="0" :controls="false" :min="0" />
                             </el-form-item>
                           </div>
@@ -347,7 +339,8 @@
                       <el-table-column label="Carton Number" width="160">
                         <template #default="{ row, $index }">
                           <div style="width: 100%">
-                            <el-form-item :prop="'ehsdQualityCartonsList.' + index + '.cartonNumber'" :rules="rules.cartonNumber" :inline-message="true">
+                            <el-form-item :prop="'ehsdQualityCartonsList.' + index + '.cartonNumber'" :rules="rules.cartonNumber"
+                                          :inline-message="true">
                               <el-input-number onmousewheel="return false;" v-model="item.cartonNumber" :precision="0" :controls="false" :min="0" />
                             </el-form-item>
                           </div>
@@ -372,7 +365,8 @@
                 <div style="margin-top: 20px">Workmanship Defectives / Function Inspection Findings</div>
                 <div>
                   <el-button type="primary" @click="clickWorkShipAdd()" plain>添加行</el-button>
-                  <el-table :data="formData.data.ehsdQualityWorkshipList" style="width: 100%; margin-top: 16px" show-summary :summary-method="getSummaries">
+                  <el-table :data="formData.data.ehsdQualityWorkshipList" style="width: 100%; margin-top: 16px" show-summary
+                            :summary-method="getSummaries">
                     <el-table-column label="#" width="50">
                       <template #default="{ row, $index }">
                         <div style="width: 100%">
@@ -383,7 +377,8 @@
                     <el-table-column label="Description">
                       <template #default="{ row, $index }">
                         <div style="width: 100%">
-                          <el-form-item :prop="'ehsdQualityWorkshipList.' + $index + '.description'" :rules="rules.description" :inline-message="true">
+                          <el-form-item :prop="'ehsdQualityWorkshipList.' + $index + '.description'" :rules="rules.description"
+                                        :inline-message="true">
                             <el-input v-model="row.description" />
                           </el-form-item>
                         </div>
@@ -424,15 +419,11 @@
                   </el-table>
                 </div>
                 <el-form-item label="Defect photos of Items" style="margin-top: 20px">
-                  <el-upload
-                    v-model:fileList="fileListTwo"
-                    action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-                    :data="uploadDataTwo"
-                    multiple
-                    list-type="picture-card"
-                    :before-upload="uploadFileTwo"
-                    accept=".gif, .jpeg, .jpg, .png">
-                    <el-icon><Plus /></el-icon>
+                  <el-upload v-model:fileList="fileListTwo" :action="uploadUrl" :data="uploadDataTwo" multiple list-type="picture-card"
+                             :before-upload="uploadFileTwo" accept=".gif, .jpeg, .jpg, .png">
+                    <el-icon>
+                      <Plus />
+                    </el-icon>
                     <template #file="{ file }">
                       <div>
                         <div>
@@ -442,7 +433,9 @@
                               <el-icon><zoom-in /></el-icon>
                             </span>
                             <span class="el-upload-list__item-delete" @click="onRemoveTwo(file)">
-                              <el-icon><Delete /></el-icon>
+                              <el-icon>
+                                <Delete />
+                              </el-icon>
                             </span>
                           </span>
                           <el-button type="primary" @click="clickFileRemark(file, 2)" text>Remark</el-button>
@@ -473,7 +466,8 @@
                     <el-table-column label="Description" min-width="160">
                       <template #default="{ row, $index }">
                         <div style="width: 100%">
-                          <el-form-item :prop="'ehsdQualitySiteTestList.' + $index + '.description'" :rules="rules.description" :inline-message="true">
+                          <el-form-item :prop="'ehsdQualitySiteTestList.' + $index + '.description'" :rules="rules.description"
+                                        :inline-message="true">
                             <el-input v-model="row.description" :rows="4" type="textarea" />
                           </el-form-item>
                         </div>
@@ -531,15 +525,11 @@
                   </el-col>
                 </el-row>
                 <el-form-item label="Photos" style="margin-top: 20px">
-                  <el-upload
-                    v-model:fileList="fileListThree"
-                    action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-                    :data="uploadDataThree"
-                    multiple
-                    list-type="picture-card"
-                    :before-upload="uploadFileThree"
-                    accept=".gif, .jpeg, .jpg, .png">
-                    <el-icon><Plus /></el-icon>
+                  <el-upload v-model:fileList="fileListThree" :action="uploadUrl" :data="uploadDataThree" multiple list-type="picture-card"
+                             :before-upload="uploadFileThree" accept=".gif, .jpeg, .jpg, .png">
+                    <el-icon>
+                      <Plus />
+                    </el-icon>
                     <template #file="{ file }">
                       <div>
                         <div>
@@ -549,7 +539,9 @@
                               <el-icon><zoom-in /></el-icon>
                             </span>
                             <span class="el-upload-list__item-delete" @click="onRemoveThree(file)">
-                              <el-icon><Delete /></el-icon>
+                              <el-icon>
+                                <Delete />
+                              </el-icon>
                             </span>
                           </span>
                           <el-button type="primary" @click="clickFileRemark(file, 3)" text>Remark</el-button>
@@ -581,7 +573,8 @@
                     <el-table-column label="Ref. Sample" width="180">
                       <template #default="{ row, $index }">
                         <div style="width: 100%">
-                          <el-form-item :prop="'ehsdQualityProductColorList.' + $index + '.refSample'" :rules="rules.refSample" :inline-message="true">
+                          <el-form-item :prop="'ehsdQualityProductColorList.' + $index + '.refSample'" :rules="rules.refSample"
+                                        :inline-message="true">
                             <el-input v-model="row.refSample" />
                           </el-form-item>
                         </div>
@@ -590,7 +583,8 @@
                     <el-table-column label="1# Sample" width="180">
                       <template #default="{ row, $index }">
                         <div style="width: 100%">
-                          <el-form-item :prop="'ehsdQualityProductColorList.' + $index + '.refSampleOne'" :rules="rules.refSampleOne" :inline-message="true">
+                          <el-form-item :prop="'ehsdQualityProductColorList.' + $index + '.refSampleOne'" :rules="rules.refSampleOne"
+                                        :inline-message="true">
                             <el-input v-model="row.refSampleOne" />
                           </el-form-item>
                         </div>
@@ -599,7 +593,8 @@
                     <el-table-column label="2# Sample" width="180">
                       <template #default="{ row, $index }">
                         <div style="width: 100%">
-                          <el-form-item :prop="'ehsdQualityProductColorList.' + $index + '.refSampleTwo'" :rules="rules.refSampleTwo" :inline-message="true">
+                          <el-form-item :prop="'ehsdQualityProductColorList.' + $index + '.refSampleTwo'" :rules="rules.refSampleTwo"
+                                        :inline-message="true">
                             <el-input v-model="row.refSampleTwo" />
                           </el-form-item>
                         </div>
@@ -608,10 +603,8 @@
                     <el-table-column label="3# Sample" width="180">
                       <template #default="{ row, $index }">
                         <div style="width: 100%">
-                          <el-form-item
-                            :prop="'ehsdQualityProductColorList.' + $index + '.refSampleThree'"
-                            :rules="rules.refSampleThree"
-                            :inline-message="true">
+                          <el-form-item :prop="'ehsdQualityProductColorList.' + $index + '.refSampleThree'" :rules="rules.refSampleThree"
+                                        :inline-message="true">
                             <el-input v-model="row.refSampleThree" />
                           </el-form-item>
                         </div>
@@ -658,7 +651,8 @@
                       <el-table-column label="Actual" width="180">
                         <template #default="{ row, $index }">
                           <div style="width: 100%">
-                            <el-form-item :prop="'ehsdQualityPackList.' + $index + '.cartonActual'" :rules="rules.cartonActual" :inline-message="true">
+                            <el-form-item :prop="'ehsdQualityPackList.' + $index + '.cartonActual'" :rules="rules.cartonActual"
+                                          :inline-message="true">
                               <el-input v-model="row.cartonActual" />
                             </el-form-item>
                           </div>
@@ -669,7 +663,8 @@
                       <el-table-column label="Marking/Spec." width="160">
                         <template #default="{ row, $index }">
                           <div style="width: 100%">
-                            <el-form-item :prop="'ehsdQualityPackList.' + $index + '.cartonSizeSpec'" :rules="rules.cartonSizeSpec" :inline-message="true">
+                            <el-form-item :prop="'ehsdQualityPackList.' + $index + '.cartonSizeSpec'" :rules="rules.cartonSizeSpec"
+                                          :inline-message="true">
                               <el-input v-model="row.cartonSizeSpec" />
                             </el-form-item>
                           </div>
@@ -678,7 +673,8 @@
                       <el-table-column label="Actual" width="180">
                         <template #default="{ row, $index }">
                           <div style="width: 100%">
-                            <el-form-item :prop="'ehsdQualityPackList.' + $index + '.cartonSizeActual'" :rules="rules.cartonSizeActual" :inline-message="true">
+                            <el-form-item :prop="'ehsdQualityPackList.' + $index + '.cartonSizeActual'" :rules="rules.cartonSizeActual"
+                                          :inline-message="true">
                               <el-input v-model="row.cartonSizeActual" />
                             </el-form-item>
                           </div>
@@ -689,7 +685,8 @@
                       <el-table-column label="Marking/Spec." width="160">
                         <template #default="{ row, $index }">
                           <div style="width: 100%">
-                            <el-form-item :prop="'ehsdQualityPackList.' + $index + '.grossWeightSpec'" :rules="rules.grossWeightSpec" :inline-message="true">
+                            <el-form-item :prop="'ehsdQualityPackList.' + $index + '.grossWeightSpec'" :rules="rules.grossWeightSpec"
+                                          :inline-message="true">
                               <el-input v-model="row.grossWeightSpec" />
                             </el-form-item>
                           </div>
@@ -698,10 +695,8 @@
                       <el-table-column label="Actual" width="180">
                         <template #default="{ row, $index }">
                           <div style="width: 100%">
-                            <el-form-item
-                              :prop="'ehsdQualityPackList.' + $index + '.grossWeightActual'"
-                              :rules="rules.grossWeightActual"
-                              :inline-message="true">
+                            <el-form-item :prop="'ehsdQualityPackList.' + $index + '.grossWeightActual'" :rules="rules.grossWeightActual"
+                                          :inline-message="true">
                               <el-input v-model="row.grossWeightActual" />
                             </el-form-item>
                           </div>
@@ -712,7 +707,8 @@
                       <el-table-column label="Marking/Spec." width="160">
                         <template #default="{ row, $index }">
                           <div style="width: 100%">
-                            <el-form-item :prop="'ehsdQualityPackList.' + $index + '.innerBoxSpec'" :rules="rules.innerBoxSpec" :inline-message="true">
+                            <el-form-item :prop="'ehsdQualityPackList.' + $index + '.innerBoxSpec'" :rules="rules.innerBoxSpec"
+                                          :inline-message="true">
                               <el-input v-model="row.innerBoxSpec" />
                             </el-form-item>
                           </div>
@@ -721,7 +717,8 @@
                       <el-table-column label="Actual" width="180">
                         <template #default="{ row, $index }">
                           <div style="width: 100%">
-                            <el-form-item :prop="'ehsdQualityPackList.' + $index + '.innerBoxActual'" :rules="rules.innerBoxActual" :inline-message="true">
+                            <el-form-item :prop="'ehsdQualityPackList.' + $index + '.innerBoxActual'" :rules="rules.innerBoxActual"
+                                          :inline-message="true">
                               <el-input v-model="row.innerBoxActual" />
                             </el-form-item>
                           </div>
@@ -806,20 +803,13 @@
               <div style="width: 100%">
                 <div style="margin-top: 20px">SUPPORT DOCUMENTATION</div>
                 <el-form-item label="Video" required>
-                  <el-upload
-                    class="avatar-uploader"
-                    action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-                    :data="uploadDataFour"
-                    :show-file-list="false"
-                    :on-success="onSuccess"
-                    :before-upload="uploadFileFour"
-                    accept=".mp4">
-                    <video
-                      v-if="formData.data.supportDocumentationFileList && formData.data.supportDocumentationFileList.length > 0"
-                      :src="formData.data.supportDocumentationFileList[0].fileUrl"
-                      style="width: 300px; height: 300px"
-                      controls></video>
-                    <el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
+                  <el-upload class="avatar-uploader" :action="uploadUrl" :data="uploadDataFour" :show-file-list="false" :on-success="onSuccess"
+                             :before-upload="uploadFileFour" accept=".mp4">
+                    <video v-if="formData.data.supportDocumentationFileList && formData.data.supportDocumentationFileList.length > 0"
+                           :src="formData.data.supportDocumentationFileList[0].fileUrl" style="width: 300px; height: 300px" controls></video>
+                    <el-icon v-else class="avatar-uploader-icon">
+                      <Plus />
+                    </el-icon>
                   </el-upload>
                 </el-form-item>
               </div>
@@ -1113,8 +1103,12 @@ const rules = ref({
   siteTestRemark: [{ required: true, message: "请输入", trigger: "blur" }],
   passed: [{ required: true, message: "请输入", trigger: "blur" }],
   failed: [{ required: true, message: "请输入", trigger: "blur" }],
-  productSpecificationResult: [{ required: true, message: "请选择", trigger: "change" }],
-  productSpecificationRemark: [{ required: true, message: "请输入", trigger: "blur" }],
+  productSpecificationResult: [
+    { required: true, message: "请选择", trigger: "change" },
+  ],
+  productSpecificationRemark: [
+    { required: true, message: "请输入", trigger: "blur" },
+  ],
   cartonSpec: [{ required: true, message: "请输入", trigger: "blur" }],
   cartonActual: [{ required: true, message: "请输入", trigger: "blur" }],
   cartonSizeSpec: [{ required: true, message: "请输入", trigger: "blur" }],
@@ -1299,50 +1293,75 @@ const clickInspectionTwo = (row) => {
   proxy.post("/ehsdQuality/detail", { id: row.id }).then((res) => {
     formData.data = res;
     if (formData.data.inspectionSummary) {
-      formData.data.inspectionSummaryList = JSON.parse(formData.data.inspectionSummary);
+      formData.data.inspectionSummaryList = JSON.parse(
+        formData.data.inspectionSummary
+      );
     }
     if (formData.data.shippingMarks) {
       formData.data.shippingMarksList = JSON.parse(formData.data.shippingMarks);
     }
-    proxy.post("/fileInfo/getList", { businessIdList: [res.id], fileType: 10 }).then((fileObj) => {
-      formData.data.sampleCollectionRecordFileList = fileObj[res.id] || [];
-      if (formData.data.sampleCollectionRecordFileList && formData.data.sampleCollectionRecordFileList.length > 0) {
-        fileListOne.value = formData.data.sampleCollectionRecordFileList.map((item) => {
-          return {
-            raw: item,
-            name: item.fileName,
-            url: item.fileUrl,
-          };
-        });
-      }
-    });
-    proxy.post("/fileInfo/getList", { businessIdList: [res.id], fileType: 20 }).then((fileObj) => {
-      formData.data.workshipPhotoFileList = fileObj[res.id] || [];
-      if (formData.data.workshipPhotoFileList && formData.data.workshipPhotoFileList.length > 0) {
-        fileListTwo.value = formData.data.workshipPhotoFileList.map((item) => {
-          return {
-            raw: item,
-            name: item.fileName,
-            url: item.fileUrl,
-          };
-        });
-      }
-    });
-    proxy.post("/fileInfo/getList", { businessIdList: [res.id], fileType: 30 }).then((fileObj) => {
-      formData.data.defectPhotosOfItemsFileList = fileObj[res.id] || [];
-      if (formData.data.defectPhotosOfItemsFileList && formData.data.defectPhotosOfItemsFileList.length > 0) {
-        fileListThree.value = formData.data.defectPhotosOfItemsFileList.map((item) => {
-          return {
-            raw: item,
-            name: item.fileName,
-            url: item.fileUrl,
-          };
-        });
-      }
-    });
-    proxy.post("/fileInfo/getList", { businessIdList: [res.id], fileType: 40 }).then((fileObj) => {
-      formData.data.supportDocumentationFileList = fileObj[res.id] || [];
-    });
+    proxy
+      .post("/fileInfo/getList", { businessIdList: [res.id], fileType: 10 })
+      .then((fileObj) => {
+        formData.data.sampleCollectionRecordFileList = fileObj[res.id] || [];
+        if (
+          formData.data.sampleCollectionRecordFileList &&
+          formData.data.sampleCollectionRecordFileList.length > 0
+        ) {
+          fileListOne.value = formData.data.sampleCollectionRecordFileList.map(
+            (item) => {
+              return {
+                raw: item,
+                name: item.fileName,
+                url: item.fileUrl,
+              };
+            }
+          );
+        }
+      });
+    proxy
+      .post("/fileInfo/getList", { businessIdList: [res.id], fileType: 20 })
+      .then((fileObj) => {
+        formData.data.workshipPhotoFileList = fileObj[res.id] || [];
+        if (
+          formData.data.workshipPhotoFileList &&
+          formData.data.workshipPhotoFileList.length > 0
+        ) {
+          fileListTwo.value = formData.data.workshipPhotoFileList.map(
+            (item) => {
+              return {
+                raw: item,
+                name: item.fileName,
+                url: item.fileUrl,
+              };
+            }
+          );
+        }
+      });
+    proxy
+      .post("/fileInfo/getList", { businessIdList: [res.id], fileType: 30 })
+      .then((fileObj) => {
+        formData.data.defectPhotosOfItemsFileList = fileObj[res.id] || [];
+        if (
+          formData.data.defectPhotosOfItemsFileList &&
+          formData.data.defectPhotosOfItemsFileList.length > 0
+        ) {
+          fileListThree.value = formData.data.defectPhotosOfItemsFileList.map(
+            (item) => {
+              return {
+                raw: item,
+                name: item.fileName,
+                url: item.fileUrl,
+              };
+            }
+          );
+        }
+      });
+    proxy
+      .post("/fileInfo/getList", { businessIdList: [res.id], fileType: 40 })
+      .then((fileObj) => {
+        formData.data.supportDocumentationFileList = fileObj[res.id] || [];
+      });
   });
 };
 const clickSteps = (val) => {
@@ -1411,25 +1430,30 @@ const submitFollow = async (status) => {
       selectSteps.value = 11;
       return ElMessage("SUPPORT DOCUMENTATION填写不正确");
     }
-    formData.data.inspectionSummary = JSON.stringify(formData.data.inspectionSummaryList);
+    formData.data.inspectionSummary = JSON.stringify(
+      formData.data.inspectionSummaryList
+    );
     if (fileListOne.value && fileListOne.value.length > 0) {
-      formData.data.sampleCollectionRecordFileList = fileListOne.value.map((item) => {
-        return {
-          id: item.raw.id,
-          fileName: item.raw.fileName,
-          fileUrl: item.raw.fileUrl,
-          remark: item.raw.remark,
-        };
-      });
+      formData.data.sampleCollectionRecordFileList = fileListOne.value.map(
+        (item) => {
+          return {
+            id: item.raw.id,
+            fileName: item.raw.fileName,
+            fileUrl: item.raw.fileUrl,
+            remark: item.raw.remark,
+          };
+        }
+      );
     } else {
       formData.data.sampleCollectionRecordFileList = [];
     }
-    formData.data.ehsdQualityCartonsList = formData.data.ehsdQualityCartonsList.map((item) => {
-      return {
-        ...item,
-        total: formData.data.ehsdQualityCartonsList.length,
-      };
-    });
+    formData.data.ehsdQualityCartonsList =
+      formData.data.ehsdQualityCartonsList.map((item) => {
+        return {
+          ...item,
+          total: formData.data.ehsdQualityCartonsList.length,
+        };
+      });
     if (fileListTwo.value && fileListTwo.value.length > 0) {
       formData.data.workshipPhotoFileList = fileListTwo.value.map((item) => {
         return {
@@ -1443,19 +1467,28 @@ const submitFollow = async (status) => {
       formData.data.workshipPhotoFileList = [];
     }
     if (fileListThree.value && fileListThree.value.length > 0) {
-      formData.data.defectPhotosOfItemsFileList = fileListThree.value.map((item) => {
-        return {
-          id: item.raw.id,
-          fileName: item.raw.fileName,
-          fileUrl: item.raw.fileUrl,
-          remark: item.raw.remark,
-        };
-      });
+      formData.data.defectPhotosOfItemsFileList = fileListThree.value.map(
+        (item) => {
+          return {
+            id: item.raw.id,
+            fileName: item.raw.fileName,
+            fileUrl: item.raw.fileUrl,
+            remark: item.raw.remark,
+          };
+        }
+      );
     } else {
       formData.data.defectPhotosOfItemsFileList = [];
     }
-    formData.data.shippingMarks = JSON.stringify(formData.data.shippingMarksList);
-    if (!(formData.data.supportDocumentationFileList && formData.data.supportDocumentationFileList.length > 0)) {
+    formData.data.shippingMarks = JSON.stringify(
+      formData.data.shippingMarksList
+    );
+    if (
+      !(
+        formData.data.supportDocumentationFileList &&
+        formData.data.supportDocumentationFileList.length > 0
+      )
+    ) {
       return ElMessage("请上传视频");
     }
     formData.data.step = "1,2,3,4,5,6,7,8,9,10,11";
@@ -1468,25 +1501,30 @@ const submitFollow = async (status) => {
       openInspection.value = false;
     });
   } else {
-    formData.data.inspectionSummary = JSON.stringify(formData.data.inspectionSummaryList);
+    formData.data.inspectionSummary = JSON.stringify(
+      formData.data.inspectionSummaryList
+    );
     if (fileListOne.value && fileListOne.value.length > 0) {
-      formData.data.sampleCollectionRecordFileList = fileListOne.value.map((item) => {
-        return {
-          id: item.raw.id,
-          fileName: item.raw.fileName,
-          fileUrl: item.raw.fileUrl,
-          remark: item.raw.remark,
-        };
-      });
+      formData.data.sampleCollectionRecordFileList = fileListOne.value.map(
+        (item) => {
+          return {
+            id: item.raw.id,
+            fileName: item.raw.fileName,
+            fileUrl: item.raw.fileUrl,
+            remark: item.raw.remark,
+          };
+        }
+      );
     } else {
       formData.data.sampleCollectionRecordFileList = [];
     }
-    formData.data.ehsdQualityCartonsList = formData.data.ehsdQualityCartonsList.map((item) => {
-      return {
-        ...item,
-        total: formData.data.ehsdQualityCartonsList.length,
-      };
-    });
+    formData.data.ehsdQualityCartonsList =
+      formData.data.ehsdQualityCartonsList.map((item) => {
+        return {
+          ...item,
+          total: formData.data.ehsdQualityCartonsList.length,
+        };
+      });
     if (fileListTwo.value && fileListTwo.value.length > 0) {
       formData.data.workshipPhotoFileList = fileListTwo.value.map((item) => {
         return {
@@ -1500,18 +1538,22 @@ const submitFollow = async (status) => {
       formData.data.workshipPhotoFileList = [];
     }
     if (fileListThree.value && fileListThree.value.length > 0) {
-      formData.data.defectPhotosOfItemsFileList = fileListThree.value.map((item) => {
-        return {
-          id: item.raw.id,
-          fileName: item.raw.fileName,
-          fileUrl: item.raw.fileUrl,
-          remark: item.raw.remark,
-        };
-      });
+      formData.data.defectPhotosOfItemsFileList = fileListThree.value.map(
+        (item) => {
+          return {
+            id: item.raw.id,
+            fileName: item.raw.fileName,
+            fileUrl: item.raw.fileUrl,
+            remark: item.raw.remark,
+          };
+        }
+      );
     } else {
       formData.data.defectPhotosOfItemsFileList = [];
     }
-    formData.data.shippingMarks = JSON.stringify(formData.data.shippingMarksList);
+    formData.data.shippingMarks = JSON.stringify(
+      formData.data.shippingMarksList
+    );
     proxy.post("/ehsdQuality/submit", formData.data).then(() => {
       ElMessage({
         message: "暂存成功",
@@ -1521,7 +1563,10 @@ const submitFollow = async (status) => {
   }
 };
 const clickAdd = () => {
-  if (formData.data.inspectionSummaryList && formData.data.inspectionSummaryList.length > 0) {
+  if (
+    formData.data.inspectionSummaryList &&
+    formData.data.inspectionSummaryList.length > 0
+  ) {
     formData.data.inspectionSummaryList.push({
       summaryLabel: "",
       summaryValue: "Passed",
@@ -1539,7 +1584,9 @@ const handleDelete = (index) => {
   formData.data.inspectionSummaryList.splice(index, 1);
 };
 const changeAqlResult = () => {
-  let data = formData.data.ehsdQualityAqlList.filter((item) => item.aqlResult === 0);
+  let data = formData.data.ehsdQualityAqlList.filter(
+    (item) => item.aqlResult === 0
+  );
   if (data && data.length === 3) {
     formData.data.summaryResult = 0;
   } else {
@@ -1547,7 +1594,10 @@ const changeAqlResult = () => {
   }
 };
 const clickProblemAdd = () => {
-  if (formData.data.ehsdQualityProblemList && formData.data.ehsdQualityProblemList.length > 0) {
+  if (
+    formData.data.ehsdQualityProblemList &&
+    formData.data.ehsdQualityProblemList.length > 0
+  ) {
     formData.data.ehsdQualityProblemList.push({
       remark: "",
     });
@@ -1577,7 +1627,9 @@ const uploadFileOne = async (file) => {
   return true;
 };
 const onRemoveOne = (file) => {
-  fileListOne.value = fileListOne.value.filter((item) => item.raw.fileUrl !== file.raw.fileUrl);
+  fileListOne.value = fileListOne.value.filter(
+    (item) => item.raw.fileUrl !== file.raw.fileUrl
+  );
 };
 const fileListTwo = ref([]);
 const uploadDataTwo = ref({});
@@ -1591,7 +1643,9 @@ const uploadFileTwo = async (file) => {
   return true;
 };
 const onRemoveTwo = (file) => {
-  fileListTwo.value = fileListTwo.value.filter((item) => item.raw.fileUrl !== file.raw.fileUrl);
+  fileListTwo.value = fileListTwo.value.filter(
+    (item) => item.raw.fileUrl !== file.raw.fileUrl
+  );
 };
 const fileListThree = ref([]);
 const uploadDataThree = ref({});
@@ -1605,7 +1659,9 @@ const uploadFileThree = async (file) => {
   return true;
 };
 const onRemoveThree = (file) => {
-  fileListThree.value = fileListThree.value.filter((item) => item.raw.fileUrl !== file.raw.fileUrl);
+  fileListThree.value = fileListThree.value.filter(
+    (item) => item.raw.fileUrl !== file.raw.fileUrl
+  );
 };
 const uploadDataFour = ref({});
 const uploadFileFour = async (file) => {
@@ -1698,7 +1754,10 @@ const changeClass = ({ row, rowIndex }) => {
   }
 };
 const clickWorkShipAdd = () => {
-  if (formData.data.ehsdQualityWorkshipList && formData.data.ehsdQualityWorkshipList.length > 0) {
+  if (
+    formData.data.ehsdQualityWorkshipList &&
+    formData.data.ehsdQualityWorkshipList.length > 0
+  ) {
     formData.data.ehsdQualityWorkshipList.push({
       description: "",
       remark: "",
@@ -1763,7 +1822,10 @@ const getSummaries = (param) => {
   return sums;
 };
 const clickSiteTestAdd = () => {
-  if (formData.data.ehsdQualitySiteTestList && formData.data.ehsdQualitySiteTestList.length > 0) {
+  if (
+    formData.data.ehsdQualitySiteTestList &&
+    formData.data.ehsdQualitySiteTestList.length > 0
+  ) {
     formData.data.ehsdQualitySiteTestList.push({
       description: "",
       sampleSize: undefined,
@@ -1786,7 +1848,9 @@ const clickSiteTestAdd = () => {
   }
 };
 const changeSiteTestResult = () => {
-  let data = formData.data.ehsdQualitySiteTestList.filter((item) => item.result === 0);
+  let data = formData.data.ehsdQualitySiteTestList.filter(
+    (item) => item.result === 0
+  );
   if (data && data.length === formData.data.ehsdQualitySiteTestList.length) {
     formData.data.siteTestResult = 0;
   } else {
@@ -1794,7 +1858,10 @@ const changeSiteTestResult = () => {
   }
 };
 const clickMarkingAdd = () => {
-  if (formData.data.markingDetailList && formData.data.markingDetailList.length > 0) {
+  if (
+    formData.data.markingDetailList &&
+    formData.data.markingDetailList.length > 0
+  ) {
     formData.data.markingDetailList.push({
       name: "",
       result: "",

+ 19 - 75
src/views/EHSD/productLibrary/companyProduct/index.vue

@@ -1,29 +1,16 @@
 <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" :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" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
+               :selectConfig="selectConfig" :table-events="{
           //element talbe事件都能传
           select: select,
-        }"
-        :action-list="[
+        }" :action-list="[
           props.selectStatus
             ? {}
             : {
@@ -38,16 +25,10 @@
                 action: () => openModal('add'),
                 disabled: false,
               },
-        ]"
-        @get-list="getList"
-      >
+        ]" @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])"
-            />
+            <img :src="item.fileList[0].fileUrl" class="pic" @click="handleClickFile(item.fileList[0])" />
           </div>
           <div v-else></div>
         </template>
@@ -71,33 +52,16 @@
       </byTable>
     </div>
 
-    <el-dialog
-      :title="modalType == 'add' ? '添加产品' : '编辑产品'"
-      v-model="dialogVisible"
-      width="600"
-      v-loading="submitLoading"
-      destroy-on-close
-    >
+    <el-dialog :title="modalType == 'add' ? '添加产品' : '编辑产品'" v-model="dialogVisible" width="600" v-loading="submitLoading" destroy-on-close>
       <div class="public_height_dialog">
-        <byForm
-          :formConfig="formConfig"
-          :formOption="formOption"
-          v-model="formData.data"
-          :rules="rules"
-          ref="byform"
-        >
+        <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"
-                :before-upload="handleBeforeUpload"
-                accept=".gif, .jpeg, .jpg, .png"
-              >
-                <el-icon><Plus /></el-icon>
+              <el-upload v-model:fileList="fileList" :action="uploadUrl" :data="uploadData" list-type="picture-card" :on-remove="handleRemove"
+                         :before-upload="handleBeforeUpload" accept=".gif, .jpeg, .jpg, .png">
+                <el-icon>
+                  <Plus />
+                </el-icon>
               </el-upload>
             </div>
           </template>
@@ -105,37 +69,17 @@
       </div>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button
-          type="primary"
-          v-no-double-click="submitForm"
-          size="large"
-          :loading="submitLoading"
-          >确 定</el-button
-        >
+        <el-button type="primary" v-no-double-click="submitForm" size="large" :loading="submitLoading">确 定</el-button>
       </template>
     </el-dialog>
 
-    <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-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="large"
-          >取 消</el-button
-        >
+        <el-button @click="openExcelDialog = false" size="large">取 消</el-button>
       </template>
     </el-dialog>
   </div>

+ 19 - 75
src/views/EHSD/productLibrary/customerProduct/index.vue

@@ -1,29 +1,16 @@
 <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" :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" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
+               :selectConfig="selectConfig" :table-events="{
           //element talbe事件都能传
           select: select,
-        }"
-        :action-list="[
+        }" :action-list="[
           props.selectStatus
             ? {}
             : {
@@ -38,16 +25,10 @@
                 action: () => openModal('add'),
                 disabled: false,
               },
-        ]"
-        @get-list="getList"
-      >
+        ]" @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])"
-            />
+            <img :src="item.fileList[0].fileUrl" class="pic" @click="handleClickFile(item.fileList[0])" />
           </div>
           <div v-else></div>
         </template>
@@ -70,33 +51,16 @@
         </template>
       </byTable>
     </div>
-    <el-dialog
-      :title="modalType == 'add' ? '添加产品' : '编辑产品'"
-      v-model="dialogVisible"
-      width="600"
-      v-loading="submitLoading"
-      destroy-on-close
-    >
+    <el-dialog :title="modalType == 'add' ? '添加产品' : '编辑产品'" v-model="dialogVisible" width="600" v-loading="submitLoading" destroy-on-close>
       <div class="public_height_dialog">
-        <byForm
-          :formConfig="formConfig"
-          :formOption="formOption"
-          v-model="formData.data"
-          :rules="rules"
-          ref="byform"
-        >
+        <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"
-                :before-upload="handleBeforeUpload"
-                accept=".gif, .jpeg, .jpg, .png"
-              >
-                <el-icon><Plus /></el-icon>
+              <el-upload v-model:fileList="fileList" :action="uploadUrl" :data="uploadData" list-type="picture-card" :on-remove="handleRemove"
+                         :before-upload="handleBeforeUpload" accept=".gif, .jpeg, .jpg, .png">
+                <el-icon>
+                  <Plus />
+                </el-icon>
               </el-upload>
             </div>
           </template>
@@ -104,36 +68,16 @@
       </div>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button
-          type="primary"
-          v-no-double-click="submitForm"
-          size="large"
-          :loading="submitLoading"
-          >确 定</el-button
-        >
+        <el-button type="primary" v-no-double-click="submitForm" size="large" :loading="submitLoading">确 定</el-button>
       </template>
     </el-dialog>
-    <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-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="large"
-          >取 消</el-button
-        >
+        <el-button @click="openExcelDialog = false" size="large">取 消</el-button>
       </template>
     </el-dialog>
   </div>

+ 67 - 66
src/views/EHSD/saleContract/contractEHSD/index.vue

@@ -1,20 +1,13 @@
 <template>
   <div class="tenant">
     <div class="content">
-      <byTable
-        :source="sourceList.data"
-        :pagination="sourceList.pagination"
-        :config="config"
-        :loading="loading"
-        :selectConfig="selectConfig"
-        highlight-current-row
-        :action-list="[
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
+               highlight-current-row :action-list="[
           {
             text: '新建销售合同',
             action: () => newContract(),
           },
-        ]"
-        @get-list="getList">
+        ]" @get-list="getList">
         <template #amount="{ item }">
           <div>
             <span style="padding-right: 4px">{{ item.currency }}</span>
@@ -32,16 +25,13 @@
               {{ dictValueLabel(tag, customerTag) }}
             </el-tag>
             <template v-if="item.tags.length !== customerTag.length">
-              <el-select
-                v-if="item.addTagShow"
-                v-model="addTag"
-                style="width: 100%"
-                @change="
+              <el-select v-if="item.addTagShow" v-model="addTag" style="width: 100%" @change="
                   (val) => {
                     return changeTag(val, item);
                   }
                 ">
-                <el-option v-for="tag in customerTag" :key="tag.value" :label="tag.label" :value="tag.value" :disabled="judgeTagSelect(item.tags, tag.value)" />
+                <el-option v-for="tag in customerTag" :key="tag.value" :label="tag.label" :value="tag.value"
+                           :disabled="judgeTagSelect(item.tags, tag.value)" />
               </el-select>
               <el-tag style="cursor: pointer" type="success" @click="showSelect(item)" v-else> + </el-tag>
             </template>
@@ -214,7 +204,8 @@
             <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">
               Beneficiary Account Number: {{ printDetails.beneficiaryAccountNumber }}
             </div>
-            <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">Swift Code: {{ printDetails.swiftCode }}</div>
+            <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">Swift Code: {{ printDetails.swiftCode }}
+            </div>
             <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">
               Beneficiary Address: {{ printDetails.beneficiaryAddress }}
             </div>
@@ -242,28 +233,16 @@
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="handoverSlipForm">
         <template #file>
           <div style="width: 100%">
-            <el-upload
-              v-model:fileList="handoverSlipForm.fileList"
-              action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-              :data="uploadData"
-              multiple
-              :before-upload="uploadFile"
-              :on-success="handleSuccess"
-              :on-preview="onPreviewFile">
+            <el-upload v-model:fileList="handoverSlipForm.fileList" :action="uploadUrl" :data="uploadData" multiple :before-upload="uploadFile"
+                       :on-success="handleSuccess" :on-preview="onPreviewFile">
               <el-button type="primary" plain>选择</el-button>
             </el-upload>
           </div>
         </template>
         <template #indication>
           <div style="width: 100%">
-            <el-upload
-              v-model:fileList="handoverSlipForm.packageFileList"
-              action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-              :data="indicationUploadData"
-              multiple
-              :before-upload="indicationUploadFile"
-              :on-success="handleSuccess"
-              :on-preview="onPreviewFile">
+            <el-upload v-model:fileList="handoverSlipForm.packageFileList" :action="uploadUrl" :data="indicationUploadData" multiple
+                       :before-upload="indicationUploadFile" :on-success="handleSuccess" :on-preview="onPreviewFile">
               <el-button type="primary" plain>选择</el-button>
             </el-upload>
           </div>
@@ -453,11 +432,15 @@ const config = computed(() => {
             },
             el: "button",
             click() {
-              ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
-                confirmButtonText: "确定",
-                cancelButtonText: "取消",
-                type: "warning",
-              }).then(() => {
+              ElMessageBox.confirm(
+                "此操作将永久删除该数据, 是否继续?",
+                "提示",
+                {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning",
+                }
+              ).then(() => {
                 proxy
                   .post("/contract/edit", {
                     id: row.id,
@@ -479,24 +462,31 @@ const config = computed(() => {
   ];
 });
 const getDict = () => {
-  proxy.getDictOne(["customer_tag", "trade_mode", "account_currency", "shipping_method"]).then((res) => {
-    customerTag.value = res["customer_tag"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    tradeMethods.value = res["trade_mode"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    accountCurrency.value = res["account_currency"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    shippingMethod.value = res["shipping_method"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-  });
+  proxy
+    .getDictOne([
+      "customer_tag",
+      "trade_mode",
+      "account_currency",
+      "shipping_method",
+    ])
+    .then((res) => {
+      customerTag.value = res["customer_tag"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      tradeMethods.value = res["trade_mode"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      accountCurrency.value = res["account_currency"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      shippingMethod.value = res["shipping_method"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+    });
   proxy.post("/corporation/page", { pageNum: 1, pageSize: 999 }).then((res) => {
     corporationList.value = res.rows.map((item) => {
       return {
@@ -576,7 +566,10 @@ const clickDownload = () => {
 };
 const statistics = (label, index) => {
   let num = 0;
-  if (printDetails.value.productInfoList && printDetails.value.productInfoList.length > 0) {
+  if (
+    printDetails.value.productInfoList &&
+    printDetails.value.productInfoList.length > 0
+  ) {
     printDetails.value.productInfoList.map((item) => {
       if (item[label]) {
         num = parseFloat(Number(num) + Number(item[label])).toFixed(index);
@@ -645,13 +638,15 @@ const clickHandoverSlip = (item) => {
     handoverSlipForm.value.fileList = [];
   }
   if (item.packageFileInfoVOList && item.packageFileInfoVOList.length > 0) {
-    handoverSlipForm.value.packageFileList = item.packageFileInfoVOList.map((item) => {
-      return {
-        raw: item,
-        name: item.fileName,
-        url: item.fileUrl,
-      };
-    });
+    handoverSlipForm.value.packageFileList = item.packageFileInfoVOList.map(
+      (item) => {
+        return {
+          raw: item,
+          name: item.fileName,
+          url: item.fileUrl,
+        };
+      }
+    );
   } else {
     handoverSlipForm.value.packageFileList = [];
   }
@@ -682,14 +677,20 @@ const onPreviewFile = (file) => {
   window.open(file.raw.fileUrl, "_blank");
 };
 const submitHandoverSlip = () => {
-  if (handoverSlipForm.value.fileList && handoverSlipForm.value.fileList.length > 0) {
+  if (
+    handoverSlipForm.value.fileList &&
+    handoverSlipForm.value.fileList.length > 0
+  ) {
     for (let i = 0; i < handoverSlipForm.value.fileList.length; i++) {
       if (handoverSlipForm.value.fileList[i].raw.uploadState) {
         return ElMessage("文件上传中,请稍后提交");
       }
     }
   }
-  if (handoverSlipForm.value.packageFileList && handoverSlipForm.value.packageFileList.length > 0) {
+  if (
+    handoverSlipForm.value.packageFileList &&
+    handoverSlipForm.value.packageFileList.length > 0
+  ) {
     for (let i = 0; i < handoverSlipForm.value.packageFileList.length; i++) {
       if (handoverSlipForm.value.packageFileList[i].raw.uploadState) {
         return ElMessage("文件上传中,请稍后提交");

+ 61 - 64
src/views/EHSD/saleContract/sampleEHSD/index.vue

@@ -1,19 +1,12 @@
 <template>
   <div class="tenant">
-    <byTable
-      :source="sourceList.data"
-      :pagination="sourceList.pagination"
-      :config="config"
-      :loading="loading"
-      :selectConfig="selectConfig"
-      highlight-current-row
-      :action-list="[
+    <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
+             highlight-current-row :action-list="[
         {
           text: '新建样品单',
           action: () => newSample(),
         },
-      ]"
-      @get-list="getList">
+      ]" @get-list="getList">
       <template #amount="{ item }">
         <div style="width: 100%">
           <span style="padding-right: 4px">{{ item.currency }}</span>
@@ -31,16 +24,13 @@
             {{ dictValueLabel(tag, customerTag) }}
           </el-tag>
           <template v-if="item.tags.length !== customerTag.length">
-            <el-select
-              v-if="item.addTagShow"
-              v-model="addTag"
-              style="width: 100%"
-              @change="
+            <el-select v-if="item.addTagShow" v-model="addTag" style="width: 100%" @change="
                 (val) => {
                   return changeTag(val, item);
                 }
               ">
-              <el-option v-for="tag in customerTag" :key="tag.value" :label="tag.label" :value="tag.value" :disabled="judgeTagSelect(item.tags, tag.value)" />
+              <el-option v-for="tag in customerTag" :key="tag.value" :label="tag.label" :value="tag.value"
+                         :disabled="judgeTagSelect(item.tags, tag.value)" />
             </el-select>
             <el-tag style="cursor: pointer" type="success" @click="showSelect(item)" v-else> + </el-tag>
           </template>
@@ -57,28 +47,16 @@
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="handoverSlipForm">
         <template #file>
           <div style="width: 100%">
-            <el-upload
-              v-model:fileList="handoverSlipForm.fileList"
-              action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-              :data="uploadData"
-              multiple
-              :before-upload="uploadFile"
-              :on-success="handleSuccess"
-              :on-preview="onPreviewFile">
+            <el-upload v-model:fileList="handoverSlipForm.fileList" :action="uploadUrl" :data="uploadData" multiple :before-upload="uploadFile"
+                       :on-success="handleSuccess" :on-preview="onPreviewFile">
               <el-button type="primary" plain>选择</el-button>
             </el-upload>
           </div>
         </template>
         <template #indication>
           <div style="width: 100%">
-            <el-upload
-              v-model:fileList="handoverSlipForm.packageFileList"
-              action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-              :data="indicationUploadData"
-              multiple
-              :before-upload="indicationUploadFile"
-              :on-success="handleSuccess"
-              :on-preview="onPreviewFile">
+            <el-upload v-model:fileList="handoverSlipForm.packageFileList" :action="uploadUrl" :data="indicationUploadData" multiple
+                       :before-upload="indicationUploadFile" :on-success="handleSuccess" :on-preview="onPreviewFile">
               <el-button type="primary" plain>选择</el-button>
             </el-upload>
           </div>
@@ -257,11 +235,15 @@ const config = computed(() => {
             },
             el: "button",
             click() {
-              ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
-                confirmButtonText: "确定",
-                cancelButtonText: "取消",
-                type: "warning",
-              }).then(() => {
+              ElMessageBox.confirm(
+                "此操作将永久删除该数据, 是否继续?",
+                "提示",
+                {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning",
+                }
+              ).then(() => {
                 proxy
                   .post("/sample/edit", {
                     id: row.id,
@@ -283,24 +265,31 @@ const config = computed(() => {
   ];
 });
 const getDict = () => {
-  proxy.getDictOne(["customer_tag", "trade_mode", "account_currency", "shipping_method"]).then((res) => {
-    customerTag.value = res["customer_tag"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    tradeMethods.value = res["trade_mode"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    accountCurrency.value = res["account_currency"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    shippingMethod.value = res["shipping_method"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-  });
+  proxy
+    .getDictOne([
+      "customer_tag",
+      "trade_mode",
+      "account_currency",
+      "shipping_method",
+    ])
+    .then((res) => {
+      customerTag.value = res["customer_tag"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      tradeMethods.value = res["trade_mode"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      accountCurrency.value = res["account_currency"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      shippingMethod.value = res["shipping_method"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+    });
   proxy.post("/corporation/page", { pageNum: 1, pageSize: 999 }).then((res) => {
     corporationList.value = res.rows.map((item) => {
       return {
@@ -426,13 +415,15 @@ const clickHandoverSlip = (item) => {
     handoverSlipForm.value.fileList = [];
   }
   if (item.packageFileInfoVOList && item.packageFileInfoVOList.length > 0) {
-    handoverSlipForm.value.packageFileList = item.packageFileInfoVOList.map((item) => {
-      return {
-        raw: item,
-        name: item.fileName,
-        url: item.fileUrl,
-      };
-    });
+    handoverSlipForm.value.packageFileList = item.packageFileInfoVOList.map(
+      (item) => {
+        return {
+          raw: item,
+          name: item.fileName,
+          url: item.fileUrl,
+        };
+      }
+    );
   } else {
     handoverSlipForm.value.packageFileList = [];
   }
@@ -463,14 +454,20 @@ const onPreviewFile = (file) => {
   window.open(file.raw.fileUrl, "_blank");
 };
 const submitHandoverSlip = () => {
-  if (handoverSlipForm.value.fileList && handoverSlipForm.value.fileList.length > 0) {
+  if (
+    handoverSlipForm.value.fileList &&
+    handoverSlipForm.value.fileList.length > 0
+  ) {
     for (let i = 0; i < handoverSlipForm.value.fileList.length; i++) {
       if (handoverSlipForm.value.fileList[i].raw.uploadState) {
         return ElMessage("文件上传中,请稍后提交");
       }
     }
   }
-  if (handoverSlipForm.value.packageFileList && handoverSlipForm.value.packageFileList.length > 0) {
+  if (
+    handoverSlipForm.value.packageFileList &&
+    handoverSlipForm.value.packageFileList.length > 0
+  ) {
     for (let i = 0; i < handoverSlipForm.value.packageFileList.length; i++) {
       if (handoverSlipForm.value.packageFileList[i].raw.uploadState) {
         return ElMessage("文件上传中,请稍后提交");

+ 28 - 134
src/views/JXSK/production/bom/index.vue

@@ -2,136 +2,67 @@
   <div class="tenant">
     <!-- <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事件都能传
           select: select,
-        }"
-        :action-list="[
+        }" :action-list="[
           {
             text: '添加BOM',
             action: () => openModal('add'),
           },
-        ]"
-        @get-list="getList"
-      >
+        ]" @get-list="getList">
         <template #versionSlot="{ item }">
-          <div
-            style="cursor: pointer; color: #409eff"
-            @click="hanldeOpenVer(item)"
-          >
+          <div style="cursor: pointer; color: #409eff" @click="hanldeOpenVer(item)">
             v{{ item.versionNumber }}
           </div>
         </template>
       </byTable>
     </div>
-    <el-dialog
-      :title="titleText"
-      v-model="dialogVisible"
-      width="800"
-      v-loading="submitLoading"
-      destroy-on-close
-    >
-      <byForm
-        :formConfig="formConfig"
-        :formOption="formOption"
-        v-model="formData.data"
-        :rules="rules"
-        ref="byform"
-      >
+    <el-dialog :title="titleText" v-model="dialogVisible" width="800" v-loading="submitLoading" destroy-on-close>
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
         <template #slotFile>
           <div>
-            <el-upload
-              v-model:fileList="fileList"
-              :show-file-list="false"
-              class="upload-demo"
-              action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-              :data="uploadData"
-              :before-upload="handleBeforeUpload"
-              accept=".rar,.zip"
-            >
+            <el-upload v-model:fileList="fileList" :show-file-list="false" class="upload-demo" :action="uploadUrl" :data="uploadData"
+                       :before-upload="handleBeforeUpload" accept=".rar,.zip">
               <el-button type="primary">选 择</el-button>
             </el-upload>
             <div>
               <div style="margin-top: 15px">
-                <el-tag
-                  style="margin-right: 10px"
-                  class="ml-2"
-                  type="info"
-                  v-for="(item, index) in fileListCopy"
-                  :key="index"
-                  >{{ item.fileName }}</el-tag
-                >
+                <el-tag style="margin-right: 10px" class="ml-2" type="info" v-for="(item, index) in fileListCopy"
+                        :key="index">{{ item.fileName }}</el-tag>
               </div>
             </div>
           </div>
         </template>
         <template #slot>
           <div>
-            <el-button type="primary" plain @click="openMaterial = true"
-              >添加物料/半成品</el-button
-            >
+            <el-button type="primary" plain @click="openMaterial = true">添加物料/半成品</el-button>
             <el-button type="primary" plain> Excel导入</el-button>
-            <el-form
-              ref="tableForm"
-              :model="formData.data"
-              :rules="rules"
-              label-width="0px"
-              style="margin-top: 15px"
-            >
+            <el-form ref="tableForm" :model="formData.data" :rules="rules" label-width="0px" style="margin-top: 15px">
               <el-table :data="formData.data.bomDetailList">
                 <el-table-column prop="productCode" label="物料编码" />
                 <el-table-column prop="productName" label="物料名称" />
-                <el-table-column
-                  prop="productUnit"
-                  label="单位"
-                  :formatter="
+                <el-table-column prop="productUnit" label="单位" :formatter="
                     (row) => dictValueLabel(row.productUnit, materialUnit)
-                  "
-                />
+                  " />
                 <el-table-column prop="quantity" label="数量" width="150">
                   <template #default="{ row, $index }">
-                    <el-form-item
-                      :prop="'bomDetailList.' + $index + '.quantity'"
-                      :rules="rules.quantity"
-                      :inline-message="true"
-                    >
-                      <el-input-number
-                        v-model="row.quantity"
-                        :precision="2"
-                        :controls="false"
-                        :min="1"
-                      />
+                    <el-form-item :prop="'bomDetailList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true">
+                      <el-input-number v-model="row.quantity" :precision="2" :controls="false" :min="1" />
                     </el-form-item>
                   </template>
                 </el-table-column>
                 <el-table-column prop="zip" label="成本" width="150">
                   <template #default="{ row, $index }">
-                    <el-form-item
-                      :prop="'bomDetailList.' + $index + '.cost'"
-                      :rules="rules.cost"
-                      :inline-message="true"
-                    >
-                      <el-input-number
-                        v-model="row.cost"
-                        :precision="2"
-                        :controls="false"
-                        :min="1"
-                      />
+                    <el-form-item :prop="'bomDetailList.' + $index + '.cost'" :rules="rules.cost" :inline-message="true">
+                      <el-input-number v-model="row.cost" :precision="2" :controls="false" :min="1" />
                     </el-form-item>
                   </template>
                 </el-table-column>
                 <el-table-column prop="zip" label="操作" width="100">
                   <template #default="{ $index }">
-                    <el-button type="primary" link @click="handleRemove($index)"
-                      >删除</el-button
-                    >
+                    <el-button type="primary" link @click="handleRemove($index)">删除</el-button>
                   </template>
                 </el-table-column>
               </el-table>
@@ -141,27 +72,15 @@
       </byForm>
       <template #footer>
         <div v-if="isShowBtns">
-          <el-button @click="dialogVisible = false" size="large"
-            >取 消</el-button
-          >
-          <el-button
-            type="primary"
-            v-no-double-click="submitForm"
-            size="large"
-            :loading="submitLoading"
-          >
+          <el-button @click="dialogVisible = false" size="large">取 消</el-button>
+          <el-button type="primary" v-no-double-click="submitForm" size="large" :loading="submitLoading">
             确 定
           </el-button>
         </div>
       </template>
     </el-dialog>
 
-    <el-dialog
-      v-model="openMaterial"
-      title="选择物料/半成品"
-      width="70%"
-      append-to-body
-    >
+    <el-dialog v-model="openMaterial" title="选择物料/半成品" width="70%" append-to-body>
       <SelectMaterial @handleSelect="handleSelect"></SelectMaterial>
       <template #footer>
         <span class="dialog-footer">
@@ -171,44 +90,19 @@
     </el-dialog>
 
     <el-dialog v-model="openVersion" title="切换版本" width="30%">
-      <byForm
-        :formConfig="formConfig1"
-        :formOption="formOption"
-        v-model="formData.data1"
-        :rules="rules1"
-        ref="byform1"
-      >
+      <byForm :formConfig="formConfig1" :formOption="formOption" v-model="formData.data1" :rules="rules1" ref="byform1">
         <template #versionSlot>
           <div>
-            <el-select
-              v-model="formData.data1.versionNumber"
-              placeholder="请选择版本号"
-              @change="changeRowData"
-            >
-              <el-option
-                v-for="item in versionData"
-                :label="'v' + item.versionNumber"
-                :value="item.versionNumber"
-              />
+            <el-select v-model="formData.data1.versionNumber" placeholder="请选择版本号" @change="changeRowData">
+              <el-option v-for="item in versionData" :label="'v' + item.versionNumber" :value="item.versionNumber" />
             </el-select>
-            <el-button
-              type="primary"
-              link
-              style="margin-left: 10px"
-              @click="handleGetDetails"
-              v-if="formData.data1.versionNumber"
-              >查看</el-button
-            >
+            <el-button type="primary" link style="margin-left: 10px" @click="handleGetDetails" v-if="formData.data1.versionNumber">查看</el-button>
           </div>
         </template>
       </byForm>
       <template #footer>
         <el-button @click="openVersion = false" size="large">取 消</el-button>
-        <el-button
-          type="primary"
-          @click="handleChangeVer('byform1')"
-          size="large"
-        >
+        <el-button type="primary" @click="handleChangeVer('byform1')" size="large">
           确 定
         </el-button>
       </template>

+ 35 - 153
src/views/JXSK/production/workOrder/index.vue

@@ -2,83 +2,39 @@
   <div class="tenant">
     <!-- <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事件都能传
           select: select,
-        }"
-        :action-list="[]"
-        @get-list="getList"
-      >
+        }" :action-list="[]" @get-list="getList">
         <template #slotName="{ item }">
           {{ item.createTime }}
         </template>
       </byTable>
     </div>
-    <el-dialog
-      :title="'调整BOM'"
-      v-model="dialogVisible"
-      width="800"
-      v-loading="submitLoading"
-      destroy-on-close
-    >
-      <byForm
-        :formConfig="formConfig"
-        :formOption="formOption"
-        v-model="formData.data"
-        :rules="rules"
-        ref="byform"
-      >
+    <el-dialog :title="'调整BOM'" v-model="dialogVisible" width="800" v-loading="submitLoading" destroy-on-close>
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
         <template #slot>
           <div style="width: 100%">
-            <el-button type="primary" plain @click="openMaterial = true"
-              >添加物料/半成品</el-button
-            >
+            <el-button type="primary" plain @click="openMaterial = true">添加物料/半成品</el-button>
             <el-button type="primary" plain> Excel导入</el-button>
-            <el-form
-              ref="tableForm"
-              :model="formData.data"
-              :rules="rules"
-              label-width="0px"
-              style="margin-top: 15px"
-            >
+            <el-form ref="tableForm" :model="formData.data" :rules="rules" label-width="0px" style="margin-top: 15px">
               <el-table :data="formData.data.workOrderBomList">
                 <el-table-column prop="productCode" label="物料编码" />
                 <el-table-column prop="productName" label="物料名称" />
-                <el-table-column
-                  prop="productUnit"
-                  label="单位"
-                  :formatter="
+                <el-table-column prop="productUnit" label="单位" :formatter="
                     (row) => dictValueLabel(row.productUnit, materialUnit)
-                  "
-                />
+                  " />
                 <el-table-column prop="quantity" label="数量" width="150">
                   <template #default="{ row, $index }">
-                    <el-form-item
-                      :prop="'workOrderBomList.' + $index + '.quantity'"
-                      :rules="rules.quantity"
-                      :inline-message="true"
-                    >
-                      <el-input-number
-                        v-model="row.quantity"
-                        :precision="2"
-                        :controls="false"
-                        :min="1"
-                      />
+                    <el-form-item :prop="'workOrderBomList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true">
+                      <el-input-number v-model="row.quantity" :precision="2" :controls="false" :min="1" />
                     </el-form-item>
                   </template>
                 </el-table-column>
                 <el-table-column prop="zip" label="操作" width="100">
                   <template #default="{ $index }">
-                    <el-button type="primary" link @click="handleRemove($index)"
-                      >删除</el-button
-                    >
+                    <el-button type="primary" link @click="handleRemove($index)">删除</el-button>
                   </template>
                 </el-table-column>
               </el-table>
@@ -88,51 +44,24 @@
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button
-          type="primary"
-          v-no-double-click="submitForm"
-          size="large"
-          :loading="submitLoading"
-        >
+        <el-button type="primary" v-no-double-click="submitForm" size="large" :loading="submitLoading">
           确 定
         </el-button>
       </template>
     </el-dialog>
 
-    <el-dialog
-      title="调整工艺"
-      v-model="dialogVisibleOne"
-      width="800"
-      v-loading="loadingOne"
-      destroy-on-close
-    >
-      <byForm
-        :formConfig="formConfigOne"
-        :formOption="formOption"
-        v-model="formData.dataOne"
-        :rules="rulesOne"
-        ref="byformOne"
-      >
+    <el-dialog title="调整工艺" v-model="dialogVisibleOne" width="800" v-loading="loadingOne" destroy-on-close>
+      <byForm :formConfig="formConfigOne" :formOption="formOption" v-model="formData.dataOne" :rules="rulesOne" ref="byformOne">
         <template #slot>
           <div style="width: 100%" class="tableDrop">
-            <el-button type="primary" plain @click="clickAdd"
-              >添加工序</el-button
-            >
-            <el-table
-              :data="formData.dataOne.workOrderProductionProcessesList"
-              style="width: 100%; margin-top: 16px"
-              row-key="id"
-            >
+            <el-button type="primary" plain @click="clickAdd">添加工序</el-button>
+            <el-table :data="formData.dataOne.workOrderProductionProcessesList" style="width: 100%; margin-top: 16px" row-key="id">
               <el-table-column label="工序名称" width="150">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
-                    <el-form-item
-                      :prop="
+                    <el-form-item :prop="
                         'workOrderProductionProcessesList.' + $index + '.name'
-                      "
-                      :rules="rulesOne.name"
-                      :inline-message="true"
-                    >
+                      " :rules="rulesOne.name" :inline-message="true">
                       <el-input v-model="row.name" placeholder="请输入" />
                     </el-form-item>
                   </div>
@@ -141,20 +70,12 @@
               <el-table-column label="工艺说明" width="300">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
-                    <el-form-item
-                      :prop="
+                    <el-form-item :prop="
                         'workOrderProductionProcessesList.' +
                         $index +
                         '.remarks'
-                      "
-                      :rules="rulesOne.remarks"
-                      :inline-message="true"
-                    >
-                      <el-input
-                        v-model="row.remarks"
-                        type="textarea"
-                        placeholder="请输入"
-                      />
+                      " :rules="rulesOne.remarks" :inline-message="true">
+                      <el-input v-model="row.remarks" type="textarea" placeholder="请输入" />
                     </el-form-item>
                   </div>
                 </template>
@@ -162,41 +83,21 @@
               <el-table-column label="图纸">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
-                    <el-form-item
-                      :prop="
+                    <el-form-item :prop="
                         'workOrderProductionProcessesList.' + $index + '.name'
-                      "
-                      :rules="rulesOne.name"
-                      :inline-message="true"
-                    >
-                      <el-upload
-                        v-model:fileList="row.fileList"
-                        :show-file-list="false"
-                        class="upload-demo"
-                        action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-                        :data="uploadData"
-                        :before-upload="
+                      " :rules="rulesOne.name" :inline-message="true">
+                      <el-upload v-model:fileList="row.fileList" :show-file-list="false" class="upload-demo" :action="uploadUrl" :data="uploadData"
+                                 :before-upload="
                           (file) => handleBeforeUpload(file, $index)
-                        "
-                        accept=".pdf"
-                      >
-                        <el-icon
-                          :size="17"
-                          style="margin-top: 12px; cursor: pointer"
-                        >
+                        " accept=".pdf">
+                        <el-icon :size="17" style="margin-top: 12px; cursor: pointer">
                           <Edit />
                         </el-icon>
                       </el-upload>
                       <div>
                         <div>
-                          <el-tag
-                            style="margin-left: 10px"
-                            class="ml-2"
-                            type="info"
-                            v-for="(item, index) in row.fileListCopy"
-                            :key="index"
-                            >{{ item.fileName }}</el-tag
-                          >
+                          <el-tag style="margin-left: 10px" class="ml-2" type="info" v-for="(item, index) in row.fileListCopy"
+                                  :key="index">{{ item.fileName }}</el-tag>
                         </div>
                       </div>
                     </el-form-item>
@@ -204,16 +105,9 @@
                 </template>
               </el-table-column>
 
-              <el-table-column
-                align="center"
-                label="操作"
-                width="60"
-                fixed="right"
-              >
+              <el-table-column align="center" label="操作" width="60" fixed="right">
                 <template #default="{ $index }">
-                  <el-button type="primary" link @click="clickDelete($index)"
-                    >删除</el-button
-                  >
+                  <el-button type="primary" link @click="clickDelete($index)">删除</el-button>
                 </template>
               </el-table-column>
             </el-table>
@@ -221,26 +115,14 @@
         </template>
       </byForm>
       <template #footer>
-        <el-button @click="dialogVisibleOne = false" size="large"
-          >取 消</el-button
-        >
-        <el-button
-          type="primary"
-          @click="submitFormOne('byform')"
-          size="large"
-          :loading="loadingOne"
-        >
+        <el-button @click="dialogVisibleOne = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitFormOne('byform')" size="large" :loading="loadingOne">
           确 定
         </el-button>
       </template>
     </el-dialog>
 
-    <el-dialog
-      v-model="openMaterial"
-      title="选择产品"
-      width="70%"
-      append-to-body
-    >
+    <el-dialog v-model="openMaterial" title="选择产品" width="70%" append-to-body>
       <SelectMaterial @handleSelect="handleSelect"></SelectMaterial>
       <template #footer>
         <span class="dialog-footer">

+ 103 - 394
src/views/WDLY/basic/customer/index.vue

@@ -1,13 +1,9 @@
 <template>
   <div class="tenant">
     <div style="padding: 20px; background: #fff; margin-bottom: 20px">
-      <el-button type="primary" style="margin-left: 10px" @click="openModal()"
-        >添加客户</el-button
-      >
+      <el-button type="primary" style="margin-left: 10px" @click="openModal()">添加客户</el-button>
     </div>
-    <div
-      style="padding: 20px 20px 0 20px; background: #fff; margin-bottom: 20px"
-    >
+    <div style="padding: 20px 20px 0 20px; background: #fff; margin-bottom: 20px">
       <div style="display: flex">
         <div style="font-size: 14px; cursor: pointer" class="by-dropdown">
           <div class="by-dropdown-title">
@@ -17,53 +13,42 @@
                 statisticsType
               )
             }}</span>
-            <el-icon style="margin-left: 5px; font-size: 16px"
-              ><CaretBottom
-            /></el-icon>
+            <el-icon style="margin-left: 5px; font-size: 16px">
+              <CaretBottom />
+            </el-icon>
           </div>
           <ul class="by-dropdown-lists">
-            <li
-              v-for="item in statisticsType"
-              :key="item.value"
-              @click="searchItemSelect(item.value)"
-              style="
+            <li v-for="item in statisticsType" :key="item.value" @click="searchItemSelect(item.value)" style="
                 display: flex;
                 align-items: center;
                 justify-content: center;
-              "
-            >
+              ">
               {{ item.label }}
             </li>
           </ul>
         </div>
       </div>
-      <div
-        style="
+      <div style="
           display: flex;
           width: 100%;
           margin: 10px 0 0 10px;
           flex-wrap: wrap;
-        "
-      >
-        <div
-          style="
+        ">
+        <div style="
             padding: 20px;
             border-radius: 10px;
             width: 200px;
             background-color: #d1caff59;
             margin: 0 20px 20px 0;
-          "
-        >
+          ">
           <div style="margin-bottom: 10px; display: flex">
-            <div
-              style="
+            <div style="
                 width: 8px;
                 height: 8px;
                 background-color: #5bacff;
                 border-radius: 50px;
                 margin-top: 6px;
-              "
-            ></div>
+              "></div>
             <span style="padding-left: 8px">合计</span>
           </div>
           <div style="color: black; font-size: 20px; font-weight: 700">
@@ -71,37 +56,29 @@
           </div>
         </div>
         <template v-if="sourceList.paginationTwo.statisticsType === 1">
-          <div
-            style="
+          <div style="
               padding: 20px;
               border-radius: 10px;
               width: 200px;
               background-color: #a2d8ff70;
               margin: 0 20px 20px 0;
-            "
-            v-for="(item, index) in customerSource"
-            :key="index"
-          >
+            " v-for="(item, index) in customerSource" :key="index">
             <div style="margin-bottom: 10px; display: flex">
-              <div
-                style="
+              <div style="
                   width: 8px;
                   height: 8px;
                   background-color: #5bacff;
                   border-radius: 50px;
                   margin-top: 6px;
-                "
-              ></div>
+                "></div>
               <div class="statistics-text">
                 <el-tooltip class="box-item" effect="light" placement="bottom">
                   <template #content>
-                    <div
-                      style="
+                    <div style="
                         max-width: 400px;
                         max-height: 50vh;
                         word-break: break-all;
-                      "
-                    >
+                      ">
                       {{ item.label }}
                     </div>
                   </template>
@@ -115,37 +92,29 @@
           </div>
         </template>
         <template v-else-if="sourceList.paginationTwo.statisticsType === 2">
-          <div
-            style="
+          <div style="
               padding: 20px;
               border-radius: 10px;
               width: 200px;
               background-color: #a2d8ff70;
               margin: 0 20px 20px 0;
-            "
-            v-for="(item, index) in customerStatus"
-            :key="index"
-          >
+            " v-for="(item, index) in customerStatus" :key="index">
             <div style="margin-bottom: 10px; display: flex">
-              <div
-                style="
+              <div style="
                   width: 8px;
                   height: 8px;
                   background-color: #5bacff;
                   border-radius: 50px;
                   margin-top: 6px;
-                "
-              ></div>
+                "></div>
               <div class="statistics-text">
                 <el-tooltip class="box-item" effect="light" placement="bottom">
                   <template #content>
-                    <div
-                      style="
+                    <div style="
                         max-width: 400px;
                         max-height: 50vh;
                         word-break: break-all;
-                      "
-                    >
+                      ">
                       {{ item.label }}
                     </div>
                   </template>
@@ -159,37 +128,29 @@
           </div>
         </template>
         <template v-else-if="sourceList.paginationTwo.statisticsType === 3">
-          <div
-            style="
+          <div style="
               padding: 20px;
               border-radius: 10px;
               width: 200px;
               background-color: #a2d8ff70;
               margin: 0 20px 20px 0;
-            "
-            v-for="(item, index) in userList"
-            :key="index"
-          >
+            " v-for="(item, index) in userList" :key="index">
             <div style="margin-bottom: 10px; display: flex">
-              <div
-                style="
+              <div style="
                   width: 8px;
                   height: 8px;
                   background-color: #5bacff;
                   border-radius: 50px;
                   margin-top: 6px;
-                "
-              ></div>
+                "></div>
               <div class="statistics-text">
                 <el-tooltip class="box-item" effect="light" placement="bottom">
                   <template #content>
-                    <div
-                      style="
+                    <div style="
                         max-width: 400px;
                         max-height: 50vh;
                         word-break: break-all;
-                      "
-                    >
+                      ">
                       {{ item.label }}
                     </div>
                   </template>
@@ -204,29 +165,13 @@
         </template>
       </div>
     </div>
-    <byTable
-      :source="sourceList.data"
-      :pagination="sourceList.pagination"
-      :config="config"
-      :loading="loading"
-      :selectConfig="selectConfig"
-      highlight-current-row
-      @get-list="getList"
-    >
+    <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
+             highlight-current-row @get-list="getList">
       <template #isTop="{ item }">
         <div>
-          <img
-            style="cursor: pointer; width: 20px; transform: translateY(5px)"
-            :src="'/img/isTop.png'"
-            @click="deleteTop(item)"
-            v-if="item.isTop === 1"
-          />
-          <img
-            style="cursor: pointer; width: 20px; transform: translateY(5px)"
-            :src="'/img/noTop.png'"
-            @click="addTop(item)"
-            v-else
-          />
+          <img style="cursor: pointer; width: 20px; transform: translateY(5px)" :src="'/img/isTop.png'" @click="deleteTop(item)"
+               v-if="item.isTop === 1" />
+          <img style="cursor: pointer; width: 20px; transform: translateY(5px)" :src="'/img/noTop.png'" @click="addTop(item)" v-else />
         </div>
       </template>
       <template #address="{ item }">
@@ -242,41 +187,19 @@
       </template>
       <template #tags="{ item }">
         <div style="width: 100%">
-          <el-tag
-            style="margin-right: 8px"
-            type="success"
-            v-for="(tag, index) in item.tag"
-            closable
-            :key="index"
-            @close="tagClose(tag, item)"
-          >
+          <el-tag style="margin-right: 8px" type="success" v-for="(tag, index) in item.tag" closable :key="index" @close="tagClose(tag, item)">
             {{ dictValueLabel(tag, customerTag) }}
           </el-tag>
           <template v-if="item.tag.length !== customerTag.length">
-            <el-select
-              v-if="item.addTagShow"
-              v-model="addTag"
-              style="width: 100%"
-              @change="
+            <el-select v-if="item.addTagShow" v-model="addTag" style="width: 100%" @change="
                 (val) => {
                   return changeTag(val, item);
                 }
-              "
-            >
-              <el-option
-                v-for="tag in customerTag"
-                :key="tag.value"
-                :label="tag.label"
-                :value="tag.value"
-                :disabled="judgeTagSelect(item.tag, tag.value)"
-              />
+              ">
+              <el-option v-for="tag in customerTag" :key="tag.value" :label="tag.label" :value="tag.value"
+                         :disabled="judgeTagSelect(item.tag, tag.value)" />
             </el-select>
-            <el-tag
-              style="cursor: pointer"
-              type="success"
-              @click="showSelect(item)"
-              v-else
-            >
+            <el-tag style="cursor: pointer" type="success" @click="showSelect(item)" v-else>
               +
             </el-tag>
           </template>
@@ -285,37 +208,24 @@
       <template #follow="{ item }">
         <div :class="'getWidth' + item.id" style="width: 100%">
           <div style="width: 100%; display: flex">
-            <template
-              v-if="
+            <template v-if="
                 item.customerFollowRecordsList &&
                 item.customerFollowRecordsList.length > 0
-              "
-            >
-              <div
-                :style="
+              ">
+              <div :style="
                   index > 2
                     ? 'line-height: 32px; margin-right: 8px; padding: 0 8px; background-color: #eeeeee; border-radius: 4px; cursor: pointer; display: none'
                     : 'line-height: 32px; margin-right: 8px; padding: 0 8px; background-color: #eeeeee; border-radius: 4px; cursor: pointer'
-                "
-                v-for="(record, index) in item.customerFollowRecordsList"
-                :key="record.id"
-              >
-                <el-popover
-                  placement="bottom"
-                  :width="300"
-                  trigger="hover"
-                  @show="recordShow(record)"
-                >
+                " v-for="(record, index) in item.customerFollowRecordsList" :key="record.id">
+                <el-popover placement="bottom" :width="300" trigger="hover" @show="recordShow(record)">
                   <template #reference>
                     <div>
                       <span v-if="record.date">{{
                         record.date.substr(0, 10)
                       }}</span>
-                      <el-icon
-                        style="margin-left: 8px; transform: translateY(2px)"
-                        @click="deleteFollow(record)"
-                        ><DeleteFilled
-                      /></el-icon>
+                      <el-icon style="margin-left: 8px; transform: translateY(2px)" @click="deleteFollow(record)">
+                        <DeleteFilled />
+                      </el-icon>
                     </div>
                   </template>
                   <template #default>
@@ -323,27 +233,13 @@
                       <div style="color: #909399; margin: 8px 0">
                         跟进时间: {{ record.date }}
                       </div>
-                      <div
-                        style="word-wrap: break-word; margin: 8px 0"
-                        v-html="getStyle(record.content)"
-                        v-if="record.content"
-                      ></div>
+                      <div style="word-wrap: break-word; margin: 8px 0" v-html="getStyle(record.content)" v-if="record.content"></div>
                       <div v-else>跟进记录:</div>
-                      <div
-                        style="margin: 8px 0; display: flex"
-                        v-if="record.fileList && record.fileList.length > 0"
-                      >
+                      <div style="margin: 8px 0; display: flex" v-if="record.fileList && record.fileList.length > 0">
                         <div style="width: 36px">附件:</div>
                         <div style="width: calc(100% - 36px)">
-                          <div
-                            v-for="(file, index) in record.fileList"
-                            :key="index"
-                          >
-                            <a
-                              style="color: #409eff; cursor: pointer"
-                              @click="openFile(file.fileUrl)"
-                              >{{ file.fileName }}</a
-                            >
+                          <div v-for="(file, index) in record.fileList" :key="index">
+                            <a style="color: #409eff; cursor: pointer" @click="openFile(file.fileUrl)">{{ file.fileName }}</a>
                           </div>
                         </div>
                       </div>
@@ -351,18 +247,14 @@
                   </template>
                 </el-popover>
               </div>
-              <div
-                style="
+              <div style="
                   line-height: 32px;
                   margin-right: 8px;
                   padding: 0 8px;
                   background-color: #eeeeee;
                   border-radius: 4px;
                   cursor: pointer;
-                "
-                @click="clickMore(item)"
-                v-if="item.customerFollowRecordsList.length >= 3"
-              >
+                " @click="clickMore(item)" v-if="item.customerFollowRecordsList.length >= 3">
                 更多
               </div>
             </template>
@@ -371,62 +263,28 @@
       </template>
     </byTable>
 
-    <el-dialog
-      :title="modalType == 'add' ? '新增' : '编辑'"
-      v-if="dialogVisible"
-      v-model="dialogVisible"
-      width="800"
-      v-loading="loadingOperation"
-    >
-      <byForm
-        :formConfig="formConfig"
-        :formOption="formOption"
-        v-model="formData.data"
-        :rules="rules"
-        ref="submit"
-      >
+    <el-dialog :title="modalType == 'add' ? '新增' : '编辑'" v-if="dialogVisible" v-model="dialogVisible" width="800" v-loading="loadingOperation">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
         <template #allAddress>
           <el-row style="width: 100%">
             <el-col :span="8">
               <el-form-item prop="countryId">
-                <el-select
-                  v-model="formData.data.countryId"
-                  placeholder="国家"
-                  filterable
-                  allow-create
-                  @change="(val) => getCityData(val, '20', true)"
-                >
-                  <el-option
-                    v-for="item in countryData"
-                    :label="item.chineseName"
-                    :value="item.id"
-                  >
+                <el-select v-model="formData.data.countryId" placeholder="国家" filterable allow-create @change="(val) => getCityData(val, '20', true)">
+                  <el-option v-for="item in countryData" :label="item.chineseName" :value="item.id">
                   </el-option>
                 </el-select>
               </el-form-item>
             </el-col>
             <el-col :span="8">
               <el-form-item prop="provinceName">
-                <selectCity
-                  placeholder="省/洲"
-                  @change="(val) => getCityData(val, '30', true)"
-                  addressId="provinceId"
-                  addressName="provinceName"
-                  v-model="formData.data"
-                  :data="provinceData"
-                >
+                <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 prop="cityName">
-                <selectCity
-                  placeholder="城市"
-                  addressId="cityId"
-                  addressName="cityName"
-                  v-model="formData.data"
-                  :data="cityData"
-                ></selectCity>
+                <selectCity placeholder="城市" addressId="cityId" addressName="cityName" v-model="formData.data" :data="cityData"></selectCity>
               </el-form-item>
             </el-col>
           </el-row>
@@ -442,18 +300,11 @@
         <template #person>
           <div style="width: 100%">
             <el-button type="primary" @click="clickAddPerson">添 加</el-button>
-            <el-table
-              :data="formData.data.customerUserList"
-              style="width: 100%; margin-top: 16px"
-            >
+            <el-table :data="formData.data.customerUserList" style="width: 100%; margin-top: 16px">
               <el-table-column label="联系人" width="160">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
-                    <el-form-item
-                      :prop="'customerUserList.' + $index + '.name'"
-                      :rules="rules.name2"
-                      :inline-message="true"
-                    >
+                    <el-form-item :prop="'customerUserList.' + $index + '.name'" :rules="rules.name2" :inline-message="true">
                       <el-input v-model="row.name" placeholder="请输入联系人" />
                     </el-form-item>
                   </div>
@@ -462,35 +313,16 @@
               <el-table-column label="电子邮箱">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
-                    <el-form-item
-                      :prop="'customerUserList.' + $index + '.email'"
-                      :rules="rules.email"
-                      :inline-message="true"
-                    >
-                      <el-input
-                        v-model="row.email"
-                        placeholder="请输入电子邮箱"
-                      />
+                    <el-form-item :prop="'customerUserList.' + $index + '.email'" :rules="rules.email" :inline-message="true">
+                      <el-input v-model="row.email" placeholder="请输入电子邮箱" />
                     </el-form-item>
                   </div>
                 </template>
               </el-table-column>
-              <el-table-column
-                align="center"
-                label="操作"
-                width="120"
-                fixed="right"
-              >
+              <el-table-column align="center" label="操作" width="120" fixed="right">
                 <template #default="{ row, $index }">
-                  <el-button
-                    type="primary"
-                    link
-                    @click="clickInformationMore(row, $index)"
-                    >更多</el-button
-                  >
-                  <el-button type="primary" link @click="clickDelete($index)"
-                    >删除</el-button
-                  >
+                  <el-button type="primary" link @click="clickInformationMore(row, $index)">更多</el-button>
+                  <el-button type="primary" link @click="clickDelete($index)">删除</el-button>
                 </template>
               </el-table-column>
             </el-table>
@@ -499,28 +331,12 @@
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button
-          type="primary"
-          @click="submitForm()"
-          size="large"
-          :loading="submitLoading"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitForm()" size="large" :loading="submitLoading">确 定</el-button>
       </template>
     </el-dialog>
 
-    <el-dialog
-      title="更多联系方式"
-      v-if="openPerson"
-      v-model="openPerson"
-      width="700"
-    >
-      <el-form
-        :label-position="'top'"
-        :model="formPerson.data"
-        :rules="rulesPerson"
-        ref="person"
-      >
+    <el-dialog title="更多联系方式" v-if="openPerson" v-model="openPerson" width="700">
+      <el-form :label-position="'top'" :model="formPerson.data" :rules="rulesPerson" ref="person">
         <el-form-item label="联系人" prop="name">
           <el-input v-model="formPerson.data.name" />
         </el-form-item>
@@ -529,32 +345,14 @@
         </el-form-item>
         <el-form-item label="更多联系方式">
           <div style="width: 100%">
-            <el-button type="primary" @click="clickAddMoreInformation"
-              >添 加</el-button
-            >
-            <el-table
-              :data="formPerson.data.contact"
-              style="width: 100%; margin-top: 16px"
-            >
+            <el-button type="primary" @click="clickAddMoreInformation">添 加</el-button>
+            <el-table :data="formPerson.data.contact" style="width: 100%; margin-top: 16px">
               <el-table-column label="类型" width="180">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
-                    <el-form-item
-                      :prop="'contact.' + $index + '.type'"
-                      :rules="rulesPerson.type"
-                      :inline-message="true"
-                    >
-                      <el-select
-                        v-model="row.type"
-                        placeholder="请选择类型"
-                        style="width: 100%"
-                      >
-                        <el-option
-                          v-for="item in contactType"
-                          :key="item.value"
-                          :label="item.label"
-                          :value="item.value"
-                        />
+                    <el-form-item :prop="'contact.' + $index + '.type'" :rules="rulesPerson.type" :inline-message="true">
+                      <el-select v-model="row.type" placeholder="请选择类型" style="width: 100%">
+                        <el-option v-for="item in contactType" :key="item.value" :label="item.label" :value="item.value" />
                       </el-select>
                     </el-form-item>
                   </div>
@@ -563,32 +361,15 @@
               <el-table-column label="联系号码">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
-                    <el-form-item
-                      :prop="'contact.' + $index + '.contactNo'"
-                      :rules="rulesPerson.contactNo"
-                      :inline-message="true"
-                    >
-                      <el-input
-                        v-model="row.contactNo"
-                        placeholder="请输入联系号码"
-                      />
+                    <el-form-item :prop="'contact.' + $index + '.contactNo'" :rules="rulesPerson.contactNo" :inline-message="true">
+                      <el-input v-model="row.contactNo" placeholder="请输入联系号码" />
                     </el-form-item>
                   </div>
                 </template>
               </el-table-column>
-              <el-table-column
-                align="center"
-                label="操作"
-                width="120"
-                fixed="right"
-              >
+              <el-table-column align="center" label="操作" width="120" fixed="right">
                 <template #default="{ $index }">
-                  <el-button
-                    type="primary"
-                    link
-                    @click="clickInformationDelete($index)"
-                    >删除</el-button
-                  >
+                  <el-button type="primary" link @click="clickInformationDelete($index)">删除</el-button>
                 </template>
               </el-table-column>
             </el-table>
@@ -597,60 +378,25 @@
       </el-form>
       <template #footer>
         <el-button @click="openPerson = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitPerson()" size="large"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitPerson()" size="large">确 定</el-button>
       </template>
     </el-dialog>
 
-    <el-dialog
-      title="分配"
-      v-if="openAllocation"
-      v-model="openAllocation"
-      width="300"
-    >
-      <byForm
-        :formConfig="formConfigAllocation"
-        :formOption="formOption"
-        v-model="formAllocation.data"
-        :rules="rulesAllocation"
-        ref="allocation"
-      >
+    <el-dialog title="分配" v-if="openAllocation" v-model="openAllocation" width="300">
+      <byForm :formConfig="formConfigAllocation" :formOption="formOption" v-model="formAllocation.data" :rules="rulesAllocation" ref="allocation">
       </byForm>
       <template #footer>
-        <el-button @click="openAllocation = false" size="large"
-          >取 消</el-button
-        >
-        <el-button type="primary" @click="submitAllocation()" size="large"
-          >确 定</el-button
-        >
+        <el-button @click="openAllocation = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitAllocation()" size="large">确 定</el-button>
       </template>
     </el-dialog>
 
-    <el-dialog
-      title="添加跟进记录"
-      v-if="openFollow"
-      v-model="openFollow"
-      width="500"
-      destroy-on-close
-    >
-      <byForm
-        :formConfig="formConfigAFollow"
-        :formOption="formOption"
-        v-model="formFollow.data"
-        :rules="rulesFollow"
-        ref="follow"
-      >
+    <el-dialog title="添加跟进记录" v-if="openFollow" v-model="openFollow" width="500" destroy-on-close>
+      <byForm :formConfig="formConfigAFollow" :formOption="formOption" v-model="formFollow.data" :rules="rulesFollow" ref="follow">
         <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-upload v-model:fileList="fileList" :action="uploadUrl" :data="uploadData" multiple :before-upload="uploadFile"
+                       :on-preview="onPreviewFile">
               <el-button type="primary">文件上传</el-button>
             </el-upload>
           </div>
@@ -658,72 +404,37 @@
       </byForm>
       <template #footer>
         <el-button @click="openFollow = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitFollow()" size="large"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitFollow()" size="large">确 定</el-button>
       </template>
     </el-dialog>
 
-    <el-dialog
-      title="跟进记录"
-      v-if="openRecordMore"
-      v-model="openRecordMore"
-      width="800"
-      destroy-on-close
-    >
+    <el-dialog title="跟进记录" v-if="openRecordMore" v-model="openRecordMore" width="800" destroy-on-close>
       <div>
         <div style="padding: 8px 0">
-          <el-button type="primary" @click="clickFollowUp(rowData)" plain
-            >添加跟进记录</el-button
-          >
+          <el-button type="primary" @click="clickFollowUp(rowData)" plain>添加跟进记录</el-button>
         </div>
         <div style="padding-top: 16px">
-          <div
-            v-infinite-scroll="infiniteScroll"
-            class="infinite-scroll"
-            :infinite-scroll-disabled="judgeTotal()"
-          >
+          <div v-infinite-scroll="infiniteScroll" class="infinite-scroll" :infinite-scroll-disabled="judgeTotal()">
             <el-timeline>
-              <el-timeline-item
-                v-for="(record, index) in recordList"
-                :key="index"
-                :timestamp="record.date"
-                hide-timestamp
-              >
+              <el-timeline-item v-for="(record, index) in recordList" :key="index" :timestamp="record.date" hide-timestamp>
                 <div>
-                  <div
-                    style="
+                  <div style="
                       padding: 0 0 8px 0;
                       display: flex;
                       justify-content: space-between;
-                    "
-                  >
+                    ">
                     <span>{{
                       dictValueLabel(record.createUser, userList)
                     }}</span>
                     <span>{{ record.date }}</span>
                   </div>
-                  <div
-                    style="word-wrap: break-word; margin: 8px 0"
-                    v-html="getStyle(record.content)"
-                    v-if="record.content"
-                  ></div>
+                  <div style="word-wrap: break-word; margin: 8px 0" v-html="getStyle(record.content)" v-if="record.content"></div>
                   <div style="margin: 8px 0" v-else>跟进记录:</div>
-                  <div
-                    style="margin: 8px 0; display: flex"
-                    v-if="record.fileList && record.fileList.length > 0"
-                  >
+                  <div style="margin: 8px 0; display: flex" v-if="record.fileList && record.fileList.length > 0">
                     <div style="width: 36px">附件:</div>
                     <div style="width: calc(100% - 36px)">
-                      <div
-                        v-for="(file, index) in record.fileList"
-                        :key="index"
-                      >
-                        <a
-                          style="color: #409eff; cursor: pointer"
-                          @click="openFile(file.fileUrl)"
-                          >{{ file.fileName }}</a
-                        >
+                      <div v-for="(file, index) in record.fileList" :key="index">
+                        <a style="color: #409eff; cursor: pointer" @click="openFile(file.fileUrl)">{{ file.fileName }}</a>
                       </div>
                     </div>
                   </div>
@@ -734,9 +445,7 @@
         </div>
       </div>
       <template #footer>
-        <el-button @click="openRecordMore = false" size="large"
-          >关 闭</el-button
-        >
+        <el-button @click="openRecordMore = false" size="large">关 闭</el-button>
       </template>
     </el-dialog>
   </div>

+ 44 - 192
src/views/WDLY/basic/product/index.vue

@@ -1,30 +1,16 @@
 <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" :data="treeListData" v-model="sourceList.pagination.productClassifyId" @change="treeChange"
+                @changeTreeList="getTreeList">
       </treeList>
     </div>
     <div class="content">
-      <byTable
-        :tableHeight="tableHeight"
-        :source="sourceList.data"
-        :pagination="sourceList.pagination"
-        :config="config"
-        :loading="loading"
-        highlight-current-row
-        :selectConfig="selectConfig"
-        :table-events="{
+      <byTable :tableHeight="tableHeight" :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading"
+               highlight-current-row :selectConfig="selectConfig" :table-events="{
           //element talbe事件都能传
           select: select,
-        }"
-        :action-list="[
+        }" :action-list="[
           {
             text: 'Excel导入',
             action: () => openExcel(),
@@ -35,112 +21,58 @@
             action: () => openModal('add'),
             disabled: false,
           },
-        ]"
-        @get-list="getList"
-      >
+        ]" @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])"
-            />
+            <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="800"
-      v-loading="loadingOne"
-      destroy-on-close
-    >
+    <el-dialog :title="modalType == 'add' ? '添加' : '编辑'" v-model="dialogVisible" width="800" v-loading="loadingOne" destroy-on-close>
       <div class="public_height_dialog">
-        <byForm
-          :formConfig="formConfig"
-          :formOption="formOption"
-          v-model="formData.data"
-          :rules="rules"
-          ref="byform"
-        >
+        <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"
-                accept=".gif, .jpeg, .jpg, .png"
-              >
-                <el-icon><Plus /></el-icon>
+              <el-upload v-model:fileList="fileList" :action="uploadUrl" :data="uploadData" list-type="picture-card" :on-remove="handleRemove"
+                         :on-success="handleSuccess" :before-upload="handleBeforeUpload" accept=".gif, .jpeg, .jpg, .png">
+                <el-icon>
+                  <Plus />
+                </el-icon>
               </el-upload>
             </div>
           </template>
 
           <template #combination>
             <div style="width: 100%">
-              <div
-                style="
+              <div style="
                   font-size: 14px;
                   font-weight: bold;
                   margin-bottom: 10px;
                   color: #333333;
-                "
-                v-show="formData.data.combination == 1"
-              >
+                " v-show="formData.data.combination == 1">
                 组合明细
               </div>
-              <el-button
-                type="primary"
-                @click="openProduct = true"
-                style="margin-bottom: 10px"
-                v-show="formData.data.combination == 1"
-              >
+              <el-button type="primary" @click="openProduct = true" style="margin-bottom: 10px" v-show="formData.data.combination == 1">
                 添加
               </el-button>
-              <el-table
-                :data="formData.data.productCombinationList"
-                v-show="formData.data.combination == 1"
-              >
+              <el-table :data="formData.data.productCombinationList" v-show="formData.data.combination == 1">
                 <el-table-column prop="code" label="产品编码" />
                 <el-table-column prop="name" label="产品名称" />
-                <el-table-column
-                  prop="linkQuantity"
-                  label="组合数量"
-                  min-width="150"
-                >
+                <el-table-column prop="linkQuantity" label="组合数量" min-width="150">
                   <template #default="{ row, $index }">
-                    <el-form-item
-                      :prop="
+                    <el-form-item :prop="
                         'productCombinationList.' + $index + '.linkQuantity'
-                      "
-                      :rules="rules.linkQuantity"
-                      :inline-message="true"
-                    >
-                      <el-input-number
-                        v-model="row.linkQuantity"
-                        placeholder="请输入"
-                        :min="1"
-                        :controls="false"
-                        :precision="0"
-                        onmousewheel="return false;"
-                      />
+                      " :rules="rules.linkQuantity" :inline-message="true">
+                      <el-input-number v-model="row.linkQuantity" placeholder="请输入" :min="1" :controls="false" :precision="0"
+                                       onmousewheel="return false;" />
                     </el-form-item>
                   </template>
                 </el-table-column>
                 <el-table-column prop="zip" label="操作" width="100">
                   <template #default="{ $index }">
-                    <el-button
-                      type="primary"
-                      link
-                      @click="handleRemoveProduct($index)"
-                      >删除</el-button
-                    >
+                    <el-button type="primary" link @click="handleRemoveProduct($index)">删除</el-button>
                   </template>
                 </el-table-column>
               </el-table>
@@ -150,39 +82,19 @@
             <div style="width: 100%">
               <el-row>
                 <el-col :span="4">
-                  <el-input
-                    v-model="formData.data.victoriatouristJson.newProductsDay1"
-                    placeholder="请输入"
-                    disabled
-                  />
+                  <el-input v-model="formData.data.victoriatouristJson.newProductsDay1" placeholder="请输入" disabled />
                 </el-col>
                 <el-col :span="1" style="text-align: center"> ~ </el-col>
                 <el-col :span="4">
-                  <el-input-number
-                    v-model="formData.data.victoriatouristJson.newProductsDay"
-                    placeholder="请输入"
-                    :min="0"
-                    :controls="false"
-                    :precision="0"
-                    style="width: 100%"
-                    @change="changeDay(10)"
-                    onmousewheel="return false;"
-                  >
+                  <el-input-number v-model="formData.data.victoriatouristJson.newProductsDay" placeholder="请输入" :min="0" :controls="false"
+                                   :precision="0" style="width: 100%" @change="changeDay(10)" onmousewheel="return false;">
                   </el-input-number>
                 </el-col>
                 <el-col :span="1" style="text-align: center"> : </el-col>
                 <el-col :span="6">
-                  <el-input-number
-                    v-model="
+                  <el-input-number v-model="
                       formData.data.victoriatouristJson.newProductsExpectedSales
-                    "
-                    placeholder="预期销量"
-                    :min="0"
-                    :controls="false"
-                    :precision="0"
-                    style="width: 100%"
-                    onmousewheel="return false;"
-                  />
+                    " placeholder="预期销量" :min="0" :controls="false" :precision="0" style="width: 100%" onmousewheel="return false;" />
                 </el-col>
               </el-row>
             </div>
@@ -191,39 +103,19 @@
             <div style="width: 100%">
               <el-row>
                 <el-col :span="4">
-                  <el-input
-                    v-model="formData.data.victoriatouristJson.growUpDay1"
-                    placeholder="请输入"
-                    disabled
-                  />
+                  <el-input v-model="formData.data.victoriatouristJson.growUpDay1" placeholder="请输入" disabled />
                 </el-col>
                 <el-col :span="1" style="text-align: center"> ~ </el-col>
                 <el-col :span="4">
-                  <el-input-number
-                    v-model="formData.data.victoriatouristJson.growUpDay"
-                    placeholder="请输入"
-                    :min="0"
-                    :controls="false"
-                    :precision="0"
-                    style="width: 100%"
-                    @change="changeDay(20)"
-                    onmousewheel="return false;"
-                  >
+                  <el-input-number v-model="formData.data.victoriatouristJson.growUpDay" placeholder="请输入" :min="0" :controls="false" :precision="0"
+                                   style="width: 100%" @change="changeDay(20)" onmousewheel="return false;">
                   </el-input-number>
                 </el-col>
                 <el-col :span="1" style="text-align: center"> : </el-col>
                 <el-col :span="6">
-                  <el-input-number
-                    v-model="
+                  <el-input-number v-model="
                       formData.data.victoriatouristJson.growUpExpectedSales
-                    "
-                    placeholder="预期销量"
-                    :min="0"
-                    :controls="false"
-                    :precision="0"
-                    style="width: 100%"
-                    onmousewheel="return false;"
-                  />
+                    " placeholder="预期销量" :min="0" :controls="false" :precision="0" style="width: 100%" onmousewheel="return false;" />
                 </el-col>
               </el-row>
             </div>
@@ -234,17 +126,9 @@
                 大于{{ formData.data.victoriatouristJson.attDay }}天:
               </el-col>
               <el-col :span="6">
-                <el-input-number
-                  v-model="
+                <el-input-number v-model="
                     formData.data.victoriatouristJson.matureExpectedSales
-                  "
-                  placeholder="预期销量"
-                  :min="0"
-                  :controls="false"
-                  :precision="0"
-                  style="width: 100%"
-                  onmousewheel="return false;"
-                />
+                  " placeholder="预期销量" :min="0" :controls="false" :precision="0" style="width: 100%" onmousewheel="return false;" />
               </el-col>
             </el-row>
           </template>
@@ -252,32 +136,15 @@
       </div>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button
-          type="primary"
-          v-no-double-click="submitForm"
-          size="large"
-          :loading="submitLoading"
-        >
+        <el-button type="primary" v-no-double-click="submitForm" size="large" :loading="submitLoading">
           确 定
         </el-button>
       </template>
     </el-dialog>
-    <el-dialog
-      title="Excel导入"
-      v-model="openExcelDialog"
-      width="400"
-      v-loading="loading"
-    >
+    <el-dialog title="Excel导入" v-model="openExcelDialog" width="400" v-loading="loading">
       <template #footer>
-        <el-button @click="openExcelDialog = false" size="large"
-          >取 消</el-button
-        >
-        <el-button
-          type="primary"
-          @click="submitExcel()"
-          size="large"
-          :loading="submitLoading"
-        >
+        <el-button @click="openExcelDialog = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitExcel()" size="large" :loading="submitLoading">
           确 定
         </el-button>
       </template>
@@ -285,31 +152,16 @@
 
     <el-dialog title="移交" v-model="moveDept" width="400" v-loading="loading">
       <div style="margin-bottom: 15px">请选择部门</div>
-      <el-tree-select
-        v-model="moveForm.deptId"
-        :data="deptList"
-        :render-after-expand="false"
-        check-strictly
-        :node-key="'deptId'"
-        :props="defaultProps"
-      />
+      <el-tree-select v-model="moveForm.deptId" :data="deptList" :render-after-expand="false" check-strictly :node-key="'deptId'"
+                      :props="defaultProps" />
       <template #footer>
         <el-button @click="moveDept = false">取 消</el-button>
-        <el-button
-          type="primary"
-          @click="submitMove()"
-          :loading="submitLoading"
-        >
+        <el-button type="primary" @click="submitMove()" :loading="submitLoading">
           确 定
         </el-button>
       </template>
     </el-dialog>
-    <el-dialog
-      v-model="openProduct"
-      title="选择产品"
-      width="70%"
-      append-to-body
-    >
+    <el-dialog v-model="openProduct" title="选择产品" width="70%" append-to-body>
       <SelectProduct @handleSelect="handleSelect"></SelectProduct>
       <template #footer>
         <span class="dialog-footer">

+ 19 - 84
src/views/WDLY/basic/supplier/index.vue

@@ -2,60 +2,30 @@
   <div class="tenant">
     <!-- <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事件都能传
           select: select,
-        }"
-        :action-list="[
+        }" :action-list="[
           {
             text: '添加供应商',
             action: () => openModal('add'),
           },
-        ]"
-        @get-list="getList"
-      >
+        ]" @get-list="getList">
         <template #address="{ item }">
           <div>
-            <span v-if="item.countryName"> {{ item.countryName }} ,</span
-            ><span v-if="item.provinceName">{{ item.provinceName }} ,</span>
+            <span v-if="item.countryName"> {{ item.countryName }} ,</span><span v-if="item.provinceName">{{ item.provinceName }} ,</span>
             <span v-if="item.cityName">{{ item.cityName }}</span>
           </div>
         </template>
       </byTable>
     </div>
-    <el-dialog
-      :title="modalType == 'add' ? '添加供应商' : '编辑供应商'"
-      v-model="dialogVisible"
-      width="800"
-      v-loading="loading"
-      destroy-on-close
-    >
-      <byForm
-        :formConfig="formConfig"
-        :formOption="formOption"
-        v-model="formData.data"
-        :rules="rules"
-        ref="byform"
-      >
+    <el-dialog :title="modalType == 'add' ? '添加供应商' : '编辑供应商'" v-model="dialogVisible" width="800" 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-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>
@@ -63,67 +33,37 @@
 
         <template #provinceId>
           <div>
-            <selectCity
-              placeholder="省/洲"
-              @change="(val) => getCityData(val, '30', true)"
-              addressId="provinceId"
-              addressName="provinceName"
-              v-model="formData.data"
-              :data="provinceData"
-            >
+            <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 placeholder="城市" addressId="cityId" addressName="cityName" v-model="formData.data" :data="cityData">
             </selectCity>
           </div>
         </template>
 
         <template #contactNumber>
           <div style="width: 100%">
-            <el-input
-              v-model="formData.data.contactNumber"
-              placeholder="联系电话"
-              :formatter="(val) => val.replace(/[^\d\-]/g, '')"
-              :parser="(val) => val.replace(/[^\d\-]/g, '')"
-            >
+            <el-input v-model="formData.data.contactNumber" placeholder="联系电话" :formatter="(val) => val.replace(/[^\d\-]/g, '')"
+                      :parser="(val) => val.replace(/[^\d\-]/g, '')">
             </el-input>
           </div>
         </template>
 
         <template #fileSlot>
           <div>
-            <el-upload
-              v-model:fileList="fileList"
-              :show-file-list="false"
-              class="upload-demo"
-              action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-              :data="uploadData"
-              :before-upload="handleBeforeUpload"
-            >
+            <el-upload v-model:fileList="fileList" :show-file-list="false" class="upload-demo" :action="uploadUrl" :data="uploadData"
+                       :before-upload="handleBeforeUpload">
               <el-button type="primary">选择</el-button>
             </el-upload>
             <div>
               <div style="margin-top: 15px">
-                <el-tag
-                  style="margin-right: 10px"
-                  class="ml-2"
-                  type="info"
-                  v-for="(item, index) in fileListCopy"
-                  :key="index"
-                  closable
-                  @close="handleClose(index)"
-                  >{{ item.fileName }}</el-tag
-                >
+                <el-tag style="margin-right: 10px" class="ml-2" type="info" v-for="(item, index) in fileListCopy" :key="index" closable
+                        @close="handleClose(index)">{{ item.fileName }}</el-tag>
               </div>
             </div>
           </div>
@@ -131,12 +71,7 @@
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button
-          type="primary"
-          v-no-double-click="submitForm"
-          size="large"
-          :loading="submitLoading"
-        >
+        <el-button type="primary" v-no-double-click="submitForm" size="large" :loading="submitLoading">
           确 定
         </el-button>
       </template>

+ 26 - 124
src/views/WDLY/salesMange/afterSale/index.vue

@@ -2,25 +2,16 @@
   <div class="tenant">
     <!-- <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事件都能传
           select: select,
-        }"
-        :action-list="[
+        }" :action-list="[
           {
             text: '添加售后记录',
             action: () => openModal('add'),
           },
-        ]"
-        @get-list="getList"
-      >
+        ]" @get-list="getList">
         <template #address="{ item }">
           <div>
             {{ item.countryName }}, {{ item.provinceName }} ,
@@ -29,31 +20,12 @@
         </template>
       </byTable>
     </div>
-    <el-dialog
-      :title="modalType == 'add' ? '添加售后记录' : '添加跟进记录'"
-      v-model="dialogVisible"
-      width="800"
-      v-loading="loading"
-    >
-      <byForm
-        :formConfig="formConfig"
-        :formOption="formOption"
-        v-model="formData.data"
-        :rules="rules"
-        ref="byform"
-      >
+    <el-dialog :title="modalType == 'add' ? '添加售后记录' : '添加跟进记录'" v-model="dialogVisible" width="800" v-loading="loading">
+      <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-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>
@@ -61,37 +33,21 @@
 
         <template #provinceId>
           <div>
-            <selectCity
-              placeholder="省/洲"
-              @change="(val) => getCityData(val, '30', true)"
-              addressId="provinceId"
-              addressName="provinceName"
-              v-model="formData.data"
-              :data="provinceData"
-            >
+            <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 placeholder="城市" addressId="cityId" addressName="cityName" v-model="formData.data" :data="cityData">
             </selectCity>
           </div>
         </template>
         <template #products>
           <div style="width: 100%">
-            <el-button
-              type="primary"
-              @click="openProduct = true"
-              style="margin-bottom: 10px"
-            >
+            <el-button type="primary" @click="openProduct = true" style="margin-bottom: 10px">
               添加
             </el-button>
             <el-table :data="formData.data.afterSaleDetailList">
@@ -100,36 +56,21 @@
               <el-table-column prop="productSpec" label="规格型号" />
               <el-table-column prop="quantity" label="数量" min-width="150">
                 <template #default="{ row, $index }">
-                  <el-form-item
-                    :prop="'afterSaleDetailList.' + $index + '.quantity'"
-                    :rules="rules.quantity"
-                    :inline-message="true"
-                  >
-                    <el-input-number
-                      v-model="row.quantity"
-                      :precision="2"
-                      :controls="false"
-                      :min="0"
-                      onmousewheel="return false;"
-                    />
+                  <el-form-item :prop="'afterSaleDetailList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true">
+                    <el-input-number v-model="row.quantity" :precision="2" :controls="false" :min="0" onmousewheel="return false;" />
                   </el-form-item>
                 </template>
               </el-table-column>
               <el-table-column prop="remark" label="备注" min-width="150">
                 <template #default="{ row, $index }">
-                  <el-form-item
-                    :prop="'afterSaleDetailList.' + $index + '.remark'"
-                    :inline-message="true"
-                  >
+                  <el-form-item :prop="'afterSaleDetailList.' + $index + '.remark'" :inline-message="true">
                     <el-input v-model="row.remark" placeholder="请输入" />
                   </el-form-item>
                 </template>
               </el-table-column>
               <el-table-column prop="zip" label="操作" width="100">
                 <template #default="{ $index }">
-                  <el-button type="primary" link @click="handleRemove($index)"
-                    >删除</el-button
-                  >
+                  <el-button type="primary" link @click="handleRemove($index)">删除</el-button>
                 </template>
               </el-table-column>
             </el-table>
@@ -138,30 +79,14 @@
 
         <template #fileSlot>
           <div>
-            <el-upload
-              v-model:fileList="fileList"
-              :show-file-list="false"
-              class="upload-demo"
-              action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-              :data="uploadData"
-              :on-preview="handlePreview"
-              :on-success="handleSuccess"
-              :before-upload="handleBeforeUpload"
-            >
+            <el-upload v-model:fileList="fileList" :show-file-list="false" class="upload-demo" :action="uploadUrl" :data="uploadData"
+                       :on-preview="handlePreview" :on-success="handleSuccess" :before-upload="handleBeforeUpload">
               <el-button type="primary">选择</el-button>
             </el-upload>
             <div>
               <div style="margin-top: 15px">
-                <el-tag
-                  style="margin-right: 10px"
-                  class="ml-2"
-                  type="info"
-                  v-for="(item, index) in fileListCopy"
-                  :key="index"
-                  closable
-                  @close="handleClose(index)"
-                  >{{ item.fileName }}</el-tag
-                >
+                <el-tag style="margin-right: 10px" class="ml-2" type="info" v-for="(item, index) in fileListCopy" :key="index" closable
+                        @close="handleClose(index)">{{ item.fileName }}</el-tag>
               </div>
             </div>
           </div>
@@ -169,22 +94,12 @@
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button
-          type="primary"
-          v-no-double-click="submitForm"
-          size="large"
-          :loading="submitLoading"
-        >
+        <el-button type="primary" v-no-double-click="submitForm" size="large" :loading="submitLoading">
           确 定
         </el-button>
       </template>
     </el-dialog>
-    <el-dialog
-      v-model="openProduct"
-      title="选择商品"
-      width="70%"
-      append-to-body
-    >
+    <el-dialog v-model="openProduct" title="选择商品" width="70%" append-to-body>
       <SelectProduct @handleSelect="handleSelect"></SelectProduct>
       <template #footer>
         <span class="dialog-footer">
@@ -193,13 +108,7 @@
       </template>
     </el-dialog>
 
-    <el-dialog
-      v-model="dialogVisibleOne"
-      title="跟进记录"
-      width="500"
-      append-to-body
-      destroy-on-close
-    >
+    <el-dialog v-model="dialogVisibleOne" title="跟进记录" width="500" append-to-body destroy-on-close>
       <div style="padding-left: 40px; margin-bottom: 20px">
         <el-button size="mini" @click="openModal('edit')">
           添加跟进记录
@@ -207,19 +116,12 @@
       </div>
       <div>
         <el-timeline :reverse="false">
-          <el-timeline-item
-            placement="top"
-            v-for="(activity, index) in activities"
-            :key="index"
-            :timestamp="activity.handleTime"
-          >
+          <el-timeline-item placement="top" v-for="(activity, index) in activities" :key="index" :timestamp="activity.handleTime">
             <div>
               跟进人:{{ activity.handleUserName }}
-              <span
-                >({{
+              <span>({{
                   dictValueLabel(activity.status, afterSalesStatus)
-                }})</span
-              >
+                }})</span>
             </div>
             <div style="margin-top: 5px">跟进记录: {{ activity.remark }}</div>
           </el-timeline-item>

+ 64 - 89
src/views/XMHJC/aboutUs/basic/index.vue

@@ -1,33 +1,21 @@
 <template>
   <div class="tenant" :loading="loading">
-    <div
-        style="padding: 20px 20px 0 20px; background: #fff; margin-bottom: 80px"
-    >
+    <div style="padding: 20px 20px 0 20px; background: #fff; margin-bottom: 80px">
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
         <template #companyCover>
           <el-row style="width: 100%">
             <el-col :span="6">
-              <el-form-item  prop="companyCover">
-                <el-upload
-                    class="avatar-uploader"
-                    action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-                    :data="uploadDataOne"
-                    :show-file-list="false"
-                    accept=".gif, .jpeg, .jpg, .png"
-                    :on-success="companyCoverListSuccess"
-                    :before-upload="uploadFileOne">
-                  <el-image
-                      v-if="formData.data.companyCoverList && formData.data.companyCoverList.length > 0"
-                      :src="formData.data.companyCoverList[0].fileUrl"
-                      fit="scale-down"
-                      class="avatar" />
-                  <el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
+              <el-form-item prop="companyCover">
+                <el-upload class="avatar-uploader" :action="uploadUrl" :data="uploadDataOne" :show-file-list="false" accept=".gif, .jpeg, .jpg, .png"
+                           :on-success="companyCoverListSuccess" :before-upload="uploadFileOne">
+                  <el-image v-if="formData.data.companyCoverList && formData.data.companyCoverList.length > 0"
+                            :src="formData.data.companyCoverList[0].fileUrl" fit="scale-down" class="avatar" />
+                  <el-icon v-else class="avatar-uploader-icon">
+                    <Plus />
+                  </el-icon>
                 </el-upload>
-                <el-button
-                    class="delete-btn"
-                    type="danger"
-                    v-if="formData.data.companyCoverList && formData.data.companyCoverList.length > 0"
-                    @click="formData.data.companyCoverList = []">
+                <el-button class="delete-btn" type="danger" v-if="formData.data.companyCoverList && formData.data.companyCoverList.length > 0"
+                           @click="formData.data.companyCoverList = []">
                   删除
                 </el-button>
               </el-form-item>
@@ -37,27 +25,17 @@
         <template #gzhQrCode>
           <el-row style="width: 100%">
             <el-col :span="6">
-              <el-form-item  prop="gzhQrCode">
-                <el-upload
-                    class="avatar-uploader"
-                    action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-                    :data="uploadDataTwo"
-                    :show-file-list="false"
-                    accept=".gif, .jpeg, .jpg, .png"
-                    :on-success="gzhQrCodeListSuccess"
-                    :before-upload="uploadFileTwo">
-                  <el-image
-                      v-if="formData.data.gzhQrCodeList && formData.data.gzhQrCodeList.length > 0"
-                      :src="formData.data.gzhQrCodeList[0].fileUrl"
-                      fit="scale-down"
-                      class="avatar" />
-                  <el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
+              <el-form-item prop="gzhQrCode">
+                <el-upload class="avatar-uploader" :action="uploadUrl" :data="uploadDataTwo" :show-file-list="false" accept=".gif, .jpeg, .jpg, .png"
+                           :on-success="gzhQrCodeListSuccess" :before-upload="uploadFileTwo">
+                  <el-image v-if="formData.data.gzhQrCodeList && formData.data.gzhQrCodeList.length > 0" :src="formData.data.gzhQrCodeList[0].fileUrl"
+                            fit="scale-down" class="avatar" />
+                  <el-icon v-else class="avatar-uploader-icon">
+                    <Plus />
+                  </el-icon>
                 </el-upload>
-                <el-button
-                    class="delete-btn"
-                    type="danger"
-                    v-if="formData.data.gzhQrCodeList && formData.data.gzhQrCodeList.length > 0"
-                    @click="formData.data.gzhQrCodeList = []">
+                <el-button class="delete-btn" type="danger" v-if="formData.data.gzhQrCodeList && formData.data.gzhQrCodeList.length > 0"
+                           @click="formData.data.gzhQrCodeList = []">
                   删除
                 </el-button>
               </el-form-item>
@@ -66,11 +44,7 @@
         </template>
         <template #companyProfile>
           <div style="width: 100%" v-if="!loading">
-            <TinymceEditor
-                :value="formData.data.companyProfile"
-                @updateValue="updateHandover"
-                ref="contentEditor"
-            />
+            <TinymceEditor :value="formData.data.companyProfile" @updateValue="updateHandover" ref="contentEditor" />
           </div>
         </template>
       </byForm>
@@ -90,7 +64,7 @@
 
 <script setup>
 import byForm from "@/components/byForm/index";
-import {computed, reactive, ref} from "vue";
+import { computed, reactive, ref } from "vue";
 const { proxy } = getCurrentInstance();
 import Editor from "@/components/Editor/index.vue";
 import TinymceEditor from "@/components/Editor/TinymceEditor.vue";
@@ -98,13 +72,10 @@ import {
   addAboutUsBaseInfo,
   editAboutUsBaseInfo,
   getAboutUsBaseInfo,
-
 } from "@/api/XMHJC/aboutUs";
-import {
-  getFileList, getFileStr,
-} from "@/api/XMHJC/common";
-import {ElMessage} from "element-plus";
-import {isNullOrUndefined} from "@tinymce/tinymce-vue/lib/es2015/main/ts/Utils";
+import { getFileList, getFileStr } from "@/api/XMHJC/common";
+import { ElMessage } from "element-plus";
+import { isNullOrUndefined } from "@tinymce/tinymce-vue/lib/es2015/main/ts/Utils";
 
 const loading = ref(false);
 const submitLoading = ref(false);
@@ -117,13 +88,11 @@ let rules = ref({
   filingNumber: [{ required: true, message: "请输入备案号", trigger: "blur" }],
 });
 
-
-
 let formData = reactive({
   data: {
     companyCoverList: [],
     gzhQrCodeList: [],
-    companyProfile:''
+    companyProfile: "",
   },
 });
 const formOption = reactive({
@@ -134,7 +103,6 @@ const formOption = reactive({
 });
 const formConfig = computed(() => {
   return [
-
     {
       type: "input",
       prop: "mobileOne",
@@ -186,10 +154,9 @@ const formConfig = computed(() => {
   ];
 });
 
-
 const uploadDataOne = ref({});
 const uploadFileOne = async (file) => {
-  const res = await getFileStr( { fileName: file.name });
+  const res = await getFileStr({ fileName: file.name });
   uploadDataOne.value = res.data.uploadBody;
   file.id = res.data.id;
   file.fileName = res.data.fileName;
@@ -199,7 +166,7 @@ const uploadFileOne = async (file) => {
 
 const uploadDataTwo = ref({});
 const uploadFileTwo = async (file) => {
-  const res = await getFileStr( { fileName: file.name });
+  const res = await getFileStr({ fileName: file.name });
   uploadDataTwo.value = res.data.uploadBody;
   file.id = res.data.id;
   file.fileName = res.data.fileName;
@@ -232,63 +199,71 @@ const updateHandover = (val) => {
 
 const getInfo = async () => {
   loading.value = true;
-  const response = await getAboutUsBaseInfo({})
+  const response = await getAboutUsBaseInfo({});
   formData.data = response.data;
 
-  const resFile = await getFileList({businessIdList: [response.data.id], fileType: 1})
+  const resFile = await getFileList({
+    businessIdList: [response.data.id],
+    fileType: 1,
+  });
   formData.data.companyCoverList = resFile.data[response.data.id];
-  const resFile1 = await getFileList({businessIdList: [response.data.id], fileType: 2})
+  const resFile1 = await getFileList({
+    businessIdList: [response.data.id],
+    fileType: 2,
+  });
   formData.data.gzhQrCodeList = resFile1.data[response.data.id];
 
   loading.value = false;
-}
+};
 
 const submitForm = () => {
-    if (!formData.data.companyCoverList) {
-      ElMessage({message: "请上传公司简介图片",type: "error",});
-      return
-    }
-    if (!formData.data.gzhQrCodeList) {
-      ElMessage({message: "请上传公众号图片",type: "error",});
-      return
-    }
-    if (!formData.data.companyProfile) {
-      ElMessage({message: "请填写公司简介",type: "error",});
-      return
-    }
-    submitLoading.value = true;
-    if (isNullOrUndefined(formData.data.id)){
-      addAboutUsBaseInfo(formData.data).then(response => {
+  if (!formData.data.companyCoverList) {
+    ElMessage({ message: "请上传公司简介图片", type: "error" });
+    return;
+  }
+  if (!formData.data.gzhQrCodeList) {
+    ElMessage({ message: "请上传公众号图片", type: "error" });
+    return;
+  }
+  if (!formData.data.companyProfile) {
+    ElMessage({ message: "请填写公司简介", type: "error" });
+    return;
+  }
+  submitLoading.value = true;
+  if (isNullOrUndefined(formData.data.id)) {
+    addAboutUsBaseInfo(formData.data)
+      .then((response) => {
         ElMessage({
           message: "编辑成功",
           type: "success",
         });
         submitLoading.value = false;
-      }).catch(()=>{
+      })
+      .catch(() => {
         submitLoading.value = false;
       });
-    }else {
-      editAboutUsBaseInfo(formData.data).then(response => {
+  } else {
+    editAboutUsBaseInfo(formData.data)
+      .then((response) => {
         ElMessage({
           message: "编辑成功",
           type: "success",
         });
         submitLoading.value = false;
-      }).catch(()=>{
+      })
+      .catch(() => {
         submitLoading.value = false;
       });
-    }
+  }
 };
 
-
 getInfo();
-
 </script>
 
 <style lang="scss" scoped>
 .tenant {
   padding: 20px;
-  .delete-btn{
+  .delete-btn {
     margin-top: 10px;
     margin-left: 25px;
   }

+ 80 - 103
src/views/XMHJC/aboutUs/honor/index.vue

@@ -1,49 +1,32 @@
 <template>
   <div class="tenant">
-    <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="{
         select: select,
-      }"
-        :action-list="[
+      }" :action-list="[
         {
           text: '添加荣誉资质',
           action: () => openModal('add'),
         },
-      ]"
-        @get-list="getList">
+      ]" @get-list="getList">
     </byTable>
-    <el-dialog z-index="1100" :title="modalType == 'add' ? '添加荣誉资质' : '编辑荣誉资质'" v-if="dialogVisible" v-model="dialogVisible" width="90%" v-loading="loading">
+    <el-dialog z-index="1100" :title="modalType == 'add' ? '添加荣誉资质' : '编辑荣誉资质'" v-if="dialogVisible" v-model="dialogVisible" width="90%"
+               v-loading="loading">
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
         <template #honorCover>
           <el-row style="width: 100%">
             <el-col :span="6">
-              <el-form-item  prop="honorCover">
-                <el-upload
-                    class="avatar-uploader"
-                    action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-                    :data="uploadDataOne"
-                    :show-file-list="false"
-                    accept=".gif, .jpeg, .jpg, .png"
-                    :on-success="honorCoverListSuccess"
-                    :before-upload="uploadFileOne">
-                  <el-image
-                      v-if="formData.data.honorCoverList && formData.data.honorCoverList.length > 0"
-                      :src="formData.data.honorCoverList[0].fileUrl"
-                      fit="scale-down"
-                      class="avatar" />
-                  <el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
+              <el-form-item prop="honorCover">
+                <el-upload class="avatar-uploader" :action="uploadUrl" :data="uploadDataOne" :show-file-list="false" accept=".gif, .jpeg, .jpg, .png"
+                           :on-success="honorCoverListSuccess" :before-upload="uploadFileOne">
+                  <el-image v-if="formData.data.honorCoverList && formData.data.honorCoverList.length > 0"
+                            :src="formData.data.honorCoverList[0].fileUrl" fit="scale-down" class="avatar" />
+                  <el-icon v-else class="avatar-uploader-icon">
+                    <Plus />
+                  </el-icon>
                 </el-upload>
-                <el-button
-                    class="delete-btn"
-                    type="danger"
-                    v-if="formData.data.honorCoverList && formData.data.honorCoverList.length > 0"
-                    @click="formData.data.honorCoverList = []">
+                <el-button class="delete-btn" type="danger" v-if="formData.data.honorCoverList && formData.data.honorCoverList.length > 0"
+                           @click="formData.data.honorCoverList = []">
                   删除
                 </el-button>
               </el-form-item>
@@ -53,11 +36,7 @@
 
         <template #detailsContent>
           <div style="width: 100%" v-if="dialogVisible">
-            <TinymceEditor
-                :value="formData.data.detailsContent"
-                @updateValue="updateHandover"
-                ref="contentEditor"
-            />
+            <TinymceEditor :value="formData.data.detailsContent" @updateValue="updateHandover" ref="contentEditor" />
           </div>
         </template>
       </byForm>
@@ -79,10 +58,10 @@ import {
   editAboutUsHonor,
   findAboutUsHonorList,
   getAboutUsHonor,
-  deleteAboutUsHonor
+  deleteAboutUsHonor,
 } from "@/api/XMHJC/aboutUs";
 import TinymceEditor from "@/components/Editor/TinymceEditor.vue";
-import {getDictOneByXmhjc, getFileList,getFileStr} from "@/api/XMHJC/common";
+import { getDictOneByXmhjc, getFileList, getFileStr } from "@/api/XMHJC/common";
 
 const loading = ref(false);
 const submitLoading = ref(false);
@@ -129,7 +108,7 @@ const config = computed(() => {
       attrs: {
         label: "状态",
         prop: "status",
-        width: '80'
+        width: "80",
       },
       render(type) {
         return proxy.dictValueLabel(type, enableStatus.value);
@@ -139,7 +118,7 @@ const config = computed(() => {
       attrs: {
         label: "排序",
         prop: "sort",
-        width: '80'
+        width: "80",
       },
     },
     {
@@ -169,21 +148,24 @@ const config = computed(() => {
             },
             el: "button",
             click() {
-              ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
-                confirmButtonText: "确定",
-                cancelButtonText: "取消",
-                type: "warning",
-              }).then(() => {
+              ElMessageBox.confirm(
+                "此操作将永久删除该数据, 是否继续?",
+                "提示",
+                {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning",
+                }
+              ).then(() => {
                 deleteAboutUsHonor({
                   id: row.id,
-                })
-                    .then((res) => {
-                      ElMessage({
-                        message: "删除成功",
-                        type: "success",
-                      });
-                      getList();
-                    });
+                }).then((res) => {
+                  ElMessage({
+                    message: "删除成功",
+                    type: "success",
+                  });
+                  getList();
+                });
               });
             },
           },
@@ -231,14 +213,14 @@ const formConfig = computed(() => {
       prop: "toUrl",
       label: "第三方链接",
       required: true,
-      isShow: formData.data.type == "2"
+      isShow: formData.data.type == "2",
     },
     {
       type: "slot",
       slotName: "detailsContent",
       prop: "detailsContent",
       label: "详情内容",
-      isShow: formData.data.type == "3"
+      isShow: formData.data.type == "3",
     },
     {
       label: "启用状态",
@@ -248,7 +230,6 @@ const formConfig = computed(() => {
       required: true,
     },
     {
-
       type: "input",
       prop: "sort",
       label: "排序",
@@ -258,14 +239,11 @@ const formConfig = computed(() => {
       controls: false,
       required: true,
     },
-
-
   ];
 });
 
 const getDictlist = async () => {
-
-  const res = await getDictOneByXmhjc(["to_url_type","enable_status"]);
+  const res = await getDictOneByXmhjc(["to_url_type", "enable_status"]);
   toUrlType.value = res["to_url_type"].map((x) => ({
     label: x.dictValue,
     value: x.dictKey,
@@ -286,7 +264,6 @@ const getList = async (req) => {
   setTimeout(() => {
     loading.value = false;
   }, 200);
-
 };
 
 const openModal = () => {
@@ -294,9 +271,8 @@ const openModal = () => {
   modalType.value = "add";
 
   formData.data = {
-    detailsContent:''
+    detailsContent: "",
   };
-
 };
 const selection = ref({
   data: [],
@@ -306,54 +282,56 @@ const select = (_selection, row) => {
 };
 const submitForm = () => {
   byform.value.handleSubmit(() => {
-
     if (!formData.data.honorCoverList) {
-      ElMessage({message: "请上传荣誉资质图片",type: "error",});
-      return
+      ElMessage({ message: "请上传荣誉资质图片", type: "error" });
+      return;
     }
-    if (formData.data.type == '3' &&
-        !formData.data.detailsContent) {
-      ElMessage({message: "请填写详情内容",type: "error",});
-      return
+    if (formData.data.type == "3" && !formData.data.detailsContent) {
+      ElMessage({ message: "请填写详情内容", type: "error" });
+      return;
     }
 
-
     submitLoading.value = true;
-    if (modalType.value === 'add'){
-      addAboutUsHonor(formData.data).then(response => {
-        ElMessage({
-          message: "添加成功",
-          type: "success",
+    if (modalType.value === "add") {
+      addAboutUsHonor(formData.data)
+        .then((response) => {
+          ElMessage({
+            message: "添加成功",
+            type: "success",
+          });
+          dialogVisible.value = false;
+          submitLoading.value = false;
+          getList();
+        })
+        .catch(() => {
+          submitLoading.value = false;
         });
-        dialogVisible.value = false;
-        submitLoading.value = false;
-        getList();
-      }).catch(()=>{
-        submitLoading.value = false;
-      });
-    }else {
-      editAboutUsHonor(formData.data).then(response => {
-        ElMessage({
-          message: "编辑成功",
-          type: "success",
+    } else {
+      editAboutUsHonor(formData.data)
+        .then((response) => {
+          ElMessage({
+            message: "编辑成功",
+            type: "success",
+          });
+          dialogVisible.value = false;
+          submitLoading.value = false;
+          getList();
+        })
+        .catch(() => {
+          submitLoading.value = false;
         });
-        dialogVisible.value = false;
-        submitLoading.value = false;
-        getList();
-      }).catch(()=>{
-        submitLoading.value = false;
-      });
-
-
     }
   });
 };
 
 const getDtl = async (row) => {
   modalType.value = "edit";
-  const response = await getAboutUsHonor({ id: row.id })
+  const response = await getAboutUsHonor({ id: row.id });
   formData.data = response.data;
-  const resFile = await getFileList({businessIdList: [response.data.id], fileType: 1})
+  const resFile = await getFileList({
+    businessIdList: [response.data.id],
+    fileType: 1,
+  });
   formData.data.honorCoverList = resFile.data[response.data.id];
   dialogVisible.value = true;
 };
@@ -382,15 +360,14 @@ const updateHandover = (val) => {
   formData.data.detailsContent = val;
 };
 
-getDictlist()
-getList()
-
+getDictlist();
+getList();
 </script>
 
 <style lang="scss" scoped>
 .tenant {
   padding: 20px;
-  .delete-btn{
+  .delete-btn {
     margin-top: 10px;
     margin-left: 25px;
   }

+ 58 - 78
src/views/XMHJC/carousel/index.vue

@@ -2,19 +2,12 @@
   <div class="carousel">
     <!-- <Banner /> -->
     <div class="content">
-      <byTable
-        :source="sourceList.data"
-        :pagination="sourceList.pagination"
-        :config="config"
-        :loading="loading"
-        highlight-current-row
-        :action-list="[
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row :action-list="[
           {
             text: '添加轮播图',
             action: () => openModal('add'),
           },
-        ]"
-        @get-list="getList">
+        ]" @get-list="getList">
         <template #slotName="{ item }">
           {{ item.createTime }}
         </template>
@@ -26,26 +19,16 @@
           <el-row style="width: 100%">
             <el-col :span="6">
               <el-form-item prop="carouselUrl">
-                <el-upload
-                    class="uploader-icon"
-                    action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-                    :data="carouselUrlOne"
-                    :show-file-list="false"
-                    accept=".gif, .jpeg, .jpg, .png"
-                    :on-success="carouselUrlSuccess"
-                    :before-upload="uploadCarouselUrl">
-                  <el-image
-                      v-if="formData.data.carouselUrlList && formData.data.carouselUrlList.length > 0"
-                      :src="formData.data.carouselUrlList[0].fileUrl"
-                      fit="scale-down"
-                      class="avatar" />
-                  <el-icon v-else class="uploader-icon"><Plus /></el-icon>
+                <el-upload class="uploader-icon" :action="uploadUrl" :data="carouselUrlOne" :show-file-list="false" accept=".gif, .jpeg, .jpg, .png"
+                           :on-success="carouselUrlSuccess" :before-upload="uploadCarouselUrl">
+                  <el-image v-if="formData.data.carouselUrlList && formData.data.carouselUrlList.length > 0"
+                            :src="formData.data.carouselUrlList[0].fileUrl" fit="scale-down" class="avatar" />
+                  <el-icon v-else class="uploader-icon">
+                    <Plus />
+                  </el-icon>
                 </el-upload>
-                <el-button
-                    class="delete-btn"
-                    type="danger"
-                    v-if="formData.data.carouselUrlList && formData.data.carouselUrlList.length > 0"
-                    @click="formData.data.carouselUrlList = []">
+                <el-button class="delete-btn" type="danger" v-if="formData.data.carouselUrlList && formData.data.carouselUrlList.length > 0"
+                           @click="formData.data.carouselUrlList = []">
                   删除
                 </el-button>
               </el-form-item>
@@ -55,18 +38,9 @@
 
         <template #menuId>
           <el-form-item prop="menuId">
-            <el-select
-                v-model="formData.data.columnId"
-                :rule="rules.columnId"
-                placeholder="请选择菜单"
-                no-data-text="无数据,请到栏目菜单添加"
-                @change="(val) => getArticleListSelect(val)"
-            >
-              <el-option
-                  v-for="item in columnListData"
-                  :label="item.name"
-                  :value="item.id"
-              >
+            <el-select v-model="formData.data.columnId" :rule="rules.columnId" placeholder="请选择菜单" no-data-text="无数据,请到栏目菜单添加"
+                       @change="(val) => getArticleListSelect(val)">
+              <el-option v-for="item in columnListData" :label="item.name" :value="item.id">
               </el-option>
             </el-select>
 
@@ -88,8 +62,8 @@ import { ElMessage, ElMessageBox } from "element-plus";
 import byTable from "@/components/byTable/index.vue";
 import byForm from "@/components/byForm/index.vue";
 import { computed, ref } from "vue";
-import {getDictOneByXmhjc, getFileList, getFileStr} from "@/api/XMHJC/common";
-import {findColumnArticleList, findMenuListByOpen} from "@/api/XMHJC/column";
+import { getDictOneByXmhjc, getFileList, getFileStr } from "@/api/XMHJC/common";
+import { findColumnArticleList, findMenuListByOpen } from "@/api/XMHJC/column";
 const loading = ref(false);
 const submitLoading = ref(false);
 const enableStatus = ref([]);
@@ -119,10 +93,10 @@ const { proxy } = getCurrentInstance();
 const config = computed(() => {
   return [
     {
-        attrs: {
-            label: "所属模块",
-            prop: "modules",
-        },
+      attrs: {
+        label: "所属模块",
+        prop: "modules",
+      },
       render(type) {
         return proxy.dictValueLabel(type, carouselModules.value);
       },
@@ -206,7 +180,7 @@ const config = computed(() => {
 let formData = reactive({
   data: {},
   treeData: [],
-  carouselUrlList:[],
+  carouselUrlList: [],
 });
 const formOption = reactive({
   inline: true,
@@ -293,14 +267,16 @@ const formConfig = computed(() => {
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
-    proxy.post("/carouselManager/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("/carouselManager/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);
+    });
 };
 const openModal = () => {
   dialogVisible.value = true;
@@ -310,7 +286,8 @@ const openModal = () => {
 const submitForm = () => {
   byform.value.handleSubmit((valid) => {
     submitLoading.value = true;
-    proxy.post("/carouselManager/" + modalType.value, formData.data)
+    proxy
+      .post("/carouselManager/" + modalType.value, formData.data)
       .then((res) => {
         ElMessage({
           message: modalType.value == "add" ? "添加成功" : "编辑成功",
@@ -328,7 +305,7 @@ const submitForm = () => {
 
 const changeStatus = (row) => {
   modalType.value = "edit";
-  let status = row.status=='1' ? 0 : 1;
+  let status = row.status == "1" ? 0 : 1;
   proxy.post("/carouselManager/detail", { id: row.id }).then((res) => {
     res.status = status;
     formData.data = res;
@@ -338,13 +315,15 @@ const changeStatus = (row) => {
       type: "warning",
     }).then(() => {
       // 更新状态
-      proxy.post("/carouselManager/" + modalType.value, formData.data).then((res) => {
-        ElMessage({
-          message: "操作成功",
-          type: "success",
+      proxy
+        .post("/carouselManager/" + modalType.value, formData.data)
+        .then((res) => {
+          ElMessage({
+            message: "操作成功",
+            type: "success",
+          });
+          getList();
         });
-        getList();
-      });
     });
   });
 };
@@ -354,7 +333,7 @@ const getDetail = (row) => {
   modalType.value = "edit";
   proxy.post("/carouselManager/detail", { id: row.id }).then((res) => {
     formData.data = res;
-    getFileList({businessIdList: [res.id], fileType: 1}).then((resFile) => {
+    getFileList({ businessIdList: [res.id], fileType: 1 }).then((resFile) => {
       formData.data.carouselUrlList = resFile.data[res.id];
       formData.data.carouselUrl = resFile.data[res.id];
       dialogVisible.value = true;
@@ -371,17 +350,21 @@ const del = (row) => {
     type: "warning",
   }).then(() => {
     proxy.post("/carouselManager/delete", { id: row.id }).then((res) => {
-        ElMessage({
-          message: "操作成功",
-          type: "success",
-        });
-        getList();
+      ElMessage({
+        message: "操作成功",
+        type: "success",
       });
+      getList();
+    });
   });
 };
 //获取字典
 const getDictlist = async () => {
-  const res = await getDictOneByXmhjc(["enable_status", "carousel_modules", "carousel_target_type"]);
+  const res = await getDictOneByXmhjc([
+    "enable_status",
+    "carousel_modules",
+    "carousel_target_type",
+  ]);
   enableStatus.value = res["enable_status"].map((x) => ({
     label: x.dictValue,
     value: x.dictKey,
@@ -396,12 +379,10 @@ const getDictlist = async () => {
   }));
 };
 
-
 //获取文章列表
 const getArticleListSelect = async (value) => {
-  formData.data.articleId = ""
-  await getArticleList(value)
-
+  formData.data.articleId = "";
+  await getArticleList(value);
 };
 
 //获取文章列表
@@ -418,7 +399,6 @@ const getArticleList = async (value) => {
   }));
 };
 
-
 //图片上传相关
 const carouselUrlOne = ref({});
 const uploadCarouselUrl = async (file) => {
@@ -442,11 +422,11 @@ const carouselUrlSuccess = (response, uploadFile) => {
 };
 
 const getMenuList = async () => {
-  const res = await findMenuListByOpen({})
-  columnListData.value = res.data
+  const res = await findMenuListByOpen({});
+  columnListData.value = res.data;
 };
 
-getMenuList()
+getMenuList();
 getList();
 getDictlist();
 </script>

+ 154 - 210
src/views/XMHJC/column/article.vue

@@ -1,62 +1,36 @@
 <template>
   <div class="tenant">
-    <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="{
           select: select,
-        }"
-        :action-list="[
+        }" :action-list="[
         {
           text: '添加栏目文章',
           action: () => openModal('add'),
         },
-      ]"
-        @get-list="getList">
+      ]" @get-list="getList">
 
     </byTable>
-    <el-dialog z-index="1100" :title="modalType == 'add' ? '添加栏目文章' : '编辑栏目文章'" v-if="dialogVisible" v-model="dialogVisible" width="80%" v-loading="loading">
+    <el-dialog z-index="1100" :title="modalType == 'add' ? '添加栏目文章' : '编辑栏目文章'" v-if="dialogVisible" v-model="dialogVisible" width="80%"
+               v-loading="loading">
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
         <template #columnSlot>
-          <el-row >
+          <el-row>
             <el-col :span="9">
               <el-form-item prop="columnId">
-                <el-select
-                    v-model="formData.data.columnId"
-                    :rule="rules.columnId"
-                    style="width: 1000px"
-                    placeholder="请选择菜单"
-                    no-data-text="无数据,请到栏目菜单添加"
-                    @change="(val) => getSubMenuListSelect(val)"
-                >
-                  <el-option
-                      v-for="item in columnListData"
-                      :label="item.name"
-                      :value="item.id"
-                  >
+                <el-select v-model="formData.data.columnId" :rule="rules.columnId" style="width: 1000px" placeholder="请选择菜单"
+                           no-data-text="无数据,请到栏目菜单添加" @change="(val) => getSubMenuListSelect(val)">
+                  <el-option v-for="item in columnListData" :label="item.name" :value="item.id">
                   </el-option>
                 </el-select>
 
               </el-form-item>
             </el-col>
-            <el-col :span="1" ></el-col>
+            <el-col :span="1"></el-col>
             <el-col :span="9">
               <el-form-item prop="subId" v-if="subFlag">
-                <el-select
-                    v-model="formData.data.subId"
-                    :rule="rules.subId"
-                    placeholder="请选择栏目"
-                    no-data-text="无数据,请到栏目菜单子栏目添加"
-                >
-                  <el-option
-                      v-for="item in subColumnListData"
-                      :label="item.name"
-                      :value="item.id"
-                  >
+                <el-select v-model="formData.data.subId" :rule="rules.subId" placeholder="请选择栏目" no-data-text="无数据,请到栏目菜单子栏目添加">
+                  <el-option v-for="item in subColumnListData" :label="item.name" :value="item.id">
                   </el-option>
                 </el-select>
               </el-form-item>
@@ -67,27 +41,17 @@
         <template #coverList>
           <el-row style="width: 100%">
             <el-col :span="6">
-              <el-form-item  prop="coverList">
-                <el-upload
-                    class="avatar-uploader"
-                    action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-                    :data="uploadDataOne"
-                    :show-file-list="false"
-                    accept=".gif, .jpeg, .jpg, .png"
-                    :on-success="coverListSuccess"
-                    :before-upload="uploadFileOne">
-                  <el-image
-                      v-if="formData.data.coverList && formData.data.coverList.length > 0"
-                      :src="formData.data.coverList[0].fileUrl"
-                      fit="scale-down"
-                      class="avatar" />
-                  <el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
+              <el-form-item prop="coverList">
+                <el-upload class="avatar-uploader" :action="uploadUrl" :data="uploadDataOne" :show-file-list="false" accept=".gif, .jpeg, .jpg, .png"
+                           :on-success="coverListSuccess" :before-upload="uploadFileOne">
+                  <el-image v-if="formData.data.coverList && formData.data.coverList.length > 0" :src="formData.data.coverList[0].fileUrl"
+                            fit="scale-down" class="avatar" />
+                  <el-icon v-else class="avatar-uploader-icon">
+                    <Plus />
+                  </el-icon>
                 </el-upload>
-                <el-button
-                    class="delete-btn"
-                    type="danger"
-                    v-if="formData.data.coverList && formData.data.coverList.length > 0"
-                    @click="formData.data.coverList = []">
+                <el-button class="delete-btn" type="danger" v-if="formData.data.coverList && formData.data.coverList.length > 0"
+                           @click="formData.data.coverList = []">
                   删除
                 </el-button>
               </el-form-item>
@@ -98,29 +62,18 @@
         <template #videoList>
           <el-row style="width: 100%">
             <el-col :span="6">
-              <el-form-item  prop="videoList">
-                <el-upload
-                    class="avatar-uploader"
-                    action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-                    :data="uploadDataTwo"
-                    :show-file-list="false"
-                    accept="video/*"
-                    :on-success="videoListSuccess"
-                    :before-upload="uploadFileTwo">
-
-
-                  <video
-                      v-if="formData.data.videoList && formData.data.videoList.length > 0"
-                      :src="formData.data.videoList[0].fileUrl"
-                      style="width: 300px; height: 300px"
-                      controls></video>
-                  <el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
+              <el-form-item prop="videoList">
+                <el-upload class="avatar-uploader" :action="uploadUrl" :data="uploadDataTwo" :show-file-list="false" accept="video/*"
+                           :on-success="videoListSuccess" :before-upload="uploadFileTwo">
+
+                  <video v-if="formData.data.videoList && formData.data.videoList.length > 0" :src="formData.data.videoList[0].fileUrl"
+                         style="width: 300px; height: 300px" controls></video>
+                  <el-icon v-else class="avatar-uploader-icon">
+                    <Plus />
+                  </el-icon>
                 </el-upload>
-                <el-button
-                    class="delete-btn"
-                    type="danger"
-                    v-if="formData.data.videoList && formData.data.videoList.length > 0"
-                    @click="formData.data.videoList = []">
+                <el-button class="delete-btn" type="danger" v-if="formData.data.videoList && formData.data.videoList.length > 0"
+                           @click="formData.data.videoList = []">
                   删除
                 </el-button>
               </el-form-item>
@@ -128,15 +81,9 @@
           </el-row>
         </template>
 
-
-
         <template #detailsContent>
           <div style="width: 100%" v-if="dialogVisible">
-            <TinymceEditor
-                :value="formData.data.content"
-                @updateValue="updateHandover"
-                ref="contentEditor"
-            />
+            <TinymceEditor :value="formData.data.content" @updateValue="updateHandover" ref="contentEditor" />
           </div>
         </template>
       </byForm>
@@ -153,15 +100,17 @@
 import { ElMessage, ElMessageBox } from "element-plus";
 import byTable from "@/components/byTable/index";
 import byForm from "@/components/byForm/index";
-import {computed, nextTick, reactive, ref} from "vue";
+import { computed, nextTick, reactive, ref } from "vue";
 import TinymceEditor from "@/components/Editor/TinymceEditor.vue";
-import {getDictOneByXmhjc, getFileList,getFileStr} from "@/api/XMHJC/common";
+import { getDictOneByXmhjc, getFileList, getFileStr } from "@/api/XMHJC/common";
 import {
-  addColumnArticle, deleteColumnArticle,
+  addColumnArticle,
+  deleteColumnArticle,
   editColumnArticle,
   findColumnArticleList,
-  findMenuListByOpen, findSubMenuListByOpen,
-  getColumnArticle
+  findMenuListByOpen,
+  findSubMenuListByOpen,
+  getColumnArticle,
 } from "@/api/XMHJC/column";
 const router = useRouter();
 const loading = ref(false);
@@ -196,42 +145,42 @@ const columnListData = ref([]);
 const columnListDataOld = ref([]);
 const subColumnListData = ref([]);
 
-
 const selectConfig = computed(() => {
   return [
-  {
-    label: "状态",
-    prop: "status",
-    data: enableStatus.value
-  },
-  {
-    label: "菜单",
-    prop: "columnId",
-    data: columnListData.value.map((x) => ({
+    {
+      label: "状态",
+      prop: "status",
+      data: enableStatus.value,
+    },
+    {
+      label: "菜单",
+      prop: "columnId",
+      data: columnListData.value.map((x) => ({
         label: x.name,
         value: x.id,
-      }))
-  },
-  // {
-  //     label: "栏目",
-  //     prop: "subId",
-  //
-  // },
-]});
+      })),
+    },
+    // {
+    //     label: "栏目",
+    //     prop: "subId",
+    //
+    // },
+  ];
+});
 const config = computed(() => {
   return [
     {
       attrs: {
         label: "菜单",
         prop: "columnIdName",
-        width: '120'
+        width: "120",
       },
     },
     {
       attrs: {
         label: "栏目",
         prop: "subIdName",
-        width: '120'
+        width: "120",
       },
     },
     {
@@ -250,7 +199,7 @@ const config = computed(() => {
       attrs: {
         label: "列表类型",
         prop: "bodyType",
-        width: '90'
+        width: "90",
       },
       render(type) {
         return proxy.dictValueLabel(type, bodyListType.value);
@@ -260,19 +209,18 @@ const config = computed(() => {
       attrs: {
         label: "状态",
         prop: "status",
-        width: '80'
+        width: "80",
       },
       render(type) {
         return proxy.dictValueLabel(type, enableStatus.value);
       },
-
     },
 
     {
       attrs: {
         label: "排序",
         prop: "sort",
-        width: '80'
+        width: "80",
       },
     },
 
@@ -280,7 +228,7 @@ const config = computed(() => {
       attrs: {
         label: "发表时间",
         prop: "time",
-        width: '160'
+        width: "160",
       },
     },
 
@@ -288,7 +236,7 @@ const config = computed(() => {
       attrs: {
         label: "点击量",
         prop: "readNum",
-        width: '160'
+        width: "160",
       },
     },
     {
@@ -318,21 +266,24 @@ const config = computed(() => {
             },
             el: "button",
             click() {
-              ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
-                confirmButtonText: "确定",
-                cancelButtonText: "取消",
-                type: "warning",
-              }).then(() => {
+              ElMessageBox.confirm(
+                "此操作将永久删除该数据, 是否继续?",
+                "提示",
+                {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning",
+                }
+              ).then(() => {
                 deleteColumnArticle({
                   id: row.id,
-                })
-                    .then((res) => {
-                      ElMessage({
-                        message: "删除成功",
-                        type: "success",
-                      });
-                      getList();
-                    });
+                }).then((res) => {
+                  ElMessage({
+                    message: "删除成功",
+                    type: "success",
+                  });
+                  getList();
+                });
               });
             },
           },
@@ -343,8 +294,8 @@ const config = computed(() => {
 });
 let formData = reactive({
   data: {
-    coverList:[],
-    videoList:[],
+    coverList: [],
+    videoList: [],
   },
 });
 const formOption = reactive({
@@ -401,7 +352,7 @@ const formConfig = computed(() => {
       slotName: "detailsContent",
       prop: "detailsContent",
       label: "详情内容",
-      isShow: formData.data.bodyType == "1"
+      isShow: formData.data.bodyType == "1",
     },
     // {
     //   type: "input",
@@ -417,7 +368,7 @@ const formConfig = computed(() => {
       prop: "videoList",
       label: "视频",
       required: true,
-      isShow: formData.data.bodyType == "2"
+      isShow: formData.data.bodyType == "2",
     },
     {
       label: "启用状态",
@@ -439,8 +390,7 @@ const formConfig = computed(() => {
 });
 
 const getDictlist = async () => {
-
-  const res = await getDictOneByXmhjc(["enable_status","column_body_type"]);
+  const res = await getDictOneByXmhjc(["enable_status", "column_body_type"]);
   enableStatus.value = res["enable_status"].map((x) => ({
     label: x.dictValue,
     value: x.dictKey,
@@ -462,16 +412,14 @@ const getList = async (req) => {
   setTimeout(() => {
     loading.value = false;
   }, 200);
-
 };
 
 const openModal = () => {
   dialogVisible.value = true;
   modalType.value = "add";
   formData.data = {
-    content:'',
+    content: "",
   };
-
 };
 const selection = ref({
   data: [],
@@ -481,74 +429,76 @@ const select = (_selection, row) => {
 };
 const showNewPage = () => {
   console.log(formData.data);
-  localStorage.setItem('formData',JSON.stringify(formData.data) )
+  localStorage.setItem("formData", JSON.stringify(formData.data));
   let routeData = router.resolve({
-      path:'/newPageEditor'
-    })
-  window.open(routeData.href, '_blank');
-    
-}
+    path: "/newPageEditor",
+  });
+  window.open(routeData.href, "_blank");
+};
 const submitForm = () => {
   byform.value.handleSubmit(() => {
-
-
-    if (!formData.data.coverList ) {
-      ElMessage({message: "请上传封面",type: "error",});
-      return
+    if (!formData.data.coverList) {
+      ElMessage({ message: "请上传封面", type: "error" });
+      return;
     }
 
-
-
-    if (formData.data.bodyType == '2' &&  !formData.data.videoList) {
-      ElMessage({message: "请上传视频",type: "error",});
-      return
+    if (formData.data.bodyType == "2" && !formData.data.videoList) {
+      ElMessage({ message: "请上传视频", type: "error" });
+      return;
     }
 
-    if (formData.data.bodyType == '1' &&
-        !formData.data.content) {
-      ElMessage({message: "请填写详情内容",type: "error",});
-      return
+    if (formData.data.bodyType == "1" && !formData.data.content) {
+      ElMessage({ message: "请填写详情内容", type: "error" });
+      return;
     }
 
     submitLoading.value = true;
-    if (modalType.value === 'add'){
-      addColumnArticle(formData.data).then(response => {
-        ElMessage({
-          message: "添加成功",
-          type: "success",
+    if (modalType.value === "add") {
+      addColumnArticle(formData.data)
+        .then((response) => {
+          ElMessage({
+            message: "添加成功",
+            type: "success",
+          });
+          dialogVisible.value = false;
+          submitLoading.value = false;
+          getList();
+        })
+        .catch(() => {
+          submitLoading.value = false;
         });
-        dialogVisible.value = false;
-        submitLoading.value = false;
-        getList();
-      }).catch(()=>{
-        submitLoading.value = false;
-      });
-    }else {
-      editColumnArticle(formData.data).then(response => {
-        ElMessage({
-          message: "编辑成功",
-          type: "success",
+    } else {
+      editColumnArticle(formData.data)
+        .then((response) => {
+          ElMessage({
+            message: "编辑成功",
+            type: "success",
+          });
+          dialogVisible.value = false;
+          submitLoading.value = false;
+          getList();
+        })
+        .catch(() => {
+          submitLoading.value = false;
         });
-        dialogVisible.value = false;
-        submitLoading.value = false;
-        getList();
-      }).catch(()=>{
-        submitLoading.value = false;
-      });
-
-
     }
   });
 };
 
 const getDtl = async (row) => {
   modalType.value = "edit";
-  const response = await getColumnArticle({ id: row.id })
+  const response = await getColumnArticle({ id: row.id });
   formData.data = response.data;
 
-  const resFile = await getFileList({businessIdList: [response.data.id], fileType: 1})
+  const resFile = await getFileList({
+    businessIdList: [response.data.id],
+    fileType: 1,
+  });
   formData.data.coverList = resFile.data[response.data.id];
-  const resFile1 = await getFileList({businessIdList: [response.data.id], fileType: 2})
+  const resFile1 = await getFileList({
+    businessIdList: [response.data.id],
+    fileType: 2,
+  });
   formData.data.videoList = resFile1.data[response.data.id];
 
   getSubMenuList(formData.data.columnId);
@@ -556,12 +506,10 @@ const getDtl = async (row) => {
   dialogVisible.value = true;
 };
 
-
 const updateHandover = (val) => {
   formData.data.content = val;
 };
 
-
 const uploadDataOne = ref({});
 const uploadFileOne = async (file) => {
   const res = await getFileStr({ fileName: file.name });
@@ -601,44 +549,40 @@ const videoListSuccess = (response, uploadFile) => {
 };
 
 const getMenuList = async () => {
-  const res = await findMenuListByOpen({})
+  const res = await findMenuListByOpen({});
   columnListData.value = res.data;
 
   columnListDataOld.value = res.data;
-
 };
 
 const getSubMenuListSelect = async (id) => {
-  formData.data.subId = ""
-    await getSubMenuList(id)
+  formData.data.subId = "";
+  await getSubMenuList(id);
 };
 
 const getSubMenuList = async (id) => {
-  const  column = columnListDataOld.value.find(x=> x.id == id);
-  console.log(column)
-  console.log(column.type)
-  console.log(column.type == '2')
-  if (column.type == '2'){
-    subFlag.value = false
-  }else {
-    subFlag.value = true
-    const res = await findSubMenuListByOpen({columnId: id})
+  const column = columnListDataOld.value.find((x) => x.id == id);
+  console.log(column);
+  console.log(column.type);
+  console.log(column.type == "2");
+  if (column.type == "2") {
+    subFlag.value = false;
+  } else {
+    subFlag.value = true;
+    const res = await findSubMenuListByOpen({ columnId: id });
     subColumnListData.value = res.data;
   }
 };
 
-
-
-getMenuList()
-getDictlist()
-getList()
-
+getMenuList();
+getDictlist();
+getList();
 </script>
 
 <style lang="scss" scoped>
 .tenant {
   padding: 20px;
-  .delete-btn{
+  .delete-btn {
     margin-top: 10px;
     margin-left: 25px;
   }

+ 84 - 93
src/views/XMHJC/product/category/index.vue

@@ -2,19 +2,12 @@
   <div class="productCategory">
     <!-- <Banner /> -->
     <div class="content">
-      <byTable
-        :source="sourceList.data"
-        :pagination="sourceList.pagination"
-        :config="config"
-        :loading="loading"
-        highlight-current-row
-        :action-list="[
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row :action-list="[
           {
             text: '添加类目',
             action: () => openModal('add'),
           },
-        ]"
-        @get-list="getList">
+        ]" @get-list="getList">
         <template #slotName="{ item }">
           {{ item.createTime }}
         </template>
@@ -25,27 +18,17 @@
         <template #categoryCover>
           <el-row style="width: 100%">
             <el-col :span="24">
-              <el-form-item  prop="categoryCover">
-                <el-upload
-                    class="avatar-uploader"
-                    action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-                    :data="uploadDataOne"
-                    :show-file-list="false"
-                    accept=".gif, .jpeg, .jpg, .png"
-                    :on-success="categoryCoverListSuccess"
-                    :before-upload="uploadFileOne">
-                  <el-image
-                      v-if="formData.data.categoryCoverList && formData.data.categoryCoverList.length > 0"
-                      :src="formData.data.categoryCoverList[0].fileUrl"
-                      fit="scale-down"
-                      class="avatar" />
-                  <el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
+              <el-form-item prop="categoryCover">
+                <el-upload class="avatar-uploader" :action="uploadUrl" :data="uploadDataOne" :show-file-list="false" accept=".gif, .jpeg, .jpg, .png"
+                           :on-success="categoryCoverListSuccess" :before-upload="uploadFileOne">
+                  <el-image v-if="formData.data.categoryCoverList && formData.data.categoryCoverList.length > 0"
+                            :src="formData.data.categoryCoverList[0].fileUrl" fit="scale-down" class="avatar" />
+                  <el-icon v-else class="avatar-uploader-icon">
+                    <Plus />
+                  </el-icon>
                 </el-upload>
-                <el-button
-                    class="delete-btn"
-                    type="danger"
-                    v-if="formData.data.categoryCoverList && formData.data.categoryCoverList.length > 0"
-                    @click="formData.data.categoryCoverList = []">
+                <el-button class="delete-btn" type="danger" v-if="formData.data.categoryCoverList && formData.data.categoryCoverList.length > 0"
+                           @click="formData.data.categoryCoverList = []">
                   删除
                 </el-button>
               </el-form-item>
@@ -53,46 +36,36 @@
           </el-row>
         </template>
 
-
         <template #subCategorySlot>
-          <el-row style="width: 100%;margin-bottom: 10px"   v-for="(row, index) in formData.data.subCategoryList" ref="sort">
-            <el-col :span="6" >
-              <el-form-item
-                  :prop="'subCategoryList.' + index + '.name'"
-                  :rules="rules.subName"
-                  prop="name"
-                  style="margin: 8px 0 8px 0">
+          <el-row style="width: 100%;margin-bottom: 10px" v-for="(row, index) in formData.data.subCategoryList" ref="sort">
+            <el-col :span="6">
+              <el-form-item :prop="'subCategoryList.' + index + '.name'" :rules="rules.subName" prop="name" style="margin: 8px 0 8px 0">
                 <el-input v-model="row.name" placeholder="请输入子类目" :controls="false" />
               </el-form-item>
             </el-col>
-            <el-col :span="5"  style="margin-left: 8px;">
-              <el-form-item
-                  :prop="'subCategoryList.' + index + '.code'"
-                  prop="name"
-                  style="margin: 8px 0 8px 0">
+            <el-col :span="5" style="margin-left: 8px;">
+              <el-form-item :prop="'subCategoryList.' + index + '.code'" prop="name" style="margin: 8px 0 8px 0">
                 <el-input v-model="row.code" placeholder="请输入子类目编号" :controls="false" />
               </el-form-item>
             </el-col>
-            <el-col :span="5" >
-              <el-form-item
-                  :prop="'subCategoryList.' + index + '.status'"
-                  :rules="rules.subStatus" style="margin-left: 8px;transform: translateY(8px)"
-                  prop="status">
-                <el-select v-model="row.status" placeholder="请选择状态" >
+            <el-col :span="5">
+              <el-form-item :prop="'subCategoryList.' + index + '.status'" :rules="rules.subStatus"
+                            style="margin-left: 8px;transform: translateY(8px)" prop="status">
+                <el-select v-model="row.status" placeholder="请选择状态">
                   <el-option v-for="item in enableStatus" :key="item.value" :label="item.label" :value="item.value" />
                 </el-select>
               </el-form-item>
             </el-col>
-            <el-col :span="5" >
-              <el-form-item
-                  :prop="'subCategoryList.' + index + '.sort'"
-                  :rules="rules.subSort" style="margin-left: 8px;transform: translateY(8px)"
-                  prop="sort">
-                <el-input-number v-model="row.sort" placeholder="请输入排序" :precision="0" :max="999"  :min="0" />
+            <el-col :span="5">
+              <el-form-item :prop="'subCategoryList.' + index + '.sort'" :rules="rules.subSort" style="margin-left: 8px;transform: translateY(8px)"
+                            prop="sort">
+                <el-input-number v-model="row.sort" placeholder="请输入排序" :precision="0" :max="999" :min="0" />
               </el-form-item>
             </el-col>
-            <el-col :span="2" >
-              <el-icon style="margin-left: 8px; color: red; cursor: pointer; transform: translateY(10px)" @click="clickDelete(index)"><Delete /></el-icon>
+            <el-col :span="2">
+              <el-icon style="margin-left: 8px; color: red; cursor: pointer; transform: translateY(10px)" @click="clickDelete(index)">
+                <Delete />
+              </el-icon>
             </el-col>
           </el-row>
           <el-row style="width: 100%">
@@ -116,8 +89,8 @@ import { ElMessage, ElMessageBox } from "element-plus";
 import byTable from "@/components/byTable/index.vue";
 import byForm from "@/components/byForm/index.vue";
 import { computed, ref } from "vue";
-import {getDictOneByXmhjc} from "@/api/XMHJC/common";
-import {getFileList, getFileStr} from "../../../../api/XMHJC/common";
+import { getDictOneByXmhjc } from "@/api/XMHJC/common";
+import { getFileList, getFileStr } from "../../../../api/XMHJC/common";
 const loading = ref(false);
 const submitLoading = ref(false);
 const enableStatus = ref([]);
@@ -137,7 +110,9 @@ let rules = ref({
   sort: [{ required: true, message: "请输入排序", trigger: "blur" }],
 
   subName: [{ required: true, message: "请输入子类目", trigger: "blur" }],
-  subStatus: [{ required: true, message: "请输入子类目启用状态", trigger: "blur" }],
+  subStatus: [
+    { required: true, message: "请输入子类目启用状态", trigger: "blur" },
+  ],
   subSort: [{ required: true, message: "请输入子类目排序", trigger: "blur" }],
 });
 const { proxy } = getCurrentInstance();
@@ -222,7 +197,7 @@ const config = computed(() => {
 let formData = reactive({
   data: {},
   treeData: [],
-  subCategoryList:[],
+  subCategoryList: [],
   honorCoverList: [],
 });
 const formOption = reactive({
@@ -283,14 +258,16 @@ const formConfig = computed(() => {
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
-    proxy.post("/productCategory/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("/productCategory/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);
+    });
 };
 const openModal = () => {
   dialogVisible.value = true;
@@ -300,18 +277,23 @@ const openModal = () => {
 const submitForm = () => {
   byform.value.handleSubmit((valid) => {
     if (!formData.data.categoryCoverList) {
-      ElMessage({message: "请上传图片",type: "error",});
-      return
+      ElMessage({ message: "请上传图片", type: "error" });
+      return;
     }
 
-
-    if (!(formData.data.subCategoryList && formData.data.subCategoryList.length > 0)) {
-      ElMessage({message: "请填写子类目",type: "error",});
-      return
+    if (
+      !(
+        formData.data.subCategoryList &&
+        formData.data.subCategoryList.length > 0
+      )
+    ) {
+      ElMessage({ message: "请填写子类目", type: "error" });
+      return;
     }
 
     submitLoading.value = true;
-    proxy.post("/productCategory/" + modalType.value, formData.data)
+    proxy
+      .post("/productCategory/" + modalType.value, formData.data)
       .then((res) => {
         ElMessage({
           message: modalType.value == "add" ? "添加成功" : "编辑成功",
@@ -329,7 +311,7 @@ const submitForm = () => {
 
 const changeStatus = (row) => {
   modalType.value = "edit";
-  let status = row.status=='1' ? 0 : 1;
+  let status = row.status == "1" ? 0 : 1;
   proxy.post("/productCategory/detail", { id: row.id }).then((res) => {
     res.status = status;
     formData.data = res;
@@ -339,13 +321,15 @@ const changeStatus = (row) => {
       type: "warning",
     }).then(() => {
       // 更新状态
-      proxy.post("/productCategory/" + modalType.value, formData.data).then((res) => {
-        ElMessage({
-          message: "操作成功",
-          type: "success",
+      proxy
+        .post("/productCategory/" + modalType.value, formData.data)
+        .then((res) => {
+          ElMessage({
+            message: "操作成功",
+            type: "success",
+          });
+          getList();
         });
-        getList();
-      });
     });
   });
 };
@@ -357,7 +341,10 @@ const getDetail = async (row) => {
     formData.data = res;
     dialogVisible.value = true;
   });
-  const resFile = await getFileList({businessIdList: [formData.data.id], fileType: 1})
+  const resFile = await getFileList({
+    businessIdList: [formData.data.id],
+    fileType: 1,
+  });
   formData.data.categoryCoverList = resFile.data[formData.data.id];
 };
 
@@ -370,12 +357,12 @@ const del = (row) => {
     type: "warning",
   }).then(() => {
     proxy.post("/productCategory/delete", { id: row.id }).then((res) => {
-        ElMessage({
-          message: "操作成功",
-          type: "success",
-        });
-        getList();
+      ElMessage({
+        message: "操作成功",
+        type: "success",
       });
+      getList();
+    });
   });
 };
 //获取字典
@@ -389,11 +376,16 @@ const getDictlist = async () => {
 
 //添加子类目
 const clickAddSubCategory = () => {
-  if (formData.data.subCategoryList && formData.data.subCategoryList.length > 0) {
-    const  sort = formData.data.subCategoryList[formData.data.subCategoryList.length-1].sort
+  if (
+    formData.data.subCategoryList &&
+    formData.data.subCategoryList.length > 0
+  ) {
+    const sort =
+      formData.data.subCategoryList[formData.data.subCategoryList.length - 1]
+        .sort;
     formData.data.subCategoryList.push({
       name: "",
-      sort: sort+10,
+      sort: sort + 10,
     });
   } else {
     formData.data.subCategoryList = [
@@ -405,7 +397,6 @@ const clickAddSubCategory = () => {
   }
 };
 
-
 const uploadDataOne = ref({});
 const uploadFileOne = async (file) => {
   const res = await getFileStr({ fileName: file.name });
@@ -436,7 +427,7 @@ getDictlist();
 <style lang="scss" scoped>
 .tenant {
   padding: 20px;
-  .delete-btn{
+  .delete-btn {
     margin-top: 10px;
     margin-left: 25px;
   }

+ 454 - 479
src/views/XMHJC/product/info/index.vue

@@ -1,121 +1,81 @@
 <template xmlns="http://www.w3.org/1999/html">
-    <div class="productInfo">
-        <!-- <Banner /> -->
-        <div class="content">
-            <byTable
-                    :source="sourceList.data"
-                    :pagination="sourceList.pagination"
-                    :config="config"
-                    :loading="loading"
-                    highlight-current-row
-                    :action-list="[
+  <div class="productInfo">
+    <!-- <Banner /> -->
+    <div class="content">
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row :action-list="[
           {
             text: '添加产品',
             action: () => openModal('add'),
           },
-        ]"
-                    @get-list="getList">
-                <template #slotName="{ item }">
-                    {{ item.createTime }}
-                </template>
-            </byTable>
-        </div>
-        <el-dialog z-index="1100"  :title="modalType == 'add' ? '新增' : '编辑'" v-model="dialogVisible" width="80%" v-loading="loading">
-            <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
-                <template #coverUrl>
-                    <el-row style="width: 100%">
-                        <el-col :span="6">
-                            <el-form-item prop="coverUrl">
-                                <el-upload
-                                        class="avatar-uploader"
-                                        action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-                                        :data="coverUrlOne"
-                                        :show-file-list="false"
-                                        accept=".gif, .jpeg, .jpg, .png"
-                                        :on-success="coverUrlSuccess"
-                                        :before-upload="uploadCoverUrl">
-                                    <el-image
-                                            v-if="formData.data.coverUrlList && formData.data.coverUrlList.length > 0"
-                                            :src="formData.data.coverUrlList[0].fileUrl"
-                                            fit="scale-down"
-                                            class="avatar" />
-                                    <el-icon v-else class="uploader-icon"><Plus /></el-icon>
-                                </el-upload>
-                                <el-button
-                                        class="delete-btn"
-                                        type="danger"
-                                        v-if="formData.data.coverUrlList && formData.data.coverUrlList.length > 0"
-                                        @click="formData.data.coverUrlList = []">
-                                    删除
-                                </el-button>
-                            </el-form-item>
-                        </el-col>
-                    </el-row>
-                </template>
-                <template #contentImg>
-                    <el-row style="width: 100%">
-                        <el-form-item  prop="contentImg">
-                            <el-col :span="6" v-for="(item,index) in formData.data.contentImgList" style="padding: 0 10px">
-                                <el-image
-                                        :src="item.fileUrl"
-                                        fit="scale-down" style="height: 150px"
-                                        class="avatar"  :fit="fit"/> <br/>
-                                <el-button
-                                        class="delete-btn"
-                                        type="danger"
-                                        @click="deleteContentImg(index) ">
-                                    删除
-                                </el-button>
-                            </el-col>
-                            <el-col :span="6">
-                                <el-upload
-                                        class="avatar-uploader"
-                                        action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-                                        :data="contentImgOne"
-                                        :show-file-list="false"
-                                        multiple="true"
-                                        accept=".gif, .jpeg, .jpg, .png"
-                                        :on-success="contentImgSuccess"
-                                        :before-upload="uploadContentImg">
-                                        <el-icon  class="uploader-icon"><Plus /></el-icon>
-                                </el-upload>
-                            </el-col>
-                        </el-form-item>
-                    </el-row>
-                </template>
-                <template #content>
-                    <div style="width: 100%" v-if="dialogVisible">
-                        <TinymceEditor
-                                :value="formData.data.content"
-                                @updateValue="updateContentValue"
-                                ref="contentEditor"
-                        />
-                    </div>
-                </template>
-
-                <template #category>
-                    <div>
-                        <el-select
-                                v-model="formData.data.categoryId"
-                                placeholder="请选择产品类目"
-                                @change="(val) => getSubCategoryList(val, true)"
-                        >
-                            <el-option
-                                    v-for="item in productCategoryList"
-                                    :label="item.label"
-                                    :value="item.value"
-                            >
-                            </el-option>
-                        </el-select>
-                    </div>
-                </template>
-            </byForm>
-            <template #footer>
-                <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-                <el-button type="primary" v-no-double-click="submitForm" size="large" :loading="submitLoading">确 定</el-button>
-            </template>
-        </el-dialog>
+        ]" @get-list="getList">
+        <template #slotName="{ item }">
+          {{ item.createTime }}
+        </template>
+      </byTable>
     </div>
+    <el-dialog z-index="1100" :title="modalType == 'add' ? '新增' : '编辑'" v-model="dialogVisible" width="80%" v-loading="loading">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
+        <template #coverUrl>
+          <el-row style="width: 100%">
+            <el-col :span="6">
+              <el-form-item prop="coverUrl">
+                <el-upload class="avatar-uploader" :action="uploadUrl" :data="coverUrlOne" :show-file-list="false" accept=".gif, .jpeg, .jpg, .png"
+                           :on-success="coverUrlSuccess" :before-upload="uploadCoverUrl">
+                  <el-image v-if="formData.data.coverUrlList && formData.data.coverUrlList.length > 0" :src="formData.data.coverUrlList[0].fileUrl"
+                            fit="scale-down" class="avatar" />
+                  <el-icon v-else class="uploader-icon">
+                    <Plus />
+                  </el-icon>
+                </el-upload>
+                <el-button class="delete-btn" type="danger" v-if="formData.data.coverUrlList && formData.data.coverUrlList.length > 0"
+                           @click="formData.data.coverUrlList = []">
+                  删除
+                </el-button>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </template>
+        <template #contentImg>
+          <el-row style="width: 100%">
+            <el-form-item prop="contentImg">
+              <el-col :span="6" v-for="(item,index) in formData.data.contentImgList" style="padding: 0 10px">
+                <el-image :src="item.fileUrl" fit="scale-down" style="height: 150px" class="avatar" :fit="fit" /> <br />
+                <el-button class="delete-btn" type="danger" @click="deleteContentImg(index) ">
+                  删除
+                </el-button>
+              </el-col>
+              <el-col :span="6">
+                <el-upload class="avatar-uploader" :action="uploadUrl" :data="contentImgOne" :show-file-list="false" multiple="true"
+                           accept=".gif, .jpeg, .jpg, .png" :on-success="contentImgSuccess" :before-upload="uploadContentImg">
+                  <el-icon class="uploader-icon">
+                    <Plus />
+                  </el-icon>
+                </el-upload>
+              </el-col>
+            </el-form-item>
+          </el-row>
+        </template>
+        <template #content>
+          <div style="width: 100%" v-if="dialogVisible">
+            <TinymceEditor :value="formData.data.content" @updateValue="updateContentValue" ref="contentEditor" />
+          </div>
+        </template>
+
+        <template #category>
+          <div>
+            <el-select v-model="formData.data.categoryId" placeholder="请选择产品类目" @change="(val) => getSubCategoryList(val, true)">
+              <el-option v-for="item in productCategoryList" :label="item.label" :value="item.value">
+              </el-option>
+            </el-select>
+          </div>
+        </template>
+      </byForm>
+      <template #footer>
+        <el-button @click="dialogVisible = false" size="large">取 消</el-button>
+        <el-button type="primary" v-no-double-click="submitForm" size="large" :loading="submitLoading">确 定</el-button>
+      </template>
+    </el-dialog>
+  </div>
 </template>
 
 <script setup>
@@ -123,10 +83,10 @@
 import { ElMessage, ElMessageBox } from "element-plus";
 import byTable from "@/components/byTable/index.vue";
 import byForm from "@/components/byForm/index.vue";
-import {getDictOneByXmhjc, getFileList, getFileStr} from "@/api/XMHJC/common";
+import { getDictOneByXmhjc, getFileList, getFileStr } from "@/api/XMHJC/common";
 import { computed, ref } from "vue";
 import TinymceEditor from "@/components/Editor/TinymceEditor.vue";
-import {isNullOrUndefined} from "@tinymce/tinymce-vue/lib/es2015/main/ts/Utils";
+import { isNullOrUndefined } from "@tinymce/tinymce-vue/lib/es2015/main/ts/Utils";
 const loading = ref(false);
 const submitLoading = ref(false);
 const specDict = ref([]);
@@ -136,455 +96,470 @@ const productSubCategoryList = ref([]);
 const productSubCategoryALLList = ref([]);
 const contentType = ref([]);
 const sourceList = ref({
-    data: [],
-    pagination: {
-        total: 3,
-        pageNum: 1,
-        pageSize: 10,
-    },
+  data: [],
+  pagination: {
+    total: 3,
+    pageNum: 1,
+    pageSize: 10,
+  },
 });
 let dialogVisible = ref(false);
 let fit = ref("contain");
 let modalType = ref("add");
 let rules = ref({
-    categoryId: [{ required: true, message: "请选择产品类目" }],
-    title: [{ required: true, message: "请输入标题" }],
-    subheading: [{ required: true, message: "请输入副标题" }],
-    name: [{ required: true, message: "请上传封面图片" }],
-    specList: [{ required: true, message: "请选择产品规格" }],
-    status: [{ required: true, message: "请选择启用状态" }],
-    contentType: [{ required: true, message: "请选择详情类型" }],
+  categoryId: [{ required: true, message: "请选择产品类目" }],
+  title: [{ required: true, message: "请输入标题" }],
+  subheading: [{ required: true, message: "请输入副标题" }],
+  name: [{ required: true, message: "请上传封面图片" }],
+  specList: [{ required: true, message: "请选择产品规格" }],
+  status: [{ required: true, message: "请选择启用状态" }],
+  contentType: [{ required: true, message: "请选择详情类型" }],
 });
 const { proxy } = getCurrentInstance();
 const config = computed(() => {
-    return [
-        {
-            attrs: {
-                label: "产品类目",
-                prop: "categoryId",
-            },
-            render(val) {
-                return proxy.dictValueLabel(val, productCategoryList.value);
-            },
-        },
-        {
-            attrs: {
-                label: "产品子类目",
-                prop: "subCategoryId",
-
-            },
-            render(val) {
-                return proxy.dictValueLabel(val, productSubCategoryALLList.value);
-            },
-        },
-        {
-            attrs: {
-                label: "产品名称",
-                prop: "title",
-            },
-        },
-        {
-            attrs: {
-                label: "副标题",
-                prop: "subheading",
-            },
-        },
-        {
+  return [
+    {
+      attrs: {
+        label: "产品类目",
+        prop: "categoryId",
+      },
+      render(val) {
+        return proxy.dictValueLabel(val, productCategoryList.value);
+      },
+    },
+    {
+      attrs: {
+        label: "产品子类目",
+        prop: "subCategoryId",
+      },
+      render(val) {
+        return proxy.dictValueLabel(val, productSubCategoryALLList.value);
+      },
+    },
+    {
+      attrs: {
+        label: "产品名称",
+        prop: "title",
+      },
+    },
+    {
+      attrs: {
+        label: "副标题",
+        prop: "subheading",
+      },
+    },
+    {
+      attrs: {
+        label: "产品规格",
+        prop: "spec",
+      },
+      render(val) {
+        return convertDict(val);
+      },
+    },
+    {
+      attrs: {
+        label: "排序",
+        prop: "sort",
+        align: "center",
+      },
+    },
+    {
+      attrs: {
+        label: "状态",
+        prop: "status",
+      },
+      render(type) {
+        return proxy.dictValueLabel(type, enableStatus.value);
+      },
+    },
+    {
+      attrs: {
+        label: "操作",
+        width: "200",
+        align: "right",
+      },
+      // 渲染 el-button,一般用在最后一列。
+      renderHTML(row) {
+        return [
+          {
             attrs: {
-                label: "产品规格",
-                prop: "spec",
+              label: row.status == 1 ? "禁用" : "启用",
+              type: "primary",
+              text: true,
             },
-            render(val) {
-                return convertDict(val);
-            },
-        },
-        {
-            attrs: {
-                label: "排序",
-                prop: "sort",
-                align: "center",
+            el: "button",
+            click() {
+              changeStatus(row);
             },
-        },
-        {
+          },
+          {
             attrs: {
-                label: "状态",
-                prop: "status",
+              label: "编辑",
+              type: "primary",
+              text: true,
             },
-            render(type) {
-                return proxy.dictValueLabel(type, enableStatus.value);
+            el: "button",
+            click() {
+              getDetail(row);
             },
-        },
-        {
+          },
+          {
             attrs: {
-                label: "操作",
-                width: "200",
-                align: "right",
+              label: "删除",
+              type: "danger",
+              text: true,
             },
-            // 渲染 el-button,一般用在最后一列。
-            renderHTML(row) {
-                return [
-                    {
-                        attrs: {
-                            label: row.status == 1 ? "禁用" : "启用",
-                            type: "primary",
-                            text: true,
-                        },
-                        el: "button",
-                        click() {
-                            changeStatus(row);
-                        },
-                    },
-                    {
-                        attrs: {
-                            label: "编辑",
-                            type: "primary",
-                            text: true,
-                        },
-                        el: "button",
-                        click() {
-                            getDetail(row);
-                        },
-                    },
-                    {
-                        attrs: {
-                            label: "删除",
-                            type: "danger",
-                            text: true,
-                        },
-                        el: "button",
-                        click() {
-                            del(row);
-                        },
-                    },
-                ];
+            el: "button",
+            click() {
+              del(row);
             },
-        },
-    ];
+          },
+        ];
+      },
+    },
+  ];
 });
 
 let formData = reactive({
-    data: {
-        "contentImgList": [],
-        "coverUrlList": [],
-        "categoryId": "",
-    },
+  data: {
+    contentImgList: [],
+    coverUrlList: [],
+    categoryId: "",
+  },
 });
 const formOption = reactive({
-    inline: true,
-    labelWidth: 100,
-    itemWidth: 100,
-    rules: [],
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  rules: [],
 });
 const byform = ref(null);
 const formConfig = computed(() => {
-    return [
-        {
-            type: "slot",
-            slotName: "category",
-            prop: "categoryId",
-            label: "产品类目",
-            itemWidth: 100,
-            data: productCategoryList.value,
-        },
-        {
-            type: "select",
-            prop: "subCategoryId",
-            label: "产品子类目",
-            itemWidth: 100,
-            data: productSubCategoryList.value,
-        },
-        {
-            type: "input",
-            prop: "title",
-            label: "标题",
-            itemWidth: 100,
-            maxlength: 30,
-            itemType: "text",
-        },
-        {
-            type: "input",
-            prop: "subheading",
-            label: "副标题",
-            maxlength: 50,
-        },
-        {
-            type: "slot",
-            slotName: "coverUrl",
-            prop: "coverUrl",
-            label: "封面图片",
-        },
-        {
-            type: "select",
-            prop: "specList",
-            label: "产品规格",
-            itemWidth: 100,
-            multiple: true,
-            data: specDict.value,
-            style: {
-                width: "50%",
-            },
-            disabled: false,
-        },
-        {
-            label: "启用状态",
-            prop: "status",
-            type: "select",
-            data: enableStatus.value,
-        },
-        {
-            type: "input",
-            itemType: "number",
-            prop: "sort",
-            label: "排序",
-            style: {
-                width: "50%",
-            },
-        },
-        // {
-        //     type: "select",
-        //     prop: "contentType",
-        //     label: "详情类型",
-        //     data: contentType.value,
-        //     required: true,
-        // },
-        {
-            type: "slot",
-            prop: "contentImgList",
-            slotName: "contentImg",
-            label: "详情图片",
-
-        },
-        {
-            type: "slot",
-            prop: "content",
-            slotName: "content",
-            label: "详情内容",
-            // isShow: formData.data.contentType == "2"
-        },
-    ];
+  return [
+    {
+      type: "slot",
+      slotName: "category",
+      prop: "categoryId",
+      label: "产品类目",
+      itemWidth: 100,
+      data: productCategoryList.value,
+    },
+    {
+      type: "select",
+      prop: "subCategoryId",
+      label: "产品子类目",
+      itemWidth: 100,
+      data: productSubCategoryList.value,
+    },
+    {
+      type: "input",
+      prop: "title",
+      label: "标题",
+      itemWidth: 100,
+      maxlength: 30,
+      itemType: "text",
+    },
+    {
+      type: "input",
+      prop: "subheading",
+      label: "副标题",
+      maxlength: 50,
+    },
+    {
+      type: "slot",
+      slotName: "coverUrl",
+      prop: "coverUrl",
+      label: "封面图片",
+    },
+    {
+      type: "select",
+      prop: "specList",
+      label: "产品规格",
+      itemWidth: 100,
+      multiple: true,
+      data: specDict.value,
+      style: {
+        width: "50%",
+      },
+      disabled: false,
+    },
+    {
+      label: "启用状态",
+      prop: "status",
+      type: "select",
+      data: enableStatus.value,
+    },
+    {
+      type: "input",
+      itemType: "number",
+      prop: "sort",
+      label: "排序",
+      style: {
+        width: "50%",
+      },
+    },
+    // {
+    //     type: "select",
+    //     prop: "contentType",
+    //     label: "详情类型",
+    //     data: contentType.value,
+    //     required: true,
+    // },
+    {
+      type: "slot",
+      prop: "contentImgList",
+      slotName: "contentImg",
+      label: "详情图片",
+    },
+    {
+      type: "slot",
+      prop: "content",
+      slotName: "content",
+      label: "详情内容",
+      // isShow: formData.data.contentType == "2"
+    },
+  ];
 });
 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;
-        sourceList.value.pagination.total = message.total;
-        setTimeout(() => {
-            loading.value = false;
-        }, 200);
+  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;
+      sourceList.value.pagination.total = message.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
     });
 };
 const openModal = () => {
-    dialogVisible.value = true;
-    modalType.value = "add";
-    formData.data = {};
+  dialogVisible.value = true;
+  modalType.value = "add";
+  formData.data = {};
 };
 const submitForm = () => {
-    byform.value.handleSubmit((valid) => {
-        if(!(formData.data.coverUrlList && formData.data.coverUrlList.length > 0)){
-            ElMessage.error("请上传封面图片");
-            return;
-        }
-        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();
-        }).catch((err) => {
-            submitLoading.value = false;
+  byform.value.handleSubmit((valid) => {
+    if (
+      !(formData.data.coverUrlList && formData.data.coverUrlList.length > 0)
+    ) {
+      ElMessage.error("请上传封面图片");
+      return;
+    }
+    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();
+      })
+      .catch((err) => {
+        submitLoading.value = false;
+      });
+  });
 };
 
 const changeStatus = (row) => {
-    modalType.value = "edit";
-    let status = row.status=='1' ? 0 : 1;
-    proxy.post("/productInfo/detail", { id: row.id }).then((res) => {
-        res.status = status;
-        formData.data = res;
-        ElMessageBox.confirm("你是否确认此操作?", "提示", {
-            confirmButtonText: "确定",
-            cancelButtonText: "取消",
-            type: "warning",
-        }).then(() => {
-            // 删除
-            proxy.post("/productInfo/" + modalType.value, formData.data).then((res) => {
-                ElMessage({
-                    message: "操作成功",
-                    type: "success",
-                });
-                getList();
-            });
+  modalType.value = "edit";
+  let status = row.status == "1" ? 0 : 1;
+  proxy.post("/productInfo/detail", { id: row.id }).then((res) => {
+    res.status = status;
+    formData.data = res;
+    ElMessageBox.confirm("你是否确认此操作?", "提示", {
+      confirmButtonText: "确定",
+      cancelButtonText: "取消",
+      type: "warning",
+    }).then(() => {
+      // 删除
+      proxy
+        .post("/productInfo/" + modalType.value, formData.data)
+        .then((res) => {
+          ElMessage({
+            message: "操作成功",
+            type: "success",
+          });
+          getList();
         });
     });
+  });
 };
 
 //编辑详情
 const getDetail = async (row) => {
-    modalType.value = "edit";
-    proxy.post("/productInfo/detail", { id: row.id }).then(async (res) => {
-      formData.data = res;
-      await getFileList({businessIdList: [res.id], fileType: 1}).then((resFile1) => {
+  modalType.value = "edit";
+  proxy.post("/productInfo/detail", { id: row.id }).then(async (res) => {
+    formData.data = res;
+    await getFileList({ businessIdList: [res.id], fileType: 1 }).then(
+      (resFile1) => {
         formData.data.coverUrlList = resFile1.data[res.id];
-      });
-      await getFileList({businessIdList: [res.id], fileType: 2}).then((resFile1) => {
+      }
+    );
+    await getFileList({ businessIdList: [res.id], fileType: 2 }).then(
+      (resFile1) => {
         formData.data.contentImgList = resFile1.data[res.id];
-      });
-      dialogVisible.value = true;
-      getSubCategoryList(res.categoryId, false);
-    });
+      }
+    );
+    dialogVisible.value = true;
+    getSubCategoryList(res.categoryId, false);
+  });
 };
 
 //删除
 const del = (row) => {
-    modalType.value = "edit";
-    ElMessageBox.confirm("你是否确认此操作?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-    }).then(() => {
-        proxy.post("/productInfo/delete", { id: row.id }).then((res) => {
-            ElMessage({
-                message: "操作成功",
-                type: "success",
-            });
-            getList();
-        });
+  modalType.value = "edit";
+  ElMessageBox.confirm("你是否确认此操作?", "提示", {
+    confirmButtonText: "确定",
+    cancelButtonText: "取消",
+    type: "warning",
+  }).then(() => {
+    proxy.post("/productInfo/delete", { id: row.id }).then((res) => {
+      ElMessage({
+        message: "操作成功",
+        type: "success",
+      });
+      getList();
     });
+  });
 };
 
 const convertDict = (val) => {
-    if(val != null && val != undefined && val != 'undefined'){
-        let arr = val.split(",");
-        let str = '';
-        arr.forEach((item) => {
-            specDict.value.forEach((item2) => {
-                if(item == item2.value){
-                    str += item2.label + ",";
-                }
-            });
-        });
-        return str.substring(0, str.length - 1);
-    }
-    return "";
+  if (val != null && val != undefined && val != "undefined") {
+    let arr = val.split(",");
+    let str = "";
+    arr.forEach((item) => {
+      specDict.value.forEach((item2) => {
+        if (item == item2.value) {
+          str += item2.label + ",";
+        }
+      });
+    });
+    return str.substring(0, str.length - 1);
+  }
+  return "";
 };
 
-
 //获取字典
 const getDictlist = async () => {
-    const res = await getDictOneByXmhjc(["enable_status", "product_spec", "product_content_type"]);
-    enableStatus.value = res["enable_status"].map((x) => ({
-        label: x.dictValue,
-        value: x.dictKey,
-    }));
-    specDict.value = res["product_spec"].map((x) => ({
-        label: x.dictValue,
-        value: x.dictKey,
-    }));
-    contentType.value = res["product_content_type"].map((x) => ({
-        label: x.dictValue,
-        value: x.dictKey,
-    }));
-    proxy.post("/productCategory/list", {
-            pageNum: 1,
-            pageSize: 99999,
-            status: 1,
-        }).then((res) => {
-            productCategoryList.value = res.data.map((x) => ({
-                label: x.name,
-                value: x.id,
-            }));
-        });
-    proxy.post("/productSubCategory/page", {
-        pageNum: 1,
-        pageSize: 99999,
-        status: 1,
-    }).then((res) => {
-        productSubCategoryALLList.value = res.rows.map((x) => ({
-            label: x.name,
-            value: x.id,
-        }));
+  const res = await getDictOneByXmhjc([
+    "enable_status",
+    "product_spec",
+    "product_content_type",
+  ]);
+  enableStatus.value = res["enable_status"].map((x) => ({
+    label: x.dictValue,
+    value: x.dictKey,
+  }));
+  specDict.value = res["product_spec"].map((x) => ({
+    label: x.dictValue,
+    value: x.dictKey,
+  }));
+  contentType.value = res["product_content_type"].map((x) => ({
+    label: x.dictValue,
+    value: x.dictKey,
+  }));
+  proxy
+    .post("/productCategory/list", {
+      pageNum: 1,
+      pageSize: 99999,
+      status: 1,
+    })
+    .then((res) => {
+      productCategoryList.value = res.data.map((x) => ({
+        label: x.name,
+        value: x.id,
+      }));
+    });
+  proxy
+    .post("/productSubCategory/page", {
+      pageNum: 1,
+      pageSize: 99999,
+      status: 1,
+    })
+    .then((res) => {
+      productSubCategoryALLList.value = res.rows.map((x) => ({
+        label: x.name,
+        value: x.id,
+      }));
     });
 };
 
-
 //富文本相关
 const updateContentValue = (val) => {
-    formData.data.content = val;
+  formData.data.content = val;
 };
 
-
 //图片上传相关
 const contentImgOne = ref({});
 const uploadContentImg = async (file) => {
-    const res = await getFileStr({ fileName: file.name });
-    contentImgOne.value = res.data.uploadBody;
-    file.id = res.data.id;
-    file.fileName = res.data.fileName;
-    file.fileUrl = res.data.fileUrl;
-    return true;
+  const res = await getFileStr({ fileName: file.name });
+  contentImgOne.value = res.data.uploadBody;
+  file.id = res.data.id;
+  file.fileName = res.data.fileName;
+  file.fileUrl = res.data.fileUrl;
+  return true;
 };
 
 const contentImgSuccess = (response, uploadFile) => {
-    if (isNullOrUndefined(formData.data.contentImgList)){
-      formData.data.contentImgList = []
-    }
-    formData.data.contentImgList.push(
-        {
-          id: uploadFile.raw.id,
-          fileName: uploadFile.raw.fileName,
-          fileUrl: uploadFile.raw.fileUrl,
-        }
-    )
+  if (isNullOrUndefined(formData.data.contentImgList)) {
+    formData.data.contentImgList = [];
+  }
+  formData.data.contentImgList.push({
+    id: uploadFile.raw.id,
+    fileName: uploadFile.raw.fileName,
+    fileUrl: uploadFile.raw.fileUrl,
+  });
 };
 const deleteContentImg = (index) => {
-    formData.data.contentImgList.splice(index,1)
+  formData.data.contentImgList.splice(index, 1);
 };
 
 const coverUrlOne = ref({});
 const uploadCoverUrl = async (file) => {
-    const res = await getFileStr({ fileName: file.name });
-    coverUrlOne.value = res.data.uploadBody;
-    file.id = res.data.id;
-    file.fileName = res.data.fileName;
-    file.fileUrl = res.data.fileUrl;
-    return true;
+  const res = await getFileStr({ fileName: file.name });
+  coverUrlOne.value = res.data.uploadBody;
+  file.id = res.data.id;
+  file.fileName = res.data.fileName;
+  file.fileUrl = res.data.fileUrl;
+  return true;
 };
 
 const coverUrlSuccess = (response, uploadFile) => {
-    formData.data.coverUrlList = [
-        {
-            id: uploadFile.raw.id,
-            fileName: uploadFile.raw.fileName,
-            fileUrl: uploadFile.raw.fileUrl,
-        },
-    ];
+  formData.data.coverUrlList = [
+    {
+      id: uploadFile.raw.id,
+      fileName: uploadFile.raw.fileName,
+      fileUrl: uploadFile.raw.fileUrl,
+    },
+  ];
 };
 
 const getSubCategoryList = (val, isClean) => {
-    if(isClean){
-        formData.data.subCategoryId = "";
-    }
-    productSubCategoryList.value = [];
-    proxy.post("/productSubCategory/page", {
-        pageNum: 1,
-        pageSize: 99999,
-        status: 1,
-        categoryId: val,
-    }).then((res) => {
-        productSubCategoryList.value = res.rows.map((x) => ({
-            label: x.name,
-            value: x.id,
-        }));
+  if (isClean) {
+    formData.data.subCategoryId = "";
+  }
+  productSubCategoryList.value = [];
+  proxy
+    .post("/productSubCategory/page", {
+      pageNum: 1,
+      pageSize: 99999,
+      status: 1,
+      categoryId: val,
+    })
+    .then((res) => {
+      productSubCategoryList.value = res.rows.map((x) => ({
+        label: x.name,
+        value: x.id,
+      }));
     });
 };
 
-
 getDictlist();
 getList();
 </script>

+ 23 - 123
src/views/connect/E-mail/mail/com/mailWrite.vue

@@ -1,13 +1,7 @@
 <template>
   <div v-loading="loading" style="padding: 10px">
     <div style="width: 100%">
-      <el-form
-        ref="submit"
-        :model="formData.data"
-        :rules="rules"
-        label-width="65px"
-        labelPosition="right"
-      >
+      <el-form ref="submit" :model="formData.data" :rules="rules" label-width="65px" labelPosition="right">
         <el-form-item>
           <el-button type="primary" @click="handleSend()"> 发 送 </el-button>
         </el-form-item>
@@ -24,11 +18,7 @@
                 @keyup.enter.native="handleAdd(10)"
               >
               </el-autocomplete> -->
-              <el-input
-                v-model="formData.data.to"
-                placeholder="请输入"
-                @keyup.enter.native="handleAdd(10)"
-              />
+              <el-input v-model="formData.data.to" placeholder="请输入" @keyup.enter.native="handleAdd(10)" />
               <!-- <el-button
                 type="primary"
                 @click="handleAdd(10)"
@@ -38,32 +28,16 @@
               > -->
             </div>
             <div style="margin-top: 15px" v-if="to && to.length > 0">
-              <el-tag
-                style="margin-right: 10px"
-                class="ml-2"
-                type="info"
-                v-for="(item, index) in to"
-                :key="index"
-                closable
-                @close="handleClose(index, 10)"
-                >{{ item.address }}</el-tag
-              >
+              <el-tag style="margin-right: 10px" class="ml-2" type="info" v-for="(item, index) in to" :key="index" closable
+                      @close="handleClose(index, 10)">{{ item.address }}</el-tag>
             </div>
           </div>
         </el-form-item>
         <el-form-item label="" prop="">
           <div style="display: flex">
-            <span
-              style="color: #666666; cursor: pointer"
-              @click="showcc = !showcc"
-              >抄送</span
-            >
+            <span style="color: #666666; cursor: pointer" @click="showcc = !showcc">抄送</span>
             <span style="color: ##dddddd; margin: 0 8px">|</span>
-            <span
-              style="color: #666666; cursor: pointer"
-              @click="showbcc = !showbcc"
-              >密送</span
-            >
+            <span style="color: #666666; cursor: pointer" @click="showbcc = !showbcc">密送</span>
           </div>
         </el-form-item>
         <el-form-item label="抄送人" prop="cc" v-if="showcc">
@@ -79,11 +53,7 @@
                 @keyup.enter.native="handleAdd(20)"
               >
               </el-autocomplete> -->
-              <el-input
-                v-model="formData.data.cc"
-                placeholder="请输入"
-                @keyup.enter.native="handleAdd(20)"
-              />
+              <el-input v-model="formData.data.cc" placeholder="请输入" @keyup.enter.native="handleAdd(20)" />
               <!-- <el-button
                 type="primary"
                 @click="handleAdd(20)"
@@ -93,16 +63,8 @@
               > -->
             </div>
             <div style="margin-top: 15px" v-if="cc && cc.length > 0">
-              <el-tag
-                style="margin-right: 10px"
-                class="ml-2"
-                type="info"
-                v-for="(item, index) in cc"
-                :key="index"
-                closable
-                @close="handleClose(index, 20)"
-                >{{ item.address }}</el-tag
-              >
+              <el-tag style="margin-right: 10px" class="ml-2" type="info" v-for="(item, index) in cc" :key="index" closable
+                      @close="handleClose(index, 20)">{{ item.address }}</el-tag>
             </div>
           </div>
         </el-form-item>
@@ -118,11 +80,7 @@
                 @keyup.enter.native="handleAdd(30)"
               >
               </el-autocomplete> -->
-              <el-input
-                v-model="formData.data.bcc"
-                placeholder="请输入"
-                @keyup.enter.native="handleAdd(30)"
-              />
+              <el-input v-model="formData.data.bcc" placeholder="请输入" @keyup.enter.native="handleAdd(30)" />
               <!-- <el-button
                 type="primary"
                 @click="handleAdd(30)"
@@ -132,16 +90,8 @@
               > -->
             </div>
             <div style="margin-top: 15px" v-if="bcc && bcc.length > 0">
-              <el-tag
-                style="margin-right: 10px"
-                class="ml-2"
-                type="info"
-                v-for="(item, index) in bcc"
-                :key="index"
-                closable
-                @close="handleClose(index, 30)"
-                >{{ item.address }}</el-tag
-              >
+              <el-tag style="margin-right: 10px" class="ml-2" type="info" v-for="(item, index) in bcc" :key="index" closable
+                      @close="handleClose(index, 30)">{{ item.address }}</el-tag>
             </div>
           </div>
         </el-form-item>
@@ -150,45 +100,21 @@
         </el-form-item>
         <el-form-item label="附件">
           <div style="width: 100%">
-            <el-upload
-              v-model:fileList="fileList"
-              class="upload-demo"
-              action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-              :data="uploadData"
-              drag
-              multiple
-              :show-file-list="false"
-              :before-upload="handleBeforeUpload"
-            >
+            <el-upload v-model:fileList="fileList" class="upload-demo" :action="uploadUrl" :data="uploadData" drag multiple :show-file-list="false"
+                       :before-upload="handleBeforeUpload">
               <div>
-                <img
-                  src="@/assets/images/icon_attachment.svg"
-                  class="att-img"
-                  fit="scale-down"
-                />
-                <span style="padding-left: 8px"
-                  >将文件拖到此处,或<span style="color: #409eff"
-                    >点击上传</span
-                  ></span
-                >
+                <img src="@/assets/images/icon_attachment.svg" class="att-img" fit="scale-down" />
+                <span style="padding-left: 8px">将文件拖到此处,或<span style="color: #409eff">点击上传</span></span>
               </div>
             </el-upload>
             <div class="att-box" v-if="fileListCopy && fileListCopy.length > 0">
               <div v-for="(itemFile, index) in fileListCopy" :key="index">
                 <div class="att-item">
-                  <img
-                    src="@/assets/images/icon_dz.svg"
-                    style="cursor: pointer"
-                    fit="scale-down"
-                  />
+                  <img src="@/assets/images/icon_dz.svg" style="cursor: pointer" fit="scale-down" />
                   <div class="att-name">
                     {{ itemFile.fileName }}
                   </div>
-                  <img
-                    src="@/assets/images/icon_delete.svg"
-                    class="att-img"
-                    fit="scale-down"
-                  />
+                  <img src="@/assets/images/icon_delete.svg" class="att-img" fit="scale-down" />
                 </div>
               </div>
             </div>
@@ -201,11 +127,7 @@
               @updateValue="updateContent"
               ref="contentEditor"
             /> -->
-            <TinymceEditor
-              :value="formData.data.content"
-              @updateValue="updateContent"
-              ref="contentEditor"
-            />
+            <TinymceEditor :value="formData.data.content" @updateValue="updateContent" ref="contentEditor" />
           </div>
         </el-form-item>
         <!-- <el-form-item label="发件人" prop="replyTo">
@@ -219,37 +141,15 @@
         <el-row>
           <el-col :span="6">
             <el-form-item label="发件人" prop="replyTo">
-              <el-select
-                v-model="formData.data.replyTo"
-                filterable
-                placeholder="请选择"
-                style="width: 100%"
-                @change="handleChangeReply"
-              >
-                <el-option
-                  v-for="item in userMailList"
-                  :key="item.mailUser"
-                  :label="item.mailUser"
-                  :value="item.mailUser"
-                />
+              <el-select v-model="formData.data.replyTo" filterable placeholder="请选择" style="width: 100%" @change="handleChangeReply">
+                <el-option v-for="item in userMailList" :key="item.mailUser" :label="item.mailUser" :value="item.mailUser" />
               </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="6">
             <el-form-item label="签  名:">
-              <el-select
-                v-model="formData.data.templateId"
-                filterable
-                placeholder="请选择"
-                style="width: 100%"
-                @change="handleChangeTemplate"
-              >
-                <el-option
-                  v-for="item in templateList"
-                  :key="item.id"
-                  :label="item.templateName"
-                  :value="item.id"
-                />
+              <el-select v-model="formData.data.templateId" filterable placeholder="请选择" style="width: 100%" @change="handleChangeTemplate">
+                <el-option v-for="item in templateList" :key="item.id" :label="item.templateName" :value="item.id" />
               </el-select>
             </el-form-item>
           </el-col>

+ 161 - 149
src/views/customer/file/index.vue

@@ -3,20 +3,12 @@
     <div style="padding: 20px; background: #fff; margin-bottom: 20px">
       <el-button type="primary" style="margin-left: 10px" @click="openModal()">添加客户</el-button>
     </div>
-    <byTable
-      :source="sourceList.data"
-      :pagination="sourceList.pagination"
-      :config="config"
-      :loading="loading"
-      :selectConfig="selectConfig"
-      :statConfig="statConfig"
-      highlight-current-row
-      @moreSearch="moreSearch"
-      @get-list="getList"
-      ref="table">
+    <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
+             :statConfig="statConfig" highlight-current-row @moreSearch="moreSearch" @get-list="getList" ref="table">
       <template #isTop="{ item }">
         <div>
-          <img style="cursor: pointer; width: 20px; transform: translateY(5px)" :src="'/img/isTop.png'" @click="deleteTop(item)" v-if="item.isTop === 1" />
+          <img style="cursor: pointer; width: 20px; transform: translateY(5px)" :src="'/img/isTop.png'" @click="deleteTop(item)"
+               v-if="item.isTop === 1" />
           <img style="cursor: pointer; width: 20px; transform: translateY(5px)" :src="'/img/noTop.png'" @click="addTop(item)" v-else />
         </div>
       </template>
@@ -36,16 +28,13 @@
             {{ dictValueLabel(tag, customerTag) }}
           </el-tag>
           <template v-if="item.tag.length !== customerTag.length">
-            <el-select
-              v-if="item.addTagShow"
-              v-model="addTag"
-              style="width: 100%"
-              @change="
+            <el-select v-if="item.addTagShow" v-model="addTag" style="width: 100%" @change="
                 (val) => {
                   return changeTag(val, item);
                 }
               ">
-              <el-option v-for="tag in customerTag" :key="tag.value" :label="tag.label" :value="tag.value" :disabled="judgeTagSelect(item.tag, tag.value)" />
+              <el-option v-for="tag in customerTag" :key="tag.value" :label="tag.label" :value="tag.value"
+                         :disabled="judgeTagSelect(item.tag, tag.value)" />
             </el-select>
             <el-tag style="cursor: pointer" type="success" @click="showSelect(item)" v-else> + </el-tag>
           </template>
@@ -55,19 +44,18 @@
         <div :class="'getWidth' + item.id" style="width: 100%">
           <div style="width: 100%; display: flex">
             <template v-if="item.customerFollowRecordsList && item.customerFollowRecordsList.length > 0">
-              <div
-                :style="
+              <div :style="
                   index > 2
                     ? 'line-height: 32px; margin-right: 8px; padding: 0 8px; background-color: #eeeeee; border-radius: 4px; cursor: pointer; display: none'
                     : 'line-height: 32px; margin-right: 8px; padding: 0 8px; background-color: #eeeeee; border-radius: 4px; cursor: pointer'
-                "
-                v-for="(record, index) in item.customerFollowRecordsList"
-                :key="record.id">
+                " v-for="(record, index) in item.customerFollowRecordsList" :key="record.id">
                 <el-popover placement="bottom" :width="300" trigger="hover" @show="recordShow(record)">
                   <template #reference>
                     <div>
                       <span v-if="record.date">{{ record.date.substr(0, 10) }}</span>
-                      <el-icon style="margin-left: 8px; transform: translateY(2px)" @click="deleteFollow(record)"><DeleteFilled /></el-icon>
+                      <el-icon style="margin-left: 8px; transform: translateY(2px)" @click="deleteFollow(record)">
+                        <DeleteFilled />
+                      </el-icon>
                     </div>
                   </template>
                   <template #default>
@@ -87,18 +75,10 @@
                           <span v-if="record.type === '10'">跟进记录:报价单总金额 </span>
                           <span v-if="record.type === '20'">跟进记录:合同总金额 </span>
                           <span>{{ moneyFormat(record.amount, 2) }}</span>
-                          <span
-                            v-if="record.type === '10' && record.code"
-                            :class="{ 'code-class': isHave }"
-                            @click="isHaveOne ? handlePushRoute(record) : () => {}"
-                            >({{ record.code }})</span
-                          >
-                          <span
-                            v-if="record.type === '20' && record.contractCode"
-                            :class="{ 'code-class': isHaveOne }"
-                            @click="isHave ? handlePushRoute(record) : () => {}"
-                            >({{ record.contractCode }})</span
-                          >
+                          <span v-if="record.type === '10' && record.code" :class="{ 'code-class': isHave }"
+                                @click="isHaveOne ? handlePushRoute(record) : () => {}">({{ record.code }})</span>
+                          <span v-if="record.type === '20' && record.contractCode" :class="{ 'code-class': isHaveOne }"
+                                @click="isHave ? handlePushRoute(record) : () => {}">({{ record.contractCode }})</span>
                         </div>
                       </div>
                       <div style="margin: 8px 0; display: flex" v-if="record.fileList && record.fileList.length > 0">
@@ -113,10 +93,8 @@
                   </template>
                 </el-popover>
               </div>
-              <div
-                style="line-height: 32px; margin-right: 8px; padding: 0 8px; background-color: #eeeeee; border-radius: 4px; cursor: pointer"
-                @click="clickMore(item)"
-                v-if="item.customerFollowRecordsList.length >= 3">
+              <div style="line-height: 32px; margin-right: 8px; padding: 0 8px; background-color: #eeeeee; border-radius: 4px; cursor: pointer"
+                   @click="clickMore(item)" v-if="item.customerFollowRecordsList.length >= 3">
                 更多
               </div>
             </template>
@@ -131,25 +109,17 @@
           <el-row style="width: 100%">
             <el-col :span="8">
               <el-form-item prop="countryId">
-                <el-select
-                  v-model="formData.data.countryId"
-                  placeholder="国家"
-                  filterable
-                  @change="(val) => getCityData(val, '20', true)"
-                  :no-match-text="'无数据,请联系管理员添加'">
-                  <el-option v-for="item in countryData" :key="item.id" :label="item.chineseName + '(' + item.name + ')'" :value="item.id"> </el-option>
+                <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => getCityData(val, '20', true)"
+                           :no-match-text="'无数据,请联系管理员添加'">
+                  <el-option v-for="item in countryData" :key="item.id" :label="item.chineseName + '(' + item.name + ')'" :value="item.id">
+                  </el-option>
                 </el-select>
               </el-form-item>
             </el-col>
             <el-col :span="8">
               <el-form-item prop="provinceName">
-                <selectCity
-                  placeholder="省/洲"
-                  @change="(val) => getCityData(val, '30', true)"
-                  addressId="provinceId"
-                  addressName="provinceName"
-                  v-model="formData.data"
-                  :data="provinceData">
+                <selectCity placeholder="省/洲" @change="(val) => getCityData(val, '30', true)" addressId="provinceId" addressName="provinceName"
+                            v-model="formData.data" :data="provinceData">
                 </selectCity>
               </el-form-item>
             </el-col>
@@ -253,7 +223,8 @@
     </el-dialog>
 
     <el-dialog title="分配" v-if="openAllocation" v-model="openAllocation" width="300">
-      <byForm :formConfig="formConfigAllocation" :formOption="formOption" v-model="formAllocation.data" :rules="rulesAllocation" ref="allocation"> </byForm>
+      <byForm :formConfig="formConfigAllocation" :formOption="formOption" v-model="formAllocation.data" :rules="rulesAllocation" ref="allocation">
+      </byForm>
       <template #footer>
         <el-button @click="openAllocation = false" size="large">取 消</el-button>
         <el-button type="primary" @click="submitAllocation()" size="large">确 定</el-button>
@@ -264,13 +235,8 @@
       <byForm :formConfig="formConfigAFollow" :formOption="formOption" v-model="formFollow.data" :rules="rulesFollow" ref="follow">
         <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-upload v-model:fileList="fileList" :action="uploadUrl" :data="uploadData" multiple :before-upload="uploadFile"
+                       :on-preview="onPreviewFile">
               <el-button type="primary">文件上传</el-button>
             </el-upload>
           </div>
@@ -306,15 +272,10 @@
                       <span v-if="record.type === '10'">跟进记录:报价单总金额 </span>
                       <span v-if="record.type === '20'">跟进记录:合同总金额 </span>
                       <span>{{ moneyFormat(record.amount, 2) }}</span>
-                      <span v-if="record.type === '10' && record.code" :class="{ 'code-class': isHave }" @click="isHaveOne ? handlePushRoute(record) : () => {}"
-                        >({{ record.code }})</span
-                      >
-                      <span
-                        v-if="record.type === '20' && record.contractCode"
-                        :class="{ 'code-class': isHaveOne }"
-                        @click="isHave ? handlePushRoute(record) : () => {}"
-                        >({{ record.contractCode }})</span
-                      >
+                      <span v-if="record.type === '10' && record.code" :class="{ 'code-class': isHave }"
+                            @click="isHaveOne ? handlePushRoute(record) : () => {}">({{ record.code }})</span>
+                      <span v-if="record.type === '20' && record.contractCode" :class="{ 'code-class': isHaveOne }"
+                            @click="isHave ? handlePushRoute(record) : () => {}">({{ record.contractCode }})</span>
                     </div>
                   </div>
                   <div style="margin: 8px 0; display: flex" v-if="record.fileList && record.fileList.length > 0">
@@ -342,48 +303,38 @@
           <el-row style="width: 100%">
             <el-col :span="8">
               <el-form-item prop="countryId">
-                <el-select
-                  v-model="sourceList.pagination.countryId"
-                  placeholder="国家"
-                  clearable
-                  filterable
-                  @change="(val) => getCitySearchData(val, '20', true)">
-                  <el-option v-for="item in countryData" :key="item.id" :label="item.chineseName + '(' + item.name + ')'" :value="item.id"> </el-option>
+                <el-select v-model="sourceList.pagination.countryId" placeholder="国家" clearable filterable
+                           @change="(val) => getCitySearchData(val, '20', true)">
+                  <el-option v-for="item in countryData" :key="item.id" :label="item.chineseName + '(' + item.name + ')'" :value="item.id">
+                  </el-option>
                 </el-select>
               </el-form-item>
             </el-col>
             <el-col :span="8">
               <el-form-item prop="provinceName">
-                <selectCity
-                  placeholder="省/洲"
-                  @change="(val) => getCitySearchData(val, '30', true)"
-                  addressId="provinceId"
-                  addressName="provinceName"
-                  v-model="sourceList.pagination"
-                  :data="provinceSearchData">
+                <selectCity placeholder="省/洲" @change="(val) => getCitySearchData(val, '30', true)" addressId="provinceId" addressName="provinceName"
+                            v-model="sourceList.pagination" :data="provinceSearchData">
                 </selectCity>
               </el-form-item>
             </el-col>
             <el-col :span="8">
               <el-form-item prop="cityName">
-                <selectCity placeholder="城市" addressId="cityId" addressName="cityName" v-model="sourceList.pagination" :data="citySearchData"></selectCity>
+                <selectCity placeholder="城市" addressId="cityId" addressName="cityName" v-model="sourceList.pagination" :data="citySearchData">
+                </selectCity>
               </el-form-item>
             </el-col>
           </el-row>
         </template>
         <template #tags>
           <div style="width: 100%">
-            <el-tag style="margin-right: 8px" type="info" v-for="(tag, index) in sourceList.pagination.tags" closable :key="index" @close="tagSearchClose(tag)">
+            <el-tag style="margin-right: 8px" type="info" v-for="(tag, index) in sourceList.pagination.tags" closable :key="index"
+                    @close="tagSearchClose(tag)">
               {{ dictValueLabel(tag, customerTag) }}
             </el-tag>
             <template v-if="sourceList.pagination.tags.length !== customerTag.length">
               <el-select v-if="addTagSearchShow" v-model="addSearchTag" style="margin-top: 8px" @change="changeSearchTag">
-                <el-option
-                  v-for="tag in customerTag"
-                  :key="tag.value"
-                  :label="tag.label"
-                  :value="tag.value"
-                  :disabled="judgeTagSelect(sourceList.pagination.tags, tag.value)" />
+                <el-option v-for="tag in customerTag" :key="tag.value" :label="tag.label" :value="tag.value"
+                           :disabled="judgeTagSelect(sourceList.pagination.tags, tag.value)" />
               </el-select>
               <el-tag style="cursor: pointer" type="info" @click="addTagSearchShow = true" v-else> + </el-tag>
             </template>
@@ -684,11 +635,15 @@ const config = computed(() => {
             },
             el: "button",
             click() {
-              ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
-                confirmButtonText: "确定",
-                cancelButtonText: "取消",
-                type: "warning",
-              }).then(() => {
+              ElMessageBox.confirm(
+                "此操作将永久删除该数据, 是否继续?",
+                "提示",
+                {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning",
+                }
+              ).then(() => {
                 proxy
                   .post("/customer/delete", {
                     id: row.id,
@@ -925,7 +880,10 @@ const openModal = () => {
   dialogVisible.value = true;
 };
 const clickAddPerson = () => {
-  if (formData.data.customerUserList && formData.data.customerUserList.length > 0) {
+  if (
+    formData.data.customerUserList &&
+    formData.data.customerUserList.length > 0
+  ) {
     formData.data.customerUserList.push({
       name: "",
       email: "",
@@ -965,24 +923,29 @@ const submitFollow = () => {
     } else {
       formFollow.data.fileList = [];
     }
-    proxy.post("/customerFollowRecords/" + modalType.value, formFollow.data).then(
-      () => {
-        ElMessage({
-          message: modalType.value == "add" ? "添加成功" : "编辑成功",
-          type: "success",
-        });
-        openFollow.value = false;
-        getList();
-      },
-      (err) => {
-        console.log(err);
-      }
-    );
+    proxy
+      .post("/customerFollowRecords/" + modalType.value, formFollow.data)
+      .then(
+        () => {
+          ElMessage({
+            message: modalType.value == "add" ? "添加成功" : "编辑成功",
+            type: "success",
+          });
+          openFollow.value = false;
+          getList();
+        },
+        (err) => {
+          console.log(err);
+        }
+      );
   });
 };
 const submitForm = () => {
   submit.value.handleSubmit(() => {
-    if (formData.data.customerUserList && formData.data.customerUserList.length > 0) {
+    if (
+      formData.data.customerUserList &&
+      formData.data.customerUserList.length > 0
+    ) {
       formData.data.tag = formData.data.tags.join(",");
       submitLoading.value = true;
       proxy.post("/customer/" + modalType.value, formData.data).then(
@@ -1007,24 +970,31 @@ const submitForm = () => {
   });
 };
 const getDict = () => {
-  proxy.getDictOne(["customer_tag", "customer_source", "customer_status", "contact_type"]).then((res) => {
-    customerTag.value = res["customer_tag"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    customerSource.value = res["customer_source"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    customerStatus.value = res["customer_status"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    contactType.value = res["contact_type"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-  });
+  proxy
+    .getDictOne([
+      "customer_tag",
+      "customer_source",
+      "customer_status",
+      "contact_type",
+    ])
+    .then((res) => {
+      customerTag.value = res["customer_tag"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      customerSource.value = res["customer_source"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      customerStatus.value = res["customer_status"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      contactType.value = res["contact_type"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+    });
   proxy
     .get("/tenantUser/list", {
       pageNum: 1,
@@ -1151,14 +1121,24 @@ const getContent = (item) => {
   if (item.type === "10") {
     return "跟进记录: " + "报价单总金额 " + proxy.moneyFormat(item.amount, 2);
   } else if (item.type === "20") {
-    return "跟进记录: " + "合同总金额 " + proxy.moneyFormat(item.amount, 2) + ` (${item.contractCode}) `;
+    return (
+      "跟进记录: " +
+      "合同总金额 " +
+      proxy.moneyFormat(item.amount, 2) +
+      ` (${item.contractCode}) `
+    );
   }
 };
 const recordShow = (item) => {
-  if (!(item.fileList && item.fileList.length > 0) && JSON.stringify(item.fileList) !== "[]") {
-    proxy.post("/fileInfo/getList", { businessIdList: [item.id] }).then((fileObj) => {
-      item.fileList = fileObj[item.id] || [];
-    });
+  if (
+    !(item.fileList && item.fileList.length > 0) &&
+    JSON.stringify(item.fileList) !== "[]"
+  ) {
+    proxy
+      .post("/fileInfo/getList", { businessIdList: [item.id] })
+      .then((fileObj) => {
+        item.fileList = fileObj[item.id] || [];
+      });
   }
 };
 const openFile = (path) => {
@@ -1189,8 +1169,19 @@ const clickMore = (item) => {
       })
       .then((fileObj) => {
         for (let i = 0; i < res.rows.length; i++) {
-          recordList.value[parseInt(i + (queryParams.value.pageNum - 1) * queryParams.value.pageSize)].fileList =
-            fileObj[recordList.value[parseInt(i + (queryParams.value.pageNum - 1) * queryParams.value.pageSize)].id] || [];
+          recordList.value[
+            parseInt(
+              i + (queryParams.value.pageNum - 1) * queryParams.value.pageSize
+            )
+          ].fileList =
+            fileObj[
+              recordList.value[
+                parseInt(
+                  i +
+                    (queryParams.value.pageNum - 1) * queryParams.value.pageSize
+                )
+              ].id
+            ] || [];
         }
       });
   });
@@ -1201,7 +1192,10 @@ const infiniteScroll = () => {
   clickMore();
 };
 const judgeTotal = () => {
-  if (queryParams.value.pageNum * queryParams.value.pageSize >= queryParams.value.total) {
+  if (
+    queryParams.value.pageNum * queryParams.value.pageSize >=
+    queryParams.value.total
+  ) {
     return true;
   }
   return false;
@@ -1263,14 +1257,19 @@ const statisticalData = ref({
   customerList: [],
 });
 const obtainStatisticalData = () => {
-  proxy.post("/customer/sourceStatistics", sourceList.value.paginationTwo).then((res) => {
-    statisticalData.value = res;
-  });
+  proxy
+    .post("/customer/sourceStatistics", sourceList.value.paginationTwo)
+    .then((res) => {
+      statisticalData.value = res;
+    });
 };
 obtainStatisticalData();
 const getNum = (val) => {
   let num = 0;
-  if (statisticalData.value.customerList && statisticalData.value.customerList.length > 0) {
+  if (
+    statisticalData.value.customerList &&
+    statisticalData.value.customerList.length > 0
+  ) {
     statisticalData.value.customerList.map((item) => {
       if (sourceList.value.paginationTwo.statisticsType === 1) {
         if (item.source === val) {
@@ -1387,7 +1386,8 @@ const addTagSearchShow = ref(false);
 let copySearch = ref({});
 const moreSearch = () => {
   if (sourceList.value.pagination.tag) {
-    sourceList.value.pagination.tags = sourceList.value.pagination.tag.split(",");
+    sourceList.value.pagination.tags =
+      sourceList.value.pagination.tag.split(",");
   } else {
     sourceList.value.pagination.tags = [];
   }
@@ -1400,8 +1400,12 @@ const cancelSearch = () => {
   openSearch.value = false;
 };
 const submitSearch = () => {
-  if (sourceList.value.pagination.tags && sourceList.value.pagination.tags.length > 0) {
-    sourceList.value.pagination.tag = sourceList.value.pagination.tags.join(",");
+  if (
+    sourceList.value.pagination.tags &&
+    sourceList.value.pagination.tags.length > 0
+  ) {
+    sourceList.value.pagination.tag =
+      sourceList.value.pagination.tags.join(",");
   } else {
     sourceList.value.pagination.tag = "";
   }
@@ -1411,7 +1415,9 @@ const submitSearch = () => {
   getList();
 };
 const tagSearchClose = (val) => {
-  sourceList.value.pagination.tags = sourceList.value.pagination.tags.filter((item) => item !== val);
+  sourceList.value.pagination.tags = sourceList.value.pagination.tags.filter(
+    (item) => item !== val
+  );
 };
 const changeSearchTag = (val) => {
   sourceList.value.pagination.tags.push(val);
@@ -1421,12 +1427,18 @@ const changeSearchTag = (val) => {
 
 // 判断当前用户有无销售合同页面权限
 const isHave = ref(false);
-if (useUserStore().permissions && useUserStore().permissions.includes("contract")) {
+if (
+  useUserStore().permissions &&
+  useUserStore().permissions.includes("contract")
+) {
   isHave.value = true;
 }
 // 判断当前用户有无报价单页面权限
 const isHaveOne = ref(false);
-if (useUserStore().permissions && useUserStore().permissions.includes("priceSheet")) {
+if (
+  useUserStore().permissions &&
+  useUserStore().permissions.includes("priceSheet")
+) {
   isHaveOne.value = true;
 }
 

+ 150 - 144
src/views/customer/highseas/index.vue

@@ -4,20 +4,12 @@
       <el-button type="primary" style="margin-left: 10px" @click="openModal()">添加客户</el-button>
     </div>
 
-    <byTable
-      :source="sourceList.data"
-      :pagination="sourceList.pagination"
-      :config="config"
-      :loading="loading"
-      :selectConfig="selectConfig"
-      :statConfig="statConfig"
-      highlight-current-row
-      @moreSearch="moreSearch"
-      @get-list="getList"
-      ref="table">
+    <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
+             :statConfig="statConfig" highlight-current-row @moreSearch="moreSearch" @get-list="getList" ref="table">
       <template #isTop="{ item }">
         <div>
-          <img style="cursor: pointer; width: 20px; transform: translateY(5px)" :src="'/img/isTop.png'" @click="deleteTop(item)" v-if="item.isTop === 1" />
+          <img style="cursor: pointer; width: 20px; transform: translateY(5px)" :src="'/img/isTop.png'" @click="deleteTop(item)"
+               v-if="item.isTop === 1" />
           <img style="cursor: pointer; width: 20px; transform: translateY(5px)" :src="'/img/noTop.png'" @click="addTop(item)" v-else />
         </div>
       </template>
@@ -37,16 +29,13 @@
             {{ dictValueLabel(tag, customerTag) }}
           </el-tag>
           <template v-if="item.tag.length !== customerTag.length">
-            <el-select
-              v-if="item.addTagShow"
-              v-model="addTag"
-              style="width: 100%"
-              @change="
+            <el-select v-if="item.addTagShow" v-model="addTag" style="width: 100%" @change="
                 (val) => {
                   return changeTag(val, item);
                 }
               ">
-              <el-option v-for="tag in customerTag" :key="tag.value" :label="tag.label" :value="tag.value" :disabled="judgeTagSelect(item.tag, tag.value)" />
+              <el-option v-for="tag in customerTag" :key="tag.value" :label="tag.label" :value="tag.value"
+                         :disabled="judgeTagSelect(item.tag, tag.value)" />
             </el-select>
             <el-tag style="cursor: pointer" type="success" @click="showSelect(item)" v-else> + </el-tag>
           </template>
@@ -56,19 +45,18 @@
         <div :class="'getWidth' + item.id" style="width: 100%">
           <div style="width: 100%; display: flex">
             <template v-if="item.customerFollowRecordsList && item.customerFollowRecordsList.length > 0">
-              <div
-                :style="
+              <div :style="
                   index > 2
                     ? 'line-height: 32px; margin-right: 8px; padding: 0 8px; background-color: #eeeeee; border-radius: 4px; cursor: pointer; display: none'
                     : 'line-height: 32px; margin-right: 8px; padding: 0 8px; background-color: #eeeeee; border-radius: 4px; cursor: pointer'
-                "
-                v-for="(record, index) in item.customerFollowRecordsList"
-                :key="record.id">
+                " v-for="(record, index) in item.customerFollowRecordsList" :key="record.id">
                 <el-popover placement="bottom" :width="300" trigger="hover" @show="recordShow(record)">
                   <template #reference>
                     <div>
                       <span v-if="record.date">{{ record.date.substr(0, 10) }}</span>
-                      <el-icon style="margin-left: 8px; transform: translateY(2px)" @click="deleteFollow(record)"><DeleteFilled /></el-icon>
+                      <el-icon style="margin-left: 8px; transform: translateY(2px)" @click="deleteFollow(record)">
+                        <DeleteFilled />
+                      </el-icon>
                     </div>
                   </template>
                   <template #default>
@@ -88,18 +76,10 @@
                           <span v-if="record.type === '10'">跟进记录:报价单总金额 </span>
                           <span v-if="record.type === '20'">跟进记录:合同总金额 </span>
                           <span>{{ moneyFormat(record.amount, 2) }}</span>
-                          <span
-                            v-if="record.type === '10' && record.code"
-                            :class="{ 'code-class': isHave }"
-                            @click="isHaveOne ? handlePushRoute(record) : () => {}"
-                            >({{ record.code }})</span
-                          >
-                          <span
-                            v-if="record.type === '20' && record.contractCode"
-                            :class="{ 'code-class': isHaveOne }"
-                            @click="isHave ? handlePushRoute(record) : () => {}"
-                            >({{ record.contractCode }})</span
-                          >
+                          <span v-if="record.type === '10' && record.code" :class="{ 'code-class': isHave }"
+                                @click="isHaveOne ? handlePushRoute(record) : () => {}">({{ record.code }})</span>
+                          <span v-if="record.type === '20' && record.contractCode" :class="{ 'code-class': isHaveOne }"
+                                @click="isHave ? handlePushRoute(record) : () => {}">({{ record.contractCode }})</span>
                         </div>
                       </div>
                       <div style="margin: 8px 0; display: flex" v-if="record.fileList && record.fileList.length > 0">
@@ -114,10 +94,8 @@
                   </template>
                 </el-popover>
               </div>
-              <div
-                style="line-height: 32px; margin-right: 8px; padding: 0 8px; background-color: #eeeeee; border-radius: 4px; cursor: pointer"
-                @click="clickMore(item)"
-                v-if="item.customerFollowRecordsList.length >= 3">
+              <div style="line-height: 32px; margin-right: 8px; padding: 0 8px; background-color: #eeeeee; border-radius: 4px; cursor: pointer"
+                   @click="clickMore(item)" v-if="item.customerFollowRecordsList.length >= 3">
                 更多
               </div>
             </template>
@@ -132,25 +110,17 @@
           <el-row style="width: 100%">
             <el-col :span="8">
               <el-form-item prop="countryId">
-                <el-select
-                  v-model="formData.data.countryId"
-                  placeholder="国家"
-                  filterable
-                  @change="(val) => getCityData(val, '20', true)"
-                  :no-match-text="'无数据,请联系管理员添加'">
-                  <el-option v-for="item in countryData" :key="item.id" :label="item.chineseName + '(' + item.name + ')'" :value="item.id"> </el-option>
+                <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => getCityData(val, '20', true)"
+                           :no-match-text="'无数据,请联系管理员添加'">
+                  <el-option v-for="item in countryData" :key="item.id" :label="item.chineseName + '(' + item.name + ')'" :value="item.id">
+                  </el-option>
                 </el-select>
               </el-form-item>
             </el-col>
             <el-col :span="8">
               <el-form-item prop="provinceName">
-                <selectCity
-                  placeholder="省/洲"
-                  @change="(val) => getCityData(val, '30', true)"
-                  addressId="provinceId"
-                  addressName="provinceName"
-                  v-model="formData.data"
-                  :data="provinceData">
+                <selectCity placeholder="省/洲" @change="(val) => getCityData(val, '30', true)" addressId="provinceId" addressName="provinceName"
+                            v-model="formData.data" :data="provinceData">
                 </selectCity>
               </el-form-item>
             </el-col>
@@ -257,13 +227,8 @@
       <byForm :formConfig="formConfigAFollow" :formOption="formOption" v-model="formFollow.data" :rules="rulesFollow" ref="follow">
         <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-upload v-model:fileList="fileList" :action="uploadUrl" :data="uploadData" multiple :before-upload="uploadFile"
+                       :on-preview="onPreviewFile">
               <el-button type="primary">文件上传</el-button>
             </el-upload>
           </div>
@@ -299,15 +264,10 @@
                       <span v-if="record.type === '10'">跟进记录:报价单总金额 </span>
                       <span v-if="record.type === '20'">跟进记录:合同总金额 </span>
                       <span>{{ moneyFormat(record.amount, 2) }}</span>
-                      <span v-if="record.type === '10' && record.code" :class="{ 'code-class': isHave }" @click="isHaveOne ? handlePushRoute(record) : () => {}"
-                        >({{ record.code }})</span
-                      >
-                      <span
-                        v-if="record.type === '20' && record.contractCode"
-                        :class="{ 'code-class': isHaveOne }"
-                        @click="isHave ? handlePushRoute(record) : () => {}"
-                        >({{ record.contractCode }})</span
-                      >
+                      <span v-if="record.type === '10' && record.code" :class="{ 'code-class': isHave }"
+                            @click="isHaveOne ? handlePushRoute(record) : () => {}">({{ record.code }})</span>
+                      <span v-if="record.type === '20' && record.contractCode" :class="{ 'code-class': isHaveOne }"
+                            @click="isHave ? handlePushRoute(record) : () => {}">({{ record.contractCode }})</span>
                     </div>
                   </div>
                   <div style="margin: 8px 0; display: flex" v-if="record.fileList && record.fileList.length > 0">
@@ -335,49 +295,38 @@
           <el-row style="width: 100%">
             <el-col :span="8">
               <el-form-item prop="countryId">
-                <el-select
-                  v-model="sourceList.pagination.countryId"
-                  placeholder="国家"
-                  clearable
-                  filterable
-                  @change="(val) => getCitySearchData(val, '20', true)"
-                  :no-match-text="'无数据,请联系管理员添加'">
-                  <el-option v-for="item in countryData" :key="item.id" :label="item.chineseName + '(' + item.name + ')'" :value="item.id"> </el-option>
+                <el-select v-model="sourceList.pagination.countryId" placeholder="国家" clearable filterable
+                           @change="(val) => getCitySearchData(val, '20', true)" :no-match-text="'无数据,请联系管理员添加'">
+                  <el-option v-for="item in countryData" :key="item.id" :label="item.chineseName + '(' + item.name + ')'" :value="item.id">
+                  </el-option>
                 </el-select>
               </el-form-item>
             </el-col>
             <el-col :span="8">
               <el-form-item prop="provinceName">
-                <selectCity
-                  placeholder="省/洲"
-                  @change="(val) => getCitySearchData(val, '30', true)"
-                  addressId="provinceId"
-                  addressName="provinceName"
-                  v-model="sourceList.pagination"
-                  :data="provinceSearchData">
+                <selectCity placeholder="省/洲" @change="(val) => getCitySearchData(val, '30', true)" addressId="provinceId" addressName="provinceName"
+                            v-model="sourceList.pagination" :data="provinceSearchData">
                 </selectCity>
               </el-form-item>
             </el-col>
             <el-col :span="8">
               <el-form-item prop="cityName">
-                <selectCity placeholder="城市" addressId="cityId" addressName="cityName" v-model="sourceList.pagination" :data="citySearchData"></selectCity>
+                <selectCity placeholder="城市" addressId="cityId" addressName="cityName" v-model="sourceList.pagination" :data="citySearchData">
+                </selectCity>
               </el-form-item>
             </el-col>
           </el-row>
         </template>
         <template #tags>
           <div style="width: 100%">
-            <el-tag style="margin-right: 8px" type="info" v-for="(tag, index) in sourceList.pagination.tags" closable :key="index" @close="tagSearchClose(tag)">
+            <el-tag style="margin-right: 8px" type="info" v-for="(tag, index) in sourceList.pagination.tags" closable :key="index"
+                    @close="tagSearchClose(tag)">
               {{ dictValueLabel(tag, customerTag) }}
             </el-tag>
             <template v-if="sourceList.pagination.tags.length !== customerTag.length">
               <el-select v-if="addTagSearchShow" v-model="addSearchTag" style="margin-top: 8px" @change="changeSearchTag">
-                <el-option
-                  v-for="tag in customerTag"
-                  :key="tag.value"
-                  :label="tag.label"
-                  :value="tag.value"
-                  :disabled="judgeTagSelect(sourceList.pagination.tags, tag.value)" />
+                <el-option v-for="tag in customerTag" :key="tag.value" :label="tag.label" :value="tag.value"
+                           :disabled="judgeTagSelect(sourceList.pagination.tags, tag.value)" />
               </el-select>
               <el-tag style="cursor: pointer" type="info" @click="addTagSearchShow = true" v-else> + </el-tag>
             </template>
@@ -838,7 +787,10 @@ const getCityData = (id, type, isChange) => {
 };
 getCityData("0");
 const clickAddPerson = () => {
-  if (formData.data.customerUserList && formData.data.customerUserList.length > 0) {
+  if (
+    formData.data.customerUserList &&
+    formData.data.customerUserList.length > 0
+  ) {
     formData.data.customerUserList.push({
       name: "",
       email: "",
@@ -865,24 +817,29 @@ const submitFollow = () => {
     } else {
       formFollow.data.fileList = [];
     }
-    proxy.post("/customerFollowRecords/" + modalType.value, formFollow.data).then(
-      () => {
-        ElMessage({
-          message: modalType.value == "add" ? "添加成功" : "编辑成功",
-          type: "success",
-        });
-        openFollow.value = false;
-        getList();
-      },
-      (err) => {
-        console.log(err);
-      }
-    );
+    proxy
+      .post("/customerFollowRecords/" + modalType.value, formFollow.data)
+      .then(
+        () => {
+          ElMessage({
+            message: modalType.value == "add" ? "添加成功" : "编辑成功",
+            type: "success",
+          });
+          openFollow.value = false;
+          getList();
+        },
+        (err) => {
+          console.log(err);
+        }
+      );
   });
 };
 const submitForm = () => {
   submit.value.handleSubmit(() => {
-    if (formData.data.customerUserList && formData.data.customerUserList.length > 0) {
+    if (
+      formData.data.customerUserList &&
+      formData.data.customerUserList.length > 0
+    ) {
       formData.data.tag = formData.data.tags.join(",");
       submitLoading.value = true;
       proxy.post("/customer/" + modalType.value, formData.data).then(
@@ -907,24 +864,31 @@ const submitForm = () => {
   });
 };
 const getDict = () => {
-  proxy.getDictOne(["customer_tag", "customer_source", "customer_status", "contact_type"]).then((res) => {
-    customerTag.value = res["customer_tag"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    customerSource.value = res["customer_source"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    customerStatus.value = res["customer_status"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    contactType.value = res["contact_type"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-  });
+  proxy
+    .getDictOne([
+      "customer_tag",
+      "customer_source",
+      "customer_status",
+      "contact_type",
+    ])
+    .then((res) => {
+      customerTag.value = res["customer_tag"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      customerSource.value = res["customer_source"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      customerStatus.value = res["customer_status"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      contactType.value = res["contact_type"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+    });
   proxy
     .get("/tenantUser/list", {
       pageNum: 1,
@@ -1051,14 +1015,24 @@ const getContent = (item) => {
   if (item.type === "10") {
     return "跟进记录: " + "报价单总金额 " + proxy.moneyFormat(item.amount, 2);
   } else if (item.type === "20") {
-    return "跟进记录: " + "合同总金额 " + proxy.moneyFormat(item.amount, 2) + ` (${item.contractCode}) `;
+    return (
+      "跟进记录: " +
+      "合同总金额 " +
+      proxy.moneyFormat(item.amount, 2) +
+      ` (${item.contractCode}) `
+    );
   }
 };
 const recordShow = (item) => {
-  if (!(item.fileList && item.fileList.length > 0) && JSON.stringify(item.fileList) !== "[]") {
-    proxy.post("/fileInfo/getList", { businessIdList: [item.id] }).then((fileObj) => {
-      item.fileList = fileObj[item.id] || [];
-    });
+  if (
+    !(item.fileList && item.fileList.length > 0) &&
+    JSON.stringify(item.fileList) !== "[]"
+  ) {
+    proxy
+      .post("/fileInfo/getList", { businessIdList: [item.id] })
+      .then((fileObj) => {
+        item.fileList = fileObj[item.id] || [];
+      });
   }
 };
 const openFile = (path) => {
@@ -1089,8 +1063,19 @@ const clickMore = (item) => {
       })
       .then((fileObj) => {
         for (let i = 0; i < res.rows.length; i++) {
-          recordList.value[parseInt(i + (queryParams.value.pageNum - 1) * queryParams.value.pageSize)].fileList =
-            fileObj[recordList.value[parseInt(i + (queryParams.value.pageNum - 1) * queryParams.value.pageSize)].id] || [];
+          recordList.value[
+            parseInt(
+              i + (queryParams.value.pageNum - 1) * queryParams.value.pageSize
+            )
+          ].fileList =
+            fileObj[
+              recordList.value[
+                parseInt(
+                  i +
+                    (queryParams.value.pageNum - 1) * queryParams.value.pageSize
+                )
+              ].id
+            ] || [];
         }
       });
   });
@@ -1101,7 +1086,10 @@ const infiniteScroll = () => {
   clickMore();
 };
 const judgeTotal = () => {
-  if (queryParams.value.pageNum * queryParams.value.pageSize >= queryParams.value.total) {
+  if (
+    queryParams.value.pageNum * queryParams.value.pageSize >=
+    queryParams.value.total
+  ) {
     return true;
   }
   return false;
@@ -1163,14 +1151,19 @@ const statisticalData = ref({
   customerList: [],
 });
 const obtainStatisticalData = () => {
-  proxy.post("/customer/sourceStatistics", sourceList.value.paginationTwo).then((res) => {
-    statisticalData.value = res;
-  });
+  proxy
+    .post("/customer/sourceStatistics", sourceList.value.paginationTwo)
+    .then((res) => {
+      statisticalData.value = res;
+    });
 };
 obtainStatisticalData();
 const getNum = (val) => {
   let num = 0;
-  if (statisticalData.value.customerList && statisticalData.value.customerList.length > 0) {
+  if (
+    statisticalData.value.customerList &&
+    statisticalData.value.customerList.length > 0
+  ) {
     statisticalData.value.customerList.map((item) => {
       if (sourceList.value.paginationTwo.statisticsType === 1) {
         if (item.source === val) {
@@ -1262,7 +1255,8 @@ const addTagSearchShow = ref(false);
 let copySearch = ref({});
 const moreSearch = () => {
   if (sourceList.value.pagination.tag) {
-    sourceList.value.pagination.tags = sourceList.value.pagination.tag.split(",");
+    sourceList.value.pagination.tags =
+      sourceList.value.pagination.tag.split(",");
   } else {
     sourceList.value.pagination.tags = [];
   }
@@ -1275,8 +1269,12 @@ const cancelSearch = () => {
   openSearch.value = false;
 };
 const submitSearch = () => {
-  if (sourceList.value.pagination.tags && sourceList.value.pagination.tags.length > 0) {
-    sourceList.value.pagination.tag = sourceList.value.pagination.tags.join(",");
+  if (
+    sourceList.value.pagination.tags &&
+    sourceList.value.pagination.tags.length > 0
+  ) {
+    sourceList.value.pagination.tag =
+      sourceList.value.pagination.tags.join(",");
   } else {
     sourceList.value.pagination.tag = "";
   }
@@ -1286,7 +1284,9 @@ const submitSearch = () => {
   getList();
 };
 const tagSearchClose = (val) => {
-  sourceList.value.pagination.tags = sourceList.value.pagination.tags.filter((item) => item !== val);
+  sourceList.value.pagination.tags = sourceList.value.pagination.tags.filter(
+    (item) => item !== val
+  );
 };
 const changeSearchTag = (val) => {
   sourceList.value.pagination.tags.push(val);
@@ -1295,12 +1295,18 @@ const changeSearchTag = (val) => {
 };
 // 判断当前用户有无销售合同页面权限
 const isHave = ref(false);
-if (useUserStore().permissions && useUserStore().permissions.includes("contract")) {
+if (
+  useUserStore().permissions &&
+  useUserStore().permissions.includes("contract")
+) {
   isHave.value = true;
 }
 // 判断当前用户有无报价单页面权限
 const isHaveOne = ref(false);
-if (useUserStore().permissions && useUserStore().permissions.includes("priceSheet")) {
+if (
+  useUserStore().permissions &&
+  useUserStore().permissions.includes("priceSheet")
+) {
   isHaveOne.value = true;
 }
 

+ 166 - 158
src/views/customer/privatesea/index.vue

@@ -4,20 +4,12 @@
       <el-button type="primary" style="margin-left: 10px" @click="openModal()">添加客户</el-button>
     </div>
 
-    <byTable
-      :source="sourceList.data"
-      :pagination="sourceList.pagination"
-      :config="config"
-      :loading="loading"
-      :statConfig="statConfig"
-      :selectConfig="selectConfig"
-      highlight-current-row
-      @moreSearch="moreSearch"
-      @get-list="getList"
-      ref="table">
+    <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :statConfig="statConfig"
+             :selectConfig="selectConfig" highlight-current-row @moreSearch="moreSearch" @get-list="getList" ref="table">
       <template #isTop="{ item }">
         <div>
-          <img style="cursor: pointer; width: 20px; transform: translateY(5px)" :src="'/img/isTop.png'" @click="deleteTop(item)" v-if="item.isTop === 1" />
+          <img style="cursor: pointer; width: 20px; transform: translateY(5px)" :src="'/img/isTop.png'" @click="deleteTop(item)"
+               v-if="item.isTop === 1" />
           <img style="cursor: pointer; width: 20px; transform: translateY(5px)" :src="'/img/noTop.png'" @click="addTop(item)" v-else />
         </div>
       </template>
@@ -37,16 +29,13 @@
             {{ dictValueLabel(tag, customerTag) }}
           </el-tag>
           <template v-if="item.tag.length !== customerTag.length">
-            <el-select
-              v-if="item.addTagShow"
-              v-model="addTag"
-              style="width: 100%"
-              @change="
+            <el-select v-if="item.addTagShow" v-model="addTag" style="width: 100%" @change="
                 (val) => {
                   return changeTag(val, item);
                 }
               ">
-              <el-option v-for="tag in customerTag" :key="tag.value" :label="tag.label" :value="tag.value" :disabled="judgeTagSelect(item.tag, tag.value)" />
+              <el-option v-for="tag in customerTag" :key="tag.value" :label="tag.label" :value="tag.value"
+                         :disabled="judgeTagSelect(item.tag, tag.value)" />
             </el-select>
             <el-tag style="cursor: pointer" type="success" @click="showSelect(item)" v-else> + </el-tag>
           </template>
@@ -56,19 +45,18 @@
         <div :class="'getWidth' + item.id" style="width: 100%">
           <div style="width: 100%; display: flex">
             <template v-if="item.customerFollowRecordsList && item.customerFollowRecordsList.length > 0">
-              <div
-                :style="
+              <div :style="
                   index > 2
                     ? 'line-height: 32px; margin-right: 8px; padding: 0 8px; background-color: #eeeeee; border-radius: 4px; cursor: pointer; display: none'
                     : 'line-height: 32px; margin-right: 8px; padding: 0 8px; background-color: #eeeeee; border-radius: 4px; cursor: pointer'
-                "
-                v-for="(record, index) in item.customerFollowRecordsList"
-                :key="record.id">
+                " v-for="(record, index) in item.customerFollowRecordsList" :key="record.id">
                 <el-popover placement="bottom" :width="300" trigger="hover" @show="recordShow(record)">
                   <template #reference>
                     <div>
                       <span v-if="record.date">{{ record.date.substr(0, 10) }}</span>
-                      <el-icon style="margin-left: 8px; transform: translateY(2px)" @click="deleteFollow(record)"><DeleteFilled /></el-icon>
+                      <el-icon style="margin-left: 8px; transform: translateY(2px)" @click="deleteFollow(record)">
+                        <DeleteFilled />
+                      </el-icon>
                     </div>
                   </template>
                   <template #default>
@@ -88,18 +76,10 @@
                           <span v-if="record.type === '10'">跟进记录:报价单总金额 </span>
                           <span v-if="record.type === '20'">跟进记录:合同总金额 </span>
                           <span>{{ moneyFormat(record.amount, 2) }}</span>
-                          <span
-                            v-if="record.type === '10' && record.code"
-                            :class="{ 'code-class': isHave }"
-                            @click="isHaveOne ? handlePushRoute(record) : () => {}"
-                            >({{ record.code }})</span
-                          >
-                          <span
-                            v-if="record.type === '20' && record.contractCode"
-                            :class="{ 'code-class': isHaveOne }"
-                            @click="isHave ? handlePushRoute(record) : () => {}"
-                            >({{ record.contractCode }})</span
-                          >
+                          <span v-if="record.type === '10' && record.code" :class="{ 'code-class': isHave }"
+                                @click="isHaveOne ? handlePushRoute(record) : () => {}">({{ record.code }})</span>
+                          <span v-if="record.type === '20' && record.contractCode" :class="{ 'code-class': isHaveOne }"
+                                @click="isHave ? handlePushRoute(record) : () => {}">({{ record.contractCode }})</span>
                         </div>
                       </div>
                       <div style="margin: 8px 0; display: flex" v-if="record.fileList && record.fileList.length > 0">
@@ -114,10 +94,8 @@
                   </template>
                 </el-popover>
               </div>
-              <div
-                style="line-height: 32px; margin-right: 8px; padding: 0 8px; background-color: #eeeeee; border-radius: 4px; cursor: pointer"
-                @click="clickMore(item)"
-                v-if="item.customerFollowRecordsList.length >= 3">
+              <div style="line-height: 32px; margin-right: 8px; padding: 0 8px; background-color: #eeeeee; border-radius: 4px; cursor: pointer"
+                   @click="clickMore(item)" v-if="item.customerFollowRecordsList.length >= 3">
                 更多
               </div>
             </template>
@@ -132,25 +110,17 @@
           <el-row style="width: 100%">
             <el-col :span="8">
               <el-form-item prop="countryId">
-                <el-select
-                  v-model="formData.data.countryId"
-                  placeholder="国家"
-                  filterable
-                  @change="(val) => getCityData(val, '20', true)"
-                  :no-match-text="'无数据,请联系管理员添加'">
-                  <el-option v-for="item in countryData" :key="item.id" :label="item.chineseName + '(' + item.name + ')'" :value="item.id"> </el-option>
+                <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => getCityData(val, '20', true)"
+                           :no-match-text="'无数据,请联系管理员添加'">
+                  <el-option v-for="item in countryData" :key="item.id" :label="item.chineseName + '(' + item.name + ')'" :value="item.id">
+                  </el-option>
                 </el-select>
               </el-form-item>
             </el-col>
             <el-col :span="8">
               <el-form-item prop="provinceName">
-                <selectCity
-                  placeholder="省/洲"
-                  @change="(val) => getCityData(val, '30', true)"
-                  addressId="provinceId"
-                  addressName="provinceName"
-                  v-model="formData.data"
-                  :data="provinceData">
+                <selectCity placeholder="省/洲" @change="(val) => getCityData(val, '30', true)" addressId="provinceId" addressName="provinceName"
+                            v-model="formData.data" :data="provinceData">
                 </selectCity>
               </el-form-item>
             </el-col>
@@ -257,13 +227,8 @@
       <byForm :formConfig="formConfigAFollow" :formOption="formOption" v-model="formFollow.data" :rules="rulesFollow" ref="follow">
         <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-upload v-model:fileList="fileList" :action="uploadUrl" :data="uploadData" multiple :before-upload="uploadFile"
+                       :on-preview="onPreviewFile">
               <el-button type="primary">文件上传</el-button>
             </el-upload>
           </div>
@@ -299,15 +264,10 @@
                       <span v-if="record.type === '10'">跟进记录:报价单总金额 </span>
                       <span v-if="record.type === '20'">跟进记录:合同总金额 </span>
                       <span>{{ moneyFormat(record.amount, 2) }}</span>
-                      <span v-if="record.type === '10' && record.code" :class="{ 'code-class': isHave }" @click="isHaveOne ? handlePushRoute(record) : () => {}"
-                        >({{ record.code }})</span
-                      >
-                      <span
-                        v-if="record.type === '20' && record.contractCode"
-                        :class="{ 'code-class': isHaveOne }"
-                        @click="isHave ? handlePushRoute(record) : () => {}"
-                        >({{ record.contractCode }})</span
-                      >
+                      <span v-if="record.type === '10' && record.code" :class="{ 'code-class': isHave }"
+                            @click="isHaveOne ? handlePushRoute(record) : () => {}">({{ record.code }})</span>
+                      <span v-if="record.type === '20' && record.contractCode" :class="{ 'code-class': isHaveOne }"
+                            @click="isHave ? handlePushRoute(record) : () => {}">({{ record.contractCode }})</span>
                     </div>
                   </div>
                   <div style="margin: 8px 0; display: flex" v-if="record.fileList && record.fileList.length > 0">
@@ -335,49 +295,38 @@
           <el-row style="width: 100%">
             <el-col :span="8">
               <el-form-item prop="countryId">
-                <el-select
-                  v-model="sourceList.pagination.countryId"
-                  placeholder="国家"
-                  clearable
-                  filterable
-                  @change="(val) => getCitySearchData(val, '20', true)"
-                  :no-match-text="'无数据,请联系管理员添加'">
-                  <el-option v-for="item in countryData" :key="item.id" :label="item.chineseName + '(' + item.name + ')'" :value="item.id"> </el-option>
+                <el-select v-model="sourceList.pagination.countryId" placeholder="国家" clearable filterable
+                           @change="(val) => getCitySearchData(val, '20', true)" :no-match-text="'无数据,请联系管理员添加'">
+                  <el-option v-for="item in countryData" :key="item.id" :label="item.chineseName + '(' + item.name + ')'" :value="item.id">
+                  </el-option>
                 </el-select>
               </el-form-item>
             </el-col>
             <el-col :span="8">
               <el-form-item prop="provinceName">
-                <selectCity
-                  placeholder="省/洲"
-                  @change="(val) => getCitySearchData(val, '30', true)"
-                  addressId="provinceId"
-                  addressName="provinceName"
-                  v-model="sourceList.pagination"
-                  :data="provinceSearchData">
+                <selectCity placeholder="省/洲" @change="(val) => getCitySearchData(val, '30', true)" addressId="provinceId" addressName="provinceName"
+                            v-model="sourceList.pagination" :data="provinceSearchData">
                 </selectCity>
               </el-form-item>
             </el-col>
             <el-col :span="8">
               <el-form-item prop="cityName">
-                <selectCity placeholder="城市" addressId="cityId" addressName="cityName" v-model="sourceList.pagination" :data="citySearchData"></selectCity>
+                <selectCity placeholder="城市" addressId="cityId" addressName="cityName" v-model="sourceList.pagination" :data="citySearchData">
+                </selectCity>
               </el-form-item>
             </el-col>
           </el-row>
         </template>
         <template #tags>
           <div style="width: 100%">
-            <el-tag style="margin-right: 8px" type="info" v-for="(tag, index) in sourceList.pagination.tags" closable :key="index" @close="tagSearchClose(tag)">
+            <el-tag style="margin-right: 8px" type="info" v-for="(tag, index) in sourceList.pagination.tags" closable :key="index"
+                    @close="tagSearchClose(tag)">
               {{ dictValueLabel(tag, customerTag) }}
             </el-tag>
             <template v-if="sourceList.pagination.tags.length !== customerTag.length">
               <el-select v-if="addTagSearchShow" v-model="addSearchTag" style="margin-top: 8px" @change="changeSearchTag">
-                <el-option
-                  v-for="tag in customerTag"
-                  :key="tag.value"
-                  :label="tag.label"
-                  :value="tag.value"
-                  :disabled="judgeTagSelect(sourceList.pagination.tags, tag.value)" />
+                <el-option v-for="tag in customerTag" :key="tag.value" :label="tag.label" :value="tag.value"
+                           :disabled="judgeTagSelect(sourceList.pagination.tags, tag.value)" />
               </el-select>
               <el-tag style="cursor: pointer" type="info" @click="addTagSearchShow = true" v-else> + </el-tag>
             </template>
@@ -780,21 +729,23 @@ const follow = ref(null);
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
-  proxy.post("/customer/privateSeaPage", sourceList.value.pagination).then((res) => {
-    res.rows.forEach((x) => {
-      x.addTagShow = false;
-      if (x.tag) {
-        x.tag = x.tag.split(",");
-      } else {
-        x.tag = [];
-      }
+  proxy
+    .post("/customer/privateSeaPage", sourceList.value.pagination)
+    .then((res) => {
+      res.rows.forEach((x) => {
+        x.addTagShow = false;
+        if (x.tag) {
+          x.tag = x.tag.split(",");
+        } else {
+          x.tag = [];
+        }
+      });
+      sourceList.value.data = res.rows;
+      sourceList.value.pagination.total = res.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
     });
-    sourceList.value.data = res.rows;
-    sourceList.value.pagination.total = res.total;
-    setTimeout(() => {
-      loading.value = false;
-    }, 200);
-  });
 };
 const openModal = () => {
   modalType.value = "add";
@@ -839,7 +790,10 @@ const getCityData = (id, type, isChange) => {
 };
 getCityData("0");
 const clickAddPerson = () => {
-  if (formData.data.customerUserList && formData.data.customerUserList.length > 0) {
+  if (
+    formData.data.customerUserList &&
+    formData.data.customerUserList.length > 0
+  ) {
     formData.data.customerUserList.push({
       name: "",
       email: "",
@@ -866,24 +820,29 @@ const submitFollow = () => {
     } else {
       formFollow.data.fileList = [];
     }
-    proxy.post("/customerFollowRecords/" + modalType.value, formFollow.data).then(
-      () => {
-        ElMessage({
-          message: modalType.value == "add" ? "添加成功" : "编辑成功",
-          type: "success",
-        });
-        openFollow.value = false;
-        getList();
-      },
-      (err) => {
-        console.log(err);
-      }
-    );
+    proxy
+      .post("/customerFollowRecords/" + modalType.value, formFollow.data)
+      .then(
+        () => {
+          ElMessage({
+            message: modalType.value == "add" ? "添加成功" : "编辑成功",
+            type: "success",
+          });
+          openFollow.value = false;
+          getList();
+        },
+        (err) => {
+          console.log(err);
+        }
+      );
   });
 };
 const submitForm = () => {
   submit.value.handleSubmit(() => {
-    if (formData.data.customerUserList && formData.data.customerUserList.length > 0) {
+    if (
+      formData.data.customerUserList &&
+      formData.data.customerUserList.length > 0
+    ) {
       formData.data.tag = formData.data.tags.join(",");
       submitLoading.value = true;
       proxy.post("/customer/" + modalType.value, formData.data).then(
@@ -908,24 +867,31 @@ const submitForm = () => {
   });
 };
 const getDict = () => {
-  proxy.getDictOne(["customer_tag", "customer_source", "customer_status", "contact_type"]).then((res) => {
-    customerTag.value = res["customer_tag"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    customerSource.value = res["customer_source"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    customerStatus.value = res["customer_status"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    contactType.value = res["contact_type"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-  });
+  proxy
+    .getDictOne([
+      "customer_tag",
+      "customer_source",
+      "customer_status",
+      "contact_type",
+    ])
+    .then((res) => {
+      customerTag.value = res["customer_tag"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      customerSource.value = res["customer_source"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      customerStatus.value = res["customer_status"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      contactType.value = res["contact_type"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+    });
   proxy
     .get("/tenantUser/list", {
       pageNum: 1,
@@ -1052,14 +1018,24 @@ const getContent = (item) => {
   if (item.type === "10") {
     return "跟进记录: " + "报价单总金额 " + proxy.moneyFormat(item.amount, 2);
   } else if (item.type === "20") {
-    return "跟进记录: " + "合同总金额 " + proxy.moneyFormat(item.amount, 2) + ` (${item.contractCode}) `;
+    return (
+      "跟进记录: " +
+      "合同总金额 " +
+      proxy.moneyFormat(item.amount, 2) +
+      ` (${item.contractCode}) `
+    );
   }
 };
 const recordShow = (item) => {
-  if (!(item.fileList && item.fileList.length > 0) && JSON.stringify(item.fileList) !== "[]") {
-    proxy.post("/fileInfo/getList", { businessIdList: [item.id] }).then((fileObj) => {
-      item.fileList = fileObj[item.id] || [];
-    });
+  if (
+    !(item.fileList && item.fileList.length > 0) &&
+    JSON.stringify(item.fileList) !== "[]"
+  ) {
+    proxy
+      .post("/fileInfo/getList", { businessIdList: [item.id] })
+      .then((fileObj) => {
+        item.fileList = fileObj[item.id] || [];
+      });
   }
 };
 const openFile = (path) => {
@@ -1090,8 +1066,19 @@ const clickMore = (item) => {
       })
       .then((fileObj) => {
         for (let i = 0; i < res.rows.length; i++) {
-          recordList.value[parseInt(i + (queryParams.value.pageNum - 1) * queryParams.value.pageSize)].fileList =
-            fileObj[recordList.value[parseInt(i + (queryParams.value.pageNum - 1) * queryParams.value.pageSize)].id] || [];
+          recordList.value[
+            parseInt(
+              i + (queryParams.value.pageNum - 1) * queryParams.value.pageSize
+            )
+          ].fileList =
+            fileObj[
+              recordList.value[
+                parseInt(
+                  i +
+                    (queryParams.value.pageNum - 1) * queryParams.value.pageSize
+                )
+              ].id
+            ] || [];
         }
       });
   });
@@ -1102,7 +1089,10 @@ const infiniteScroll = () => {
   clickMore();
 };
 const judgeTotal = () => {
-  if (queryParams.value.pageNum * queryParams.value.pageSize >= queryParams.value.total) {
+  if (
+    queryParams.value.pageNum * queryParams.value.pageSize >=
+    queryParams.value.total
+  ) {
     return true;
   }
   return false;
@@ -1164,14 +1154,19 @@ const statisticalData = ref({
   customerList: [],
 });
 const obtainStatisticalData = () => {
-  proxy.post("/customer/sourceStatistics", sourceList.value.paginationTwo).then((res) => {
-    statisticalData.value = res;
-  });
+  proxy
+    .post("/customer/sourceStatistics", sourceList.value.paginationTwo)
+    .then((res) => {
+      statisticalData.value = res;
+    });
 };
 obtainStatisticalData();
 const getNum = (val) => {
   let num = 0;
-  if (statisticalData.value.customerList && statisticalData.value.customerList.length > 0) {
+  if (
+    statisticalData.value.customerList &&
+    statisticalData.value.customerList.length > 0
+  ) {
     statisticalData.value.customerList.map((item) => {
       if (sourceList.value.paginationTwo.statisticsType === 1) {
         if (item.source === val) {
@@ -1263,7 +1258,8 @@ const addTagSearchShow = ref(false);
 let copySearch = ref({});
 const moreSearch = () => {
   if (sourceList.value.pagination.tag) {
-    sourceList.value.pagination.tags = sourceList.value.pagination.tag.split(",");
+    sourceList.value.pagination.tags =
+      sourceList.value.pagination.tag.split(",");
   } else {
     sourceList.value.pagination.tags = [];
   }
@@ -1276,8 +1272,12 @@ const cancelSearch = () => {
   openSearch.value = false;
 };
 const submitSearch = () => {
-  if (sourceList.value.pagination.tags && sourceList.value.pagination.tags.length > 0) {
-    sourceList.value.pagination.tag = sourceList.value.pagination.tags.join(",");
+  if (
+    sourceList.value.pagination.tags &&
+    sourceList.value.pagination.tags.length > 0
+  ) {
+    sourceList.value.pagination.tag =
+      sourceList.value.pagination.tags.join(",");
   } else {
     sourceList.value.pagination.tag = "";
   }
@@ -1287,7 +1287,9 @@ const submitSearch = () => {
   getList();
 };
 const tagSearchClose = (val) => {
-  sourceList.value.pagination.tags = sourceList.value.pagination.tags.filter((item) => item !== val);
+  sourceList.value.pagination.tags = sourceList.value.pagination.tags.filter(
+    (item) => item !== val
+  );
 };
 const changeSearchTag = (val) => {
   sourceList.value.pagination.tags.push(val);
@@ -1297,12 +1299,18 @@ const changeSearchTag = (val) => {
 
 // 判断当前用户有无销售合同页面权限
 const isHave = ref(false);
-if (useUserStore().permissions && useUserStore().permissions.includes("contract")) {
+if (
+  useUserStore().permissions &&
+  useUserStore().permissions.includes("contract")
+) {
   isHave.value = true;
 }
 // 判断当前用户有无报价单页面权限
 const isHaveOne = ref(false);
-if (useUserStore().permissions && useUserStore().permissions.includes("priceSheet")) {
+if (
+  useUserStore().permissions &&
+  useUserStore().permissions.includes("priceSheet")
+) {
   isHaveOne.value = true;
 }
 

+ 4 - 4
src/views/error/404.vue

@@ -27,13 +27,13 @@
 
 <script setup>
 let message = computed(() => {
-  return '找不到网页!'
-})
+  return "找不到网页!";
+});
 </script>
 
 <style lang="scss" scoped>
-.wscn-http404-container{
-  transform: translate(-50%,-50%);
+.wscn-http404-container {
+  transform: translate(-50%, -50%);
   position: absolute;
   top: 40%;
   left: 50%;

+ 35 - 163
src/views/finance/fundManage/accountPayment/index.vue

@@ -1,20 +1,10 @@
 <template>
   <div class="user">
     <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="{
           select: select,
-        }"
-        :action-list="[]"
-        @moreSearch="moreSearch"
-        @get-list="getList"
-      >
+        }" :action-list="[]" @moreSearch="moreSearch" @get-list="getList">
         <template #amount="{ item }">
           <div style="width: 100%">
             <span>{{ item.currency }} {{ item.incomeAmount }}</span>
@@ -22,40 +12,19 @@
         </template>
       </byTable>
     </div>
-    <el-dialog
-      title="打款"
-      v-if="dialogVisible"
-      v-model="dialogVisible"
-      width="500"
-      v-loading="loading"
-    >
-      <byForm
-        :formConfig="formConfig"
-        :formOption="formOption"
-        v-model="formData.data"
-        :rules="rules"
-        ref="byform"
-      >
+    <el-dialog title="打款" v-if="dialogVisible" v-model="dialogVisible" width="500" v-loading="loading">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
         <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-upload v-model:fileList="fileList" :action="uploadUrl" :data="uploadData" multiple :before-upload="uploadFile"
+                       :on-preview="onPreviewFile">
               <el-button type="primary">文件上传</el-button>
             </el-upload>
           </div>
         </template>
         <template #isTransaction>
           <div style="width: 100%">
-            <el-radio-group
-              v-model="formData.data.isTransaction"
-              @change="changeIsTransaction"
-            >
+            <el-radio-group v-model="formData.data.isTransaction" @change="changeIsTransaction">
               <el-radio label="1" border>是</el-radio>
               <el-radio label="0" border>否</el-radio>
             </el-radio-group>
@@ -63,84 +32,39 @@
         </template>
         <template #transactionDeptId>
           <div style="width: 100%">
-            <el-select
-              v-model="formData.data.transactionDeptId"
-              placeholder="请选择往来单位"
-              style="width: 100%"
-              clearable
-              @change="changeTransactionDept"
-            >
-              <el-option
-                v-for="item in departmentList"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value"
-              />
+            <el-select v-model="formData.data.transactionDeptId" placeholder="请选择往来单位" style="width: 100%" clearable @change="changeTransactionDept">
+              <el-option v-for="item in departmentList" :key="item.value" :label="item.label" :value="item.value" />
             </el-select>
           </div>
         </template>
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button
-          type="primary"
-          @click="submitForm()"
-          v-if="!formOption.disabled"
-          size="large"
-          :loading="submitLoading"
-        >
+        <el-button type="primary" @click="submitForm()" v-if="!formOption.disabled" size="large" :loading="submitLoading">
           确 定
         </el-button>
       </template>
     </el-dialog>
 
-    <el-dialog
-      title="高级检索"
-      v-if="openSearch"
-      v-model="openSearch"
-      width="600"
-      :before-close="cancelSearch"
-    >
-      <byForm
-        :formConfig="formSearchConfig"
-        :formOption="formOptionTwo"
-        v-model="sourceList.pagination"
-      >
+    <el-dialog title="高级检索" v-if="openSearch" v-model="openSearch" width="600" :before-close="cancelSearch">
+      <byForm :formConfig="formSearchConfig" :formOption="formOptionTwo" v-model="sourceList.pagination">
         <template #departmentId>
           <div>
-            <el-tree-select
-              v-model="sourceList.pagination.departmentId"
-              :data="deptTreeData"
-              check-strictly
-              :render-after-expand="false"
-              node-key="deptId"
-              style="width: 100%"
-              :props="defaultProps"
-              clearable
-            />
+            <el-tree-select v-model="sourceList.pagination.departmentId" :data="deptTreeData" check-strictly :render-after-expand="false"
+                            node-key="deptId" style="width: 100%" :props="defaultProps" clearable />
           </div>
         </template>
         <template #time>
           <div style="width: 100%">
             <el-row :gutter="10">
               <el-col :span="11">
-                <el-date-picker
-                  v-model="sourceList.pagination.beginCreateTime"
-                  type="datetime"
-                  placeholder="请选择"
-                  style="width: 100%"
-                  value-format="YYYY-MM-DD HH:mm:ss"
-                />
+                <el-date-picker v-model="sourceList.pagination.beginCreateTime" type="datetime" placeholder="请选择" style="width: 100%"
+                                value-format="YYYY-MM-DD HH:mm:ss" />
               </el-col>
               <el-col :span="2" style="text-align: center">到</el-col>
               <el-col :span="11">
-                <el-date-picker
-                  v-model="sourceList.pagination.endCreateTime"
-                  type="datetime"
-                  placeholder="请选择"
-                  style="width: 100%"
-                  value-format="YYYY-MM-DD HH:mm:ss"
-                />
+                <el-date-picker v-model="sourceList.pagination.endCreateTime" type="datetime" placeholder="请选择" style="width: 100%"
+                                value-format="YYYY-MM-DD HH:mm:ss" />
               </el-col>
             </el-row>
           </div>
@@ -149,23 +73,13 @@
           <div style="width: 100%">
             <el-row :gutter="10">
               <el-col :span="11">
-                <el-date-picker
-                  v-model="sourceList.pagination.beginTime"
-                  type="datetime"
-                  placeholder="请选择"
-                  style="width: 100%"
-                  value-format="YYYY-MM-DD HH:mm:ss"
-                />
+                <el-date-picker v-model="sourceList.pagination.beginTime" type="datetime" placeholder="请选择" style="width: 100%"
+                                value-format="YYYY-MM-DD HH:mm:ss" />
               </el-col>
               <el-col :span="2" style="text-align: center">到</el-col>
               <el-col :span="11">
-                <el-date-picker
-                  v-model="sourceList.pagination.endTime"
-                  type="datetime"
-                  placeholder="请选择"
-                  style="width: 100%"
-                  value-format="YYYY-MM-DD HH:mm:ss"
-                />
+                <el-date-picker v-model="sourceList.pagination.endTime" type="datetime" placeholder="请选择" style="width: 100%"
+                                value-format="YYYY-MM-DD HH:mm:ss" />
               </el-col>
             </el-row>
           </div>
@@ -174,27 +88,13 @@
           <div style="width: 100%">
             <el-row :gutter="10">
               <el-col :span="11">
-                <el-input-number
-                  onmousewheel="return false;"
-                  v-model="sourceList.pagination.startAmount"
-                  placeholder="请输入"
-                  style="width: 100%"
-                  :precision="2"
-                  :controls="false"
-                  :min="0"
-                />
+                <el-input-number onmousewheel="return false;" v-model="sourceList.pagination.startAmount" placeholder="请输入" style="width: 100%"
+                                 :precision="2" :controls="false" :min="0" />
               </el-col>
               <el-col :span="2" style="text-align: center">到</el-col>
               <el-col :span="11">
-                <el-input-number
-                  onmousewheel="return false;"
-                  v-model="sourceList.pagination.endAmount"
-                  placeholder="请输入"
-                  style="width: 100%"
-                  :precision="2"
-                  :controls="false"
-                  :min="0"
-                />
+                <el-input-number onmousewheel="return false;" v-model="sourceList.pagination.endAmount" placeholder="请输入" style="width: 100%"
+                                 :precision="2" :controls="false" :min="0" />
               </el-col>
             </el-row>
           </div>
@@ -202,9 +102,7 @@
       </byForm>
       <template #footer>
         <el-button @click="cancelSearch()" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitSearch()" size="large"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitSearch()" size="large">确 定</el-button>
       </template>
     </el-dialog>
 
@@ -216,48 +114,22 @@
       <template #footer>
         <el-button @click="openPrint = false" size="large">取消</el-button>
         <el-button v-print="printObj" size="large">打印</el-button>
-        <el-button type="primary" @click="clickDownload()" size="large"
-          >下载PDF</el-button
-        >
+        <el-button type="primary" @click="clickDownload()" size="large">下载PDF</el-button>
       </template>
     </el-dialog>
 
-    <el-dialog
-      title="冲销"
-      v-if="openCancelledOut"
-      v-model="openCancelledOut"
-      width="500"
-    >
-      <byForm
-        :formConfig="formCancelledOutConfig"
-        :formOption="formOptionTwo"
-        v-model="formCancelledOutData.data"
-        :rules="rulesCancelledOut"
-        ref="cancelledOut"
-      >
+    <el-dialog title="冲销" v-if="openCancelledOut" v-model="openCancelledOut" width="500">
+      <byForm :formConfig="formCancelledOutConfig" :formOption="formOptionTwo" v-model="formCancelledOutData.data" :rules="rulesCancelledOut"
+              ref="cancelledOut">
         <template #detail>
           <div style="width: 100%">
-            <el-button
-              type="primary"
-              style="margin-left: -15px"
-              @click="clickDetail"
-              text
-              >查看详情</el-button
-            >
+            <el-button type="primary" style="margin-left: -15px" @click="clickDetail" text>查看详情</el-button>
           </div>
         </template>
       </byForm>
       <template #footer>
-        <el-button @click="openCancelledOut = false" size="large"
-          >取 消</el-button
-        >
-        <el-button
-          type="danger"
-          @click="submitCancelledOutForm()"
-          size="large"
-          :loading="submitCancelledOutLoading"
-          >冲 销</el-button
-        >
+        <el-button @click="openCancelledOut = false" size="large">取 消</el-button>
+        <el-button type="danger" @click="submitCancelledOutForm()" size="large" :loading="submitCancelledOutLoading">冲 销</el-button>
       </template>
     </el-dialog>
   </div>

+ 267 - 274
src/views/index.vue

@@ -1,6 +1,6 @@
 <template>
-	<div class="app-container home">
-			<div class="card">
+  <div class="app-container home">
+    <!-- <div class="card">
 				<div class="commons-title">
 					系统公告
 				</div>
@@ -10,300 +10,293 @@
 						<div class="content">{{i.content}}</div>
 					</li>
 				</ul>
-			</div>
+			</div> -->
   </div>
-		<!-- <byTableDemo></byTableDemo> -->
-		<!-- <el-input type="number" v-model='aaa' v-mousewheel></el-input> -->
-		<!-- 111112132131211 -->
+  <!-- <byTableDemo></byTableDemo> -->
+  <!-- <el-input type="number" v-model='aaa' v-mousewheel></el-input> -->
+  <!-- 111112132131211 -->
 </template>
 
 <script setup >
 // name="Index" 增加缓存
-import { createApp, onMounted, ref } from 'vue'
-import byTableDemo from '../components/byTable/demo'
-import html2canvas from 'html2canvas'
-import JsPDF from 'jspdf'
+import { createApp, onMounted, ref } from "vue";
+import byTableDemo from "../components/byTable/demo";
+import html2canvas from "html2canvas";
+import JsPDF from "jspdf";
 
-const aaa = ref(1)
+const aaa = ref(1);
 function goTarget(url) {
-	window.open(url, '__blank')
+  window.open(url, "__blank");
 }
 let toBeProcessedData = ref({
-	total:0,
-	rows:[]
-})
-let onLineInfoData = ref([])
+  total: 0,
+  rows: [],
+});
+let onLineInfoData = ref([]);
 let haveInitiatedData = ref({
-	total:0,
-	rows:[]
-})
+  total: 0,
+  rows: [],
+});
 const sendMegData = ref({
-	total:0,
-	rows:[]
-})
+  total: 0,
+  rows: [],
+});
 const pushProcessApproval = (row) => {
-	if(row.status != 1 && row.status != 0) {
-		proxy.$router.push({
-			path: "/platform_manage/process/processApproval",
-			query: {
-				flowKey: row.flowKey,
-				id: row.id,
-				businessId: row.businessId,
-				processType:20,
-				version:row.version
-			},
-		});
-		return
-	}
-	proxy.post('flowExample/getApprovalRecord',{id:row.id}).then(res=>{
-		if(res.recordList.length > 0) {
-			let data = res.recordList.filter(item => item.status === 2)
-			let nodeType= 0
-			if (data && data.length > 0) {
-				nodeType = data[0].nodeType
-			}
-			proxy.$router.push({
-				path: "/platform_manage/process/processApproval",
-				query: {
-					flowKey: row.flowKey,
-					id: row.id,
-					businessId: row.businessId,
-					processType:nodeType == 1 ? 30 : 10,
-					version:row.version
-				},
-			});
-		}
-	})
-	
-}
+  if (row.status != 1 && row.status != 0) {
+    proxy.$router.push({
+      path: "/platform_manage/process/processApproval",
+      query: {
+        flowKey: row.flowKey,
+        id: row.id,
+        businessId: row.businessId,
+        processType: 20,
+        version: row.version,
+      },
+    });
+    return;
+  }
+  proxy.post("flowExample/getApprovalRecord", { id: row.id }).then((res) => {
+    if (res.recordList.length > 0) {
+      let data = res.recordList.filter((item) => item.status === 2);
+      let nodeType = 0;
+      if (data && data.length > 0) {
+        nodeType = data[0].nodeType;
+      }
+      proxy.$router.push({
+        path: "/platform_manage/process/processApproval",
+        query: {
+          flowKey: row.flowKey,
+          id: row.id,
+          businessId: row.businessId,
+          processType: nodeType == 1 ? 30 : 10,
+          version: row.version,
+        },
+      });
+    }
+  });
+};
 const { proxy } = getCurrentInstance();
 const pushInfo = ref({
-	total:0,
-	rows:[]
-})
-const getData = (() => {
-
-
-	proxy.post('pushAnnouncement/page',{
-		pageNum:1,
-		pageSize:3,
-	}).then(res=>{
-		sendMegData.value = res
-	})
-
-	
-})
+  total: 0,
+  rows: [],
+});
+const getData = () => {
+  proxy
+    .post("pushAnnouncement/page", {
+      pageNum: 1,
+      pageSize: 3,
+    })
+    .then((res) => {
+      sendMegData.value = res;
+    });
+};
 
-getData()
+getData();
 
-onMounted(() => {})
+onMounted(() => {});
 </script>
 <style>
-.table-warp .el-table .cell{
-	line-height: 24px!important;
+.table-warp .el-table .cell {
+  line-height: 24px !important;
 }
 </style>
 <style scoped lang="scss">
-
 .app-container {
-	height: 100%;
-	.announcement{
-		padding: 0;
-		margin: 0;
-		li{
-			list-style: none;
-			border-radius: 2px;
-			padding: 14px 20px;
-			background: #EEEEEE;
-			margin-bottom:10px;
-			font-size: 14px;
-			cursor: pointer;
-			.time{
-				color:#999;
-			}
-			.content{
-				margin-top:10px;
-				color:#333;
-			}
-		}
-		li:hover{
-			background: #EFF6FF;
-		}
-	}
-	.table-warp{
-		//页面全屏,占据剩下的位置
-		height: calc(100% - 157px);
-		border-radius: 5px;
-		
-		.card{
-			width: calc(50% - 10px);
-			height: calc(50% - 10px);
-			background: #fff;
-			float: left;
-			border-radius: 5px;
-			padding:20px;
-			overflow-y:auto;
-		}
-		.card:nth-child(2n + 1){
-			margin-right: 20px;
-		}
-		.card:nth-child(1){
-			margin-bottom: 20px;
-		}
-		.card:nth-child(2){
-			margin-bottom: 20px;
-		}
-	}
-	.stat-warp {
-		margin-bottom: 20px;
-		background: #fff;
-		padding: 20px;
-		overflow: hidden;
-		position: relative;
-		border-radius: 5px;
-		
-		.title {
-			height: 60px;
-			select {
-				height: 60px;
-				border: none;
-				outline: none;
-				-webkit-appearance: none;
-				appearance: none;
-				font-size: 14px;
-				font-weight: bold;
-				background: url('@/assets/images/sanjiao.png') no-repeat right
-					center;
-				padding-right: 20px;
-			}
-			div {
-				height: 60px;
-				font-size: 14px;
-				font-weight: bold;
-				line-height: 60px;
-			}
-		}
-		ul {
-			padding: 0;
-			overflow: hidden;
-			margin: 0;
-			li {
-				list-style: none;
-				min-width: 285px;
-				box-sizing: border-box;
-				margin-right: 20px;
-				background: linear-gradient(360deg, #C7E3FE 0%, #DFECFF 100%);
-				float: left;
-				overflow: hidden;
-				padding: 20px;
-				color: #333333;
-				position: relative;
-				border-radius: 10px;
-				cursor: pointer;
-				.label {
-					font-size: 14px;
-					margin-top: 10px;
-				}
-				.label::before {
-					// width: 10px;
-					// height: 10px;
-					// content: '';
-					// border-radius: 50%;
-					// background: #0084ff;
-					// display: inline-block;
-					// margin-right: 10px;
-					
-				}
-				.num {
-					
-					font-size: 24px;
-					font-weight: bold;
-				}
-				.icon-box{
-					position: absolute;
-					height: 40px;
-					width: 40px;
-					right: 20px;
-					top: 20px;
-					background: #fff;
-					border-radius: 10px;
-					text-align: center;
-					line-height: 40px;
-					i{
-						font-size: 20px;
-						color:#0084FF;
-					}
-				}
-			}
-			//#F5F3FF #9E64ED
-			.theme2 {
-				background: linear-gradient(180deg, #EAE8FB 0%, #DED9FF 100%);
-				.label::before {
-					background: #7566F0;
-				}
-				.icon-box i {
-					color: #7566F0;
-				}
-			}
-			//#FFF1E1 #FF9315
-			.theme3 {
-				background: #fff1e1;
-				.label::before {
-					background: #ff9315;
-				}
-				.icon-box i {
-					color: #FF9315;
-				}
-			}
-			//#E2FBE8 #39C55A
-			.theme4 {
-				background: #e2fbe8;
-				.label::before {
-					background: #39c55a;
-				}
-			}
-			.theme5 {
-				background: #ffebe9;
-				.label::before {
-					background: #f94539;
-				}
-			}
-			.theme6 {
-				background: #e4f9f9;
-				.label::before {
-					background: #53cbcb;
-				}
-			}
-			.multi-data {
-				.label::before {
-					display: none;
-				}
-				.label {
-					font-size: 14px;
-					font-weight: bold;
-					color: #333;
-					margin-bottom: 8px;
-				}
-				.num-warp {
-					overflow: hidden;
-					.num-box {
-						float: left;
-						min-width: 80px;
-						margin-right: 20px;
-						.num-small {
-							font-size: 16px;
-							font-weight: bold;
-							margin-bottom: 8px;
-						}
-						.label-small {
-							color: #666;
-							font-size: 14px;
-						}
-					}
-				}
-			}
-		}
-	}
+  height: 100%;
+  .announcement {
+    padding: 0;
+    margin: 0;
+    li {
+      list-style: none;
+      border-radius: 2px;
+      padding: 14px 20px;
+      background: #eeeeee;
+      margin-bottom: 10px;
+      font-size: 14px;
+      cursor: pointer;
+      .time {
+        color: #999;
+      }
+      .content {
+        margin-top: 10px;
+        color: #333;
+      }
+    }
+    li:hover {
+      background: #eff6ff;
+    }
+  }
+  .table-warp {
+    //页面全屏,占据剩下的位置
+    height: calc(100% - 157px);
+    border-radius: 5px;
+
+    .card {
+      width: calc(50% - 10px);
+      height: calc(50% - 10px);
+      background: #fff;
+      float: left;
+      border-radius: 5px;
+      padding: 20px;
+      overflow-y: auto;
+    }
+    .card:nth-child(2n + 1) {
+      margin-right: 20px;
+    }
+    .card:nth-child(1) {
+      margin-bottom: 20px;
+    }
+    .card:nth-child(2) {
+      margin-bottom: 20px;
+    }
+  }
+  .stat-warp {
+    margin-bottom: 20px;
+    background: #fff;
+    padding: 20px;
+    overflow: hidden;
+    position: relative;
+    border-radius: 5px;
+
+    .title {
+      height: 60px;
+      select {
+        height: 60px;
+        border: none;
+        outline: none;
+        -webkit-appearance: none;
+        appearance: none;
+        font-size: 14px;
+        font-weight: bold;
+        background: url("@/assets/images/sanjiao.png") no-repeat right center;
+        padding-right: 20px;
+      }
+      div {
+        height: 60px;
+        font-size: 14px;
+        font-weight: bold;
+        line-height: 60px;
+      }
+    }
+    ul {
+      padding: 0;
+      overflow: hidden;
+      margin: 0;
+      li {
+        list-style: none;
+        min-width: 285px;
+        box-sizing: border-box;
+        margin-right: 20px;
+        background: linear-gradient(360deg, #c7e3fe 0%, #dfecff 100%);
+        float: left;
+        overflow: hidden;
+        padding: 20px;
+        color: #333333;
+        position: relative;
+        border-radius: 10px;
+        cursor: pointer;
+        .label {
+          font-size: 14px;
+          margin-top: 10px;
+        }
+        .label::before {
+          // width: 10px;
+          // height: 10px;
+          // content: '';
+          // border-radius: 50%;
+          // background: #0084ff;
+          // display: inline-block;
+          // margin-right: 10px;
+        }
+        .num {
+          font-size: 24px;
+          font-weight: bold;
+        }
+        .icon-box {
+          position: absolute;
+          height: 40px;
+          width: 40px;
+          right: 20px;
+          top: 20px;
+          background: #fff;
+          border-radius: 10px;
+          text-align: center;
+          line-height: 40px;
+          i {
+            font-size: 20px;
+            color: #0084ff;
+          }
+        }
+      }
+      //#F5F3FF #9E64ED
+      .theme2 {
+        background: linear-gradient(180deg, #eae8fb 0%, #ded9ff 100%);
+        .label::before {
+          background: #7566f0;
+        }
+        .icon-box i {
+          color: #7566f0;
+        }
+      }
+      //#FFF1E1 #FF9315
+      .theme3 {
+        background: #fff1e1;
+        .label::before {
+          background: #ff9315;
+        }
+        .icon-box i {
+          color: #ff9315;
+        }
+      }
+      //#E2FBE8 #39C55A
+      .theme4 {
+        background: #e2fbe8;
+        .label::before {
+          background: #39c55a;
+        }
+      }
+      .theme5 {
+        background: #ffebe9;
+        .label::before {
+          background: #f94539;
+        }
+      }
+      .theme6 {
+        background: #e4f9f9;
+        .label::before {
+          background: #53cbcb;
+        }
+      }
+      .multi-data {
+        .label::before {
+          display: none;
+        }
+        .label {
+          font-size: 14px;
+          font-weight: bold;
+          color: #333;
+          margin-bottom: 8px;
+        }
+        .num-warp {
+          overflow: hidden;
+          .num-box {
+            float: left;
+            min-width: 80px;
+            margin-right: 20px;
+            .num-small {
+              font-size: 16px;
+              font-weight: bold;
+              margin-bottom: 8px;
+            }
+            .label-small {
+              color: #666;
+              font-size: 14px;
+            }
+          }
+        }
+      }
+    }
+  }
 }
 </style>
 

+ 25 - 34
src/views/oa/companyDisk/webDiskData/index.vue

@@ -1,31 +1,18 @@
 <template>
   <div class="user">
     <div class="tree">
-      <treeList
-        title="网盘目录"
-        submitType="1"
-        :data="treeListData"
-        v-model="sourceList.pagination.productClassifyId"
-        @change="treeChange"
-        @changeTreeList="getTreeList"
-        @treeDelete="getList">
+      <treeList title="网盘目录" submitType="1" :data="treeListData" v-model="sourceList.pagination.productClassifyId" @change="treeChange"
+                @changeTreeList="getTreeList" @treeDelete="getList">
       </treeList>
     </div>
     <div class="content">
-      <byTable
-        :source="sourceList.data"
-        :pagination="sourceList.pagination"
-        :config="config"
-        :loading="loading"
-        highlight-current-row
-        :action-list="[
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row :action-list="[
           {
             text: '上传文件',
             action: () => openModal(),
             disabled: false,
           },
-        ]"
-        @get-list="getList">
+        ]" @get-list="getList">
         <template #name="{ item }">
           <div>
             <a style="color: #409eff; cursor: pointer" @click="clickName(item)">{{ item.name }}</a>
@@ -45,13 +32,8 @@
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
         <template #productFile>
           <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-upload v-model:fileList="fileList" :action="uploadUrl" :data="uploadData" multiple :before-upload="uploadFile"
+                       :on-preview="onPreviewFile">
               <el-button>上传文件</el-button>
             </el-upload>
           </div>
@@ -161,11 +143,15 @@ const config = computed(() => {
             },
             el: "button",
             click() {
-              ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
-                confirmButtonText: "确定",
-                cancelButtonText: "取消",
-                type: "warning",
-              }).then(() => {
+              ElMessageBox.confirm(
+                "此操作将永久删除该数据, 是否继续?",
+                "提示",
+                {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning",
+                }
+              ).then(() => {
                 proxy.post("/netdisk/delete", [row.id]).then(() => {
                   ElMessage({
                     message: "删除成功",
@@ -219,7 +205,9 @@ const formConfig = computed(() => {
   ];
 });
 let rules = ref({
-  parentFolderId: [{ required: true, message: "请选择网盘目录", trigger: "change" }],
+  parentFolderId: [
+    { required: true, message: "请选择网盘目录", trigger: "change" },
+  ],
 });
 const openModal = () => {
   formData.data = {
@@ -272,9 +260,11 @@ const submitForm = () => {
 };
 const clickName = (item) => {
   if (item.type === 2) {
-    proxy.post("/fileInfo/getList", { businessIdList: [item.id] }).then((res) => {
-      window.open(res[item.id][0].fileUrl, "_blank");
-    });
+    proxy
+      .post("/fileInfo/getList", { businessIdList: [item.id] })
+      .then((res) => {
+        window.open(res[item.id][0].fileUrl, "_blank");
+      });
   } else {
     sourceList.value.pagination.pageNum = 1;
     sourceList.value.pagination.parentFolderId = item.id;
@@ -290,7 +280,8 @@ const getSize = (item) => {
   } else if (1024 * 1024 * 1024 > item.fileSize) {
     size = parseFloat(Number(item.fileSize) / 1024 / 1024).toFixed(2) + "MB";
   } else if (1024 * 1024 * 1024 * 1024 > item.fileSize) {
-    size = parseFloat(Number(item.fileSize) / 1024 / 1024 / 1024).toFixed(2) + "GB";
+    size =
+      parseFloat(Number(item.fileSize) / 1024 / 1024 / 1024).toFixed(2) + "GB";
   }
   return size;
 };

+ 142 - 76
src/views/oa/work/dailyPaper/index.vue

@@ -13,13 +13,19 @@
           <template #header="{ date }">
             <span>{{ date }}</span>
             <el-button-group>
-              <el-icon style="cursor: pointer" @click="selectDate('prev-month')"><ArrowLeft /></el-icon>
-              <el-icon style="cursor: pointer" @click="selectDate('next-month')"><ArrowRight /></el-icon>
+              <el-icon style="cursor: pointer" @click="selectDate('prev-month')">
+                <ArrowLeft />
+              </el-icon>
+              <el-icon style="cursor: pointer" @click="selectDate('next-month')">
+                <ArrowRight />
+              </el-icon>
             </el-button-group>
           </template>
         </el-calendar>
         <div style="margin: 20px 0 0 0">
-          <el-icon style="transform: translateY(3px)"><Document /></el-icon>
+          <el-icon style="transform: translateY(3px)">
+            <Document />
+          </el-icon>
           <span style="margin-left: 8px">日报</span>
         </div>
         <el-menu :default-active="menuDefault" class="el-menu-vertical-demo" style="padding: 10px 0" @select="handleSelectMenu">
@@ -34,7 +40,9 @@
           </el-menu-item>
         </el-menu>
         <div style="padding: 20px 0 10px 0; border-top: 1px solid #eee">
-          <el-icon style="transform: translateY(3px)"><Timer /></el-icon>
+          <el-icon style="transform: translateY(3px)">
+            <Timer />
+          </el-icon>
           <span style="margin-left: 8px">定时日报</span>
         </div>
       </div>
@@ -44,15 +52,11 @@
             <template #productPic>
               <div>
                 <div>
-                  <el-upload
-                    v-model:fileList="imgList"
-                    action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-                    :data="uploadData"
-                    list-type="picture-card"
-                    :before-upload="uploadPicture"
-                    :limit="5"
-                    accept=".gif, .jpeg, .jpg, .png">
-                    <el-icon><Plus /></el-icon>
+                  <el-upload v-model:fileList="imgList" :action="uploadUrl" :data="uploadData" list-type="picture-card" :before-upload="uploadPicture"
+                             :limit="5" accept=".gif, .jpeg, .jpg, .png">
+                    <el-icon>
+                      <Plus />
+                    </el-icon>
                   </el-upload>
                 </div>
                 <div style="color: #909399">建议尺寸800*800, 最多5张. 单个图片不得超过3M, 格式gif、jpeg、jpg、png</div>
@@ -60,12 +64,7 @@
             </template>
             <template #productFile>
               <div style="width: 100%">
-                <el-upload
-                  v-model:fileList="attachmentList"
-                  action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-                  :data="uploadData"
-                  :before-upload="uploadFile"
-                  accept=".pdf">
+                <el-upload v-model:fileList="attachmentList" :action="uploadUrl" :data="uploadData" :before-upload="uploadFile" accept=".pdf">
                   <el-button>上传文件</el-button>
                   <span style="color: #909399; margin-left: 8px">上传格式为pdf文件</span>
                 </el-upload>
@@ -88,9 +87,8 @@
           <el-button type="primary" @click="clickSubmit()" size="large">确 定</el-button>
         </div>
         <div style="display: flex" v-else>
-          <div
-            style="width: 260px; border-right: 1px solid #eee; padding: 20px; max-height: calc(100vh - 100px - 72px - 60px); overflow-y: auto"
-            v-if="isMounted">
+          <div style="width: 260px; border-right: 1px solid #eee; padding: 20px; max-height: calc(100vh - 100px - 72px - 60px); overflow-y: auto"
+               v-if="isMounted">
             <ul v-infinite-scroll="load" class="infinite-list" style="overflow: auto">
               <li v-for="(item, index) in sourceList.data" :key="item">
                 <div style="padding: 8px 0; color: #909399" v-if="judgeShow(sourceList.data, item, index)">
@@ -98,7 +96,9 @@
                   <span style="margin-left: 8px">{{ weekFormat(item.week) }}</span>
                 </div>
                 <div class="dailyPaper" @click="selectDailyPaper(item)">
-                  <el-icon :style="'transform: translateY(2px); color: ' + (dailyPaperId === item.id ? '#46a6ff;' : '#000;')"><User /></el-icon>
+                  <el-icon :style="'transform: translateY(2px); color: ' + (dailyPaperId === item.id ? '#46a6ff;' : '#000;')">
+                    <User />
+                  </el-icon>
                   <span :style="'margin-left: 8px; color: ' + (dailyPaperId === item.id ? '#46a6ff;' : '#000;')">{{ item.userName }}的日报</span>
                 </div>
               </li>
@@ -111,14 +111,14 @@
                 <el-tooltip class="box-item" effect="light" placement="bottom-end">
                   <template #content>
                     <div style="padding: 8px 0; cursor: pointer" @click="clickShare(dailyPaperDetail)">分享这篇日报</div>
-                    <div
-                      style="padding: 8px 0; cursor: pointer"
-                      @click="clickLookOver(dailyPaperDetail)"
-                      v-if="dailyPaperDetail.createUser !== useUserStore().user.userId">
+                    <div style="padding: 8px 0; cursor: pointer" @click="clickLookOver(dailyPaperDetail)"
+                         v-if="dailyPaperDetail.createUser !== useUserStore().user.userId">
                       查看所有日报
                     </div>
                   </template>
-                  <el-icon><MoreFilled /></el-icon>
+                  <el-icon>
+                    <MoreFilled />
+                  </el-icon>
                 </el-tooltip>
               </div>
             </div>
@@ -180,13 +180,17 @@
             <div style="padding: 8px 0" v-if="dailyPaperDetail.commentList && dailyPaperDetail.commentList.length > 0">
               <div style="display: flex; margin-bottom: 16px" v-for="item in dailyPaperDetail.commentList" :key="item.id">
                 <div style="margin: 8px">
-                  <el-icon style="font-size: 32px"><User /></el-icon>
+                  <el-icon style="font-size: 32px">
+                    <User />
+                  </el-icon>
                 </div>
                 <div style="width: calc(100% - 48px)">
                   <div style="padding: 4px 0; position: relative">
                     <span>{{ item.userName }}</span>
                     <div style="position: absolute; right: 0; top: 2px; cursor: pointer" @click="clickReply(item)">
-                      <el-icon style="transform: translateY(3px); font-size: 18px"><ChatDotRound /></el-icon>
+                      <el-icon style="transform: translateY(3px); font-size: 18px">
+                        <ChatDotRound />
+                      </el-icon>
                       <span style="margin-left: 8px">回复</span>
                     </div>
                   </div>
@@ -340,9 +344,15 @@ const formConfig = computed(() => {
   ];
 });
 let rules = ref({
-  completedWork: [{ required: true, message: "请输入今日完成工作", trigger: "blur" }],
-  unfinishedWork: [{ required: true, message: "请输入未完成工作", trigger: "blur" }],
-  coordinatedWork: [{ required: true, message: "请输入需协调工作", trigger: "blur" }],
+  completedWork: [
+    { required: true, message: "请输入今日完成工作", trigger: "blur" },
+  ],
+  unfinishedWork: [
+    { required: true, message: "请输入未完成工作", trigger: "blur" },
+  ],
+  coordinatedWork: [
+    { required: true, message: "请输入需协调工作", trigger: "blur" },
+  ],
 });
 const formShare = reactive({
   data: {
@@ -363,7 +373,9 @@ const formConfigShare = computed(() => {
   ];
 });
 let rulesShare = ref({
-  completedWork: [{ required: true, message: "请输入今日完成工作", trigger: "blur" }],
+  completedWork: [
+    { required: true, message: "请输入今日完成工作", trigger: "blur" },
+  ],
 });
 const selectState = ref(false);
 watch(
@@ -405,14 +417,20 @@ const getList = () => {
     sourceList.value.data = sourceList.value.data.concat(res.rows);
     sourceList.value.total = res.total;
     if (sourceList.value.data && sourceList.value.data.length > 0) {
-      if (dailyPaperId.value !== sourceList.value.data[0].id && !sourceList.value.pagination.senderId) {
+      if (
+        dailyPaperId.value !== sourceList.value.data[0].id &&
+        !sourceList.value.pagination.senderId
+      ) {
         selectDailyPaper(sourceList.value.data[0]);
       }
     } else {
       dailyPaperDetail.value = {};
       dailyPaperId.value = "";
     }
-    if (sourceList.value.total > sourceList.value.pagination.pageNum * sourceList.value.pagination.pageSize) {
+    if (
+      sourceList.value.total >
+      sourceList.value.pagination.pageNum * sourceList.value.pagination.pageSize
+    ) {
       load();
     }
   });
@@ -433,7 +451,10 @@ const newDaily = () => {
   newStatus.value = true;
 };
 const load = () => {
-  if (sourceList.value.total > sourceList.value.pagination.pageNum * sourceList.value.pagination.pageSize) {
+  if (
+    sourceList.value.total >
+    sourceList.value.pagination.pageNum * sourceList.value.pagination.pageSize
+  ) {
     sourceList.value.pagination.pageNum++;
     getList();
   }
@@ -466,15 +487,25 @@ const selectDailyPaper = (item) => {
   dailyPaperId.value = item.id;
   proxy.post("/dailyReport/detail", { id: item.id }).then((res) => {
     dailyPaperDetail.value = res;
-    proxy.post("/fileInfo/getList", { businessIdList: [item.id], fileType: 1 }).then((resPicture) => {
-      dailyPaperDetail.value.imgList = resPicture[item.id];
-    });
-    proxy.post("/fileInfo/getList", { businessIdList: [item.id], fileType: 2 }).then((resFile) => {
-      dailyPaperDetail.value.attachmentList = resFile[item.id];
-    });
-    proxy.post("/dailyReportComments/page", { pageNum: 1, pageSize: 999, dailyReportId: item.id }).then((res) => {
-      dailyPaperDetail.value.commentList = res.rows;
-    });
+    proxy
+      .post("/fileInfo/getList", { businessIdList: [item.id], fileType: 1 })
+      .then((resPicture) => {
+        dailyPaperDetail.value.imgList = resPicture[item.id];
+      });
+    proxy
+      .post("/fileInfo/getList", { businessIdList: [item.id], fileType: 2 })
+      .then((resFile) => {
+        dailyPaperDetail.value.attachmentList = resFile[item.id];
+      });
+    proxy
+      .post("/dailyReportComments/page", {
+        pageNum: 1,
+        pageSize: 999,
+        dailyReportId: item.id,
+      })
+      .then((res) => {
+        dailyPaperDetail.value.commentList = res.rows;
+      });
   });
 };
 const judgeShow = (data, item, index) => {
@@ -485,7 +516,9 @@ const judgeShow = (data, item, index) => {
   return status;
 };
 const uploadPicture = async (file) => {
-  if (!["image/gif", "image/jpeg", "image/jpg", "image/png"].includes(file.type)) {
+  if (
+    !["image/gif", "image/jpeg", "image/jpg", "image/png"].includes(file.type)
+  ) {
     ElMessage("请上传格式为gif、jpeg、jpg、png的图片");
     return false;
   } else if (file.size / 1024 / 1024 > 3) {
@@ -534,12 +567,17 @@ const clickSubmit = () => {
         };
       });
     }
-    if (dailyReportDetailsList.value && dailyReportDetailsList.value.length > 0) {
-      formData.data.dailyReportDetailsList = dailyReportDetailsList.value.map((item) => {
-        return {
-          recipientId: item,
-        };
-      });
+    if (
+      dailyReportDetailsList.value &&
+      dailyReportDetailsList.value.length > 0
+    ) {
+      formData.data.dailyReportDetailsList = dailyReportDetailsList.value.map(
+        (item) => {
+          return {
+            recipientId: item,
+          };
+        }
+      );
       proxy.post("/dailyReport/add", formData.data).then(() => {
         ElMessage({
           message: "新建成功",
@@ -553,10 +591,16 @@ const clickSubmit = () => {
   });
 };
 const getUser = () => {
-  proxy.get("/tenantUser/list", { pageNum: 1, pageSize: 10000, tenantId: useUserStore().user.tenantId }).then((res) => {
-    userList.value = res.rows;
-    // .filter((item) => item.userId !== useUserStore().user.userId);
-  });
+  proxy
+    .get("/tenantUser/list", {
+      pageNum: 1,
+      pageSize: 10000,
+      tenantId: useUserStore().user.tenantId,
+    })
+    .then((res) => {
+      userList.value = res.rows;
+      // .filter((item) => item.userId !== useUserStore().user.userId);
+    });
 };
 const getStyle = (val) => {
   if (val) {
@@ -577,16 +621,27 @@ const commentSubmit = () => {
   if (!comment.data.text) {
     return ElMessage("请输入评论内容");
   }
-  proxy.post("/dailyReportComments/add", { ...comment.data, dailyReportId: dailyPaperId.value }).then(() => {
-    ElMessage({
-      message: "评论成功",
-      type: "success",
-    });
-    comment.data = {};
-    proxy.post("/dailyReportComments/page", { pageNum: 1, pageSize: 999, dailyReportId: dailyPaperId.value }).then((res) => {
-      dailyPaperDetail.value.commentList = res.rows;
+  proxy
+    .post("/dailyReportComments/add", {
+      ...comment.data,
+      dailyReportId: dailyPaperId.value,
+    })
+    .then(() => {
+      ElMessage({
+        message: "评论成功",
+        type: "success",
+      });
+      comment.data = {};
+      proxy
+        .post("/dailyReportComments/page", {
+          pageNum: 1,
+          pageSize: 999,
+          dailyReportId: dailyPaperId.value,
+        })
+        .then((res) => {
+          dailyPaperDetail.value.commentList = res.rows;
+        });
     });
-  });
 };
 const clickReply = (item) => {
   reply.data.text = "";
@@ -596,17 +651,28 @@ const replySubmit = () => {
   if (!reply.data.text) {
     return ElMessage("请输入回复内容");
   }
-  proxy.post("/dailyReportComments/add", { ...reply.data, dailyReportId: dailyPaperId.value }).then(() => {
-    ElMessage({
-      message: "回复成功",
-      type: "success",
-    });
-    reply.data.text = "";
-    reply.data.replyId = "";
-    proxy.post("/dailyReportComments/page", { pageNum: 1, pageSize: 999, dailyReportId: dailyPaperId.value }).then((res) => {
-      dailyPaperDetail.value.commentList = res.rows;
+  proxy
+    .post("/dailyReportComments/add", {
+      ...reply.data,
+      dailyReportId: dailyPaperId.value,
+    })
+    .then(() => {
+      ElMessage({
+        message: "回复成功",
+        type: "success",
+      });
+      reply.data.text = "";
+      reply.data.replyId = "";
+      proxy
+        .post("/dailyReportComments/page", {
+          pageNum: 1,
+          pageSize: 999,
+          dailyReportId: dailyPaperId.value,
+        })
+        .then((res) => {
+          dailyPaperDetail.value.commentList = res.rows;
+        });
     });
-  });
 };
 const clickShare = (detail) => {
   formShare.data.id = detail.id;

+ 12 - 61
src/views/oa/work/task/index.vue

@@ -1,21 +1,13 @@
 <template>
   <div class="tenant">
     <div class="content">
-      <byTable
-        :source="sourceList.data"
-        :pagination="sourceList.pagination"
-        :config="config"
-        :loading="loading"
-        :selectConfig="selectConfig"
-        highlight-current-row
-        :action-list="[
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
+               highlight-current-row :action-list="[
           {
             text: '添加任务',
             action: () => openModal('add'),
           },
-        ]"
-        @get-list="getList"
-      >
+        ]" @get-list="getList">
         <template #title="{ item }">
           <div>
             <span style="color: #409eff">{{ item.title }}</span>
@@ -23,76 +15,37 @@
         </template>
         <template #file="{ item }">
           <div>
-            <span
-              style="color: #409eff; cursor: pointer"
-              @click="clickFile(item.id)"
-              >{{ item.fileName }}</span
-            >
+            <span style="color: #409eff; cursor: pointer" @click="clickFile(item.id)">{{ item.fileName }}</span>
           </div>
         </template>
       </byTable>
     </div>
 
-    <el-dialog
-      :title="modalType == 'add' ? '添加任务' : '编辑任务'"
-      v-if="dialogVisible"
-      v-model="dialogVisible"
-      width="600"
-      v-loading="loadingDialog"
-    >
-      <byForm
-        :formConfig="formConfig"
-        :formOption="formOption"
-        v-model="formData.data"
-        :rules="rules"
-        ref="submit"
-      >
+    <el-dialog :title="modalType == 'add' ? '添加任务' : '编辑任务'" v-if="dialogVisible" v-model="dialogVisible" width="600" v-loading="loadingDialog">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
         <template #importanceLv>
           <div>
             <el-radio-group v-model="formData.data.importanceLv">
-              <el-radio
-                v-for="item in importanceLv"
-                :key="item.value"
-                :label="item.value"
-                border
-                >{{ item.label }}</el-radio
-              >
+              <el-radio v-for="item in importanceLv" :key="item.value" :label="item.value" border>{{ item.label }}</el-radio>
             </el-radio-group>
           </div>
         </template>
         <template #urgencyLv>
           <div>
             <el-radio-group v-model="formData.data.urgencyLv">
-              <el-radio
-                v-for="item in urgencyLv"
-                :key="item.value"
-                :label="item.value"
-                border
-                >{{ item.label }}</el-radio
-              >
+              <el-radio v-for="item in urgencyLv" :key="item.value" :label="item.value" border>{{ item.label }}</el-radio>
             </el-radio-group>
           </div>
         </template>
         <template #dueDate>
           <div>
-            <el-date-picker
-              v-model="formData.data.dueDate"
-              type="date"
-              placeholder="请选择完成期限"
-              value-format="YYYY-MM-DD"
-            />
+            <el-date-picker v-model="formData.data.dueDate" type="date" placeholder="请选择完成期限" value-format="YYYY-MM-DD" />
           </div>
         </template>
         <template #fileList>
           <div style="width: 100%">
-            <el-upload
-              v-model:fileList="fileList"
-              action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-              :data="uploadData"
-              :limit="1"
-              :before-upload="uploadFile"
-              :on-preview="onPreviewFile"
-            >
+            <el-upload v-model:fileList="fileList" :action="uploadUrl" :data="uploadData" :limit="1" :before-upload="uploadFile"
+                       :on-preview="onPreviewFile">
               <el-button>选择</el-button>
             </el-upload>
           </div>
@@ -100,9 +53,7 @@
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitForm()" size="large"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitForm()" size="large">确 定</el-button>
       </template>
     </el-dialog>
   </div>

+ 37 - 166
src/views/process/processApproval/index.vue

@@ -11,150 +11,60 @@
           }}
         </div>
         <div class="line"></div>
-        <SendSubscribe
-          ref="makeDom"
-          @auxiliaryChange="(e) => getAuxiliaryData(e)"
-          v-if="flowForm.flowKey == 'subscribe_flow'"
-          :queryData="queryData.data"
-        ></SendSubscribe>
-        <SendPurchase
-          ref="makeDom"
-          @auxiliaryChange="(e) => getAuxiliaryData(e)"
-          v-else-if="flowForm.flowKey == 'purchase_flow'"
-          :queryData="queryData.data"
-        ></SendPurchase>
-        <SendFunds
-          ref="makeDom"
-          v-else-if="flowForm.flowKey == 'account_request_funds_flow'"
-          :queryData="queryData.data"
-        ></SendFunds>
-        <ReturnGood
-          ref="makeDom"
-          v-else-if="flowForm.flowKey == 'sales_return_flow'"
-          :queryData="queryData.data"
-        ></ReturnGood>
-        <PurchaseRefund
-          ref="makeDom"
-          v-else-if="flowForm.flowKey == 'refund_flow'"
-          :queryData="queryData.data"
-        ></PurchaseRefund>
-        <PurchasePayment
-          ref="makeDom"
-          @auxiliaryChange="(e) => getAuxiliaryData(e)"
-          v-else-if="flowForm.flowKey == 'pay_flow'"
-          :queryData="queryData.data"
-        ></PurchasePayment>
+        <SendSubscribe ref="makeDom" @auxiliaryChange="(e) => getAuxiliaryData(e)" v-if="flowForm.flowKey == 'subscribe_flow'"
+                       :queryData="queryData.data"></SendSubscribe>
+        <SendPurchase ref="makeDom" @auxiliaryChange="(e) => getAuxiliaryData(e)" v-else-if="flowForm.flowKey == 'purchase_flow'"
+                      :queryData="queryData.data"></SendPurchase>
+        <SendFunds ref="makeDom" v-else-if="flowForm.flowKey == 'account_request_funds_flow'" :queryData="queryData.data"></SendFunds>
+        <ReturnGood ref="makeDom" v-else-if="flowForm.flowKey == 'sales_return_flow'" :queryData="queryData.data"></ReturnGood>
+        <PurchaseRefund ref="makeDom" v-else-if="flowForm.flowKey == 'refund_flow'" :queryData="queryData.data"></PurchaseRefund>
+        <PurchasePayment ref="makeDom" @auxiliaryChange="(e) => getAuxiliaryData(e)" v-else-if="flowForm.flowKey == 'pay_flow'"
+                         :queryData="queryData.data"></PurchasePayment>
         <template v-else-if="flowForm.flowKey == 'sale_quotation_flow'">
-          <PriceSheetEHSD
-            ref="makeDom"
-            v-if="flowForm.tenantType === 'EHSD'"
-            :queryData="queryData.data"
-          ></PriceSheetEHSD>
-          <PriceSheet
-            ref="makeDom"
-            v-else
-            :queryData="queryData.data"
-          ></PriceSheet>
+          <PriceSheetEHSD ref="makeDom" v-if="flowForm.tenantType === 'EHSD'" :queryData="queryData.data"></PriceSheetEHSD>
+          <PriceSheet ref="makeDom" v-else :queryData="queryData.data"></PriceSheet>
         </template>
         <template v-else-if="flowForm.flowKey == 'contract_flow'">
-          <ContractEHSD
-            ref="makeDom"
-            v-if="flowForm.tenantType === 'EHSD'"
-            :queryData="queryData.data"
-          ></ContractEHSD>
-          <Contract
-            ref="makeDom"
-            v-else
-            :queryData="queryData.data"
-            @auxiliaryChange="(e) => getAuxiliaryData(e)"
-          ></Contract>
+          <ContractEHSD ref="makeDom" v-if="flowForm.tenantType === 'EHSD'" :queryData="queryData.data"></ContractEHSD>
+          <Contract ref="makeDom" v-else :queryData="queryData.data" @auxiliaryChange="(e) => getAuxiliaryData(e)"></Contract>
         </template>
         <template v-else-if="flowForm.flowKey == 'contract_update_flow'">
-          <ContractAlteration
-            ref="makeDom"
-            :queryData="queryData.data"
-            @auxiliaryChange="(e) => getAuxiliaryData(e)"
-          ></ContractAlteration>
+          <ContractAlteration ref="makeDom" :queryData="queryData.data" @auxiliaryChange="(e) => getAuxiliaryData(e)"></ContractAlteration>
         </template>
         <template v-else-if="flowForm.flowKey == 'sample_flow'">
           <SampleEHSD ref="makeDom" :queryData="queryData.data"></SampleEHSD>
         </template>
         <template v-else-if="flowForm.flowKey == 'ehsd_purchase_flow'">
-          <PurchaseEHSD
-            ref="makeDom"
-            :queryData="queryData.data"
-          ></PurchaseEHSD>
+          <PurchaseEHSD ref="makeDom" :queryData="queryData.data"></PurchaseEHSD>
         </template>
 
-        <ServiceContract
-          ref="makeDom"
-          v-else-if="flowForm.flowKey == 'service_contract_flow'"
-          :queryData="queryData.data"
-        ></ServiceContract>
+        <ServiceContract ref="makeDom" v-else-if="flowForm.flowKey == 'service_contract_flow'" :queryData="queryData.data"></ServiceContract>
         <!-- 维多利亚 -->
-        <SendSubscribeWDLY
-          ref="makeDom"
-          v-else-if="flowForm.flowKey == 'wdly_apply_purchase'"
-          :queryData="queryData.data"
-        ></SendSubscribeWDLY>
-        <SendPurchaseWDLY
-          ref="makeDom"
-          v-else-if="flowForm.flowKey == 'wdly_purchase'"
-          :queryData="queryData.data"
-        ></SendPurchaseWDLY>
+        <SendSubscribeWDLY ref="makeDom" v-else-if="flowForm.flowKey == 'wdly_apply_purchase'" :queryData="queryData.data"></SendSubscribeWDLY>
+        <SendPurchaseWDLY ref="makeDom" v-else-if="flowForm.flowKey == 'wdly_purchase'" :queryData="queryData.data"></SendPurchaseWDLY>
       </div>
       <div class="bottom" v-if="route.query.processType != 20">
         <div class="commons-title title">处理意见</div>
         <el-form :model="flowForm" :rules="flowRules" ref="flowFormDom">
           <el-form-item prop="remark" label-width="0px" label="">
-            <el-input
-              type="textarea"
-              placeholder="请输入"
-              v-model="flowForm.remark"
-            >
+            <el-input type="textarea" placeholder="请输入" v-model="flowForm.remark">
             </el-input>
           </el-form-item>
           <el-form-item prop="remark" label-width="80px" label="附件上传">
-            <el-upload
-              v-model:fileList="flowForm.fileList"
-              action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-              :data="uploadData"
-              multiple
-              :before-upload="uploadFile"
-              :on-success="handleSuccess"
-              :on-preview="onPreviewFile"
-            >
+            <el-upload v-model:fileList="flowForm.fileList" :action="uploadUrl" :data="uploadData" multiple :before-upload="uploadFile"
+                       :on-success="handleSuccess" :on-preview="onPreviewFile">
               <el-button>选择</el-button>
             </el-upload>
           </el-form-item>
           <el-form-item>
-            <el-button
-              type="primary"
-              v-if="approvalRecordData.buttonInfoList.length == 0"
-              @click="handleSubmit"
-              :loading="btnLoading"
-              >提交</el-button
-            >
-            <el-button
-              type="primary"
-              v-if="
+            <el-button type="primary" v-if="approvalRecordData.buttonInfoList.length == 0" @click="handleSubmit" :loading="btnLoading">提交</el-button>
+            <el-button type="primary" v-if="
                 approvalRecordData.buttonInfoList.length == 0 &&
                 StagFlowKey.includes(flowForm.flowKey)
-              "
-              @click="handleSubmitStag"
-              :loading="btnLoading"
-              >暂存</el-button
-            >
+              " @click="handleSubmitStag" :loading="btnLoading">暂存</el-button>
 
-            <el-button
-              type="primary"
-              v-else
-              v-for="i in approvalRecordData.buttonInfoList"
-              :key="i.type"
-              :loading="btnLoading"
-              @click="handleSubmit(i.type)"
-              >{{ i.name }}</el-button
-            >
+            <el-button type="primary" v-else v-for="i in approvalRecordData.buttonInfoList" :key="i.type" :loading="btnLoading"
+                       @click="handleSubmit(i.type)">{{ i.name }}</el-button>
           </el-form-item>
         </el-form>
       </div>
@@ -163,10 +73,7 @@
       <el-tabs v-model="activeName" class="demo-tabs">
         <el-tab-pane label="审批记录" name="first">
           <ul class="flow-chart">
-            <li
-              v-for="(item, index) in recordList"
-              :key="item.id"
-              :class="
+            <li v-for="(item, index) in recordList" :key="item.id" :class="
                 !route.query.id
                   ? index == 0
                     ? ''
@@ -178,8 +85,7 @@
                   : item.status == 3 && route.query.id
                   ? 'flow-grey'
                   : ''
-              "
-            >
+              ">
               <div class="left-icon">
                 <i class="iconfont icon-iconm_daick"></i>
                 <i class="iconfont icon-icomx_quertj1 right-btm-status"></i>
@@ -191,21 +97,13 @@
                 </div>
                 <div class="remark">
                   <div class="label">
-                    <span v-if="item.status != 3">办理人:</span
-                    >{{ item.processedUser
+                    <span v-if="item.status != 3">办理人:</span>{{ item.processedUser
                     }}<span class="time">{{ item.processedDate }}</span>
                   </div>
                   {{ item.remark }}
-                  <div
-                    v-for="j in fileObj[item.flowExampleDetailId]"
-                    v-if="fileObj[item.flowExampleDetailId]"
-                  >
+                  <div v-for="j in fileObj[item.flowExampleDetailId]" v-if="fileObj[item.flowExampleDetailId]">
                     <!-- :href="j.fileUrl" -->
-                    <a
-                      @click="proxy.download(j.fileUrl, j.fileName)"
-                      style="color: #409eff; line-height: 30px"
-                      >{{ j.fileName }}</a
-                    >
+                    <a @click="proxy.download(j.fileUrl, j.fileName)" style="color: #409eff; line-height: 30px">{{ j.fileName }}</a>
                   </div>
                 </div>
               </div>
@@ -213,21 +111,10 @@
             </li>
           </ul>
           <div>
-            <el-button
-              type="primary"
-              :loading="btnLoading"
-              style="margin: 20px 150px"
-              v-if="isRevocation"
-              @click="handleSubmit(3)"
-              >撤回</el-button
-            >
+            <el-button type="primary" :loading="btnLoading" style="margin: 20px 150px" v-if="isRevocation" @click="handleSubmit(3)">撤回</el-button>
           </div>
         </el-tab-pane>
-        <el-tab-pane
-          label="决策辅助"
-          name="second"
-          v-if="auxiliaryData.length > 0"
-        >
+        <el-tab-pane label="决策辅助" name="second" v-if="auxiliaryData.length > 0">
           <div style="overflow: auto; height: calc(100vh - 200px)">
             <auxiliary :data="auxiliaryData"></auxiliary>
           </div>
@@ -235,28 +122,12 @@
       </el-tabs>
     </div>
 
-    <el-dialog
-      title="下一处理人"
-      width="400"
-      v-model="dialogVisible"
-      v-if="dialogVisible"
-      :show-close="false"
-      :close-on-click-modal="false"
-      :close-on-press-escape="false"
-    >
+    <el-dialog title="下一处理人" width="400" v-model="dialogVisible" v-if="dialogVisible" :show-close="false" :close-on-click-modal="false"
+               :close-on-press-escape="false">
       <el-form :model="flowForm">
         <el-form-item prop="remark" label="处理人">
-          <el-select
-            v-model="flowForm.handleUserId"
-            placeholder="请选择"
-            filterable
-            style="width: 100%"
-          >
-            <el-option
-              v-for="item in nextHandleUser"
-              :label="item.nickName"
-              :value="item.userId"
-            >
+          <el-select v-model="flowForm.handleUserId" placeholder="请选择" filterable style="width: 100%">
+            <el-option v-for="item in nextHandleUser" :label="item.nickName" :value="item.userId">
             </el-option>
           </el-select>
         </el-form-item>

+ 18 - 71
src/views/product/material/index.vue

@@ -1,29 +1,16 @@
 <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" :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" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
+               :selectConfig="selectConfig" :table-events="{
           //element talbe事件都能传
           select: select,
-        }"
-        :action-list="[
+        }" :action-list="[
           props.selectStatus
             ? {}
             : {
@@ -38,48 +25,25 @@
                 action: () => openModal('add'),
                 disabled: false,
               },
-        ]"
-        @get-list="getList"
-      >
+        ]" @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])"
-            />
+            <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"
-      destroy-on-close
-    >
+    <el-dialog :title="modalType == 'add' ? '添加' : '编辑'" v-model="dialogVisible" width="500" v-loading="loading" destroy-on-close>
       <div class="public_height_dialog">
-        <byForm
-          :formConfig="formConfig"
-          :formOption="formOption"
-          v-model="formData.data"
-          :rules="rules"
-          ref="byform"
-        >
+        <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 v-model:fileList="fileList" :action="uploadUrl" :data="uploadData" list-type="picture-card" :on-remove="handleRemove"
+                         :on-success="handleSuccess" :before-upload="handleBeforeUpload">
+                <el-icon>
+                  <Plus />
+                </el-icon>
               </el-upload>
             </div>
           </template>
@@ -88,32 +52,15 @@
 
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button
-          type="primary"
-          v-no-double-click="submitForm"
-          size="large"
-          :loading="submitLoading"
-        >
+        <el-button type="primary" v-no-double-click="submitForm" size="large" :loading="submitLoading">
           确 定
         </el-button>
       </template>
     </el-dialog>
-    <el-dialog
-      title="Excel导入"
-      v-model="openExcelDialog"
-      width="400"
-      v-loading="loading"
-    >
+    <el-dialog title="Excel导入" v-model="openExcelDialog" width="400" v-loading="loading">
       <template #footer>
-        <el-button @click="openExcelDialog = false" size="large"
-          >取 消</el-button
-        >
-        <el-button
-          type="primary"
-          @click="submitExcel()"
-          size="large"
-          :loading="submitLoading"
-        >
+        <el-button @click="openExcelDialog = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitExcel()" size="large" :loading="submitLoading">
           确 定
         </el-button>
       </template>

+ 23 - 83
src/views/product/product/index.vue

@@ -1,30 +1,16 @@
 <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" :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"
-        :statConfig="statConfig"
-        :table-events="{
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
+               :selectConfig="selectConfig" :statConfig="statConfig" :table-events="{
           //element talbe事件都能传
           select: select,
-        }"
-        :action-list="[
+        }" :action-list="[
           {
             text: 'Excel导入',
             action: () => openExcel(),
@@ -35,17 +21,10 @@
             action: () => openModal('add'),
             disabled: false,
           },
-        ]"
-        @get-list="getList"
-        @moreSearch="retrievalModal = true"
-      >
+        ]" @get-list="getList" @moreSearch="retrievalModal = true">
         <template #pic="{ item }">
           <div v-if="item.fileList.length > 0">
-            <img
-              :src="item.fileList[0].fileUrl"
-              class="pic"
-              @click="handleClickFile(item.fileList[0])"
-            />
+            <img :src="item.fileList[0].fileUrl" class="pic" @click="handleClickFile(item.fileList[0])" />
           </div>
           <div v-else></div>
         </template>
@@ -56,11 +35,7 @@
         <h4>高级检索</h4>
       </template>
       <template #default>
-        <byForm
-          :formConfig="formConfig2"
-          :formOption="formOption"
-          v-model="sourceList.pagination"
-        >
+        <byForm :formConfig="formConfig2" :formOption="formOption" v-model="sourceList.pagination">
           <template #slot> 可自定义所需功能 </template>
         </byForm>
       </template>
@@ -71,34 +46,16 @@
         </div>
       </template>
     </el-drawer>
-    <el-dialog
-      :title="modalType == 'add' ? '添加' : '编辑'"
-      v-model="dialogVisible"
-      width="500"
-      v-loading="loading"
-      destroy-on-close
-    >
+    <el-dialog :title="modalType == 'add' ? '添加' : '编辑'" v-model="dialogVisible" width="500" v-loading="loading" destroy-on-close>
       <div class="public_height_dialog">
-        <byForm
-          :formConfig="formConfig"
-          :formOption="formOption"
-          v-model="formData.data"
-          :rules="rules"
-          ref="byform"
-        >
+        <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"
-                accept=".gif, .jpeg, .jpg, .png"
-              >
-                <el-icon><Plus /></el-icon>
+              <el-upload v-model:fileList="fileList" :action="uploadUrl" :data="uploadData" list-type="picture-card" :on-remove="handleRemove"
+                         :on-success="handleSuccess" :before-upload="handleBeforeUpload" accept=".gif, .jpeg, .jpg, .png">
+                <el-icon>
+                  <Plus />
+                </el-icon>
               </el-upload>
             </div>
           </template>
@@ -107,32 +64,15 @@
 
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button
-          type="primary"
-          v-no-double-click="submitForm"
-          size="large"
-          :loading="submitLoading"
-        >
+        <el-button type="primary" v-no-double-click="submitForm" size="large" :loading="submitLoading">
           确 定
         </el-button>
       </template>
     </el-dialog>
-    <el-dialog
-      title="Excel导入"
-      v-model="openExcelDialog"
-      width="400"
-      v-loading="loading"
-    >
+    <el-dialog title="Excel导入" v-model="openExcelDialog" width="400" v-loading="loading">
       <template #footer>
-        <el-button @click="openExcelDialog = false" size="large"
-          >取 消</el-button
-        >
-        <el-button
-          type="primary"
-          @click="submitExcel()"
-          size="large"
-          :loading="submitLoading"
-        >
+        <el-button @click="openExcelDialog = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitExcel()" size="large" :loading="submitLoading">
           确 定
         </el-button>
       </template>
@@ -528,7 +468,7 @@ const getList = async (req) => {
 };
 
 const treeChange = (e) => {
-  console.log(e,123123);
+  console.log(e, 123123);
   sourceList.value.pagination.productClassifyId = e.id;
   getList({ productClassifyId: e.id });
 };
@@ -690,9 +630,9 @@ const getDict = () => {
 };
 getDict();
 const clickSearch = () => {
-  sourceList.value.pagination.keyword = '';
-  getList()
-}
+  sourceList.value.pagination.keyword = "";
+  getList();
+};
 </script>
   
 <style lang="scss" scoped>

+ 18 - 72
src/views/product/product/index2.vue

@@ -1,29 +1,16 @@
 <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" :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" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
+               :selectConfig="selectConfig" :table-events="{
           //element talbe事件都能传
           select: select,
-        }"
-        :action-list="[
+        }" :action-list="[
           {
             text: 'Excel导入',
             action: () => openExcel(),
@@ -34,49 +21,25 @@
             action: () => openModal('add'),
             disabled: false,
           },
-        ]"
-        @get-list="getList"
-      >
+        ]" @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])"
-            />
+            <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"
-      destroy-on-close
-    >
+    <el-dialog :title="modalType == 'add' ? '添加' : '编辑'" v-model="dialogVisible" width="500" v-loading="loading" destroy-on-close>
       <div class="public_height_dialog">
-        <byForm
-          :formConfig="formConfig"
-          :formOption="formOption"
-          v-model="formData.data"
-          :rules="rules"
-          ref="byform"
-        >
+        <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"
-                accept=".gif, .jpeg, .jpg, .png"
-              >
-                <el-icon><Plus /></el-icon>
+              <el-upload v-model:fileList="fileList" :action="uploadUrl" :data="uploadData" list-type="picture-card" :on-remove="handleRemove"
+                         :on-success="handleSuccess" :before-upload="handleBeforeUpload" accept=".gif, .jpeg, .jpg, .png">
+                <el-icon>
+                  <Plus />
+                </el-icon>
               </el-upload>
             </div>
           </template>
@@ -85,32 +48,15 @@
 
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button
-          type="primary"
-          v-no-double-click="submitForm"
-          size="large"
-          :loading="submitLoading"
-        >
+        <el-button type="primary" v-no-double-click="submitForm" size="large" :loading="submitLoading">
           确 定
         </el-button>
       </template>
     </el-dialog>
-    <el-dialog
-      title="Excel导入"
-      v-model="openExcelDialog"
-      width="400"
-      v-loading="loading"
-    >
+    <el-dialog title="Excel导入" v-model="openExcelDialog" width="400" v-loading="loading">
       <template #footer>
-        <el-button @click="openExcelDialog = false" size="large"
-          >取 消</el-button
-        >
-        <el-button
-          type="primary"
-          @click="submitExcel()"
-          size="large"
-          :loading="submitLoading"
-        >
+        <el-button @click="openExcelDialog = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitExcel()" size="large" :loading="submitLoading">
           确 定
         </el-button>
       </template>

+ 12 - 57
src/views/production/project/processes/index.vue

@@ -2,75 +2,35 @@
   <div class="tenant">
     <!-- <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事件都能传
           select: select,
-        }"
-        :action-list="[
+        }" :action-list="[
           {
             text: '添加工序',
             action: () => openModal('add'),
           },
-        ]"
-        @get-list="getList"
-      >
+        ]" @get-list="getList">
         <template #fileSlot="{ item }">
-          <div
-            style="cursor: pointer; color: #409eff"
-            @click="handleClickFile(item)"
-          >
+          <div style="cursor: pointer; color: #409eff" @click="handleClickFile(item)">
             {{ item.fileName }}
           </div>
         </template>
       </byTable>
     </div>
-    <el-dialog
-      :title="modalType == 'add' ? '添加工序' : '编辑工序'"
-      v-model="dialogVisible"
-      width="800"
-      v-loading="loading"
-    >
-      <byForm
-        :formConfig="formConfig"
-        :formOption="formOption"
-        v-model="formData.data"
-        :rules="rules"
-        ref="byform"
-      >
+    <el-dialog :title="modalType == 'add' ? '添加工序' : '编辑工序'" v-model="dialogVisible" width="800" v-loading="loading">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
         <template #slot>
           <div>
-            <el-upload
-              v-model:fileList="fileList"
-              class="upload-demo"
-              action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-              :limit="3"
-              :data="uploadData"
-              :on-preview="handlePreview"
-              :on-remove="handleRemove"
-              :on-success="handleSuccess"
-              :before-upload="handleBeforeUpload"
-              accept=".pdf"
-            >
+            <el-upload v-model:fileList="fileList" class="upload-demo" :action="uploadUrl" :limit="3" :data="uploadData" :on-preview="handlePreview"
+                       :on-remove="handleRemove" :on-success="handleSuccess" :before-upload="handleBeforeUpload" accept=".pdf">
               <el-button type="primary">点击上传</el-button>
               <template #file>
                 <div>
                   <div style="margin-top: 15px">
-                    <el-tag
-                      class="ml-2"
-                      type="info"
-                      v-for="(item, index) in fileList"
-                      :key="index"
-                      closable
-                      @close="handleClose(index)"
-                      >{{ item.fileName }}</el-tag
-                    >
+                    <el-tag class="ml-2" type="info" v-for="(item, index) in fileList" :key="index" closable
+                            @close="handleClose(index)">{{ item.fileName }}</el-tag>
                   </div>
                 </div>
               </template>
@@ -80,12 +40,7 @@
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button
-          type="primary"
-          v-no-double-click="submitForm"
-          size="large"
-          :loading="submitLoading"
-        >
+        <el-button type="primary" v-no-double-click="submitForm" size="large" :loading="submitLoading">
           确 定
         </el-button>
       </template>

+ 107 - 175
src/views/publicModule/companyConfig/index.vue

@@ -1,22 +1,14 @@
 <template>
   <div class="tenant">
-    <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="{
         select: select,
-      }"
-      :action-list="[
+      }" :action-list="[
         {
           text: '添加公司',
           action: () => openModal('add'),
         },
-      ]"
-      @get-list="getList">
+      ]" @get-list="getList">
       <template #timeSlot="{ item }"> {{ item.startDate }} - {{ item.stopDate }} </template>
     </byTable>
     <el-dialog :title="modalType == 'add' ? '添加公司' : '编辑公司'" v-if="dialogVisible" v-model="dialogVisible" width="600" v-loading="loading">
@@ -38,72 +30,31 @@
           <el-row style="width: 100%;display: flex;justify-content: space-between;">
             <el-col :span="7">
               <el-form-item prop="countryId">
-                <el-select
-                  v-model="formData.data.countryId"
-                  filterable
-                  remote
-                  reserve-keyword
-                  placeholder="请输入关键字"
-                  remote-show-suffix
-                  no-data-text="无数据,请联系管理员添加"
-                  :loading="loadingSearch"
-                  :remote-method="(val) => remoteMethod(val, '0')"
-                  @input="(val) => remoteMethod(val, '0')"
-                  @change="(val) => getCityData(val, '20')"
-                >
-                  <el-option
-                    v-for="item in countryData"
-                    :label="item.name"
-                    :value="item.id"
-                  >
+                <el-select v-model="formData.data.countryId" filterable remote reserve-keyword placeholder="请输入关键字" remote-show-suffix
+                           no-data-text="无数据,请联系管理员添加" :loading="loadingSearch" :remote-method="(val) => remoteMethod(val, '0')"
+                           @input="(val) => remoteMethod(val, '0')" @change="(val) => getCityData(val, '20')">
+                  <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="7">
               <el-form-item prop="provinceName">
-                <el-select
-                  v-model="formData.data.provinceId"
-                  filterable
-                  remote
-                  reserve-keyword
-                  placeholder="请输入关键字"
-                  remote-show-suffix
-                  no-data-text="无数据,请联系管理员添加"
-                  :loading="loadingSearchProvince"
-                  :remote-method="(val) => remoteMethod(val, '1')"
-                  @input="(val) => remoteMethod(val, '1')"
-                  @change="(val) => getCityData(val, '30')"
-                >
-                  <el-option
-                    v-for="item in provinceData"
-                    :label="item.name"
-                    :value="item.id"
-                  >
+                <el-select v-model="formData.data.provinceId" filterable remote reserve-keyword placeholder="请输入关键字" remote-show-suffix
+                           no-data-text="无数据,请联系管理员添加" :loading="loadingSearchProvince" :remote-method="(val) => remoteMethod(val, '1')"
+                           @input="(val) => remoteMethod(val, '1')" @change="(val) => getCityData(val, '30')">
+                  <el-option v-for="item in provinceData" :label="item.name" :value="item.id">
                   </el-option>
                 </el-select>
-                
+
               </el-form-item>
             </el-col>
             <el-col :span="7">
               <el-form-item prop="cityName">
-                <el-select
-                  v-model="formData.data.cityId"
-                  filterable
-                  remote
-                  reserve-keyword
-                  placeholder="请输入关键字"
-                  remote-show-suffix
-                  no-data-text="无数据,请联系管理员添加"
-                  :loading="loadingSearchCity"
-                  :remote-method="(val) => remoteMethod(val, '2')"
-                  @input="(val) => remoteMethod(val, '2')"
-                >
-                  <el-option
-                    v-for="item in cityData"
-                    :label="item.name"
-                    :value="item.id"
-                  >
+                <el-select v-model="formData.data.cityId" filterable remote reserve-keyword placeholder="请输入关键字" remote-show-suffix
+                           no-data-text="无数据,请联系管理员添加" :loading="loadingSearchCity" :remote-method="(val) => remoteMethod(val, '2')"
+                           @input="(val) => remoteMethod(val, '2')">
+                  <el-option v-for="item in cityData" :label="item.name" :value="item.id">
                   </el-option>
                 </el-select>
               </el-form-item>
@@ -148,100 +99,64 @@
             <el-row style="width: 100%">
               <el-col :span="6">
                 <el-form-item label="企业logo">
-                  <el-upload
-                    class="avatar-uploader"
-                    action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-                    :data="uploadDataOne"
-                    :show-file-list="false"
-                    :on-success="enterpriseLogoListSuccess"
-                    :before-upload="uploadFileOne">
-                    <el-image
-                      v-if="formData.data.enterpriseLogoList && formData.data.enterpriseLogoList.length > 0"
-                      :src="formData.data.enterpriseLogoList[0].fileUrl"
-                      fit="scale-down"
-                      class="avatar" />
-                    <el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
+                  <el-upload class="avatar-uploader" :action="uploadUrl" :data="uploadDataOne" :show-file-list="false"
+                             :on-success="enterpriseLogoListSuccess" :before-upload="uploadFileOne">
+                    <el-image v-if="formData.data.enterpriseLogoList && formData.data.enterpriseLogoList.length > 0"
+                              :src="formData.data.enterpriseLogoList[0].fileUrl" fit="scale-down" class="avatar" />
+                    <el-icon v-else class="avatar-uploader-icon">
+                      <Plus />
+                    </el-icon>
                   </el-upload>
-                  <el-button 
-                    class="delete-btn" 
-                    type="danger" 
-                    v-if="formData.data.enterpriseLogoList && formData.data.enterpriseLogoList.length > 0"
-                    @click="formData.data.enterpriseLogoList = []">
+                  <el-button class="delete-btn" type="danger" v-if="formData.data.enterpriseLogoList && formData.data.enterpriseLogoList.length > 0"
+                             @click="formData.data.enterpriseLogoList = []">
                     删除
                   </el-button>
                 </el-form-item>
               </el-col>
               <el-col :span="6">
                 <el-form-item label="法人签名">
-                  <el-upload
-                    class="avatar-uploader"
-                    action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-                    :data="uploadDataTwo"
-                    :show-file-list="false"
-                    :on-success="larSignListSuccess"
-                    :before-upload="uploadFileTwo">
-                    <el-image
-                      v-if="formData.data.larSignList && formData.data.larSignList.length > 0"
-                      :src="formData.data.larSignList[0].fileUrl"
-                      fit="scale-down"
-                      class="avatar" />
-                    <el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
+                  <el-upload class="avatar-uploader" :action="uploadUrl" :data="uploadDataTwo" :show-file-list="false"
+                             :on-success="larSignListSuccess" :before-upload="uploadFileTwo">
+                    <el-image v-if="formData.data.larSignList && formData.data.larSignList.length > 0" :src="formData.data.larSignList[0].fileUrl"
+                              fit="scale-down" class="avatar" />
+                    <el-icon v-else class="avatar-uploader-icon">
+                      <Plus />
+                    </el-icon>
                   </el-upload>
-                  <el-button 
-                    class="delete-btn" 
-                    type="danger" 
-                    v-if="formData.data.larSignList && formData.data.larSignList.length > 0"
-                    @click="formData.data.larSignList = []">
+                  <el-button class="delete-btn" type="danger" v-if="formData.data.larSignList && formData.data.larSignList.length > 0"
+                             @click="formData.data.larSignList = []">
                     删除
                   </el-button>
                 </el-form-item>
               </el-col>
               <el-col :span="6">
                 <el-form-item label="公章">
-                  <el-upload
-                    class="avatar-uploader"
-                    action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-                    :data="uploadDataThree"
-                    :show-file-list="false"
-                    :on-success="officialSealListSuccess"
-                    :before-upload="uploadFileThree">
-                    <el-image
-                      v-if="formData.data.officialSealList && formData.data.officialSealList.length > 0"
-                      :src="formData.data.officialSealList[0].fileUrl"
-                      fit="scale-down"
-                      class="avatar" />
-                    <el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
+                  <el-upload class="avatar-uploader" :action="uploadUrl" :data="uploadDataThree" :show-file-list="false"
+                             :on-success="officialSealListSuccess" :before-upload="uploadFileThree">
+                    <el-image v-if="formData.data.officialSealList && formData.data.officialSealList.length > 0"
+                              :src="formData.data.officialSealList[0].fileUrl" fit="scale-down" class="avatar" />
+                    <el-icon v-else class="avatar-uploader-icon">
+                      <Plus />
+                    </el-icon>
                   </el-upload>
-                  <el-button 
-                    class="delete-btn" 
-                    type="danger" 
-                     v-if="formData.data.officialSealList && formData.data.officialSealList.length > 0"
-                    @click="formData.data.officialSealList = []">
+                  <el-button class="delete-btn" type="danger" v-if="formData.data.officialSealList && formData.data.officialSealList.length > 0"
+                             @click="formData.data.officialSealList = []">
                     删除
                   </el-button>
                 </el-form-item>
               </el-col>
               <el-col :span="6">
                 <el-form-item label="合同章">
-                  <el-upload
-                    class="avatar-uploader"
-                    action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-                    :data="uploadDataFour"
-                    :show-file-list="false"
-                    :on-success="contractSealListSuccess"
-                    :before-upload="uploadFileFour">
-                    <el-image
-                      v-if="formData.data.contractSealList && formData.data.contractSealList.length > 0"
-                      :src="formData.data.contractSealList[0].fileUrl"
-                      fit="scale-down"
-                      class="avatar" />
-                    <el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
+                  <el-upload class="avatar-uploader" :action="uploadUrl" :data="uploadDataFour" :show-file-list="false"
+                             :on-success="contractSealListSuccess" :before-upload="uploadFileFour">
+                    <el-image v-if="formData.data.contractSealList && formData.data.contractSealList.length > 0"
+                              :src="formData.data.contractSealList[0].fileUrl" fit="scale-down" class="avatar" />
+                    <el-icon v-else class="avatar-uploader-icon">
+                      <Plus />
+                    </el-icon>
                   </el-upload>
-                  <el-button 
-                    class="delete-btn" 
-                    type="danger" 
-                    v-if="formData.data.contractSealList && formData.data.contractSealList.length > 0" 
-                    @click="formData.data.contractSealList = []">
+                  <el-button class="delete-btn" type="danger" v-if="formData.data.contractSealList && formData.data.contractSealList.length > 0"
+                             @click="formData.data.contractSealList = []">
                     删除
                   </el-button>
                 </el-form-item>
@@ -280,7 +195,9 @@ let modalType = ref("add");
 let rules = ref({
   name: [{ required: true, message: "请输入公司名称", trigger: "blur" }],
   countryId: [{ required: true, message: "请选择国家", trigger: "change" }],
-  countryEnStr: [{ required: true, message: "请输入国家 (英文)", trigger: "blur" }],
+  countryEnStr: [
+    { required: true, message: "请输入国家 (英文)", trigger: "blur" },
+  ],
 });
 const { proxy } = getCurrentInstance();
 const contactInformationType = ref([]);
@@ -376,11 +293,15 @@ const config = computed(() => {
             },
             el: "button",
             click() {
-              ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
-                confirmButtonText: "确定",
-                cancelButtonText: "取消",
-                type: "warning",
-              }).then(() => {
+              ElMessageBox.confirm(
+                "此操作将永久删除该数据, 是否继续?",
+                "提示",
+                {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning",
+                }
+              ).then(() => {
                 proxy
                   .post("/corporation/delete", {
                     id: row.id,
@@ -500,27 +421,31 @@ const formConfig = computed(() => {
   ];
 });
 const getDict = () => {
-  proxy.getDictOne(["enterprise_type", "taxpayer_qualification"]).then((res) => {
-    enterpriseType.value = res["enterprise_type"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    contactInformationType.value = res["taxpayer_qualification"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-  });
+  proxy
+    .getDictOne(["enterprise_type", "taxpayer_qualification"])
+    .then((res) => {
+      enterpriseType.value = res["enterprise_type"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      contactInformationType.value = res["taxpayer_qualification"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+    });
 };
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
-  proxy.post("/corporation/page", sourceList.value.pagination).then((message) => {
-    sourceList.value.data = message.rows;
-    sourceList.value.pagination.total = message.total;
-    setTimeout(() => {
-      loading.value = false;
-    }, 200);
-  });
+  proxy
+    .post("/corporation/page", sourceList.value.pagination)
+    .then((message) => {
+      sourceList.value.data = message.rows;
+      sourceList.value.pagination.total = message.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+    });
 };
 const countryData = ref([]);
 const provinceData = ref([]);
@@ -594,18 +519,26 @@ const getDtl = (row) => {
     if (formData.data.provinceId) {
       getCityData(formData.data.provinceId, "30");
     }
-    proxy.post("/fileInfo/getList", { businessIdList: [res.id], fileType: 1 }).then((resFile) => {
-      formData.data.enterpriseLogoList = resFile[res.id];
-    });
-    proxy.post("/fileInfo/getList", { businessIdList: [res.id], fileType: 2 }).then((resFile) => {
-      formData.data.larSignList = resFile[res.id];
-    });
-    proxy.post("/fileInfo/getList", { businessIdList: [res.id], fileType: 3 }).then((resFile) => {
-      formData.data.officialSealList = resFile[res.id];
-    });
-    proxy.post("/fileInfo/getList", { businessIdList: [res.id], fileType: 4 }).then((resFile) => {
-      formData.data.contractSealList = resFile[res.id];
-    });
+    proxy
+      .post("/fileInfo/getList", { businessIdList: [res.id], fileType: 1 })
+      .then((resFile) => {
+        formData.data.enterpriseLogoList = resFile[res.id];
+      });
+    proxy
+      .post("/fileInfo/getList", { businessIdList: [res.id], fileType: 2 })
+      .then((resFile) => {
+        formData.data.larSignList = resFile[res.id];
+      });
+    proxy
+      .post("/fileInfo/getList", { businessIdList: [res.id], fileType: 3 })
+      .then((resFile) => {
+        formData.data.officialSealList = resFile[res.id];
+      });
+    proxy
+      .post("/fileInfo/getList", { businessIdList: [res.id], fileType: 4 })
+      .then((resFile) => {
+        formData.data.contractSealList = resFile[res.id];
+      });
     dialogVisible.value = true;
   });
 };
@@ -711,13 +644,12 @@ const remoteMethod = (keyword, type) => {
   }
   return;
 };
-
 </script>
 
 <style lang="scss" scoped>
 .tenant {
   padding: 20px;
-  .delete-btn{
+  .delete-btn {
     margin-top: 10px;
     margin-left: 25px;
   }

+ 36 - 179
src/views/purchaseManage/purchaseManage/handoverSlip/index.vue

@@ -1,17 +1,9 @@
 <template>
   <div class="tenant">
-    <byTable
-      :source="sourceList.data"
-      :pagination="sourceList.pagination"
-      :config="config"
-      :loading="loading"
-      highlight-current-row
-      :selectConfig="selectConfig"
-      :row-class-name="getRowClass"
-      :table-events="{
+    <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
+             :selectConfig="selectConfig" :row-class-name="getRowClass" :table-events="{
         select: selectRow,
-      }"
-      :action-list="[
+      }" :action-list="[
         {
           text: '转生产',
           disabled: selectData.length === 0,
@@ -22,9 +14,7 @@
           disabled: selectData.length === 0,
           action: () => start(),
         },
-      ]"
-      @get-list="getList"
-    >
+      ]" @get-list="getList">
       <template #claimTime="{ item }">
         <div>
           <span v-if="item.claimTime">{{ item.claimTime }}</span>
@@ -33,118 +23,42 @@
       </template>
       <template #details="{ item }">
         <div>
-          <el-button
-            type="primary"
-            link
-            v-if="item.expendQuantity >= 0"
-            @click="handleClickDetails(item)"
-            >查看</el-button
-          >
-          <el-button
-            type="primary"
-            link
-            style="color: #f54a45"
-            v-else
-            @click="handleClickDetails(item)"
-            >查看</el-button
-          >
+          <el-button type="primary" link v-if="item.expendQuantity >= 0" @click="handleClickDetails(item)">查看</el-button>
+          <el-button type="primary" link style="color: #f54a45" v-else @click="handleClickDetails(item)">查看</el-button>
         </div>
       </template>
       <template #btn="{ item }">
         <div v-if="item.expendQuantity > 0">
-          <el-button type="primary" link @click="start(10, item)"
-            >采购</el-button
-          >
-          <el-button type="primary" link @click="transferToProduction(item)"
-            >转生产</el-button
-          >
+          <el-button type="primary" link @click="start(10, item)">采购</el-button>
+          <el-button type="primary" link @click="transferToProduction(item)">转生产</el-button>
         </div>
         <div v-else-if="item.expendQuantity == 0">
-          <el-button type="primary" link @click="handleFollow(item)"
-            >跟进</el-button
-          >
-          <el-button type="primary" link @click="lookRecords(item)"
-            >跟进记录</el-button
-          >
+          <el-button type="primary" link @click="handleFollow(item)">跟进</el-button>
+          <el-button type="primary" link @click="lookRecords(item)">跟进记录</el-button>
         </div>
         <div v-else>
-          <el-button
-            type="primary"
-            link
-            style="color: #f54a45"
-            @click="handleFollow(item)"
-            >跟进</el-button
-          >
-          <el-button
-            type="primary"
-            link
-            style="color: #f54a45"
-            @click="lookRecords(item)"
-            >跟进记录</el-button
-          >
+          <el-button type="primary" link style="color: #f54a45" @click="handleFollow(item)">跟进</el-button>
+          <el-button type="primary" link style="color: #f54a45" @click="lookRecords(item)">跟进记录</el-button>
         </div>
       </template>
     </byTable>
 
-    <el-dialog
-      title="转生产"
-      v-if="dialogVisible"
-      v-model="dialogVisible"
-      width="1200"
-      v-loading="loadingDialog"
-    >
-      <byForm
-        :formConfig="formConfig"
-        :formOption="formOption"
-        v-model="formData.data"
-        :rules="rules"
-        ref="submit"
-      >
+    <el-dialog title="转生产" v-if="dialogVisible" v-model="dialogVisible" width="1200" v-loading="loadingDialog">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
         <template #details>
           <div style="width: 100%">
-            <el-table
-              :data="formData.data.list"
-              style="width: 100%; margin-top: 16px"
-            >
-              <el-table-column
-                prop="productCode"
-                label="物品编码"
-                width="140"
-              />
-              <el-table-column
-                prop="productName"
-                label="物品名称"
-                min-width="220"
-              />
-              <el-table-column
-                prop="productUnit"
-                label="单位"
-                width="100"
-                :formatter="
+            <el-table :data="formData.data.list" style="width: 100%; margin-top: 16px">
+              <el-table-column prop="productCode" label="物品编码" width="140" />
+              <el-table-column prop="productName" label="物品名称" min-width="220" />
+              <el-table-column prop="productUnit" label="单位" width="100" :formatter="
                   (row) => dictValueLabel(row.productUnit, productUnit)
-                "
-              />
-              <el-table-column
-                prop="expendQuantity"
-                label="待处理数量"
-                width="120"
-              />
+                " />
+              <el-table-column prop="expendQuantity" label="待处理数量" width="120" />
               <el-table-column label="转生产数量" width="160">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
-                    <el-form-item
-                      :prop="'list.' + $index + '.quantity'"
-                      :rules="rules.quantity"
-                      :inline-message="true"
-                    >
-                      <el-input-number
-                        v-model="row.quantity"
-                        placeholder="请输入数量"
-                        style="width: 100%"
-                        :precision="0"
-                        :controls="false"
-                        :min="0"
-                      />
+                    <el-form-item :prop="'list.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true">
+                      <el-input-number v-model="row.quantity" placeholder="请输入数量" style="width: 100%" :precision="0" :controls="false" :min="0" />
                     </el-form-item>
                   </div>
                 </template>
@@ -152,31 +66,15 @@
               <el-table-column label="完工期限" width="180">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
-                    <el-form-item
-                      :prop="'list.' + $index + '.time'"
-                      :rules="rules.time"
-                      :inline-message="true"
-                    >
-                      <el-date-picker
-                        v-model="row.time"
-                        type="date"
-                        placeholder="请选择"
-                        value-format="YYYY-MM-DD"
-                      />
+                    <el-form-item :prop="'list.' + $index + '.time'" :rules="rules.time" :inline-message="true">
+                      <el-date-picker v-model="row.time" type="date" placeholder="请选择" value-format="YYYY-MM-DD" />
                     </el-form-item>
                   </div>
                 </template>
               </el-table-column>
-              <el-table-column
-                align="center"
-                label="操作"
-                width="80"
-                fixed="right"
-              >
+              <el-table-column align="center" label="操作" width="80" fixed="right">
                 <template #default="{ row, $index }">
-                  <el-button type="primary" link @click="handleDelete($index)"
-                    >删除</el-button
-                  >
+                  <el-button type="primary" link @click="handleDelete($index)">删除</el-button>
                 </template>
               </el-table-column>
             </el-table>
@@ -185,45 +83,22 @@
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitForm()" size="large"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitForm()" size="large">确 定</el-button>
       </template>
     </el-dialog>
-    <el-dialog
-      title="填写跟进"
-      v-if="dialogVisibleOne"
-      v-model="dialogVisibleOne"
-      width="500"
-      v-loading="loadingDialog"
-    >
-      <byForm
-        :formConfig="formConfigOne"
-        :formOption="formOption"
-        v-model="formData.dataOne"
-        :rules="rulesOne"
-        ref="submitOne"
-      >
+    <el-dialog title="填写跟进" v-if="dialogVisibleOne" v-model="dialogVisibleOne" width="500" v-loading="loadingDialog">
+      <byForm :formConfig="formConfigOne" :formOption="formOption" v-model="formData.dataOne" :rules="rulesOne" ref="submitOne">
       </byForm>
       <template #footer>
-        <el-button @click="dialogVisibleOne = false" size="large"
-          >取 消</el-button
-        >
-        <el-button type="primary" @click="submitFormOne()" size="large"
-          >确 定</el-button
-        >
+        <el-button @click="dialogVisibleOne = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitFormOne()" size="large">确 定</el-button>
       </template>
     </el-dialog>
 
     <el-dialog title="跟进记录" v-model="dialogVisibleTwo" width="500">
       <div style="width: 100%">
         <el-timeline :reverse="false">
-          <el-timeline-item
-            placement="top"
-            v-for="(activity, index) in activities"
-            :key="index"
-            :timestamp="activity.followUpTime"
-          >
+          <el-timeline-item placement="top" v-for="(activity, index) in activities" :key="index" :timestamp="activity.followUpTime">
             <div>
               跟进结果:
               <span>{{ activity.resultType ? "已处理" : "处理中" }}</span>
@@ -234,34 +109,16 @@
       </div>
     </el-dialog>
 
-    <el-dialog
-      title="交接单"
-      v-if="openHandover"
-      v-model="openHandover"
-      width="800"
-    >
-      <byForm
-        :formConfig="formHandoverConfig"
-        :formOption="formOption"
-        v-model="productRow.data"
-      >
+    <el-dialog title="交接单" v-if="openHandover" v-model="openHandover" width="800">
+      <byForm :formConfig="formHandoverConfig" :formOption="formOption" v-model="productRow.data">
         <template #remark>
           <div style="width: 100%">
-            <Editor
-              ref="remarkEditor"
-              :readOnly="true"
-              :value="productRow.data.remark"
-            />
+            <Editor ref="remarkEditor" :readOnly="true" :value="productRow.data.remark" />
           </div>
         </template>
         <template #file>
           <div style="width: 100%">
-            <el-upload
-              v-model:fileList="productRow.data.fileList"
-              action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-              multiple
-              :on-preview="onPreviewFile"
-            >
+            <el-upload v-model:fileList="productRow.data.fileList" :action="uploadUrl" multiple :on-preview="onPreviewFile">
             </el-upload>
           </div>
         </template>

+ 36 - 179
src/views/purchaseManage/purchaseManage/handoverSlipNew/index.vue

@@ -1,17 +1,9 @@
 <template>
   <div class="tenant">
-    <byTable
-      :source="sourceList.data"
-      :pagination="sourceList.pagination"
-      :config="config"
-      :loading="loading"
-      highlight-current-row
-      :selectConfig="selectConfig"
-      :row-class-name="getRowClass"
-      :table-events="{
+    <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
+             :selectConfig="selectConfig" :row-class-name="getRowClass" :table-events="{
         select: selectRow,
-      }"
-      :action-list="[
+      }" :action-list="[
         {
           text: '转生产',
           disabled: selectData.length === 0,
@@ -22,9 +14,7 @@
           disabled: selectData.length === 0,
           action: () => start(),
         },
-      ]"
-      @get-list="getList"
-    >
+      ]" @get-list="getList">
       <template #claimTime="{ item }">
         <div>
           <span v-if="item.claimTime">{{ item.claimTime }}</span>
@@ -33,118 +23,42 @@
       </template>
       <template #details="{ item }">
         <div>
-          <el-button
-            type="primary"
-            link
-            v-if="item.expendQuantity >= 0"
-            @click="handleClickDetails(item)"
-            >查看</el-button
-          >
-          <el-button
-            type="primary"
-            link
-            style="color: #f54a45"
-            v-else
-            @click="handleClickDetails(item)"
-            >查看</el-button
-          >
+          <el-button type="primary" link v-if="item.expendQuantity >= 0" @click="handleClickDetails(item)">查看</el-button>
+          <el-button type="primary" link style="color: #f54a45" v-else @click="handleClickDetails(item)">查看</el-button>
         </div>
       </template>
       <template #btn="{ item }">
         <div v-if="item.expendQuantity > 0">
-          <el-button type="primary" link @click="start(10, item)"
-            >采购</el-button
-          >
-          <el-button type="primary" link @click="transferToProduction(item)"
-            >转生产</el-button
-          >
+          <el-button type="primary" link @click="start(10, item)">采购</el-button>
+          <el-button type="primary" link @click="transferToProduction(item)">转生产</el-button>
         </div>
         <div v-else-if="item.expendQuantity == 0">
-          <el-button type="primary" link @click="handleFollow(item)"
-            >跟进</el-button
-          >
-          <el-button type="primary" link @click="lookRecords(item)"
-            >跟进记录</el-button
-          >
+          <el-button type="primary" link @click="handleFollow(item)">跟进</el-button>
+          <el-button type="primary" link @click="lookRecords(item)">跟进记录</el-button>
         </div>
         <div v-else>
-          <el-button
-            type="primary"
-            link
-            style="color: #f54a45"
-            @click="handleFollow(item)"
-            >跟进</el-button
-          >
-          <el-button
-            type="primary"
-            link
-            style="color: #f54a45"
-            @click="lookRecords(item)"
-            >跟进记录</el-button
-          >
+          <el-button type="primary" link style="color: #f54a45" @click="handleFollow(item)">跟进</el-button>
+          <el-button type="primary" link style="color: #f54a45" @click="lookRecords(item)">跟进记录</el-button>
         </div>
       </template>
     </byTable>
 
-    <el-dialog
-      title="转生产"
-      v-if="dialogVisible"
-      v-model="dialogVisible"
-      width="1200"
-      v-loading="loadingDialog"
-    >
-      <byForm
-        :formConfig="formConfig"
-        :formOption="formOption"
-        v-model="formData.data"
-        :rules="rules"
-        ref="submit"
-      >
+    <el-dialog title="转生产" v-if="dialogVisible" v-model="dialogVisible" width="1200" v-loading="loadingDialog">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
         <template #details>
           <div style="width: 100%">
-            <el-table
-              :data="formData.data.list"
-              style="width: 100%; margin-top: 16px"
-            >
-              <el-table-column
-                prop="productCode"
-                label="物品编码"
-                width="140"
-              />
-              <el-table-column
-                prop="productName"
-                label="物品名称"
-                min-width="220"
-              />
-              <el-table-column
-                prop="productUnit"
-                label="单位"
-                width="100"
-                :formatter="
+            <el-table :data="formData.data.list" style="width: 100%; margin-top: 16px">
+              <el-table-column prop="productCode" label="物品编码" width="140" />
+              <el-table-column prop="productName" label="物品名称" min-width="220" />
+              <el-table-column prop="productUnit" label="单位" width="100" :formatter="
                   (row) => dictValueLabel(row.productUnit, productUnit)
-                "
-              />
-              <el-table-column
-                prop="expendQuantity"
-                label="待处理数量"
-                width="120"
-              />
+                " />
+              <el-table-column prop="expendQuantity" label="待处理数量" width="120" />
               <el-table-column label="转生产数量" width="160">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
-                    <el-form-item
-                      :prop="'list.' + $index + '.quantity'"
-                      :rules="rules.quantity"
-                      :inline-message="true"
-                    >
-                      <el-input-number
-                        v-model="row.quantity"
-                        placeholder="请输入数量"
-                        style="width: 100%"
-                        :precision="0"
-                        :controls="false"
-                        :min="0"
-                      />
+                    <el-form-item :prop="'list.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true">
+                      <el-input-number v-model="row.quantity" placeholder="请输入数量" style="width: 100%" :precision="0" :controls="false" :min="0" />
                     </el-form-item>
                   </div>
                 </template>
@@ -152,31 +66,15 @@
               <el-table-column label="完工期限" width="180">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
-                    <el-form-item
-                      :prop="'list.' + $index + '.time'"
-                      :rules="rules.time"
-                      :inline-message="true"
-                    >
-                      <el-date-picker
-                        v-model="row.time"
-                        type="date"
-                        placeholder="请选择"
-                        value-format="YYYY-MM-DD"
-                      />
+                    <el-form-item :prop="'list.' + $index + '.time'" :rules="rules.time" :inline-message="true">
+                      <el-date-picker v-model="row.time" type="date" placeholder="请选择" value-format="YYYY-MM-DD" />
                     </el-form-item>
                   </div>
                 </template>
               </el-table-column>
-              <el-table-column
-                align="center"
-                label="操作"
-                width="80"
-                fixed="right"
-              >
+              <el-table-column align="center" label="操作" width="80" fixed="right">
                 <template #default="{ row, $index }">
-                  <el-button type="primary" link @click="handleDelete($index)"
-                    >删除</el-button
-                  >
+                  <el-button type="primary" link @click="handleDelete($index)">删除</el-button>
                 </template>
               </el-table-column>
             </el-table>
@@ -185,45 +83,22 @@
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitForm()" size="large"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitForm()" size="large">确 定</el-button>
       </template>
     </el-dialog>
-    <el-dialog
-      title="填写跟进"
-      v-if="dialogVisibleOne"
-      v-model="dialogVisibleOne"
-      width="500"
-      v-loading="loadingDialog"
-    >
-      <byForm
-        :formConfig="formConfigOne"
-        :formOption="formOption"
-        v-model="formData.dataOne"
-        :rules="rulesOne"
-        ref="submitOne"
-      >
+    <el-dialog title="填写跟进" v-if="dialogVisibleOne" v-model="dialogVisibleOne" width="500" v-loading="loadingDialog">
+      <byForm :formConfig="formConfigOne" :formOption="formOption" v-model="formData.dataOne" :rules="rulesOne" ref="submitOne">
       </byForm>
       <template #footer>
-        <el-button @click="dialogVisibleOne = false" size="large"
-          >取 消</el-button
-        >
-        <el-button type="primary" @click="submitFormOne()" size="large"
-          >确 定</el-button
-        >
+        <el-button @click="dialogVisibleOne = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitFormOne()" size="large">确 定</el-button>
       </template>
     </el-dialog>
 
     <el-dialog title="跟进记录" v-model="dialogVisibleTwo" width="500">
       <div style="width: 100%">
         <el-timeline :reverse="false">
-          <el-timeline-item
-            placement="top"
-            v-for="(activity, index) in activities"
-            :key="index"
-            :timestamp="activity.followUpTime"
-          >
+          <el-timeline-item placement="top" v-for="(activity, index) in activities" :key="index" :timestamp="activity.followUpTime">
             <div>
               跟进结果:
               <span>{{ activity.resultType ? "已处理" : "处理中" }}</span>
@@ -234,34 +109,16 @@
       </div>
     </el-dialog>
 
-    <el-dialog
-      title="交接单"
-      v-if="openHandover"
-      v-model="openHandover"
-      width="800"
-    >
-      <byForm
-        :formConfig="formHandoverConfig"
-        :formOption="formOption"
-        v-model="productRow.data"
-      >
+    <el-dialog title="交接单" v-if="openHandover" v-model="openHandover" width="800">
+      <byForm :formConfig="formHandoverConfig" :formOption="formOption" v-model="productRow.data">
         <template #remark>
           <div style="width: 100%">
-            <Editor
-              ref="remarkEditor"
-              :readOnly="true"
-              :value="productRow.data.remark"
-            />
+            <Editor ref="remarkEditor" :readOnly="true" :value="productRow.data.remark" />
           </div>
         </template>
         <template #file>
           <div style="width: 100%">
-            <el-upload
-              v-model:fileList="productRow.data.fileList"
-              action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-              multiple
-              :on-preview="onPreviewFile"
-            >
+            <el-upload v-model:fileList="productRow.data.fileList" :action="uploadUrl" multiple :on-preview="onPreviewFile">
             </el-upload>
           </div>
         </template>

+ 10 - 50
src/views/purchaseManage/purchaseManage/handoverSlipOne/index.vue

@@ -1,24 +1,15 @@
 <template>
   <div class="tenant">
-    <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="{
         select: selectRow,
-      }"
-      :action-list="[
+      }" :action-list="[
         {
           text: '采购',
           disabled: selectData.length === 0,
           action: () => start(),
         },
-      ]"
-      @get-list="getList"
-    >
+      ]" @get-list="getList">
       <template #claimTime="{ item }">
         <div>
           <span v-if="item.claimTime">{{ item.claimTime }}</span>
@@ -27,21 +18,8 @@
       </template>
       <template #details="{ item }">
         <div>
-          <el-button
-            type="primary"
-            link
-            v-if="item.expendQuantity >= 0"
-            @click="handleClickDetails(item)"
-            >查看</el-button
-          >
-          <el-button
-            type="primary"
-            link
-            style="color: #f54a45"
-            v-else
-            @click="handleClickDetails(item)"
-            >查看</el-button
-          >
+          <el-button type="primary" link v-if="item.expendQuantity >= 0" @click="handleClickDetails(item)">查看</el-button>
+          <el-button type="primary" link style="color: #f54a45" v-else @click="handleClickDetails(item)">查看</el-button>
         </div>
       </template>
       <template #btn="{ item }">
@@ -49,34 +27,16 @@
       </template>
     </byTable>
 
-    <el-dialog
-      title="交接单"
-      v-if="openHandover"
-      v-model="openHandover"
-      width="800"
-    >
-      <byForm
-        :formConfig="formHandoverConfig"
-        :formOption="formOption"
-        v-model="productRow.data"
-      >
+    <el-dialog title="交接单" v-if="openHandover" v-model="openHandover" width="800">
+      <byForm :formConfig="formHandoverConfig" :formOption="formOption" v-model="productRow.data">
         <template #remark>
           <div style="width: 100%">
-            <Editor
-              ref="remarkEditor"
-              :readOnly="true"
-              :value="productRow.data.remark"
-            />
+            <Editor ref="remarkEditor" :readOnly="true" :value="productRow.data.remark" />
           </div>
         </template>
         <template #file>
           <div style="width: 100%">
-            <el-upload
-              v-model:fileList="productRow.data.fileList"
-              action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-              multiple
-              :on-preview="onPreviewFile"
-            >
+            <el-upload v-model:fileList="productRow.data.fileList" :action="uploadUrl" multiple :on-preview="onPreviewFile">
             </el-upload>
           </div>
         </template>

+ 12 - 57
src/views/purchaseManage/purchaseManage/purchase/index.vue

@@ -2,55 +2,32 @@
   <div class="tenant">
     <!-- <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事件都能传
           select: selectRow,
           'select-all': selectRow,
-        }"
-        :action-list="[
+        }" :action-list="[
           {
             text: '采购',
             disabled: selectData.length === 0,
             action: () => start(),
           },
-        ]"
-        @get-list="getList"
-      >
+        ]" @get-list="getList">
         <template #productUnit="{ item }">
           <div>
             {{ getUnit(item) }}
           </div>
         </template>
         <template #fileSlot="{ item }">
-          <div
-            style="cursor: pointer; color: #409eff"
-            @click="handleClickFile(item)"
-          >
+          <div style="cursor: pointer; color: #409eff" @click="handleClickFile(item)">
             {{ item.fileName }}
           </div>
         </template>
       </byTable>
     </div>
-    <el-dialog
-      :title="modalType == 'add' ? '添加供应商' : '编辑供应商'"
-      v-model="dialogVisible"
-      width="800"
-      v-loading="loading"
-    >
-      <byForm
-        :formConfig="formConfig"
-        :formOption="formOption"
-        v-model="formData.data"
-        :rules="rules"
-        ref="byform"
-      >
+    <el-dialog :title="modalType == 'add' ? '添加供应商' : '编辑供应商'" v-model="dialogVisible" width="800" v-loading="loading">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
         <template #address>
           <el-row :gutter="10" style="width: 100%">
             <el-col :span="8">
@@ -94,31 +71,14 @@
 
         <template #fileSlot>
           <div>
-            <el-upload
-              v-model:fileList="fileList"
-              class="upload-demo"
-              action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-              :limit="3"
-              :data="uploadData"
-              :on-preview="handlePreview"
-              :on-remove="handleRemove"
-              :on-success="handleSuccess"
-              :before-upload="handleBeforeUpload"
-              accept=".pdf"
-            >
+            <el-upload v-model:fileList="fileList" class="upload-demo" :action="uploadUrl" :limit="3" :data="uploadData" :on-preview="handlePreview"
+                       :on-remove="handleRemove" :on-success="handleSuccess" :before-upload="handleBeforeUpload" accept=".pdf">
               <el-button type="primary">选择</el-button>
               <template #file>
                 <div>
                   <div style="margin-top: 15px">
-                    <el-tag
-                      class="ml-2"
-                      type="info"
-                      v-for="(item, index) in fileList"
-                      :key="index"
-                      closable
-                      @close="handleClose(index)"
-                      >{{ item.fileName }}</el-tag
-                    >
+                    <el-tag class="ml-2" type="info" v-for="(item, index) in fileList" :key="index" closable
+                            @close="handleClose(index)">{{ item.fileName }}</el-tag>
                   </div>
                 </div>
               </template>
@@ -128,12 +88,7 @@
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button
-          type="primary"
-          v-no-double-click="submitForm"
-          size="large"
-          :loading="submitLoading"
-        >
+        <el-button type="primary" v-no-double-click="submitForm" size="large" :loading="submitLoading">
           确 定
         </el-button>
       </template>

+ 49 - 44
src/views/purchaseManage/purchaseManage/purchaseDocumentary/index.vue

@@ -24,7 +24,9 @@
                 {{ index + 1 }}
               </div>
             </div>
-            <el-icon class="beacon" v-if="index < purchaseTrackType.length - 1"><CaretRight /></el-icon>
+            <el-icon class="beacon" v-if="index < purchaseTrackType.length - 1">
+              <CaretRight />
+            </el-icon>
           </div>
         </div>
       </div>
@@ -57,18 +59,17 @@
           <div style="display: flex">
             <div v-for="(itemType, key) in purchaseTrackType" :key="key" style="width: 200px !important; min-width: 200px !important">
               <div style="padding: 8px 0; text-align: center">
-                <el-icon style="color: #409eff; cursor: pointer" @click="clickAdd(item, itemType)"><EditPen /></el-icon>
+                <el-icon style="color: #409eff; cursor: pointer" @click="clickAdd(item, itemType)">
+                  <EditPen />
+                </el-icon>
               </div>
               <div style="text-align: center" v-if="item.documentaryRecord && item.documentaryRecord[itemType.id]">
                 <el-tooltip class="box-item" effect="light" placement="bottom">
                   <template #content>
                     <div style="max-width: 400px; max-height: 50vh; overflow-y: auto">
                       <el-timeline>
-                        <el-timeline-item
-                          v-for="(activity, index) in item.documentaryRecord[itemType.id]"
-                          :key="index"
-                          :timestamp="activity.createTime"
-                          :hide-timestamp="true">
+                        <el-timeline-item v-for="(activity, index) in item.documentaryRecord[itemType.id]" :key="index"
+                                          :timestamp="activity.createTime" :hide-timestamp="true">
                           <div style="background-color: #e2fbe8; padding: 8px">
                             <div style="font-size: 12px">{{ activity.createTime }}</div>
                             <div style="font-size: 12px" v-html="getStyle(activity.remark)"></div>
@@ -92,14 +93,9 @@
     </div>
 
     <el-row style="padding-top: 20px" justify="end" type="flex">
-      <el-pagination
-        background
-        layout="total, sizes, prev, pager, next, jumper"
-        :current-page="sourceList.pagination.pageNum"
-        :page-size="sourceList.pagination.pageSize"
-        :total="sourceList.pagination.total"
-        @size-change="handleSizeChange"
-        @current-change="handlePageChange" />
+      <el-pagination background layout="total, sizes, prev, pager, next, jumper" :current-page="sourceList.pagination.pageNum"
+                     :page-size="sourceList.pagination.pageSize" :total="sourceList.pagination.total" @size-change="handleSizeChange"
+                     @current-change="handlePageChange" />
     </el-row>
 
     <el-dialog :title="title" v-if="dialogVisible" v-model="dialogVisible" width="600" v-loading="loadingDialog">
@@ -111,13 +107,8 @@
         </template>
         <template #file>
           <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-upload v-model:fileList="fileList" :action="uploadUrl" :data="uploadData" multiple :before-upload="uploadFile"
+                       :on-preview="onPreviewFile">
               <el-button>选择</el-button>
             </el-upload>
           </div>
@@ -182,16 +173,22 @@ const handleScroll = (event, flag, index) => {
   }
 };
 const getDict = () => {
-  proxy.get("/tenantUser/list", { pageNum: 1, pageSize: 10000, tenantId: useUserStore().user.tenantId }).then((res) => {
-    if (res.rows && res.rows.length > 0) {
-      userList.value = res.rows.map((item) => {
-        return {
-          label: item.nickName,
-          value: item.userId,
-        };
-      });
-    }
-  });
+  proxy
+    .get("/tenantUser/list", {
+      pageNum: 1,
+      pageSize: 10000,
+      tenantId: useUserStore().user.tenantId,
+    })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        userList.value = res.rows.map((item) => {
+          return {
+            label: item.nickName,
+            value: item.userId,
+          };
+        });
+      }
+    });
 };
 const selectRecordDocumentaryId = ref("");
 const getList = () => {
@@ -209,15 +206,14 @@ const getList = () => {
     })
     .then(
       (res) => {
-        if(res.documentaryList&&res.documentaryList.length>0){
-        purchaseTrackType.value = res.documentaryList;
-
-        }else{
-            ElMessage({
-          message: "请先去跟单配置页面进行配置",
-          type: "info",
-        });
-          purchaseTrackType.value =[]
+        if (res.documentaryList && res.documentaryList.length > 0) {
+          purchaseTrackType.value = res.documentaryList;
+        } else {
+          ElMessage({
+            message: "请先去跟单配置页面进行配置",
+            type: "info",
+          });
+          purchaseTrackType.value = [];
         }
         sourceList.value.data = res.page.rows;
         sourceList.value.pagination.total = res.page.total;
@@ -244,7 +240,10 @@ const handlePageChange = (val) => {
 };
 const selectRegion = (item) => {
   sourceList.value.pagination.pageNum = 1;
-  if (selectRecordDocumentaryId.value && selectRecordDocumentaryId.value === item.id) {
+  if (
+    selectRecordDocumentaryId.value &&
+    selectRecordDocumentaryId.value === item.id
+  ) {
     selectRecordDocumentaryId.value = "";
   } else {
     selectRecordDocumentaryId.value = item.id;
@@ -252,7 +251,11 @@ const selectRegion = (item) => {
   getList();
 };
 const getStatus = (typeItem, row) => {
-  if (row.documentaryRecord && row.documentaryRecord[typeItem.id] && row.documentaryRecord[typeItem.id].length > 0) {
+  if (
+    row.documentaryRecord &&
+    row.documentaryRecord[typeItem.id] &&
+    row.documentaryRecord[typeItem.id].length > 0
+  ) {
     return "success";
   }
   return "process";
@@ -297,7 +300,9 @@ const formConfig = computed(() => {
   ];
 });
 const rules = ref({
-  completionTime: [{ required: true, message: "请选择完成时间", trigger: "change" }],
+  completionTime: [
+    { required: true, message: "请选择完成时间", trigger: "change" },
+  ],
 });
 const clickAdd = (item, row) => {
   title.value = "编辑: " + row.name;

+ 12 - 57
src/views/purchaseManage/purchaseManage/subscribe/index.vue

@@ -2,53 +2,30 @@
   <div class="tenant">
     <!-- <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事件都能传
           select: select,
-        }"
-        :action-list="[
+        }" :action-list="[
           {
             text: '发起申购',
             action: () => openModal(),
           },
-        ]"
-        @get-list="getList"
-      >
+        ]" @get-list="getList">
         <template #productUnit="{ item }">
           <div>
             {{ getUnit(item) }}
           </div>
         </template>
         <template #fileSlot="{ item }">
-          <div
-            style="cursor: pointer; color: #409eff"
-            @click="handleClickFile(item)"
-          >
+          <div style="cursor: pointer; color: #409eff" @click="handleClickFile(item)">
             {{ item.fileName }}
           </div>
         </template>
       </byTable>
     </div>
-    <el-dialog
-      :title="modalType == 'add' ? '添加供应商' : '编辑供应商'"
-      v-model="dialogVisible"
-      width="800"
-      v-loading="loading"
-    >
-      <byForm
-        :formConfig="formConfig"
-        :formOption="formOption"
-        v-model="formData.data"
-        :rules="rules"
-        ref="byform"
-      >
+    <el-dialog :title="modalType == 'add' ? '添加供应商' : '编辑供应商'" v-model="dialogVisible" width="800" v-loading="loading">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
         <template #address>
           <el-row :gutter="10" style="width: 100%">
             <el-col :span="8">
@@ -92,31 +69,14 @@
 
         <template #fileSlot>
           <div>
-            <el-upload
-              v-model:fileList="fileList"
-              class="upload-demo"
-              action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-              :limit="3"
-              :data="uploadData"
-              :on-preview="handlePreview"
-              :on-remove="handleRemove"
-              :on-success="handleSuccess"
-              :before-upload="handleBeforeUpload"
-              accept=".pdf"
-            >
+            <el-upload v-model:fileList="fileList" class="upload-demo" :action="uploadUrl" :limit="3" :data="uploadData" :on-preview="handlePreview"
+                       :on-remove="handleRemove" :on-success="handleSuccess" :before-upload="handleBeforeUpload" accept=".pdf">
               <el-button type="primary">选择</el-button>
               <template #file>
                 <div>
                   <div style="margin-top: 15px">
-                    <el-tag
-                      class="ml-2"
-                      type="info"
-                      v-for="(item, index) in fileList"
-                      :key="index"
-                      closable
-                      @close="handleClose(index)"
-                      >{{ item.fileName }}</el-tag
-                    >
+                    <el-tag class="ml-2" type="info" v-for="(item, index) in fileList" :key="index" closable
+                            @close="handleClose(index)">{{ item.fileName }}</el-tag>
                   </div>
                 </div>
               </template>
@@ -126,12 +86,7 @@
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button
-          type="primary"
-          v-no-double-click="submitForm"
-          size="large"
-          :loading="submitLoading"
-        >
+        <el-button type="primary" v-no-double-click="submitForm" size="large" :loading="submitLoading">
           确 定
         </el-button>
       </template>

+ 70 - 76
src/views/purchaseManage/purchasePayment/invoice/index.vue

@@ -1,20 +1,13 @@
 <template>
   <div class="tenant">
     <div class="content">
-      <byTable
-        :source="sourceList.data"
-        :pagination="sourceList.pagination"
-        :config="config"
-        :loading="loading"
-        :selectConfig="selectConfig"
-        highlight-current-row
-        :action-list="[
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
+               highlight-current-row :action-list="[
           {
             text: '添加发票',
             action: () => openModal('add'),
           },
-        ]"
-        @get-list="getList">
+        ]" @get-list="getList">
       </byTable>
     </div>
 
@@ -22,24 +15,14 @@
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
         <template #money>
           <div style="width: 100%">
-            <el-input-number
-              onmousewheel="return false;"
-              v-model="formData.data.money"
-              placeholder="请输入开票金额"
-              :precision="2"
-              :controls="false"
-              :min="0" />
+            <el-input-number onmousewheel="return false;" v-model="formData.data.money" placeholder="请输入开票金额" :precision="2" :controls="false"
+                             :min="0" />
           </div>
         </template>
         <template #file>
           <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-upload v-model:fileList="fileList" :action="uploadUrl" :data="uploadData" multiple :before-upload="uploadFile"
+                       :on-preview="onPreviewFile">
               <el-button>上传文件</el-button>
             </el-upload>
           </div>
@@ -52,14 +35,8 @@
             <el-table-column label="关联金额">
               <template #default="{ row, $index }">
                 <el-form-item :prop="'invoiceDetailsList.' + $index + '.money'" :rules="rules.money" :inline-message="true">
-                  <el-input-number
-                    onmousewheel="return false;"
-                    v-model="row.money"
-                    placeholder="请输入关联金额"
-                    style="width: 100%"
-                    :precision="2"
-                    :controls="false"
-                    :min="0" />
+                  <el-input-number onmousewheel="return false;" v-model="row.money" placeholder="请输入关联金额" style="width: 100%" :precision="2"
+                                   :controls="false" :min="0" />
                 </el-form-item>
               </template>
             </el-table-column>
@@ -170,11 +147,15 @@ const config = computed(() => {
             },
             el: "button",
             click() {
-              ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
-                confirmButtonText: "确定",
-                cancelButtonText: "取消",
-                type: "warning",
-              }).then(() => {
+              ElMessageBox.confirm(
+                "此操作将永久删除该数据, 是否继续?",
+                "提示",
+                {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning",
+                }
+              ).then(() => {
                 proxy
                   .post("/invoice/delete", {
                     id: row.id,
@@ -212,16 +193,18 @@ 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 };
@@ -307,22 +290,24 @@ const openModal = (val) => {
 };
 const changeSupply = (val) => {
   if (val) {
-    proxy.get("/purchase/getNoInvoiceListBySupplyId", { supplyId: val }).then((res) => {
-      if (res.data && res.data.length > 0) {
-        formData.data.invoiceDetailsList = res.data.map((item) => {
-          return {
-            purchaseId: item.id,
-            code: item.code,
-            amount: item.amount,
-            sumInvoiceMoney: item.sumInvoiceMoney,
-            money: 0,
-            remark: "",
-          };
-        });
-      } else {
-        formData.data.invoiceDetailsList = [];
-      }
-    });
+    proxy
+      .get("/purchase/getNoInvoiceListBySupplyId", { supplyId: val })
+      .then((res) => {
+        if (res.data && res.data.length > 0) {
+          formData.data.invoiceDetailsList = res.data.map((item) => {
+            return {
+              purchaseId: item.id,
+              code: item.code,
+              amount: item.amount,
+              sumInvoiceMoney: item.sumInvoiceMoney,
+              money: 0,
+              remark: "",
+            };
+          });
+        } else {
+          formData.data.invoiceDetailsList = [];
+        }
+      });
   } else {
     formData.data.invoiceDetailsList = [];
   }
@@ -348,12 +333,19 @@ const submitForm = () => {
         };
       });
     }
-    if (!(formData.data.invoiceDetailsList && formData.data.invoiceDetailsList.length > 0)) {
+    if (
+      !(
+        formData.data.invoiceDetailsList &&
+        formData.data.invoiceDetailsList.length > 0
+      )
+    ) {
       return ElMessage("该供应商暂无关联合同");
     }
     let money = 0;
     for (let i = 0; i < formData.data.invoiceDetailsList.length; i++) {
-      money = parseFloat(Number(money) + Number(formData.data.invoiceDetailsList[i].money)).toFixed(2);
+      money = parseFloat(
+        Number(money) + Number(formData.data.invoiceDetailsList[i].money)
+      ).toFixed(2);
     }
     if (money != formData.data.money) {
       return ElMessage("开票金额不等于关联金额");
@@ -380,17 +372,19 @@ const update = (row) => {
   modalType.value = "edit";
   loadingDialog.value = true;
   proxy.post("/invoice/detail", { id: row.id }).then((res) => {
-    proxy.post("/fileInfo/getList", { businessIdList: [row.id] }).then((res) => {
-      if (res[row.id] && res[row.id].length > 0) {
-        fileList.value = res[row.id].map((item) => {
-          return {
-            raw: item,
-            name: item.fileName,
-            url: item.fileUrl,
-          };
-        });
-      }
-    });
+    proxy
+      .post("/fileInfo/getList", { businessIdList: [row.id] })
+      .then((res) => {
+        if (res[row.id] && res[row.id].length > 0) {
+          fileList.value = res[row.id].map((item) => {
+            return {
+              raw: item,
+              name: item.fileName,
+              url: item.fileUrl,
+            };
+          });
+        }
+      });
     res.invoiceDetailsList = res.invoiceDetailsVoList.map((item) => {
       return {
         code: item.purchaseCode,

+ 27 - 116
src/views/purchaseManage/supplier/supplier/index.vue

@@ -1,24 +1,15 @@
 <template>
   <div class="tenant">
     <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="{
           select: select,
-        }"
-        :action-list="[
+        }" :action-list="[
           {
             text: '添加供应商',
             action: () => openModal('add'),
           },
-        ]"
-        @get-list="getList"
-      >
+        ]" @get-list="getList">
         <template #address="{ item }">
           <div>
             {{ item.countryName }}, {{ item.provinceName }} ,
@@ -27,40 +18,14 @@
         </template>
       </byTable>
     </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"
-      >
+    <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"
-              filterable
-              remote
-              reserve-keyword
-              placeholder="请输入关键字"
-              remote-show-suffix
-              no-data-text="无数据,请联系管理员添加"
-              :loading="loadingSearch"
-              :remote-method="(val) => remoteMethod(val, '0')"
-              @input="(val) => remoteMethod(val, '0')"
-              @change="(val) => getCityData(val, '20')"
-            >
-              <el-option
-                v-for="item in countryData"
-                :label="item.name"
-                :value="item.id"
-              >
+            <el-select v-model="formData.data.countryId" filterable remote reserve-keyword placeholder="请输入关键字" remote-show-suffix
+                       no-data-text="无数据,请联系管理员添加" :loading="loadingSearch" :remote-method="(val) => remoteMethod(val, '0')"
+                       @input="(val) => remoteMethod(val, '0')" @change="(val) => getCityData(val, '20')">
+              <el-option v-for="item in countryData" :label="item.name" :value="item.id">
               </el-option>
             </el-select>
           </div>
@@ -68,24 +33,10 @@
 
         <template #provinceId>
           <div>
-            <el-select
-              v-model="formData.data.provinceId"
-              filterable
-              remote
-              reserve-keyword
-              placeholder="请输入关键字"
-              remote-show-suffix
-              no-data-text="无数据,请联系管理员添加"
-              :loading="loadingSearchProvince"
-              :remote-method="(val) => remoteMethod(val, '1')"
-              @input="(val) => remoteMethod(val, '1')"
-              @change="(val) => getCityData(val, '30')"
-            >
-              <el-option
-                v-for="item in provinceData"
-                :label="item.name"
-                :value="item.id"
-              >
+            <el-select v-model="formData.data.provinceId" filterable remote reserve-keyword placeholder="请输入关键字" remote-show-suffix
+                       no-data-text="无数据,请联系管理员添加" :loading="loadingSearchProvince" :remote-method="(val) => remoteMethod(val, '1')"
+                       @input="(val) => remoteMethod(val, '1')" @change="(val) => getCityData(val, '30')">
+              <el-option v-for="item in provinceData" :label="item.name" :value="item.id">
               </el-option>
             </el-select>
           </div>
@@ -93,23 +44,10 @@
 
         <template #cityId>
           <div>
-            <el-select
-              v-model="formData.data.cityId"
-              filterable
-              remote
-              reserve-keyword
-              placeholder="请输入关键字"
-              remote-show-suffix
-              no-data-text="无数据,请联系管理员添加"
-              :loading="loadingSearchCity"
-              :remote-method="(val) => remoteMethod(val, '2')"
-              @input="(val) => remoteMethod(val, '2')"
-            >
-              <el-option
-                v-for="item in cityData"
-                :label="item.name"
-                :value="item.id"
-              >
+            <el-select v-model="formData.data.cityId" filterable remote reserve-keyword placeholder="请输入关键字" remote-show-suffix
+                       no-data-text="无数据,请联系管理员添加" :loading="loadingSearchCity" :remote-method="(val) => remoteMethod(val, '2')"
+                       @input="(val) => remoteMethod(val, '2')">
+              <el-option v-for="item in cityData" :label="item.name" :value="item.id">
               </el-option>
             </el-select>
           </div>
@@ -119,21 +57,14 @@
           <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 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 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>
@@ -143,36 +74,21 @@
           <el-row :gutter="10" style="width: 100%">
             <el-col :span="8">
               <el-form-item prop="accountPeriod">
-                <el-input-number
-                  v-model="formData.data.accountPeriod"
-                  placeholder="请输入账期 (天)"
-                  style="width: 100%"
-                  :precision="0"
-                  :controls="false"
-                  :min="0"
-                />
+                <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-input
-                  v-model="formData.data.accountPeriodRemark"
-                  placeholder="请输入账期说明"
-                />
+                <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-upload v-model:fileList="fileList" :action="uploadUrl" :data="uploadData" multiple :before-upload="uploadFile"
+                       :on-preview="onPreviewFile">
               <el-button>选择</el-button>
             </el-upload>
           </div>
@@ -180,12 +96,7 @@
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button
-          type="primary"
-          @click="submitForm()"
-          size="large"
-          :loading="submitLoading"
-        >
+        <el-button type="primary" @click="submitForm()" size="large" :loading="submitLoading">
           确 定
         </el-button>
       </template>

+ 20 - 36
src/views/salesMange/saleContract/claim/index.vue

@@ -1,14 +1,7 @@
 <template>
   <div class="tenant">
-    <byTable
-      :source="sourceList.data"
-      :pagination="sourceList.pagination"
-      :config="config"
-      :loading="loading"
-      highlight-current-row
-      :selectConfig="selectConfig"
-      :action-list="[]"
-      @get-list="getList">
+    <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
+             :selectConfig="selectConfig" :action-list="[]" @get-list="getList">
       <template #money="{ item }"> {{ item.currency }} {{ moneyFormat(item.amount) }} </template>
       <template #isClaim="{ item }">
         <div style="width: 100%">
@@ -43,28 +36,14 @@
         </template>
         <template #fileSlot>
           <div>
-            <el-upload
-              v-model:fileList="fileList"
-              :show-file-list="false"
-              class="upload-demo"
-              action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-              :data="uploadData"
-              :on-preview="handlePreview"
-              :on-remove="handleRemove"
-              :on-success="handleSuccess"
-              :before-upload="handleBeforeUpload">
+            <el-upload v-model:fileList="fileList" :show-file-list="false" class="upload-demo" :action="uploadUrl" :data="uploadData"
+                       :on-preview="handlePreview" :on-remove="handleRemove" :on-success="handleSuccess" :before-upload="handleBeforeUpload">
               <el-button type="primary">选择</el-button>
             </el-upload>
             <div>
               <div style="margin-top: 15px">
-                <el-tag
-                  style="margin-right: 10px"
-                  class="ml-2"
-                  type="info"
-                  v-for="(item, index) in fileListCopy"
-                  :key="index"
-                  closable
-                  @close="handleClose(index)">
+                <el-tag style="margin-right: 10px" class="ml-2" type="info" v-for="(item, index) in fileListCopy" :key="index" closable
+                        @close="handleClose(index)">
                   {{ item.fileName }}
                 </el-tag>
               </div>
@@ -350,13 +329,15 @@ const formConfig = reactive([
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
-  proxy.post("/accountRunningWater/page", sourceList.value.pagination).then((message) => {
-    sourceList.value.data = message.rows;
-    sourceList.value.pagination.total = message.total;
-    setTimeout(() => {
-      loading.value = false;
-    }, 200);
-  });
+  proxy
+    .post("/accountRunningWater/page", sourceList.value.pagination)
+    .then((message) => {
+      sourceList.value.data = message.rows;
+      sourceList.value.pagination.total = message.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+    });
 };
 const submitForm = () => {
   byform.value.handleSubmit((valid) => {
@@ -415,7 +396,8 @@ const getDtl = (row) => {
       rate: row.rate,
       status: row.status + "",
       currency: row.currency,
-      waitAmount: Math.round((Number(row.amount) - Number(res.data))* 100) / 100,
+      waitAmount:
+        Math.round((Number(row.amount) - Number(res.data)) * 100) / 100,
       accountManagementId: row.accountManagementId,
       accountManagementName: row.accountManagementName,
       claimTime: row.transactionTime,
@@ -471,7 +453,9 @@ const handleRemove = (index) => {
   });
 };
 const handleSelectContrct = (row) => {
-  const flag = formData.data.claimContractList.some((x) => x.contractId === row.id);
+  const flag = formData.data.claimContractList.some(
+    (x) => x.contractId === row.id
+  );
   if (flag)
     return ElMessage({
       message: "该合同已选择",

+ 41 - 35
src/views/salesMange/saleContract/salesDocumentary/index.vue

@@ -24,7 +24,9 @@
                 {{ index + 1 }}
               </div>
             </div>
-            <el-icon class="beacon" v-if="index < purchaseTrackType.length - 1"><CaretRight /></el-icon>
+            <el-icon class="beacon" v-if="index < purchaseTrackType.length - 1">
+              <CaretRight />
+            </el-icon>
           </div>
         </div>
       </div>
@@ -57,18 +59,17 @@
           <div style="display: flex">
             <div v-for="(itemType, key) in purchaseTrackType" :key="key" style="width: 200px !important; min-width: 200px !important">
               <div style="padding: 8px 0; text-align: center">
-                <el-icon style="color: #409eff; cursor: pointer" @click="clickAdd(item, itemType)"><EditPen /></el-icon>
+                <el-icon style="color: #409eff; cursor: pointer" @click="clickAdd(item, itemType)">
+                  <EditPen />
+                </el-icon>
               </div>
               <div style="text-align: center" v-if="item.documentaryRecord && item.documentaryRecord[itemType.id]">
                 <el-tooltip class="box-item" effect="light" placement="bottom">
                   <template #content>
                     <div style="max-width: 400px; max-height: 50vh; overflow-y: auto">
                       <el-timeline>
-                        <el-timeline-item
-                          v-for="(activity, index) in item.documentaryRecord[itemType.id]"
-                          :key="index"
-                          :timestamp="activity.createTime"
-                          :hide-timestamp="true">
+                        <el-timeline-item v-for="(activity, index) in item.documentaryRecord[itemType.id]" :key="index"
+                                          :timestamp="activity.createTime" :hide-timestamp="true">
                           <div style="background-color: #e2fbe8; padding: 8px">
                             <div style="font-size: 12px">{{ activity.createTime }}</div>
                             <div style="font-size: 12px" v-html="getStyle(activity.remark)"></div>
@@ -92,14 +93,9 @@
     </div>
 
     <el-row style="padding-top: 20px" justify="end" type="flex">
-      <el-pagination
-        background
-        layout="total, sizes, prev, pager, next, jumper"
-        :current-page="sourceList.pagination.pageNum"
-        :page-size="sourceList.pagination.pageSize"
-        :total="sourceList.pagination.total"
-        @size-change="handleSizeChange"
-        @current-change="handlePageChange" />
+      <el-pagination background layout="total, sizes, prev, pager, next, jumper" :current-page="sourceList.pagination.pageNum"
+                     :page-size="sourceList.pagination.pageSize" :total="sourceList.pagination.total" @size-change="handleSizeChange"
+                     @current-change="handlePageChange" />
     </el-row>
 
     <el-dialog :title="title" v-if="dialogVisible" v-model="dialogVisible" width="600" v-loading="loadingDialog">
@@ -111,13 +107,8 @@
         </template>
         <template #file>
           <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-upload v-model:fileList="fileList" :action="uploadUrl" :data="uploadData" multiple :before-upload="uploadFile"
+                       :on-preview="onPreviewFile">
               <el-button>选择</el-button>
             </el-upload>
           </div>
@@ -182,16 +173,22 @@ const handleScroll = (event, flag, index) => {
   }
 };
 const getDict = () => {
-  proxy.get("/tenantUser/list", { pageNum: 1, pageSize: 10000, tenantId: useUserStore().user.tenantId }).then((res) => {
-    if (res.rows && res.rows.length > 0) {
-      userList.value = res.rows.map((item) => {
-        return {
-          label: item.nickName,
-          value: item.userId,
-        };
-      });
-    }
-  });
+  proxy
+    .get("/tenantUser/list", {
+      pageNum: 1,
+      pageSize: 10000,
+      tenantId: useUserStore().user.tenantId,
+    })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        userList.value = res.rows.map((item) => {
+          return {
+            label: item.nickName,
+            value: item.userId,
+          };
+        });
+      }
+    });
 };
 const selectRecordDocumentaryId = ref("");
 const getList = () => {
@@ -235,7 +232,10 @@ const handlePageChange = (val) => {
 };
 const selectRegion = (item) => {
   sourceList.value.pagination.pageNum = 1;
-  if (selectRecordDocumentaryId.value && selectRecordDocumentaryId.value === item.id) {
+  if (
+    selectRecordDocumentaryId.value &&
+    selectRecordDocumentaryId.value === item.id
+  ) {
     selectRecordDocumentaryId.value = "";
   } else {
     selectRecordDocumentaryId.value = item.id;
@@ -243,7 +243,11 @@ const selectRegion = (item) => {
   getList();
 };
 const getStatus = (typeItem, row) => {
-  if (row.documentaryRecord && row.documentaryRecord[typeItem.id] && row.documentaryRecord[typeItem.id].length > 0) {
+  if (
+    row.documentaryRecord &&
+    row.documentaryRecord[typeItem.id] &&
+    row.documentaryRecord[typeItem.id].length > 0
+  ) {
     return "success";
   }
   return "process";
@@ -288,7 +292,9 @@ const formConfig = computed(() => {
   ];
 });
 const rules = ref({
-  completionTime: [{ required: true, message: "请选择完成时间", trigger: "change" }],
+  completionTime: [
+    { required: true, message: "请选择完成时间", trigger: "change" },
+  ],
 });
 const clickAdd = (item, row) => {
   title.value = "编辑: " + row.name;

+ 75 - 67
src/views/salesMange/saleContract/serviceContract/index.vue

@@ -1,20 +1,13 @@
 <template>
   <div class="tenant">
     <div class="content">
-      <byTable
-        :source="sourceList.data"
-        :pagination="sourceList.pagination"
-        :config="config"
-        :loading="loading"
-        :selectConfig="selectConfig"
-        highlight-current-row
-        :action-list="[
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
+               highlight-current-row :action-list="[
           {
             text: '新增合同',
             action: () => newContract(),
           },
-        ]"
-        @get-list="getList">
+        ]" @get-list="getList">
         <template #amount="{ item }">
           <div>
             <span style="padding-right: 4px">{{ item.currency }}</span>
@@ -76,13 +69,8 @@
         </template>
         <template #file>
           <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-upload v-model:fileList="fileList" :action="uploadUrl" :data="uploadData" multiple :before-upload="uploadFile"
+                       :on-preview="onPreviewFile">
               <el-button>选择</el-button>
             </el-upload>
           </div>
@@ -292,11 +280,15 @@ const config = computed(() => {
             },
             el: "button",
             click() {
-              ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
-                confirmButtonText: "确定",
-                cancelButtonText: "取消",
-                type: "warning",
-              }).then(() => {
+              ElMessageBox.confirm(
+                "此操作将永久删除该数据, 是否继续?",
+                "提示",
+                {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning",
+                }
+              ).then(() => {
                 proxy
                   .post("/serviceContract/cancel", {
                     id: row.id,
@@ -347,25 +339,33 @@ const getDict = () => {
       };
     });
   });
-  proxy.get("/tenantUser/list", { pageNum: 1, pageSize: 10000, tenantId: useUserStore().user.tenantId }).then((res) => {
-    userList.value = res.rows.map((item) => {
-      return {
-        label: item.nickName,
-        value: item.userId,
-      };
+  proxy
+    .get("/tenantUser/list", {
+      pageNum: 1,
+      pageSize: 10000,
+      tenantId: useUserStore().user.tenantId,
+    })
+    .then((res) => {
+      userList.value = res.rows.map((item) => {
+        return {
+          label: item.nickName,
+          value: item.userId,
+        };
+      });
     });
-  });
 };
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
-  proxy.post("/serviceContract/page", sourceList.value.pagination).then((res) => {
-    sourceList.value.data = res.rows;
-    sourceList.value.pagination.total = res.total;
-    setTimeout(() => {
-      loading.value = false;
-    }, 200);
-  });
+  proxy
+    .post("/serviceContract/page", sourceList.value.pagination)
+    .then((res) => {
+      sourceList.value.data = res.rows;
+      sourceList.value.pagination.total = res.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+    });
 };
 getDict();
 getList();
@@ -385,37 +385,43 @@ const loadingDialog = ref(false);
 const openAddRecord = ref(false);
 const recordList = ref([]);
 const getRecordList = () => {
-  proxy.post("/serviceContractRecord/page", { serviceContractId: formData.data.serviceContractId }).then((res) => {
-    if (res.rows && res.rows.length > 0) {
-      recordList.value = res.rows;
-      let fileIds = res.rows.map((item) => {
-        return item.id;
-      });
-      proxy.post("/fileInfo/getList", { businessIdList: fileIds }).then((resFile) => {
-        recordList.value = recordList.value.map((item) => {
-          let fileData = [];
-          if (resFile[item.id] && resFile[item.id].length > 0) {
-            fileData = resFile[item.id];
-            // .map((item) => {
-            //   return {
-            //     raw: item,
-            //     name: item.fileName,
-            //     url: item.fileUrl,
-            //   };
-            // });
-          }
-          return {
-            ...item,
-            fileList: fileData,
-          };
+  proxy
+    .post("/serviceContractRecord/page", {
+      serviceContractId: formData.data.serviceContractId,
+    })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        recordList.value = res.rows;
+        let fileIds = res.rows.map((item) => {
+          return item.id;
         });
-        console.log(recordList.value);
-      });
-    } else {
-      recordList.value = [];
-    }
-    loadingDialog.value = false;
-  });
+        proxy
+          .post("/fileInfo/getList", { businessIdList: fileIds })
+          .then((resFile) => {
+            recordList.value = recordList.value.map((item) => {
+              let fileData = [];
+              if (resFile[item.id] && resFile[item.id].length > 0) {
+                fileData = resFile[item.id];
+                // .map((item) => {
+                //   return {
+                //     raw: item,
+                //     name: item.fileName,
+                //     url: item.fileUrl,
+                //   };
+                // });
+              }
+              return {
+                ...item,
+                fileList: fileData,
+              };
+            });
+            console.log(recordList.value);
+          });
+      } else {
+        recordList.value = [];
+      }
+      loadingDialog.value = false;
+    });
 };
 const clickRecord = (item) => {
   formData.data.serviceContractId = item.id;
@@ -475,7 +481,9 @@ const formConfig = computed(() => {
 });
 const rules = ref({
   userId: [{ required: true, message: "请选择服务人员", trigger: "change" }],
-  serviceTime: [{ required: true, message: "请选择服务时间", trigger: "change" }],
+  serviceTime: [
+    { required: true, message: "请选择服务时间", trigger: "change" },
+  ],
   status: [{ required: true, message: "请选择服务状态", trigger: "change" }],
   remark: [{ required: true, message: "请输入服务记录", trigger: "blur" }],
 });

+ 29 - 141
src/views/salesMange/salesMange/afterSales/index.vue

@@ -2,38 +2,23 @@
   <div class="tenant">
     <!-- <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事件都能传
-        }"
-        :action-list="[
+        }" :action-list="[
           {
             text: '添加售后',
             disabled: false,
             action: () => clickAdd(),
           },
-        ]"
-        @get-list="getList"
-      >
+        ]" @get-list="getList">
         <template #contractCode="{ item }">
-          <div
-            style="cursor: pointer; color: #409eff"
-            @click="handleClickCode(item)"
-          >
+          <div style="cursor: pointer; color: #409eff" @click="handleClickCode(item)">
             {{ item.contractCode }}
           </div>
         </template>
         <template #status="{ item }">
-          <div
-            style="cursor: pointer; color: #409eff"
-            @click="handleClickStatus(item)"
-          >
+          <div style="cursor: pointer; color: #409eff" @click="handleClickStatus(item)">
             <span v-if="item.status == 0">进行中</span>
             <span v-else>关闭</span>
           </div>
@@ -41,77 +26,37 @@
       </byTable>
     </div>
 
-    <el-dialog
-      title="添加售后"
-      v-model="dialogVisible"
-      width="50%"
-      destroy-on-close
-      v-if="dialogVisible"
-    >
-      <byForm
-        :formConfig="formConfig"
-        :formOption="formOption"
-        v-model="formData.data"
-        :rules="rules"
-        ref="formDom"
-        v-loading="submitLoading"
-      >
+    <el-dialog title="添加售后" v-model="dialogVisible" width="50%" destroy-on-close v-if="dialogVisible">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="formDom" v-loading="submitLoading">
         <template #details>
           <div style="width: 100%">
             <el-button type="primary" plain @click="openProduct = true">
               添加商品
             </el-button>
-            <el-table
-              :data="formData.data.afterSalesDetailList"
-              style="margin-top: 10px"
-            >
+            <el-table :data="formData.data.afterSalesDetailList" style="margin-top: 10px">
               <el-table-column prop="productCode" label="产品编码" />
-              <el-table-column
-                prop="productName"
-                label="产品名称"
-                min-width="150"
-              />
+              <el-table-column prop="productName" label="产品名称" min-width="150" />
               <el-table-column prop="productSpec" label="规格型号" />
-              <el-table-column
-                prop="productUnit"
-                label="单位"
-                :formatter="
+              <el-table-column prop="productUnit" label="单位" :formatter="
                   (row) => dictValueLabel(row.productUnit, productUnit)
-                "
-              />
+                " />
               <el-table-column prop="quantity" label="售后数量" min-width="150">
                 <template #default="{ row, $index }">
-                  <el-form-item
-                    :prop="'afterSalesDetailList.' + $index + '.quantity'"
-                    :rules="rules.quantity"
-                    :inline-message="true"
-                  >
-                    <el-input-number
-                      onmousewheel="return false;"
-                      v-model="row.quantity"
-                      :precision="4"
-                      :controls="false"
-                      :min="0"
-                    />
+                  <el-form-item :prop="'afterSalesDetailList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true">
+                    <el-input-number onmousewheel="return false;" v-model="row.quantity" :precision="4" :controls="false" :min="0" />
                   </el-form-item>
                 </template>
               </el-table-column>
               <el-table-column prop="remark" label="备注" min-width="150">
                 <template #default="{ row, $index }">
-                  <el-form-item
-                    :prop="'afterSalesDetailList.' + $index + '.remark'"
-                    :rules="rules.remark"
-                    :inline-message="true"
-                  >
+                  <el-form-item :prop="'afterSalesDetailList.' + $index + '.remark'" :rules="rules.remark" :inline-message="true">
                     <el-input v-model="row.remark" placeholder="请输入" />
                   </el-form-item>
                 </template>
               </el-table-column>
               <el-table-column prop="zip" label="操作" width="100">
                 <template #default="{ $index }">
-                  <el-button type="primary" link @click="handleRemove($index)"
-                    >删除</el-button
-                  >
+                  <el-button type="primary" link @click="handleRemove($index)">删除</el-button>
                 </template>
               </el-table-column>
             </el-table>
@@ -120,42 +65,19 @@
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button
-          type="primary"
-          @click="submitForm()"
-          size="large"
-          :loading="submitLoading"
-        >
+        <el-button type="primary" @click="submitForm()" size="large" :loading="submitLoading">
           确 定
         </el-button>
       </template>
     </el-dialog>
 
-    <el-dialog
-      title="售后跟进"
-      v-model="openFollow"
-      width="500"
-      destroy-on-close
-      v-if="openFollow"
-    >
-      <byForm
-        :formConfig="formConfigAFollow"
-        :formOption="formOption"
-        v-model="formData.followData"
-        :rules="followRules"
-        ref="followDom"
-        v-loading="submitLoading"
-      >
+    <el-dialog title="售后跟进" v-model="openFollow" width="500" destroy-on-close v-if="openFollow">
+      <byForm :formConfig="formConfigAFollow" :formOption="formOption" v-model="formData.followData" :rules="followRules" ref="followDom"
+              v-loading="submitLoading">
         <template #fileSlot>
           <div style="width: 100%">
-            <el-upload
-              v-model:fileList="formData.followData.fileList"
-              action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-              :data="uploadData"
-              multiple
-              :before-upload="uploadFile"
-              :on-preview="onPreviewFile"
-            >
+            <el-upload v-model:fileList="formData.followData.fileList" :action="uploadUrl" :data="uploadData" multiple :before-upload="uploadFile"
+                       :on-preview="onPreviewFile">
               <el-button type="primary">文件上传</el-button>
             </el-upload>
           </div>
@@ -163,50 +85,26 @@
       </byForm>
       <template #footer>
         <el-button @click="openFollow = false" size="large">取 消</el-button>
-        <el-button
-          type="primary"
-          @click="submitFollow()"
-          size="large"
-          :loading="submitLoading"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitFollow()" size="large" :loading="submitLoading">确 定</el-button>
       </template>
     </el-dialog>
 
-    <el-dialog
-      title="跟进记录"
-      v-model="openRecord"
-      width="500"
-      destroy-on-close
-      v-if="openRecord"
-    >
+    <el-dialog title="跟进记录" v-model="openRecord" width="500" destroy-on-close v-if="openRecord">
       <div>
         <div style="padding-top: 16px">
           <div>
             <el-timeline>
-              <el-timeline-item
-                v-for="(record, index) in recordList"
-                :key="index"
-                :timestamp="record.followUpTime"
-                hide-timestamp
-              >
+              <el-timeline-item v-for="(record, index) in recordList" :key="index" :timestamp="record.followUpTime" hide-timestamp>
                 <div>{{ record.followUpTime }}</div>
                 <div style="margin: 8px 0">
                   跟进人:{{ record.followUpUserName }}
                 </div>
                 <div>跟进记录:{{ record.remark }}</div>
-                <div
-                  style="margin: 8px 0; display: flex"
-                  v-if="record.fileList && record.fileList.length > 0"
-                >
+                <div style="margin: 8px 0; display: flex" v-if="record.fileList && record.fileList.length > 0">
                   <div style="width: 36px">附件:</div>
                   <div style="width: calc(100% - 36px)">
                     <div v-for="(file, index) in record.fileList" :key="index">
-                      <span
-                        style="color: #409eff; cursor: pointer"
-                        @click="openFile(file.fileUrl)"
-                        >{{ file.fileName }}</span
-                      >
+                      <span style="color: #409eff; cursor: pointer" @click="openFile(file.fileUrl)">{{ file.fileName }}</span>
                     </div>
                   </div>
                 </div>
@@ -220,18 +118,8 @@
       </template>
     </el-dialog>
 
-    <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="70%" append-to-body>
+      <SelectGoods :selectList="acquireSelectList()" @cancel="openProduct = false" @pushGoods="pushGoods"></SelectGoods>
     </el-dialog>
   </div>
 </template>

Dosya farkı çok büyük olduğundan ihmal edildi
+ 134 - 438
src/views/salesMange/shipmentMange/document/index.vue


+ 10 - 14
src/views/systemTenant/tenant/logoConfiguration/index.vue

@@ -2,14 +2,8 @@
   <div class="tenant">
     <div style="border-left: 3px solid #0084ff; padding-left: 8px">Logo 配置</div>
     <div style="padding: 32px 0 16px 0">
-      <el-upload
-        class="avatar-uploader"
-        action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-        :data="uploadData"
-        :show-file-list="false"
-        :on-success="handleAvatarSuccess"
-        :before-upload="uploadFile"
-        accept=".png">
+      <el-upload class="avatar-uploader" :action="uploadUrl" :data="uploadData" :show-file-list="false" :on-success="handleAvatarSuccess"
+                 :before-upload="uploadFile" accept=".png">
         <el-button type="primary">点击上传</el-button>
         <!-- <img v-if="imageUrl" :src="imageUrl" class="avatar" /> -->
         <!-- <el-image v-if="imageUrl" style="width: 120px; height: 30px" :src="imageUrl" fit="scale-down" />
@@ -103,13 +97,15 @@ const clickCancel = () => {
 };
 const clickSubmit = () => {
   if (fileList.value && fileList.value.length > 0) {
-    proxy.post("/tenantInfo/editLogo", { fileList: fileList.value }).then(() => {
-      ElMessage({
-        message: "保存成功",
-        type: "success",
+    proxy
+      .post("/tenantInfo/editLogo", { fileList: fileList.value })
+      .then(() => {
+        ElMessage({
+          message: "保存成功",
+          type: "success",
+        });
+        clickCancel();
       });
-      clickCancel();
-    });
   } else {
     ElMessage("请上传logo图片");
   }

+ 1 - 1
vite.config.js

@@ -39,7 +39,7 @@ export default defineConfig(({
       proxy: {
         // https://cn.vitejs.dev/config/#server-proxy
         '/dev-api': {
-          target: 'http://localhost:9898/',
+          target: 'http://admin.haijiacheng.com/prod-api',
           // 正式地址
           // target:"http://139.159.251.109/prod-api",
           changeOrigin: true,

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor