| | |
| | | <el-row class="title"> |
| | | <el-col :span="6" style="padding-left: 20px;">光纤配置</el-col> |
| | | <el-col :span="18" style="text-align: right;"> |
| | | <el-button size="medium" type="primary" @click="save" :loading="saveLoad">保 存</el-button> |
| | | <el-button size="medium" type="primary" @click="save" :loading="saveLoad" v-if="active==1">保 存</el-button> |
| | | <el-button size="medium" @click="outConfig"> |
| | | <span style="color: #3A7BFA;">返 回</span> |
| | | </el-button> |
| | |
| | | <label style="width: 70px;">样品型号</label> |
| | | <span style="font-size: 14px;">{{models}}</span> |
| | | </div> |
| | | <el-radio-group v-model="packageInfo.radio" size="small" @change="upNum()"> |
| | | <el-radio-group v-model="packageInfo.radio" size="small" @change="upNum()" :disabled="active!=1"> |
| | | <el-radio :label="0">全检</el-radio> |
| | | <el-radio :label="1">抽检</el-radio> |
| | | </el-radio-group> |
| | |
| | | style="display: flex;align-items: center;justify-content: space-between;margin-bottom: 8px;padding: 0 12px;box-sizing: border-box;"> |
| | | <div class="search-item" style="margin-right: 10px;"> |
| | | <label>套管数目</label> |
| | | <el-input v-model="packageInfo.num1" placeholder="请输入" size="small" @change="upNum"></el-input> |
| | | <el-input v-model="packageInfo.num1" placeholder="请输入" size="small" @change="upNum" :disabled="active!=1"></el-input> |
| | | </div> |
| | | <div class="search-item" style="margin-right: 10px;"> |
| | | <label style="width: 70px;">标准量</label> |
| | | <el-input v-model="packageInfo.standNum" placeholder="请输入" size="small" @change="upNum"></el-input> |
| | | <el-input v-model="packageInfo.standNum" placeholder="请输入" size="small" @change="upNum" :disabled="active!=1"></el-input> |
| | | </div> |
| | | <div class="search-item"> |
| | | <label style="width: 70px;">检测量</label> |
| | | <el-input v-model="packageInfo.testNum" placeholder="请输入" size="small" @change="upNum" |
| | | :disabled="packageInfo.radio===0"></el-input> |
| | | :disabled="packageInfo.radio===0||active!=1"></el-input> |
| | | </div> |
| | | </div> |
| | | <el-table ref="table0" :data="bushing" tooltip-effect="dark" style="width: 100%" height="203px" size="small" |
| | | @selection-change="handleSelectionChange1"> |
| | | <el-table-column type="selection" width="45"> |
| | | @selection-change="handleSelectionChange1" |
| | | :header-cell-class-name="setClassName0"> |
| | | <el-table-column |
| | | type="selection" |
| | | width="45" |
| | | :selectable="()=>(active==1)"> |
| | | </el-table-column> |
| | | <el-table-column label="管色标" show-overflow-tooltip> |
| | | <template slot-scope="scope"> |
| | | <el-select v-model="scope.row.color" size="mini"> |
| | | <el-select v-model="scope.row.color" size="mini" :disabled="active!=1"> |
| | | <el-option v-for="(color,i) in colors" :key="i" :label="color.lable" |
| | | :value="color.value"></el-option> |
| | | </el-select> |
| | |
| | | @select="upProductSelect" |
| | | > |
| | | <el-table-column type="selection" width="55" |
| | | :selectable="()=>(currentDetectionItems||this.multiFiberList.length > 0)"> |
| | | :selectable="()=>((currentDetectionItems||this.multiFiberList.length > 0)&&active==1)"> |
| | | </el-table-column> |
| | | <el-table-column label="实验室" show-overflow-tooltip prop="sonLaboratory" ></el-table-column> |
| | | <el-table-column prop="inspectionItem" label="检验项" show-overflow-tooltip> |
| | |
| | | </el-table-column> |
| | | <el-table-column prop="ask" label="检测要求" show-overflow-tooltip width="200px"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.ask" placeholder="请输入" size="small"></el-input> |
| | | <el-input v-model="scope.row.ask" placeholder="请输入" size="small" :disabled="active!=1" v-if="!isAskOnlyRead"></el-input> |
| | | <span v-else>{{ scope.row.ask }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | <div class="grid-content"> |
| | | <h5>光纤带 |
| | | <el-button size="mini" type="primary" class="btns" @click="addFibers" |
| | | :disabled="packageInfo.ismiers===false||miresModel===null||miresStandard===null">生成光纤带</el-button> |
| | | <el-button size="mini" class="btns" @click="clearFibers" :disabled="selectBushing.length === 0">清除</el-button> |
| | | :disabled="packageInfo.ismiers===false||miresModel===null||miresStandard===null" v-if="active==1">生成光纤带</el-button> |
| | | <el-button size="mini" class="btns" @click="clearFibers" :disabled="selectBushing.length === 0" v-if="active==1">清除</el-button> |
| | | </h5> |
| | | <div |
| | | style="display: flex;align-items: center;justify-content: space-between;margin:4px 0 6px 0;padding: 0 12px;box-sizing: border-box;"> |
| | | <div class="search-item" style="width: 50%;margin-right: 16px;"> |
| | | <label style="width: 80px;">纤带类型</label> |
| | | <el-select v-model="miresModel" placeholder="请选择" size="small" style="width: 100%;" |
| | | :disabled="selectBushing.length===0"> |
| | | :disabled="selectBushing.length===0||active!=1"> |
| | | <el-option v-for="(item,a) in miresModels" :key="a" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | |
| | | <div class="search-item" style="width: 50%;"> |
| | | <label style="width: 80px;">参考标准</label> |
| | | <el-select v-model="miresStandard" placeholder="请选择" size="small" style="width: 100%;" |
| | | :disabled="miresModel===null" @focus="selectsStandardMethodByFLSSM2()" |
| | | :disabled="miresModel===null||active!=1" @focus="selectsStandardMethodByFLSSM2()" |
| | | @change="(value)=>methodChange2(value)"> |
| | | <el-option v-for="item in miresStandards" :key="item.id" :label="item.code" :value="item.id"> |
| | | </el-option> |
| | |
| | | </div> |
| | | </div> |
| | | <el-table ref="table2" :data="fibersList" tooltip-effect="dark" style="width: 100%" height="270px" |
| | | size="small" @selection-change="handleSelectionChange" highlight-current-row @row-click="rowClickFiber"> |
| | | <el-table-column type="selection" width="55"> |
| | | size="small" @selection-change="handleSelectionChange" highlight-current-row @row-click="(row, column, event)=>rowClickFiber(row, column, event,0)" |
| | | :header-cell-class-name="setClassName0"> |
| | | <el-table-column |
| | | type="selection" |
| | | width="55" |
| | | :selectable="()=>(active==1)"> |
| | | </el-table-column> |
| | | <el-table-column prop="code" label="光纤带编号" show-overflow-tooltip align="center"> |
| | | </el-table-column> |
| | |
| | | <el-col :span="12"> |
| | | <div class="grid-content"> |
| | | <h5>光纤<el-button size="mini" type="primary" class="btns" @click="addFiber" |
| | | :disabled="mireModel===null||mireStandard===null">光纤配色</el-button></h5> |
| | | :disabled="mireModel===null||mireStandard===null" v-if="active==1">光纤配色</el-button></h5> |
| | | <div |
| | | style="display: flex;align-items: center;justify-content: space-between;margin: 4px 0 6px 0;padding: 0 12px;box-sizing: border-box;"> |
| | | <div class="search-item" style="width: 50%;margin-right: 16px;"> |
| | | <label style="width: 80px;">光纤类型</label> |
| | | <el-select v-model="mireModel" placeholder="请选择" size="small" style="width: 100%;" |
| | | :disabled="selectBushing.length===0"> |
| | | :disabled="selectBushing.length===0||active!=1"> |
| | | <el-option v-for="(item,a) in mireModels" :key="a" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | |
| | | <div class="search-item" style="width: 50%;"> |
| | | <label style="width: 80px;">参考标准</label> |
| | | <el-select v-model="mireStandard" placeholder="请选择" size="small" style="width: 100%;" |
| | | :disabled="mireModel===null" @focus="selectsStandardMethodByFLSSM()" |
| | | :disabled="mireModel===null||active!=1" @focus="selectsStandardMethodByFLSSM()" |
| | | @change="(value)=>methodChange(value)" :loading="mireStandardLoading"> |
| | | <el-option v-for="item in mireStandards" :key="item.id" :label="item.code" :value="item.id"> |
| | | </el-option> |
| | |
| | | </div> |
| | | <el-table ref="table3" :data="fiberList" tooltip-effect="dark" style="width: 100%" height="270px" |
| | | size="small" highlight-current-row @selection-change="handleSelectionChange4" |
| | | @row-click="rowClickFiber"> |
| | | <el-table-column type="selection" width="55"> |
| | | @row-click="(row, column, event)=>rowClickFiber(row, column, event,1)" |
| | | :header-cell-class-name="setClassName0"> |
| | | <el-table-column |
| | | type="selection" |
| | | width="55" |
| | | :selectable="()=>(active==1)"> |
| | | </el-table-column> |
| | | <el-table-column prop="bushColor" label="管套色标" width="90" align="center"> |
| | | </el-table-column> |
| | | <el-table-column prop="color" label="光纤色标" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-select v-model="scope.row.color" size="mini"> |
| | | <el-select v-model="scope.row.color" size="mini" :disabled="active!=1"> |
| | | <el-option v-for="(color,i) in colors" :key="i" :label="color.lable" |
| | | :value="color.value"></el-option> |
| | | </el-select> |
| | |
| | | |
| | | <script> |
| | | export default { |
| | | props: { |
| | | active: { |
| | | type: Number, |
| | | default: () => 0 |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | saveLoad: false, |
| | |
| | | detectionItems:[], |
| | | currentDetectionItems:null, |
| | | mireStandardLoading:false, |
| | | multiFiberList:[] |
| | | multiFiberList:[], |
| | | isAskOnlyRead:true |
| | | } |
| | | }, |
| | | computed: { |
| | | isAllDisabled() { |
| | | return this.multiFiberList.length > 0||this.currentDetectionItems |
| | | return this.multiFiberList.length > 0||this.currentDetectionItems||this.active!=1 |
| | | }, |
| | | }, |
| | | watch: { |
| | |
| | | } |
| | | }) |
| | | }, |
| | | rowClickFiber(row, column, event){ |
| | | rowClickFiber(row, column, event,type){ |
| | | if(type==0){ |
| | | let standard = this.miresStandards.find(a => a.id == this.miresStandard) |
| | | if(standard&&standard.code=='委托要求'){ |
| | | this.isAskOnlyRead = false; |
| | | }else{ |
| | | this.isAskOnlyRead = true; |
| | | } |
| | | }else{ |
| | | let standard = this.mireStandards.find(a => a.id == this.mireStandard) |
| | | if(standard&&standard.code=='委托要求'){ |
| | | this.isAskOnlyRead = false; |
| | | }else{ |
| | | this.isAskOnlyRead = true; |
| | | } |
| | | } |
| | | this.currentDetectionItems = row |
| | | this.detectionItems = row.productList |
| | | if(this.detectionItems === null) return |
| | |
| | | return 'all-disabled' |
| | | } |
| | | }, |
| | | setClassName0({ column }){ |
| | | if (column.type == 'selection' && this.active!=1) { |
| | | return 'all-disabled' |
| | | } |
| | | }, |
| | | clearFibers(){ |
| | | this.packageInfo.ismiers = false |
| | | this.fibersList = [] |