Browse Source

部分需求更改,车间看板,生产绩效

cz 11 months ago
parent
commit
3c7377061d

+ 4 - 4
src/components/process/SF/Subscribe.vue

@@ -437,10 +437,10 @@ const rules = ref({
     { required: true, message: "请输入申请用途", trigger: "blur" },
     { required: true, message: "请输入申请用途", trigger: "blur" },
   ],
   ],
   count: [{ required: true, message: "请输入数量", trigger: "blur" }],
   count: [{ required: true, message: "请输入数量", trigger: "blur" }],
-  price: [{ required: true, message: "请输入单价(不含税)", trigger: "blur" }],
-  priceIncludingTax: [
-    { required: true, message: "请输入单价(含税)", trigger: "blur" },
-  ],
+  // price: [{ required: true, message: "请输入单价(不含税)", trigger: "blur" }],
+  // priceIncludingTax: [
+  //   { required: true, message: "请输入单价(含税)", trigger: "blur" },
+  // ],
   taxPointMode: [
   taxPointMode: [
     { required: true, message: "请输入税点模式", trigger: "change" },
     { required: true, message: "请输入税点模式", trigger: "change" },
   ],
   ],

+ 172 - 3
src/views/EHSD/procurement/arrivalRecord/index.vue

@@ -34,6 +34,30 @@
           </div>
           </div>
         </template>
         </template>
 
 
+        <template #adjustAmount="{item}">
+          <div style="width:100%">
+            <el-input-number v-model="item.adjustAmount" :placeholder="' '" onmousewheel="return false;" :precision="2" :controls="false" :min="0"
+                             @change="(val,)=>changeDataOne(row,item)" style="width:100%">
+            </el-input-number>
+          </div>
+        </template>
+
+        <template #diffRemark="{item}">
+          <div style="width:100%">
+            <el-input v-model="item.diffRemark" placeholder=" " @change="(val)=>changeDataOne(val,item)"></el-input>
+          </div>
+        </template>
+
+        <template #diffFileList="{item,index}">
+          <div style="width:100%">
+            <el-upload :file-list="item.diffFileList" :action="uploadUrl" :data="item.uploadData" :limit="2" :list-type="'text'"
+                       :before-upload="(file)=>handleBeforeUpload(file,index)" :on-success="()=>handleFileSuccess(index)"
+                       :on-remove="(file)=>handleRemoveFileOne(file,index)" :on-preview="onPreviewFile" :on-exceed="()=>msgTip(`上传文件数量不可大于2`, 2)">
+              <el-button type="primary" text>上传</el-button>
+            </el-upload>
+          </div>
+        </template>
+
       </byTable>
       </byTable>
     </div>
     </div>
 
 
@@ -166,6 +190,8 @@ const sourceList = ref({
     warehouseId: "",
     warehouseId: "",
     type: "",
     type: "",
     opType: "1",
     opType: "1",
+    beginTime: "",
+    endTime: "",
   },
   },
 });
 });
 const loading = ref(false);
 const loading = ref(false);
@@ -186,6 +212,14 @@ const selectConfig = computed(() => {
     //   prop: "type",
     //   prop: "type",
     //   data: inBoundReason.value,
     //   data: inBoundReason.value,
     // },
     // },
+    {
+      type: "time",
+      label: "入库时间",
+      placeholder: "开始日期",
+      prop: "beginTime",
+      placeholderOne: "结束日期",
+      propOne: "endTime",
+    },
   ];
   ];
 });
 });
 const config = computed(() => {
 const config = computed(() => {
@@ -272,6 +306,20 @@ const config = computed(() => {
     },
     },
     {
     {
       attrs: {
       attrs: {
+        label: "单价",
+        prop: "price",
+        width: 100,
+      },
+    },
+    {
+      attrs: {
+        label: "金额",
+        prop: "amount",
+        width: 100,
+      },
+    },
+    {
+      attrs: {
         label: "实际入库数量",
         label: "实际入库数量",
         prop: "receiptQuantity",
         prop: "receiptQuantity",
         width: 110,
         width: 110,
@@ -279,6 +327,13 @@ const config = computed(() => {
     },
     },
     {
     {
       attrs: {
       attrs: {
+        label: "入库时间",
+        prop: "actualInTime",
+        width: 110,
+      },
+    },
+    {
+      attrs: {
         label: "入库状态",
         label: "入库状态",
         prop: "receiptStatus",
         prop: "receiptStatus",
         width: 100,
         width: 100,
@@ -292,7 +347,7 @@ const config = computed(() => {
         label: "账期",
         label: "账期",
         prop: "accountPeriod",
         prop: "accountPeriod",
         slot: "accountPeriod",
         slot: "accountPeriod",
-        width: 150,
+        width: 135,
       },
       },
     },
     },
     {
     {
@@ -300,7 +355,38 @@ const config = computed(() => {
         label: "批次",
         label: "批次",
         prop: "arrivalBatch",
         prop: "arrivalBatch",
         slot: "arrivalBatch",
         slot: "arrivalBatch",
-        width: 150,
+        width: 130,
+      },
+    },
+    {
+      attrs: {
+        label: "调整金额",
+        prop: "adjustAmount",
+        slot: "adjustAmount",
+        width: 110,
+      },
+    },
+    {
+      attrs: {
+        label: "结算金额",
+        prop: "settleAmount",
+        width: 100,
+      },
+    },
+    {
+      attrs: {
+        label: "差异原因",
+        prop: "diffRemark",
+        slot: "diffRemark",
+        width: 130,
+      },
+    },
+    {
+      attrs: {
+        label: "差异附件",
+        prop: "diffFileList",
+        slot: "diffFileList",
+        width: 230,
       },
       },
     },
     },
   ];
   ];
@@ -376,7 +462,12 @@ const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
   loading.value = true;
   proxy.post("/arrivalDetail/page", sourceList.value.pagination).then((res) => {
   proxy.post("/arrivalDetail/page", sourceList.value.pagination).then((res) => {
-    sourceList.value.data = res.rows;
+    sourceList.value.data = res.rows.map((x) => ({
+      ...x,
+      diffFileList: [],
+      fileData: {},
+      uploadData: {},
+    }));
     sourceList.value.pagination.total = res.total;
     sourceList.value.pagination.total = res.total;
     setTimeout(() => {
     setTimeout(() => {
       loading.value = false;
       loading.value = false;
@@ -394,6 +485,19 @@ const getList = async (req) => {
         filePathAtt: "fileUrl",
         filePathAtt: "fileUrl",
       });
       });
     }
     }
+
+    const ids = res.rows.map((x) => x.id);
+    // 请求文件数据并回显
+    if (ids.length > 0) {
+      proxy.getFileData({
+        businessIdList: ids,
+        data: sourceList.value.data,
+        att: "id",
+        businessType: "10",
+        fileAtt: "diffFileList",
+        filePathAtt: "fileUrl",
+      });
+    }
   });
   });
 };
 };
 getDict();
 getDict();
@@ -742,6 +846,71 @@ const changeData = (val, item) => {
   };
   };
   proxy.post("/arrivalDetail/editArrivalBatch", data).then((res) => {});
   proxy.post("/arrivalDetail/editArrivalBatch", data).then((res) => {});
 };
 };
+
+const changeDataOne = (val, item) => {
+  proxy.post("/arrivalDetail/edit", { ...item }).then((res) => {});
+};
+
+const handleBeforeUpload = async (file, index) => {
+  const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
+  file.id = res.id;
+  file.fileUrl = res.fileUrl;
+  sourceList.value.data[index].uploadData = res.uploadBody;
+  sourceList.value.data[index].fileData = res;
+  return true;
+};
+
+const handleFileSuccess = (index, att) => {
+  if (
+    sourceList.value.data[index].fileData &&
+    sourceList.value.data[index].fileData.fileUrl
+  ) {
+    let file = sourceList.value.data[index].fileData;
+    sourceList.value.data[index].diffFileList.push({
+      id: file.id,
+      fileName: file.fileName,
+      name: file.fileName,
+      url: file.fileUrl,
+      fileUrl: file.fileUrl,
+    });
+    sourceList.value.data[index].fileData = {};
+    proxy
+      .post("/arrivalDetail/uploadDiffFile", {
+        diffFileList: sourceList.value.data[index].diffFileList,
+        id: sourceList.value.data[index].id,
+      })
+      .then((res) => {});
+  }
+};
+
+const handleRemoveFileOne = (file, index) => {
+  proxy
+    .post("/arrivalDetail/uploadDiffFile", {
+      diffFileList: sourceList.value.data[index].diffFileList,
+      id: sourceList.value.data[index].id,
+    })
+    .then((res) => {});
+  // let sonIndex = sourceList.value.data[index].diffFileList.findIndex(
+  //   (x) => x.id == file.id || x.id == file.raw.id
+  // );
+  // if (sonIndex > -1) {
+  //   sourceList.value.data[index].diffFileList.splice(sonIndex, 1);
+  //   proxy
+  //     .post("/arrivalDetail/uploadDiffFile", {
+  //       diffFileList: sourceList.value.data[index].diffFileList,
+  //       id: sourceList.value.data[index].id,
+  //     })
+  //     .then((res) => {});
+  // }
+};
+
+const onPreviewFile = (file) => {
+  if (file && file.fileUrl) {
+    window.open(file.fileUrl, "_blank");
+  } else {
+    window.open(file.raw.fileUrl, "_blank");
+  }
+};
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>

+ 38 - 1
src/views/EHSD/saleContract/contractEHSD/index.vue

@@ -931,6 +931,16 @@ const config = computed(() => {
     },
     },
     {
     {
       attrs: {
       attrs: {
+        label: "采购状态",
+        prop: "waitPurchaseStatus",
+        width: 90,
+      },
+      render(val) {
+        return val == 1 ? "已下发" : "未下发";
+      },
+    },
+    {
+      attrs: {
         label: "商品数据",
         label: "商品数据",
         slot: "product",
         slot: "product",
         "min-width": 370,
         "min-width": 370,
@@ -1137,6 +1147,31 @@ const config = computed(() => {
                 },
                 },
               }
               }
             : {},
             : {},
+          row.status == 30 &&
+          row.waitPurchaseStatus == 0 &&
+          (row.orderDistributeStatus == 0 || row.orderDistributeStatus == 2)
+            ? {
+                attrs: {
+                  label: "下发采购",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  proxy.msgConfirm().then(() => {
+                    proxy
+                      .post("/contract/createWaitMaterial", {
+                        id: row.id,
+                      })
+                      .then((res) => {
+                        proxy.msgTip("操作成功", 1);
+                        getList();
+                      });
+                  });
+                },
+              }
+            : {},
+
           route.query.pageType == "1"
           route.query.pageType == "1"
             ? {
             ? {
                 attrs: {
                 attrs: {
@@ -1259,7 +1294,9 @@ const config = computed(() => {
                 },
                 },
               }
               }
             : {},
             : {},
-          [30, 70, 75, 99].includes(row.status) && row.isSettled == "0"
+          [30, 70, 75, 99].includes(row.status) &&
+          row.isSettled == "0" &&
+          row.outboundAmount > 0
             ? {
             ? {
                 attrs: {
                 attrs: {
                   label: "结清",
                   label: "结清",

+ 52 - 1
src/views/MES/productionBoard/workshop/index.vue

@@ -66,6 +66,7 @@
                 <th style="width:100px">今日计划数</th>
                 <th style="width:100px">今日计划数</th>
                 <th style="width:100px">今日完成数</th>
                 <th style="width:100px">今日完成数</th>
                 <th style="width:100px">明日计划数</th>
                 <th style="width:100px">明日计划数</th>
+                <th style="width:60px;text-align:right">操作</th>
               </tr>
               </tr>
             </thead>
             </thead>
             <tbody>
             <tbody>
@@ -85,6 +86,9 @@
                 <td>{{row.todaySchedulingQuantity}}</td>
                 <td>{{row.todaySchedulingQuantity}}</td>
                 <td>{{row.todayFinishQuantity}}</td>
                 <td>{{row.todayFinishQuantity}}</td>
                 <td>{{row.tomorrowSchedulingQuantity}}</td>
                 <td>{{row.tomorrowSchedulingQuantity}}</td>
+                <td style="text-align:right">
+                  <span class="el-click" @click="handleLookDetail(row)">查看</span>
+                </td>
               </tr>
               </tr>
             </tbody>
             </tbody>
           </table>
           </table>
@@ -98,7 +102,39 @@
                        @current-change="handlePageChange" />
                        @current-change="handlePageChange" />
       </el-row> -->
       </el-row> -->
     </div>
     </div>
-
+    <el-dialog :title="'物料使用情况'" v-model="salesOutBoundDialog" width="80%" destroy-on-close>
+      <div style="width: 100%">
+        <el-table :data="detailData" style="width: 100%;">
+          <el-table-column label="图片" width="80">
+            <template #default="{ row }">
+              <div v-if="row.fileUrl">
+                <img :src="row.fileUrl" class="pic" @click="openImg(row.fileUrl)" />
+              </div>
+              <div v-else></div>
+            </template>
+          </el-table-column>
+          <el-table-column label="物料名称" prop="materialName" />
+          <el-table-column label="物料编码" prop="materialCode" />
+          <el-table-column label="规格尺寸 (cm)" width="130">
+            <template #default="{ row, $index }">
+              <div style="width: 100%">
+                {{row.materialLength}} * {{row.materialWidth}} * {{row.materialHeight}}
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column label="颜色" prop="materialColor" width="150" />
+          <el-table-column label="净重" prop="materialNetWeight" width="100" />
+          <el-table-column label="单位" prop="materialUnit" width="100" />
+          <el-table-column label="需求量" prop="quantity" width="100" />
+          <el-table-column label="用量" prop="usedQuantity" width="100" />
+          <el-table-column label="损耗" prop="lossQuantity" width="100" />
+          <el-table-column label="结余" prop="surplusQuantity" width="100" />
+        </el-table>
+      </div>
+      <template #footer>
+        <el-button @click="salesOutBoundDialog =false" size="default" v-debounce>取 消</el-button>
+      </template>
+    </el-dialog>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -332,6 +368,21 @@ const getProcesses = () => {
   });
   });
 };
 };
 getProcesses();
 getProcesses();
+
+const salesOutBoundDialog = ref(false);
+const detailData = ref([]);
+const handleLookDetail = (row) => {
+  detailData.value = row.materialsUsedList;
+  salesOutBoundDialog.value = true;
+  const ids = row.materialsUsedList.map((x) => x.materialId);
+  proxy.getFileData({
+    businessIdList: ids,
+    att: "materialId",
+    data: detailData.value,
+    businessType: "0",
+    filePathAtt: "fileUrl",
+  });
+};
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>

+ 14 - 0
src/views/MES/reportDetail/index.vue

@@ -107,6 +107,20 @@ const config = computed(() => {
     },
     },
     {
     {
       attrs: {
       attrs: {
+        label: "单价",
+        prop: "price",
+        width: 100,
+      },
+    },
+    {
+      attrs: {
+        label: "小计",
+        prop: "amount",
+        width: 100,
+      },
+    },
+    {
+      attrs: {
         label: "报工人",
         label: "报工人",
         prop: "userName",
         prop: "userName",
         width: 140,
         width: 140,

+ 4 - 4
src/views/index.vue

@@ -107,16 +107,16 @@
         <el-card style="width:32%">
         <el-card style="width:32%">
           <TitleInfo :content="'待入库'"></TitleInfo>
           <TitleInfo :content="'待入库'"></TitleInfo>
           <el-table :data="allData[2].rows" style="width: 100%" :height="tableHeight">
           <el-table :data="allData[2].rows" style="width: 100%" :height="tableHeight">
-            <el-table-column prop="productName" label="产品名称" />
-            <el-table-column prop="quantity" label="数量" width="100" />
+            <el-table-column prop="companyName" label="业务公司" />
+            <el-table-column prop="businessCode" label="单号" />
           </el-table>
           </el-table>
 
 
         </el-card>
         </el-card>
         <el-card style="width:32%">
         <el-card style="width:32%">
           <TitleInfo :content="'待出库'"></TitleInfo>
           <TitleInfo :content="'待出库'"></TitleInfo>
           <el-table :data="allData[3].rows" style="width: 100%" :height="tableHeight">
           <el-table :data="allData[3].rows" style="width: 100%" :height="tableHeight">
-            <el-table-column prop="productName" label="产品名称" />
-            <el-table-column prop="quantity" label="数量" width="100" />
+            <el-table-column prop="companyName" label="业务公司" />
+            <el-table-column prop="businessCode" label="单号" />
           </el-table>
           </el-table>
 
 
         </el-card>
         </el-card>

+ 2 - 0
src/views/login.vue

@@ -73,6 +73,8 @@
           </div>
           </div>
         </el-form>
         </el-form>
       </div>
       </div>
+      <a href="https://beian.miit.gov.cn" style="color:#fff;position: fixed;bottom: 15px;left: 45%;transform: translateX(-50%);font-size:12px"
+         target="_blank">Copyright ©福建三梵体育用品实业有限公司 版权所有 闽ICP备2024055024号-1</a>
     </div>
     </div>
   </div>
   </div>
 </template>
 </template>

+ 83 - 3
src/views/purchaseManage/supplier/supplier/index.vue

@@ -161,6 +161,16 @@
         </el-button>
         </el-button>
       </template>
       </template>
     </el-dialog>
     </el-dialog>
+
+    <el-dialog title="简称" v-if="openShortDialog" v-model="openShortDialog" width="800">
+      <byForm :formConfig="formShortConfig" :formOption="formOption" v-model="shortFormData.data" :rules="shortRules" ref="shortFormDom">
+
+      </byForm>
+      <template #footer>
+        <el-button @click="openShortDialog=false" size="default">取 消</el-button>
+        <el-button type="primary" @click="submitSearch()" size="default">确 定</el-button>
+      </template>
+    </el-dialog>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -298,6 +308,13 @@ const config = computed(() => {
     },
     },
     {
     {
       attrs: {
       attrs: {
+        label: "供应商简称",
+        prop: "shortName",
+        width: 110,
+      },
+    },
+    {
+      attrs: {
         label: "供应商名称",
         label: "供应商名称",
         prop: "name",
         prop: "name",
       },
       },
@@ -332,7 +349,7 @@ const config = computed(() => {
     {
     {
       attrs: {
       attrs: {
         label: "操作",
         label: "操作",
-        width: "120",
+        width: "160",
         align: "center",
         align: "center",
         fixed: "right",
         fixed: "right",
       },
       },
@@ -349,6 +366,24 @@ const config = computed(() => {
               getDtl(row);
               getDtl(row);
             },
             },
           },
           },
+          proxy.useUserStore().roles.includes("cfo")
+            ? {
+                attrs: {
+                  label: "简称",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  shortFormData.data = {
+                    ...row,
+                    // id: row.id,
+                    shortName: row.shortName || "",
+                  };
+                  openShortDialog.value = true;
+                },
+              }
+            : {},
           {
           {
             attrs: {
             attrs: {
               label: "删除",
               label: "删除",
@@ -538,12 +573,22 @@ const formConfig = computed(() => {
       ],
       ],
       itemWidth: 50,
       itemWidth: 50,
     },
     },
+    // {
+    //   type: "input",
+    //   prop: "privTaxPoints",
+    //   label: "供应商税点",
+    //   itemType: "text",
+    //   itemWidth: 50,
+    // },
     {
     {
-      type: "input",
+      type: "number",
       prop: "privTaxPoints",
       prop: "privTaxPoints",
       label: "供应商税点",
       label: "供应商税点",
-      itemType: "text",
+      precision: 2,
+      min: 0.01,
+      controls: false,
       itemWidth: 50,
       itemWidth: 50,
+      disabled: false,
     },
     },
     {
     {
       type: "upload",
       type: "upload",
@@ -869,6 +914,41 @@ const exportExcel = () => {
       proxy.downloadFile(res, "供应商数据.xlsx");
       proxy.downloadFile(res, "供应商数据.xlsx");
     });
     });
 };
 };
+
+const openShortDialog = ref(false);
+const shortFormData = reactive({
+  data: {},
+});
+const shortFormDom = ref(null);
+const formShortConfig = computed(() => {
+  return [
+    {
+      type: "input",
+      prop: "shortName",
+      label: "供应商简称",
+      itemType: "text",
+    },
+  ];
+});
+const shortRules = ref({
+  shortName: [{ required: true, message: "请输入供应商简称", trigger: "blur" }],
+});
+
+const submitSearch = () => {
+  shortFormDom.value.handleSubmit(() => {
+    proxy.post("/supplierInfo/edit", shortFormData.data).then(
+      () => {
+        proxy.msgTip("操作成功");
+        openShortDialog.value = false;
+        getList();
+      },
+      (err) => {
+        console.log(err);
+        // openShortDialog.value = false;
+      }
+    );
+  });
+};
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>

+ 844 - 0
src/views/report/productionPerformance/index.vue

@@ -0,0 +1,844 @@
+<template>
+  <div class="pageIndexClass">
+    <div class="content">
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :selectConfig="selectConfig" :config="config" highlight-current-row
+               :action-list="[{
+                text: '导出Excel',
+                action: () => exportExcel(),
+                disabled: false,
+              }
+        ]" @get-list="getList" :hideTable="true" :hidePagination="true">
+        <template #code="{item}">
+          <div style="width:100%">
+            <span class="el-click" @click="getDtl(item)">{{item.code}}</span>
+          </div>
+        </template>
+      </byTable>
+      <div style="padding:0 15px;background:#fff">
+        <el-table :data="sourceList.data" :height="tableHeight" style="width: 100%;margin-top:-10px" v-loading="loading" border
+                  :row-class-name="getRowClass" id="my-table">
+          <el-table-column prop="userName" label="员工" width="110" fixed="left">
+            <template #default="{ row, $index }">
+              <div style="width: 100%">
+                <span v-if="$index < sourceList.data.length - 1"> {{row.userName}}</span>
+                <div style="text-align:right" v-else>
+                  合计:
+                </div>
+              </div>
+            </template>
+          </el-table-column>
+          <template v-if="dayList && dayList.length>0">
+            <el-table-column v-for="col in dayList" :key="col" :label="col" align="right" width="90">
+              <template #default="{ row, $index }">
+                <div style="width: 100%" v-if="row.dayData[col] ">
+                  {{moneyFormat(row.dayData[col] ,2)}}
+                </div>
+              </template>
+            </el-table-column>
+          </template>
+          <el-table-column prop="amount" label="总金额" width="110" fixed="right">
+            <template #default="{ row, $index }">
+              <div style="width: 100%" v-if="row[col] && row[col].amount">
+                {{moneyFormat(row[col].amount,2)}}
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+
+    </div>
+
+    <el-dialog :title="modalType == 'add' ? '添加' : '编辑'" v-if="dialogVisible" v-model="dialogVisible" width="60%">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit" v-loading="loadingDialog">
+
+      </byForm>
+      <template #footer>
+        <el-button @click="dialogVisible = false" size="default">取 消</el-button>
+        <el-button type="primary" @click="submitForm()" size="default">确 定</el-button>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import { computed, ref } from "vue";
+import byTable from "@/components/byTable/index";
+import byForm from "@/components/byForm/index";
+import moment from "moment";
+import FileSaver from "file-saver";
+import * as XLSX from "xlsx";
+import { getMonthBetween } from "@/utils/date.js";
+
+const { proxy } = getCurrentInstance();
+const tableHeight = ref(0);
+const getTableHeight = () => {
+  tableHeight.value = window.innerHeight - 150 - 30;
+};
+getTableHeight();
+window.addEventListener("resize", () => {
+  getTableHeight();
+});
+const sealType = computed(() => proxy.useUserStore().allDict["seal_type"]);
+const userList = ref([]);
+const deptData = ref([]);
+const typeData = ref([
+  {
+    label: "收入",
+    value: "10",
+  },
+  {
+    label: "支出",
+    value: "20",
+  },
+]);
+const monthList = ref([
+  { key: 1, label: "1月" },
+  { key: 2, label: "2月" },
+  { key: 3, label: "3月" },
+  { key: 4, label: "4月" },
+  { key: 5, label: "5月" },
+  { key: 6, label: "6月" },
+  { key: 7, label: "7月" },
+  { key: 8, label: "8月" },
+  { key: 9, label: "9月" },
+  { key: 10, label: "10月" },
+  { key: 11, label: "11月" },
+  { key: 12, label: "12月" },
+]);
+const monthData = ref(moment().format("YYYY-MM"));
+const month = ref("");
+const dayList = ref([]);
+const beginTime = ref(
+  moment().startOf("month").format("yyyy-MM-DD") + " 00:00:00"
+);
+const endTime = ref(moment().endOf("month").format("YYYY-MM-DD") + " 23:59:59");
+const getMonth = (val) => {
+  month.value = val.split("-")[1];
+  if (Number(month.value) < 10) {
+    month.value = month.value.split("")[1];
+  }
+};
+// getMonth(monthData.value);
+
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 0,
+    pageNum: 1,
+    pageSize: 10,
+    keyword: "",
+    dataDate: monthData.value,
+  },
+});
+const loading = ref(false);
+const statusData = ref([
+  {
+    label: "草稿",
+    value: 0,
+  },
+  {
+    label: "审批中",
+    value: 10,
+  },
+  {
+    label: "审批驳回",
+    value: 20,
+  },
+  {
+    label: "审批通过",
+    value: 30,
+  },
+  {
+    label: "作废",
+    value: 88,
+  },
+]);
+const processingMethod = ref([
+  {
+    dictKey: 10,
+    dictValue: "业务自采",
+  },
+  {
+    dictKey: 20,
+    dictValue: "生产处理",
+  },
+]);
+
+const contractType = ref([
+  {
+    dictKey: "3",
+    dictValue: "打样订单",
+  },
+  {
+    dictKey: "2",
+    dictValue: "内销订单",
+  },
+  {
+    dictKey: "1",
+    dictValue: "外贸订单(退税)",
+  },
+  {
+    dictKey: "4",
+    dictValue: "外贸订单(不退税)",
+  },
+]);
+const selectConfig = computed(() => {
+  return [
+    {
+      type: "time",
+      itemType: "month",
+      label: "年月",
+      placeholder: "请选择",
+      prop: "dataDate",
+      placeholderOne: "",
+      propOne: "",
+      clearable: false,
+      fn: (val) => {
+        // getMonth(val);
+        beginTime.value =
+          moment(val).startOf("months").format("yyyy-MM-DD") + " 00:00:00";
+        endTime.value =
+          moment(val).endOf("months").format("yyyy-MM-DD") + " 23:59:59";
+        getDayList();
+      },
+    },
+    // {
+    //   label: "业务员",
+    //   prop: "saleUserId",
+    //   data: userList.value,
+    // },
+  ];
+});
+const config = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "订单编号",
+        slot: "code",
+      },
+    },
+
+    // {
+    //   attrs: {
+    //     label: "印章类型",
+    //     prop: "type",
+    //   },
+    //   render(val) {
+    //     return proxy.dictKeyValue(val, sealType.value);
+    //   },
+    // },
+    {
+      attrs: {
+        label: "业务员",
+        prop: "createUserName",
+      },
+    },
+    {
+      attrs: {
+        label: "跟单员",
+        prop: "applyTime",
+      },
+    },
+    {
+      attrs: {
+        label: "订单类型",
+        prop: "contractType",
+        width: 110,
+      },
+      render(val) {
+        return proxy.dictKeyValue(val, contractType.value);
+      },
+    },
+    {
+      attrs: {
+        label: "订单处理方式",
+        prop: "processingMethod",
+        width: 110,
+      },
+      render(val) {
+        return proxy.dictKeyValue(val, processingMethod.value);
+      },
+    },
+    {
+      attrs: {
+        label: "销售金额",
+        prop: "deptName",
+      },
+    },
+    {
+      attrs: {
+        label: "订单出货金额",
+        prop: "educationName",
+      },
+    },
+    {
+      attrs: {
+        label: "出货申请出货金额",
+        prop: "amount",
+      },
+      render(val) {
+        return proxy.moneyFormat(val, 2);
+      },
+    },
+    {
+      attrs: {
+        label: "已收定金",
+        prop: "amount",
+      },
+      render(val) {
+        return proxy.moneyFormat(val, 2);
+      },
+    },
+    {
+      attrs: {
+        label: "是否可结算",
+        prop: "educationName",
+      },
+    },
+    {
+      attrs: {
+        label: "是否已结算",
+        prop: "educationName",
+      },
+    },
+    {
+      attrs: {
+        label: "客户名称",
+        prop: "educationName",
+      },
+    },
+    {
+      attrs: {
+        label: "客户简称",
+        prop: "educationName",
+      },
+    },
+    {
+      attrs: {
+        label: "应收金额",
+        prop: "educationName",
+      },
+    },
+    {
+      attrs: {
+        label: "收款金额",
+        prop: "amount",
+      },
+      render(val) {
+        return proxy.moneyFormat(val, 2);
+      },
+    },
+    {
+      attrs: {
+        label: "未收金额",
+        prop: "amount",
+      },
+      render(val) {
+        return proxy.moneyFormat(val, 2);
+      },
+    },
+    {
+      attrs: {
+        label: "出货日期",
+        prop: "amount",
+      },
+    },
+    {
+      attrs: {
+        label: "账龄级别",
+        prop: "amount",
+      },
+    },
+    // {
+    //   attrs: {
+    //     label: "审批状态",
+    //     prop: "status",
+    //     width: 100,
+    //   },
+    //   render(type) {
+    //     return proxy.dictValueLabel(type, statusData.value);
+    //   },
+    // },
+    {
+      attrs: {
+        label: "操作",
+        width: "120",
+        align: "center",
+      },
+      renderHTML(row) {
+        return row.createUser == proxy.useUserStore().user.userId
+          ? [
+              row.status == 0
+                ? {
+                    attrs: {
+                      label: "修改",
+                      type: "primary",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
+                      clickUpdate(row);
+                    },
+                  }
+                : {},
+              row.status == 0
+                ? {
+                    attrs: {
+                      label: "删除",
+                      type: "danger",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
+                      proxy
+                        .msgConfirm()
+                        .then((res) => {
+                          proxy
+                            .post("/educationSubsidy/delete", {
+                              id: row.id,
+                            })
+                            .then((res) => {
+                              proxy.msgTip("操作成功", 1);
+                              getList();
+                            });
+                        })
+                        .catch((err) => {});
+                    },
+                  }
+                : {},
+              row.status == 10 || row.status == 30
+                ? {
+                    attrs: {
+                      label: "作废",
+                      type: "danger",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
+                      proxy
+                        .msgConfirm()
+                        .then((res) => {
+                          proxy
+                            .post("/educationSubsidy/cancellation", {
+                              id: row.id,
+                            })
+                            .then((res) => {
+                              proxy.msgTip("操作成功", 1);
+                              getList();
+                            });
+                        })
+                        .catch((err) => {});
+                    },
+                  }
+                : {},
+            ]
+          : [];
+      },
+    },
+  ];
+});
+const corporationList = ref([]);
+const getList = async (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy
+    .post("/report/userPerformanceReport", sourceList.value.pagination)
+    .then((res) => {
+      sourceList.value.data = res;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+    });
+};
+// getList();
+
+const getDayList = () => {
+  let arr = getMonthBetween(
+    beginTime.value.slice(0, 10),
+    endTime.value.slice(0, 10)
+  );
+  for (let i = 0; i < arr.length; i++) {
+    let str = arr[i].slice(-2);
+    arr[i] = Number(str);
+  }
+  dayList.value = arr;
+  getList();
+};
+getDayList();
+const getDeptData = (val) => {
+  proxy
+    .get("/tenantUser/list", {
+      pageNum: 1,
+      pageSize: 10000,
+      tenantId: proxy.useUserStore().user.tenantId,
+      companyId: proxy.useUserStore().user.companyId,
+    })
+    .then((res) => {
+      userList.value = res.rows.map((item) => {
+        return {
+          ...item,
+          label: item.nickName,
+          value: item.userId,
+        };
+      });
+    });
+
+  proxy
+    .get("/tenantDept/list", {
+      pageNum: 1,
+      pageSize: 9999,
+      keyword: "",
+      ancestors: proxy.useUserStore().user.companyId,
+      tenantId: proxy.useUserStore().user.tenantId,
+      // type: 2,
+    })
+    .then((res) => {
+      deptData.value = proxy.handleTree(res.data, "deptId");
+    });
+};
+// getDeptData();
+const getDict = () => {
+  proxy
+    .get("/tenantUser/list", {
+      pageNum: 1,
+      pageSize: 10000,
+      tenantId: proxy.useUserStore().user.tenantId,
+      // companyId: proxy.useUserStore().user.companyId,
+    })
+    .then((res) => {
+      userList.value = res.rows.map((item) => {
+        return {
+          label: item.nickName,
+          value: item.userId,
+        };
+      });
+    });
+};
+// getDict();
+const modalType = ref("add");
+const dialogVisible = ref(false);
+const loadingDialog = ref(false);
+const submit = ref(null);
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  rules: [],
+});
+const formConfig = computed(() => {
+  return [
+    {
+      type: "title1",
+      title: "基本信息",
+    },
+    {
+      type: "input",
+      prop: "name",
+      label: "印章名称",
+      required: true,
+      itemWidth: 50,
+      itemType: "text",
+    },
+    {
+      type: "select",
+      prop: "sealType",
+      label: "印章类型",
+      data: sealType.value,
+      itemWidth: 50,
+    },
+    {
+      type: "select",
+      prop: "applyUserId",
+      label: "存管人员",
+      required: true,
+      filterable: true,
+      data: userList.value,
+      itemWidth: 50,
+      fn: (val) => {
+        let current = userList.value.find((x) => x.value == val);
+        if (current) {
+          formData.data.deptId = current.deptId;
+        }
+      },
+    },
+    {
+      type: "treeSelect",
+      prop: "deptId",
+      label: "存管部门",
+      data: deptData.value,
+      propsTreeLabel: "deptName",
+      propsTreeValue: "deptId",
+      itemWidth: 50,
+      disabled: 50,
+    },
+    {
+      type: "input",
+      prop: "accountNumber",
+      label: "印章用途",
+      itemWidth: 100,
+      itemType: "textarea",
+    },
+  ];
+});
+const rules = ref({
+  name: [{ required: true, message: "请输入承包商", trigger: "blur" }],
+  taxPoints: [{ required: true, message: "请输入税点", trigger: "blur" }],
+  accountBank: [{ required: true, message: "请输入开户行", trigger: "blur" }],
+  accountName: [{ required: true, message: "请输入开户名", trigger: "blur" }],
+  accountNumber: [{ required: true, message: "请输入账号", trigger: "blur" }],
+});
+const formData = reactive({
+  data: {
+    accountRemainderList: [{ currency: "", remainder: undefined }],
+  },
+});
+const openModal = (val) => {
+  // modalType.value = val;
+  // formData.data = {
+  //   accountRemainderList: [{ currency: "", remainder: undefined }],
+  // };
+  // loadingDialog.value = false;
+  // dialogVisible.value = true;
+  proxy.$router.replace({
+    path: "/platform_manage/process/processApproval",
+    query: {
+      flowKey: "education_subsidy_flow",
+      flowName: "学历补贴发起流程",
+      random: proxy.random(),
+    },
+  });
+};
+const clickBalance = () => {
+  if (
+    formData.data.accountRemainderList &&
+    formData.data.accountRemainderList.length > 0
+  ) {
+    formData.data.accountRemainderList.push({
+      currency: "",
+      remainder: undefined,
+    });
+  } else {
+    formData.data.accountRemainderList = [
+      { currency: "", remainder: undefined },
+    ];
+  }
+};
+const handleRemove = (index) => {
+  formData.data.accountRemainderList.splice(index, 1);
+};
+const isRepeat = (arr) => {
+  var hash = {};
+  for (var i in arr) {
+    if (hash[arr[i].currency]) return true;
+    hash[arr[i].currency] = true;
+  }
+  return false;
+};
+const submitForm = () => {
+  submit.value.handleSubmit(() => {
+    loadingDialog.value = true;
+    proxy.post("/contractor/" + modalType.value, formData.data).then(
+      () => {
+        proxy.msgTip("操作成功", 1);
+        dialogVisible.value = false;
+        getList();
+      },
+      (err) => {
+        console.log(err);
+        loadingDialog.value = false;
+      }
+    );
+    // if (
+    //   formData.data.accountRemainderList &&
+    //   formData.data.accountRemainderList.length > 0
+    // ) {
+    //   if (isRepeat(formData.data.accountRemainderList)) {
+    //     return ElMessage("请勿重复添加货币余额");
+    //   } else {
+    //     loadingDialog.value = true;
+    //     proxy.post("/accountManagement/" + modalType.value, formData.data).then(
+    //       () => {
+    //         ElMessage({
+    //           message: modalType.value == "add" ? "添加成功" : "编辑成功",
+    //           type: "success",
+    //         });
+    //         dialogVisible.value = false;
+    //         getList();
+    //       },
+    //       (err) => {
+    //         console.log(err);
+    //         loadingDialog.value = false;
+    //       }
+    //     );
+    //   }
+    // } else {
+    //   return ElMessage("请添加至少一条类型余额");
+    // }
+  });
+};
+
+const update = (row) => {
+  loadingDialog.value = false;
+  modalType.value = "edit";
+  formData.data = proxy.deepClone(row);
+  dialogVisible.value = true;
+};
+
+const clickUpdate = (row) => {
+  proxy.$router.push({
+    path: "/platform_manage/process/processApproval",
+    query: {
+      flowKey: "education_subsidy_flow",
+      flowName: "学历补贴发起流程",
+      random: proxy.random(),
+      businessId: row.id,
+    },
+  });
+};
+
+const getDtl = (row) => {
+  proxy.$router.push({
+    path: "/platform_manage/process/processApproval",
+    query: {
+      flowKey: "education_subsidy_flow",
+      flowName: "学历补贴流程查看",
+      random: proxy.random(),
+      businessId: row.id,
+      processType: 20,
+    },
+  });
+};
+
+const exportExcel = () => {
+  proxy.msgTip("正在导出,请稍后", 2);
+  const wb = XLSX.utils.table_to_book(document.querySelector("#my-table")); // 关联dom节点
+  // 设置百分比列的单元格样式
+  const percentStyle = {
+    font: { bold: true },
+    fill: { fgColor: { rgb: "FFFF00" } },
+    border: { top: { style: "thin" }, bottom: { style: "thin" } },
+  };
+
+  // if (wb.Sheets.Sheet1) {
+  //   // 达成率单元格的key开头
+  //   let cellKey = "";
+  //   for (const key in wb.Sheets.Sheet1) {
+  //     let value = wb.Sheets.Sheet1[key];
+  //     if (value && value.v == "月达成率") {
+  //       cellKey = key.match(/[a-zA-Z]+/g)[0];
+  //     }
+  //     // key有包含cellKey的
+  //     if (cellKey && key.includes(cellKey)) {
+  //       // 单元格的样式
+  //       wb.Sheets.Sheet1[key].s = percentStyle;
+  //       // 用于指定单元格中显示值的格式,例如日期格式、百分比格式等
+  //       wb.Sheets.Sheet1[key].z = "0.00%";
+  //     }
+  //   }
+  // }
+  const wbout = XLSX.write(wb, {
+    bookType: "xlsx",
+    bookSST: true,
+    type: "array",
+  });
+  try {
+    FileSaver.saveAs(
+      new Blob([wbout], {
+        type: "application/octet-stream",
+      }),
+      "生产绩效.xlsx"
+    );
+  } catch (e) {
+    console.log(e, wbout);
+  }
+  return wbout;
+};
+// 合并行单元格
+const getMergeCellData = (data) => {
+  let rowspanArr = [];
+  let rowspanIndex = 0;
+  data.map((row, index) => {
+    if (index === 0) {
+      rowspanArr.push(1);
+    } else {
+      //注意这里的saleUserId是表格合并单元格绑定的字段,根据自己的需求来改
+      if (row.saleUserId === data[index - 1].saleUserId) {
+        //第一列需合并相同内容的判断条件
+        rowspanArr[rowspanIndex] += 1;
+        rowspanArr.push(0);
+      } else {
+        rowspanArr.push(1);
+        rowspanIndex = index;
+      }
+    }
+  });
+  return rowspanArr;
+};
+const objectSpanMethod = ({ row, column, rowIndex, columnIndex }) => {
+  // 手动配置合计列
+  if (rowIndex == sourceList.value.data.length - 1) {
+    if (columnIndex == 0) {
+      return {
+        rowspan: 1,
+        colspan: 3,
+      };
+    } else if (columnIndex == 1 || columnIndex == 2) {
+      return {
+        rowspan: 1,
+        colspan: 0,
+      };
+    } else {
+      return {
+        rowspan: 1,
+        colspan: 1,
+      };
+    }
+  } else {
+    if (columnIndex === 0) {
+      const rowspan = getMergeCellData(sourceList.value.data)[rowIndex];
+      const colspan = rowspan > 0 ? 1 : 0;
+      return {
+        rowspan: rowspan,
+        colspan: colspan,
+      };
+    }
+  }
+};
+
+const getRowClass = ({ row, rowIndex }) => {
+  if (rowIndex == sourceList.value.data.length - 1) {
+    return "sumRow";
+  }
+  return "";
+};
+</script>
+
+<style lang="scss" scoped>
+.tenant {
+  padding: 20px;
+}
+:deep(
+    .el-table .el-table__header-wrapper th,
+    .el-table .el-table__fixed-header-wrapper th
+  ) {
+  height: auto !important;
+}
+:deep(.el-table th.el-table__cell) {
+  background: #fff !important;
+}
+:deep(.el-table .el-table__cell) {
+  padding: 0 !important;
+}
+:deep(.el-table .cell) {
+  padding: 0 8px !important;
+  font-size: 12px !important;
+}
+
+:deep(.sumRow) {
+  background-color: #f5f7fa !important;
+  .el-table-fixed-column--left,
+  .el-table-fixed-column--right {
+    background-color: #f5f7fa !important;
+  }
+}
+</style>