浏览代码

新功能

cz 1 年之前
父节点
当前提交
591376e720

+ 3 - 3
src/components/PDF/contractPDFOne.vue

@@ -8,7 +8,7 @@
         <div class="vertical-bar"></div>
         <div class="content">销售订单</div>
       </div>
-      <div style="display:flex;margin-bottom:0px; font-weight: 600;">
+      <div style="display:flex;margin-bottom:20px; font-weight: 600;">
         <div style="width:50%;padding-right:20px">
           <div class="row">
             <div class="left">
@@ -110,7 +110,7 @@
           <td>数量</td>
           <td>单价</td>
           <td>金额</td>
-          <td>备注</td>
+          <!-- <td>备注</td> -->
         </tr>
 
         <tr v-if="pdfData.productInfoList && pdfData.productInfoList.length > 0" v-for="(item, index) in pdfData.productInfoList" :key="item.id">
@@ -123,7 +123,7 @@
           <td>{{moneyFormat(item.productQuantity)}}</td>
           <td>{{moneyFormat(item.productPrice)}}</td>
           <td>{{moneyFormat(item.amount)}}</td>
-          <td>{{item.productRemark}}</td>
+          <!-- <td>{{item.productRemark}}</td> -->
         </tr>
         <template v-if="
             pdfData.contractProjectList &&

+ 9 - 9
src/components/PDF/purchasePDF.vue

@@ -8,7 +8,7 @@
         <div class="vertical-bar"></div>
         <div class="content">采购订单</div>
       </div>
-      <div style="display:flex;margin-bottom:0px; font-weight: 600;">
+      <div style="display:flex;margin-bottom:20px; font-weight: 600;">
         <div style="width:50%;padding-right:20px">
           <div class="row">
             <div class="left">
@@ -104,14 +104,14 @@
           <td style="width:7%">序号</td>
           <!-- <td style="width:12%">销售订单号</td> -->
           <td style="width:10%">物料编码</td>
-          <td style="width:28%">物料名称</td>
+          <td style="width:33%">物料名称</td>
           <td style="width:10%">规格型号</td>
-          <td style="width:7%"> 颜色</td>
-          <td style="width:7%">单位</td>
-          <td style="width:7%">数量</td>
-          <td style="width:7%">单价</td>
-          <td style="width:7%">金额</td>
-          <td style="width:10%">备注</td>
+          <td style="width:8%"> 颜色</td>
+          <td style="width:8%">单位</td>
+          <td style="width:8%">数量</td>
+          <td style="width:8%">单价</td>
+          <td style="width:8%">金额</td>
+          <!-- <td style="width:10%">备注</td> -->
         </tr>
         <tr v-if="pdfData.purchaseProductList && pdfData.purchaseProductList.length > 0" v-for="(item, index) in pdfData.purchaseProductList"
             :key="item.id">
@@ -126,7 +126,7 @@
           <td>{{moneyFormat(item.quantity)}}</td>
           <td>{{moneyFormat(item.price)}}</td>
           <td>{{moneyFormat(item.amount)}}</td>
-          <td>{{item.remark}}</td>
+          <!-- <td>{{item.remark}}</td> -->
         </tr>
         <template v-if="
             pdfData.purchaseProjectList &&

+ 104 - 22
src/components/headerBar/header-bar.vue

@@ -159,28 +159,46 @@
       <template #default>
         <div class="menu-bar">
           <div class="menu-warp" @click.stop>
-            <div v-for="(item, index) in sidebarRoutersCopy" :key="item.name" v-show="item.type == 1 && item.status == '0'"
-                 style="border-bottom:2px dashed #edeaea;padding-bottom:20px;margin-bottom:20px;">
-              <div class="first-order-title">
-                <TitleInfo :content="item.menuName" :size="16"></TitleInfo>
-              </div>
-              <div class="layout-box">
-                <ul class="son-box" v-for="i in item.children" :key="i.menuId">
-                  <li class="menu-title">
-                    {{ i.menuName }}
-                  </li>
-                  <div v-for="(j, index) in i.children" :key="index">
-                    <li v-if="i.isNone" class="menu-ul" style="cursor: auto"></li>
-                    <li class="menu-ul">
-                      <i style="cursor: pointer;position:relative;top:0px" @click.stop="editMenu(j)">
-                        <svg-icon :icon-class="isHaveCollect(j) ? 'shoucang1' :'shoucang'" />
-                      </i>
-                      <span style="margin-left:6px;cursor: pointer" @click="commonsBannerToRouter(j)">{{ j.menuName }}</span>
+            <div style="margin:20px 0">
+              <el-input v-model="menuKeyword" placeholder="输入菜单名称进行搜索" class="menu-box" clearable @input="handleSearchMenu" />
+            </div>
+            <div v-if="!menuKeyword">
+              <div v-for="(item, index) in sidebarRoutersCopy" :key="item.name" v-show="item.type == 1 && item.status == '0'"
+                   style="border-bottom:2px dashed #edeaea;padding-bottom:20px;margin-bottom:20px;">
+                <div class="first-order-title">
+                  <TitleInfo :content="item.menuName" :size="16"></TitleInfo>
+                </div>
+                <div class="layout-box">
+                  <ul class="son-box" v-for="i in item.children" :key="i.menuId">
+                    <li class="menu-title">
+                      {{ i.menuName }}
                     </li>
-                  </div>
-                </ul>
+                    <div v-for="(j, index) in i.children" :key="index">
+                      <li v-if="i.isNone" class="menu-ul" style="cursor: auto"></li>
+                      <li class="menu-ul">
+                        <i style="cursor: pointer;position:relative;top:0px" @click.stop="editMenu(j)">
+                          <svg-icon :icon-class="isHaveCollect(j) ? 'shoucang1' :'shoucang'" />
+                        </i>
+                        <span style="margin-left:6px;cursor: pointer" @click="commonsBannerToRouter(j)">{{ j.menuName }}</span>
+                        <!-- :class="{'search-class':showSearchStyle(j.menuName)}" -->
+                      </li>
+                    </div>
+                  </ul>
+                </div>
               </div>
             </div>
+            <div v-if="menuKeyword">
+              <div v-for="(j, index) in keywordRouters" :key="index">
+                <li class="menu-ul">
+                  <i style="cursor: pointer;position:relative;top:0px" @click.stop="editMenu(j)">
+                    <svg-icon :icon-class="isHaveCollect(j) ? 'shoucang1' :'shoucang'" />
+                  </i>
+                  <span style="margin-left:6px;cursor: pointer" @click="commonsBannerToRouter(j)">{{ j.menuName }}</span>
+                  <!-- :class="{'search-class':showSearchStyle(j.menuName)}" -->
+                </li>
+              </div>
+            </div>
+
           </div>
           <div class="right-banner">
             <div class="first-order-title">
@@ -378,6 +396,39 @@ const plugsDialog = ref(false);
 const userData = ref(Cookies.get("nickName") || "");
 const commonsRouterList = ref([]);
 const activeLeftData = ref({});
+const menuKeyword = ref("");
+const keywordRouters = ref([]);
+const handleSearchMenu = (val) => {
+  if (val) {
+    // let els = document.querySelectorAll(".search-class");
+    // if (els && els.length > 0) {
+    //   console.log(els, "ss");
+    //   els[0].scrollIntoView();
+    // els[0].scrollIntoView({
+    //   behavior: "smooth", // 平滑过渡
+    //   block: "nearest", // 上边框与视窗顶部平齐。默认值
+    // });
+    // }
+
+    let arr = [];
+    sidebarRoutersCopy.value.map((item) => {
+      if (item.children) {
+        item.children.map((j) => {
+          if (j.children) {
+            j.children.map((n) => {
+              if (n.menuName.includes(val) || n.menuName.indexOf(val) != -1) {
+                arr.push(n);
+              }
+            });
+          }
+        });
+      }
+    });
+    keywordRouters.value = arr;
+  } else {
+    keywordRouters.value = [];
+  }
+};
 const openLeftBaner = (i, index) => {
   // leftBanerType.value = 1;
   activeLeftData.value = i;
@@ -584,6 +635,9 @@ const commonsBannerToRouter = (i) => {
       });
     }
   });
+  if (menuKeyword.value) {
+    menuKeyword.value = "";
+  }
 };
 
 //获取浏览器宽度
@@ -725,9 +779,15 @@ const plugDowload = () => {
     });
   plugsDialog.value = false;
 };
+
+const showSearchStyle = (name) => {
+  if (menuKeyword.value) {
+    return name.includes(menuKeyword.value);
+  }
+};
 </script>
 
-<style lang="scss">
+<style lang="scss" scope>
 .menuDrawerClass {
   // width: calc(100vw - 500px) !important;
   width: 70% !important;
@@ -879,8 +939,8 @@ const plugDowload = () => {
         }
         .menu-ul {
           // padding-left: 10px;
-          height: 30px;
-          line-height: 30px;
+          height: 33px;
+          line-height: 33px;
           font-size: 14px;
           font-weight: 400;
         }
@@ -890,6 +950,17 @@ const plugDowload = () => {
         }
       }
     }
+    .menu-ul {
+      // padding-left: 10px;
+      height: 33px;
+      line-height: 33px;
+      font-size: 14px;
+      font-weight: 400;
+    }
+
+    .menu-ul span:hover {
+      color: #0084ff;
+    }
   }
   .right-banner {
     width: 300px;
@@ -919,4 +990,15 @@ const plugDowload = () => {
     }
   }
 }
+.search-class {
+  color: red !important;
+}
+</style>
+
+<style>
+.el-input.menu-box .el-input__wrapper {
+  border: none !important;
+  box-shadow: none !important;
+  border-bottom: 1px solid #c0c4cc !important;
+}
 </style>

+ 28 - 15
src/components/process/SF/Contract.vue

@@ -199,10 +199,12 @@
                 <div style="width: 100%">
                   <el-upload action="https://winfaster.obs.cn-south-1.myhuaweicloud.com" accept=".gif, .jpeg, .jpg, .png" :show-file-list="false"
                              :data="uploadData" :before-upload="(file)=>handleBeforeUpload(file,$index)" :on-success="()=>handleSuccess($index)">
-                    <img v-if="row.imageUrl" :src="row.imageUrl" class="pic" />
-                    <el-icon v-else class="avatar-uploader-icon">
-                      <Plus />
-                    </el-icon>
+                    <div v-loading="row.imgLoading">
+                      <img v-if="row.imageUrl" :src="row.imageUrl" class="pic" />
+                      <el-icon v-else class="avatar-uploader-icon">
+                        <Plus />
+                      </el-icon>
+                    </div>
                   </el-upload>
                 </div>
               </template>
@@ -324,22 +326,22 @@
                 </div>
               </template>
             </el-table-column>
-            <el-table-column label="备注">
+            <el-table-column :label="'金额'" width="130">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item :prop="'contractProjectList.' + $index + '.remark'" class="margin-b-0 wid100">
-                    <el-input v-model="row.remark" placeholder="请输入备注" />
+                  <el-form-item :prop="'contractProjectList.' + $index + '.amount'" :rules="rules.amount" :inline-message="true"
+                                class="margin-b-0 wid100">
+                    <el-input-number onmousewheel="return false;" v-model="row.amount" placeholder="请输入金额" style="width: 100%" :precision="2"
+                                     :controls="false" :min="0" @change="totalAmount()" />
                   </el-form-item>
                 </div>
               </template>
             </el-table-column>
-            <el-table-column :label="'金额'" width="130">
+            <el-table-column label="备注">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item :prop="'contractProjectList.' + $index + '.amount'" :rules="rules.amount" :inline-message="true"
-                                class="margin-b-0 wid100">
-                    <el-input-number onmousewheel="return false;" v-model="row.amount" placeholder="请输入金额" style="width: 100%" :precision="2"
-                                     :controls="false" :min="0" @change="totalAmount()" />
+                  <el-form-item :prop="'contractProjectList.' + $index + '.remark'" class="margin-b-0 wid100">
+                    <el-input v-model="row.remark" placeholder="请输入备注" />
                   </el-form-item>
                 </div>
               </template>
@@ -784,7 +786,7 @@ const rules = ref({
   transportMethod: [
     { required: true, message: "请选择运输方式", trigger: "change" },
   ],
-  remark: [{ required: true, message: "请输入付款条件", trigger: "blur" }],
+  // remark: [{ required: true, message: "请输入付款条件", trigger: "blur" }],
   rate: [{ required: true, message: "请输入汇率", trigger: "blur" }],
   shroffAccountId: [
     { required: true, message: "请选择收款账号", trigger: "change" },
@@ -1175,6 +1177,7 @@ const querySearch = (queryString, callback) => {
 };
 
 const handleBeforeUpload = async (file, index) => {
+  formData.data.contractProductList[index].imgLoading = true;
   const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
   uploadData.value = res.uploadBody;
   formData.data.contractProductList[index].fileList = [
@@ -1185,12 +1188,22 @@ const handleBeforeUpload = async (file, index) => {
       uploadState: false,
     },
   ];
-  formData.data.contractProductList[index].imageUrl = res.fileUrl;
+  formData.data.contractProductList[index].fileData = res;
   return true;
 };
 
 const handleSuccess = (index) => {
-  formData.data.contractProductList[index].uploadState = true;
+  if (
+    formData.data.contractProductList[index].fileData &&
+    formData.data.contractProductList[index].fileData.fileUrl
+  ) {
+    formData.data.contractProductList[index].uploadState = true;
+    formData.data.contractProductList[index].imageUrl =
+      formData.data.contractProductList[index].fileData.fileUrl;
+  }
+  setTimeout(() => {
+    formData.data.contractProductList[index].imgLoading = false;
+  }, 400);
 };
 
 const loadingSearch = ref(false);

+ 3 - 1
src/main.js

@@ -56,7 +56,8 @@ import {
   getImgBase64,
   msgTip,
   msgConfirm,
-  getFile
+  getFile,
+  downloadFile
 } from '@/utils/util'
 
 // 分页组件
@@ -87,6 +88,7 @@ app.config.globalProperties.post = post
 app.config.globalProperties.msgTip = msgTip
 app.config.globalProperties.msgConfirm = msgConfirm
 app.config.globalProperties.getFile = getFile
+app.config.globalProperties.downloadFile = downloadFile
 app.config.globalProperties.postTwo = postTwo
 app.config.globalProperties.download = download
 app.config.globalProperties.parseTime = parseTime

+ 15 - 0
src/utils/util.js

@@ -480,6 +480,21 @@ export function getImgBase64(url) {
   });
 };
 
+export function downloadFile(fileStream, fileName) {
+  // 创建 Blob 对象
+  const blob = new Blob([fileStream]);
+  // 创建下载链接
+  const url = URL.createObjectURL(blob);
+  // 创建 <a> 元素
+  const a = document.createElement("a");
+  a.href = url;
+  a.download = fileName;
+  // 模拟点击下载
+  a.click();
+  // 释放对象
+  URL.revokeObjectURL(url);
+}
+
 // 消息提示
 export function msgTip(message, type = 1) {
   let obj = {

+ 14 - 0
src/views/EHSD/productLibrary/companyProduct/index.vue

@@ -8,6 +8,11 @@
     <div class="content">
       <byTable :source="sourceList.data" :tableHeight="tableHeight" :pagination="sourceList.pagination" :config="config" :loading="loading"
                highlight-current-row :selectConfig="selectConfig" :action-list="[
+               {
+                text: '导出Excel',
+                action: () => exportExcel(),
+                disabled: false,
+              },
               {
                 text: '添加',
                 action: () => openModal('add'),
@@ -841,6 +846,15 @@ const handleClickUpload = async (att, flag) => {
 getTechnologyData();
 getTreeList();
 getList();
+
+const exportExcel = () => {
+  proxy.msgTip("请稍后", 2);
+  proxy
+    .postTwo("/productInfo/exportExcel", sourceList.value.pagination)
+    .then((res) => {
+      proxy.downloadFile(res, "产品数据.xlsx");
+    });
+};
 </script>
 
 <style lang="scss" scoped>

+ 30 - 26
src/views/EHSD/saleContract/contractEHSD/index.vue

@@ -37,7 +37,9 @@
 
         <template #prodTag="{ item }">
           <div style="width: 100%">
-            <el-tag style="margin-right: 8px" type="success" v-for="(tag, index) in item.prodTags" closable :key="index"
+            <el-icon :size="16" style="cursor:pointer;margin-right: 5px;position:relative;top:5px" color="#409EFF" @click="handleEditTag(item)">
+              <Edit />
+            </el-icon> <el-tag style="margin-right: 8px" type="success" v-for="(tag, index) in item.prodTags" closable :key="index"
                     @close="prodTagClose(index, item)">
               {{ dictKeyValue(tag, contractTag) }}
             </el-tag>
@@ -179,7 +181,7 @@
       </template>
     </el-dialog>
 
-    <el-dialog :title="'下发生产'" v-model="productionDialog" width="500px" destroy-on-close>
+    <el-dialog :title="'下发生产'" v-model="productionDialog" width="700px" destroy-on-close>
       <byForm :formConfig="productionFormConfig" :formOption="formOption" v-model="formData.data" :rules="productionRules" ref="productionFormDom"
               v-loading="formLoading">
       </byForm>
@@ -189,7 +191,7 @@
       </template>
     </el-dialog>
 
-    <el-dialog :title="'生产指示'" v-model="tagDialog" width="500px" destroy-on-close>
+    <el-dialog :title="'生产指示'" v-model="tagDialog" width="700px" destroy-on-close>
       <byForm :formConfig="tagFormConfig" :formOption="formOption" v-model="formData.tagData" :rules="tagRules" ref="tagFormDom"
               v-loading="formLoading">
       </byForm>
@@ -496,7 +498,7 @@ const config = computed(() => {
       attrs: {
         label: "生产指示",
         slot: "prodTag",
-        "min-width": 160,
+        "min-width": 200,
       },
     },
     {
@@ -545,17 +547,19 @@ const config = computed(() => {
                 },
               }
             : {},
-          {
-            attrs: {
-              label: "打印",
-              type: "primary",
-              text: true,
-            },
-            el: "button",
-            click() {
-              clickPrint(row);
-            },
-          },
+          row.status == 30
+            ? {
+                attrs: {
+                  label: "打印",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  clickPrint(row);
+                },
+              }
+            : {},
           {
             attrs: {
               label: "作废",
@@ -609,17 +613,17 @@ const config = computed(() => {
                 },
               }
             : {},
-          {
-            attrs: {
-              label: "生产指示",
-              type: "primary",
-              text: true,
-            },
-            el: "button",
-            click() {
-              handleEditTag(row);
-            },
-          },
+          // {
+          //   attrs: {
+          //     label: "生产指示",
+          //     type: "primary",
+          //     text: true,
+          //   },
+          //   el: "button",
+          //   click() {
+          //     handleEditTag(row);
+          //   },
+          // },
           // {
           //   attrs: {
           //     label: "售后",

+ 21 - 31
src/views/MES/productionMaterial/index.vue

@@ -257,43 +257,33 @@ const handleTabChange = (val) => {
 
 const selectData = ref([]);
 const selectRow = (data) => {
-  console.log(data, "ss");
-  selectData.value = proxy.deepClone(data);
+  selectData.value = data.map((x) => x.id);
 };
 const printTime = ref("");
 const printList = ref([]);
 const openModal = () => {
-  // let obj = {};
+  // proxy.msgTip("请稍后");
   printList.value = [];
-  // for (let i = 0; i < selectData.value.length; i++) {
-  //   const e = selectData.value[i];
-  //   if (obj[e.materialId]) {
-  //     obj[e.materialId].quantity += e.quantity;
-  //   } else {
-  //     obj[e.materialId] = e;
-  //   }
-  // }
-  let list = [];
-  for (let i = 0; i < selectData.value.length; i++) {
-    if (i == 0) {
-      list.push(selectData.value[i]);
-    } else {
-      let index = list.findIndex(
-        (x) => x.materialId == selectData.value[i].materialId
-      );
-      if (index >= 0) {
-        list[index].quantity =
-          list[index].quantity + selectData.value[i].quantity;
-      } else {
-        list.push(selectData.value[i]);
+  proxy
+    .post("/materialPreparation/list", { preparationIdList: selectData.value })
+    .then((res) => {
+      let list = [];
+      for (let i = 0; i < res.length; i++) {
+        if (i == 0) {
+          list.push(res[i]);
+        } else {
+          let index = list.findIndex((x) => x.materialId == res[i].materialId);
+          if (index >= 0) {
+            list[index].quantity = list[index].quantity + res[i].quantity;
+          } else {
+            list.push(res[i]);
+          }
+        }
       }
-    }
-  }
-  // console.log(obj, "ssaa");
-  // printList.value = Object.values(obj);
-  printList.value = list;
-  printTime.value = moment().format("yyyy-MM-DD HH:mm:ss");
-  dialogVisible.value = true;
+      printList.value = list;
+      printTime.value = moment().format("yyyy-MM-DD HH:mm:ss");
+      dialogVisible.value = true;
+    });
 };
 
 const submitForm = () => {

+ 12 - 3
src/views/process/dealWith/backlog.vue

@@ -71,6 +71,7 @@ const config = computed(() => {
       attrs: {
         label: "流程类型",
         prop: "flowName",
+        width: 200,
       },
     },
     {
@@ -79,7 +80,13 @@ const config = computed(() => {
         prop: "title",
       },
     },
-
+    {
+      attrs: {
+        label: "当前处理人名称",
+        prop: "handleUserName",
+        width: 160,
+      },
+    },
     {
       attrs: {
         label: "流程状态",
@@ -98,19 +105,21 @@ const config = computed(() => {
       attrs: {
         label: "发起人",
         prop: "createUserName",
+        width: 160,
       },
     },
     {
       attrs: {
         label: "发起时间",
         prop: "createTime",
+        width: 160,
       },
     },
     {
       attrs: {
         label: "操作",
-        width: "200",
-        align: "right",
+        width: "100",
+        align: "center",
       },
       // 渲染 el-button,一般用在最后一列。
       renderHTML(row) {

+ 2 - 1
src/views/process/processApproval/index.vue

@@ -756,9 +756,10 @@ const getTableHeight = () => {
     flowChartDom.value.style.height = window.innerHeight - 210 + "px";
   }
 };
-nextTick(() => {
+onMounted(() => {
   getTableHeight();
 });
+
 window.addEventListener("resize", () => {
   getTableHeight();
 });

+ 14 - 5
src/views/process/processConfig/vueFlow.vue

@@ -169,7 +169,7 @@ const formConfig = computed(() => {
       required: true,
       itemWidth: 50,
       fn: (e) => {
-        gethandleObjectList(e);
+        gethandleObjectList(e, true);
       },
       //1用户 2部门负责人 3部门总监 4岗位 5角色
       data: [
@@ -427,8 +427,11 @@ const deleteFlowDefinitionNodeObj = (id) => {
   dialogVisible.value = false;
 };
 
-const gethandleObjectList = (e) => {
-  formData.data.handleObjectId = "";
+const gethandleObjectList = (e, flag) => {
+  if (flag) {
+    formData.data.handleObjectId = "";
+  }
+
   if (e === 1) {
     proxy
       .get(
@@ -671,8 +674,14 @@ const antvInit = (data) => {
     }
     formType.value = cell.shape;
     if (flowDefinitionNodeObj.value[cell.id]) {
-      formData.data = flowDefinitionNodeObj.value[cell.id];
-      formData.data.cell = cell;
+      // 默认去调对应的处理人接口
+      gethandleObjectList(
+        flowDefinitionNodeObj.value[cell.id].handleObjectType
+      );
+      setTimeout(() => {
+        formData.data = flowDefinitionNodeObj.value[cell.id];
+        formData.data.cell = cell;
+      }, 300);
     } else {
       formData.data = {
         id: cell.id,