From ff017259dac281ca30195b4d2d337f14c24f9332 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期四, 19 十二月 2024 14:16:25 +0800
Subject: [PATCH] 完成cnas8.7搬迁
---
src/components/do/b1-ins-order/add.vue | 102 +++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 79 insertions(+), 23 deletions(-)
diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue
index 57c1b7f..975e112 100644
--- a/src/components/do/b1-ins-order/add.vue
+++ b/src/components/do/b1-ins-order/add.vue
@@ -134,9 +134,9 @@
<div class="ins_order_add" style=" display: block; ">
<div v-show="!configShow&&!equipConfigShow&&!cableConfigShow">
<el-row class="title">
- <el-col :span="6" style="padding-left: 20px;text-align: left;">濮旀墭鍗曚俊鎭� 鍗曚綅鎴愭湰鎬讳环锛�<span
+ <el-col :span="8" style="padding-left: 20px;text-align: left;">濮旀墭鍗曚俊鎭� 鍗曚綅鎴愭湰鎬讳环锛�<span
style="color: #3A7BFA">锟{total.toFixed(2)}}</span></el-col>
- <el-col :span="18" style="text-align: right;">
+ <el-col :span="16" style="text-align: right;">
<el-select v-model="template" size="medium" placeholder="涓嬪崟妯℃澘" style="margin-right: 10px;" v-show="active==1"
@change="selectInsOrderTemplateById">
<el-option v-for="(a, ai) in templates" :key="ai" :value="a.id" :label="a.name">
@@ -234,7 +234,7 @@
<div class="search_label"><span class="required-span">* </span>鏍峰搧鏁伴噺锛�</div>
<div class="search_input">
<el-input-number size="small" v-model="addObj.sampleNum" :min="1" :max="100" :precision="0"
- style="width: 65%;" @change="addStandardTree" :disabled="active>1"></el-input-number>
+ style="width: 100%;" @change="addStandardTree" :disabled="active>1"></el-input-number>
</div>
</el-col>
<!-- <el-col class="search_thing" :span="6">
@@ -356,11 +356,11 @@
:disabled="active>1"
type="date"
placeholder="閫夋嫨鏃ユ湡"
- size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd">
+ size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 100%;">
</el-date-picker>
</div>
</el-col>
- <el-col class="search_thing" :span="6">
+ <el-col class="search_thing" :span="6" v-if="addObj.formType!='鍏朵粬鎴愬搧'&&addObj.formType">
<div class="search_label"><span class="required-span">* </span>鏍锋満瀹屾垚鏃堕棿锛�</div>
<div class="search_input">
<el-date-picker
@@ -368,7 +368,7 @@
:disabled="active>1"
type="date"
placeholder="閫夋嫨鏃ユ湡"
- size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd">
+ size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 100%;">
</el-date-picker>
</div>
</el-col>
@@ -409,11 +409,33 @@
<div style="height: auto;">
<div class="search" v-if="active==1" style="display: flex;background: transparent;">
<div class="search_thing">
+ <div class="search_label">鏍峰搧鍚嶇О锛�</div>
+ <div class="search_input">
+ <el-input size="small" v-model="allInfo.sample" @change="changeModel('sample')"></el-input>
+ </div>
+ </div>
+ <div class="search_thing">
<div class="search_label">鏍峰搧绫诲埆锛�</div>
<div class="search_input">
- <el-select v-model="model" :placeholder="active>1 ? '' : '璇疯緭鍏�'" filterable allow-create default-first-option size="small"
- @change="changeModel">
+ <el-select v-model="allInfo.model" :placeholder="active>1 ? '' : '璇疯緭鍏�'" filterable allow-create default-first-option size="small"
+ @change="changeModel('model')">
<el-option v-for="item in models" :key="item.value" :label="item.label" :value="item.value">
+ </el-option>
+ </el-select>
+ </div>
+ </div>
+ <div class="search_thing">
+ <div class="search_label">浜у搧鍨嬪彿锛�</div>
+ <div class="search_input">
+ <el-input size="small" v-model="allInfo.modelNum" @change="changeModel('modelNum')"></el-input>
+ </div>
+ </div>
+ <div class="search_thing">
+ <div class="search_label">璇曢獙鏍囧噯锛�</div>
+ <div class="search_input">
+ <el-select v-model="allInfo.testRequirements" :placeholder="active>1 ? '' : '璇疯緭鍏�'" filterable allow-create default-first-option size="small"
+ @change="changeModel('testRequirements')">
+ <el-option v-for="item in standard" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</div>
@@ -467,7 +489,7 @@
<el-table-column prop="testRequirements" label="璇曢獙鏍囧噯" align="center" min-width="100">
<template slot-scope="scope">
<el-select v-model="scope.row.testRequirements" :disabled="scope.row.model==null||active>1"
- placeholder="璇曢獙鏍囧噯" size="small" :readonly="active>1" style="width: 100%;" clearable>
+ placeholder="璇曢獙鏍囧噯" size="small" :readonly="active>1" style="width: 100%;" clearable @change="changeModel0(scope.row)">
<el-option v-for="item in standard" :key="item.id" :label="item.label" :value="item.value">
</el-option>
</el-select>
@@ -1307,7 +1329,13 @@
num:null,
},
powerShow:false,
- powerTable:[]
+ powerTable:[],
+ allInfo:{
+ model:null,
+ sample:null,
+ modelNum:null,
+ testRequirements:null,
+ }
}
},
watch: {
@@ -1358,11 +1386,17 @@
}
},
'addObj.sample'(val) {
- this.model = null
+ this.allInfo.model = null
+ this.allInfo.sample = null
+ this.allInfo.modelNum = null
+ this.allInfo.testRequirements = null
this.standardMethodListId = []
},
'addObj.sampleNum'(val) {
- this.model = null
+ this.allInfo.model = null
+ this.allInfo.sample = null
+ this.allInfo.modelNum = null
+ this.allInfo.testRequirements = null
this.standardMethodListId = []
},
active(val){
@@ -1415,7 +1449,7 @@
})
})
// 鏂囦欢淇℃伅
- this.componentData0.entity.insOrderId = this.currentId
+ this.componentData0.entity.insOrderId = this.currentId;
this.$refs.fileList.selectList()
}
},
@@ -1896,12 +1930,12 @@
this.$message.error('璇疯緭鍏ユ牱鍝佸瀷鍙�')
}else if (!this.addObj.appointed) {
this.$message.error('璇烽�夋嫨绾﹀畾鏃堕棿')
- }else if (!this.addObj.issueTime) {
- this.$message.error('璇烽�夋嫨鏍锋満瀹屾垚鏃堕棿')
- } else if (!this.sampleList.every(m => m.standardMethodListId&&m.standardMethodListId.length>0)) {
+ }else if (!this.sampleList.every(m => m.standardMethodListId&&m.standardMethodListId.length>0)) {
this.$message.error('璇烽�夋嫨妫�楠屾爣鍑�')
} else if(this.addObj.formType&&this.addObj.formType!='鍏朵粬鎴愬搧'&&!this.addObj.issueUser){
this.$message.error('璇烽�夋嫨閫氱煡鑷虫牱鏈哄憳')
+ }else if(this.addObj.formType&&this.addObj.formType!='鍏朵粬鎴愬搧'&&!this.addObj.issueTime){
+ this.$message.error('璇烽�夋嫨鏍锋満瀹屾垚鏃堕棿')
}else{
//鏍¢獙妫�楠岄」鐨勮姹傚�煎拰瑕佹眰鎻忚堪,浠呭鎵樿姹�
// if(this.active==1&&this.isAskOnlyRead){
@@ -2784,7 +2818,23 @@
// 淇濆瓨妯℃澘
addTemplateDia() {
if (this.templateName) {
- this.templateLoading = true;
+ if(this.templates.find(m=>m.name==this.templateName)){
+ this.$confirm('宸插瓨鍦ㄥ悓鍚嶆ā鏉匡紝鏄惁杩涜鏇挎崲?', "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ }).then(() => {
+ this.saveTemplateDia()
+ }).catch(() => {})
+ }else{
+ this.saveTemplateDia()
+ }
+ } else {
+ this.$message.error('璇峰~鍐欐ā鏉垮悕绉�')
+ }
+ },
+ saveTemplateDia(){
+ this.templateLoading = true;
this.$axios.post(this.$api.insOrder.addInsOrderTemplate, {
name: this.templateName,
thing: JSON.stringify({
@@ -2804,9 +2854,6 @@
this.selectInsOrderTemplate()
this.templateName = ''
})
- } else {
- this.$message.error('璇峰~鍐欐ā鏉垮悕绉�')
- }
},
// 鏌ヨ妯℃澘
selectInsOrderTemplateById(e) {
@@ -2847,7 +2894,7 @@
}).then(res => {
this.orderType = res.data
if (res.data.length > 0) {
- this.addObj.orderType = res.data[0].value
+ this.addObj.orderType = 'C'
}
})
},
@@ -2908,14 +2955,23 @@
}
})
},
- changeModel() {
+ changeModel(type) {
this.sampleList.forEach(a => {
let obj = this.sampleIds.find(b => b == a.id)
if (obj) {
- a.model = this.model
+ this.$set(a,type, this.allInfo[type])
+ if(type=='testRequirements'&&a.standardMethodListId&&a.standardMethodListId.length>0){
+ this.methodChange(a.standardMethodListId, a)
+ }
+ // a[type] = this.allInfo[type]
}
})
},
+ changeModel0(row){
+ if(row.standardMethodListId&&row.standardMethodListId.length>0){
+ this.methodChange(row.standardMethodListId, row)
+ }
+ },
changeStandardMethodListId() {
this.sampleList.forEach(a => {
let obj = this.sampleIds.find(b => b == a.id)
--
Gitblit v1.9.3