From 321370a82855d4b58d4eff2aee238672cdb8b865 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期四, 14 十一月 2024 10:06:49 +0800
Subject: [PATCH] 修改检验下单
---
src/components/do/b1-ins-order/add.vue | 136 ++++++++++----------------------------------
src/main.js | 4
2 files changed, 34 insertions(+), 106 deletions(-)
diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue
index 87986a4..7d4e9ba 100644
--- a/src/components/do/b1-ins-order/add.vue
+++ b/src/components/do/b1-ins-order/add.vue
@@ -216,7 +216,7 @@
</div>
</el-col>
<el-col class="search_thing" :span="6">
- <div class="search_label"><span class="required-span">* </span>鏍峰搧鍚嶇О锛�</div>
+ <div class="search_label"><span class="required-span">* </span>鏍峰搧绫诲瀷锛�</div>
<div class="search_input">
<el-input readonly size="small" v-model="addObj.sample">
<template slot="append"><el-button slot="append" icon="el-icon-search" @click="selectStandardTree = true"
@@ -409,7 +409,7 @@
<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_label">鏍峰搧绫诲埆锛�</div>
<div class="search_input">
<el-select v-model="model" :placeholder="active>1 ? '' : '璇疯緭鍏�'" filterable allow-create default-first-option size="small"
@change="changeModel">
@@ -439,7 +439,7 @@
<el-table-column type="index" label="搴忓彿" width="65" align="center"></el-table-column>
<el-table-column prop="sample" label="鏍峰搧鍚嶇О" align="center" min-width="100">
<template slot-scope="scope">
- <el-input size="small" v-model="scope.row.sample" clearable :readonly="active>1"></el-input>
+ <el-input size="small" v-model="scope.row.sample" clearable :readonly="active>1" placeholder="蹇呭~"></el-input>
</template>
</el-table-column>
<el-table-column prop="sampleCode" label="鏍峰搧缂栧彿" min-width="100" align="center">
@@ -448,18 +448,18 @@
:readonly="active>1"></el-input>
</template>
</el-table-column>
- <el-table-column prop="model" label="鏍峰搧鍨嬪彿" align="center" min-width="100">
+ <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="鏍峰搧鍨嬪彿"
+ <el-select v-model="scope.row.model" filterable allow-create default-first-option placeholder="鏍峰搧绫诲埆"
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>
</template>
</el-table-column>
- <el-table-column prop="modelNum" label="鍨嬪彿鍙傛暟" min-width="100" align="center" v-if="!(active>1)">
+ <el-table-column prop="modelNum" label="浜у搧鍨嬪彿" min-width="100" align="center" v-if="!(active>1)">
<template slot-scope="scope">
- <el-input size="small" v-model="scope.row.modelNum" clearable placeholder="闈炲繀濉�"
+ <el-input size="small" v-model="scope.row.modelNum" clearable placeholder="蹇呭~"
@keyup.enter.native="methodChange(scope.row.standardMethodListId, scope.row)"
@clear="methodChange(scope.row.standardMethodListId, scope.row)"></el-input>
</template>
@@ -592,11 +592,6 @@
:delUrl="$api.insOrderPlan.delfile" style="height: 100%;margin-top: 16px;" v-show="currentPage==1"/>
</div>
</div>
- <p style="font-size: 12px;color: red;margin-top: 20px;margin-bottom: 20px;">鍙屾柟鎵胯:<br/>
- 1銆佸鎵樻柟鎵胯鎻愪緵鐨勪俊鎭笌鏍峰搧鐨勭湡瀹炴��;<br/>
- 2銆佸鎵橀�佹牱妫�楠岀粨鏋滀粎閫傜敤浜庢敹鍒扮殑鏍峰搧;<br/>
- 3銆佽瘯楠岃繃绋嬪鑷寸殑鏍峰搧鎹熷潖銆侀厤浠舵崯鍧忋�佹崯鑰楋紝鏈祴璇曞満涓嶆壙鎷呰禂鍋胯矗浠�;<br/>
- 4銆佸疄楠屽鎵胯鍏寮�灞曟娴嬫椿鍔紝骞舵壙璇轰繚瀹堝湪妫�娴嬫椿鍔ㄨ繃绋嬩腑鎵�鑾风煡鐨勪繚瀵嗕俊鎭��</p>
<el-dialog title="閫夋嫨鍗曚綅" :visible.sync="selectUserDia" width="70%">
<div class="body" style="height: 60vh;" v-if="selectUserDia">
<ValueTable ref="ValueTable2" :url="$api.user.selectCustomPageList" :componentData="componentData2" />
@@ -1038,6 +1033,11 @@
<filePreview v-if="lookFileVisible" :fileUrl="currentFile.url"
:currentFile="currentFile" style="max-height: 87vh;overflow-y: auto;"/>
</el-dialog>
+ <p style="font-size: 12px;color: red;margin-top: 20px;margin-bottom: 20px;">鍙屾柟鎵胯:<br/>
+ 1銆佸鎵樻柟鎵胯鎻愪緵鐨勪俊鎭笌鏍峰搧鐨勭湡瀹炴��;<br/>
+ 2銆佸鎵橀�佹牱妫�楠岀粨鏋滀粎閫傜敤浜庢敹鍒扮殑鏍峰搧;<br/>
+ 3銆佽瘯楠岃繃绋嬪鑷寸殑鏍峰搧鎹熷潖銆侀厤浠舵崯鍧忋�佹崯鑰楋紝鏈祴璇曞満涓嶆壙鎷呰禂鍋胯矗浠�;<br/>
+ 4銆佸疄楠屽鎵胯鍏寮�灞曟娴嬫椿鍔紝骞舵壙璇轰繚瀹堝湪妫�娴嬫椿鍔ㄨ繃绋嬩腑鎵�鑾风煡鐨勪繚瀵嗕俊鎭��</p>
</div>
</template>
@@ -1925,6 +1925,13 @@
}
}
}
+
+ let index0 = sampleList.findIndex(m=>!m.sample)
+ if(index0>-1) return this.$message.error('璇峰~鍐欐牱鍝佸悕绉�')
+ let index1 = sampleList.findIndex(m=>!m.modelNum)
+ if(index1>-1) return this.$message.error('璇峰~鍐欎骇鍝佸瀷鍙�')
+
+
let projectNum = this.totalArr.filter(a => a.state == 1).length
if(projectNum==0){
this.$confirm('妫�楠岄」鐩负绌猴紝鏄惁纭鎻愪氦?', "鎻愮ず", {
@@ -2475,22 +2482,6 @@
this.models = val.children
this.getNodeParent(node)
- let flag = false
- if (node.level == 3) {
- if(node.data.children.length>0){
- node.data.children.forEach(a => {
- let key = Object.keys(a)
- if(!key.includes('level')) {
- flag = true
- }
- })
-
- }
- }
- this.selectTree = this.selectTree.replace(' - ', '')
- if(flag) {
- this.selectTree = '- - ' + this.selectTree
- }
let data = this.selectTree.split(' - ')
let data2 = ''
for (let index = data.length - 1; index >= 0; index--) {
@@ -2521,27 +2512,24 @@
return data.label.indexOf(value) !== -1;
},
activeStandardTree() {
- let trees = this.selectTree.split(" - ")
+ if(this.selectTree == null || this.selectTree == '') return this.$message.error('鏈�夋嫨鏍峰搧绫诲瀷')
+ let trees = this.selectTree.split(" - ").filter(m=>m)
if (trees.length < 3) {
- this.$message.error('鏈�夋嫨瀵硅薄')
+ this.$message.error('鏈�夋嫨鏍峰搧绫诲埆')
return
}
- this.addObj.factory = trees[0]
- this.addObj.laboratory = trees[1]
- this.addObj.sampleType = trees[2]
- if (trees[3] === undefined || trees[3] === '' || trees[3] === '- ') {
- this.addObj.sample = trees[2]
- } else {
- this.addObj.sample = trees[3]
- }
- this.addObj.model = (trees[4] == undefined ? null : trees[4])
+ this.addObj.factory = '涓ぉ绉戞妧妫�娴嬩腑蹇�'
+ this.addObj.laboratory = '閫氫俊浜у搧瀹為獙瀹�'
+ this.addObj.sampleType = trees[0]
+ this.addObj.sample = trees[1]
+ this.addObj.model = trees[2]
this.selectStandardTree = false
this.sampleList = []
for (var i = 0; i < this.addObj.sampleNum; i++) {
this.sample.joinName = null
this.sample.joinModel = null
this.sample.joinNum = 1
- this.sample.sample = this.addObj.sample
+ // this.sample.sample = this.addObj.sample
this.sample.model = this.addObj.model
this.sample.unit = this.addObj.unit
this.sample.standardMethodListId = []
@@ -2559,23 +2547,10 @@
selectsStandardMethodByFLSSM() {
this.methodLoad = true
this.$axios.post(this.$api.standardTree.selectsStandardMethodByFLSSM, {
- tree: this.selectTree
+ tree: '涓ぉ绉戞妧妫�娴嬩腑蹇�'+' - '+'閫氫俊浜у搧瀹為獙瀹�'+' - '+this.selectTree
}).then(res => {
this.methodLoad = false
- try {
- if (res.data.standardMethodList.length == 0 && this.selectTree.split('-').length == 5) {
- 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, {
- tree: selectTree
- }).then(ress => {
- this.methods = ress.data.standardMethodList
- })
- } else {
- this.methods = res.data.standardMethodList
- }
- } catch (e) {}
+ this.methods = res.data.standardMethodList
})
},
addStandardTree() {
@@ -2586,7 +2561,7 @@
this.sample.joinName = null
this.sample.joinModel = null
this.sample.joinNum = 1
- this.sample.sample = this.addObj.sample
+ // this.sample.sample = this.addObj.sample
this.sample.model = this.addObj.model
this.sample.unit = this.addObj.unit
this.sample.standardMethodListId = []
@@ -2723,29 +2698,6 @@
}
return item
})
- const select = this.selectTree.split(' - ')
- if (row.inspectionItem === '娓╁害寰幆' && select[2] === '鍏夌紗' && row.state === 1&&this.isAskOnlyRead) {
- this.circulateShow = true;
- return
- } else if (row.inspectionItem === '娓╁害寰幆' && select[2] === '鍏夌紗' && row.state === 0) {
- this.circulateShow = false;
- }
- if ((row.inspectionItem === '娓╁崌璇曢獙' || row.inspectionItem === '鐑惊鐜�') && row.state === 1) {
- // console.log('row---', row)
- this.temperatureTitle = `${row.inspectionItem}瑕佹眰濉啓`
- this.isShowInput = row.inspectionItem === '鐑惊鐜�'
- this.temId = row.id
- this.temperatureShow = true;
- return
- } else if ((row.inspectionItem === '娓╁崌璇曢獙' || row.inspectionItem === '鐑惊鐜�') && row.state === 0) {
- this.temperatureShow = false;
- }
- // if (row.inspectionItem === '鍗曟牴鍨傜洿鐕冪儳' && select[2] === '鍏夌紗' && row.state === 1) {
- // this.singleVerticalCombustionShow = true;
- // return
- // } else if (row.inspectionItem === '鍗曟牴鍨傜洿鐕冪儳' && select[2] === '鍏夌紗' && row.state === 0) {
- // this.singleVerticalCombustionShow = false;
- // }
this.changeProductList0()
if(this.sampleSelectionList.length>0){
@@ -2915,7 +2867,7 @@
this.$axios.post(this.$api.standardTree.selectStandardProductList, {
model: (this.addObj.model?this.addObj.model:row.model) + '-' + row.modelNum+';'+row.testRequirements,
standardMethodListId: val.join(','),
- factory: selectTreeList.join(" - "),
+ factory: '涓ぉ绉戞妧妫�娴嬩腑蹇�'+' - '+'閫氫俊浜у搧瀹為獙瀹�'+' - '+selectTreeList.join(" - "),
}, {
headers: {
'Content-Type': 'application/json'
@@ -3065,30 +3017,6 @@
this.$refs.productTable.clearSelection()
return
}
- const select = this.selectTree.split(' - ')
- if (p.inspectionItem === '娓╁害寰幆' && select[2] === '鍏夌紗' && p.state === 1&&this.isAskOnlyRead) {
- this.circulateShow = true;
- return
- } else if (p.inspectionItem === '娓╁害寰幆' && select[2] === '鍏夌紗' && p.state === 0) {
- this.circulateShow = false;
- }
- if ((p.inspectionItem === '娓╁崌璇曢獙' || p.inspectionItem === '鐑惊鐜�') && p.state === 1) {
- // console.log('p---', p)
- this.temperatureTitle = `${p.inspectionItem}瑕佹眰濉啓`
- this.isShowInput = p.inspectionItem === '鐑惊鐜�'
- this.temId = p.id
- this.temperatureShow = true;
- return
- } else if ((p.inspectionItem === '娓╁崌璇曢獙' || p.inspectionItem === '鐑惊鐜�') && p.state === 0) {
- this.temperatureShow = false;
- }
- /* if (p.ask.includes('RTS')&&p.state === 1) {
- p.rts = ''
- this.bsm3Val = ''
- this.bsm3 = true
- this.bsm3Dia = true
- this.bsmRow3.push(p)
- } */
})
if (e.length > 0) {
this.sampleList.map(item => {
diff --git a/src/main.js b/src/main.js
index b6fd273..c5d1d74 100644
--- a/src/main.js
+++ b/src/main.js
@@ -21,11 +21,11 @@
//鏈湴
// Vue.prototype.LOCATIONVUE = "http://127.0.0.1:80";
// const javaApi = 'http://127.0.0.1:8001';
-// const javaApi = 'http://172.20.10.5:8001';
+const javaApi = 'http://192.168.0.104:8001';
// //閫氫俊娴嬭瘯搴�
// Vue.prototype.LOCATIONVUE = "http://10.1.13.77:8080";
-const javaApi = 'http://10.1.13.77:8001';
+// const javaApi = 'http://10.1.13.77:8001';
// 閫氫俊姝e紡搴�
// Vue.prototype.LOCATIONVUE = "https://ztwxlims.ztt.cn:7443";
--
Gitblit v1.9.3