|
@@ -4,30 +4,30 @@
|
|
|
<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-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" />
|
|
|
+ @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"/>
|
|
|
+ @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"/>
|
|
|
+ @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"/>
|
|
|
+ @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"/>
|
|
|
+ @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>
|
|
@@ -36,8 +36,8 @@
|
|
|
<!-- 列表区 -->
|
|
|
<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 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" />
|
|
@@ -101,8 +101,8 @@
|
|
|
<el-form-item>
|
|
|
<el-select-v2 v-model="currentTechnological.id" clearable :options="technologicalProcessList"
|
|
|
placeholder="请选择版本" @change="handelTechnological" style="width: 220px" />
|
|
|
- <el-button :disabled="!currentTechnological.id" type="primary" icon="Search" v-hasPermi="['business:electronicDrawings:query']"
|
|
|
- style="margin-left: 10px;" @click="handelDrawing">查看全部
|
|
|
+ <el-button :disabled="!currentTechnological.id" type="primary" icon="Search"
|
|
|
+ v-hasPermi="['business:electronicDrawings:query']" style="margin-left: 10px;" @click="handelDrawing">查看全部
|
|
|
</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
@@ -110,15 +110,15 @@
|
|
|
<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">
|
|
|
+ <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="工序编码" 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="图纸个数" 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']"
|
|
@@ -134,6 +134,7 @@
|
|
|
<script setup name="Process">
|
|
|
import { listProduct, getTechnological } from '@/api/business/product'
|
|
|
import { listTechnologicalProcessDetail } from '@/api/business/technologicalProcessDetail'
|
|
|
+import queryStore from "@/store/modules/query";
|
|
|
import router from "@/router";
|
|
|
|
|
|
const { proxy } = getCurrentInstance()
|
|
@@ -187,6 +188,8 @@ function getList() {
|
|
|
/**产品查询 */
|
|
|
function handleQueryProduct() {
|
|
|
queryParams.value.pageNum = 1
|
|
|
+ const listQueryParams = JSON.parse(JSON.stringify(queryParams.value));
|
|
|
+ queryStore().setElectronicDrawingParams(listQueryParams);
|
|
|
getList()
|
|
|
}
|
|
|
function handleProduct(row) {
|
|
@@ -197,11 +200,12 @@ function handleProduct(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){
|
|
|
+
|
|
|
+ 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
|
|
@@ -216,7 +220,7 @@ function handleProduct(row) {
|
|
|
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;
|
|
|
+ currentProduct.value.productVersion = technologicalProcessList.value.find(item => item.value === currentTechnological.value.id).label;
|
|
|
handelDetails()
|
|
|
}
|
|
|
}
|
|
@@ -224,7 +228,7 @@ function handelTechnological() {
|
|
|
function handelDetails() {
|
|
|
technologicalprocessDetailLoading.value = true
|
|
|
listTechnologicalProcessDetail({
|
|
|
- isHistory:0,
|
|
|
+ isHistory: 0,
|
|
|
technologicalProcessId: currentTechnological.value.id
|
|
|
}).then((res) => {
|
|
|
technologicalprocessDetailList.value = res.rows
|
|
@@ -233,17 +237,19 @@ function handelDetails() {
|
|
|
}
|
|
|
|
|
|
function handelDrawing(row) {
|
|
|
- console.log(currentProduct.value,1123)
|
|
|
- if(row){
|
|
|
+ console.log(currentProduct.value, 1123)
|
|
|
+ if (row) {
|
|
|
currentProduct.value.processCode = row.processCode
|
|
|
router.push({
|
|
|
- path: `/drawing/drawingDetail/${currentProduct.value.id}/${currentProduct.value.productVersion}/${row.processCode}`});
|
|
|
+ path: `/drawing/drawingDetail/${currentProduct.value.id}/${currentProduct.value.productVersion}/${row.processCode}`
|
|
|
+ });
|
|
|
|
|
|
- }else{
|
|
|
- console.log(currentProduct.value,1123)
|
|
|
- currentProduct.value.processCode =null
|
|
|
+ } else {
|
|
|
+ console.log(currentProduct.value, 1123)
|
|
|
+ currentProduct.value.processCode = null
|
|
|
router.push({
|
|
|
- path: `/drawing/drawingDetail/${currentProduct.value.id}/${currentProduct.value.productVersion}`});
|
|
|
+ path: `/drawing/drawingDetail/${currentProduct.value.id}/${currentProduct.value.productVersion}`
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
|
|
@@ -258,6 +264,10 @@ function getRowKey(row) {
|
|
|
return row.id
|
|
|
}
|
|
|
onMounted(() => {
|
|
|
+ const listQueryParams = queryStore().electronicDrawingParams;
|
|
|
+ if (listQueryParams != null) {
|
|
|
+ queryParams.value = listQueryParams;
|
|
|
+ }
|
|
|
getList()
|
|
|
})
|
|
|
</script>
|