From c85ea17d45adac17b780992e049685d72168fdda Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期日, 27 四月 2025 14:38:48 +0800
Subject: [PATCH] 工艺文件缓存
---
src/permission.js | 8
src/views/technology/routing/routing-form.vue | 85 +++---
src/router/views/index.js | 8
src/views/technology/document/document-form.vue | 491 +++++++++++++---------------------------
src/views/technology/document/index.vue | 91 ++----
src/store/modules/tags.js | 25 +
6 files changed, 261 insertions(+), 447 deletions(-)
diff --git a/src/permission.js b/src/permission.js
index 4692ede..e3b8e6f 100644
--- a/src/permission.js
+++ b/src/permission.js
@@ -21,14 +21,6 @@
} else {
const value = to.query.src || to.fullPath
const label = to.query.name || to.name
- // 妫�鏌ュ綋鍓嶈杩涘叆鐨勯〉闈㈡槸鍚﹀湪鏍囩鍒楄〃涓�
- const existingTag = store.getters.tagList.find(
- (tag) => tag.label === label
- )
- if (existingTag) {
- // 濡傛灉瀛樺湪锛屽垹闄よ鏍囩
- store.commit('DEL_TAG', existingTag)
- }
if (
meta.isTab !== false &&
!validatenull(value) &&
diff --git a/src/router/views/index.js b/src/router/views/index.js
index 9e11678..259f54a 100644
--- a/src/router/views/index.js
+++ b/src/router/views/index.js
@@ -48,7 +48,7 @@
children: [
{
path: 'routing-form',
- name: '宸ヨ壓璇︽儏',
+ name: '宸ヨ壓璺嚎璇︽儏',
component: () =>
import(/* webpackChunkName: "views" */ '@/views/technology/routing/routing-form'),
meta: {
@@ -116,12 +116,12 @@
children: [
{
path: 'document-form',
- name: 'documentForm',
+ name: '宸ヨ壓鏂囦欢璇︽儏',
component: () =>
import(/* webpackChunkName: "views" */ '@/views/technology/document/document-form'),
meta: {
- keepAlive: false,
- isTab: false,
+ keepAlive: true,
+ isTab: true,
isAuth: false
}
}
diff --git a/src/store/modules/tags.js b/src/store/modules/tags.js
index d173fa5..841b5db 100644
--- a/src/store/modules/tags.js
+++ b/src/store/modules/tags.js
@@ -1,6 +1,7 @@
import { getStore, setStore } from '@/util/store'
import { diff } from '@/util/util'
import website from '@/const/website'
+import Vue from 'vue'
const isFirstPage = website.isFirstPage
const tagWel = website.fistPage
@@ -17,7 +18,7 @@
if (list.length === 1) {
list[0].close = false
} else {
- list.forEach(ele => {
+ list.forEach((ele) => {
if (ele.value === tagWel.value && isFirstPage === false) {
ele.close = false
} else {
@@ -36,15 +37,24 @@
actions: {},
mutations: {
ADD_TAG: (state, action) => {
+ if (state.tagList.some((ele) => diff(ele, action))) return
+ Vue.prototype.$nextTick(() => {
+ const index = state.tagList.findIndex(
+ (ele) => ele.label == action.label
+ )
+ if (index > -1) {
+ state.tagList[index] = action
+ } else {
+ state.tagList.push(action)
+ }
+ })
state.tag = action
setStore({ name: 'tag', content: state.tag, type: 'session' })
- if (state.tagList.some(ele => diff(ele, action))) return
- state.tagList.push(action)
setFistTag(state.tagList)
setStore({ name: 'tagList', content: state.tagList, type: 'session' })
},
DEL_TAG: (state, action) => {
- state.tagList = state.tagList.filter(item => {
+ state.tagList = state.tagList.filter((item) => {
return !diff(item, action)
})
setFistTag(state.tagList)
@@ -55,10 +65,13 @@
setStore({ name: 'tagList', content: state.tagList, type: 'session' })
},
DEL_TAG_OTHER: (state) => {
- state.tagList = state.tagList.filter(item => {
+ state.tagList = state.tagList.filter((item) => {
if (item.value === state.tag.value) {
return true
- } else if (!website.isFirstPage && item.value === website.fistPage.value) {
+ } else if (
+ !website.isFirstPage &&
+ item.value === website.fistPage.value
+ ) {
return true
}
})
diff --git a/src/views/technology/document/document-form.vue b/src/views/technology/document/document-form.vue
index e101abb..6a8bcda 100644
--- a/src/views/technology/document/document-form.vue
+++ b/src/views/technology/document/document-form.vue
@@ -12,23 +12,13 @@
</div>
<div class="page-main">
<div class="document-basic" style="height: 28%;">
- <el-form
- :model="dataForm"
- :rules="dataRule"
- ref="dataForm"
- style="width: 100%"
- class="l-mes"
- :disabled="!editable"
- label-width="110px"
- >
+ <el-form :model="dataForm" :rules="dataRule" ref="dataForm" style="width: 100%" class="l-mes"
+ :disabled="!editable" label-width="110px">
<el-row>
<el-col :span="6">
<el-form-item prop="name" label="鏂囦欢鍚嶇О">
- <el-tooltip class="item" effect="dark" :content="dataForm.name" >
- <el-input
- v-model="dataForm.name"
- placeholder="鏂囦欢鍚嶇О"
- ></el-input>
+ <el-tooltip class="item" effect="dark" :content="dataForm.name">
+ <el-input v-model="dataForm.name" placeholder="鏂囦欢鍚嶇О"></el-input>
</el-tooltip>
</el-form-item>
</el-col>
@@ -105,145 +95,74 @@
<el-col :span="6">
<el-form-item label="浜у搧闆朵欢鍙�" prop="partNo">
<el-input disabled v-model="dataForm.partNo" placeholder="璇烽�夋嫨闆朵欢">
- <el-button
- slot="append"
- icon="el-icon-search"
- @click="openPartDialog()"
- ></el-button>
+ <el-button slot="append" icon="el-icon-search" @click="openPartDialog()"></el-button>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="浜у搧闆朵欢鎻忚堪" prop="partName">
- <el-tooltip class="item" effect="dark" :content="dataForm.partName" >
- <el-input v-model="dataForm.partName" disabled> </el-input>
+ <el-tooltip class="item" effect="dark" :content="dataForm.partName">
+ <el-input v-model="dataForm.partName" disabled> </el-input>
</el-tooltip>
</el-form-item>
</el-col>
</el-row>
<el-row>
- <el-col :span="6">
- <el-form-item prop="version" label="鐗堟湰鍙�">
- <el-input
- v-model="dataForm.version"
- placeholder="鐗堟湰鍙�"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="BOM" prop="bomId">
- <el-select
- :disabled="dataForm.id != null"
- v-model="dataForm.bomId"
- placeholder=""
- style="width: 100%;"
- filterable>
- <el-option
- v-for="item in bomList"
- :key="item.id"
- :label="item.number"
- :value="item.id"
- />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="宸ヨ壓璺嚎缂栧彿" prop="routingList">
- <el-select
- :disabled="dataForm.id != null"
- v-model="dataForm.routingId"
- placeholder=""
- style="width: 100%;"
- filterable>
- <el-option
- v-for="item in routingList"
- :key="item.id"
- :label="item.routing_no"
- :value="item.id"
- />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="椤圭洰鍙�" prop="projectNo">
- <el-input
- v-model="dataForm.projectNo"
- placeholder="椤圭洰鍙�"
- style="width:100%"
- ></el-input>
+ <el-col :span="6">
+ <el-form-item prop="version" label="鐗堟湰鍙�">
+ <el-input v-model="dataForm.version" placeholder="鐗堟湰鍙�"></el-input>
</el-form-item>
</el-col>
- <el-col :span="6">
- <el-form-item label="澶囨敞" prop="remark">
- <el-input
- type="textarea"
- v-model="dataForm.remark"
- placeholder="澶囨敞"
- style="width:100%"
- ></el-input>
- </el-form-item>
- </el-col>
+ <el-col :span="6">
+ <el-form-item label="BOM" prop="bomId">
+ <el-select :disabled="dataForm.id != null" v-model="dataForm.bomId" placeholder="" style="width: 100%;"
+ filterable>
+ <el-option v-for="item in bomList" :key="item.id" :label="item.number" :value="item.id" />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="宸ヨ壓璺嚎缂栧彿" prop="routingList">
+ <el-select :disabled="dataForm.id != null" v-model="dataForm.routingId" placeholder=""
+ style="width: 100%;" filterable>
+ <el-option v-for="item in routingList" :key="item.id" :label="item.routing_no" :value="item.id" />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="椤圭洰鍙�" prop="projectNo">
+ <el-input v-model="dataForm.projectNo" placeholder="椤圭洰鍙�" style="width:100%"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="澶囨敞" prop="remark">
+ <el-input type="textarea" v-model="dataForm.remark" placeholder="澶囨敞" style="width:100%"></el-input>
+ </el-form-item>
+ </el-col>
</el-row>
</el-form>
</div>
<div class="document-detail">
<el-tabs type="card" style="width: 100%;height: 100%">
- <el-tab-pane
- label="鍘熸潗鏂欑敤閲�"
- style="height: 100%"
- class="orimaterial-quantity"
- >
- <el-card
- shadow="never"
- style="margin-top: 12px;border: 1px solid #cfd5de;"
- >
+ <el-tab-pane label="鍘熸潗鏂欑敤閲�" style="height: 100%" class="orimaterial-quantity">
+ <el-card shadow="never" style="margin-top: 12px;border: 1px solid #cfd5de;">
<div slot="header">
<div>
- <el-button
- type="text"
- size="small"
- class="blue-but"
- v-if="editable"
- @click="calcMaterialCost()"
- >璁$畻鐢ㄩ噺
+ <el-button type="text" size="small" class="blue-but" v-if="editable" @click="calcMaterialCost()">璁$畻鐢ㄩ噺
</el-button>
- <el-button
- type="text"
- size="small"
- @click="exportMaterialCost()"
- >瀵煎嚭
+ <el-button type="text" size="small" @click="exportMaterialCost()">瀵煎嚭
</el-button>
</div>
</div>
- <el-table
- :data="materialCostList"
- border
- height="650"
- :span-method="objectSpanMethod"
- :header-cell-style="{ color: '#999' }"
- class="document-materialcost-table"
- show-summary
- :summary-method="getSummaries"
- ref="summeryTable"
- >
- <el-table-column
- label="鎴愬搧"
- prop="finishedProduct"
- align="center"
- >
+ <el-table :data="materialCostList" border height="650" :span-method="objectSpanMethod"
+ :header-cell-style="{ color: '#999' }" class="document-materialcost-table" show-summary
+ :summary-method="getSummaries" ref="summeryTable">
+ <el-table-column label="鎴愬搧" prop="finishedProduct" align="center">
</el-table-column>
- <el-table-column
- label="Bom缂栧彿"
- prop="bomNumber"
- align="center"
- >
+ <el-table-column label="Bom缂栧彿" prop="bomNumber" align="center">
</el-table-column>
- <el-table-column
- label="宸ュ簭"
- prop="operationName"
- align="center"
- >
+ <el-table-column label="宸ュ簭" prop="operationName" align="center">
</el-table-column>
<el-table-column label="鐗╂枡缂栧彿" prop="partNo" align="center">
</el-table-column>
@@ -256,104 +175,38 @@
</el-table>
</el-card>
</el-tab-pane>
- <el-tab-pane
- class="final-product-checkout"
- label="鎴愬搧妫�娴�"
- style="height: 100%"
- >
- <TeststandardDialog
- :editable="editable"
- :key="dataForm.id"
- :documentId="dataForm.id"
- >
+ <el-tab-pane class="final-product-checkout" label="鎴愬搧妫�娴�" style="height: 100%">
+ <TeststandardDialog :editable="editable" :key="dataForm.id" :documentId="dataForm.id">
</TeststandardDialog>
</el-tab-pane>
<el-tab-pane label="浜у搧缁撴瀯宸ュ簭鍙傛暟" style="height: 100%">
<div class="document-related-stock-part">
- <div
- style="padding-left:18px;font-size:14px;font-weight:700;color:#000;height:20px;line-height:20px;"
- >
+ <div style="padding-left:18px;font-size:14px;font-weight:700;color:#000;height:20px;line-height:20px;">
<span>鐩稿叧搴撳瓨闆朵欢</span>
</div>
- <el-table
- :data="relatedStockPartList"
- @row-click="clickRelatedStockPart"
- highlight-current-row
- height="188px"
- :header-cell-style="relatedStockPartTableHeaderCellStyle"
- :row-style="{ height: '0' }"
- :cell-style="{ padding: '1px' }"
- >
- <el-table-column
- label="闆朵欢缂栧彿"
- prop="partNo"
- align="center"
- :show-overflow-tooltip="true"
- >
+ <el-table :data="relatedStockPartList" @row-click="clickRelatedStockPart" highlight-current-row
+ height="188px" :header-cell-style="relatedStockPartTableHeaderCellStyle" :row-style="{ height: '0' }"
+ :cell-style="{ padding: '1px' }">
+ <el-table-column label="闆朵欢缂栧彿" prop="partNo" align="center" :show-overflow-tooltip="true">
</el-table-column>
- <el-table-column
- label="闆朵欢鎻忚堪"
- prop="partName"
- align="center"
- width="400"
- :show-overflow-tooltip="true"
- >
+ <el-table-column label="闆朵欢鎻忚堪" prop="partName" align="center" width="400" :show-overflow-tooltip="true">
</el-table-column>
- <el-table-column
- label="宸ヨ壓璺嚎缂栧彿"
- prop="routingNo"
- align="center"
- :show-overflow-tooltip="true"
- >
+ <el-table-column label="宸ヨ壓璺嚎缂栧彿" prop="routingNo" align="center" :show-overflow-tooltip="true">
</el-table-column>
- <el-table-column
- label="宸ヨ壓璺嚎鐗堟湰"
- prop="routingVersion"
- align="center"
- :show-overflow-tooltip="true"
- >
+ <el-table-column label="宸ヨ壓璺嚎鐗堟湰" prop="routingVersion" align="center" :show-overflow-tooltip="true">
</el-table-column>
- <el-table-column
- label="宸ヨ壓鏇夸唬鍙�"
- prop="routingAlternativeNo"
- align="center"
- :show-overflow-tooltip="true"
- >
+ <el-table-column label="宸ヨ壓鏇夸唬鍙�" prop="routingAlternativeNo" align="center" :show-overflow-tooltip="true">
</el-table-column>
- <el-table-column
- label="宸ヨ壓鏇夸唬鎻忚堪"
- prop="routingAlternativeDesc"
- align="center"
- :show-overflow-tooltip="true"
- >
+ <el-table-column label="宸ヨ壓鏇夸唬鎻忚堪" prop="routingAlternativeDesc" align="center"
+ :show-overflow-tooltip="true">
</el-table-column>
- <el-table-column
- label="BOM鍙�"
- prop="bomNo"
- align="center"
- :show-overflow-tooltip="true"
- >
+ <el-table-column label="BOM鍙�" prop="bomNo" align="center" :show-overflow-tooltip="true">
</el-table-column>
- <el-table-column
- label="BOM鐗堟湰"
- prop="bomVersion"
- align="center"
- :show-overflow-tooltip="true"
- >
+ <el-table-column label="BOM鐗堟湰" prop="bomVersion" align="center" :show-overflow-tooltip="true">
</el-table-column>
- <el-table-column
- label="BOM鏇夸唬鍙�"
- prop="bomAlternativeNo"
- align="center"
- :show-overflow-tooltip="true"
- >
+ <el-table-column label="BOM鏇夸唬鍙�" prop="bomAlternativeNo" align="center" :show-overflow-tooltip="true">
</el-table-column>
- <el-table-column
- label="BOM鏇夸唬鎻忚堪"
- prop="bomAlternativeDesc"
- align="center"
- :show-overflow-tooltip="true"
- >
+ <el-table-column label="BOM鏇夸唬鎻忚堪" prop="bomAlternativeDesc" align="center" :show-overflow-tooltip="true">
</el-table-column>
</el-table>
</div>
@@ -390,30 +243,14 @@
</el-button>
</el-tooltip>
</div> -->
- <el-collapse
- v-model="currTechnologyBomPartName"
- accordion
- @change="handleCompleteproductstructureChange"
- >
- <el-collapse-item
- v-for="(item, i) in completeproductstructureData"
- :key="i"
- :name="item.bomRoutingId"
- >
+ <el-collapse v-model="currTechnologyBomPartName" accordion @change="handleCompleteproductstructureChange">
+ <el-collapse-item v-for="(item, i) in completeproductstructureData" :key="i" :name="item.bomRoutingId">
<template slot="title">
- <el-checkbox
- class="completeproductstructure-checkout"
- v-model="item.expand"
- disabled
- >
- <span style="font-weight:bold">宸ヨ壓璺嚎缂栧彿锛�</span
- >{{ item.routingNo }}
- <span style="font-weight:bold">闆朵欢鍙凤細</span
- >{{ item.partNo }}
- <span style="font-weight:bold">闆朵欢鍚嶇О锛�</span
- >{{ item.partName }}
- <span style="font-weight:bold">Bom缂栧彿锛�</span
- >{{ item.number == null ? '鏃�' : item.number }}
+ <el-checkbox class="completeproductstructure-checkout" v-model="item.expand" disabled>
+ <span style="font-weight:bold">宸ヨ壓璺嚎缂栧彿锛�</span>{{ item.routingNo }}
+ <span style="font-weight:bold">闆朵欢鍙凤細</span>{{ item.partNo }}
+ <span style="font-weight:bold">闆朵欢鍚嶇О锛�</span>{{ item.partName }}
+ <span style="font-weight:bold">Bom缂栧彿锛�</span>{{ item.number == null ? '鏃�' : item.number }}
</el-checkbox>
</template>
<div style="display:flex;">
@@ -430,13 +267,12 @@
</div> -->
<div
style="font-size:13px;font-weight:bold;cursor: pointer;margin-left: 10px;border-radius:2px 2px 0px 0px;width:80px;text-align:center;"
- :class="['highlight-tab-class']"
- >
+ :class="['highlight-tab-class']">
宸ュ簭鍙傛暟
</div>
</div>
- <!-- <div class="document-bom-div" v-show="item.showBom">
+ <!-- <div class="document-bom-div" v-show="item.showBom">
<el-tooltip
class="item"
effect="dark"
@@ -476,57 +312,30 @@
</div> -->
<div class="document-technology-div" v-show="item.showBom">
- <div
- style="border: 1px solid #ebeef5;height: 440px;overflow: auto;"
- >
- <el-collapse
- v-model="currTechnologyOperationName"
- accordion
- @change="
- handleTechnologyOperationChange(
- $event,
- item.bomRoutingId
- )
- "
- >
- <el-collapse-item
- v-for="(ele, j) in item.technologyOperationData"
- :key="j"
- :name="ele.id"
- >
- <template slot="title"
- ><span style="font-weight:300"
- > 宸ュ簭鍚嶇О锛�</span
- >{{ ele.operationName }}
- <span style="font-weight:300">宸ュ簭缂栧彿锛�</span
- >{{ ele.operationNo }}
+ <div style="border: 1px solid #ebeef5;height: 440px;overflow: auto;">
+ <el-collapse v-model="currTechnologyOperationName" accordion @change="
+ handleTechnologyOperationChange(
+ $event,
+ item.bomRoutingId
+ )
+ ">
+ <el-collapse-item v-for="(ele, j) in item.technologyOperationData" :key="j" :name="ele.id">
+ <template slot="title"><span style="font-weight:300"> 宸ュ簭鍚嶇О锛�</span>{{
+ ele.operationName }}
+ <span style="font-weight:300">宸ュ簭缂栧彿锛�</span>{{ ele.operationNo }}
</template>
<el-tabs v-model="activeTemplateName" type="card">
- <el-tab-pane
- v-for="(paramTab, index) in paramTabs"
- :key="index"
- :label="paramTab.label"
- :name="paramTab.name"
- >
+ <el-tab-pane v-for="(paramTab, index) in paramTabs" :key="index" :label="paramTab.label"
+ :name="paramTab.name">
<el-table :data="paramTab.params">
- <el-table-column
- prop="parameterItem"
- label="鍚嶇О"
- align="center"
- >
+ <el-table-column prop="parameterItem" label="鍚嶇О" align="center">
<template slot-scope="scope">
- <span
- >{{ scope.row.parameterItem }}({{
- scope.row.unit
- }})</span
- >
+ <span>{{ scope.row.parameterItem }}({{
+ scope.row.unit
+ }})</span>
</template>
</el-table-column>
- <el-table-column
- prop="paramValue"
- label="鍊�"
- align="center"
- ></el-table-column>
+ <el-table-column prop="paramValue" label="鍊�" align="center"></el-table-column>
</el-table>
</el-tab-pane>
<!-- <el-tab-pane label="澶囨敞" style="height: 100%">
@@ -741,33 +550,18 @@
</el-tabs>
</div>
</div>
- <completeproductstructureDialog
- :currshowlist.sync="showCompleteproductstructure"
- :queryParam="bomQueryParam"
- @listenToCompleteproductstructureEvent="selectCompleteproductstructure"
- />
- <routingDialog
- :currshowlist.sync="showTechnology"
- :queryParam="queryParam"
- @listenToRoutingEvent="selectTechnology"
- />
- <qualityStandardDialog
- :currshowlist.sync="showQualityStandard"
- @listenToSelectTestStandardEvent="selectQualityStandard"
- />
+ <completeproductstructureDialog :currshowlist.sync="showCompleteproductstructure" :queryParam="bomQueryParam"
+ @listenToCompleteproductstructureEvent="selectCompleteproductstructure" />
+ <routingDialog :currshowlist.sync="showTechnology" :queryParam="queryParam"
+ @listenToRoutingEvent="selectTechnology" />
+ <qualityStandardDialog :currshowlist.sync="showQualityStandard"
+ @listenToSelectTestStandardEvent="selectQualityStandard" />
<partDialog :currshowlist.sync="showPart" @listenToPartEvent="selectPart" />
- <spotCheckRule
- :currshowlist.sync="spotCheckRuleShow"
- :docBomId="currDocBomId"
- :routingOperationId="currRoutingOperationId"
- :routingOperationName="currRoutingOperationName"
- @refreshSpotCheckRuleList="refreshSpotCheckRuleList"
- />
- <spotCheckRuleEdit
- :currshowlist.sync="editSpotCheckRuleShow"
- :documentSamplingRuleId="currDocumentSamplingRuleId"
- @refreshSpotCheckRuleList="refreshSpotCheckRuleList"
- />
+ <spotCheckRule :currshowlist.sync="spotCheckRuleShow" :docBomId="currDocBomId"
+ :routingOperationId="currRoutingOperationId" :routingOperationName="currRoutingOperationName"
+ @refreshSpotCheckRuleList="refreshSpotCheckRuleList" />
+ <spotCheckRuleEdit :currshowlist.sync="editSpotCheckRuleShow" :documentSamplingRuleId="currDocumentSamplingRuleId"
+ @refreshSpotCheckRuleList="refreshSpotCheckRuleList" />
</div>
</template>
@@ -926,7 +720,7 @@
spotCheckRuleEdit
},
computed: {
- editable: function() {
+ editable: function () {
if (!this.dataForm.id) {
return true
}
@@ -937,7 +731,7 @@
}
},
- created() {
+ activated() {
this.dataForm.id = this.$route.query.id
this.init()
this.getDict()
@@ -962,9 +756,9 @@
},
watch: {
'dataForm.partId'(newValue, oldValue) {
- if (oldValue) {
- this.dataForm.bomId = null
- }
+ // if (oldValue) {
+ // this.dataForm.bomId = null
+ // }
if (newValue) {
getBomList(
Object.assign({
@@ -994,6 +788,52 @@
} else {
this.routingList = []
}
+ },
+ '$route.query.id': {
+ immediate: true,
+ handler(newVal, oldVal) {
+ if (this.$route.name == '宸ヨ壓鏂囦欢璇︽儏') {
+ if (newVal) {
+ this.dataForm.id = this.$route.query.id
+ this.init()
+ this.getDict()
+ this.getBomTypeDbOptions()
+ this.initReportTypeSelect()
+ } else {
+ this.dataForm.id = null
+ this.init()
+ this.getDict()
+ this.getBomTypeDbOptions()
+ this.initReportTypeSelect()
+ this.dataForm = {
+ id: null,
+ bomId: null,
+ routingId: null,
+ number: null,
+ name: null,
+ version: null,
+ projectNo: null,
+ projectType: null,
+ country: null,
+ state: null,
+ remark: null,
+ partNo: null,
+ partId: null,
+ partName: null,
+ docType: 'M',
+ insulationColor: null,
+ sheathColor: null,
+ testStandard: false,
+ updateRealUser: null,
+ updateRealTime: null
+ }
+ this.materialCostList = []
+ this.relatedStockPartList = []
+ this.currTechnologyBomPartName = null;
+ this.completeproductstructureData = []
+ }
+ }
+ },
},
},
methods: {
@@ -1051,15 +891,15 @@
}
// flowTemp.loadData(jsondata)
// 淇濆瓨鎸夐挳浜嬩欢
- _this.flowTemp.onBtnSaveClick = function() {
+ _this.flowTemp.onBtnSaveClick = function () {
_this.saveFlow()
}
// 閲嶇疆鎸夐挳浜嬩欢
- _this.flowTemp.onFreshClick = function() {
+ _this.flowTemp.onFreshClick = function () {
_this.getFlow()
}
// 鎵撳嵃鎸夐挳浜嬩欢
- _this.flowTemp.onPrintClick = function() {
+ _this.flowTemp.onPrintClick = function () {
_this.flowTemp.exportDiagram('娴佺▼鍥�')
}
},
@@ -1960,8 +1800,7 @@
},
handleFlowExceed(files, fileList) {
this.$message.warning(
- `褰撳墠闄愬埗閫夋嫨 1 涓祦绋嬪浘鏂囦欢锛屾湰娆¢�夋嫨浜� ${
- files.length
+ `褰撳墠闄愬埗閫夋嫨 1 涓祦绋嬪浘鏂囦欢锛屾湰娆¢�夋嫨浜� ${files.length
} 涓祦绋嬪浘鏂囦欢锛屽叡閫夋嫨浜� ${files.length + fileList.length} 涓祦绋嬪浘鏂囦欢`
)
},
@@ -2150,30 +1989,22 @@
}
/*鑷畾涔塪isabled鐘舵�佷笅checkbox鐨勬牱寮�*/
-.completeproductstructure-checkout
- .el-checkbox__input.is-disabled.is-checked
- .el-checkbox__inner {
+.completeproductstructure-checkout .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
background-color: #006eff;
border-color: #006eff;
}
-.completeproductstructure-checkout
- .el-checkbox__input.is-disabled.is-checked
- + span.el-checkbox__label {
+.completeproductstructure-checkout .el-checkbox__input.is-disabled.is-checked+span.el-checkbox__label {
color: #006eff;
border-color: #006eff;
}
-.completeproductstructure-checkout
- .el-checkbox__input.is-disabled
- .el-checkbox__inner {
+.completeproductstructure-checkout .el-checkbox__input.is-disabled .el-checkbox__inner {
background-color: #ffffff;
cursor: pointer;
}
-.completeproductstructure-checkout
- .el-checkbox__input.is-disabled
- + span.el-checkbox__label {
+.completeproductstructure-checkout .el-checkbox__input.is-disabled+span.el-checkbox__label {
color: #606266;
cursor: pointer;
}
@@ -2242,11 +2073,13 @@
.GooFlow .ico .ico_start:before {
color: red;
}
+
.highlight-tab-class {
color: #006eff;
background: #e4e7ed;
border-top: 1px solid #006eff;
}
+
.unhighlight-tab-class {
border: 1px solid #e4e7ed;
border-bottom: none;
diff --git a/src/views/technology/document/index.vue b/src/views/technology/document/index.vue
index 0f9485e..1a436cd 100644
--- a/src/views/technology/document/index.vue
+++ b/src/views/technology/document/index.vue
@@ -1,15 +1,8 @@
<template>
<div class="mod-config">
<basic-container>
- <ttable
- :table="table"
- @handleSelectionChange="handleSelectionChange"
- @tableRowClassName="tableRowClassName"
- :prelang="prelang"
- :options="options"
- :ajaxFun="ajaxFun"
- ref="documentTable"
- >
+ <ttable :table="table" @handleSelectionChange="handleSelectionChange" @tableRowClassName="tableRowClassName"
+ :prelang="prelang" :options="options" :ajaxFun="ajaxFun" ref="documentTable">
<template #toolbar>
<!-- <el-button
type="primary"
@@ -19,38 +12,18 @@
> -->
</template>
</ttable>
- <el-dialog
- title="瀵煎叆"
- :visible.sync="importTestStandardVisible"
- width="50%"
- >
+ <el-dialog title="瀵煎叆" :visible.sync="importTestStandardVisible" width="50%">
<div>
- <el-upload
- style="margin-left:8px;display: inline;"
- class="upload-demo"
- drag
- :headers="headers"
- :action="testStandardUploadInfo.url"
- :beforeUpload="beforeAvatarUpload"
- :limit="1"
- :show-file-list="false"
- :file-list="testStandardFileList"
- :on-success="testStandardFileSuccessUploadScan"
- :on-error="handleError"
+ <el-upload style="margin-left:8px;display: inline;" class="upload-demo" drag :headers="headers"
+ :action="testStandardUploadInfo.url" :beforeUpload="beforeAvatarUpload" :limit="1" :show-file-list="false"
+ :file-list="testStandardFileList" :on-success="testStandardFileSuccessUploadScan" :on-error="handleError"
accept=".xlsx,.xls,.csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
- :auto-upload="true"
- ref="testStandardUploadScan"
- multiple
- >
+ :auto-upload="true" ref="testStandardUploadScan" multiple>
<i class="el-icon-upload"></i>
<div class="el-upload__text"><em>瀵煎叆鏁版嵁</em></div>
<div class="el-upload__tip" slot="tip">
- 鍙兘涓婁紶xlsx/xls鏂囦欢锛屼笖涓嶈秴杩�10M<el-button
- type="text"
- style="font-size:12px;"
- @click="downTestStandardDataTemplate"
- >涓嬭浇妯℃澘</el-button
- >
+ 鍙兘涓婁紶xlsx/xls鏂囦欢锛屼笖涓嶈秴杩�10M<el-button type="text" style="font-size:12px;"
+ @click="downTestStandardDataTemplate">涓嬭浇妯℃澘</el-button>
</div>
</el-upload>
</div>
@@ -384,37 +357,37 @@
activated() {
this.getData()
},
- created() {
- if(this.permissions.technology_document_add){
+ created() {
+ if (this.permissions.technology_document_add) {
this.table.toolbar.push({
text: '鏂板',
type: 'primary',
disabled: false,
- fun: ()=>{this.addOrUpdateHandle()},
+ fun: () => { this.addOrUpdateHandle() },
permitArr: [],
})
}
- if(this.permissions.technology_document_accept){
+ if (this.permissions.technology_document_accept) {
this.table.toolbar.push({
text: '鎵瑰噯',
disabled: true,
- fun: ()=>{this.changeState('accept')},
+ fun: () => { this.changeState('accept') },
permitArr: ['01draft', '03accepted', '04reject'],
})
}
- if(this.permissions.technology_document_reject){
+ if (this.permissions.technology_document_reject) {
this.table.toolbar.push({
text: '鎷掔粷',
disabled: true,
- fun: () => {this.changeState('reject')},
+ fun: () => { this.changeState('reject') },
permitArr: ['01draft', '03accepted', '04reject'],
})
}
- if(this.permissions.technology_document_cancel){
+ if (this.permissions.technology_document_cancel) {
this.table.toolbar.push({
text: '鎾ら攢',
disabled: true,
- fun: ()=>{this.changeState('cancel')},
+ fun: () => { this.changeState('cancel') },
permitArr: ['01draft', '03accepted', '04reject'],
})
}
@@ -423,10 +396,10 @@
text: '鎵归噺鍒犻櫎',
type: 'primary',
disabled: false,
- fun: ()=>{this.deleteBatch()},
+ fun: () => { this.deleteBatch() },
permitArr: [],
})
- }
+ }
if (this.permissions.technology_document_del) {
this.table.operator = [{
text: '鍒犻櫎',
@@ -438,14 +411,14 @@
key: 'state'
}
}]
- }
+ }
this.getBomTypeDbOptions()
},
- watch:{
- multipleSelection(newVal){
- if(newVal.length==0){
- this.table.toolbar.forEach(ele=>{
- if(ele.text=='鎷掔粷' || ele.text=='鎵瑰噯' || ele.text=='鎾ら攢'){
+ watch: {
+ multipleSelection(newVal) {
+ if (newVal.length == 0) {
+ this.table.toolbar.forEach(ele => {
+ if (ele.text == '鎷掔粷' || ele.text == '鎵瑰噯' || ele.text == '鎾ら攢') {
ele.disabled = true
}
})
@@ -478,7 +451,7 @@
that.multipleSelection.forEach((item) => {
ids.push(item.id)
})
- changeState(ids, event).then(function() {
+ changeState(ids, event).then(function () {
that.getData()
})
} else {
@@ -492,12 +465,12 @@
},
// 鏂板 / 淇敼
addOrUpdateHandle(row) {
- if(!this.permissions.technology_document_edit && row.id!=null){
+ if (!this.permissions.technology_document_edit && row.id != null) {
this.$message.error("璇ヨ鑹叉病鏈夋搷浣滄潈闄�")
return
}
this.$router.push({
- name: 'documentForm',
+ path: '/technology/document/document-form',
query: { id: row == null ? null : row.id }
})
},
@@ -509,7 +482,7 @@
closeOnClickModal: false,
type: 'warning'
})
- .then(function() {
+ .then(function () {
return delObj(row.id)
})
.then((response) => {
@@ -548,7 +521,7 @@
handleSelectionChange(val) {
// 鏍规嵁鐘舵�侊紝绂佺敤琛ㄥご鎸夐挳
// 绛涢�夊嚭閫変腑璁板綍鐨勭姸鎬�
- var stateArr = val.map(function(value, index) {
+ var stateArr = val.map(function (value, index) {
return value.state
})
// 閫変腑鐘舵�佹暟缁勫厓绱犲幓閲�
@@ -582,7 +555,7 @@
var selectVals = []
if (val != null) {
selectVals.push(val)
- var stateArr = selectVals.map(function(value, index) {
+ var stateArr = selectVals.map(function (value, index) {
return value.state
})
// 閫変腑鐘舵�佹暟缁勫厓绱犲幓閲�
diff --git a/src/views/technology/routing/routing-form.vue b/src/views/technology/routing/routing-form.vue
index b8b272c..b2f7ee1 100644
--- a/src/views/technology/routing/routing-form.vue
+++ b/src/views/technology/routing/routing-form.vue
@@ -1,5 +1,5 @@
<template>
- <div style="height: 100%">
+ <div style="height: 100%" :key="itemKey">
<div class="page-header">
<div class="header-left">
<a @click="$router.go(-1)"><i class="icon-btn-back"></i></a>
@@ -584,47 +584,49 @@
'$route.query.id': {
immediate: true,
handler(newVal, oldVal) {
- if (newVal) {
- this.dataForm.id = this.$route.query.id
- this.getParamType()
- this.init()
- this.itemKey = Math.random()
- this.getBomTypeDbOptions()
- this.getWorkCenterOptions()
- this.getRunTimeCodeDbOptions()
- this.getLaborClassNo()
- } else {
- this.dataForm.id = null
- this.getParamType()
- this.init()
- this.dataForm = {
- id: null,
- routingNo: null,
- name: null,
- partId: null,
- partNo: null,
- partName: null,
- description: null,
- state: null,
- master: false,
- bomId: null,
- operations: [],
- refs: [],
- bomTypeDb: 'M',
- alternativeNo: '*',
- alternativeDesc: null,
- ifsSync: false,
- phaseInDate: null,
- phaseOutDate: null,
- version: null,
- wireCore: null
+ if (this.$route.name == '宸ヨ壓璺嚎璇︽儏') {
+ if (newVal) {
+ this.dataForm.id = this.$route.query.id
+ this.getParamType()
+ this.init()
+ this.itemKey = Math.random()
+ this.getBomTypeDbOptions()
+ this.getWorkCenterOptions()
+ this.getRunTimeCodeDbOptions()
+ this.getLaborClassNo()
+ } else {
+ this.dataForm.id = null
+ this.getParamType()
+ this.init()
+ this.dataForm = {
+ id: null,
+ routingNo: null,
+ name: null,
+ partId: null,
+ partNo: null,
+ partName: null,
+ description: null,
+ state: null,
+ master: false,
+ bomId: null,
+ operations: [],
+ refs: [],
+ bomTypeDb: 'M',
+ alternativeNo: '*',
+ alternativeDesc: null,
+ ifsSync: false,
+ phaseInDate: null,
+ phaseOutDate: null,
+ version: null,
+ wireCore: null
+ }
+ this.operationPart = {}
+ this.itemKey = Math.random()
+ this.getBomTypeDbOptions()
+ this.getWorkCenterOptions()
+ this.getRunTimeCodeDbOptions()
+ this.getLaborClassNo()
}
- this.operationPart = {}
- this.itemKey = Math.random()
- this.getBomTypeDbOptions()
- this.getWorkCenterOptions()
- this.getRunTimeCodeDbOptions()
- this.getLaborClassNo()
}
},
},
@@ -649,6 +651,7 @@
this.getWorkCenterOptions()
this.getRunTimeCodeDbOptions()
this.getLaborClassNo()
+ console.log(4444)
},
methods: {
// 鏌ヨ缁撴瀯绫诲瀷瀛楀吀
--
Gitblit v1.9.3