Browse Source

bug更改

cz 1 year ago
parent
commit
1caad4ea02

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

@@ -224,6 +224,7 @@ const handleRemove = (file, item) => {
     formData.value[item.prop].splice(index, 1);
   }
 };
+
 const handleBeforeUpload = async (file, item) => {
   fileData.value = {};
   const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });

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

@@ -884,7 +884,7 @@ export default defineComponent({
   }
   .el-table {
     :deep() th {
-      font-size: 12px;
+      font-size: 14px;
     }
     :deep() td {
       font-size: 14px;

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

@@ -239,9 +239,10 @@
               <template #default="{ row, $index }">
                 <div style="width:100%">
                   <div style="display:flex">
-                    <el-button type="primary" text link style="writing-mode: vertical-rl;margin-right:10px;" @click="handleClickUploadOne($index)">
-                      {{row.isShowProductFile?'定制图稿':'取消定制'}}
-                    </el-button>
+                    <div style="writing-mode: vertical-rl;margin-right:10px;background:rgb(171 173 175);color:#fff;padding:5px 2px;border-radius:3px;"
+                         @click="handleClickUploadOne($index)">
+                      {{row.isShowProductFile?'定  制  图  稿':'取 消 定 制'}}
+                    </div>
                     <div>
                       <div v-if="row.isShowProductFile &&row.fileListOne && row.fileListOne.length > 0">
                         <span class="el-click" @click="onPicture(row.fileListOne[0].fileUrl)">{{row.fileListOne[0].fileName}}</span>
@@ -1491,17 +1492,27 @@ const getAllData = (businessId) => {
       formData.data.contractProductList &&
       formData.data.contractProductList.length > 0
     ) {
+      formData.data.contractProductList.forEach((x) => {
+        x.rowId = uuidv4();
+      });
       getFileData();
       let ids = formData.data.contractProductList.map((x) => x.id);
-      // proxy.getFile(
-      //   ids,
-      //   formData.data.contractProductList,
-      //   "id",
-      //   "fileList",
-      //   "imageUrl"
-      // );
+      let productIds = formData.data.contractProductList.map(
+        (x) => x.productId
+      );
+      proxy.getFileData({
+        businessIdList: productIds,
+        data: formData.data.contractProductList,
+        att: "productId",
+        businessType: "0",
+        fileAtt: "productFile",
+        filePathAtt: "fileUrl",
+      });
       proxy
-        .post("/fileInfo/getList", { businessIdList: ids })
+        .getFileData({
+          businessIdList: ids,
+          getAll: true,
+        })
         .then((fileObj) => {
           for (let i = 0; i < formData.data.contractProductList.length; i++) {
             const ele = formData.data.contractProductList[i];
@@ -1543,7 +1554,7 @@ const getAllData = (businessId) => {
 const getFileData = () => {
   let ids = [];
   formData.data.contractProductList.map((x) => {
-    ids.push(x.productId);
+    // ids.push(x.productId);
     x.contractProductBomList.map((y) => {
       ids.push(y.materialId);
     });
@@ -1555,9 +1566,9 @@ const getFileData = () => {
     })
     .then((fileObj) => {
       formData.data.contractProductList.map((x) => {
-        if (fileObj[x.productId] && fileObj[x.productId].length > 0) {
-          x.fileUrl = fileObj[x.productId][0].fileUrl;
-        }
+        // if (fileObj[x.productId] && fileObj[x.productId].length > 0) {
+        //   x.fileUrl = fileObj[x.productId][0].fileUrl;
+        // }
         x.contractProductBomList.map((y) => {
           y.fileList = fileObj[y.materialId] || [];
           if (y.fileList && y.fileList.length > 0) {
@@ -1609,6 +1620,7 @@ const getPriceSheetData = (id) => {
         delete y.id;
         return y;
       }),
+      rowId: uuidv4(),
     }));
     changeProductPrice();
     getFileData();

+ 2 - 0
src/main.js

@@ -57,6 +57,7 @@ import {
   msgTip,
   msgConfirm,
   getFile,
+  getFileData,
   downloadFile
 } from '@/utils/util'
 
@@ -88,6 +89,7 @@ app.config.globalProperties.post = post
 app.config.globalProperties.msgTip = msgTip
 app.config.globalProperties.msgConfirm = msgConfirm
 app.config.globalProperties.getFile = getFile
+app.config.globalProperties.getFileData = getFileData
 app.config.globalProperties.downloadFile = downloadFile
 app.config.globalProperties.postTwo = postTwo
 app.config.globalProperties.download = download

+ 50 - 0
src/utils/util.js

@@ -36,6 +36,56 @@ export function getFile(businessIdList, dataSource, att = 'id', fileAtt = 'fileL
   return false
 }
 
+
+// businessIdList 业务id列表  data 数据源  att  要对应的属性   businessType取业务类型的数据  fileAtt  要赋值的属性  filePathAtt  取第一张图片的属性
+export function getFileData(option = {}) {
+  return new Promise((resolve) => {
+    let {
+      businessIdList,
+      data,
+      att = 'id',
+      businessType = '',
+      fileAtt = "fileList",
+      filePathAtt = 'imageUrl',
+      getAll = false
+    } = option
+    if (businessIdList && businessIdList.length > 0) {
+      if (getAll) {
+        resolve(post("/fileInfo/getList", {
+          businessIdList,
+        }))
+        return
+      } else {
+        post("/fileInfo/getList", {
+          businessIdList,
+        }).then((res) => {
+          if (data && data.length > 0) {
+            for (let i = 0; i < data.length; i++) {
+              const ele = data[i];
+              for (const key in res) {
+                if (ele[att] == key && res[key] && res[key].length > 0) {
+                  let list = []
+                  if (businessType) {
+                    list = res[key].filter((x) => x.businessType == businessType)
+                  } else {
+                    list = res[key]
+                  }
+                  ele[fileAtt] = list
+                  if (filePathAtt) {
+                    ele[filePathAtt] = list[0].fileUrl
+                  }
+                }
+              }
+            }
+          }
+        });
+      }
+    }
+  })
+
+}
+
+
 //根据dictKey值回显字典label值
 export function dictKeyValue(value, arr) {
   if ((value || value == 0) && arr) {

+ 2 - 13
src/views/EHSD/procurement/purchasedEHSD/index.vue

@@ -44,7 +44,6 @@ import { ElMessage, ElMessageBox } from "element-plus";
 import PurchasePDF from "@/components/PDF/purchasePDF.vue";
 // import PurchasePDFOne from "@/components/PDF/purchasePDFOne.vue";
 // import PurchasePDFOneNew from "@/components/PDF/purchasePDFOneNew.vue";
-import $bus from "@/bus/index.js";
 
 const route = useRoute();
 const { proxy } = getCurrentInstance();
@@ -230,7 +229,8 @@ const config = computed(() => {
               handlePrintPdf(row);
             },
           },
-          row.status == 30 && Number(row.amount) > Number(row.sumPayMoney)
+          // && Number(row.amount) > Number(row.sumPayMoney)
+          row.status == 30
             ? {
                 attrs: {
                   label: "作废",
@@ -403,17 +403,6 @@ const PdfDom = ref(null);
 const exportExcel = () => {
   PdfDom.value.exportExcel();
 };
-
-onMounted(() => {
-  $bus.on("refreshTableData", () => {
-    getList();
-  });
-});
-
-onBeforeUnmount(() => {
-  // 取消订阅特定事件
-  $bus.off("refreshTableData");
-});
 </script>
 
 <style lang="scss" scoped>

+ 24 - 23
src/views/EHSD/saleContract/contractEHSD/index.vue

@@ -613,32 +613,33 @@ const config = computed(() => {
                 },
               }
             : {},
-          row.orderDistributeStatus == 1
-            ? {}
-            : {
-                attrs: {
-                  label: "作废",
-                  type: "danger",
-                  text: true,
-                },
-                el: "button",
-                click() {
+          // row.orderDistributeStatus == 1
+          //   ? {}
+          //   :
+          {
+            attrs: {
+              label: "作废",
+              type: "danger",
+              text: true,
+            },
+            el: "button",
+            click() {
+              proxy
+                .msgConfirm()
+                .then((res) => {
                   proxy
-                    .msgConfirm()
+                    .post("/contract/cancellation", {
+                      id: row.id,
+                    })
                     .then((res) => {
-                      proxy
-                        .post("/contract/cancellation", {
-                          id: row.id,
-                        })
-                        .then((res) => {
-                          proxy.msgTip("操作成功", 1);
+                      proxy.msgTip("操作成功", 1);
 
-                          getList();
-                        });
-                    })
-                    .catch((err) => {});
-                },
-              },
+                      getList();
+                    });
+                })
+                .catch((err) => {});
+            },
+          },
           row.status == 30
             ? {
                 attrs: {

+ 3 - 3
src/views/EHSD/saleContract/performanceSet/index.vue

@@ -153,7 +153,7 @@ const getProcesses = () => {
   for (let i = 0; i < monthData.value.length; i++) {
     const ele = monthData.value[i];
     let attrs = {
-      label: `${ele}月`,
+      label: `${ele}月(万元)`,
       slot: attrData.value[i],
       isNeedHeaderSlot: false,
       "min-width": 100,
@@ -211,8 +211,8 @@ const handleChangeVal = (item, month, val) => {
     };
     data[month] = val;
     proxy.post("/deptPerf/edit", data).then((res) => {
-      proxy.msgTip("配置成功");
-      getList();
+      // proxy.msgTip("配置成功");
+      // getList();
     });
   }
 };

+ 57 - 57
src/views/JST/order/index.vue

@@ -8,7 +8,7 @@
 
         <template #code="{ item }">
           <div>
-            <span class="el-click" @click="handleGetDtl(item)">{{ item.name }}</span>
+            <span class="el-click" @click="handleGetDtl(item)">{{ item.oid }}</span>
           </div>
         </template>
 
@@ -89,110 +89,110 @@ const config = computed(() => {
     {
       attrs: {
         label: "内部订单号",
-        prop: "code",
+        prop: "oid",
         slot: "code",
       },
     },
     {
       attrs: {
         label: "分销商",
-        prop: "name",
+        prop: "drpFrom",
       },
     },
     {
       attrs: {
         label: "订单日期",
-        prop: "name",
+        prop: "created",
       },
     },
     {
       attrs: {
         label: "订单状态",
-        prop: "name",
+        prop: "shopStatus",
       },
     },
     {
       attrs: {
         label: "订单来源",
-        prop: "name",
+        prop: "shopSite",
       },
     },
     {
       attrs: {
         label: "店铺",
-        prop: "name",
+        prop: "shopName",
       },
     },
     {
       attrs: {
         label: "商品",
-        prop: "name",
+        prop: "skus",
       },
     },
     {
       attrs: {
         label: "应付金额",
-        prop: "name",
+        prop: "payAmount",
       },
     },
     {
       attrs: {
         label: "已付金额",
-        prop: "name",
+        prop: "paidAmount",
       },
     },
     {
       attrs: {
         label: "付款时间",
-        prop: "name",
-      },
-    },
-    {
-      attrs: {
-        label: "操作",
-        width: "120",
-        align: "center",
-        fixed: "right",
-      },
-      renderHTML(row) {
-        return [
-          {
-            attrs: {
-              label: "修改",
-              type: "primary",
-              text: true,
-            },
-            el: "button",
-            click() {
-              getDtl(row);
-            },
-          },
-          {
-            attrs: {
-              label: "删除",
-              type: "danger",
-              text: true,
-            },
-            el: "button",
-            click() {
-              proxy
-                .msgConfirm()
-                .then((res) => {
-                  proxy
-                    .post("/shopInfo/delete", {
-                      id: row.id,
-                    })
-                    .then((res) => {
-                      proxy.msgTip("删除成功", 1);
-                      getList();
-                    });
-                })
-                .catch((err) => {});
-            },
-          },
-        ];
+        prop: "payDate",
       },
     },
+    // {
+    //   attrs: {
+    //     label: "操作",
+    //     width: "120",
+    //     align: "center",
+    //     fixed: "right",
+    //   },
+    //   renderHTML(row) {
+    //     return [
+    //       {
+    //         attrs: {
+    //           label: "修改",
+    //           type: "primary",
+    //           text: true,
+    //         },
+    //         el: "button",
+    //         click() {
+    //           getDtl(row);
+    //         },
+    //       },
+    //       {
+    //         attrs: {
+    //           label: "删除",
+    //           type: "danger",
+    //           text: true,
+    //         },
+    //         el: "button",
+    //         click() {
+    //           proxy
+    //             .msgConfirm()
+    //             .then((res) => {
+    //               proxy
+    //                 .post("/shopInfo/delete", {
+    //                   id: row.id,
+    //                 })
+    //                 .then((res) => {
+    //                   proxy.msgTip("删除成功", 1);
+    //                   getList();
+    //                 });
+    //             })
+    //             .catch((err) => {});
+    //         },
+    //       },
+    //     ];
+    //   },
+    // },
   ];
 });
 const formData = reactive({

+ 33 - 10
src/views/MES/productionOrder/index.vue

@@ -77,7 +77,7 @@
               </div>
               <el-popover placement="left" :width="400" style="height" trigger="hover" @show="onShow(data.day)">
                 <template #reference>
-                  <div v-if="isShow(data.day)" style="height: calc(100% - 20px);">
+                  <div v-if="isShow(data.day)">
                     <div style="height:5px;margin-bottom:5px;border-radius:2px" v-for="(item,index) in judgeDay(data.day)" :key="index"
                          :style="{ background: colorData[item]}">
                     </div>
@@ -199,7 +199,7 @@
                     </div>
                     <div v-else>
                       <div v-if="row.prodFileList && row.prodFileList.length > 0">
-                        <span class="el-click" @click="onPicture(row.prodFileList[0].fileUrl)">{{row.prodFileList[0].fileName}}</span>
+                        <span class="el-click" @click="onPicture(row.prodFileList[0].fileUrl)">{{row.prodFileList[0].fileName}} (定制)</span>
                       </div>
                     </div>
                   </div>
@@ -689,7 +689,7 @@ watch(
 const getFileData = () => {
   let ids = [];
   formData.orderData.contractProductList.map((x) => {
-    ids.push(x.productId);
+    // ids.push(x.productId);
     x.contractProductBomList.map((y) => {
       ids.push(y.materialId);
     });
@@ -701,9 +701,9 @@ const getFileData = () => {
     })
     .then((fileObj) => {
       formData.orderData.contractProductList.map((x) => {
-        if (fileObj[x.productId] && fileObj[x.productId].length > 0) {
-          x.fileUrl = fileObj[x.productId][0].fileUrl;
-        }
+        // if (fileObj[x.productId] && fileObj[x.productId].length > 0) {
+        //   x.fileUrl = fileObj[x.productId][0].fileUrl;
+        // }
         x.contractProductBomList.map((y) => {
           y.fileList = fileObj[y.materialId] || [];
           if (y.fileList && y.fileList.length > 0) {
@@ -723,12 +723,31 @@ const lookDetails = (item) => {
       formData.orderData.contractProductList.length > 0
     ) {
       getFileData();
-      let ids = formData.data.contractProductList.map((x) => x.id);
+      let ids = formData.orderData.contractProductList.map((x) => x.id);
+      let productIds = formData.orderData.contractProductList.map(
+        (x) => x.productId
+      );
+      proxy.getFileData({
+        businessIdList: productIds,
+        data: formData.orderData.contractProductList,
+        att: "productId",
+        businessType: "0",
+        fileAtt: "productFile",
+        filePathAtt: "fileUrl",
+      });
+
       proxy
-        .post("/fileInfo/getList", { businessIdList: ids })
+        .getFileData({
+          businessIdList: ids,
+          getAll: true,
+        })
         .then((fileObj) => {
-          for (let i = 0; i < formData.data.contractProductList.length; i++) {
-            const ele = formData.data.contractProductList[i];
+          for (
+            let i = 0;
+            i < formData.orderData.contractProductList.length;
+            i++
+          ) {
+            const ele = formData.orderData.contractProductList[i];
             for (const key in fileObj) {
               if (
                 ele.id == key &&
@@ -777,6 +796,10 @@ const handleClickUpload = async (att, flag, index) => {
   a.click();
   document.body.removeChild(a);
 };
+
+const onPicture = (path) => {
+  window.open(path, "_blank");
+};
 </script>
 
 <style lang="scss" scoped>

+ 4 - 2
src/views/MES/productionScheduling/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="pageIndexClass">
+  <div class="pageIndexClass" style="font-size:12px !important">
     <div>
       <byTable :source="sourceList.data" :tableBorder="true" :pagination="sourceList.pagination" :config="config" :loading="loading"
                highlight-current-row :selectConfig="selectConfig" :hidePagination="true" :action-list="[
@@ -198,7 +198,7 @@ const config = ref([
     attrs: {
       label: "产品",
       slot: "product",
-      "min-width": 300,
+      "min-width": 280,
       // align: "center",
     },
   },
@@ -329,5 +329,7 @@ const submitProduction = () => {
 }
 :deep(.el-table .cell) {
   padding: 0px !important;
+  font-size: 12px;
+  line-height: 28px;
 }
 </style>

+ 16 - 8
src/views/MES/productionTask/index.vue

@@ -46,8 +46,8 @@
 
       </byTable>
     </div>
-    <el-dialog :title="'打印任务单'" v-model="dialogVisible" width="640px" destroy-on-close :before-close="beforeClose">
-      <div style="height:calc(100vh - 150px);overflow:auto;padding: 0 10px">
+    <el-dialog :title="'打印任务单'" v-model="dialogVisible" width="840px" destroy-on-close :before-close="beforeClose">
+      <div style="height:calc(100vh - 280px);overflow:auto;padding: 0 10px">
         <div id="pdfDom" style="width:100%">
           <!-- <div style="font-size:20px;text-align:center">
             {{printData.name}}
@@ -126,7 +126,7 @@
                     <div style="font-weight:700">产品图</div>
                     <img v-if="item.fileList &&item.fileList.length > 0" class="bigImg" :src="item.fileList[0].fileUrl" alt="">
                   </div>
-                  <div>
+                  <div style="margin-top:20px">
                     <div style="font-weight:700">设计图</div>
                     <img v-if="item.fileListOne &&item.fileListOne.length > 0" class="bigImg" :src="item.fileListOne[0].fileUrl" alt="">
                   </div>
@@ -143,7 +143,7 @@
                 </td>
               </tr>
               <tr>
-                <td style="height:68px;vertical-align:top">
+                <td style="height:60px;vertical-align:top">
                   <div class="top-title">
                     生产工序
                   </div>
@@ -156,7 +156,7 @@
                 </td>
               </tr>
               <tr>
-                <td style="height:130px">
+                <td style="height:107px">
                   <div style="margin-bottom:10px">
                     <div class="top-title">
                       原材料编码
@@ -186,7 +186,14 @@
                         <td style="width:15%">总量</td>
                       </tr>
                       <tr v-for="son in item.contractProductBomList" :key="son.id">
-                        <td>{{son.productName}}</td>
+                        <td>
+                          <div>
+                            {{son.productCode}}
+                          </div>
+                          <div>
+                            {{son.productName}}
+                          </div>
+                        </td>
                         <td>{{son.price}}</td>
                         <td>{{son.quantity}}</td>
                       </tr>
@@ -678,6 +685,7 @@ const showCotent = (slot, item) => {
   td {
     text-align: left;
     padding: 10px;
+    font-size: 13px;
     // padding: 5px 10px;
     .top-title {
       font-weight: 700;
@@ -685,8 +693,8 @@ const showCotent = (slot, item) => {
     }
     .bigImg {
       object-fit: contain;
-      width: 140px;
-      height: 300px;
+      width: 160px;
+      height: 320px;
       cursor: pointer;
       margin-top: 10px;
       vertical-align: middle;

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

@@ -524,6 +524,7 @@ const skipPage = () => {
     contract_flow: "Contract",
     sale_quotation_flow: "Quotation",
     purchase_flow: "Purchased",
+    purchase_flow: "Purchase",
     pay_flow: "Payment",
   };
   const useTagsStore = useTagsViewStore();

+ 1 - 0
src/views/process/processConfig/index.vue

@@ -334,6 +334,7 @@ const getDtl = (row) => {
       id: row.id,
       flowInfoId: row.flowInfoId,
       tenantId: row.tenantId,
+      version: row.versionNumber,
     },
   });
 };

+ 9 - 1
src/views/process/processConfig/processChart.vue

@@ -14,7 +14,7 @@
     <div class="content">
       <div class="commons-title">流程节点配置</div>
       <div class="chart-warp">
-        <vueFlow :title='title'></vueFlow>
+        <vueFlow :title='title' @changeTitle="changeTitle"></vueFlow>
       </div>
     </div>
   </div>
@@ -22,7 +22,15 @@
 
 <script setup name="ProcessChart">
 import vueFlow from "@/views/process/processConfig/vueFlow.vue";
+// const route = useRoute();
 const title = ref("");
+// if (route.query) {
+//   title.value = route.query.version;
+// }
+const changeTitle = (val) => {
+  title.value = val;
+};
+
 onMounted(() => {});
 </script>
 

+ 1 - 0
src/views/process/processConfig/vueFlow.vue

@@ -900,6 +900,7 @@ const getFlowInfo = () => {
   proxy
     .post("/flowDefinition/getDetails", { id: submitFormData.id })
     .then((res) => {
+      proxy.$emit("changeTitle", res.titleTemplate);
       if (res.lineObject) {
         flowDefinitionNodeObj.value = JSON.parse(res.lineObject);
         for (const key in flowDefinitionNodeObj.value) {

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

@@ -111,6 +111,7 @@
 import { ElMessage, ElMessageBox } from "element-plus";
 import byTable from "@/components/byTable/index";
 import byForm from "@/components/byForm/index";
+import $bus from "@/bus/index.js";
 
 import { getToken } from "@/utils/auth";
 const { proxy } = getCurrentInstance();
@@ -514,6 +515,17 @@ const startOne = () => {
 const handleClickFile = (file) => {
   window.open(file.fileUrl, "_blank");
 };
+
+onMounted(() => {
+  $bus.on("refreshTableData", () => {
+    getList();
+  });
+});
+
+onBeforeUnmount(() => {
+  // 取消订阅特定事件
+  $bus.off("refreshTableData");
+});
 </script>
   
 <style lang="scss" scoped>