From 69de142c7501b745dd94907c90cef69f0d454e0e Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期五, 31 五月 2024 11:24:40 +0800
Subject: [PATCH] 人员明细bug修改
---
src/components/do/b1-ins-order/add.vue | 118 ++++++++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 97 insertions(+), 21 deletions(-)
diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue
index 75adee2..9ca4c9d 100644
--- a/src/components/do/b1-ins-order/add.vue
+++ b/src/components/do/b1-ins-order/add.vue
@@ -92,7 +92,7 @@
<template>
<div class="ins_order_add">
- <div>
+ <div v-show="!configShow">
<el-row class="title">
<el-col :span="6" style="padding-left: 20px;">濮旀墭鍗曚俊鎭�</el-col>
<el-col :span="18" style="text-align: right;">
@@ -107,6 +107,7 @@
<el-button size="medium" @click="templateDia=true" v-show="active==1">
<span style="color: #3A7BFA;">淇濆瓨妯℃澘</span>
</el-button>
+ <el-button size="medium" type="primary" @click="openConfig">鍏夌氦閰嶇疆</el-button>
<el-button size="medium" type="primary" @click="save" :loading="saveLoad" v-show="active==1">鎻愪氦</el-button>
<!-- 瀹℃牳 -->
<el-button size="medium" @click="upInsOrderOfState(2)" :loading="saveLoad" v-show="active==3"
@@ -119,7 +120,7 @@
</el-col>
</el-row>
</div>
- <div class="search">
+ <div class="search" v-show="!configShow">
<el-row>
<el-col class="search_thing" :span="6">
<div class="search_label">濮旀墭缂栧彿锛�</div>
@@ -197,7 +198,9 @@
<el-col class="search_thing" :span="6">
<div class="search_label"><span class="required-span">* </span>鏉ユ牱鏂瑰紡锛�</div>
<div class="search_input">
- <el-input size="small" clearable v-model="addObj.formType" :readonly="active>1"></el-input>
+ <el-select v-model="addObj.formType" size="small" :disabled="active>1" style="width: 100%;">
+ <el-option v-for="(a,ai) in formType" :key="ai" :label="a.label" :value="a.value"></el-option>
+ </el-select>
</div>
</el-col>
<el-col class="search_thing" :span="6">
@@ -216,6 +219,30 @@
<el-radio :label="0">濮旀墭鍗曚綅鍙栧洖</el-radio>
<el-radio :label="1">瀹為獙瀹ゅ鐞�</el-radio>
</el-radio-group>
+ </div>
+ </el-col>
+ <el-col class="search_thing" :span="6">
+ <div class="search_label"><span class="required-span">* </span>宸ョ▼鍚嶇О锛�</div>
+ <div class="search_input">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addObj.engineering" :readonly="active>1"></el-input>
+ </div>
+ </el-col>
+ <el-col class="search_thing" :span="6">
+ <div class="search_label"><span class="required-span">* </span>宸ョ▼鍚嶇ОEN锛�</div>
+ <div class="search_input">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addObj.engineeringEn" :readonly="active>1"></el-input>
+ </div>
+ </el-col>
+ <el-col class="search_thing" :span="6">
+ <div class="search_label"><span class="required-span">* </span>鐢熶骇鍗曚綅锛�</div>
+ <div class="search_input">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addObj.production" :readonly="active>1"></el-input>
+ </div>
+ </el-col>
+ <el-col class="search_thing" :span="6">
+ <div class="search_label"><span class="required-span">* </span>鐢熶骇鍗曚綅EN锛�</div>
+ <div class="search_input">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addObj.productionEn" :readonly="active>1"></el-input>
</div>
</el-col>
<el-col class="search_thing" :span="6">
@@ -251,7 +278,7 @@
</el-col>
</el-row>
</div>
- <div>
+ <div v-show="!configShow">
<el-table class="el-table sampleTable" ref="sampleTable" :data="sampleList" height="250px" tooltip-effect="dark"
border @selection-change="selectSample" highlight-current-row @row-click="rowClick" style="margin-top: 10px;">
<el-table-column type="selection" width="60" :selectable="selectable" v-if="active==1"></el-table-column>
@@ -270,7 +297,7 @@
<el-table-column prop="model" label="鏍峰搧鍨嬪彿" align="center" min-width="100">
<template slot-scope="scope">
<el-select v-model="scope.row.model" filterable allow-create default-first-option placeholder="鏍峰搧鍨嬪彿"
- size="small" @change="handleChangeModel" :disabled="active>1" style="width: 100%;" disabled>
+ size="small" @change="handleChangeModel" :disabled="active>1" style="width: 100%;">
<el-option v-for="item in models" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
@@ -347,7 +374,8 @@
<el-table-column prop="ask" label="瑕佹眰鍊�" min-width="220px">
<template slot-scope="scope">
<el-input size="small" placeholder="瑕佹眰鍊�" v-model="scope.row.ask" clearable type="textarea"
- :autosize="{ minRows: 1, maxRows: 3}" @change="e=>requestChange(e,scope.row)" :readonly="active>1"></el-input>
+ :autosize="{ minRows: 1, maxRows: 3}" @change="e=>requestChange(e,scope.row)" v-if="active==1&&isAskOnlyRead"></el-input>
+ <span v-else>{{ scope.row.ask }}</span>
</template>
</el-table-column>
</el-table>
@@ -513,14 +541,17 @@
</el-row>
</span>
</el-dialog>
+ <fiberOpticConfig :currentId="currentId" v-if="configShow"/>
</div>
</template>
<script>
import ValueTable from '../../tool/value-table.vue'
+ import fiberOpticConfig from './fiberoptic-config.vue'
export default {
components: {
- ValueTable
+ ValueTable,
+ fiberOpticConfig
},
props: {
active: {
@@ -560,7 +591,12 @@
isLeave: 0,
orderType: null,
send: 1,
- formType: '閫佹'
+ formType: '閫佹',
+ engineering: null,
+ engineeringEn: null,
+ production: null,
+ productionEn: null,
+ companyId: null
},
sample: {
sampleCode: null,
@@ -634,7 +670,11 @@
tell: '',
noLoading: false,
orderType: [],
- filters: []
+ filters: [],
+ formType: [],
+ configShow: false,
+ currentMethod: null,
+ isAskOnlyRead:false
}
},
watch: {
@@ -653,6 +693,7 @@
this.selectStandardMethods()
this.selectEnumByCategoryForOrderType()
this.selectEnumByCategoryForSonLaboratory()
+ this.selectEnumByCategoryForSampleForm()
if (this.active != 1) {
// 鏌ョ湅/瀹℃牳娴佺▼
// 璇锋眰鎺ュ彛锛屽洖鏄炬暟鎹�
@@ -701,19 +742,14 @@
this.$message.error('鏈�夋嫨鏁版嵁')
return
}
- delete selects['orderBy']
- delete selects['updateUser']
- delete selects['updateTime']
- this.addObj.userId = selects.id
this.addObj.company = selects.company
- this.addObj.custom = selects.name
this.addObj.code = selects.code
- this.addObj.phone = selects.phone
+ this.addObj.companyId = selects.id
this.selectUserDia = false
},
save() {
- if (!this.addObj.custom) {
- this.$message.error('鏈�夋嫨涓嬪崟瀹㈡埛')
+ if (!this.addObj.companyId) {
+ this.$message.error('鏈�夋嫨瀹㈡埛鍗曚綅')
return
}
if (!this.addObj.type) {
@@ -722,6 +758,14 @@
this.$message.error('璇疯緭鍏ユ潵鏍锋柟寮�')
} else if (!this.addObj.orderType) {
this.$message.error('璇烽�夋嫨妫�楠岀被鍒�')
+ }else if (!this.addObj.engineering) {
+ this.$message.error('璇疯緭鍏ュ伐绋嬪悕绉�')
+ } else if (!this.addObj.engineeringEn) {
+ this.$message.error('璇疯緭鍏ュ伐绋嬪悕绉癊N')
+ }else if (!this.addObj.production) {
+ this.$message.error('璇疯緭鍏ョ敓浜у崟浣�')
+ }else if (!this.addObj.productionEn) {
+ this.$message.error('璇疯緭鍏ョ敓浜у崟浣岴N')
} else if (this.sampleList.length < 1) {
this.$message.error('璇锋坊鍔犱竴涓牱鍝�')
} else if (!this.sampleList.every(m => m.sample)) {
@@ -872,8 +916,8 @@
},
activeStandardTree() {
let trees = this.selectTree.split(" - ")
- if (trees.length < 5) {
- this.$message.error('鏈�夋嫨鍨嬪彿')
+ if (trees.length < 4) {
+ this.$message.error('鏈�夋嫨浜у搧')
return
}
this.addObj.factory = trees[0]
@@ -1011,6 +1055,13 @@
})
},
rowClick(row, column, event) {
+ this.currentMethod = row
+ let obj = this.methods.find(a=>a.id==this.currentMethod.standardMethodListId)
+ if(obj&&obj.code=='濮旀墭瑕佹眰'){
+ this.isAskOnlyRead = true
+ }else{
+ this.isAskOnlyRead = false
+ }
this.productList = row.insProduct
setTimeout(() => {
this.productList.forEach(a => {
@@ -1126,12 +1177,30 @@
}
})
},
+ selectEnumByCategoryForSampleForm() {
+ this.$axios.post(this.$api.enums.selectEnumByCategory, {
+ category: "鏉ユ牱鏂瑰紡"
+ }).then(res => {
+ this.formType = res.data
+ if(this.formType.length > 0){
+ this.addObj.formType = this.formType[0].value
+ }
+ })
+ },
methodChange(val, row) {
if(val===null||val==='')return
+ this.currentMethod = row
+ let obj = this.methods.find(a=>a.id==this.currentMethod.standardMethodListId)
+ if(obj&&obj.code=='濮旀墭瑕佹眰'){
+ this.isAskOnlyRead = true
+ }else{
+ this.isAskOnlyRead = false
+ }
this.getProductLoad = true
this.$axios.post(this.$api.standardTree.selectStandardProductList, {
- model: this.addObj.model + '-' + row.modelNum,
- standardMethodListId: val
+ model: row.model + '-' + row.modelNum,
+ standardMethodListId: val,
+ factory: this.selectTree,
}, {
headers: {
'Content-Type': 'application/json'
@@ -1266,6 +1335,13 @@
filterHandler(value, row, column) {
const property = column['property'];
return row[property] === value;
+ },
+ openConfig(){
+ if(this.sampleIds.length===0){
+ this.$message.error("鏈�夋嫨鏍峰搧")
+ return
+ }
+ this.configShow = true
}
}
}
--
Gitblit v1.9.3