Forráskód Böngészése

Merge branch 'master' of http://192.168.101.4:3000/jiaxiaoqiang/JG-CLIENT-TEMP

jiaxiaoqiang 1 éve
szülő
commit
559d70724e

+ 34 - 1
src/api/process/traceability.ts

@@ -41,4 +41,37 @@ export function getRecordInfo(data: any) {
     method: "post",
     data,
   });
-}
+}
+//点检数据获取
+
+export function checkRecordInfo(data: any) {
+  return request({
+    url: "/api/v1/process/web/traceability/checkRecordInfo/page",
+    method: "post",
+    data,
+  });
+}
+// 生产履历列表数据分页
+export function equitRecordInfo(data: any) {
+  return request({
+    url: "/api/v1/process/web/traceability/equitRecordInfo/page",
+    method: "post",
+    data,
+  });
+}
+//报故
+export function escalationRecordInfo(data: any) {
+  return request({
+    url: "/api/v1/process/web/traceability/escalationRecordInfo/page",
+    method: "post",
+    data,
+  });
+}
+//图片采集
+export function media(data: any) {
+  return request({
+    url: "/api/v1/process/media/page",
+    method: "post",
+    data,
+  });
+}

+ 4 - 0
src/views/process/components/transferNum.vue

@@ -71,4 +71,8 @@ onMounted(() => {
 .active {
   color: $select-hover;
 }
+
+.scrollbar {
+  min-height: calc(50vh - 85px);
+}
 </style>

+ 2 - 0
src/views/process/processes.vue

@@ -34,9 +34,11 @@ const OptArrayLength = computed(() => opsArray.value.length);
 
 .notice {
   width: 100%;
+  height: calc(100vh - 170px);
   border-radius: 16px;
   background-color: white;
   text-align: center;
   padding: 60px;
+  @include flex;
 }
 </style>

+ 54 - 2
src/views/traceability/components/check.vue

@@ -1,10 +1,62 @@
 <template>
-  <div>1</div>
+  <div class="collapseStyle">
+    <el-scrollbar style="border: 1px solid #ebeef5" :height="tableHeight">
+      <el-collapse accordion>
+        <el-collapse-item v-for="(item, index) in materialsData" :key="index" :title="item.opName" :name="index">
+          <el-table :data="item.children" border>
+            <el-table-column prop="checkName" label="点检项名称" />
+            <el-table-column prop="checkCode" label="点检项编码" />
+            <el-table-column prop="content" label="内容" />
+            <el-table-column prop="result" label="结果">
+              <template #default="scope">
+                {{
+                  dictS.getLableByValue(
+                    "process_check_result",
+                    scope.row.disposalMeasures
+                  )
+                }}
+              </template>
+            </el-table-column>
+            <el-table-column prop="standard" label="标准值" />
+            <el-table-column prop="upper" label="上限值" />
+            <el-table-column prop="lower" label="下限值" />
+            <el-table-column prop="created" label="录入时间" />
+          </el-table>
+        </el-collapse-item>
+      </el-collapse>
+    </el-scrollbar>
+    <Pagination position="right" :page="page" :limit="limit" :total="total" @pagination="getPagination" />
+  </div>
 </template>
 
 <script lang="ts" setup>
+import { useProcessStore } from "@/store";
+import { checkRecordInfo } from "@/api/process/traceability";
+import { useDictionaryStore } from "@/store";
+const dictS = useDictionaryStore();
+const store = useProcessStore();
+const page = ref(1);
+const limit = ref(10);
+const total = ref(10);
+const materialsData = ref([]);
+const tableHeight = ref(null);
+const getPagination = async () => {
+  const { data } = await checkRecordInfo({
+    pageNo: page.value,
+    pageSize: limit.value,
+    seqNo: store.useSeqNo,
+  });
+  total.value = data.totalCount;
+  materialsData.value = data.records;
+};
+//动态控制高度
+const setTableHeight = () => {
+  tableHeight.value =
+    Number(document.getElementById("tabBox").offsetHeight) - 70;
+};
 onMounted(() => {
-  console.log("f1");
+  getPagination();
+  setTableHeight();
 });
 </script>
 

+ 44 - 3
src/views/traceability/components/equit.vue

@@ -1,11 +1,52 @@
 <template>
-  <div>1</div>
+  <div class="collapseStyle">
+    <el-scrollbar style="border: 1px solid #ebeef5" :height="tableHeight">
+      <el-collapse accordion>
+        <el-collapse-item v-for="(item, index) in materialsData" :key="index" :title="item.opName" :name="index">
+          <el-table :data="item.children" border>
+            <el-table-column prop="equitType" label="设备类型" />
+            <el-table-column prop="accuracy" label="精度要求" />
+            <el-table-column prop="validDate" label="设备有效期" />
+            <el-table-column prop="equitName" label="设备名称" />
+            <el-table-column prop="equitCode" label="设备编码" />
+            <el-table-column prop="created" label="录入时间" />
+          </el-table>
+        </el-collapse-item>
+      </el-collapse>
+    </el-scrollbar>
+    <Pagination position="right" :page="page" :limit="limit" :total="total" @pagination="getPagination" />
+  </div>
 </template>
 
 <script lang="ts" setup>
+import { useProcessStore } from "@/store";
+import { equitRecordInfo } from "@/api/process/traceability";
+const store = useProcessStore();
+const page = ref(1);
+const limit = ref(10);
+const total = ref(10);
+const materialsData = ref([]);
+const tableHeight = ref(null);
+const getPagination = async () => {
+  const { data } = await equitRecordInfo({
+    pageNo: page.value,
+    pageSize: limit.value,
+    seqNo: store.useSeqNo,
+  });
+  total.value = data.totalCount;
+  materialsData.value = data.records;
+};
+//动态控制高度
+const setTableHeight = () => {
+  tableHeight.value =
+    Number(document.getElementById("tabBox").offsetHeight) - 70;
+};
 onMounted(() => {
-  console.log("f1");
+  getPagination();
+  setTableHeight();
 });
 </script>
 
-<style lang="scss" scoped></style>
+<style lang="scss" scoped>
+
+</style>

+ 48 - 2
src/views/traceability/components/fault.vue

@@ -1,10 +1,56 @@
 <template>
-  <div>1</div>
+  <el-table :data="tableData" id="tableStyle" :height="tableHeight" border>
+    <el-table-column prop="operationName" label="冻结状态">
+      <template #default="scope">
+        {{ dictS.getLableByValue("escalation_fault_state", scope.row.state) }}
+      </template>
+    </el-table-column>
+    <el-table-column prop="creator" label="报故人" />
+    <el-table-column prop="stationName" label="报故工位" />
+    <el-table-column prop="created" label="报故时间" />
+    <el-table-column prop="disposalMeasures" label="处理结果">
+      <template #default="scope">
+        {{
+          dictS.getLableByValue(
+            "disposal_measures_type",
+            scope.row.disposalMeasures
+          )
+        }}
+      </template>
+    </el-table-column>
+    <el-table-column prop="standard" label="备注" />
+  </el-table>
+  <Pagination position="right" :page="page" :limit="limit" :total="total" @pagination="getPagination" />
 </template>
 
 <script lang="ts" setup>
+import { useProcessStore } from "@/store";
+import { escalationRecordInfo } from "@/api/process/traceability";
+import { useDictionaryStore } from "@/store";
+const dictS = useDictionaryStore();
+const store = useProcessStore();
+const page = ref(1);
+const limit = ref(10);
+const total = ref(10);
+const tableData = ref([]);
+const tableHeight = ref(null);
+//动态控制表格高度
+const setTableHeight = () => {
+  tableHeight.value =
+    Number(document.getElementById("tabBox").offsetHeight) - 60;
+};
+const getPagination = async () => {
+  const { data } = await escalationRecordInfo({
+    pageNo: page.value,
+    pageSize: limit.value,
+    seqNo: store.useSeqNo,
+  });
+  total.value = data.totalCount;
+  tableData.value = data.records;
+};
 onMounted(() => {
-  console.log("f1");
+  getPagination();
+  setTableHeight();
 });
 </script>
 

+ 2 - 13
src/views/traceability/components/materials.vue

@@ -3,7 +3,7 @@
     <el-scrollbar style="border: 1px solid #ebeef5" :height="tableHeight">
       <el-collapse accordion>
         <el-collapse-item v-for="(item, index) in materialsData" :key="index" :title="item.opName" :name="index">
-          <el-table :data="item.children" style="margin: 10px" border>
+          <el-table :data="item.children"  border>
             <el-table-column prop="itemName" label="物料名称" />
             <el-table-column prop="itemModel" label="物料规格" />
             <el-table-column prop="itemCode" label="物料编号" />
@@ -34,17 +34,6 @@ const getPagination = async () => {
   });
   total.value = data.totalCount;
   materialsData.value = data.records;
-  materialsData.value.push(data.records[0]);
-  // materialsData.value.push(data.records[0]);
-  // materialsData.value.push(data.records[0]);
-  // materialsData.value.push(data.records[0]);
-  // materialsData.value.push(data.records[0]);
-  // materialsData.value.push(data.records[0]);
-  // materialsData.value.push(data.records[0]);
-  // materialsData.value.push(data.records[0]);
-  // materialsData.value.push(data.records[0]);
-  // materialsData.value.push(data.records[0]);
-  // materialsData.value.push(data.records[0]);
 };
 //动态控制高度
 const setTableHeight = () => {
@@ -58,5 +47,5 @@ onMounted(() => {
 </script>
 
 <style lang="scss" scoped>
-.collapseStyle {}
+
 </style>

+ 56 - 0
src/views/traceability/components/media.vue

@@ -0,0 +1,56 @@
+<template>
+  <el-table :data="tableData" id="tableStyle" :height="tableHeight" border>
+    <el-table-column prop="operationName" label="上传工序" />
+    <el-table-column prop="creator" label="上传人员" />
+    <el-table-column prop="created" label="上传时间" />
+    <el-table-column label="操作" prop="operation">
+      <template #default="{ row }">
+        <span @click="handleLook(row.filePath)">查看</span>
+      </template>
+    </el-table-column>
+  </el-table>
+  <el-image id="showImg" style="width: 0; height: 0" :min-scale="0.2" :src="srcList[0]" :preview-src-list="srcList"
+    fit="cover" />
+  <Pagination position="right" :page="page" :limit="limit" :total="total" @pagination="getPagination" />
+</template>
+
+<script lang="ts" setup>
+import { useProcessStore } from "@/store";
+import { media } from "@/api/process/traceability";
+const store = useProcessStore();
+const page = ref(1);
+const limit = ref(10);
+const total = ref(10);
+const tableData = ref([]);
+const tableHeight = ref(null);
+const srcList = ref([]);
+const baseUrl = import.meta.env.VITE_APP_UPLOAD_URL;
+const handleLook = (path: string) => {
+  srcList.value = [];
+  srcList.value.push(baseUrl + path);
+  setTimeout(() => {
+    document.getElementById("showImg").click();
+  }, 0);
+};
+//动态控制表格高度
+const setTableHeight = () => {
+  tableHeight.value =
+    Number(document.getElementById("tabBox").offsetHeight) - 60;
+};
+
+const getPagination = async () => {
+  const { data } = await media({
+    pageNo: page.value,
+    pageSize: limit.value,
+    seqNo: store.useSeqNo,
+  });
+  total.value = data.totalCount;
+  tableData.value = data.records;
+};
+onMounted(() => {
+  getPagination();
+  setTableHeight();
+});
+</script>
+
+<style lang="scss" scoped></style>

+ 21 - 4
src/views/traceability/components/record.vue

@@ -1,10 +1,25 @@
 <template>
-  <div class="collapseStyle"></div>
+  <div class="collapseStyle">
+    <el-scrollbar style="border: 1px solid #ebeef5" :height="tableHeight">
+      <el-collapse accordion>
+        <el-collapse-item v-for="(item, index) in materialsData" :key="index" :title="item.opName" :name="index">
+          <el-table :data="item.children"  border>
+            <el-table-column prop="itemName" label="物料名称" />
+            <el-table-column prop="itemModel" label="物料规格" />
+            <el-table-column prop="itemCode" label="物料编号" />
+            <el-table-column prop="needNum" label="需求数量" />
+            <el-table-column prop="realNum" label="已采集数量" />
+          </el-table>
+        </el-collapse-item>
+      </el-collapse>
+    </el-scrollbar>
+    <Pagination position="right" :page="page" :limit="limit" :total="total" @pagination="getPagination" />
+  </div>
 </template>
 
 <script lang="ts" setup>
 import { useProcessStore } from "@/store";
-import { getMaterialsInfo } from "@/api/process/traceability";
+import { getRecordInfo } from "@/api/process/traceability";
 const store = useProcessStore();
 const page = ref(1);
 const limit = ref(10);
@@ -12,7 +27,7 @@ const total = ref(10);
 const materialsData = ref([]);
 const tableHeight = ref(null);
 const getPagination = async () => {
-  const { data } = await getMaterialsInfo({
+  const { data } = await getRecordInfo({
     pageNo: page.value,
     pageSize: limit.value,
     seqNo: store.useSeqNo,
@@ -31,4 +46,6 @@ onMounted(() => {
 });
 </script>
 
-<style lang="scss" scoped></style>
+<style lang="scss" scoped>
+
+</style>

+ 0 - 6
src/views/traceability/components/traceability.vue

@@ -34,12 +34,6 @@ const getPagination = async () => {
   });
   total.value = data.totalCount;
   tableData.value = data.records;
-  tableData.value.push(data.records[0]);
-  tableData.value.push(data.records[0]);
-  tableData.value.push(data.records[0]);
-  tableData.value.push(data.records[0]);
-  tableData.value.push(data.records[0]);
-  tableData.value.push(data.records[0]);
 };
 onMounted(() => {
   getPagination();

+ 59 - 20
src/views/traceability/index.vue

@@ -13,7 +13,7 @@
                 产品名称
               </div>
             </template>
-            kooriookami
+            {{ infoData.materialName ? infoData.materialName : "-" }}
           </el-descriptions-item>
           <el-descriptions-item>
             <template #label>
@@ -24,7 +24,7 @@
                 流转卡号
               </div>
             </template>
-            18100000000
+            {{ infoData.seqNo ? infoData.seqNo : "-" }}
           </el-descriptions-item>
           <el-descriptions-item>
             <template #label>
@@ -35,7 +35,7 @@
                 物料编号
               </div>
             </template>
-            Suzhou
+            {{ infoData.materialCode ? infoData.materialCode : "-" }}
           </el-descriptions-item>
           <el-descriptions-item>
             <template #label>
@@ -46,7 +46,7 @@
                 产品规格
               </div>
             </template>
-            <el-tag size="small">School</el-tag>
+            {{ infoData.materialModel ? infoData.materialModel : "-" }}
           </el-descriptions-item>
           <el-descriptions-item>
             <template #label>
@@ -57,7 +57,7 @@
                 铭牌号
               </div>
             </template>
-            <el-tag size="small">School</el-tag>
+            {{ infoData.materialName ? infoData.materialName : "-" }}
           </el-descriptions-item>
           <el-descriptions-item>
             <template #label>
@@ -65,10 +65,10 @@
                 <el-icon>
                   <tickets />
                 </el-icon>
-                Remarks
+                是否返工
               </div>
             </template>
-            <el-tag size="small">School</el-tag>
+            {{ infoData.materialName ? infoData.materialName : "-" }}
           </el-descriptions-item>
           <el-descriptions-item>
             <template #label>
@@ -79,7 +79,7 @@
                 工单出站
               </div>
             </template>
-            <el-tag size="small">School</el-tag>
+            {{ infoData.outNum ? infoData.outNum : "-" }}
           </el-descriptions-item>
           <el-descriptions-item>
             <template #label>
@@ -90,7 +90,7 @@
                 交付日期
               </div>
             </template>
-            <el-tag size="small">School</el-tag>
+            {{ infoData.planStartEnd ? infoData.planStartEnd : "-" }}
           </el-descriptions-item>
         </el-descriptions>
       </div>
@@ -109,9 +109,7 @@
                 :type="activeName == 'f2' ? 'warning' : 'primary'">已采物料</el-badge>
             </template>
             <keep-alive>
-              <template>
-                <Materials v-if="activeName == 'f2'" />
-              </template>
+              <Materials v-if="activeName == 'f2'" />
             </keep-alive>
           </el-tab-pane>
           <el-tab-pane name="f3">
@@ -124,24 +122,40 @@
               </template> </keep-alive></el-tab-pane>
           <el-tab-pane name="f4">
             <template #label>
-              <el-badge :value="tabCountData.check" :type="activeName == 'f4' ? 'warning' : 'primary'">点检判定</el-badge>
+              <el-badge :value="tabCountData.checks" :type="activeName == 'f4' ? 'warning' : 'primary'">点检判定</el-badge>
             </template>
-            Config</el-tab-pane>
+            <keep-alive>
+              <template v-if="activeName == 'f4'">
+                <Check />
+              </template>
+            </keep-alive>
+          </el-tab-pane>
           <el-tab-pane name="f5">
             <template #label>
               <el-badge :value="tabCountData.equit" :type="activeName == 'f5' ? 'warning' : 'danger'">设备使用</el-badge>
             </template>
-            Config</el-tab-pane>
+            <keep-alive>
+              <template v-if="activeName == 'f5'">
+                <Equit />
+              </template>
+            </keep-alive>
+          </el-tab-pane>
           <el-tab-pane name="f6">
             <template #label>
               <el-badge :value="tabCountData.fault" :type="activeName == 'f6' ? 'warning' : 'danger'">报故记录</el-badge>
             </template>
-            Config</el-tab-pane>
+            <keep-alive>
+              <template v-if="activeName == 'f6'">
+                <Fault />
+              </template> </keep-alive></el-tab-pane>
           <el-tab-pane name="f7">
             <template #label>
-              <el-badge :value="12" :type="activeName == 'f7' ? 'warning' : 'danger'">缺陷项</el-badge>
+              <el-badge :value="12" :type="activeName == 'f7' ? 'warning' : 'danger'">图片采集</el-badge>
             </template>
-            Config</el-tab-pane>
+            <keep-alive>
+              <template v-if="activeName == 'f7'">
+                <Media />
+              </template> </keep-alive></el-tab-pane>
         </el-tabs>
       </div>
     </div>
@@ -157,6 +171,10 @@ const Materials = defineAsyncComponent(
   () => import("./components/materials.vue")
 );
 const Record = defineAsyncComponent(() => import("./components/record.vue"));
+const Check = defineAsyncComponent(() => import("./components/check.vue"));
+const Equit = defineAsyncComponent(() => import("./components/equit.vue"));
+const Fault = defineAsyncComponent(() => import("./components/fault.vue"));
+const Media = defineAsyncComponent(() => import("./components/media.vue"));
 const store = useProcessStore();
 const router = useRouter();
 const activeName = ref("f1");
@@ -186,6 +204,8 @@ onMounted(() => {
 </script>
 
 <style lang="scss" scoped>
+@import "./style/index.scss";
+
 .mainContentBox {
   padding: 20px 10%;
   padding-top: 0;
@@ -200,13 +220,32 @@ onMounted(() => {
 
     .headerInfo {
       width: 100%;
-      height: 130px;
+      height: 180px;
+      margin-bottom: 10px;
     }
 
     .tabBox {
-      height: calc(100% - 160px);
+      height: calc(100% - 240px);
       width: 100%;
     }
   }
 }
+
+:deep(.el-tabs__item) {
+  height: 60px !important;
+}
+
+:deep(.cell-item) {
+  font-size: $f24;
+  display: flex;
+  padding: 10px 0;
+}
+
+:deep(.el-icon) {
+  margin-right: 5px;
+}
+
+:deep(.is-bordered-content) {
+  font-size: $f24 !important;
+}
 </style>

+ 20 - 0
src/views/traceability/style/index.scss

@@ -0,0 +1,20 @@
+//生产履历表格公共样式
+:deep(.el-collapse-item__header) {
+  background-color: #f1f3f5 !important;
+  padding: 0 20px;
+  height: 80px;
+}
+:deep(.el-badge) {
+  font-size: $f24;
+}
+:deep(.el-collapse-item__header) {
+  font-size: $f24;
+}
+:deep(.el-pagination) {
+  span {
+    font-weight: 600 !important;
+  }
+}
+:deep(.el-collapse-item__wrap) {
+  padding: 20px;
+}