浏览代码

新需求

cz 1 年之前
父节点
当前提交
efb3d07935

+ 20 - 24
src/views/JXSK/production/bom/index.vue

@@ -473,18 +473,8 @@ const formConfig = reactive([
     label: "产品名称",
     label: "产品名称",
     required: true,
     required: true,
     disabled: false,
     disabled: false,
-    isLoad: {
-      url: "/productInfo/page",
-      req: {
-        pageNum: 1,
-        pageSize: 9999,
-        definition: "1",
-      },
-      labelKey: "name",
-      labelVal: "id",
-      method: "post",
-      resUrl: "rows",
-    },
+    filterable: true,
+    data: [],
   },
   },
   {
   {
     type: "title",
     type: "title",
@@ -509,18 +499,8 @@ const formConfig1 = reactive([
     label: "产品名称",
     label: "产品名称",
     required: true,
     required: true,
     disabled: true,
     disabled: true,
-    isLoad: {
-      url: "/productInfo/page",
-      req: {
-        pageNum: 1,
-        pageSize: 9999,
-        definition: "1",
-      },
-      labelKey: "name",
-      labelVal: "id",
-      method: "post",
-      resUrl: "rows",
-    },
+    filterable: true,
+    data: [],
   },
   },
   {
   {
     type: "slot",
     type: "slot",
@@ -734,6 +714,22 @@ const handleBeforeUpload = async (file) => {
 
 
 const materialUnit = ref([]);
 const materialUnit = ref([]);
 const getDict = () => {
 const getDict = () => {
+  proxy
+    .post("/productInfo/page", { pageNum: 1, pageSize: 9999, definition: "1" })
+    .then((res) => {
+      formConfig[0].data = res.rows.map((x) => {
+        return {
+          label: x.name + ` (${x.spec})`,
+          value: x.id,
+        };
+      });
+      formConfig1[0].data = res.rows.map((x) => {
+        return {
+          label: x.name + ` (${x.spec})`,
+          value: x.id,
+        };
+      });
+    });
   proxy.getDictOne(["material_unit"]).then((res) => {
   proxy.getDictOne(["material_unit"]).then((res) => {
     materialUnit.value = res["material_unit"].map((x) => ({
     materialUnit.value = res["material_unit"].map((x) => ({
       label: x.dictValue,
       label: x.dictValue,

+ 30 - 3
src/views/JXSK/production/forward/index.vue

@@ -29,7 +29,18 @@
         ref="byform"
         ref="byform"
       >
       >
         <template #file>
         <template #file>
-          <div>aa</div>
+          <div style="width: 100%">
+            <el-upload
+              v-model:fileList="formData.data.fileList"
+              action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
+              :data="uploadData"
+              multiple
+              :before-upload="uploadFile"
+              :on-preview="onPreviewFile"
+            >
+              <el-button>选择</el-button>
+            </el-upload>
+          </div>
         </template>
         </template>
       </byForm>
       </byForm>
       <template #footer>
       <template #footer>
@@ -71,6 +82,7 @@ const sourceList = ref({
     keyword: "",
     keyword: "",
   },
   },
 });
 });
+const uploadData = ref({});
 const dialogVisible = ref(false);
 const dialogVisible = ref(false);
 const modalType = ref("add");
 const modalType = ref("add");
 const rules = ref({
 const rules = ref({
@@ -239,6 +251,7 @@ const submitForm = (flag) => {
       const data = {
       const data = {
         id: formData.data.id,
         id: formData.data.id,
         receivedUserId: formData.data.receivedUserId,
         receivedUserId: formData.data.receivedUserId,
+        fileList: formData.data.fileList,
       };
       };
       proxy.post("/productionTaskDetail/circulation", data).then(
       proxy.post("/productionTaskDetail/circulation", data).then(
         (res) => {
         (res) => {
@@ -260,7 +273,10 @@ const submitForm = (flag) => {
       );
       );
     } else {
     } else {
       proxy
       proxy
-        .post("/productionTaskDetail/productStorage", { id: formData.data.id })
+        .post("/productionTaskDetail/productStorage", {
+          id: formData.data.id,
+          fileList: formData.data.fileList,
+        })
         .then(
         .then(
           (res) => {
           (res) => {
             ElMessage({
             ElMessage({
@@ -320,11 +336,22 @@ const getDtl = (row) => {
     submitType.value = "10";
     submitType.value = "10";
   }
   }
   formOption.disabled = true;
   formOption.disabled = true;
-  formData.data = { ...row };
+  formData.data = { ...row, fileList: [] };
   dialogVisible.value = true;
   dialogVisible.value = true;
 };
 };
 
 
 getList();
 getList();
+const uploadFile = async (file) => {
+  const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
+  uploadData.value = res.uploadBody;
+  file.id = res.id;
+  file.fileName = res.fileName;
+  file.fileUrl = res.fileUrl;
+  return true;
+};
+const onPreviewFile = (file) => {
+  window.open(file.raw.fileUrl, "_blank");
+};
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>

+ 1 - 1
src/views/JXSK/production/receive/index.vue

@@ -308,7 +308,7 @@ const submitForm = (flag) => {
 const submitType = ref("");
 const submitType = ref("");
 const otherBtn = ref(true);
 const otherBtn = ref(true);
 const getDtl = (row) => {
 const getDtl = (row) => {
-  if (!row.productionProcessesName) {
+  if (!row.personLiableId) {
     otherBtn.value = false;
     otherBtn.value = false;
   } else {
   } else {
     otherBtn.value = true;
     otherBtn.value = true;

+ 362 - 0
src/views/JXSK/production/schedule/index.vue

@@ -0,0 +1,362 @@
+<template>
+  <div class="tenant">
+    <div class="content">
+      <byTable
+        :source="sourceList.data"
+        :pagination="sourceList.pagination"
+        :config="config"
+        :loading="loading"
+        highlight-current-row
+        :selectConfig="selectConfig"
+        :table-events="{}"
+        :action-list="[]"
+        :onMoreSearch="true"
+        @moreSearch="clickMoreSearch"
+        @get-list="getList"
+      >
+      </byTable>
+    </div>
+    <el-dialog
+      :title="'高级检索'"
+      v-model="dialogVisible"
+      width="700"
+      v-loading="loading"
+      destroy-on-close
+    >
+      <byForm
+        :formConfig="formConfig"
+        :formOption="formOption"
+        v-model="sourceList.pagination"
+        :rules="rules"
+        ref="byform"
+      >
+      </byForm>
+      <template #footer>
+        <el-button @click="moreSearchReset" size="large">重置</el-button>
+        <el-button @click="moreSearchQuery" type="primary" size="large"
+          >搜索</el-button
+        >
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import { ElMessage, ElMessageBox } from "element-plus";
+import byTable from "@/components/byTable/index";
+import byForm from "@/components/byForm/index";
+const { proxy } = getCurrentInstance();
+const loading = ref(false);
+const submitLoading = ref(false);
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 3,
+    pageNum: 1,
+    pageSize: 10,
+    keyword: "",
+    contractCode: "",
+    workOrderCode: "",
+    productionPlanCode: "",
+    productionTaskCode: "",
+    productCode: "",
+    productName: "",
+    productSn: "",
+    dueDate: "",
+    productionProcessesName: "",
+    personLiableName: "",
+    getFinishStatus: "",
+    getFinishTime: "",
+  },
+});
+const finishStatusData = ref([
+  {
+    label: "未完成",
+    value: "0",
+  },
+  {
+    label: "完成",
+    value: "1",
+  },
+]);
+const dialogVisible = ref(false);
+const modalType = ref("add");
+const rules = ref({
+  workOrderId: [{ required: true, message: "请选择工单", trigger: "change" }],
+  startDate: [
+    { required: true, message: "请选择计划开始时间", trigger: "change" },
+  ],
+  stopDate: [
+    { required: true, message: "请选择计划结束时间", trigger: "change" },
+  ],
+  quantity: [{ required: true, message: "请输入计划数量", trigger: "blur" }],
+});
+const workOrderData = ref([]);
+const workOrderDataOne = ref([]);
+
+const statusData = ref([
+  {
+    label: "未开始",
+    value: "0",
+  },
+  {
+    label: "进行中",
+    value: "1",
+  },
+  {
+    label: "完成",
+    value: "2",
+  },
+]);
+
+const selectConfig = reactive([]);
+const config = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "合同编号",
+        prop: "contractCode",
+        width: 110,
+      },
+    },
+    {
+      attrs: {
+        label: "工单编号",
+        prop: "workOrderCode",
+        width: 110,
+      },
+    },
+    {
+      attrs: {
+        label: "计划编号",
+        prop: "productionPlanCode",
+        width: 110,
+      },
+    },
+    {
+      attrs: {
+        label: "任务编号",
+        prop: "productionTaskCode",
+        width: 110,
+      },
+    },
+    {
+      attrs: {
+        label: "产品编号",
+        prop: "productCode",
+        width: 100,
+      },
+    },
+    {
+      attrs: {
+        label: "产品名称",
+        prop: "productName",
+        "min-width": 150,
+      },
+    },
+
+    {
+      attrs: {
+        label: "任务完成期限",
+        prop: "dueDate",
+        width: 155,
+      },
+    },
+    {
+      attrs: {
+        label: "工序名称列表",
+        prop: "productionProcessesNames",
+        "min-width": 220,
+      },
+    },
+    {
+      attrs: {
+        label: "当前工序名称",
+        prop: "productionProcessesName",
+        width: 120,
+      },
+    },
+    {
+      attrs: {
+        label: "当前工序负责人",
+        prop: "previousProcessesName",
+        width: 130,
+      },
+    },
+    {
+      attrs: {
+        label: "完成状态",
+        prop: "finishStatus",
+        width: 80,
+      },
+      render(finishStatus) {
+        return proxy.dictValueLabel(finishStatus, finishStatusData.value);
+      },
+    },
+    {
+      attrs: {
+        label: "完成时间",
+        prop: "finishTime",
+        width: 155,
+      },
+    },
+  ];
+});
+
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  rules: [],
+});
+const byform = ref(null);
+const formConfig = computed(() => {
+  return [
+    {
+      type: "input",
+      itemType: "text",
+      prop: "contractCode",
+      label: "合同编号",
+      itemWidth: 50,
+    },
+    {
+      type: "input",
+      itemType: "text",
+      prop: "workOrderCode",
+      label: "工单编号",
+      itemWidth: 50,
+    },
+    {
+      type: "input",
+      itemType: "text",
+      prop: "productionPlanCode",
+      label: "计划编号",
+      itemWidth: 50,
+    },
+    {
+      type: "input",
+      itemType: "text",
+      prop: "productionTaskCode",
+      label: "任务编号",
+      itemWidth: 50,
+    },
+    {
+      type: "input",
+      itemType: "text",
+      prop: "productCode",
+      label: "产品编号",
+      itemWidth: 50,
+    },
+    {
+      type: "input",
+      itemType: "text",
+      prop: "productName",
+      label: "产品名称",
+      itemWidth: 50,
+    },
+    {
+      type: "input",
+      itemType: "text",
+      prop: "productSn",
+      label: "产品Sn",
+      itemWidth: 50,
+    },
+    {
+      type: "date",
+      itemType: "date",
+      prop: "dueDate",
+      label: "任务完成期限",
+      itemWidth: 50,
+      style: {
+        width: "100%",
+      },
+    },
+    {
+      type: "input",
+      itemType: "text",
+      prop: "productionProcessesName",
+      label: "当前工序名称",
+      itemWidth: 50,
+    },
+    {
+      type: "input",
+      itemType: "text",
+      prop: "personLiableName",
+      label: "当前工序负责人",
+      itemWidth: 50,
+    },
+    {
+      type: "select",
+      prop: "getFinishStatus",
+      label: "任务完成状态",
+      itemWidth: 50,
+      style: {
+        width: "100%",
+      },
+      data: finishStatusData.value,
+    },
+    {
+      type: "date",
+      itemType: "datetime",
+      prop: "getFinishTime",
+      label: "任务完成时间",
+      itemWidth: 50,
+      style: {
+        width: "100%",
+      },
+    },
+  ];
+});
+const getList = async (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy
+    .post("/productionTaskDetail/taskProgressPage", sourceList.value.pagination)
+    .then((message) => {
+      sourceList.value.data = message.rows;
+      sourceList.value.pagination.total = message.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+    });
+};
+
+getList();
+const clickMoreSearch = () => {
+  dialogVisible.value = true;
+};
+const moreSearchQuery = () => {
+  dialogVisible.value = false;
+  getList();
+};
+const moreSearchReset = () => {
+  sourceList.value.pagination = {
+    total: 0,
+    pageNum: sourceList.value.pagination.pageNum,
+    pageSize: sourceList.value.pagination.pageSize,
+    keyword: "",
+    contractCode: "",
+    workOrderCode: "",
+    productionPlanCode: "",
+    productionTaskCode: "",
+    productCode: "",
+    productName: "",
+    productSn: "",
+    dueDate: "",
+    productionProcessesName: "",
+    personLiableName: "",
+    getFinishStatus: "",
+    getFinishTime: "",
+  };
+  moreSearchQuery();
+};
+</script>
+
+<style lang="scss" scoped>
+.tenant {
+  padding: 20px;
+}
+::v-deep(.el-input-number .el-input__inner) {
+  text-align: left;
+}
+</style>

+ 9 - 8
src/views/JXSK/production/task/index.vue

@@ -74,6 +74,7 @@
               <el-table-column prop="cumulativeTime" label="累计耗时" />
               <el-table-column prop="cumulativeTime" label="累计耗时" />
               <el-table-column
               <el-table-column
                 label="工序状态"
                 label="工序状态"
+                prop="processesStatus"
                 :formatter="
                 :formatter="
                   (row) =>
                   (row) =>
                     dictValueLabel(row.processesStatus, processesStatusData)
                     dictValueLabel(row.processesStatus, processesStatusData)
@@ -120,20 +121,20 @@ const sourceList = ref({
 });
 });
 const processesStatusData = ref([
 const processesStatusData = ref([
   {
   {
-    label: "0",
-    value: "未开始",
+    label: "未开始",
+    value: "0",
   },
   },
   {
   {
-    label: "1",
-    value: "进行中",
+    label: "进行中",
+    value: "1",
   },
   },
   {
   {
-    label: "2",
-    value: "驳回",
+    label: "驳回",
+    value: "2",
   },
   },
   {
   {
-    label: "3",
-    value: "完成",
+    label: "完成",
+    value: "3",
   },
   },
 ]);
 ]);
 const dialogVisible = ref(false);
 const dialogVisible = ref(false);

+ 28 - 27
src/views/production/project/processes/index.vue

@@ -280,33 +280,34 @@ const openModal = () => {
 };
 };
 
 
 const submitForm = () => {
 const submitForm = () => {
-  if (fileList.value.length > 0) {
-    byform.value.handleSubmit((valid) => {
-      formData.data.fileList = fileList.value;
-      submitLoading.value = true;
-      proxy.post("/productionProcesses/" + modalType.value, formData.data).then(
-        (res) => {
-          ElMessage({
-            message: modalType.value == "add" ? "添加成功" : "编辑成功",
-            type: "success",
-          });
-          fileList.value = [];
-          dialogVisible.value = false;
-          submitLoading.value = false;
-          getList();
-        },
-        (err) => {
-          console.log(err, "aswwwww");
-          submitLoading.value = false;
-        }
-      );
-    });
-  } else {
-    return ElMessage({
-      message: "请上传附件!",
-      type: "info",
-    });
-  }
+  byform.value.handleSubmit((valid) => {
+    formData.data.fileList = fileList.value;
+    submitLoading.value = true;
+    proxy.post("/productionProcesses/" + modalType.value, formData.data).then(
+      (res) => {
+        ElMessage({
+          message: modalType.value == "add" ? "添加成功" : "编辑成功",
+          type: "success",
+        });
+        fileList.value = [];
+        dialogVisible.value = false;
+        submitLoading.value = false;
+        getList();
+      },
+      (err) => {
+        console.log(err, "aswwwww");
+        submitLoading.value = false;
+      }
+    );
+  });
+  // if (fileList.value.length > 0) {
+
+  // } else {
+  //   return ElMessage({
+  //     message: "请上传附件!",
+  //     type: "info",
+  //   });
+  // }
 };
 };
 
 
 const getDtl = (row) => {
 const getDtl = (row) => {