cz 1 year ago
parent
commit
aa818eceb5

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

@@ -293,9 +293,9 @@ export default defineComponent({
       // } else {
       // } else {
       //   tableHeight.value = 550;
       //   tableHeight.value = 550;
       // }
       // }
-      tableHeight.value = window.innerHeight - 225;
+      tableHeight.value = window.innerHeight - 229;
       if (props.hidePagination) {
       if (props.hidePagination) {
-        tableHeight.value += 38;
+        tableHeight.value += 42;
       }
       }
     };
     };
     getTableHeight();
     getTableHeight();
@@ -876,7 +876,7 @@ export default defineComponent({
   background: #fff;
   background: #fff;
   padding: 15px 15px 10px 15px;
   padding: 15px 15px 10px 15px;
   .table-pagination {
   .table-pagination {
-    padding-top: 5px;
+    padding-top: 10px;
   }
   }
   .header {
   .header {
     display: flex;
     display: flex;

+ 201 - 0
src/views/EHSD/saleContract/performanceSet/index.vue

@@ -0,0 +1,201 @@
+<template>
+  <div class="pageIndexClass">
+    <div>
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
+               :selectConfig="selectConfig" :action-list="[
+              
+        ]" @get-list="getList">
+
+        <template v-for="(month, index) in monthData" v-slot:[month]="{ item }" :key="month">
+          <div style="width:100%">
+            <el-input v-model="item.aa" :placeholder="month">
+              ss
+            </el-input>
+          </div>
+        </template>
+      </byTable>
+    </div>
+  </div>
+</template>
+
+<script setup>
+import byTable from "@/components/byTable/index";
+import byForm from "@/components/byForm/index";
+import moment from "moment";
+const { proxy } = getCurrentInstance();
+const loading = ref(false);
+const submitLoading = ref(false);
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 3,
+    pageNum: 1,
+    pageSize: 10,
+    keyword: "",
+    staDeliveryPeriod: "",
+  },
+});
+const treeData = ref([]);
+const dialogVisible = ref(false);
+const modalType = ref("add");
+const selectConfig = computed(() => [
+  {
+    type: "time",
+    itemType: "year",
+    label: "年份",
+    placeholder: "请选择",
+    prop: "staDeliveryPeriod",
+    placeholderOne: "结束日期",
+    propOne: "",
+    fn: (val) => {
+      console.log(val, "sss");
+    },
+  },
+]);
+const config = ref([
+  {
+    attrs: {
+      label: "部门名称",
+      prop: "orderCode",
+      width: 130,
+    },
+  },
+]);
+const formData = reactive({
+  data: {},
+});
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+});
+const formDom = ref(null);
+const formConfig = computed(() => {
+  return [
+    {
+      type: "input",
+      prop: "code",
+      label: "店铺编号",
+      itemWidth: 100,
+      disabled: false,
+    },
+    {
+      type: "input",
+      prop: "name",
+      label: "店铺名称",
+      itemWidth: 100,
+      disabled: false,
+    },
+    {
+      type: "treeSelect",
+      prop: "deptId",
+      label: "负责部门",
+      data: treeData.value,
+      propsTreeLabel: "deptName",
+      propsTreeValue: "deptId",
+      itemWidth: 100,
+      disabled: false,
+    },
+  ];
+});
+const rules = ref({
+  deptId: [{ required: true, message: "请选择负责部门", trigger: "change" }],
+  name: [{ required: true, message: "请输入店铺名称", trigger: "blur" }],
+  code: [{ required: true, message: "请输入店铺编号", trigger: "blur" }],
+});
+
+const getList = async (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy
+    .post("/produceOrderDetail/page", sourceList.value.pagination)
+    .then((res) => {
+      sourceList.value.data = res.rows.map((x) => ({ ...x, isCheck: true }));
+      sourceList.value.pagination.total = res.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+      const productIdList = res.rows.map((x) => x.productId);
+      // 请求文件数据并回显
+      if (productIdList.length > 0) {
+        proxy.getFile(productIdList, sourceList.value.data, "productId");
+      }
+
+      const productIdListOne = res.rows.map((x) => x.contractDetailId);
+      // 请求文件数据并回显
+      if (productIdListOne.length > 0) {
+        proxy.getFile(
+          productIdListOne,
+          sourceList.value.data,
+          "contractDetailId",
+          "fileListOne"
+        );
+      }
+    });
+};
+
+const processesData = ref([]);
+const monthData = ref([
+  "1",
+  "2",
+  "3",
+  "4",
+  "5",
+  "6",
+  "7",
+  "8",
+  "9",
+  "10",
+  "11",
+  "12",
+]);
+const getProcesses = () => {
+  proxy
+    .post("/productionProcesses/page", { pageNum: 1, pageSize: 9999 })
+    .then((res) => {
+      for (let i = 0; i < monthData.value.length; i++) {
+        const ele = monthData.value[i];
+        let attrs = {
+          label: `${ele}月`,
+          slot: ele,
+          isNeedHeaderSlot: false,
+          "min-width": 100,
+          // fixed: "right",
+        };
+        config.value.push({
+          attrs,
+        });
+      }
+
+      // config.value.push({
+      //   attrs: {
+      //     label: "操作",
+      //     width: "100",
+      //     align: "center",
+      //     fixed: "right",
+      //   },
+      //   renderHTML(row) {
+      //     return [
+      //       {
+      //         attrs: {
+      //           label: "打印二维码",
+      //           type: "primary",
+      //           text: true,
+      //         },
+      //         el: "button",
+      //         click() {
+      //           printQrCode(row);
+      //         },
+      //       },
+      //     ];
+      //   },
+      // });
+      processesData.value = res.rows;
+    });
+};
+getProcesses();
+getList();
+</script>
+
+<style lang="scss" scoped>
+</style>