| | |
| | | <div class="search_label"><span class="required-span">* </span>制单人:</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" clearable disabled v-model="addObj.custom"></el-input> |
| | | <!-- <el-input readonly size="small" v-model="addObj.custom"> |
| | | <template slot="append"><el-button slot="append" icon="el-icon-search" @click="selectUserDia = true" |
| | | :disabled="active>1"></el-button></template> |
| | | </el-input> --> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="6"> |
| | | <div class="search_label"><span class="required-span">* </span>委托单位:</div> |
| | | <div class="search_input"> |
| | | <!-- <el-input size="small" placeholder="←选择委托客户" clearable disabled v-model="addObj.company"></el-input> --> |
| | | <el-input readonly size="small" v-model="addObj.company" placeholder="选择委托单位"> |
| | | <template slot="append"><el-button slot="append" icon="el-icon-search" @click="selectUserDia = true" |
| | | <template slot="append"><el-button slot="append" icon="el-icon-search" @click="selectUserDia = true,createState=1" |
| | | :disabled="active>1"></el-button></template> |
| | | </el-input> |
| | | </div> |
| | |
| | | <div class="search_label"><span class="required-span">* </span>联系方式:</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" placeholder="选择委托客户" clearable :readonly="active>1" v-model="addObj.phone"></el-input> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="6" v-if="addObj.orderType=='C'"> |
| | | <div class="search_label"><span class="required-span">* </span>下单至:</div> |
| | | <div class="search_input"> |
| | | <el-select size="small" style="width: 100%;" clearable v-model="addObj.departmentLimsId" :disabled="active>1" placeholder="部门"> |
| | | <el-option v-for="(a, ai) in deaprtEnum" :key="ai" :value="a.id" :label="a.name"></el-option> |
| | | </el-select> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="6"> |
| | |
| | | </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-select v-model="addObj.formType" size="small" :disabled="active>1" style="width: 100%;"> |
| | | <el-option v-for="(a,ai) in formType" :key="ai" :label="a.label" :value="a.value"></el-option> |
| | | </el-select> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="6"> |
| | | <el-col class="search_thing" :span="6" v-if="addObj.formType==='其他成品'"> |
| | | <div class="search_label">零件号:</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" :placeholder="active>1 ? '' : '请输入'" clearable v-model="addObj.partNo" |
| | | :readonly="active>1"></el-input> |
| | | </div> |
| | | </el-col> |
| | | <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-select v-model="addObj.issueUser" size="small" :disabled="active>1" style="width: 100%;"> |
| | | <el-option v-for="(a,ai) in personList" :key="ai" :label="a.label" :value="a.value"></el-option> |
| | | </el-select> |
| | | </div> |
| | | </el-col> |
| | | <!-- <el-col class="search_thing" :span="6"> |
| | | <div class="search_label">报告发送方式:</div> |
| | | <div class="search_input"> |
| | | <el-radio-group v-model="addObj.send"> |
| | |
| | | <el-radio :label="0">其他</el-radio> |
| | | </el-radio-group> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="6"> |
| | | </el-col> --> |
| | | <!-- <el-col class="search_thing" :span="6"> |
| | | <div class="search_label">样品处理方式:</div> |
| | | <div class="search_input"> |
| | | <el-radio-group v-model="addObj.processing"> |
| | |
| | | <el-radio :label="1">实验室处理</el-radio> |
| | | </el-radio-group> |
| | | </div> |
| | | </el-col> |
| | | </el-col> --> |
| | | <el-col class="search_thing" :span="6"> |
| | | <div class="search_label">工程名称:</div> |
| | | <div class="search_input"> |
| | |
| | | <el-col class="search_thing" :span="6"> |
| | | <div class="search_label"><span class="required-span">* </span>生产单位:</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" placeholder="请输入" clearable v-model="addObj.production" |
| | | :readonly="active>1"></el-input> |
| | | <!-- <el-input size="small" placeholder="请输入" clearable v-model="addObj.production" |
| | | :readonly="active>1"></el-input> --> |
| | | <el-input size="small" v-model="addObj.production" placeholder="选择生产单位" :readonly="active>1"> |
| | | <template slot="append"><el-button slot="append" icon="el-icon-search" @click="selectUserDia = true,createState=2" |
| | | :disabled="active>1"></el-button></template> |
| | | </el-input> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="6"> |
| | |
| | | :readonly="active>1"></el-input> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="6"> |
| | | <!-- <el-col class="search_thing" :span="6"> |
| | | <div class="search_label">是否留样:</div> |
| | | <div class="search_input"> |
| | | <el-radio-group v-model="addObj.isLeave"> |
| | |
| | | <el-radio :label="1">留样</el-radio> |
| | | </el-radio-group> |
| | | </div> |
| | | </el-col> |
| | | </el-col> --> |
| | | <el-col class="search_thing" :span="6"> |
| | | <div class="search_label" style="width: 175px;">是否涉及配套样品:</div> |
| | | <div class="search_input" style="width: calc(100% - 175px);"> |
| | |
| | | </el-radio-group> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="6"> |
| | | <!-- <el-col class="search_thing" :span="6"> |
| | | <div class="search_label">OTC订单号:</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" :placeholder="active>1 ? '' : '请输入'" clearable v-model="addObj.otcCode" :readonly="active>1"></el-input> |
| | | </div> |
| | | </el-col> |
| | | </el-col> --> |
| | | <el-col class="search_thing" :span="6"> |
| | | <div class="search_label">委托人:</div> |
| | | <div class="search_input"> |
| | |
| | | <div class="search_thing"> |
| | | <div class="search_label">检验标准:</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="standardMethodListId" :placeholder="active>1 ? '' : '请输入'" size="small" @focus="methodFocus" |
| | | :loading="methodLoad" @change="changeStandardMethodListId"> |
| | | <el-select v-model="standardMethodListId" :placeholder="active>1 ? '' : '请输选择'" size="small" @focus="methodFocus" |
| | | :loading="methodLoad" multiple @change="changeStandardMethodListId"> |
| | | <el-option v-for="item in methods" :key="item.id" :label="item.code" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | |
| | | <el-input size="small" v-model="scope.row.sample" clearable :readonly="active>1"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="sampleCode" label="样品编号" min-width="140" align="center"> |
| | | <el-table-column prop="sampleCode" label="样品编号" min-width="100" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-input size="small" v-model="scope.row.sampleCode" clearable placeholder="不填写则系统自动生成" |
| | | :readonly="active>1"></el-input> |
| | |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="modelNum" label="型号参数" width="130" 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="非必填" |
| | | @keyup.enter.native="methodChange(scope.row.standardMethodListId, scope.row)" |
| | |
| | | <template slot-scope="scope"> |
| | | <el-select v-model="scope.row.standardMethodListId" :disabled="scope.row.model==null||active>1" |
| | | placeholder="检验标准" size="small" :loading="methodLoad" @change="(value)=>methodChange(value, scope.row)" |
| | | @focus="methodFocus" :readonly="active>1" style="width: 100%;" clearable @clear="productList = []"> |
| | | @focus="methodFocus" :readonly="active>1" style="width: 100%;" clearable @clear="productList = []" multiple> |
| | | <el-option v-for="item in methods" :key="item.id" :label="item.code" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <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> |
| | | <el-option v-for="item in standard" :key="item.id" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | |
| | | <template slot-scope="scope"> |
| | | <el-input size="small" placeholder="要求描述" v-model="scope.row.tell" clearable type="textarea" |
| | | :autosize="{ minRows: 1, maxRows: 3}" @change="e=>requestChange(e,scope.row,'tell')" |
| | | v-if="active==1&&isAskOnlyRead"></el-input> |
| | | v-if="active==1"></el-input> |
| | | <span v-else> |
| | | <template >{{ scope.row.tell }}</template> |
| | | </span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="ask" label="要求值" min-width="220px" v-if="isAskOnlyRead"> |
| | | <el-table-column prop="ask" label="要求值" min-width="220px" > |
| | | <template slot-scope="scope"> |
| | | <el-input size="small" placeholder="要求值" v-model="scope.row.ask" clearable type="textarea" |
| | | :autosize="{ minRows: 1, maxRows: 3}" @change="e=>requestChange(e,scope.row,'ask')" |
| | | v-if="active==1&&isAskOnlyRead&&scope.row.inspectionValueType!='5'"></el-input> |
| | | v-if="active==1&&scope.row.inspectionValueType!='5'"></el-input> |
| | | <span v-else> |
| | | <!-- <template v-if="(scope.row.ask.indexOf('D')>-1 |
| | | ||scope.row.ask.indexOf('W')>-1 |
| | |
| | | <el-button type="primary" @click="selectUser">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog title="选择样品" :visible.sync="selectStandardTree" width="400px"> |
| | | <el-dialog title="选择样品" :visible.sync="selectStandardTree" width="500px"> |
| | | <div class="body" style="height: 60vh;overflow-y: auto;user-select: none;" v-if="selectStandardTree"> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | |
| | | import equipConfig from './equip-config.vue' |
| | | import cableConfig from './cable-config.vue' |
| | | import Vue from 'vue' |
| | | import {iuCharts} from "../../../util/echarts"; |
| | | |
| | | export default { |
| | | components: { |
| | |
| | | production: null, |
| | | productionEn: null, |
| | | companyId: null, |
| | | prepareUser:null |
| | | prepareUser:null, |
| | | departmentLimsId:null, |
| | | departmentLims:null, |
| | | partNo: null, // 零件号 |
| | | }, |
| | | sample: { |
| | | sampleCode: null, |
| | |
| | | RTS: '', |
| | | totalArr: [], |
| | | model: null, |
| | | standardMethodListId: null, |
| | | standardMethodListId: [], |
| | | symbolList:[ |
| | | 'RTS','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'], |
| | | inspectionItem:null, |
| | |
| | | temId: '', |
| | | sonLaboratoryList:[], |
| | | selectiveEcho: [], // 检验下单的时候勾选检验项目,如果使用筛选提交显示检验项目为空 回显列表 |
| | | deaprtEnum:[], |
| | | standard:[], |
| | | createState:1,//1:选择委托单位,2:选择生产单位 |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | }, |
| | | 'addObj.sample'(val) { |
| | | this.model = null |
| | | this.standardMethodListId = null |
| | | this.standardMethodListId = [] |
| | | }, |
| | | 'addObj.sampleNum'(val) { |
| | | this.model = null |
| | | this.standardMethodListId = null |
| | | this.standardMethodListId = [] |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | // this.selectInsOrderTemplate() |
| | | this.getAuthorizedPerson(); |
| | | this.selectEnumByCategoryForUnit() |
| | | this.selectEnumByCategoryForStandard() |
| | | this.selectStandardMethods() |
| | | this.selectEnumByCategoryForOrderType() |
| | | this.selectDepartmentEnum() |
| | | // this.selectEnumByCategoryForSonLaboratory() |
| | | this.selectEnumByCategoryForSampleForm() |
| | | if (this.active != 1) { |
| | |
| | | ...res.data.insOrder |
| | | }; |
| | | this.addObj.type = String(this.addObj.type) |
| | | this.sampleList = this.HaveJson(res.data.sampleProduct); |
| | | this.sampleList = this.HaveJson(res.data.sampleProduct) |
| | | this.sampleList.forEach(m=>{ |
| | | m.standardMethodListId = JSON.parse(m.standardMethodListId) |
| | | }); |
| | | this.getProNum() |
| | | this.addObj.sampleNum = this.sampleList.length |
| | | this.$nextTick(() => { |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | | //特殊值填写处理 |
| | | inputValueHandler(row,index){ |
| | | if(row){ |
| | |
| | | this.$message.error('未选择数据') |
| | | return |
| | | } |
| | | this.addObj.company = selects.company |
| | | this.addObj.code = selects.code |
| | | this.addObj.companyId = selects.id |
| | | this.selectUserDia = false |
| | | if(this.active==1){ |
| | | // TODO |
| | | this.selectInsOrderTemplate() |
| | | if(this.createState==1){ |
| | | this.addObj.company = selects.company |
| | | this.addObj.code = selects.code |
| | | this.addObj.companyId = selects.id |
| | | if(this.active==1){ |
| | | this.selectInsOrderTemplate() |
| | | } |
| | | }else if(this.createState==2){ |
| | | this.addObj.production = selects.company |
| | | // 如果选择的单位是没有对应的英文名称就用'/'代替 |
| | | if (!selects.companyEn) { |
| | | this.addObj.productionEn = '/' |
| | | } else { |
| | | this.addObj.productionEn = selects.companyEn |
| | | } |
| | | } |
| | | this.selectUserDia = false |
| | | }, |
| | | containsValue(str) { |
| | | if(str){ |
| | |
| | | return str.replace(find, value); |
| | | }, |
| | | save() { |
| | | if(this.addObj.orderType=='C'&&this.addObj.departmentLimsId){ |
| | | this.addObj.departmentLims = this.deaprtEnum.find(m=>m.id==this.addObj.departmentLimsId).name |
| | | }else if(this.addObj.orderType&&this.addObj.orderType!='C'&&!this.addObj.departmentLimsId){ |
| | | this.addObj.departmentLims = '检测中心' |
| | | this.addObj.departmentLimsId = this.deaprtEnum.find(m=>m.name=='检测中心').id |
| | | } |
| | | // else{ |
| | | // this.$message.error('请选择检验类别') |
| | | // return |
| | | // } |
| | | if (!this.addObj.companyId) { |
| | | this.$message.error('未选择客户单位') |
| | | return |
| | | } |
| | | let noLaboratory = this.totalArr.filter(a => a.state == 1&&!a.sonLaboratory) |
| | | if(noLaboratory.length>0){ |
| | | let str = '' |
| | | noLaboratory.forEach((m,j)=>{ |
| | | str += j==noLaboratory.length-1?m.inspectionItem+'-'+m.inspectionItemSubclass:m.inspectionItem+'-'+m.inspectionItemSubclass+',' |
| | | }) |
| | | this.$message.error(str+'没有关联实验室室,请联系管理员') |
| | | return |
| | | } |
| | | if (!this.addObj.type) { |
| | | this.$message.error('未选择紧急程度') |
| | | } else if (!this.addObj.formType) { |
| | | this.$message.error('请输入来样方式') |
| | | this.$message.error('请输入订单类型') |
| | | } else if (!this.addObj.orderType) { |
| | | this.$message.error('请选择检验类别') |
| | | } else if (!this.addObj.production) { |
| | | this.$message.error('请输入生产单位') |
| | | } else if (!this.addObj.productionEn) { |
| | | this.$message.error('请输入生产单位EN') |
| | | }else if (!this.addObj.departmentLimsId) { |
| | | this.$message.error('选择下单到哪个部门') |
| | | } else if (this.sampleList.length < 1) { |
| | | this.$message.error('请添加一个样品') |
| | | } else if (!this.sampleList.every(m => m.sample)) { |
| | | this.$message.error('请输入样品名称') |
| | | } else if (!this.sampleList.every(m => m.model)) { |
| | | this.$message.error('请输入样品型号') |
| | | } else if (!this.sampleList.every(m => m.standardMethodListId)) { |
| | | } else if (!this.sampleList.every(m => m.standardMethodListId&&m.standardMethodListId.length>0)) { |
| | | this.$message.error('请选择检验标准') |
| | | } else { |
| | | const select = this.selectTree.split(' - ') |
| | | const productListSelected = this.productListSelected.some(item => item.inspectionItem === '温度循环') |
| | | let isHaveBushing = '' |
| | | this.sampleList.forEach(item => { |
| | | if (!item.bushing || item.bushing.length === 0) { |
| | | isHaveBushing = false |
| | | } |
| | | }) |
| | | //过滤检测项:去除特殊项 |
| | | let filterProductList = this.productListSelected.filter(ele=>ele.bsm==0&&/[0-9]/.test(ele.ask)).filter(ele=>{ |
| | | if(select[1].indexOf('通信')>=0 && ['光缆','光纤'].includes(select[2])){ |
| | | return !['温度循环','光纤接头损耗'].includes(ele.inspectionItem) |
| | | } |
| | | return true |
| | | }).filter(ele=>{ |
| | | if(select[1].indexOf('电力')>=0){ |
| | | return !['温升试验','热循环'].includes(ele.inspectionItem) |
| | | } |
| | | return true |
| | | }) |
| | | } else if(this.addObj.formType&&this.addObj.formType!='其他成品'&&!this.addObj.issueUser){ |
| | | this.$message.error('请选择下发对象') |
| | | }else{ |
| | | //校验检验项的要求值和要求描述,仅委托要求 |
| | | if(this.active==1&&this.isAskOnlyRead){ |
| | | const isTrue = this.checkRequiredValueAndRemark(filterProductList) |
| | | if(!isTrue){ |
| | | this.$message.error('检验项的要求值与要求描述不匹配, 请检查') |
| | | return |
| | | } |
| | | } |
| | | |
| | | // console.log('isHaveBushing===', this.totalArr) |
| | | let spcialItem = this.totalArr.filter(a => a.state == 1 && a.inspectionItem.includes('松套管')) |
| | | if (productListSelected && select[2] === '光缆' && isHaveBushing === false&&spcialItem.length==0) { |
| | | this.$message.error('光缆温度循环项目必须进行光纤配置') |
| | | this.$refs.sampleTable.setCurrentRow(this.currentMethod, true) |
| | | this.rowClick(this.currentMethod) |
| | | this.sampleIds = [this.currentMethod.id] |
| | | this.openConfig() |
| | | return |
| | | }else if(spcialItem.length>0&& isHaveBushing === false){ |
| | | this.$message.error('松套管项目必须进行光纤配置') |
| | | // this.$refs.sampleTable.setCurrentRow(this.currentMethod, true) |
| | | // this.rowClick(this.currentMethod) |
| | | spcialItem.forEach(item=>{ |
| | | this.sampleIds.push(item.id) |
| | | }) |
| | | this.openConfig() |
| | | return |
| | | } |
| | | // if(this.active==1&&this.isAskOnlyRead){ |
| | | // const isTrue = this.checkRequiredValueAndRemark(filterProductList) |
| | | // if(!isTrue){ |
| | | // this.$message.error('检验项的要求值与要求描述不匹配, 请检查') |
| | | // return |
| | | // } |
| | | // } |
| | | let sampleList = this.HaveJson(this.sampleList) |
| | | let projectNum = this.totalArr.filter(a => a.state == 1).length |
| | | if(projectNum==0){ |
| | |
| | | } |
| | | } |
| | | }else{ |
| | | this.$message.error('要求值为空,需要去标准库维护!') |
| | | // this.$message.error('要求值为空,需要去标准库维护!') |
| | | } |
| | | } |
| | | // arr.forEach(f => { |
| | |
| | | } |
| | | }, |
| | | saveMethod(sampleList){ |
| | | let isHaveAsk = this.totalArr.filter(a => (a.ask === null||a.ask=='')&&a.state==1) |
| | | if (isHaveAsk.length > 0) { |
| | | this.$message({ |
| | | type: 'error', |
| | | message: '请填写要求值后再提交' |
| | | }) |
| | | return false; |
| | | } |
| | | let isHaveTell = this.totalArr.filter(a => (a.tell == null||a.tell=='')&&a.state==1) |
| | | if (isHaveTell.length > 0) { |
| | | this.$message({ |
| | | type: 'error', |
| | | message: '请填写要求描述后再提交' |
| | | }) |
| | | return false; |
| | | } |
| | | this.saveLoad = true |
| | | this.$axios.post(this.$api.insOrder.addInsOrder, { |
| | | str: JSON.stringify({ |
| | |
| | | this.distributeData.appointed = ress.data |
| | | }) |
| | | setTimeout(() => { |
| | | this.issuedDialogVisible = true; |
| | | // this.issuedDialogVisible = true; |
| | | // this.$message.success('提交成功') |
| | | this.upLoad = false |
| | | this.$parent.playOrder(0) |
| | | }, 1000) |
| | | }) |
| | | } else { |
| | |
| | | }) |
| | | }, |
| | | getProNum() { |
| | | this.sampleSelectionList.forEach((m, i) => { |
| | | Vue.set(this.sampleSelectionList[i], 'proNum', m.insProduct.filter(a => a.state == 1).length) |
| | | }) |
| | | if (this.active != 1) { |
| | | this.sampleList.forEach((m, i) => { |
| | | Vue.set(this.sampleList[i], 'proNum', m.insProduct.filter(a => a.state == 1).length) |
| | | }) |
| | | }else{ |
| | | this.sampleSelectionList.forEach((m, i) => { |
| | | Vue.set(this.sampleSelectionList[i], 'proNum', m.insProduct.filter(a => a.state == 1).length) |
| | | }) |
| | | } |
| | | this.$refs.sampleTable.doLayout() |
| | | }, |
| | | searchFilter() { |
| | |
| | | this.sample.sample = this.addObj.sample |
| | | this.sample.model = this.addObj.model |
| | | this.sample.unit = this.addObj.unit |
| | | this.sample.standardMethodListId = null |
| | | this.sample.standardMethodListId = [] |
| | | this.sample.insProduct = [] |
| | | this.sample.id = this.count |
| | | this.sample.childSampleList = [] |
| | |
| | | this.sample.sample = this.addObj.sample |
| | | this.sample.model = this.addObj.model |
| | | this.sample.unit = this.addObj.unit |
| | | this.sample.standardMethodListId = null |
| | | this.sample.standardMethodListId = [] |
| | | this.sample.insProduct = [] |
| | | this.sample.id = parseInt(i+1) |
| | | this.sample.childSampleList = [] |
| | |
| | | }, |
| | | rowClick(row, column, event) { |
| | | this.currentMethod = row |
| | | let obj = this.methods.find(a => a.id == this.currentMethod.standardMethodListId) |
| | | if (obj && obj.code == '委托要求') { |
| | | this.isAskOnlyRead = true |
| | | } else { |
| | | this.isAskOnlyRead = false |
| | | } |
| | | this.sampleId = row.id |
| | | if (this.active !== 1) { |
| | | this.sampleIds = [] |
| | |
| | | this.units = res.data |
| | | }) |
| | | }, |
| | | selectEnumByCategoryForStandard() { |
| | | this.$axios.post(this.$api.enums.selectEnumByCategory, { |
| | | category: "试验标准" |
| | | }).then(res => { |
| | | this.standard = res.data |
| | | }) |
| | | }, |
| | | selectEnumByCategoryForOrderType() { |
| | | this.$axios.post(this.$api.enums.selectEnumByCategory, { |
| | | category: "检验类别" |
| | |
| | | }, |
| | | selectEnumByCategoryForSampleForm() { |
| | | this.$axios.post(this.$api.enums.selectEnumByCategory, { |
| | | category: "来样方式" |
| | | category: "订单类型" |
| | | }).then(res => { |
| | | this.formType = res.data |
| | | if (this.formType.length > 0) { |
| | |
| | | }) |
| | | }, |
| | | methodChange(val, row) { |
| | | if (val === null || val === '') return |
| | | if (val === null || val === ''||val.length ==0) return |
| | | this.currentMethod = row |
| | | let obj = this.methods.find(a => a.id == this.currentMethod.standardMethodListId) |
| | | if (obj && obj.code == '委托要求') { |
| | | this.isAskOnlyRead = true |
| | | } else { |
| | | this.isAskOnlyRead = false |
| | | } |
| | | this.getProductLoad = true |
| | | let selectTreeList = this.selectTree.split(" - ") |
| | | this.addObj.model&&(selectTreeList[selectTreeList.length - 1] = this.addObj.model) |
| | | |
| | | console.log( this.selectTree); |
| | | this.$axios.post(this.$api.standardTree.selectStandardProductList, { |
| | | model: (this.addObj.model?this.addObj.model:row.model) + '-' + row.modelNum, |
| | | standardMethodListId: val, |
| | | standardMethodListId: val.join(','), |
| | | factory: selectTreeList.join(" - "), |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | this.getProductLoad = false |
| | | res.data.forEach(a => { |
| | | a.state = 0 |
| | | }) |
| | | row.insProduct = this.HaveJson(res.data) |
| | | this.getProductLoad = false |
| | | this.productList = row.insProduct |
| | | this.productList0 = JSON.parse(JSON.stringify(this.productList)) |
| | | this.$refs.sampleTable.setCurrentRow(row) |
| | |
| | | if (a.state == 1) this.toggleSelection(a) |
| | | }) |
| | | }, 200) |
| | | }).catch(e => { |
| | | this.getProductLoad = false |
| | | }) |
| | | this.searchProject() |
| | | this.searchTemList() |
| | |
| | | if(this.sonLaboratoryList.length>0){ |
| | | this.distributeData.sonLaboratory = this.sonLaboratoryList[0].value |
| | | } |
| | | }, |
| | | selectDepartmentEnum(){ |
| | | this.$axios.get(this.$api.department.selectDepartmentLimsEnum).then(res=>{ |
| | | this.deaprtEnum = res.data.filter(item=>item.name === '质量部' || item.name === '检测中心') |
| | | }) |
| | | } |
| | | } |
| | | } |