| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | issuedDialogVisible: false, |
| | | distributeData: { |
| | | appointed: '', |
| | | userId: '' |
| | | userId: '', |
| | | sonLaboratory:'' |
| | | }, |
| | | personList: [], |
| | | upLoad: false, |
| | |
| | | temperatureTitle: '', |
| | | temperatureTestNum: '', |
| | | isShowInput: false, |
| | | temId: '' |
| | | temId: '', |
| | | sonLaboratoryList:[] |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | item.tell = ask |
| | | } |
| | | }) |
| | | console.log('ask---', ask) |
| | | // console.log('ask---', ask) |
| | | this.temperatureShow = false |
| | | }, |
| | | temperatureShowClose () { |
| | |
| | | }, |
| | | |
| | | handleTemperatureTestChange (value) { |
| | | console.log('value---', value) |
| | | // console.log('value---', value) |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.opticalProjectList = val; |
| | |
| | | isHaveBushing = false |
| | | } |
| | | }) |
| | | console.log('isHaveBushing===', isHaveBushing) |
| | | // console.log('isHaveBushing===', isHaveBushing) |
| | | if (productListSelected && select[2] === '光缆' && isHaveBushing === false) { |
| | | this.$message.error('光缆温度循环项目必须进行光纤配置') |
| | | |
| | |
| | | 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 |
| | | })), |
| | |
| | | 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 |
| | |
| | | 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 |
| | |
| | | } |
| | | }, |
| | | 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)){ |
| | |
| | | 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 |
| | |
| | | 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 => { |
| | |
| | | if (item.manHourGroup === '' || !item.manHourGroup) { |
| | | return true |
| | | } else { |
| | | console.log(item) |
| | | mySet.add(item.manHourGroup) |
| | | let num2 = mySet.size |
| | | if (num2 > num1) { |
| | |
| | | }) |
| | | 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) { |
| | |
| | | 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 |
| | | } |
| | | } |
| | | } |
| | | } |