From 7cafed0404a6fa12ef56d85d08da7bf5115ba7e5 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 24 二月 2025 09:44:16 +0800
Subject: [PATCH] 电缆配置、辅助线芯配置页面搬迁
---
src/views/business/materialOrder/customsInspection.vue | 1
src/views/business/productOrder/components/add.vue | 38 ----
src/views/business/productOrder/components/cable-config.vue | 216 ++++++--------------------
src/views/business/productOrder/components/auxiliaryWireCore.vue | 154 +++++-------------
src/views/business/materialOrder/index.vue | 12 +
5 files changed, 110 insertions(+), 311 deletions(-)
diff --git a/src/views/business/materialOrder/customsInspection.vue b/src/views/business/materialOrder/customsInspection.vue
index 0135441..0f6f2c4 100644
--- a/src/views/business/materialOrder/customsInspection.vue
+++ b/src/views/business/materialOrder/customsInspection.vue
@@ -756,7 +756,6 @@
this.$set(this.addObj, 'buyUnitMeas', this.customsInspection.buyUnitMeas)
this.$set(this.addObj, 'updateBatchNo', this.customsInspection.updateBatchNo)
this.$set(this.addObj, 'partDetail', this.customsInspection.partDesc)
- console.log('this.orderType----', this.orderType)
if (this.orderType == 1) {
this.$set(this.addObj, 'orderType', 'Quarterly inspection')
}
diff --git a/src/views/business/materialOrder/index.vue b/src/views/business/materialOrder/index.vue
index 45fa7dc..4a20344 100644
--- a/src/views/business/materialOrder/index.vue
+++ b/src/views/business/materialOrder/index.vue
@@ -2,19 +2,23 @@
<div class="app-container">
<div>
<div class="search">
- <el-form :model="entity" ref="entity" size="small" :inline="true"><el-form-item label="鎵瑰彿" prop="updateBatchNo">
+ <el-form :model="entity" ref="entity" size="small" :inline="true">
+ <el-form-item label="鎵瑰彿" prop="updateBatchNo">
<el-input v-model="entity.updateBatchNo" clearable placeholder="璇疯緭鍏�" size="small"
@keyup.enter.native="refreshTable">
</el-input>
- </el-form-item><el-form-item label="濮旀墭缂栧彿" prop="entrustCode">
+ </el-form-item>
+ <el-form-item label="濮旀墭缂栧彿" prop="entrustCode">
<el-input v-model="entity.entrustCode" clearable placeholder="璇疯緭鍏�" size="small"
@keyup.enter.native="refreshTable">
</el-input>
- </el-form-item><el-form-item label="闆朵欢鍙�" prop="partNo">
+ </el-form-item>
+ <el-form-item label="闆朵欢鍙�" prop="partNo">
<el-input v-model="entity.partNo" clearable placeholder="璇疯緭鍏�" size="small"
@keyup.enter.native="refreshTable">
</el-input>
- </el-form-item><el-form-item label="闆朵欢鎻忚堪" prop="partDesc">
+ </el-form-item>
+ <el-form-item label="闆朵欢鎻忚堪" prop="partDesc">
<el-input v-model="entity.partDesc" clearable placeholder="璇疯緭鍏�" size="small"
@keyup.enter.native="refreshTable">
</el-input>
diff --git a/src/views/business/productOrder/components/add.vue b/src/views/business/productOrder/components/add.vue
index 62c5d87..1b32e91 100644
--- a/src/views/business/productOrder/components/add.vue
+++ b/src/views/business/productOrder/components/add.vue
@@ -2151,43 +2151,7 @@
</script>
<style scoped>
-.ins_order_add .el-input-group__append,
-.el-input-group__prepend {
- padding: 0 10px;
-}
-
-.ins_order_add .el-tree-node__content {
- height: 32px;
- font-size: 14px;
- border-radius: 2px;
-}
-
-.ins_order_add .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
+.el-table .warning-row .cell {
color: #3A7BFA;
-}
-
-.ins_order_add .has-gutter .el-table__cell .cell {
- line-height: 30px;
- background-color: #fafafa;
-}
-
-.ins_order_add .has-gutter .el-table__cell {
- background-color: #fafafa !important;
-}
-
-.ins_order_add .el-table__row .cell {
- font-size: 12px;
-}
-
-.ins_order_add .el-table .warning-row .cell {
- color: #3A7BFA;
-}
-
-.ins_order_add .el-select .is-disabled {
- background: transparent !important;
-}
-
-.ins_order_add .el-select .is-disabled .el-input__inner {
- background: transparent !important;
}
</style>
diff --git a/src/views/business/productOrder/components/auxiliaryWireCore.vue b/src/views/business/productOrder/components/auxiliaryWireCore.vue
index f49c70c..926ee8c 100644
--- a/src/views/business/productOrder/components/auxiliaryWireCore.vue
+++ b/src/views/business/productOrder/components/auxiliaryWireCore.vue
@@ -1,60 +1,42 @@
<template>
<div class="ins_order_config">
- <div>
- <el-row class="title">
- <el-col :span="6" style="padding-left: 20px;text-align: left;">杈呭姪绾胯姱閰嶇疆</el-col>
- <el-col :span="18" style="text-align: right;">
- <el-button size="medium" @click="outConfig">
- <span style="color: #3A7BFA;">杩� 鍥�</span>
- </el-button>
- <el-button size="medium" type="primary" @click="save">淇� 瀛�</el-button>
- </el-col>
- </el-row>
- </div>
- <div class="search">
- <el-radio-group v-model="currentTab" size="small" style="margin-left: 20px;" @input="changeTab">
- <el-radio-button label="缁濈紭">缁� 缂�</el-radio-button>
- <!-- <el-radio-button label="鎶ゅ">鎶� 濂�</el-radio-button>-->
- </el-radio-group>
- <div v-if="currentTab=='缁濈紭'" class="search_thing">
- <div class="search_label">鑺暟锛�</div>
- <el-select v-model="auxiliaryWireCore.num" allow-create
- clearable
- default-first-option
- filterable
- multiple
- size="small">
- <el-option v-for="item in quantityList" :key="item.value" :label="item.label" :value="item.value"></el-option>
- </el-select>
+ <div class="search_form">
+ <div class="search_input">
+ <el-radio-group v-model="currentTab" size="small" style="margin-right: 20px;" @input="changeTab">
+ <el-radio-button label="缁濈紭">缁� 缂�</el-radio-button>
+ </el-radio-group>
+ <el-form :model="auxiliaryWireCore" ref="entity" size="small" :inline="true">
+ <el-form-item label="鑺暟" prop="num">
+ <el-select v-model="auxiliaryWireCore.num" allow-create
+ clearable
+ default-first-option
+ filterable
+ multiple
+ size="small">
+ <el-option v-for="item in quantityList" :key="item.value" :label="item.label" :value="item.value"></el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="妫�楠屾爣鍑�" prop="standardMethodListId">
+ <el-select v-model="auxiliaryWireCore.standardMethodListId" allow-create
+ clearable
+ default-first-option
+ filterable
+ multiple
+ size="small">
+ <el-option v-for="item in quantityList" :key="item.value" :label="item.label" :value="item.value"></el-option>
+ </el-select>
+ </el-form-item>
+ </el-form>
</div>
-<!-- <div v-if="currentTab=='缁濈紭'" class="search_thing">-->
-<!-- <div class="search_label">鍨嬪彿鍙傛暟锛�</div>-->
-<!-- <el-input v-model="auxiliaryWireCore.modelNum" clearable size="small"-->
-<!-- @input="methodChange(auxiliaryWireCore.standardMethodListId)"></el-input>-->
-<!-- </div>-->
- <div v-if="currentTab=='缁濈紭'" class="search_thing">
- <div class="search_label">妫�楠屾爣鍑嗭細</div>
- <el-select v-model="auxiliaryWireCore.standardMethodListId" disabled placeholder="璇烽�夋嫨妫�楠屾爣鍑�"
- size="small"
- @change="(value)=>methodChange(value)">
- <el-option v-for="item in standards" :key="item.id" :label="item.code" :value="item.id">
- </el-option>
- </el-select>
+ <div>
+ <el-button size="small" @click="outConfig">杩� 鍥�</el-button>
+ <el-button size="small" type="primary" @click="save">淇� 瀛�</el-button>
</div>
- <!-- <div class="search_thing" v-if="currentTab=='鎶ゅ'">-->
- <!-- <div class="search_label">妫�楠屾爣鍑嗭細</div>-->
- <!-- <el-select v-model="sheath.standardMethodListId" placeholder="璇烽�夋嫨妫�楠屾爣鍑�" size="small"-->
- <!-- disabled-->
- <!-- @change="(value)=>methodChange(value)">-->
- <!-- <el-option v-for="item in standards" :key="item.id" :label="item.code" :value="item.id">-->
- <!-- </el-option>-->
- <!-- </el-select>-->
- <!-- </div>-->
</div>
<div class="table">
<el-table ref="productTable" v-loading="getProductLoad" :data="productList"
- :row-class-name="tableRowClassName" border class="el-table" height="100%"
- style="margin-bottom: 10px;" tooltip-effect="dark" @select="upProductSelect"
+ :row-class-name="tableRowClassName" border class="el-table" :height="'calc(100vh - 200px)'"
+ tooltip-effect="dark" @select="upProductSelect"
@selection-change="selectProduct" @select-all="handleAll">
<el-table-column :selectable="selectable" type="selection" width="65"></el-table-column>
<el-table-column label="妫�楠岄」鍒嗙被" min-width="140" prop="inspectionItemClass" show-overflow-tooltip></el-table-column>
@@ -132,11 +114,12 @@
<script>
import { Tree } from 'element-ui'
+import {selectsStandardMethodByFLSSM, selectStandardProductList} from "@/api/business/rawMaterialOrder";
export default {
props: {
active: {
- type: Number,
- default: () => 0
+ type: String,
+ default: () => '0'
},
sampleSelectionList: {
type: Array,
@@ -286,7 +269,7 @@
},
selectsStandardMethodByFLSSM2() {
this.standards = []
- this.$axios.post(this.$api.standardTree.selectsStandardMethodByFLSSM, {
+ selectsStandardMethodByFLSSM({
tree: this.$parent.selectTree
}).then(res => {
try {
@@ -294,7 +277,7 @@
let arr = this.selectTree.split('-')
let arr0 = arr.slice(0, arr.length - 1)
let selectTree = arr0.join('-').substring(0, arr0.join('-').length - 1)
- this.$axios.post(this.$api.standardTree.selectsStandardMethodByFLSSM, {
+ selectsStandardMethodByFLSSM({
tree: selectTree
}).then(ress => {
this.standards = ress.data.standardMethodList
@@ -330,7 +313,7 @@
const conductorMaterial = this.sampleSelectionList[0].conductorMaterial
const conductorType = this.sampleSelectionList[0].conductorType
const modelNum = this.sampleSelectionList[0].modelNum
- this.$axios.post(this.$api.standardTree.selectStandardProductList, {
+ selectStandardProductList({
model: this.$parent.addObj.model ? this.$parent.addObj.model : model,
modelNum: modelNum,
standardMethodListId: val,
@@ -357,21 +340,16 @@
this.$refs.productTable.toggleRowSelection(row, true);
},
save() {
- // if(this.auxiliaryWireCore.insProduct.length === 0 && this.sheath.insProduct.length === 0){
- // this.$message.error('缂哄皯閰嶇疆鏃犳硶淇濆瓨')
- // return
- // }
if (this.auxiliaryWireCore.insProduct.length !== 0) {
if (this.auxiliaryWireCore.num.length === 0) {
this.$message.error('缂哄皯鑺暟鏃犳硶淇濆瓨')
return
}
}
- // this.sample.forEach(a=>{
- // a.auxiliaryWireCore = this.auxiliaryWireCore
- // a.sheath = this.sheath
- // })
- this.auxiliaryWireCore.insProduct = this.productList
+ this.auxiliaryWireCore.insProduct = this.HaveJson(this.productList)
+ this.auxiliaryWireCore.insProduct.forEach(a => {
+ delete a.id
+ })
if (this.currentTab === '缁濈紭') {
this.sample.forEach(a => {
a.auxiliaryWireCore = this.auxiliaryWireCore
@@ -399,54 +377,14 @@
</script>
<style scoped>
-.ins_order_config {
- width: 100%;
- height: 100%;
- overflow-y: auto;
- overflow-x: hidden;
-}
-
-.ins_order_config::-webkit-scrollbar {
- width: 0;
-}
-
-.title {
- height: 60px;
- line-height: 60px;
-}
-
-.search {
- background-color: #fff;
- height: 80px;
+.search_form {
display: flex;
- align-items: center;
+ justify-content: space-between;
}
-
-.search_thing {
- width: 300px;
- display: flex;
- align-items: center;
-}
-
-.search_label {
- width: 100px;
- font-size: 14px;
- text-align: right;
-}
-
.search_input {
- width: calc(100% - 70px);
+ display: flex;
+ justify-content: space-between;
}
-
-.table {
- margin-top: 10px;
- background-color: #fff;
- width: calc(100% - 40px);
- height: calc(100% - 60px - 80px - 26px - 24px);
- padding: 20px;
-}
-</style>
-<style>
.ins_order_config .has-gutter .el-table__cell .cell {
line-height: 30px;
background-color: #fafafa;
diff --git a/src/views/business/productOrder/components/cable-config.vue b/src/views/business/productOrder/components/cable-config.vue
index 093c8d7..ce68a52 100644
--- a/src/views/business/productOrder/components/cable-config.vue
+++ b/src/views/business/productOrder/components/cable-config.vue
@@ -1,56 +1,40 @@
<template>
- <div class="ins_order_config">
- <div>
- <el-row class="title">
- <el-col :span="6" style="padding-left: 20px;text-align: left;">鐢电紗閰嶇疆</el-col>
- <el-col :span="18" style="text-align: right;">
- <el-button size="medium" @click="outConfig">
- <span style="color: #3A7BFA;">杩� 鍥�</span>
- </el-button>
- <el-button size="medium" type="primary" @click="save">淇� 瀛�</el-button>
- </el-col>
- </el-row>
- </div>
- <div class="search">
- <el-radio-group v-model="currentTab" size="small" style="margin-left: 20px;" @input="changeTab">
- <el-radio-button label="缁濈紭">缁� 缂�</el-radio-button>
-<!-- <el-radio-button label="鎶ゅ">鎶� 濂�</el-radio-button>-->
- </el-radio-group>
- <div v-if="currentTab=='缁濈紭'" class="search_thing">
- <div class="search_label">鑺暟锛�</div>
- <el-select v-model="insulating.num" allow-create
- clearable
- default-first-option
- filterable
- multiple
- size="small">
- <el-option v-for="item in quantityList" :key="item.value" :label="item.label" :value="item.value"></el-option>
- </el-select>
+ <div>
+ <div class="search_form">
+ <div v-if="currentTab=='缁濈紭'">
+ <el-radio-group v-model="currentTab" size="small" style="margin-right: 20px;" @input="changeTab">
+ <el-radio-button label="缁濈紭">缁� 缂�</el-radio-button>
+ </el-radio-group>
+ <el-form :model="insulating" ref="entity" size="small" :inline="true">
+ <el-form-item label="鑺暟" prop="num">
+ <el-select v-model="insulating.num" allow-create
+ clearable
+ default-first-option
+ filterable
+ multiple
+ size="small">
+ <el-option v-for="item in quantityList" :key="item.value" :label="item.label" :value="item.value"></el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="妫�楠屾爣鍑�" prop="standardMethodListId">
+ <el-select v-model="insulating.standardMethodListId" disabled placeholder="璇烽�夋嫨妫�楠屾爣鍑�"
+ size="small"
+ @change="(value)=>methodChange(value)">
+ <el-option v-for="item in standards" :key="item.id" :label="item.code" :value="item.id">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ </el-form>
</div>
- <div v-if="currentTab=='缁濈紭'" class="search_thing">
- <div class="search_label">妫�楠屾爣鍑嗭細</div>
- <el-select v-model="insulating.standardMethodListId" disabled placeholder="璇烽�夋嫨妫�楠屾爣鍑�"
- size="small"
- @change="(value)=>methodChange(value)">
- <el-option v-for="item in standards" :key="item.id" :label="item.code" :value="item.id">
- </el-option>
- </el-select>
+ <div>
+ <el-button size="small" @click="outConfig">杩� 鍥�</el-button>
+ <el-button size="small" type="primary" @click="save">淇� 瀛�</el-button>
</div>
-<!-- <div class="search_thing" v-if="currentTab=='鎶ゅ'">-->
-<!-- <div class="search_label">妫�楠屾爣鍑嗭細</div>-->
-<!-- <el-select v-model="sheath.standardMethodListId" placeholder="璇烽�夋嫨妫�楠屾爣鍑�" size="small"-->
-<!-- disabled-->
-<!-- @change="(value)=>methodChange(value)">-->
-<!-- <el-option v-for="item in standards" :key="item.id" :label="item.code" :value="item.id">-->
-<!-- </el-option>-->
-<!-- </el-select>-->
-<!-- </div>-->
</div>
<div class="table">
- <el-table ref="productTable" :data="productList" :row-class-name="tableRowClassName"
- border class="el-table" height="100%"
- style="margin-bottom: 10px;" tooltip-effect="dark" @select="upProductSelect"
- @selection-change="selectProduct" @select-all="handleAll">
+ <el-table ref="productTable" :data="productList" :row-class-name="tableRowClassName" border
+ class="el-table" :height="'calc(100vh - 200px)'" tooltip-effect="dark" @select="upProductSelect"
+ @selection-change="selectProduct" @select-all="handleAll">
<el-table-column :selectable="selectable" type="selection" width="65"></el-table-column>
<el-table-column label="妫�楠岄」鍒嗙被" min-width="140" prop="inspectionItemClass" show-overflow-tooltip></el-table-column>
<el-table-column label="妫�楠岄」" min-width="140" prop="inspectionItem" show-overflow-tooltip>
@@ -142,12 +126,13 @@
</template>
<script>
-import { Tree } from 'element-ui'
+import {selectsStandardMethodByFLSSM, selectStandardProductList} from "@/api/business/rawMaterialOrder";
+
export default {
props: {
active: {
- type: Number,
- default: () => 0
+ type: String,
+ default: () => '0'
},
sampleSelectionList: {
type: Array,
@@ -174,10 +159,6 @@
insProduct: [],
num: []
},
- // sheath: {
- // standardMethodListId: null,
- // insProduct: []
- // },
isAskOnlyRead: false,
inspectionItem:null,
inspectionItemSubclass:null,
@@ -194,9 +175,6 @@
if(this.$parent.sampleList[i].insulating !== undefined && this.$parent.sampleList[i].insulating !== null){
this.insulating = this.$parent.sampleList[i].insulating
}
- // if(this.$parent.sampleList[i].sheath !== undefined && this.$parent.sampleList[i].sheath !== null){
- // this.sheath = this.$parent.sampleList[i].sheath
- // }
break
}
}
@@ -227,28 +205,6 @@
this.productList = this.productList0
}
},
- // 瑕佹眰鍊煎彉鍖栨椂
- requestChange(e, row,type) {
- this.sampleList.map(item => {
- if (this.sampleIds.indexOf(item.id) > -1) {
- item.insProduct.map(i => {
- if(i.id == row.id){
- if(row.repetitionTag){
- if(row.repetitionTag==i.repetitionTag){
- i[type] = e
- }
- }else{
- if(!i.repetitionTag){
- i[type] = e
- }
- }
- }
- return i
- })
- }
- return item
- })
- },
outConfig() {
this.$parent.cableConfigShow = false
},
@@ -277,10 +233,7 @@
this.$refs.productTable.doLayout()
})
},
- tableRowClassName({
- row,
- rowIndex
- }) {
+ tableRowClassName({row, rowIndex}) {
if (row.state === 0) {
return '';
}
@@ -295,7 +248,7 @@
},
selectsStandardMethodByFLSSM2() {
this.standards = []
- this.$axios.post(this.$api.standardTree.selectsStandardMethodByFLSSM, {
+ selectsStandardMethodByFLSSM({
tree: this.$parent.selectTree
}).then(res => {
try {
@@ -303,7 +256,7 @@
let arr = this.selectTree.split('-')
let arr0 = arr.slice(0, arr.length - 1)
let selectTree = arr0.join('-').substring(0, arr0.join('-').length - 1)
- this.$axios.post(this.$api.standardTree.selectsStandardMethodByFLSSM, {
+ selectsStandardMethodByFLSSM({
tree: selectTree
}).then(ress => {
this.standards = ress.data.standardMethodList
@@ -341,7 +294,7 @@
const cores = this.sampleSelectionList[0].cores
const conductorMaterial = this.sampleSelectionList[0].conductorMaterial
const conductorType = this.sampleSelectionList[0].conductorType
- this.$axios.post(this.$api.standardTree.selectStandardProductList, {
+ selectStandardProductList({
model: this.$parent.addObj.model?this.$parent.addObj.model:model,
modelNum: modelNum,
cores: cores,
@@ -358,8 +311,6 @@
res.data.forEach(a => {
a.state = 0
})
- // this.insulating.insProduct = res.data
- // this.sheath.insProduct = res.data
this.productList = res.data
})
},
@@ -367,21 +318,16 @@
this.$refs.productTable.toggleRowSelection(row, true);
},
save(){
- // if(this.insulating.insProduct.length === 0 && this.sheath.insProduct.length === 0){
- // this.$message.error('缂哄皯閰嶇疆鏃犳硶淇濆瓨')
- // return
- // }
- this.insulating.insProduct = this.productList
+ this.insulating.insProduct = this.HaveJson(this.productList)
if(this.insulating.insProduct.length !== 0){
if(this.insulating.num.length === 0){
this.$message.error('缂哄皯鑺暟鏃犳硶淇濆瓨')
return
}
}
- // this.sample.forEach(a=>{
- // a.insulating = this.insulating
- // a.sheath = this.sheath
- // })
+ this.insulating.insProduct.forEach(a => {
+ delete a.id
+ })
if (this.currentTab === '缁濈紭') {
this.sample.forEach(a => {
a.insulating = this.insulating
@@ -429,67 +375,15 @@
</script>
<style scoped>
-.ins_order_config {
- width: 100%;
- height: 100%;
- overflow-y: auto;
- overflow-x: hidden;
- }
-
- .ins_order_config::-webkit-scrollbar {
- width: 0;
- }
-
- .title {
- height: 60px;
- line-height: 60px;
- }
-
- .search {
- background-color: #fff;
- height: 80px;
- display: flex;
- align-items: center;
- }
-
- .search_thing {
- width: 300px;
- display: flex;
- align-items: center;
- }
-
- .search_label {
- width: 100px;
- font-size: 14px;
- text-align: right;
- }
-
- .search_input {
- width: calc(100% - 70px);
- }
- .table {
- margin-top: 10px;
- background-color: #fff;
- width: calc(100% - 40px);
- height: calc(100% - 60px - 80px - 26px - 24px);
- padding: 20px;
- }
-</style>
-<style>
- .ins_order_config .has-gutter .el-table__cell .cell {
- line-height: 30px;
- background-color: #fafafa;
- }
-
- .ins_order_config .has-gutter .el-table__cell {
- background-color: #fafafa !important;
- }
-
- .ins_order_config .el-table__row .cell {
- font-size: 12px;
- }
-
- .ins_order_config .el-table .warning-row .cell {
- color: #3A7BFA;
- }
+.search_form {
+ display: flex;
+ justify-content: space-between;
+}
+.search_input {
+ display: flex;
+ justify-content: space-between;
+}
+.el-table .warning-row .cell {
+ color: #3A7BFA;
+}
</style>
--
Gitblit v1.9.3