浏览代码

1.成品物料入库记录添加查看管号
2.辅料管理添加有效期

luoxiao 3 周之前
父节点
当前提交
32afb355c6

+ 19 - 3
src/views/base/accessories/index.vue

@@ -27,16 +27,18 @@
           icon="el-icon-delete"
           :size="size"
           @click="multipleDelete"
-        >删除</el-button
+          >删除</el-button
         >
       </template>
       <template #menu-right="{}">
         <el-dropdown split-button
-        >导入
+          >导入
           <template #dropdown>
             <el-dropdown-menu>
               <el-dropdown-item
-                @click="downloadTemplate('/api/v1/base/accessories/material/template')"
+                @click="
+                  downloadTemplate('/api/v1/base/accessories/material/template')
+                "
               >
                 <i-ep-download />下载模板
               </el-dropdown-item>
@@ -214,6 +216,20 @@ option.value = Object.assign(option.value, {
         },
       ],
     },
+    {
+      label: "有效期",
+      prop: "validity",
+      type: "date",
+      format: "YYYY-MM-DD",
+      valueFormat: "YYYY-MM-DD",
+      rules: [
+        {
+          required: true,
+          message: "有效期不能为空",
+          trigger: "blur",
+        },
+      ],
+    },
   ],
 });
 

+ 74 - 28
src/views/plan/finishProduct/components/detail-stock.vue

@@ -15,30 +15,68 @@
       @selection-change="selectionChange"
     >
       <template #menu="{ row }">
-        <el-button link icon="el-icon-copy-document"
-            v-if="row.flowState == '0' || row.flowState == '2' || row.flowState == '-1'"
-            @click="openCheckView(row)">提审</el-button>
-
-        <el-button link v-if="row.flowState !== '0'" icon="el-icon-copy-document" @click="showFlowSteps(row)"
-        >流程</el-button>
+        <el-button icon="el-icon-setting" link @click="showSeqPage(row)"
+          >产品管号</el-button
+        >
+        <el-button
+          link
+          icon="el-icon-copy-document"
+          v-if="
+            row.flowState == '0' ||
+            row.flowState == '2' ||
+            row.flowState == '-1'
+          "
+          @click="openCheckView(row)"
+          >提审</el-button
+        >
 
-        <el-button link icon="el-icon-copy-document"
-            v-if="row.flowState == '3'"
-            @click="onCancelFlow(row)" >撤销</el-button>
         <el-button
-            link
-            v-if="row.flowState === '0' || row.flowState == '2' || row.flowState == '-1'"
-            type="danger"
-            icon="el-icon-delete"
-            @click="deleteRow(row)"
-        >删除</el-button>
+          link
+          v-if="row.flowState !== '0'"
+          icon="el-icon-copy-document"
+          @click="showFlowSteps(row)"
+          >流程</el-button
+        >
 
+        <el-button
+          link
+          icon="el-icon-copy-document"
+          v-if="row.flowState == '3'"
+          @click="onCancelFlow(row)"
+          >撤销</el-button
+        >
+        <el-button
+          link
+          v-if="
+            row.flowState === '0' ||
+            row.flowState == '2' ||
+            row.flowState == '-1'
+          "
+          type="danger"
+          icon="el-icon-delete"
+          @click="deleteRow(row)"
+          >删除</el-button
+        >
       </template>
     </avue-crud>
+    <el-dialog
+      v-model="seqDialog.visible"
+      :title="seqDialog.title"
+      width="950px"
+      @close="seqDialog.visible = false"
+    >
+      <el-card
+        style="cursor: pointer; font-size: 20px"
+        shadow="always"
+        :key="item"
+        v-for="item in showSeqList"
+        >{{ item }}</el-card
+      >
+    </el-dialog>
     <LookFlowStep ref="LookFlowStepRef"></LookFlowStep>
     <work-flow-check
-        ref="workFlowCheckRef"
-        @sureToSave="onWFSave"
+      ref="workFlowCheckRef"
+      @sureToSave="onWFSave"
     ></work-flow-check>
   </div>
 </template>
@@ -48,19 +86,20 @@ import { useCrud } from "@/hooks/userCrud";
 import { useCommonStoreHook, useDictionaryStore } from "@/store";
 import WorkFlowCheck from "@/components/WorkFlows/workFlowCheck.vue";
 import LookFlowStep from "@/views/flow/common/LookFlowStep.vue";
-import { cancelFlow,submitFlow } from "@/api/flow";
+import { cancelFlow, submitFlow } from "@/api/flow";
 const { isShowTable, tableType } = toRefs(useCommonStoreHook());
 const { dicts } = useDictionaryStore();
 //  工作流相关 start
 const workFlowCheckRef = ref(null);
 const openCheckView = (row) => {
-  row.businessId = row.id
+  row.businessId = row.id;
   workFlowCheckRef.value &&
-  workFlowCheckRef.value.openDialog(row, "seqInFlowService");
+    workFlowCheckRef.value.openDialog(row, "seqInFlowService");
 };
 const LookFlowStepRef = ref(null);
 const showFlowSteps = (row) => {
-  LookFlowStepRef.value && LookFlowStepRef.value.openFlowStepDrawer(row.flowIns);
+  LookFlowStepRef.value &&
+    LookFlowStepRef.value.openFlowStepDrawer(row.flowIns);
 };
 const onWFSave = (flowForm) => {
   submitFlow(flowForm).then(() => {
@@ -70,6 +109,20 @@ const onWFSave = (flowForm) => {
   });
 };
 
+const seqDialog = ref({
+  title: "产品管号",
+  visible: false,
+});
+
+const showSeqList = ref<any>([]);
+
+const showSeqPage = (row) => {
+  row.seqNo.split(",").forEach((item) => {
+    showSeqList.value.push(item);
+  });
+  seqDialog.value.visible = true;
+};
+
 const onCancelFlow = (row) => {
   console.log(row);
   cancelFlow({
@@ -82,7 +135,6 @@ const onCancelFlow = (row) => {
 };
 //工作流 end
 
-
 const props = defineProps({
   workOrderCode: {
     type: String,
@@ -140,12 +192,6 @@ option.value = Object.assign(option.value, {
       prop: "inventoryNum",
     },
     {
-      label: "管号",
-      prop: "seqNo",
-      minWidth: 180,
-      overHidden: true,
-    },
-    {
       label: "检验码",
       prop: "checkCode",
     },

+ 18 - 1
src/views/plan/finishProduct/index.vue

@@ -17,7 +17,8 @@
     >
       <template #menu="{ row, index, type }">
         <el-button @click="inStock(row)" icon="el-icon-van" text type="primary"
-          >入库</el-button>
+          >入库</el-button
+        >
         <el-button
           @click="viewStock(row)"
           icon="el-icon-view"
@@ -146,6 +147,22 @@ option.value = Object.assign(option.value, {
       hide: true,
     },
     {
+      label: "工单状态",
+      prop: "isFinished",
+      dicData: [
+        { label: "进行中", value: 0 },
+        { label: "已完成", value: 1 },
+      ],
+      html: true,
+      formatter: (val) => {
+        if (val.isFinished === 0) {
+          return '<b class="el-tag el-tag--warning el-tag--light">进行中</b>';
+        } else if (val.isFinished === 1) {
+          return '<b class="el-tag el-tag--success el-tag--light">已完成</b>';
+        }
+      },
+    },
+    {
       label: "工单数量",
       prop: "planNum",
     },