zhuzeyu 10 月之前
父节点
当前提交
94b3480079

+ 52 - 0
src/api/business/check.js

@@ -0,0 +1,52 @@
+import request from '@/utils/request'
+const baseUrl = import.meta.env.VITE_APP_PRODUCTION_API
+
+// 查询检查类别列表
+export function listCheck(query) {
+  return request({
+    url: baseUrl +'/business/check/list',
+    method: 'get',
+    params: query
+  })
+}
+// 查询检查类别列表
+export function listRoleCheck(query) {
+  return request({
+    url: baseUrl +'/business/check/roleList',
+    method: 'get',
+    params: query
+  })
+}
+// 查询检查类别详细
+export function getCheck(id) {
+  return request({
+    url: baseUrl +'/business/check/' + id,
+    method: 'get'
+  })
+}
+
+// 新增检查类别
+export function addCheck(data) {
+  return request({
+    url: baseUrl +'/business/check',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改检查类别
+export function updateCheck(data) {
+  return request({
+    url: baseUrl +'/business/check',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除检查类别
+export function delCheck(id) {
+  return request({
+    url: baseUrl +'/business/check/' + id,
+    method: 'delete'
+  })
+}

+ 44 - 0
src/api/business/standards.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+const baseUrl = import.meta.env.VITE_APP_PRODUCTION_API
+// 查询检查标准列表
+export function listStandards(query) {
+  return request({
+    url: baseUrl + '/business/standards/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询检查标准详细
+export function getStandards(id) {
+  return request({
+    url: baseUrl + '/business/standards/' + id,
+    method: 'get'
+  })
+}
+
+// 新增检查标准
+export function addStandards(data) {
+  return request({
+    url: baseUrl + '/business/standards',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改检查标准
+export function updateStandards(data) {
+  return request({
+    url: baseUrl + '/business/standards',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除检查标准
+export function delStandards(id) {
+  return request({
+    url: baseUrl + '/business/standards/' + id,
+    method: 'delete'
+  })
+}

+ 17 - 0
src/router/index.js

@@ -213,6 +213,23 @@ export const dynamicRoutes = [
       }
     ]
   },
+  {
+    path: '/standards',
+    component: Layout,
+    hidden: true,
+    permissions: ['business:standards:list'],
+    children: [
+      {
+        // 假设您要传递的三个参数
+        path: 'detail/:productId/:productVersion/:processCode',
+        component: () => import('@/views/business/standards/detail'),
+        name: 'detail',
+        meta: {
+          title: '产品检查标准'
+        }
+      }
+    ]
+  },
   // {
   //   path: '/drawing',
   //   component: Layout,

+ 152 - 0
src/views/business/check/form.vue

@@ -0,0 +1,152 @@
+<template>
+    <!-- 添加或修改项目信息对话框 -->
+    <div class="el-drawer__wrapper">
+        <el-dialog :title="title" v-model="visible" width="500px" @close="cancel" append-to-body>
+
+
+
+            <el-form ref="checkRef" class="master-container" :model="form" :rules="rules" label-width="120px" style="margin-top: 20px;">
+                <el-row :gutter="30">
+                    <el-col :span="24">
+                        <el-form-item label="检查类别编码" prop="code">
+                            <el-input disabled="true" v-model="form.code" placeholder="请输入检查类别编码" />
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="24">
+                        <el-form-item label="检查类别名称" prop="name">
+                            <el-input  v-model="form.name" placeholder="请输入检查类别名称" />
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="24">
+                        <el-form-item label="备注" prop="remark">
+                            <el-input  v-model="form.remark" placeholder="请输入备注" />
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+            </el-form>
+            <template #footer>
+                <div class="dialog-footer">
+                    <el-button type="primary" @click="submitForm">确 定</el-button>
+                    <el-button @click="cancel">取 消</el-button>
+                </div>
+            </template>
+
+        </el-dialog>
+    </div>
+</template>
+<script setup>
+import { getCheck, addCheck, updateCheck } from "@/api/business/check";
+const { proxy } = getCurrentInstance()
+/** 父组件传参 */
+const props = defineProps({
+    getList: {
+        type: Function,
+        default: () => { }
+    }
+})
+const { getList } = toRefs(props)
+/** 字典数组区 */
+/** 表单抽屉 页变量 */
+const title = ref("")
+const loading = ref(false)
+const multiple = ref(true)
+const visible = ref(false)
+const editStatus = ref(false)
+const isFullscreen = ref(false)
+const webHost = import.meta.env.VITE_APP_BASE_API
+const data = reactive({
+    form: {},
+    rules: {
+        code: [
+            { required: true, message: "检查类别编码不能为空", trigger: "blur" }
+        ],
+        name: [
+            { required: true, message: "检查类别名称不能为空", trigger: "blur" }
+        ],
+    }
+});
+const { form, rules } = toRefs(data);
+/***********************  方法区  ****************************/
+/** 打开抽屉 */
+function open(id) {
+    reset();
+    visible.value = true;
+    if (id) {
+        getCheck(id).then(response => {
+            form.value = response.data;
+            editStatus.value = false
+            title.value = "修改项目信息"
+        })
+    } else {
+        editStatus.value = true
+        title.value = "添加项目信息"
+    }
+}
+
+/** 取消按钮 */
+function cancel() {
+    visible.value = false;
+    reset();
+}
+
+/** 表单重置 */
+function reset() {
+    form.value = {
+        id: null,
+        code: null,
+        name: null,
+        remark: null,
+        status: null,
+        creatorId: null,
+        createTime: null,
+        updaterId: null,
+        updateTime: null,
+        deleted: null,
+        version: null
+    };
+    proxy.resetForm("checkRef");
+}
+
+/** 全屏缩放 */
+function handleScreen() {
+    const dom = document.querySelector('.list-container > .el-drawer__wrapper > .el-overlay')
+    isFullscreen.value = !isFullscreen.value
+    dom.style.position = isFullscreen.value ? 'fixed' : 'absolute'
+}
+
+
+/** 提交按钮 */
+function submitForm() {
+    proxy.$refs["checkRef"].validate(valid => {
+        if (valid) {
+            if (form.value.id != null) {
+                updateCheck(form.value).then(response => {
+                    proxy.$modal.msgSuccess("修改成功");
+                    visible.value = false;
+                    getList.value()
+                });
+            } else {
+                addCheck(form.value).then(response => {
+                    proxy.$modal.msgSuccess("新增成功");
+                    visible.value = false;
+                    getList.value()
+                });
+            }
+        }
+    });
+}
+
+/** 查询表单信息  */
+function getForm() {
+    loading.value = true
+    getCheck(form.value.id).then(response => {
+        loading.value = false
+        form.value = response.data
+    })
+}
+
+/** 暴露给父组件的方法 */
+defineExpose({
+    open
+})
+</script>

+ 145 - 0
src/views/business/check/index.vue

@@ -0,0 +1,145 @@
+<template>
+    <div class="page-container row-container">
+  
+      <section class="list-part-container" style="flex: 2">
+        <!-- 搜索区域 -->
+        <el-form class="list-search-container" :model="queryParams" ref="queryRef" :inline="true">
+          <el-form-item class="section-title" label="检查类别管理" />
+         
+          <el-form-item label="检查类别编码:" prop="code">
+                <el-input v-model="queryParams.code" placeholder="请输入检查类别编码" clearable @keyup.enter="handleQuery" />
+            </el-form-item>
+            <el-form-item label="检查类别名称:" prop="name">
+                <el-input v-model="queryParams.name" placeholder="请输入检查类别名称" clearable @keyup.enter="handleQuery" />
+            </el-form-item>
+          <el-form-item>
+            <el-button type="info" icon="Search" @click="handleQuery">搜索</el-button>
+          </el-form-item>
+          <el-form-item>
+            <!-- <el-button type="primary" icon="Plus" @click="handleAdd(null)"
+              v-hasPermi="['business:check:add']">新增</el-button> -->
+          </el-form-item>
+        
+        </el-form>
+        <!-- 列表区域 -->
+        <div class="el-table-container">
+          <div class="el-table-inner-container">
+            <el-table v-loading="loading" :data="checkList" size="small" border height="100%"
+            @selection-change="handleSelectionChange">
+            <!-- <el-table-column type="selection" width="55" align="center" /> -->
+            <el-table-column type="index" label="行号" width="50" align="center" />
+            <el-table-column label="检查类别编码" align="center" prop="code" />
+            <el-table-column label="检查类别名称" align="center" prop="name" />
+            <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+                <template #default="scope">
+                    <el-button link type="warning" size="small" icon="Edit" @click="handleUpdate(scope.row)"
+                        v-hasPermi="['business:check:edit']">修改</el-button>
+                    <!-- <el-button link type="danger" size="small" icon="Delete" @click="handleDelete(scope.row)"
+                        v-hasPermi="['business:check:remove']">删除</el-button> -->
+                </template>
+            </el-table-column>
+        </el-table>
+          </div>
+        </div>
+        <pagination  :total="total" v-model:page="queryParams.pageNum"
+          v-model:limit="queryParams.pageSize" @pagination="getList" />
+      </section>
+
+      <!-- 设备档案管理表单 -->
+       <!-- 表单 -->
+       <check-form ref="checkRef" :get-list="getList"></check-form>
+    </div>
+  </template>
+  
+  <script setup name="Equipment">
+ import { listCheck, delCheck } from "@/api/business/check";
+ import checkForm from "./form"
+  const { proxy } = getCurrentInstance();
+const checkList = ref([]);
+const loading = ref(true);
+const ids = ref([])
+const single = ref(true);
+const multiple = ref(true);
+const total = ref(0);
+/** 查询对象 */
+const queryParams = ref({
+    pageNum: 1,
+    pageSize: 10,
+    code: null,
+    name: null,
+    status: null,
+})
+
+/***********************  方法区  ****************************/
+
+/** 查询检查类别列表 */
+function getList() {
+    loading.value = true;
+    listCheck(queryParams.value).then(response => {
+        checkList.value = response.rows;
+        total.value = response.total;
+        loading.value = false;
+    });
+}
+
+/** 搜索按钮操作 */
+function handleQuery() {
+    queryParams.value.pageNum = 1;
+    getList();
+}
+
+
+// 多选框选中数据
+function handleSelectionChange(selection) {
+    ids.value = selection.map(item => item.id);
+    single.value = selection.length != 1;
+    multiple.value = !selection.length;
+}
+
+/** 新增按钮操作 */
+function handleAdd() {
+    proxy.$refs.checkRef.open()
+}
+
+/** 修改按钮操作 */
+function handleUpdate(row) {
+    const id = row.id || ids.value
+    proxy.$refs.checkRef.open(id)
+}
+
+
+/** 删除按钮操作 */
+function handleDelete(row) {
+    const _ids = row.id || ids.value;
+    proxy.$modal.confirm('是否确认删除选中的数据项?').then(function () {
+        return delCheck(_ids);
+    }).then(() => {
+        getList();
+        proxy.$modal.msgSuccess("删除成功!");
+    }).catch(() => { });
+}
+
+
+
+getList();
+</script>
+  <style scoped>
+  :deep(.el-tree-node__label) {
+    font-size: 14px !important;
+    display: inline-block;
+    width: 100%;
+  }
+  
+  :deep(.el-tree-node__content) {
+    height: 40px;
+    border-bottom: 1px solid #ebeef5;
+    padding: 8px 0;
+    line-height: 23px;
+  }
+  
+  .move-handle {
+    cursor: move;
+    background-color: #eee;
+  }
+  </style>
+  

+ 364 - 0
src/views/business/standards/detail.vue

@@ -0,0 +1,364 @@
+<template>
+    <div class="page-container column-container">
+        <section class="list-part-container">
+            <!-- 搜索区域 -->
+            <el-form class="list-search-container" :inline="true">
+                <el-form-item class="section-title" label="产品信息" />
+                <el-form-item label="客户:">
+                    {{ currentProduct.companyAlias }}
+                </el-form-item>
+                <el-form-item label="图号:">
+                    {{ currentProduct.drawingNumber }}
+                </el-form-item>
+                <el-form-item label="规格:">
+                    {{ currentProduct.specification }}
+                </el-form-item>
+                <el-form-item label="产品描述:">
+                    {{ currentProduct.description }}
+                </el-form-item>
+                <el-form-item>
+
+                </el-form-item>
+                <el-form-item class="section-title" label="工艺版本:">
+                    {{ currentTechnological.productVersion }}
+                </el-form-item>
+                <el-form-item class="section-title" label="当前工序:">
+                    <el-select-v2 v-model="technologicalDetailId" clearable :options="technologicalProcessDetailsList"
+                        placeholder="请选择工序" style="width: 160px" @change="handleDetailsChange" />
+
+
+                </el-form-item>
+            </el-form>
+
+        </section>
+        <div class="page-container row-container">
+            <section class="list-part-container" style="flex: 1">
+                <div class="list-btns-container">
+                    <el-button type="success" v-hasPermi="['business:standards:add']" @click="handelAdd()">新增
+                    </el-button>
+                    <el-button type="danger" v-hasPermi="['business:standards:remove']" :disabled="multiple" @click="handleDelete">删除
+                    </el-button>
+                </div>
+                <div class="page-container form-container">
+
+
+                    <!-- 列表区 -->
+                    <div class="el-table-container">
+                        <el-table ref="standardsTable" v-loading="loading" row-key="id" highlight-current-row
+                            @current-change="handleChange" :data="standardsList"  @selection-change="handleSelectionChange" height="600px">
+                            <el-table-column type="selection" width="40" align="center" />
+                            <el-table-column type="index" label="行号" width="50" align="center" />
+
+                            <el-table-column label="检查标准" prop="standard" align="center" width="500">
+                                <template #default="scope">
+                                    <span v-if="!scope.row.editStatus">{{ scope.row.standard }}</span>
+                                    <el-input v-else v-model="scope.row.standard" placeholder="请输入检查标准" />
+                                </template>
+                            </el-table-column>
+                            <el-table-column label="检查仪器" prop="instrument" align="center" width="500">
+                                <template #default="scope">
+                                    <span v-if="!scope.row.editStatus">{{ scope.row.instrument }}</span>
+                                    <el-input v-else v-model="scope.row.instrument" placeholder="请输入检查仪器" />
+                                </template>
+                            </el-table-column>
+
+                            <template v-for="column in sortCheckStandardList" :key="column.id">
+                                <el-table-column :prop="column.code" :label="column.name" width="80px" align="center">
+                                    <template #default="scope">
+                                        <!-- {{ getSortCheck(scope.row.checkStandardList,column.inspectionInstructionId) }} -->
+                                        <el-checkbox :disabled="!scope.row.editStatus" v-model="scope.row[column.code]"  />
+                                    </template>
+                                </el-table-column>
+                            </template>
+
+                            <el-table-column fixed="right" label="操作" align="center" width="220">
+                                <template #default="scope">
+                                    <el-button-group
+                                        style="display: flex;align-items: center; justify-content: center;  flex-wrap: nowrap;">
+                                        <el-button v-if="!scope.row.editStatus" link type="primary"
+                                            v-hasPermi="['business:standards:examine']"
+                                            @click="handelEdit(scope.row, 'edit')">编辑
+                                        </el-button>
+                                        <el-button v-if="scope.row.editStatus" link type="success" plain
+                                            v-hasPermi="['business:standards:raift']"
+                                            @click="handlePreview(scope.row)">保存</el-button>
+
+
+                                        <el-button v-if="scope.row.editStatus" link type="warning"
+                                            v-hasPermi="['business:standards:replace']"
+                                            @click="handelEdit(scope.row, 'cancel')">取消
+                                        </el-button>
+
+
+                                        <el-button v-if="!scope.row.editStatus" link type="danger"
+                                            v-hasPermi="['business:standards:remove']"
+                                            @click="handleDelete(scope.row)">删除
+                                        </el-button>
+                                    </el-button-group>
+                                </template>
+                            </el-table-column>
+                        </el-table>
+                    </div>
+                    <!-- 分页 -->
+                    <pagination v-show="total > 0" :total="total" v-model:page="queryparams.pageNum"
+                        v-model:limit="queryparams.pageSize" @pagination="getStandards" />
+                </div>
+            </section>
+
+
+
+        </div>
+
+
+    </div>
+</template>
+<script setup name="drawingDetails">
+import { ref } from "vue";
+import { getToken } from '@/utils/auth'
+import { listCheck,listRoleCheck } from "@/api/business/check";
+import { listStandards, addStandards,delStandards } from "@/api/business/standards";
+
+import useUserStore from '@/store/modules/user'
+import { getTechnological, getById } from '@/api/business/product'
+import { getTechnologicalProcessDetails } from '@/api/business/technologicalProcessDetail'
+
+const drawingUrl = ref('')
+const { proxy } = getCurrentInstance();
+const total = ref(0)
+const route = useRoute();
+const coverName = ref("")
+const currentProduct = ref({})
+const currentTechnological = ref({})
+const currentTechnologicalDetail = ref({})
+const technologicalProcessList = ref([])
+const technologicalProcessDetailsList = ref([])
+const technologicalDetailId = ref(null)
+const repeatingDrawings = ref([])
+const standardsTable = ref(null)
+const loading = ref(false);
+const standardsList = ref([])
+const productId = ref(null)
+const ids = ref([])
+const single = ref(true);
+const multiple = ref(true);
+const processCode = ref(null)
+const productVersion = ref(null)
+const sortCheckStandardList = ref([])
+/** 查询对象 */
+const data = reactive({
+    queryparams: {
+        pageNum: 1,
+        pageSize: 10,
+        technologicalProcessDetailId: null
+    },
+    form: {
+        pageNum: 1,
+        pageSize: 10,
+        parentId: null,
+        technologicalProcessDetailId: null,
+        groupDetailList: [],
+        code: "",
+        remark: "",
+        type: false
+    },
+    rules: {
+        technologicalProcessDetailId: [{ required: true, message: "工序不能为空", trigger: "blur" }],
+    },
+});
+const { form, rules, queryparams } = toRefs(data);
+const detailsRow = {
+    standard: '',
+    instrument: '',
+    editStatus: true
+}
+function getList() {
+
+
+    productId.value = route.params.productId
+    productVersion.value = route.params.productVersion
+
+    if (route.params.processCode) {
+        processCode.value = route.params.processCode
+    } else {
+        technologicalDetailId.value = null
+    }
+    //查询产品
+    getById(productId.value).then(resMsg => {
+        if (resMsg.code == 200) {
+            currentProduct.value = resMsg.data
+        }
+    })
+
+    //查询工艺版本
+    getTechnological({ productId: productId.value }).then(res => {
+        if (res.code == 200) {
+            technologicalProcessList.value = res.data
+            //版本下拉框默认值
+            currentTechnological.value.productVersion = productVersion.value
+
+            //查询工艺工序
+            getTechnologicalProcessDetails({ technologyVersion: currentTechnological.value.productVersion, productId: productId.value }).then(response => {
+                if (response.code == 200) {
+                    technologicalProcessDetailsList.value = response.data
+                    if (processCode.value !== undefined && processCode.value !== null && processCode.value !== 'undefined') {
+                        technologicalDetailId.value = response.data.find(detail => detail.code == processCode.value).value;
+                        currentTechnologicalDetail.value.id = response.data.find(detail => detail.code === processCode.value).value;
+                    } else {
+                        technologicalDetailId.value = null
+                    }
+                    getStandards()
+                }
+            })
+        }
+    })
+
+}
+
+
+
+
+
+// 多选框选中数据
+function handleSelectionChange(selection) {
+    ids.value = selection.map(item => item.id);
+    single.value = selection.length != 1;
+    multiple.value = !selection.length;
+    console.log(ids.value)
+}
+
+function handleChange(row){
+
+}
+
+
+/** 删除按钮操作 */
+function handleDelete(row) {
+    const _ids = row.id || ids.value;
+    console.log(ids.value)
+    proxy.$modal.confirm('是否确认删除选中的数据项?').then(function () {
+        return delStandards(_ids);
+    }).then(() => {
+        getList();
+        proxy.$modal.msgSuccess("删除成功!");
+    }).catch(() => { });
+}
+function handelAdd() {
+    console.log(standardsList.value)
+    const newDetail = JSON.parse(JSON.stringify(detailsRow))
+
+    sortCheckStandardList.value.forEach(column => {
+        newDetail[column.code] = ''; // 假设默认值是空字符串,根据实际情况调整
+    })
+
+    // 将新行添加到standardsList中
+    standardsList.value.push(newDetail)
+
+}
+/**获取图纸列表 */
+function getStandards() {
+
+    queryparams.value.productId = productId.value
+    queryparams.value.productVersion = currentTechnological.value.productVersion
+    queryparams.value.processCode = processCode.value
+    // if (currentTechnologicalDetail.value.id !== undefined && currentTechnologicalDetail.value.id !== 'undefined') {
+    //     queryparams.value.technologicalProcessDetailId = currentTechnologicalDetail.value.id
+
+    // }
+    listStandards(queryparams.value).then(res => {
+        if (res.code == 200) {
+            standardsList.value = res.rows
+            console.log(1225, res.rows)
+            if (res.rows.length > 0) {
+                proxy.$refs.standardsTable.setCurrentRow(res.rows[0])
+            } else {
+                drawingUrl.value = null
+            }
+            total.value = res.total
+        }
+    })
+    listRoleCheck({}).then(res => {
+        if (res.code == 200) {
+            sortCheckStandardList.value = res.data
+        }
+    })
+}
+
+
+
+function handelEdit(row, type) {
+    row.editStatus = !row.editStatus
+    console.log(row)
+    if (type == 'cancel' && !row.id) {
+        standardsList.value = standardsList.value.filter(item => item !== row);
+    }
+}
+
+
+
+
+/**审核 */
+function handlePreview(row) {
+    var item = row
+    item.productId =productId.value 
+    item.processCode =  processCode.value
+    item.productVersion=productVersion.value 
+
+    addStandards(row).then(res => {
+        if (res.code == 200) {
+            proxy.$modal.msgSuccess("操作成功");
+            reset()
+            getList();
+        }
+    })
+}
+function reset() {
+    form.value = {
+        pageNum: 1,
+        pageSize: 10,
+        code: null,
+        remark: null,
+        groupDetailList: [],
+        url: null,
+        drawingName: null,
+        identification: 0,
+        markD: 0,
+        type: false
+    };
+    currentTechnologicalDetail.value = {}
+    coverName.value = ''
+    repeatingDrawings.value = []
+    proxy.resetForm("drawingRef");
+}
+
+
+/**工序选择change事件 */
+function handleDetailsChange() {
+    if (technologicalDetailId.value) {
+        var matchingDetail = technologicalProcessDetailsList.value.find(detail => detail.value === technologicalDetailId.value);
+        currentTechnologicalDetail.value.id = technologicalDetailId.value == undefined ? null : technologicalDetailId.value
+        processCode.value = matchingDetail.code
+    } else {
+        processCode.value = null
+        drawingUrl.value = null
+    }
+    getStandards()
+}
+
+
+
+
+
+getList()
+</script>
+
+<style scoped>
+:deep(.el-form-item .el-form-item__label) {
+    font-size: 14px !important;
+    padding-right: 0 !important;
+}
+
+:deep(#list-search-container .el-form-item--default .el-form-item__content) {
+    line-height: 32px;
+    font-size: 18px;
+}
+</style>

+ 249 - 0
src/views/business/standards/index.vue

@@ -0,0 +1,249 @@
+<template>
+	<div class="page-container row-container">
+		<section class="list-part-container column-container" style="flex: 1">
+			<el-form class="list-search-container" :model="queryParams" ref="queryRef" :inline="true">
+				<el-form-item class="section-title" label="图纸管理" />
+				<el-form-item label="产品类别:">
+					<el-select v-model="queryParams.type" clearable placeholder="请选择类别" style="width: 150px">
+						<el-option v-for="dict in product_type" :key="dict.value" :label="dict.label"
+							:value="dict.value"></el-option>
+					</el-select>
+				</el-form-item>
+				<el-form-item label="客户集团简称:">
+					<el-input placeholder="请输入客户集团简称" v-model.trim="queryParams.companyAlias" clearable
+						@keyup.enter="handleQueryProduct" @keydown.enter.prevent style="width: 150px" />
+				</el-form-item>
+				<el-form-item label="图号:">
+					<el-input placeholder="请输入产品图号" v-model.trim="queryParams.drawingNumber" clearable
+						@keyup.enter="handleQueryProduct" @keydown.enter.prevent style="width: 150px" />
+				</el-form-item>
+				<el-form-item label="规格:">
+					<el-input placeholder="请输入产品规格" v-model.trim="queryParams.specification" clearable
+						@keyup.enter="handleQueryProduct" @keydown.enter.prevent style="width: 150px" />
+				</el-form-item>
+				<el-form-item label="料号:">
+					<el-input placeholder="请输入产品料号" v-model.trim="queryParams.productCode" clearable
+						@keyup.enter="handleQueryProduct" @keydown.enter.prevent style="width: 150px" />
+				</el-form-item>
+				<el-form-item label="产品描述:">
+					<el-input placeholder="请输入产品描述" v-model.trim="queryParams.description" clearable
+						@keyup.enter="handleQueryProduct" @keydown.enter.prevent style="width: 150px" />
+				</el-form-item>
+				<el-form-item>
+					<el-button type="info" icon="Search" @click="handleQueryProduct">搜索</el-button>
+				</el-form-item>
+			</el-form>
+			<!-- 列表区 -->
+			<div class="el-table-container">
+				<div class="el-table-inner-container">
+					<el-table ref="productTable" v-loading="productLoading" :data="productList" row-key="id"
+						highlight-current-row height="100%">
+						<el-table-column type="index" label="行号" width="50" align="center" />
+						<el-table-column label="料号" align="center" prop="productCode" />
+						<el-table-column label="预入仓库" align="center" prop="preStock" />
+						<el-table-column label="类别" align="center" prop="type">
+							<template #default="scope">
+								<dict-tag :options="product_type" :value="scope.row.type" />
+							</template>
+						</el-table-column>
+						<el-table-column label="轴类型大类" width="150px" align="center" prop="shaftBroadCategoryCode">
+							<template #default="scope">
+								<dict-tag :options="product_dtype" :value="scope.row.shaftBroadCategoryCode" />
+							</template>
+						</el-table-column>
+						<el-table-column label="轴类型" align="center" prop="shaftCategoryCode" />
+						<el-table-column label="规格" align="center" prop="specification" />
+						<el-table-column label="图号" align="center" width="110" prop="drawingNumber" />
+						<el-table-column label="客户集团简称" align="center" width="120px" prop="companyAlias" />
+						<el-table-column label="产品描述" align="center" width="200px" prop="description" />
+						<el-table-column label="直径" align="center" prop="diameter" />
+						<el-table-column label="成品长度" align="center" prop="lenght" />
+						<el-table-column label="厚度" align="center" prop="thickness" />
+						<el-table-column label="客户代号" align="center" prop="companyCode" />
+						<el-table-column label="销售员编码" align="center" prop="salesmanCode" />
+						<el-table-column label="保管员编码" align="center" prop="stockKeeperCode" />
+						<el-table-column label="调度员编号" align="center" prop="dispatcherCode" />
+						<el-table-column label="备注" align="center" prop="remark" />
+						<el-table-column label="产品状态" align="center" prop="productStatusCode">
+							<template #default="scope">
+								<dict-tag :options="product_status_code" :value="scope.row.productStatusCode" />
+							</template>
+						</el-table-column>
+						<el-table-column label="生产类型" align="center" prop="productionTypeCode">
+							<template #default="scope">
+								<dict-tag :options="production_type_code" :value="scope.row.productionTypeCode" />
+							</template>
+						</el-table-column>
+						<el-table-column label="技术员编码" align="center" prop="technicianCode" />
+						<el-table-column fixed="right" label="工艺详情" align="center" width="140px">
+							<template #default="scope">
+								<el-button link type="primary" v-hasPermi="['business:electronicDrawings:query']"
+									@click="handleProduct(scope.row)">查看</el-button>
+							</template>
+						</el-table-column>
+					</el-table>
+				</div>
+			</div>
+			<!-- 分页 -->
+			<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
+				v-model:limit="queryParams.pageSize" @pagination="getList" />
+		</section>
+		<el-drawer v-model="openVersoinForm" size="30%" direction="rtl" :close-on-press-escape="false">
+			<div class="page-container form-container">
+				<div class="form-btns-container">
+					<span class="title-label"><el-icon>
+							<Document />
+						</el-icon>
+						电子工艺图纸</span>
+				</div>
+				<!-- 搜索区域 -->
+				<el-form class="list-search-container" :inline="true">
+					<el-form-item>
+						<el-select-v2 v-model="currentTechnological.id" clearable :options="technologicalProcessList"
+							placeholder="请选择版本" @change="handelTechnological" style="width: 220px" />
+					</el-form-item>
+				</el-form>
+			</div>
+			<div class="el-table-inner-container" style="padding-bottom: 30px;">
+				<el-table :data="technologicalprocessDetailList" v-loading="technologicalprocessDetailLoading"
+					:row-key="getRowKey" highlight-current-row height="100%">
+					<el-table-column label="工序步骤编号" width="100px" align="center" prop="processStepNumber">
+						<template #default="scope">
+
+							<div>{{ scope.row.processStepNumber }}</div>
+						</template>
+					</el-table-column>
+					<el-table-column label="工序编码" width="80px" align="center" prop="processCode" />
+					<el-table-column label="工序简称" align="center" prop="processAlias" />
+					<el-table-column label="图纸个数" align="center" width="60px" prop="drawingNum" />
+					<el-table-column label="操作" width="80px" align="center">
+						<template #default="scope">
+							<el-button link type="primary" v-hasPermi="['business:electronicDrawings:query']"
+								@click="handelDrawing(scope.row)">编辑</el-button>
+						</template>
+					</el-table-column>
+				</el-table>
+			</div>
+		</el-drawer>
+	</div>
+</template>
+
+<script setup name="Process">
+import { listProduct, getTechnological } from '@/api/business/product'
+import { listTechnologicalProcessDetail } from '@/api/business/technologicalProcessDetail'
+import router from "@/router";
+
+const { proxy } = getCurrentInstance()
+/**字典 */
+const { product_type } = proxy.useDict('product_type')
+const { product_dtype } = proxy.useDict('product_dtype')
+const { product_status_code } = proxy.useDict('product_status_code')
+const { production_type_code } = proxy.useDict('production_type_code')
+//产品
+const productList = ref([])
+const productLoading = ref(false)
+const total = ref(0)
+const openVersoinForm = ref(false)
+const currentProduct = ref({})
+const ids = ref([])
+const currentTechnological = ref({})
+//版本
+const technologicalProcessList = ref([])
+/** 工序变量 */
+const technologicalprocessDetailList = ref([])
+const technologicalprocessDetailLoading = ref(false)
+/** 查询对象 */
+const queryParams = ref({
+	pageNum: 1,
+	pageSize: 10,
+	code: '',
+	name: '',
+	combinedValue: null,
+	productCode: ''
+})
+
+const yesOrNo = [
+	{ label: '是', value: '1', elTagType: 'primary', elTagClass: '' },
+	{ label: '否', value: '0', elTagType: 'danger', elTagClass: '' },
+]
+
+/***********************  方法区  ****************************/
+/***********************  部门管理相关事件  ****************************/
+/** 查询产品列表 */
+function getList() {
+	currentTechnological.value = {}
+	currentProduct.value = {}
+	productLoading.value = true
+	listProduct(queryParams.value).then((response) => {
+		productList.value = response.rows
+		total.value = response.total
+		productLoading.value = false
+
+	})
+}
+/**产品查询 */
+function handleQueryProduct() {
+	queryParams.value.pageNum = 1
+	getList()
+}
+function handleProduct(row) {
+	technologicalprocessDetailList.value = []
+	openVersoinForm.value = true
+	currentTechnological.value = {}
+	console.log(row)
+	currentProduct.value = row
+	var technological = {}
+	technological.productId = row.id
+	getTechnological(technological).then(res => {
+		if (res.code == 200) {
+			technologicalProcessList.value = res.data
+
+			if (technologicalProcessList.value.length > 0) {
+				currentProduct.value.technologicalprocessId = technologicalProcessList.value[0].value
+				currentProduct.value.productVersion = technologicalProcessList.value[0].label
+				currentTechnological.value.id = technologicalProcessList.value[0].value
+				currentTechnological.value.productVersion = technologicalProcessList.value[0].label
+				handelDetails()
+			}
+		}
+	})
+
+}
+
+function handelTechnological() {
+	if (currentTechnological.value.id) {
+		currentProduct.value.technologicalprocessId = currentTechnological.value.id
+		currentProduct.value.productVersion =  technologicalProcessList.value.find(item => item.value === currentTechnological.value.id).label;
+		handelDetails()
+	}
+}
+
+function handelDetails() {
+	technologicalprocessDetailLoading.value = true
+	listTechnologicalProcessDetail({
+		technologicalProcessId: currentTechnological.value.id
+	}).then((res) => {
+		technologicalprocessDetailList.value = res.rows
+		technologicalprocessDetailLoading.value = false
+	})
+}
+
+function handelDrawing(row) {
+
+		currentProduct.value.processCode = row.processCode
+		router.push({
+			path: `/standards/detail/${currentProduct.value.id}/${currentProduct.value.productVersion}/${row.processCode}`
+		});
+
+	
+
+
+}
+/** 获取行 id */
+function getRowKey(row) {
+	return row.id
+}
+onMounted(() => {
+	getList()
+})
+</script>