cz 1 سال پیش
والد
کامیت
2f3f4378af

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

@@ -751,7 +751,7 @@ const getDtl = (row) => {
     formData.data = res;
     if (submitType.value === "add") {
       formData.data.expensesTime = moment().format("yyyy-MM-DD HH:mm:ss");
-      formData.data.currency = accountCurrency.value[0].value;
+      formData.data.currency = row.currency;
     }
     proxy
       .post("/fileInfo/getList", { businessIdList: [row.id] })

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

@@ -350,45 +350,77 @@ const handleSubmit = async (_type) => {
               );
             }
           } else if (flowForm.flowKey == "contract_flow") {
-            if (flowForm.tenantType === "EHSD") {
-              if (data.fileList && data.fileList.length > 0) {
-                data.fileList = data.fileList.map((item) => {
-                  return {
-                    id: item.raw.id,
-                    fileName: item.raw.fileName,
-                    fileUrl: item.raw.fileUrl,
-                  };
-                });
-              } else {
-                data.fileList = [];
-              }
-              if (data.packageFileList && data.packageFileList.length > 0) {
-                data.packageFileList = data.packageFileList.map((item) => {
-                  return {
-                    id: item.raw.id,
-                    fileName: item.raw.fileName,
-                    fileUrl: item.raw.fileUrl,
-                  };
-                });
-              } else {
-                data.packageFileList = [];
-              }
-              data.ehsdJson = JSON.stringify({
-                deliveryTime: data.deliveryTime,
+            if (data.fileList && data.fileList.length > 0) {
+              data.fileList = data.fileList.map((item) => {
+                return {
+                  id: item.raw.id,
+                  fileName: item.raw.fileName,
+                  fileUrl: item.raw.fileUrl,
+                };
               });
-              data.contractProductList = data.contractProductList.map(
-                (item) => {
-                  let ehsdJson = JSON.stringify({
-                    packMethod: item.packMethod,
-                    tradeMethods: item.tradeMethods,
-                  });
-                  return {
-                    ...item,
-                    ehsdJson: ehsdJson,
-                  };
-                }
-              );
+            } else {
+              data.fileList = [];
+            }
+            if (data.packageFileList && data.packageFileList.length > 0) {
+              data.packageFileList = data.packageFileList.map((item) => {
+                return {
+                  id: item.raw.id,
+                  fileName: item.raw.fileName,
+                  fileUrl: item.raw.fileUrl,
+                };
+              });
+            } else {
+              data.packageFileList = [];
             }
+            data.ehsdJson = JSON.stringify({
+              deliveryTime: data.deliveryTime,
+            });
+            data.contractProductList = data.contractProductList.map((item) => {
+              let ehsdJson = JSON.stringify({
+                packMethod: item.packMethod,
+                tradeMethods: item.tradeMethods,
+              });
+              return {
+                ...item,
+                ehsdJson: ehsdJson,
+              };
+            });
+          } else if (flowForm.flowKey == "contract_update_flow") {
+            if (data.fileList && data.fileList.length > 0) {
+              data.fileList = data.fileList.map((item) => {
+                return {
+                  id: item.raw.id,
+                  fileName: item.raw.fileName,
+                  fileUrl: item.raw.fileUrl,
+                };
+              });
+            } else {
+              data.fileList = [];
+            }
+            if (data.packageFileList && data.packageFileList.length > 0) {
+              data.packageFileList = data.packageFileList.map((item) => {
+                return {
+                  id: item.raw.id,
+                  fileName: item.raw.fileName,
+                  fileUrl: item.raw.fileUrl,
+                };
+              });
+            } else {
+              data.packageFileList = [];
+            }
+            data.ehsdJson = JSON.stringify({
+              deliveryTime: data.deliveryTime,
+            });
+            data.contractProductList = data.contractProductList.map((item) => {
+              let ehsdJson = JSON.stringify({
+                packMethod: item.packMethod,
+                tradeMethods: item.tradeMethods,
+              });
+              return {
+                ...item,
+                ehsdJson: ehsdJson,
+              };
+            });
           } else if (flowForm.flowKey == "sample_flow") {
             if (data.fileList && data.fileList.length > 0) {
               data.fileList = data.fileList.map((item) => {
@@ -427,6 +459,41 @@ const handleSubmit = async (_type) => {
             });
           } else if (flowForm.flowKey == "sample_update_flow") {
             data.dataJson = JSON.stringify(proxy.deepClone(data));
+            if (data.fileList && data.fileList.length > 0) {
+              data.fileList = data.fileList.map((item) => {
+                return {
+                  id: item.raw.id,
+                  fileName: item.raw.fileName,
+                  fileUrl: item.raw.fileUrl,
+                };
+              });
+            } else {
+              data.fileList = [];
+            }
+            if (data.packageFileList && data.packageFileList.length > 0) {
+              data.packageFileList = data.packageFileList.map((item) => {
+                return {
+                  id: item.raw.id,
+                  fileName: item.raw.fileName,
+                  fileUrl: item.raw.fileUrl,
+                };
+              });
+            } else {
+              data.packageFileList = [];
+            }
+            data.ehsdJson = JSON.stringify({
+              deliveryTime: data.deliveryTime,
+            });
+            data.sampleProductList = data.sampleProductList.map((item) => {
+              let ehsdJson = JSON.stringify({
+                packMethod: item.packMethod,
+                tradeMethods: item.tradeMethods,
+              });
+              return {
+                ...item,
+                ehsdJson: ehsdJson,
+              };
+            });
           }
           flowForm.fileList = flowForm.fileList.map((item) => {
             return {

+ 212 - 57
src/views/purchaseManage/purchaseManage/purchaseDocumentary/index.vue

@@ -1,12 +1,28 @@
 <template>
   <div class="content">
-    <el-form :inline="true" :model="sourceList.pagination" class="demo-form-inline">
+    <el-form
+      :inline="true"
+      :model="sourceList.pagination"
+      class="demo-form-inline"
+    >
       <el-form-item label="采购合同号:" prop="code">
-        <el-input v-model="sourceList.pagination.code" placeholder="请输入采购合同号" />
+        <el-input
+          v-model="sourceList.pagination.code"
+          placeholder="请输入采购合同号"
+        />
       </el-form-item>
       <el-form-item label="采购员:" prop="userId">
-        <el-select v-model="sourceList.pagination.userId" placeholder="请选择业务员">
-          <el-option v-for="item in userList" :key="item.value" :label="item.label" :value="item.value"> </el-option>
+        <el-select
+          v-model="sourceList.pagination.userId"
+          placeholder="请选择业务员"
+        >
+          <el-option
+            v-for="item in userList"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          >
+          </el-option>
         </el-select>
       </el-form-item>
       <el-form-item>
@@ -14,23 +30,60 @@
       </el-form-item>
     </el-form>
     <div style="padding: 10px 20px; width: 100%; box-sizing: border-box">
-      <div style="width: 100%; display: flex; padding-bottom: 5px; overflow-x: auto" class="topScrollDom" @scroll="handleScroll($event, true)">
-        <div v-for="(item, index) in purchaseTrackType" :key="index" style="display: flex; align-items: center">
-          <div style="width: 200px; height: 80px; position: relative" @click="selectRegion(item)">
-            <div :class="selectRecordDocumentaryId === item.id ? 'regionSelect' : 'regionNoSelect'" style="cursor: pointer">
-              <div style="color: #333333; font-size: 13px; font-weight: 700">{{ item.count }}</div>
-              <div style="color: #333333; font-size: 12px; font-weight: 700">{{ item.name }}</div>
-              <div class="right-bottom" style="position: absolute; right: 0; bottom: 0">
+      <div
+        style="
+          width: 100%;
+          display: flex;
+          padding-bottom: 5px;
+          overflow-x: auto;
+        "
+        class="topScrollDom"
+        @scroll="handleScroll($event, true)"
+      >
+        <div
+          v-for="(item, index) in purchaseTrackType"
+          :key="index"
+          style="display: flex; align-items: center"
+        >
+          <div
+            style="width: 200px; height: 80px; position: relative"
+            @click="selectRegion(item)"
+          >
+            <div
+              :class="
+                selectRecordDocumentaryId === item.id
+                  ? 'regionSelect'
+                  : 'regionNoSelect'
+              "
+              style="cursor: pointer"
+            >
+              <div style="color: #333333; font-size: 13px; font-weight: 700">
+                {{ item.count }}
+              </div>
+              <div style="color: #333333; font-size: 12px; font-weight: 700">
+                {{ item.name }}
+              </div>
+              <div
+                class="right-bottom"
+                style="position: absolute; right: 0; bottom: 0"
+              >
                 {{ 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>
     </div>
     <div class="main-content" v-loading="loading">
-      <el-card class="box-card" v-for="(item, index) in sourceList.data" :key="index" style="margin-bottom: 20px">
+      <el-card
+        class="box-card"
+        v-for="(item, index) in sourceList.data"
+        :key="index"
+        style="margin-bottom: 20px"
+      >
         <template #header>
           <el-row>
             <el-col :span="4">
@@ -43,38 +96,86 @@
               <span>采购员: {{ item.userName }}</span>
             </el-col>
             <el-col :span="4">
-              <span>供应商: {{ item.customerName }}</span>
+              <span>供应商: {{ item.supplyName }}</span>
             </el-col>
             <el-col :span="12">
-              <span>合同金额: {{ item.currency }}{{ item.amount }}</span>
+              <span>合同金额: {{ item.currency }} {{ item.amount }}</span>
             </el-col>
           </el-row>
         </template>
-        <div style="overflow-x: auto; width: 100%" class="scrollDom" @scroll="handleScroll($event, false, index)">
+        <div
+          style="overflow-x: auto; width: 100%"
+          class="scrollDom"
+          @scroll="handleScroll($event, false, index)"
+        >
           <el-steps :space="200" align-center>
-            <el-step v-for="(itemType, key) in purchaseTrackType" :key="key" :title="itemType.name" :status="getStatus(itemType, item)" />
+            <el-step
+              v-for="(itemType, key) in purchaseTrackType"
+              :key="key"
+              :title="itemType.name"
+              :status="getStatus(itemType, item)"
+            />
           </el-steps>
           <div style="display: flex">
-            <div v-for="(itemType, key) in purchaseTrackType" :key="key" style="width: 200px !important; min-width: 200px !important">
+            <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]">
+              <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">
+                    <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]"
+                          v-for="(activity, index) in item.documentaryRecord[
+                            itemType.id
+                          ]"
                           :key="index"
                           :timestamp="activity.createTime"
-                          :hide-timestamp="true">
+                          :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>
-                            <div v-if="activity.fileList && activity.fileList.length > 0">
-                              <div v-for="(file, index) in activity.fileList" :key="index">
-                                <a style="color: #409eff; cursor: pointer" @click="openFile(file.fileUrl)">{{ file.fileName }}</a>
+                            <div style="font-size: 12px">
+                              {{ activity.createTime }}
+                            </div>
+                            <div
+                              style="font-size: 12px"
+                              v-html="getStyle(activity.remark)"
+                            ></div>
+                            <div
+                              v-if="
+                                activity.fileList &&
+                                activity.fileList.length > 0
+                              "
+                            >
+                              <div
+                                v-for="(file, index) in activity.fileList"
+                                :key="index"
+                              >
+                                <a
+                                  style="color: #409eff; cursor: pointer"
+                                  @click="openFile(file.fileUrl)"
+                                  >{{ file.fileName }}</a
+                                >
                               </div>
                             </div>
                           </div>
@@ -82,7 +183,15 @@
                       </el-timeline>
                     </div>
                   </template>
-                  <span style="color: #409eff; cursor: pointer; padding: 8px 0; font-size: 12px">跟单详情</span>
+                  <span
+                    style="
+                      color: #409eff;
+                      cursor: pointer;
+                      padding: 8px 0;
+                      font-size: 12px;
+                    "
+                    >跟单详情</span
+                  >
                 </el-tooltip>
               </div>
             </div>
@@ -99,14 +208,32 @@
         :page-size="sourceList.pagination.pageSize"
         :total="sourceList.pagination.total"
         @size-change="handleSizeChange"
-        @current-change="handlePageChange" />
+        @current-change="handlePageChange"
+      />
     </el-row>
 
-    <el-dialog :title="title" 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="title"
+      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 #completionTime>
           <div>
-            <el-date-picker v-model="formData.data.completionTime" type="datetime" placeholder="请选择完成时间" value-format="YYYY-MM-DD HH:mm:ss" />
+            <el-date-picker
+              v-model="formData.data.completionTime"
+              type="datetime"
+              placeholder="请选择完成时间"
+              value-format="YYYY-MM-DD HH:mm:ss"
+            />
           </div>
         </template>
         <template #file>
@@ -117,7 +244,8 @@
               :data="uploadData"
               multiple
               :before-upload="uploadFile"
-              :on-preview="onPreviewFile">
+              :on-preview="onPreviewFile"
+            >
               <el-button>选择</el-button>
             </el-upload>
           </div>
@@ -125,7 +253,9 @@
       </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>
@@ -182,16 +312,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 +345,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 +379,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 +390,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 +439,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;
@@ -444,6 +588,17 @@ const openFile = (path) => {
 }
 ::v-deep(.el-step__title) {
   width: 200px;
+  font-size: 12px;
+  color: #65686d;
+}
+::v-deep(.el-step__icon) {
+  width: 20px;
+  height: 20px;
+  font-size: 12px;
+  border-color: #65686d;
+}
+::v-deep(.el-step__icon-inner) {
+  color: #65686d;
 }
 ::v-deep(.el-timeline) {
   padding: 8px !important;