| | |
| | | <template> |
| | | <div class="ins_order_config"> |
| | | <div> |
| | | <el-row class="title"> |
| | | <el-col :span="6" style="padding-left: 20px;text-align: left;">辅助线芯配置</el-col> |
| | | <el-col :span="18" style="text-align: right;"> |
| | | <el-button size="medium" @click="outConfig"> |
| | | <span style="color: #3A7BFA;">返 回</span> |
| | | </el-button> |
| | | <el-button size="medium" type="primary" @click="save">保 存</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="search"> |
| | | <el-radio-group v-model="currentTab" size="small" style="margin-left: 20px;" @input="changeTab"> |
| | | <el-radio-button label="绝缘">绝 缘</el-radio-button> |
| | | <!-- <el-radio-button label="护套">护 套</el-radio-button>--> |
| | | </el-radio-group> |
| | | <div v-if="currentTab=='绝缘'" class="search_thing"> |
| | | <div class="search_label">芯数:</div> |
| | | <el-select v-model="auxiliaryWireCore.num" allow-create |
| | | clearable |
| | | default-first-option |
| | | filterable |
| | | multiple |
| | | size="small"> |
| | | <el-option v-for="item in quantityList" :key="item.value" :label="item.label" :value="item.value"></el-option> |
| | | </el-select> |
| | | <div class="search_form"> |
| | | <div class="search_input"> |
| | | <el-radio-group v-model="currentTab" size="small" style="margin-right: 20px;" @input="changeTab"> |
| | | <el-radio-button label="绝缘">绝 缘</el-radio-button> |
| | | </el-radio-group> |
| | | <el-form :model="auxiliaryWireCore" ref="entity" size="small" :inline="true"> |
| | | <el-form-item label="芯数" prop="num"> |
| | | <el-select v-model="auxiliaryWireCore.num" allow-create clearable default-first-option filterable multiple |
| | | size="small"> |
| | | <el-option v-for="item in quantityList" :key="item.value" :label="item.label" |
| | | :value="item.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="检验标准" prop="standardMethodListIds"> |
| | | <el-select v-model="auxiliaryWireCore.standardMethodListIds" disabled placeholder="请选择检验标准" size="small" |
| | | @change="(value) => methodChange(value)" multiple> |
| | | <el-option v-for="item in standards" :key="item.id" :label="item.code" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <!-- <div v-if="currentTab=='绝缘'" class="search_thing">--> |
| | | <!-- <div class="search_label">型号参数:</div>--> |
| | | <!-- <el-input v-model="auxiliaryWireCore.modelNum" clearable size="small"--> |
| | | <!-- @input="methodChange(auxiliaryWireCore.standardMethodListId)"></el-input>--> |
| | | <!-- </div>--> |
| | | <div v-if="currentTab=='绝缘'" class="search_thing"> |
| | | <div class="search_label">检验标准:</div> |
| | | <el-select v-model="auxiliaryWireCore.standardMethodListId" disabled placeholder="请选择检验标准" |
| | | size="small" |
| | | @change="(value)=>methodChange(value)"> |
| | | <el-option v-for="item in standards" :key="item.id" :label="item.code" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | <div> |
| | | <el-button size="small" @click="outConfig">返 回</el-button> |
| | | <el-button size="small" type="primary" @click="save">保 存</el-button> |
| | | </div> |
| | | <!-- <div class="search_thing" v-if="currentTab=='护套'">--> |
| | | <!-- <div class="search_label">检验标准:</div>--> |
| | | <!-- <el-select v-model="sheath.standardMethodListId" placeholder="请选择检验标准" size="small"--> |
| | | <!-- disabled--> |
| | | <!-- @change="(value)=>methodChange(value)">--> |
| | | <!-- <el-option v-for="item in standards" :key="item.id" :label="item.code" :value="item.id">--> |
| | | <!-- </el-option>--> |
| | | <!-- </el-select>--> |
| | | <!-- </div>--> |
| | | </div> |
| | | <div class="table"> |
| | | <el-table ref="productTable" v-loading="getProductLoad" :data="productList" |
| | | :row-class-name="tableRowClassName" border class="el-table" height="100%" |
| | | style="margin-bottom: 10px;" tooltip-effect="dark" @select="upProductSelect" |
| | | @selection-change="selectProduct" @select-all="handleAll"> |
| | | <el-table ref="productTable" v-loading="getProductLoad" :data="productList" :row-class-name="tableRowClassName" |
| | | border class="el-table" :height="'calc(100vh - 200px)'" |
| | | :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" tooltip-effect="dark" @select="upProductSelect" |
| | | @selection-change="selectProduct" @select-all="handleAll"> |
| | | <el-table-column :selectable="selectable" type="selection" width="65"></el-table-column> |
| | | <el-table-column label="检验项分类" min-width="140" prop="inspectionItemClass" show-overflow-tooltip></el-table-column> |
| | | <el-table-column label="检验项分类" min-width="140" prop="inspectionItemClass" |
| | | show-overflow-tooltip></el-table-column> |
| | | <el-table-column label="检验项" min-width="140" prop="inspectionItem" show-overflow-tooltip> |
| | | <template slot="header" slot-scope="scope"> |
| | | <div style="display: flex;align-items: center;flex-direction: column;font-size: 14px"> |
| | | <span>检验项</span> |
| | | <el-input |
| | | v-if="active==1" |
| | | v-model="inspectionItem" |
| | | placeholder="请输入" |
| | | size="mini" |
| | | @input="searchFilterList"/> |
| | | <el-input v-if="active == 1" v-model="inspectionItem" placeholder="请输入" size="mini" |
| | | @input="searchFilterList" /> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <template slot="header" slot-scope="scope"> |
| | | <div style="display: flex;align-items: center;flex-direction: column;font-size: 14px"> |
| | | <span>检验项子项</span> |
| | | <el-input |
| | | v-if="active==1" |
| | | v-model="inspectionItemSubclass" |
| | | placeholder="请输入" |
| | | size="mini" |
| | | @input="searchFilterList"/> |
| | | <el-input v-if="active == 1" v-model="inspectionItemSubclass" placeholder="请输入" size="mini" |
| | | @input="searchFilterList" /> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="要求描述" min-width="220px" prop="tell"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.tell" :autosize="{ minRows: 1, maxRows: 3}" clearable placeholder="要求描述" |
| | | size="small" type="textarea"></el-input> |
| | | <el-input v-model="scope.row.tell" :autosize="{ minRows: 1, maxRows: 3 }" clearable placeholder="要求描述" |
| | | size="small" type="textarea"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="要求值" min-width="220px" prop="ask"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.ask" :autosize="{ minRows: 1, maxRows: 3}" clearable placeholder="要求值" |
| | | size="small" type="textarea"></el-input> |
| | | <el-input v-model="scope.row.ask" :autosize="{ minRows: 1, maxRows: 3 }" clearable placeholder="要求值" |
| | | size="small" type="textarea"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="条件" min-width="140" prop="radius" show-overflow-tooltip> |
| | | <el-table-column label="试验条件" min-width="140" prop="radius" show-overflow-tooltip> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="!scope.row.inspectionItem.includes('高温压力试验')" v-model="scope.row.radius" :autosize="{ minRows: 1, maxRows: 3}" clearable placeholder="要求描述" |
| | | size="small" type="textarea"> |
| | | <el-input v-if="!scope.row.inspectionItem.includes('高温压力试验')" v-model="scope.row.radius" |
| | | :autosize="{ minRows: 1, maxRows: 3 }" clearable placeholder="要求描述" size="small" type="textarea"> |
| | | </el-input> |
| | | <el-select v-if="scope.row.inspectionItem.includes('高温压力试验')" v-model="scope.row.radius" clearable |
| | | placeholder="条件" |
| | | size="small"> |
| | | <el-option v-for="(a,i) in JSON.parse(scope.row.radiusList)" :key="i" :label="a" :value="a"></el-option> |
| | | placeholder="条件" size="small"> |
| | | <el-option v-for="(a, i) in JSON.parse(scope.row.radiusList)" :key="i" :label="a" :value="a"></el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <template slot="header" slot-scope="scope"> |
| | | <div style="display: flex;align-items: center;flex-direction: column;font-size: 14px"> |
| | | <span>试验方法</span> |
| | | <el-input |
| | | v-if="active==1" |
| | | v-model="methodS" |
| | | placeholder="请输入" |
| | | size="mini" |
| | | @input="searchFilterList"/> |
| | | <el-input v-if="active == 1" v-model="methodS" placeholder="请输入" size="mini" @input="searchFilterList" /> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | |
| | | <script> |
| | | import { Tree } from 'element-ui' |
| | | import { selectsStandardMethodByFLSSM, selectStandardProductList } from "@/api/business/rawMaterialOrder"; |
| | | export default { |
| | | props: { |
| | | active: { |
| | | type: Number, |
| | | default: () => 0 |
| | | type: String, |
| | | default: () => '0' |
| | | }, |
| | | sampleSelectionList: { |
| | | type: Array, |
| | |
| | | tree: '', |
| | | standards: [], |
| | | auxiliaryWireCore: { |
| | | standardMethodListId: null, |
| | | standardMethodListIds: [], |
| | | insProduct: [], |
| | | num: [], |
| | | modelNum: '' |
| | |
| | | } |
| | | }, |
| | | // 要求值变化时 |
| | | requestChange(e, row,type) { |
| | | requestChange(e, row, type) { |
| | | this.sampleList.map(item => { |
| | | if (this.sampleIds.indexOf(item.id) > -1) { |
| | | item.insProduct.map(i => { |
| | | if(i.id == row.id){ |
| | | if(row.repetitionTag){ |
| | | if(row.repetitionTag==i.repetitionTag){ |
| | | if (i.id == row.id) { |
| | | if (row.repetitionTag) { |
| | | if (row.repetitionTag == i.repetitionTag) { |
| | | i[type] = e |
| | | } |
| | | }else{ |
| | | if(!i.repetitionTag){ |
| | | } else { |
| | | if (!i.repetitionTag) { |
| | | i[type] = e |
| | | } |
| | | } |
| | |
| | | this.$refs.productTable.doLayout() |
| | | }) |
| | | }, |
| | | tableRowClassName({ |
| | | row, |
| | | rowIndex |
| | | }) { |
| | | tableRowClassName({ row, rowIndex }) { |
| | | if (row.state === 0) { |
| | | return ''; |
| | | } |
| | |
| | | }, |
| | | selectsStandardMethodByFLSSM2() { |
| | | this.standards = [] |
| | | this.$axios.post(this.$api.standardTree.selectsStandardMethodByFLSSM, { |
| | | selectsStandardMethodByFLSSM({ |
| | | tree: this.$parent.selectTree |
| | | }).then(res => { |
| | | try { |
| | |
| | | let arr = this.selectTree.split('-') |
| | | let arr0 = arr.slice(0, arr.length - 1) |
| | | let selectTree = arr0.join('-').substring(0, arr0.join('-').length - 1) |
| | | this.$axios.post(this.$api.standardTree.selectsStandardMethodByFLSSM, { |
| | | selectsStandardMethodByFLSSM({ |
| | | tree: selectTree |
| | | }).then(ress => { |
| | | this.standards = ress.data.standardMethodList |
| | |
| | | } catch (e) { |
| | | } |
| | | }) |
| | | this.auxiliaryWireCore.standardMethodListId = this.sampleSelectionList[0].standardMethodListId |
| | | this.auxiliaryWireCore.standardMethodListIds = this.sampleSelectionList[0].standardMethodListId |
| | | // 查询检测标准下拉框选项 |
| | | if (this.auxiliaryWireCore.insProduct.length > 0) { |
| | | this.productList = this.auxiliaryWireCore.insProduct |
| | |
| | | } |
| | | }, |
| | | methodChange(val) { |
| | | if (val === null || val === '') return |
| | | if (!val || val.length < 1) return |
| | | this.getProductLoad = true |
| | | let standard = this.standards.find(a => a.id === val) |
| | | this.isAskOnlyRead = standard != null && standard.code === '技术要求'; |
| | |
| | | const conductorMaterial = this.sampleSelectionList[0].conductorMaterial |
| | | const conductorType = this.sampleSelectionList[0].conductorType |
| | | const modelNum = this.sampleSelectionList[0].modelNum |
| | | this.$axios.post(this.$api.standardTree.selectStandardProductList, { |
| | | selectStandardProductList({ |
| | | model: this.$parent.addObj.model ? this.$parent.addObj.model : model, |
| | | modelNum: modelNum, |
| | | standardMethodListId: val, |
| | | standardMethodListIds: val, |
| | | factory: selectTreeList.join(" - "), |
| | | cores: cores, |
| | | conductorMaterial: conductorMaterial, |
| | |
| | | this.$refs.productTable.toggleRowSelection(row, true); |
| | | }, |
| | | save() { |
| | | // if(this.auxiliaryWireCore.insProduct.length === 0 && this.sheath.insProduct.length === 0){ |
| | | // this.$message.error('缺少配置无法保存') |
| | | // return |
| | | // } |
| | | if (this.auxiliaryWireCore.insProduct.length !== 0) { |
| | | if (this.auxiliaryWireCore.num.length === 0) { |
| | | this.$message.error('缺少芯数无法保存') |
| | | return |
| | | } |
| | | } |
| | | // this.sample.forEach(a=>{ |
| | | // a.auxiliaryWireCore = this.auxiliaryWireCore |
| | | // a.sheath = this.sheath |
| | | // }) |
| | | this.auxiliaryWireCore.insProduct = this.productList |
| | | this.auxiliaryWireCore.insProduct = this.HaveJson(this.productList) |
| | | this.auxiliaryWireCore.insProduct.forEach(a => { |
| | | delete a.id |
| | | }) |
| | | if (this.currentTab === '绝缘') { |
| | | this.sample.forEach(a => { |
| | | a.auxiliaryWireCore = this.auxiliaryWireCore |
| | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .ins_order_config { |
| | | width: 100%; |
| | | height: 100%; |
| | | overflow-y: auto; |
| | | overflow-x: hidden; |
| | | } |
| | | |
| | | .ins_order_config::-webkit-scrollbar { |
| | | width: 0; |
| | | } |
| | | |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | |
| | | .search { |
| | | background-color: #fff; |
| | | height: 80px; |
| | | .search_form { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_thing { |
| | | width: 300px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 100px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 70px); |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .table { |
| | | margin-top: 10px; |
| | | background-color: #fff; |
| | | width: calc(100% - 40px); |
| | | height: calc(100% - 60px - 80px - 26px - 24px); |
| | | padding: 20px; |
| | | } |
| | | </style> |
| | | <style> |
| | | .ins_order_config .has-gutter .el-table__cell .cell { |
| | | line-height: 30px; |
| | | background-color: #fafafa; |
| | |
| | | font-size: 12px; |
| | | } |
| | | |
| | | .ins_order_config .el-table .warning-row .cell { |
| | | color: #3A7BFA; |
| | | >>>.warning-row { |
| | | color: #1890FF; |
| | | } |
| | | </style> |