| | |
| | | </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_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-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 v-model="addObj.mating" @change="$refs.sampleTable.doLayout()"> |
| | | <el-radio-group v-model="addObj.mating" @change="$refs.sampleTable.doLayout()" :disabled="active>1"> |
| | | <el-radio :label="1">是</el-radio> |
| | | <el-radio :label="0">否</el-radio> |
| | | </el-radio-group> |
| | |
| | | <div class="search_label">委托人:</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" :placeholder="active>1 ? '' : '请输入'" clearable v-model="addObj.prepareUser" :readonly="active>1"></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-date-picker |
| | | v-model="addObj.appointed" |
| | | :disabled="active>1" |
| | | type="date" |
| | | placeholder="选择日期" |
| | | size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | </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-date-picker |
| | | v-model="addObj.issueTime" |
| | | :disabled="active>1" |
| | | type="date" |
| | | placeholder="选择日期" |
| | | size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing upload" :span="4" style="align-items: flex-start;height: auto" v-if="active==1"> |
| | | <el-upload |
| | | style="margin: 8px 0 0px 50px;" |
| | | action="#" |
| | | :auto-upload="false" |
| | | accept='.jpg,.jpeg,.png,.gif,.docx,.xls,.xlsx,.pdf,.zip,.rar,.csv' :on-change="handleChangeUpload"> |
| | | <el-button size="small" type="primary">上传附件</el-button> |
| | | </el-upload> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="8"> |
| | | <div class="search_input" style="width: 100%;margin-left: 40px;"> |
| | | <el-radio-group v-model="ruleInfo.rule" @change="$refs.sampleTable.doLayout()" :disabled="active>1"> |
| | | <el-radio :label="1">不考虑不确定度</el-radio> |
| | | <el-radio :label="2">考虑不确定度<el-input placeholder="" v-model="ruleInfo.num" style="width: 100px;margin-left: 10px;" size="mini" :disabled="active>1"> |
| | | <template slot="append">%</template> |
| | | </el-input></el-radio> |
| | | </el-radio-group> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="6" style="align-items: flex-start;margin: 8px 0;"> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <el-radio-group v-model="currentPage" v-if="active>1" size="small" style="margin-top: 20px;"> |
| | | <el-radio-button :label="0">样品</el-radio-button> |
| | | <el-radio-button :label="1">附件</el-radio-button> |
| | | </el-radio-group> |
| | | <el-table class="el-table sampleTable" ref="sampleTable" :data="sampleList" max-height="400px" tooltip-effect="dark" |
| | | border @selection-change="selectSample" highlight-current-row @row-click="rowClick" style="margin-top: 10px;"> |
| | | border @selection-change="selectSample" highlight-current-row @row-click="rowClick" style="margin-top: 10px;" v-show="currentPage==0"> |
| | | <el-table-column type="selection" width="60" :selectable="selectable" v-if="active==1"></el-table-column> |
| | | <el-table-column type="index" label="序号" width="65" align="center"></el-table-column> |
| | | <el-table-column prop="sample" label="样品名称" align="center" min-width="100"> |
| | |
| | | @clear="methodChange(scope.row.standardMethodListId, scope.row)"></el-input> |
| | | </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> |
| | | </el-table-column> |
| | | <el-table-column prop="standardMethodListId" label="检验标准" align="center" min-width="100"> |
| | | <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 = []" 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> |
| | |
| | | </el-table> |
| | | <el-table class="el-table" ref="productTable" :data="productList" max-height="400px" tooltip-effect="dark" border |
| | | @selection-change="selectProduct" style="margin-bottom: 10px;" @select="upProductSelect" |
| | | :row-class-name="tableRowClassName" v-loading="getProductLoad" @select-all="handleAll"> |
| | | :row-class-name="tableRowClassName" v-loading="getProductLoad" @select-all="handleAll" v-show="currentPage==0"> |
| | | <el-table-column type="selection" width="65" :selectable="selectable" v-if="active==1"></el-table-column> |
| | | <el-table-column prop="inspectionItemClass" v-if="PROJECT === '装备电缆'" label="检验项分类" min-width="140" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="inspectionItemClassEn" v-if="PROJECT === '装备电缆'" label="检验项分类(EN)" min-width="140" show-overflow-tooltip></el-table-column> |
| | |
| | | <el-table-column prop="sonLaboratory" label="子实验室" min-width="130" show-overflow-tooltip :filters="filters" |
| | | :filter-method="filterHandler"></el-table-column> |
| | | </el-table> |
| | | <ValueTable class="value-table" ref="fileList" :url="$api.insOrderPlan.getFileList" |
| | | :componentData="componentData0" |
| | | :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" /> |
| | |
| | | <el-button type="primary" @click="spliceTemperatureTest">保存</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog |
| | | title="文件预览" |
| | | :visible.sync="lookFileVisible" |
| | | width="60%" fullscreen> |
| | | <filePreview v-if="lookFileVisible" :fileUrl="currentFile.url" |
| | | :currentFile="currentFile" style="max-height: 87vh;overflow-y: auto;"/> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import equipConfig from './equip-config.vue' |
| | | import cableConfig from './cable-config.vue' |
| | | import Vue from 'vue' |
| | | import filePreview from '../../tool/file-preview.vue' |
| | | |
| | | export default { |
| | | components: { |
| | |
| | | fiberOpticConfig, |
| | | fiberOpticConfigTwo, |
| | | equipConfig, |
| | | cableConfig |
| | | cableConfig, |
| | | filePreview |
| | | }, |
| | | props: { |
| | | examine: { |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | currentFile:{}, |
| | | lookFileVisible:false, |
| | | inspectionItemST: null, |
| | | sampleSelectionList: [],//样品表格选中数据 |
| | | editTable:[], |
| | |
| | | type: '0', |
| | | code: null, |
| | | appointed: null, |
| | | issueTime:null, |
| | | remark: null, |
| | | otcCode: null, |
| | | mating: 0, |
| | |
| | | deaprtEnum:[], |
| | | standard:[], |
| | | createState:1,//1:选择委托单位,2:选择生产单位 |
| | | fileList:[], |
| | | currentPage:0,//0:样品信息,1:附件 |
| | | componentData0: { |
| | | entity: { |
| | | insOrderId:'' |
| | | }, |
| | | isIndex: true, |
| | | showSelect: false, |
| | | select: false, |
| | | sort: false, |
| | | init:false, |
| | | do: [ |
| | | { |
| | | id: 'handleDown', |
| | | font: '下载', |
| | | type: 'text', |
| | | method: 'handleDown' |
| | | }, |
| | | { |
| | | id: '1', |
| | | font: '预览', |
| | | type: 'text', |
| | | method: 'lookFile', |
| | | } |
| | | ], |
| | | isPage: false, |
| | | linkEvent: {}, |
| | | tagField: { |
| | | type:{ |
| | | select:[ |
| | | { |
| | | value: 1, |
| | | label: '图片' |
| | | }, |
| | | { |
| | | value: 2, |
| | | label: '文件' |
| | | } |
| | | ] |
| | | } |
| | | }, |
| | | currentId: '', |
| | | selectField: {}, |
| | | requiredAdd: [], |
| | | requiredUp: [] |
| | | }, |
| | | ruleInfo:{ |
| | | rule:null, |
| | | num:null, |
| | | } |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | this.addObj = { |
| | | ...res.data.insOrder |
| | | }; |
| | | if(this.addObj.rule){ |
| | | if(this.addObj.rule=='不考虑不确定度'){ |
| | | this.ruleInfo.rule = 1 |
| | | }else{ |
| | | this.ruleInfo.rule = 2 |
| | | this.ruleInfo.num = this.addObj.rule.split('-')[1] |
| | | } |
| | | } |
| | | this.addObj.type = String(this.addObj.type) |
| | | this.sampleList = this.HaveJson(res.data.sampleProduct) |
| | | this.sampleList.forEach(m=>{ |
| | |
| | | } |
| | | }) |
| | | }) |
| | | // 文件信息 |
| | | this.componentData0.entity.insOrderId = this.currentId |
| | | this.$refs.fileList.selectList() |
| | | } |
| | | }, |
| | | methods: { |
| | | lookFile(row){ |
| | | this.currentFile = row; |
| | | if(row.type==1){ |
| | | this.currentFile.url = this.javaApi+'/img/'+row.fileUrl |
| | | }else{ |
| | | this.currentFile.url = this.javaApi+'/word/'+row.fileUrl |
| | | } |
| | | this.lookFileVisible = true |
| | | }, |
| | | handleDown(row){ |
| | | this.$axios.post(this.$api.insOrderPlan.downFile, { |
| | | id: row.id, |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | let url = ''; |
| | | if(res.data.type==1){ |
| | | url = this.javaApi+'/img/'+res.data.fileUrl |
| | | file.downloadIamge(url,row.fileName) |
| | | }else{ |
| | | url = this.javaApi+'/word/'+res.data.fileUrl |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = row.fileName; |
| | | link.click(); |
| | | } |
| | | } |
| | | }).catch(error => { |
| | | |
| | | }) |
| | | }, |
| | | handleChangeUpload(file, fileLists){ |
| | | this.fileList = fileLists |
| | | }, |
| | | //特殊值填写处理 |
| | | inputValueHandler(row,index){ |
| | | if(row){ |
| | |
| | | this.$message.error('请输入样品名称') |
| | | } else if (!this.sampleList.every(m => m.model)) { |
| | | this.$message.error('请输入样品型号') |
| | | }else if (!this.addObj.appointed) { |
| | | this.$message.error('请选择约定时间') |
| | | }else if (!this.addObj.issueTime) { |
| | | this.$message.error('请选择样机完成时间') |
| | | } else if (!this.sampleList.every(m => m.standardMethodListId&&m.standardMethodListId.length>0)) { |
| | | this.$message.error('请选择检验标准') |
| | | } else if(this.addObj.formType&&this.addObj.formType!='其他成品'&&!this.addObj.issueUser){ |
| | | this.$message.error('请选择下发对象') |
| | | this.$message.error('请选择通知至样机员') |
| | | }else{ |
| | | //校验检验项的要求值和要求描述,仅委托要求 |
| | | // if(this.active==1&&this.isAskOnlyRead){ |
| | |
| | | }) |
| | | return false; |
| | | } |
| | | if(this.ruleInfo.rule==1){ |
| | | this.addObj.rule = '不考虑不确定度' |
| | | }else if(this.ruleInfo.rule==2){ |
| | | if(this.ruleInfo.rule==2&&(!this.ruleInfo.num||this.ruleInfo.num<0||this.ruleInfo.num==0)){ |
| | | this.$message({ |
| | | type: 'error', |
| | | message: '请输入不确定度' |
| | | }) |
| | | return; |
| | | } |
| | | this.addObj.rule = '考虑不确定度'+'-'+this.ruleInfo.num |
| | | } |
| | | this.saveLoad = true |
| | | this.$axios.post(this.$api.insOrder.addInsOrder, { |
| | | str: JSON.stringify({ |
| | | let fd = new FormData(); |
| | | this.fileList.forEach((item,index)=>{ |
| | | //文件信息中raw才是真的文件 |
| | | fd.append("files",item.raw); |
| | | }) |
| | | fd.append("str",JSON.stringify({ |
| | | insOrder: this.addObj, |
| | | list: JSON.stringify(sampleList.map(a => { |
| | | if (this.PROJECT === '装备电缆') { |
| | |
| | | return a |
| | | })), |
| | | pairing: JSON.stringify(this.bsm2Val2) |
| | | }) |
| | | })); |
| | | this.$axios.post(this.$api.insOrder.addInsOrder, fd,{ |
| | | headers: { |
| | | 'Content-Type': 'multipart/form-data' |
| | | }, |
| | | noQs:true |
| | | }).then(res => { |
| | | this.saveLoad = false |
| | | if (res.code == 201) return |
| | |
| | | let selectTreeList = this.selectTree.split(" - ") |
| | | this.addObj.model&&(selectTreeList[selectTreeList.length - 1] = this.addObj.model) |
| | | this.$axios.post(this.$api.standardTree.selectStandardProductList, { |
| | | model: (this.addObj.model?this.addObj.model:row.model) + '-' + row.modelNum, |
| | | model: (this.addObj.model?this.addObj.model:row.model) + '-' + row.modelNum+';'+row.testRequirements, |
| | | standardMethodListId: val.join(','), |
| | | factory: selectTreeList.join(" - "), |
| | | }, { |