Explorar el Código

生产随工单

dengrui hace 6 meses
padre
commit
e65830e093

+ 2 - 2
src/api/excel/index.ts

@@ -95,9 +95,9 @@ export function setExcelData(data: any) {
   });
 }
 // 生产随工单Exceldata获取
-export function getProExcel(id: any, type: any) {
+export function getProExcel(id: any) {
   return request({
-    url: `/api/v1/ProcessFormData/getExcel/${id}/${type}`,
+    url: `/api/v1/ProcessFormData/getExcel/${id}`,
     method: "get",
   });
 }

+ 26 - 3
src/views/base/signature/components/opSignature.vue

@@ -19,14 +19,28 @@
       ref="signatureFormRef"
     >
       <el-form-item
-        label="章名称:"
+        label="章名称:"
         prop="signatureName"
         :rules="[{ required: true, message: '请输入印章名称' }]"
         style="width: 400px"
       >
         <el-input v-model="form.signatureName" />
       </el-form-item>
-
+      <el-form-item
+        label="签章人名称:"
+        prop="signUser"
+        :rules="[{ required: true, message: '请选择签章人名称' }]"
+        style="width: 400px"
+      >
+        <el-select v-model="form.signUser" filterable>
+          <el-option
+            v-for="item in userList"
+            :key="item.userName"
+            :label="item.userName"
+            :value="item.userName"
+          />
+        </el-select>
+      </el-form-item>
       <el-form-item
         label="签章归属:"
         prop="signatureAttribution"
@@ -401,6 +415,7 @@ import { useDebounceFn } from "@vueuse/core";
 import html2canvas from "html2canvas";
 import { uploadFileApi } from "@/api/file";
 import Cropper from "cropperjs";
+import { getUserList } from "@/api/system/user";
 import "cropperjs/dist/cropper.css";
 import {
   addSignature,
@@ -410,6 +425,7 @@ import {
 } from "@/api/signature";
 
 const { dicts } = useDictionaryStore();
+const userList = ref([]);
 const Visible = ref(true);
 const addStatus = ref(false);
 const props = defineProps({
@@ -422,6 +438,11 @@ const form = ref({
   signatureFiles: "",
   signatureAttribution: "",
 });
+const queryUserList = () => {
+  getUserList({}).then((data) => {
+    userList.value = data.data;
+  });
+};
 const changeMyselfUpload = () => {
   form.value.signatureFiles = null;
 };
@@ -905,10 +926,12 @@ const {
   sealRotateChange,
   buildCropperImage,
 } = GZUseHook();
-onMounted(() => {
+onMounted(async () => {
+  await queryUserList();
   if (props.editStatus == true) {
     addStatus.value = false;
     form.value.signatureName = props.rowObj.signatureName;
+    form.value.signUser = props.rowObj.signUser;
     form.value.signatureState = props.rowObj.signatureState;
     form.value.signatureType = props.rowObj.signatureType;
     form.value.signatureAttribution = props.rowObj.signatureAttribution;

+ 9 - 3
src/views/base/signature/index.vue

@@ -175,13 +175,19 @@ option.value = Object.assign(option.value, {
   addBtn: false,
   column: [
     {
-      label: "章名称",
+      label: "章名称",
       prop: "signatureName",
       search: true,
       overHidden: true,
     },
     {
-      label: "公章类型",
+      label: "签章人名称",
+      prop: "signUser",
+      search: true,
+      overHidden: true,
+    },
+    {
+      label: "签章类型",
       prop: "signatureType",
       overHidden: true,
       search: true,
@@ -190,7 +196,7 @@ option.value = Object.assign(option.value, {
       props: { label: "dictLabel", value: "dictValue" },
     },
     {
-      label: "章归属",
+      label: "章归属",
       prop: "signatureAttribution",
       type: "select",
       search: true,

+ 38 - 29
src/views/plan/workOrder/index.vue

@@ -131,30 +131,13 @@
         <el-button
           icon="el-icon-setting"
           text
-          @click="showProExcel(row.id, '0')"
+          @click="showProExcel(row.id)"
           type="primary"
-          v-if="row.workOrderState > 3 && row.filterNumber == '1'"
+          v-if="row.workOrderState > 3"
           :size="size"
           >生产随工单</el-button
         >
-        <el-button
-          icon="el-icon-setting"
-          text
-          @click="showProExcel(row.id, '1')"
-          type="primary"
-          v-if="row.workOrderState > 3 && row.filterNumber == '2'"
-          :size="size"
-          >生产随工单(一筛)</el-button
-        >
-        <el-button
-          icon="el-icon-setting"
-          text
-          @click="showProExcel(row.id, '2')"
-          type="primary"
-          v-if="row.workOrderState > 3 && row.filterNumber == '2'"
-          :size="size"
-          >生产随工单(二筛)</el-button
-        >
+
         <!--        <el-button
           icon="el-icon-notebook"
           text
@@ -319,6 +302,21 @@
         multipleKey="workOrderCode"
       />
     </el-dialog>
+    <el-dialog
+      v-model="dialog8.visible"
+      :title="dialog8.title"
+      width="950px"
+      @close="dialog8.visible = false"
+    >
+      <el-card
+        style="cursor: pointer; font-size: 20px"
+        shadow="always"
+        :key="item"
+        @click="toShowExcel(item)"
+        v-for="item in showProList"
+        >{{ item.formName }}</el-card
+      >
+    </el-dialog>
   </div>
 </template>
 <script setup>
@@ -350,15 +348,22 @@ const router = useRouter();
 const workOderShow = ref(false);
 const ExDataObj = ref({});
 const excelData = ref([]);
-const showProExcel = async (id, type) => {
-  const { data, code } = await getProExcel(id, type);
-  if (code == "200") {
-    ExDataObj.value = data;
-    workOderShow.value = true;
-  } else {
-    ExDataObj.value = {};
-    workOderShow.value = false;
-  }
+const showProList = ref([]);
+const showProExcel = async (id) => {
+  const { data, code } = await getProExcel(id);
+  showProList.value = data;
+  dialog8.visible = true;
+  // if (code == "200") {
+  //   ExDataObj.value = data;
+  //   workOderShow.value = true;
+  // } else {
+  //   ExDataObj.value = {};
+  //   workOderShow.value = false;
+  // }
+};
+const toShowExcel = (item) => {
+  ExDataObj.value = item;
+  workOderShow.value = true;
 };
 const closeShow = () => {
   workOderShow.value = false;
@@ -417,6 +422,10 @@ const dialog7 = reactive({
   title: "前置工单选择",
   visible: false,
 });
+const dialog8 = reactive({
+  title: "生产随工单列表",
+  visible: false,
+});
 const apsType = ref(0);
 const aps = (id) => {
   apsType.value = 0;

+ 1 - 3
src/views/system/post/components/post-skill.vue

@@ -188,9 +188,7 @@ option.value = Object.assign(option.value, {
     },
   ],
 });
-const routeBack = () => {
-  router.back();
-};
+
 const addSkill = () => {
   const bom = ref({
     postId: props.postId,