| | |
| | | <div class="ins_order_add"> |
| | | <div v-show="!configShow"> |
| | | <el-row class="title"> |
| | | <el-col :span="6" style="padding-left: 20px;">委托单信息</el-col> |
| | | <el-col :span="6" style="padding-left: 20px;">委托单信息 总价:<span style="color: #3A7BFA">¥{{total}}</span></el-col> |
| | | <el-col :span="18" style="text-align: right;"> |
| | | <el-select v-model="template" size="medium" placeholder="下单模板" style="margin-right: 10px;" v-show="active==1" |
| | | @change="selectInsOrderTemplateById"> |
| | |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | <fiberOpticConfig :currentId="currentId" v-if="configShow" :active="active" /> |
| | | <fiberOpticConfig :currentId="currentId" |
| | | @saveFiberopticConfig="getTotal()" |
| | | v-if="configShow" :active="active" /> |
| | | <el-dialog title="检测到特殊项,请作出以下选择" :visible.sync="bsm1Dia" width="500px" :show-close="false" :before-close="beforeClose"> |
| | | <div class="body" style="max-height: 60vh;"> |
| | | <el-row v-if="bsm1"> |
| | |
| | | bsmRow: null, |
| | | bsm1: false, |
| | | bsm1Val: null, |
| | | bsm1Dia: false |
| | | bsm1Dia: false, |
| | | total:0, |
| | | } |
| | | }, |
| | | watch: { |
| | | sampleList() { |
| | | this.addObj.method = null |
| | | this.productList = [] |
| | | }, |
| | | productList:{ |
| | | deep:true, |
| | | handler(val){ |
| | | if(val&&val.length>0){ |
| | | let arr = []; |
| | | val.forEach(item => { |
| | | if(item.sonLaboratory&&!arr.find(a=>a.value==item.sonLaboratory)){ |
| | | arr.push({ |
| | | text: item.sonLaboratory, |
| | | value: item.sonLaboratory |
| | | }) |
| | | } |
| | | }) |
| | | this.filters = arr |
| | | } |
| | | } |
| | | }, |
| | | sampleList:{ |
| | | deep:true, |
| | | handler(val){ |
| | | this.getTotal() |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | this.selectEnumByCategoryForUnit() |
| | | this.selectStandardMethods() |
| | | this.selectEnumByCategoryForOrderType() |
| | | this.selectEnumByCategoryForSonLaboratory() |
| | | // this.selectEnumByCategoryForSonLaboratory() |
| | | this.selectEnumByCategoryForSampleForm() |
| | | if (this.active != 1) { |
| | | // 查看/审核流程 |
| | |
| | | } |
| | | } |
| | | done() |
| | | }, |
| | | getTotal(){ |
| | | let arr = [] |
| | | this.total = 0; |
| | | this.sampleList.forEach(item=>{ |
| | | if(item.insProduct&&item.insProduct.length>0){ |
| | | item.insProduct.forEach(a=>{ |
| | | arr.push(a) |
| | | }) |
| | | } |
| | | if(item.bushing&&item.bushing.length>0){ |
| | | item.bushing.forEach(a=>{ |
| | | if(a.fiber&&a.fiber.length>0){ |
| | | a.fiber.forEach(b=>{ |
| | | if(b.productList&&b.productList.length>0){ |
| | | b.productList.forEach(c=>{ |
| | | arr.push(c) |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | if(a.fibers&&a.fibers.length>0){ |
| | | a.fibers.forEach(b=>{ |
| | | if(b.productList&&b.productList.length>0){ |
| | | b.productList.forEach(c=>{ |
| | | arr.push(c) |
| | | }) |
| | | } |
| | | if(b.fiber&&b.fiber.length>0){ |
| | | b.fiber.forEach(c=>{ |
| | | if(c.productList&&c.productList.length>0){ |
| | | c.productList.forEach(d=>{ |
| | | arr.push(d) |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | let mySet = new Set(); |
| | | let arr0 = arr.filter(item=>{ |
| | | if(item.state == 1){ |
| | | let num1= mySet.size |
| | | if(item.manHourGroup===''||!item.manHourGroup){ |
| | | return true |
| | | }else{ |
| | | mySet.add(item.manHourGroup) |
| | | let num2= mySet.size |
| | | if(num2 > num1){ |
| | | return true |
| | | }else{ |
| | | return false |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | arr0.forEach(item=>{ |
| | | this.total += Number(item.price) |
| | | }) |
| | | } |
| | | } |
| | | } |