From 58faef5c48c7491fe14e2a3ec0a0db4dba8967a6 Mon Sep 17 00:00:00 2001 From: licp <lichunping@guanfang.com.cn> Date: 星期二, 23 七月 2024 17:23:49 +0800 Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/center-lims-before into master --- src/components/do/b1-ins-order/add.vue | 81 ++++++++++++++++++++++++++++++++-------- 1 files changed, 65 insertions(+), 16 deletions(-) diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue index 17c467f..6d38eb9 100644 --- a/src/components/do/b1-ins-order/add.vue +++ b/src/components/do/b1-ins-order/add.vue @@ -565,8 +565,17 @@ <el-col class="search_thing" :span="22"> <div class="search_label"><span class="required-span" v-if="addObj.type == 2">* </span>鎸囨淳浜哄憳锛�</div> <div class="search_input"> - <el-select v-model="distributeData.userId" placeholder="璇烽�夋嫨" size="small" filterable style="width: 100%;"> + <el-select v-model="distributeData.userId" placeholder="璇烽�夋嫨" size="small" filterable style="width: 100%;" @change="changeUser"> <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value"> + </el-option> + </el-select> + </div> + </el-col> + <el-col class="search_thing" :span="22" v-if="distributeData.userId"> + <div class="search_label"><span class="required-span">* </span>璇曢獙瀹わ細</div> + <div class="search_input"> + <el-select v-model="distributeData.sonLaboratory" placeholder="璇烽�夋嫨" size="small" filterable style="width: 100%;"> + <el-option v-for="item in sonLaboratoryList" :key="item.value" :label="item.label" :value="item.value"> </el-option> </el-select> </div> @@ -840,11 +849,13 @@ <el-button type="primary" @click="spliceData">淇濆瓨</el-button> </span> </el-dialog> + <!-- 鐢靛姏璇曢獙瀹�---娓╁崌璇曢獙/鐑惊鐜� --> <el-dialog :title="temperatureTitle" :visible.sync="temperatureShow" width="260px" :before-close="temperatureShowClose" :show-close="false"> <div> <div v-if="isShowInput" style="margin-bottom: 6px"> <span>寰幆娆℃暟:</span> - <el-input size="small" type="number" v-model="temperatureTestNum" style="width: 120px"></el-input> + <!-- <el-input size="small" type="number" v-model="temperatureTestNum" style="width: 120px"></el-input> --> + <el-input-number v-model="temperatureTestNum" :min="2" :max="1000000" size="small" label=""></el-input-number> </div> <el-checkbox-group v-model="temperatureTest" @change="handleTemperatureTestChange" style="display: flex;flex-direction: column;"> <el-checkbox v-for="item in temperatureList" :label="item" :key="item" style="margin-bottom: 6px">{{item}}</el-checkbox> @@ -983,7 +994,8 @@ issuedDialogVisible: false, distributeData: { appointed: '', - userId: '' + userId: '', + sonLaboratory:'' }, personList: [], upLoad: false, @@ -1050,7 +1062,8 @@ temperatureTitle: '', temperatureTestNum: '', isShowInput: false, - temId: '' + temId: '', + sonLaboratoryList:[] } }, watch: { @@ -1229,7 +1242,7 @@ item.tell = ask } }) - console.log('ask---', ask) + // console.log('ask---', ask) this.temperatureShow = false }, temperatureShowClose () { @@ -1278,7 +1291,7 @@ }, handleTemperatureTestChange (value) { - console.log('value---', value) + // console.log('value---', value) }, handleSelectionChange(val) { this.opticalProjectList = val; @@ -1475,7 +1488,7 @@ isHaveBushing = false } }) - console.log('isHaveBushing===', isHaveBushing) + // console.log('isHaveBushing===', isHaveBushing) if (productListSelected && select[2] === '鍏夌紗' && isHaveBushing === false) { this.$message.error('鍏夌紗娓╁害寰幆椤圭洰蹇呴』杩涜鍏夌氦閰嶇疆') @@ -1728,9 +1741,22 @@ str: JSON.stringify({ insOrder: this.addObj, list: JSON.stringify(sampleList.map(a => { - a.model = a.model + ((a.modelNum == null || a.modelNum == '' || a.modelNum == 'null') ? - '' : ( - '-' + a.modelNum)) + if (this.PROJECT === '瑁呭鐢电紗') { + if (a.modelNum) { + const index = a.modelNum.indexOf('脳') + if (index === 0) { + a.model = a.model + a.modelNum + } else if (index === -1) { + a.model = a.model + '-' + a.modelNum + } else { + a.model = a.modelNum + a.model + } + } else { + a.model = a.model + ((a.modelNum == null || a.modelNum == '' || a.modelNum == 'null') ? '' : ('-' + a.modelNum)) + } + } else { + a.model = a.model + ((a.modelNum == null || a.modelNum == '' || a.modelNum == 'null') ? '' : ('-' + a.modelNum)) + } a.insProduct = a.insProduct.filter(b=>b.state === 1) return a })), @@ -1801,11 +1827,16 @@ this.$message.error('鎸囨淳浜哄憳鏈~鍐�') return } + if (this.distributeData.userId&&(this.distributeData.sonLaboratory== null ||this.distributeData.sonLaboratory== '')) { + this.$message.error('璇曢獙瀹ゆ湭濉啓') + return + } this.upLoad = true; this.$axios.post(this.$api.insOrder.upInsOrder, { orderId: this.distributeData.orderId, appointed: this.distributeData.appointed, - userId: this.distributeData.userId + userId: this.distributeData.userId, + sonLaboratory:this.distributeData.sonLaboratory }).then(res => { if (res.code === 201) { this.upLoad = false @@ -2069,7 +2100,7 @@ this.circulateShow = false; } if ((row.inspectionItem === '娓╁崌璇曢獙' || row.inspectionItem === '鐑惊鐜�') && row.state === 1) { - console.log('row---', row) + // console.log('row---', row) this.temperatureTitle = `${row.inspectionItem}瑕佹眰濉啓` this.isShowInput = row.inspectionItem === '鐑惊鐜�' this.temId = row.id @@ -2322,7 +2353,7 @@ } }, handleAll(e) { - console.log('e---', e) + // console.log('e---', e) if (e.length > 0) { this.productList.map(m => { if(e.find(a=>a.id == m.id)){ @@ -2372,7 +2403,7 @@ this.circulateShow = false; } if ((p.inspectionItem === '娓╁崌璇曢獙' || p.inspectionItem === '鐑惊鐜�') && p.state === 1) { - console.log('p---', p) + // console.log('p---', p) this.temperatureTitle = `${p.inspectionItem}瑕佹眰濉啓` this.isShowInput = p.inspectionItem === '鐑惊鐜�' this.temId = p.id @@ -2655,7 +2686,7 @@ getTotal() { this.totalArr = [] this.total = 0; - console.log(this.sampleList) + // console.log(this.sampleList) this.sampleList.forEach(item => { if (item.insProduct && item.insProduct.length > 0) { item.insProduct.forEach(a => { @@ -2701,7 +2732,6 @@ if (item.manHourGroup === '' || !item.manHourGroup) { return true } else { - console.log(item) mySet.add(item.manHourGroup) let num2 = mySet.size if (num2 > num1) { @@ -2714,6 +2744,20 @@ }) arr0.forEach(item => { this.total += Number(item.price) + }) + let arr1 = this.totalArr.filter(item => item.state == 1) + let mySet0 = new Set(); + this.sonLaboratoryList = [] + arr1.forEach(item => { + let num1 = mySet0.size + mySet0.add(item.sonLaboratory) + let num2 = mySet0.size + if(num2>num1){ + this.sonLaboratoryList.push({ + label:item.sonLaboratory, + value:item.sonLaboratory, + }) + } }) }, bsm2Up(val) { @@ -2730,6 +2774,11 @@ for (let a of set) { this.bsm2Val2.push(this.HaveJson(this.bsm2Val3[a - 1])) } + }, + changeUser(){ + if(this.sonLaboratoryList.length>0){ + this.distributeData.sonLaboratory = this.sonLaboratoryList[0].value + } } } } -- Gitblit v1.9.3