| | |
| | | v-show="active == 3 && addObj.companyId" |
| | | >通过</el-button |
| | | > |
| | | <el-button size="medium" @click="$parent.playOrder(0)"> |
| | | <el-button size="medium" @click="$router.go(-1)"> |
| | | <span style="color: #3a7bfa">返回</span> |
| | | </el-button> |
| | | </el-col> |
| | |
| | | placeholder="请输入" |
| | | class="search_input" |
| | | clearable |
| | | :readonly="active > 1" |
| | | :disabled="active > 1" |
| | | v-model="addObj.phone" |
| | | ></el-input> |
| | | </el-form-item> |
| | |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="报告发送方式:" prop="send"> |
| | | <el-radio-group v-model="addObj.send"> |
| | | <el-radio-group v-model="addObj.send" :disabled="active > 1"> |
| | | <el-radio :label="1">自取</el-radio> |
| | | <el-radio :label="0">其他</el-radio> |
| | | </el-radio-group> |
| | |
| | | prop="processing" |
| | | class="processing_input" |
| | | > |
| | | <el-radio-group v-model="addObj.processing" size="mini"> |
| | | <el-radio-group |
| | | v-model="addObj.processing" |
| | | :disabled="active > 1" |
| | | size="mini" |
| | | > |
| | | <el-radio :label="0">委托单位取回</el-radio> |
| | | <el-radio :label="1">实验室处理</el-radio> |
| | | </el-radio-group> |
| | |
| | | :placeholder="active > 1 ? '' : '请输入'" |
| | | clearable |
| | | v-model="addObj.engineering" |
| | | :readonly="active > 1" |
| | | :disabled="active > 1" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | :placeholder="active > 1 ? '' : '请输入'" |
| | | clearable |
| | | v-model="addObj.engineeringEn" |
| | | :readonly="active > 1" |
| | | :disabled="active > 1" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | placeholder="请输入" |
| | | clearable |
| | | v-model="addObj.production" |
| | | :readonly="active > 1" |
| | | :disabled="active > 1" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | placeholder="请输入" |
| | | clearable |
| | | v-model="addObj.productionEn" |
| | | :readonly="active > 1" |
| | | :disabled="active > 1" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="是否留样:" prop="isLeave"> |
| | | <el-radio-group v-model="addObj.isLeave"> |
| | | <el-radio-group v-model="addObj.isLeave" :disabled="active > 1"> |
| | | <el-radio :label="0">不留样</el-radio> |
| | | <el-radio :label="1">留样</el-radio> |
| | | </el-radio-group> |
| | |
| | | <el-col :span="6"> |
| | | <el-form-item label="是否涉及配套样品:" prop="mating"> |
| | | <el-radio-group |
| | | :disabled="active > 1" |
| | | v-model="addObj.mating" |
| | | @change="$refs.sampleTable.doLayout()" |
| | | > |
| | |
| | | :placeholder="active > 1 ? '' : '请输入'" |
| | | clearable |
| | | v-model="addObj.otcCode" |
| | | :readonly="active > 1" |
| | | :disabled="active > 1" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | :placeholder="active > 1 ? '' : '请输入'" |
| | | clearable |
| | | v-model="addObj.prepareUser" |
| | | :readonly="active > 1" |
| | | :disabled="active > 1" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | clearable |
| | | :placeholder="active > 1 ? '' : '请输入'" |
| | | v-model="addObj.remark" |
| | | :readonly="active > 1" |
| | | :disabled="active > 1" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | </el-form> |
| | | </div> |
| | | </basic-container> |
| | | <div |
| | | class="search" |
| | | v-if="active == 1" |
| | | style="display: flex; background: transparent" |
| | | > |
| | | <div style="display: flex; align-items: center"> |
| | | <div class="search_label">样品型号:</div> |
| | | <div class="search_input"> |
| | | <el-select |
| | | v-model="model" |
| | | :placeholder="active > 1 ? '' : '请输入'" |
| | | filterable |
| | | allow-create |
| | | default-first-option |
| | | size="small" |
| | | @change="changeModel" |
| | | > |
| | | <el-option |
| | | v-for="item in models" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | <div style="display: flex; align-items: center"> |
| | | <div class="search_label">检验标准:</div> |
| | | <div class="search_input"> |
| | | <el-select |
| | | filterable |
| | | v-model="standardMethodListId" |
| | | :placeholder="active > 1 ? '' : '请输入'" |
| | | size="small" |
| | | @focus="methodFocus" |
| | | :loading="methodLoad" |
| | | @change="changeStandardMethodListId" |
| | | > |
| | | <el-option |
| | | v-for="item in methods" |
| | | :key="item.id" |
| | | :label="item.code" |
| | | :value="item.id" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <basic-container> |
| | | <div style="height: auto"> |
| | | <div |
| | | class="search" |
| | | v-if="active == 1" |
| | | style="display: flex; background: transparent" |
| | | > |
| | | <div> |
| | | <div class="search_label">样品型号:</div> |
| | | <div class="search_input"> |
| | | <el-select |
| | | v-model="model" |
| | | :placeholder="active > 1 ? '' : '请输入'" |
| | | filterable |
| | | allow-create |
| | | default-first-option |
| | | size="small" |
| | | @change="changeModel" |
| | | > |
| | | <el-option |
| | | v-for="item in models" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div class="search_label">检验标准:</div> |
| | | <div class="search_input"> |
| | | <el-select |
| | | filterable |
| | | v-model="standardMethodListId" |
| | | :placeholder="active > 1 ? '' : '请输入'" |
| | | size="small" |
| | | @focus="methodFocus" |
| | | :loading="methodLoad" |
| | | @change="changeStandardMethodListId" |
| | | > |
| | | <el-option |
| | | v-for="item in methods" |
| | | :key="item.id" |
| | | :label="item.code" |
| | | :value="item.id" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <el-table |
| | | class="el-table sampleTable" |
| | | ref="sampleTable" |
| | |
| | | </el-table> |
| | | </div> |
| | | </basic-container> |
| | | <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"> |
| | | <el-input |
| | | placeholder="输入关键字进行搜索" |
| | | suffix-icon="el-icon-search" |
| | | v-model="search" |
| | | size="small" |
| | | style="margin-bottom: 5px" |
| | | clearable |
| | | @blur="searchFilter" |
| | | @clear="searchFilter" |
| | | @keyup.enter.native="searchFilter" |
| | | ></el-input> |
| | | </el-col> |
| | | </el-row> |
| | | <el-tree |
| | | :data="list" |
| | | ref="tree" |
| | | :props="{ children: 'children', label: 'label' }" |
| | | node-key="label" |
| | | :filter-node-method="filterNode" |
| | | @node-click="handleNodeClick" |
| | | highlight-current |
| | | @node-expand="nodeOpen" |
| | | @node-collapse="nodeClose" |
| | | :default-expanded-keys="expandedKeys" |
| | | @dblclick.native="activeStandardTree" |
| | | > |
| | | <div class="custom-tree-node" slot-scope="{ node, data }"> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <span |
| | | ><i |
| | | :class="`node_i ${ |
| | | data.children != undefined |
| | | ? data.code === '[1]' |
| | | ? 'el-icon-folder-opened' |
| | | : 'el-icon-folder' |
| | | : 'el-icon-tickets' |
| | | }`" |
| | | ></i> |
| | | {{ data.code }} {{ data.label }}</span |
| | | > |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </el-tree> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="selectStandardTree = false">取 消</el-button> |
| | | <el-button type="primary" @click="activeStandardTree">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <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" |
| | | /> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="selectUserDia = false">取 消</el-button> |
| | | <el-button type="primary" @click="selectUser">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog title="保存模板" :visible.sync="templateDia" width="400px"> |
| | | <div |
| | | class="body" |
| | | style="display: flex; align-items: center" |
| | | v-if="templateDia" |
| | | > |
| | | <div class="search_label" style="width: 90px"> |
| | | <span class="required-span">* </span>模板名称: |
| | | </div> |
| | | <div class="search_input"> |
| | | <el-input size="small" clearable v-model="templateName"></el-input> |
| | | </div> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="templateDia = false">取 消</el-button> |
| | | <el-button |
| | | type="primary" |
| | | @click="addTemplateDia" |
| | | :loading="templateLoading" |
| | | >确 定</el-button |
| | | > |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog |
| | | title="检验下发" |
| | | :visible.sync="issuedDialogVisible" |
| | | width="400px" |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | :show-close="false" |
| | | > |
| | | <div class="body" style="max-height: 60vh"> |
| | | <el-row> |
| | | <el-col class="search_thing" :span="22"> |
| | | <div class="search_label"> |
| | | <span class="required-span">* </span>约定时间: |
| | | </div> |
| | | <div class="search_input"> |
| | | <el-date-picker |
| | | size="small" |
| | | v-model="distributeData.appointed" |
| | | :picker-options="pickerOptions" |
| | | type="date" |
| | | placeholder="选择日期" |
| | | value-format="yyyy-MM-dd" |
| | | style="width: 100%" |
| | | format="yyyy-MM-dd" |
| | | > |
| | | </el-date-picker> |
| | | </div> |
| | | </el-col> |
| | | <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 |
| | | multiple |
| | | v-model="distributeData.userId" |
| | | placeholder="请选择" |
| | | size="small" |
| | | filterable |
| | | style="width: 100%" |
| | | @change="changeUser" |
| | | > |
| | | <el-option-group |
| | | v-for="(item, index) in Object.keys(personList)" |
| | | :key="index" |
| | | :label="item" |
| | | > |
| | | <el-option |
| | | v-for="op in personList[item]" |
| | | :key="op.id" |
| | | :label="op.name" |
| | | :value="op.id" |
| | | > |
| | | </el-option> |
| | | </el-option-group> |
| | | </el-select> |
| | | </div> |
| | | </el-col> |
| | | <el-col |
| | | class="search_thing" |
| | | :span="22" |
| | | v-if="distributeData.userId.length > 0" |
| | | > |
| | | <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-col> |
| | | <el-col class="search_thing" :span="22"> |
| | | <div class="search_label"> |
| | | <span class="required-span">* </span>创建委托单: |
| | | </div> |
| | | <div class="search_input"> |
| | | <el-select |
| | | v-model="distributeData.isCreate" |
| | | placeholder="请选择" |
| | | size="small" |
| | | filterable |
| | | style="width: 100%" |
| | | > |
| | | <el-option label="是" :value="true"></el-option> |
| | | <el-option label="否" :value="false"></el-option> |
| | | </el-select> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-row> |
| | | <el-button @click="issuedDialogVisible = false">取 消</el-button> |
| | | <el-button type="primary" @click="submitForm2" :loading="upLoad" |
| | | >确 定</el-button |
| | | > |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog title="不通过原因" :visible.sync="noDialogVisible" width="400px"> |
| | | <div class="body" style="max-height: 60vh"> |
| | | <el-row> |
| | | <el-col class="search_thing" :span="22"> |
| | | <div class="search_label"> |
| | | <span class="required-span">* </span>不通过原因: |
| | | </div> |
| | | <div class="search_input"> |
| | | <el-input |
| | | v-model="tell" |
| | | size="small" |
| | | placeholder="请输入不通过原因" |
| | | ></el-input> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-row> |
| | | <el-button @click="(noDialogVisible = false), (tell = '')" |
| | | >取 消</el-button |
| | | > |
| | | <el-button type="primary" @click="submitTell" :loading="noLoading" |
| | | >确 定</el-button |
| | | > |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | <fiberOpticConfig |
| | | :fiberPairing="fiberPairing" |
| | | :currentId="currentId" |
| | | @saveFiberopticConfig="saveFiberConfigEvent($event)" |
| | | v-if="configShow && examine == 0" |
| | | :active="active" |
| | | :inspectionItemST="inspectionItemST" |
| | | /> |
| | | <fiberOpticConfigTwo |
| | | :currentId="currentId" |
| | | v-if="configShow && examine == 1" |
| | | :active="active" |
| | | /> |
| | | <equipConfig |
| | | :currentId="currentId" |
| | | v-if="equipConfigShow" |
| | | :active="active" |
| | | /> |
| | | <cableConfig v-if="cableConfigShow" :active="active" /> |
| | | <!-- 单选特殊值处理框--> |
| | | <el-dialog |
| | | title="检测到特殊项,请作出以下选择" |
| | | :visible.sync="bsm1Dia" |
| | | :close-on-press-escape="false" |
| | | :close-on-click-modal="false" |
| | | min-width="400px" |
| | | :show-close="false" |
| | | :before-close="beforeClose" |
| | | > |
| | | <div class="body" style="max-height: 60vh"> |
| | | <el-row v-if="bsm1"> |
| | | <el-col |
| | | class="search_thing" |
| | | :span="24" |
| | | style="height: initial; margin: 5px 0" |
| | | > |
| | | <div class="search_label" style="width: 80px"> |
| | | <span class="required-span">* </span>选项: |
| | | </div> |
| | | <div class="search_input"> |
| | | <el-radio-group v-model="bsm1Val" @input="upBsm1"> |
| | | <el-radio |
| | | v-for="(a, ai) in JSON.parse(bsmRow.section)" |
| | | :key="ai" |
| | | :label="a" |
| | | style="margin-bottom: 2px; margin-top: 2px" |
| | | ></el-radio> |
| | | </el-radio-group> |
| | | </div> |
| | | </el-col> |
| | | <el-col |
| | | class="search_thing" |
| | | :span="24" |
| | | style="height: initial; margin: 5px 0" |
| | | > |
| | | <div class="search_label" style="width: 80px">要求值:</div> |
| | | <div |
| | | class="search_input" |
| | | v-show="bsm1Val !== null && bsm1Val !== ''" |
| | | > |
| | | <el-radio-group v-model="bsm1Val" @input="upBsm1"> |
| | | <el-radio |
| | | v-for="(a, ai) in JSON.parse(bsmRow.section)" |
| | | :key="ai" |
| | | :label="a" |
| | | >{{ JSON.parse(bsmRow.ask)[ai] }}</el-radio |
| | | > |
| | | </el-radio-group> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row v-if="bsm2"> |
| | | <el-col class="search_thing" :span="22"> |
| | | <div class="search_label" style="width: 220px"> |
| | | <span class="required-span">* </span>样品熔接配对数量: |
| | | </div> |
| | | <div class="search_input"> |
| | | <el-input-number |
| | | size="medium" |
| | | v-model="bsm2Val" |
| | | :min="1" |
| | | :max="bsm2Val3.length" |
| | | :precision="0" |
| | | style="width: 70%" |
| | | :controls="false" |
| | | @change="bsm2Up" |
| | | ></el-input-number> |
| | | <span>MAX:{{ bsm2Val3.length }}</span> |
| | | </div> |
| | | </el-col> |
| | | <el-col style="margin-top: 6px"> |
| | | <el-col v-for="(a, ai) in bsm2Val2" :key="ai"> |
| | | <el-col :span="10"> |
| | | <el-select |
| | | v-model="a[0]" |
| | | placeholder="请选择" |
| | | size="small" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="(item, index) in sampleList" |
| | | :key="index" |
| | | :label="index + 1" |
| | | :value="index + 1" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col |
| | | :span="4" |
| | | class="pairing" |
| | | style="border: 0; color: rgba(0, 0, 0, 0.2)" |
| | | >——</el-col |
| | | > |
| | | <el-col :span="10"> |
| | | <el-select |
| | | v-model="a[1]" |
| | | placeholder="请选择" |
| | | size="small" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="(item, index) in sampleList" |
| | | :key="index" |
| | | :label="index + 1" |
| | | :value="index + 1" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-col> |
| | | </el-col> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-row> |
| | | <el-button type="primary" @click="save2" :loading="saveLoad" |
| | | >确 定</el-button |
| | | > |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- 全选特殊值处理框--> |
| | | <el-dialog |
| | | title="检测到特殊项,请作出以下选择" |
| | | :visible.sync="bsm1DiaAll" |
| | | min-width="400px" |
| | | :show-close="false" |
| | | :close-on-press-escape="false" |
| | | :close-on-click-modal="false" |
| | | :before-close="beforeClose" |
| | | > |
| | | <div |
| | | class="body" |
| | | style="max-height: 60vh" |
| | | v-for="(item, index) in bsm1DiaList" |
| | | :key="index" |
| | | > |
| | | <el-row v-if="item.bsm1"> |
| | | <el-col |
| | | class="search_thing" |
| | | :span="24" |
| | | style="height: initial; margin: 5px 0" |
| | | > |
| | | <div class="search_label" style="width: 80px"> |
| | | <span class="required-span">* </span>选项: |
| | | </div> |
| | | <div class="search_input"> |
| | | <el-radio-group v-model="item.bsm1Val" @input="upBsmAll(item)"> |
| | | <el-radio |
| | | v-for="(a, ai) in JSON.parse(item.bsmRow.section)" |
| | | :key="ai" |
| | | :label="a" |
| | | style="margin-bottom: 2px; margin-top: 2px" |
| | | ></el-radio> |
| | | </el-radio-group> |
| | | </div> |
| | | </el-col> |
| | | <el-col |
| | | class="search_thing" |
| | | :span="24" |
| | | style="height: initial; margin: 5px 0" |
| | | > |
| | | <div class="search_label" style="width: 80px">要求值:</div> |
| | | <div |
| | | class="search_input" |
| | | v-show="item.bsm1Val !== null && item.bsm1Val !== ''" |
| | | > |
| | | <el-radio-group v-model="item.bsm1Val" @input="upBsmAll(item)"> |
| | | <el-radio |
| | | v-for="(a, ai) in JSON.parse(item.bsmRow.section)" |
| | | :key="ai" |
| | | :label="a" |
| | | >{{ JSON.parse(item.bsmRow.ask)[ai] }}</el-radio |
| | | > |
| | | </el-radio-group> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row v-if="item.bsm2"> |
| | | <el-col class="search_thing" :span="22"> |
| | | <div class="search_label" style="width: 220px"> |
| | | <span class="required-span">* </span>样品熔接配对数量: |
| | | </div> |
| | | <div class="search_input"> |
| | | <el-input-number |
| | | size="medium" |
| | | v-model="item.bsm2Val" |
| | | :min="1" |
| | | :max="item.bsm2Val3.length" |
| | | :precision="0" |
| | | style="width: 70%" |
| | | :controls="false" |
| | | @change="bsm2Up" |
| | | ></el-input-number> |
| | | <span>MAX:{{ item.bsm2Val3.length }}</span> |
| | | </div> |
| | | </el-col> |
| | | <el-col style="margin-top: 6px"> |
| | | <el-col v-for="(a, ai) in item.bsm2Val2" :key="ai"> |
| | | <el-col :span="10"> |
| | | <el-select |
| | | v-model="a[0]" |
| | | placeholder="请选择" |
| | | size="small" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="(item, index) in item.sampleList" |
| | | :key="index" |
| | | :label="index + 1" |
| | | :value="index + 1" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col |
| | | :span="4" |
| | | class="pairing" |
| | | style="border: 0; color: rgba(0, 0, 0, 0.2)" |
| | | >——</el-col |
| | | > |
| | | <el-col :span="10"> |
| | | <el-select |
| | | v-model="a[1]" |
| | | placeholder="请选择" |
| | | size="small" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="(item, index) in item.sampleList" |
| | | :key="index" |
| | | :label="index + 1" |
| | | :value="index + 1" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-col> |
| | | </el-col> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-row> |
| | | <el-button type="primary" @click="save1" :loading="saveLoad" |
| | | >确 定</el-button |
| | | > |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog |
| | | title="特殊值填写" |
| | | :visible.sync="bsm3Dia" |
| | | top="5vh" |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | width="800px" |
| | | :show-close="false" |
| | | > |
| | | <el-table :data="editTable" style="width: 100%" height="500px"> |
| | | <!-- inspectionItemList --> |
| | | <el-table-column prop="inspectionItemList" label="检验项" width="180"> |
| | | </el-table-column> |
| | | <el-table-column prop="sampleCode" label="样品编号" width="180"> |
| | | </el-table-column> |
| | | <el-table-column prop="model" label="样品型号" width="180"> |
| | | </el-table-column> |
| | | <el-table-column prop="symbolItem" label="识别符号"> </el-table-column> |
| | | <el-table-column prop="value" label="识别符值"> |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-model="scope.row.value" |
| | | placeholder="请输入" |
| | | @input="inputValueHandler(scope.row, scope.$index)" |
| | | size="small" |
| | | type="number" |
| | | ></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-row> |
| | | <el-button @click="bsm3Dia = false">取 消</el-button> |
| | | <el-button type="primary" @click="save0" :loading="saveLoad" |
| | | >确 定</el-button |
| | | > |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog |
| | | title="温度循环要求填写" |
| | | :visible.sync="circulateShow" |
| | | width="900px" |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | :before-close="beforeCirculateShowClose" |
| | | :show-close="false" |
| | | > |
| | | <div class="search" style="display: flex; background: transparent"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">保温时间:</div> |
| | | <div class="search_input"> |
| | | <el-input |
| | | v-model="circulateForm.entrustTime" |
| | | size="small" |
| | | placeholder="" |
| | | type="number" |
| | | ></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">循环次数:</div> |
| | | <div class="search_input"> |
| | | <el-input |
| | | v-model="circulateForm.entrustNum" |
| | | size="small" |
| | | placeholder="" |
| | | type="number" |
| | | ></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">温度点:</div> |
| | | <div class="search_input"> |
| | | <el-input |
| | | @focus="() => (isFocus = true)" |
| | | @blur="changeTemperatureData" |
| | | v-model="circulateForm.entrustPoint" |
| | | size="small" |
| | | placeholder="" |
| | | type="number" |
| | | ></el-input> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="circulateTable"> |
| | | <div class="opticalProject"> |
| | | <div style="line-height: 30px">光纤项目</div> |
| | | <el-divider></el-divider> |
| | | <div> |
| | | <el-table |
| | | ref="multipleTable" |
| | | border |
| | | :header-cell-style="{ 'text-align': 'center' }" |
| | | :cell-style="{ 'text-align': 'center' }" |
| | | :data="opticalProject" |
| | | tooltip-effect="dark" |
| | | style="width: 100%" |
| | | @row-click="rowClickOptical" |
| | | @select="selectOpticalProject" |
| | | @select-all="selectAllOptical" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55"> </el-table-column> |
| | | <el-table-column |
| | | prop="value" |
| | | label="光纤项目" |
| | | show-overflow-tooltip |
| | | ></el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | <div class="temperatureList"> |
| | | <div class="temperatureListTitle"> |
| | | <span>温度点集合</span> |
| | | <span> |
| | | <el-button |
| | | type="primary" |
| | | size="mini" |
| | | :disabled="isFocus" |
| | | @click="addTemperatureData" |
| | | >新增</el-button |
| | | > |
| | | <el-button size="mini" @click="deleteTemperatureData" |
| | | >删除</el-button |
| | | > |
| | | </span> |
| | | </div> |
| | | <el-divider></el-divider> |
| | | <el-table |
| | | :data="temperatureData" |
| | | border |
| | | :header-cell-style="{ 'text-align': 'center' }" |
| | | :cell-style="{ 'text-align': 'center' }" |
| | | style="width: 100%" |
| | | > |
| | | <el-table-column prop="date" label="温度点(℃)" width="120px"> |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | size="small" |
| | | v-model="scope.row.temperaturePoint" |
| | | clearable |
| | | placeholder="请输入" |
| | | @change="changeTemperature" |
| | | ></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="要求(dB/Km)"> |
| | | <template slot-scope="scope"> |
| | | <span>x</span> |
| | | <el-select |
| | | v-model="scope.row.askSymbol" |
| | | placeholder="请选择" |
| | | size="small" |
| | | style="width: 120px" |
| | | @change="changeTemperature" |
| | | > |
| | | <el-option |
| | | v-for="item in temperatureDataList" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | <el-input |
| | | size="small" |
| | | v-model="scope.row.askNum" |
| | | clearable |
| | | placeholder="请输入" |
| | | style="width: 120px" |
| | | @change="changeTemperature" |
| | | ></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="cleanSpliceData">取消</el-button> |
| | | <el-button type="primary" @click="spliceData">保存</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- 电力试验室---温升试验/热循环 --> |
| | | <el-dialog |
| | | :title="temperatureTitle" |
| | | :visible.sync="temperatureShow" |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | 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-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 |
| | | > |
| | | </el-checkbox-group> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="cleanTemperatureTest">取消</el-button> |
| | | <el-button type="primary" @click="spliceTemperatureTest" |
| | | >保存</el-button |
| | | > |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | selectInsOrderTemplate, |
| | | hasSendUrgentOrder, |
| | | addInsOrder, |
| | | selectOrderManDay, |
| | | selectInsOrderTemplateById, |
| | | upInsOrderOfState, |
| | | upInsOrder, |
| | | getInsOrder, |
| | | addInsOrderTemplate, |
| | | delInsOrderTemplate, |
| | | labelPrinting, |
| | | } from "@/api/business/inspectionOrder"; |
| | | import { |
| | | selectStandardTreeList2, |
| | | selectStandardMethodEnum, |
| | | selectsStandardMethodByFLSSM, |
| | | selectStandardProductList, |
| | | } from "@/api/standard/standardLibrary"; |
| | | import { selectBushingBySampleId } from "@/api/business/insBushing"; |
| | | import { getLaboratoryPersonList } from "@/api/system/user"; |
| | | import { mapGetters } from "vuex"; |
| | | import fiberOpticConfig from "./fiberoptic-config.vue"; |
| | | import fiberOpticConfigReadOnly from "./fiberoptic-config-readonly.vue"; |
| | |
| | | cableConfig, |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["nickName", "company"]), |
| | | ...mapGetters(["nickName", "loginUserInfo"]), |
| | | }, |
| | | props: { |
| | | examine: { |
| | | type: Number, |
| | | default: () => 0, |
| | | }, |
| | | active: { |
| | | type: Number, |
| | | default: () => 0, |
| | | }, |
| | | currentId: { |
| | | type: Number, |
| | | default: () => 0, |
| | | }, |
| | | }, |
| | | props: {}, |
| | | data() { |
| | | return { |
| | | isReview: false, //是否是查看详情 |
| | | examine: 0, |
| | | active: 0, |
| | | currentId: 0, |
| | | pickerOptions: { |
| | | disabledDate(time) { |
| | | // 当前时间加上三天的时间戳 |
| | |
| | | this.standardMethodListId = null; |
| | | }, |
| | | }, |
| | | created() { |
| | | this.active = this.$route.query.active; |
| | | this.currentId = this.$route.query.currentId; |
| | | this.examine = this.$route.query.examine; |
| | | this.isReview = this.$route.query.isReview; |
| | | }, |
| | | mounted() { |
| | | if (this.addObj.custom == "" || this.addObj.custom == null) { |
| | | this.addObj.custom = this.nickName; //设置制单人为当前登录人 |
| | | } |
| | | this.addObj.company = this.company; |
| | | //查询字典 |
| | | this.selectDictForType(); |
| | | this.selectDictForOrderType(); |
| | | this.selectDictForUnit(); |
| | | this.selectDictForSampleForm(); |
| | | |
| | | if (this.active != 3) { |
| | | this.getUserNow(); |
| | | this.init(); |
| | | } |
| | | this.selectStandardTreeList(); |
| | | this.getAuthorizedPerson(); |
| | |
| | | if (this.active != 1) { |
| | | // 查看/审核流程 |
| | | // 请求接口,回显数据 |
| | | this.$axios |
| | | .post(this.$api.insOrder.getInsOrder, { |
| | | orderId: this.currentId, |
| | | }) |
| | | getInsOrder({ |
| | | orderId: this.currentId, |
| | | }) |
| | | .then((res) => { |
| | | this.addObj = { |
| | | ...res.data.insOrder, |
| | | }; |
| | | this.addObj.type = String(this.addObj.type); |
| | | this.sampleList = this.HaveJson(res.data.sampleProduct); |
| | | this.getProNum(); |
| | | this.addObj.sampleNum = this.sampleList.length; |
| | | this.$nextTick(() => { |
| | | this.$refs.sampleTable.doLayout(); |
| | | if (this.addObj.sampleNum > 0) { |
| | | this.$refs.sampleTable.setCurrentRow(this.sampleList[0], true); |
| | | this.rowClick(this.sampleList[0]); |
| | | } |
| | | }); |
| | | if (res.code === 200) { |
| | | this.addObj = { |
| | | ...res.data.insOrder, |
| | | }; |
| | | this.addObj.type = String(this.addObj.type); |
| | | this.sampleList = this.HaveJson(res.data.sampleProduct); |
| | | this.getProNum(); |
| | | this.addObj.sampleNum = this.sampleList.length; |
| | | this.$nextTick(() => { |
| | | this.$refs.sampleTable.doLayout(); |
| | | if (this.addObj.sampleNum > 0) { |
| | | this.$refs.sampleTable.setCurrentRow(this.sampleList[0], true); |
| | | this.rowClick(this.sampleList[0]); |
| | | } |
| | | }); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | } |
| | | }, |
| | |
| | | let flag = true; |
| | | //如果是类型是紧急,判断当前客户当天的紧急额度是否用完 |
| | | if (type == 2) { |
| | | await this.$axios |
| | | .post(this.$api.insOrder.hasSendUrgentOrder, {}) |
| | | await hasSendUrgentOrder() |
| | | .then((res) => { |
| | | flag = res.data; |
| | | return flag; |
| | | // if (!res.data) { |
| | | // this.addObj.type = "1"; |
| | | // this.$message.error("当天紧急额度已用完"); |
| | | // throw "当天紧急额度已用完"; |
| | | // } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | } |
| | | return flag; |
| | |
| | | } |
| | | }, |
| | | getAuthorizedPerson() { |
| | | this.$axios.get(this.$api.user.getLaboratoryPersonList).then((res) => { |
| | | this.personList = res.data; |
| | | }); |
| | | getLaboratoryPersonList() |
| | | .then((res) => { |
| | | if (res.code === 200) { |
| | | this.personList = res.data; |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | selectDictForType() { |
| | | getDicts("urgency_level") |
| | |
| | | let sampleList = this.HaveJson(sampleList0); |
| | | sampleList.forEach((a) => { |
| | | a.insProduct.forEach((b) => { |
| | | b.id = null; |
| | | delete b.bsmRow; |
| | | }); |
| | | }); |
| | |
| | | console.log(this.sampleList); |
| | | console.log(this.fiberPairing); |
| | | this.saveLoad = true; |
| | | this.$axios |
| | | .post(this.$api.insOrder.addInsOrder, { |
| | | str: JSON.stringify({ |
| | | insOrder: this.addObj, |
| | | list: JSON.stringify( |
| | | sampleList.map((a) => { |
| | | 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; |
| | | }) |
| | | ), |
| | | pairing: JSON.stringify(this.bsm2Val2), |
| | | fiberPairing: JSON.stringify(this.fiberPairing), |
| | | }), |
| | | }) |
| | | addInsOrder({ |
| | | insOrder: this.addObj, |
| | | list: sampleList.map((a) => { |
| | | 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; |
| | | }), |
| | | pairing: this.bsm2Val2, |
| | | fiberPairing: this.fiberPairing, |
| | | }) |
| | | .then((res) => { |
| | | if (res.code === 200) { |
| | | this.$message.success("已提交"); |
| | | this.bsm3Dia = false; |
| | | this.$router.go(-1); |
| | | } |
| | | this.saveLoad = false; |
| | | if (res.code == 201) return; |
| | | this.$message.success("已提交"); |
| | | this.bsm3Dia = false; |
| | | this.$parent.playOrder(0); |
| | | }) |
| | | .catch((e) => { |
| | | .catch((error) => { |
| | | this.saveLoad = false; |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | upInsOrderOfState(state) { |
| | | if (state == 1) { |
| | | //this.saveLoad = true |
| | | this.issuedDialogVisible = true; |
| | | this.$axios |
| | | .post(this.$api.insOrder.selectOrderManDay, { |
| | | id: this.currentId, |
| | | selectOrderManDay({ |
| | | id: this.currentId, |
| | | }) |
| | | .then((res) => { |
| | | if (res.code === 200) { |
| | | this.distributeData.orderId = this.currentId; |
| | | this.distributeData.appointed = res.data; |
| | | console.log("约定时间", this.distributeData.appointed); |
| | | } |
| | | }) |
| | | .then((ress) => { |
| | | this.distributeData.orderId = this.currentId; |
| | | this.distributeData.appointed = ress.data; |
| | | console.log("约定时间", this.distributeData.appointed); |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | setTimeout(() => { |
| | | this.issuedDialogVisible = true; |
| | | }, 1000); |
| | | // this.$axios.post(this.$api.insOrder.upInsOrderOfState, { |
| | | // state, |
| | | // id: this.currentId, |
| | | // companyId:this.addObj.companyId, |
| | | // laboratory:this.addObj.laboratory, |
| | | // company: this.addObj.company |
| | | // }, { |
| | | // headers: { |
| | | // 'Content-Type': 'application/json' |
| | | // } |
| | | // }).then(res => { |
| | | // this.saveLoad = false |
| | | // if (res.code == 201) return |
| | | // this.$message.success('提交成功') |
| | | |
| | | // this.$parent.multipleSelection = [{id: this.currentId}] |
| | | // this.$parent.print() |
| | | // 如果紧急程度为紧急,需要直接下发人员 |
| | | // if (this.addObj.type == 2) { |
| | | // this.issuedDialogVisible = true; |
| | | // this.$axios.post(this.$api.insOrder.selectOrderManDay, { |
| | | // id: this.currentId |
| | | // }).then(ress => { |
| | | // this.distributeData.orderId = this.currentId |
| | | // this.distributeData.appointed = ress.data |
| | | // }) |
| | | // } else { |
| | | // this.$parent.playOrder(0) |
| | | // } |
| | | |
| | | // this.$axios.post(this.$api.insOrder.selectOrderManDay, { |
| | | // id: this.currentId |
| | | // }).then(ress => { |
| | | // this.distributeData.orderId = this.currentId |
| | | // this.distributeData.appointed = ress.data |
| | | // }) |
| | | // setTimeout(() => { |
| | | // this.issuedDialogVisible = true; |
| | | // }, 1000) |
| | | // }) |
| | | } else { |
| | | // 不通过 |
| | | this.noDialogVisible = true; |
| | | } |
| | | }, |
| | | getLabelPrinting(currentId) { |
| | | this.$axios |
| | | .post(this.$api.insOrder.labelPrinting, { |
| | | ids: currentId, |
| | | }) |
| | | labelPrinting({ |
| | | ids: currentId, |
| | | }) |
| | | .then((res) => { |
| | | //审核通过,默认只打印第一个样品标签 |
| | | let firstSample = res.data[0]; |
| | | let arr1 = []; |
| | | firstSample.insProduct.forEach((b) => { |
| | | arr1.push(b.inspectionItem); |
| | | }); |
| | | firstSample.item = [...new Set(arr1)].join(","); |
| | | // arr.forEach((a) => { |
| | | // let arr1 = []; |
| | | // a.insProduct.forEach((b) => { |
| | | // arr1.push(b.inspectionItem); |
| | | // }); |
| | | // a.item = [...new Set(arr1)].join(","); |
| | | // }); |
| | | this.beginPrint(firstSample); |
| | | if (res.code === 200) { |
| | | //审核通过,默认只打印第一个样品标签 |
| | | let firstSample = res.data[0]; |
| | | let arr1 = []; |
| | | firstSample.insProduct.forEach((b) => { |
| | | arr1.push(b.inspectionItem); |
| | | }); |
| | | firstSample.item = [...new Set(arr1)].join(","); |
| | | this.beginPrint(firstSample); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | //开始标签打印 |
| | |
| | | return; |
| | | } |
| | | // let flag = true; |
| | | this.$axios |
| | | .post( |
| | | this.$api.insOrder.upInsOrderOfState, |
| | | { |
| | | state: 1, |
| | | id: this.currentId, |
| | | companyId: this.addObj.companyId, |
| | | laboratory: this.addObj.laboratory, |
| | | company: this.addObj.company, |
| | | isCreate: this.distributeData.isCreate, |
| | | }, |
| | | { |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | } |
| | | ) |
| | | upInsOrderOfState({ |
| | | state: 1, |
| | | id: this.currentId, |
| | | companyId: this.addObj.companyId, |
| | | laboratory: this.addObj.laboratory, |
| | | company: this.addObj.company, |
| | | isCreate: this.distributeData.isCreate, |
| | | }) |
| | | .then((res) => { |
| | | // flag = false; |
| | | |
| | | // if (flag) { |
| | | // this.$message.error("委托编号生成失败"); |
| | | // return; |
| | | // } |
| | | this.upLoad = true; |
| | | this.$axios |
| | | .post( |
| | | this.$api.insOrder.upInsOrder, |
| | | { |
| | | orderId: this.distributeData.orderId, |
| | | appointed: this.distributeData.appointed, |
| | | userIdList: this.distributeData.userId, |
| | | sonLaboratory: this.distributeData.sonLaboratory, |
| | | }, |
| | | { |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | } |
| | | ) |
| | | .then((res) => { |
| | | if (res.code === 201) { |
| | | this.upLoad = false; |
| | | return; |
| | | } |
| | | this.$message.success("提交成功"); |
| | | this.upLoad = false; |
| | | this.issuedDialogVisible = false; |
| | | this.$parent.playOrder(0); |
| | | //审核通过后,自动打印二维码 |
| | | //TODO: 电力试验室暂时不用标签打印 |
| | | if ( |
| | | this.sonLaboratoryList.filter((f) => f.value === "电力试验室") |
| | | .length === 0 |
| | | ) { |
| | | this.$nextTick(() => { |
| | | this.getLabelPrinting(this.currentId); |
| | | }); |
| | | } |
| | | if (res.code === 200) { |
| | | this.upLoad = true; |
| | | upInsOrder({ |
| | | orderId: this.distributeData.orderId, |
| | | appointed: this.distributeData.appointed, |
| | | userIdList: this.distributeData.userId, |
| | | sonLaboratory: this.distributeData.sonLaboratory, |
| | | }) |
| | | .catch((e) => { |
| | | this.$message.error("提交失败"); |
| | | this.upLoad = false; |
| | | }); |
| | | .then((res) => { |
| | | if (res.code === 201) { |
| | | this.upLoad = false; |
| | | return; |
| | | } |
| | | this.$message.success("提交成功"); |
| | | this.issuedDialogVisible = false; |
| | | this.upLoad = false; |
| | | this.$router.go(-1); |
| | | //审核通过后,自动打印二维码 |
| | | //TODO: 电力试验室暂时不用标签打印 |
| | | if ( |
| | | this.sonLaboratoryList.filter((f) => f.value === "电力试验室") |
| | | .length === 0 |
| | | ) { |
| | | this.$nextTick(() => { |
| | | this.getLabelPrinting(this.currentId); |
| | | }); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | this.$message.error("提交失败"); |
| | | this.upLoad = false; |
| | | console.error(error); |
| | | }); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | getUserNow() { |
| | | this.$axios.get(this.$api.user.getUserNow).then((res) => { |
| | | let selects = res.data; |
| | | if (selects == null) return; |
| | | this.addObj.userId = selects.id; |
| | | this.addObj.company = selects.company; |
| | | this.addObj.custom = selects.name; |
| | | this.addObj.code = selects.code; |
| | | this.addObj.phone = selects.phone; |
| | | this.addObj.companyId = selects.departId; |
| | | this.addObj.production = "/"; |
| | | this.addObj.productionEn = "/"; |
| | | if (this.active == 1) { |
| | | this.selectInsOrderTemplate(); |
| | | } |
| | | }); |
| | | init() { |
| | | if (this.addObj.custom == "" || this.addObj.custom == null) { |
| | | this.addObj.custom = this.loginUserInfo.nickName; //设置制单人为当前登录人 |
| | | } else { |
| | | this.addObj.custom = this.loginUserInfo.nickName; |
| | | } |
| | | this.addObj.company = this.loginUserInfo.companyName; |
| | | this.addObj.companyId = this.loginUserInfo.company; |
| | | this.addObj.userId = this.loginUserInfo.userId; |
| | | // this.addObj.code = this.loginUserInfo.code; |
| | | this.addObj.phone = this.loginUserInfo.phoneNumber; |
| | | this.addObj.production = "/"; |
| | | this.addObj.productionEn = "/"; |
| | | if (this.active == 1) { |
| | | this.selectInsOrderTemplate(); |
| | | } |
| | | }, |
| | | getProNum() { |
| | | this.sampleSelectionList.forEach((m, i) => { |
| | | Vue.set( |
| | | this.$set( |
| | | this.sampleSelectionList[i], |
| | | "proNum", |
| | | m.insProduct.filter((a) => a.state == 1).length |
| | |
| | | } |
| | | }, |
| | | selectStandardTreeList() { |
| | | this.$axios |
| | | .get(this.$api.standardTree.selectStandardTreeList2) |
| | | selectStandardTreeList2() |
| | | .then((res) => { |
| | | this.list = res.data; |
| | | this.list.forEach((a) => { |
| | | this.expandedKeys.push(a.label); |
| | | }); |
| | | if (res.code === 200) { |
| | | this.list = res.data; |
| | | this.list.forEach((a) => { |
| | | this.expandedKeys.push(a.label); |
| | | }); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | filterNode(value, data) { |
| | |
| | | }, |
| | | selectsStandardMethodByFLSSM() { |
| | | this.methodLoad = true; |
| | | this.$axios |
| | | .post(this.$api.standardTree.selectsStandardMethodByFLSSM, { |
| | | tree: this.selectTree, |
| | | }) |
| | | selectsStandardMethodByFLSSM({ |
| | | tree: this.selectTree, |
| | | }) |
| | | .then((res) => { |
| | | this.methodLoad = false; |
| | | try { |
| | | if ( |
| | | res.data.standardMethodList.length == 0 && |
| | | this.selectTree.split("-").length == 5 |
| | | ) { |
| | | 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, { |
| | | if (res.code === 200) { |
| | | this.methodLoad = false; |
| | | try { |
| | | if ( |
| | | res.data.standardMethodList.length == 0 && |
| | | this.selectTree.split("-").length == 5 |
| | | ) { |
| | | let arr = this.selectTree.split("-"); |
| | | let arr0 = arr.slice(0, arr.length - 1); |
| | | let selectTree = arr0 |
| | | .join("-") |
| | | .substring(0, arr0.join("-").length - 1); |
| | | template() |
| | | .then((res) => { |
| | | if (res.status === 200) { |
| | | console.log(res); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | selectsStandardMethodByFLSSM({ |
| | | tree: selectTree, |
| | | }) |
| | | .then((ress) => { |
| | | this.methods = ress.data.standardMethodList; |
| | | }); |
| | | } else { |
| | | this.methods = res.data.standardMethodList; |
| | | } |
| | | } catch (e) {} |
| | | .then((res) => { |
| | | if (res.code === 200) { |
| | | this.methods = ress.data.standardMethodList; |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | } else { |
| | | this.methods = res.data.standardMethodList; |
| | | } |
| | | } catch (e) {} |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | addStandardTree(currentValue, oldValue) { |
| | |
| | | console.log("upProductSelect", this.sampleList); |
| | | }, |
| | | searchProject() { |
| | | this.$axios |
| | | .post(this.$api.enums.selectEnumByCategory, { |
| | | category: "光纤项目", |
| | | }) |
| | | getDicts("fiber_type") |
| | | .then((res) => { |
| | | this.opticalProject = res.data; |
| | | if (res.code === 200) { |
| | | this.opticalProject = res.data; |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | permute(nums) { |
| | |
| | | return "warning-row"; |
| | | }, |
| | | selectInsOrderTemplate() { |
| | | this.$axios |
| | | .get( |
| | | this.$api.insOrder.selectInsOrderTemplate + |
| | | "?company=" + |
| | | this.addObj.company |
| | | ) |
| | | selectInsOrderTemplate({ company: this.addObj.company }) |
| | | .then((res) => { |
| | | if (res.code == 201) return; |
| | | this.templates = res.data; |
| | | if (res.code === 200) { |
| | | this.templates = res.data; |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | // 删除模板--调用接口 |
| | |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | this.$axios |
| | | .post(this.$api.insOrder.delInsOrderTemplate, { |
| | | id: row.id, |
| | | }) |
| | | delInsOrderTemplate({ |
| | | id: row.id, |
| | | }) |
| | | .then((res) => { |
| | | if (res.code === 201) { |
| | | return; |
| | | if (res.code === 200) { |
| | | this.$message.success("删除成功"); |
| | | this.selectInsOrderTemplate(); |
| | | } |
| | | this.$message.success("删除成功"); |
| | | this.selectInsOrderTemplate(); |
| | | }) |
| | | .catch((e) => { |
| | | .catch((error) => { |
| | | this.$message.error("删除失败"); |
| | | console.error(error); |
| | | }); |
| | | }) |
| | | .catch(() => {}); |
| | |
| | | addTemplateDia() { |
| | | if (this.templateName) { |
| | | this.templateLoading = true; |
| | | this.$axios |
| | | .post( |
| | | this.$api.insOrder.addInsOrderTemplate, |
| | | { |
| | | name: this.templateName, |
| | | thing: JSON.stringify({ |
| | | addObj: this.addObj, |
| | | sampleList: this.sampleList, |
| | | selectTree: this.selectTree, |
| | | }), |
| | | }, |
| | | { |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | } |
| | | ) |
| | | addInsOrderTemplate({ |
| | | name: this.templateName, |
| | | thing: JSON.stringify({ |
| | | addObj: this.addObj, |
| | | sampleList: this.sampleList, |
| | | selectTree: this.selectTree, |
| | | }), |
| | | }) |
| | | .then((res) => { |
| | | if (res.code == 201) return; |
| | | this.templateLoading = false; |
| | | this.templateDia = false; |
| | | this.$message.success("保存成功"); |
| | | this.selectInsOrderTemplate(); |
| | | this.templateName = ""; |
| | | if (res.code === 200) { |
| | | this.templateLoading = false; |
| | | this.templateDia = false; |
| | | this.$message.success("保存成功"); |
| | | this.selectInsOrderTemplate(); |
| | | this.templateName = ""; |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | } else { |
| | | this.$message.error("请填写模板名称"); |
| | |
| | | }, |
| | | // 查询模板 |
| | | selectInsOrderTemplateById(e) { |
| | | this.$axios |
| | | .post(this.$api.insOrder.selectInsOrderTemplateById + "?id=" + e) |
| | | selectInsOrderTemplateById({ id: e }) |
| | | .then((res) => { |
| | | if (res.code == 201) return; |
| | | // let obj = JSON.parse(res.data) |
| | | let obj = res.data; |
| | | console.log(obj); |
| | | //制单人设置为当前登录用户 |
| | | let user = JSON.parse(localStorage.getItem("user")); |
| | | obj.addObj.custom = user.name; |
| | | obj.addObj.userId = user.userId; |
| | | this.addObj = obj.addObj; |
| | | this.sampleList = obj.sampleList; |
| | | this.selectTree = obj.selectTree; |
| | | //默认选中第一个样品 |
| | | this.$nextTick(() => { |
| | | if (this.sampleList.length > 0) { |
| | | this.rowClick(this.sampleList[0]); |
| | | } |
| | | }); |
| | | if (res.code === 200) { |
| | | let obj = res.data; |
| | | console.log(obj); |
| | | //制单人设置为当前登录用户 |
| | | obj.addObj.custom = this.loginUserInfo.nickName; |
| | | obj.addObj.userId = this.loginUserInfo.userId; |
| | | this.addObj = obj.addObj; |
| | | this.sampleList = obj.sampleList; |
| | | this.selectTree = obj.selectTree; |
| | | //默认选中第一个样品 |
| | | this.$nextTick(() => { |
| | | if (this.sampleList.length > 0) { |
| | | this.rowClick(this.sampleList[0]); |
| | | } |
| | | }); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | delSampleAndProduct() { |
| | |
| | | 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, |
| | | standardMethodListId: val, |
| | | factory: selectTreeList.join(" - "), |
| | | }, |
| | | { |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | } |
| | | ) |
| | | selectStandardProductList({ |
| | | model: |
| | | (this.addObj.model ? this.addObj.model : row.model) + |
| | | "-" + |
| | | row.modelNum, |
| | | standardMethodListId: val, |
| | | factory: selectTreeList.join(" - "), |
| | | }) |
| | | .then((res) => { |
| | | res.data.forEach((a) => { |
| | | a.state = 0; |
| | | }); |
| | | row.insProduct = this.HaveJson(res.data); |
| | | this.productList = row.insProduct; |
| | | this.productList0 = JSON.parse(JSON.stringify(this.productList)); |
| | | // this.$refs.sampleTable.setCurrentRow(row) |
| | | // setTimeout(() => { |
| | | // this.productList.forEach(a => { |
| | | // if (a.state == 1) this.toggleSelection(a) |
| | | // }) |
| | | // }, 200) |
| | | this.$nextTick(() => { |
| | | this.methodCount++; |
| | | this.getProductLoad = false; |
| | | if (this.sampleSelectionList.length == this.methodCount) { |
| | | this.standardLoading = false; |
| | | } |
| | | }); |
| | | if (res.code === 200) { |
| | | res.data.forEach((a) => { |
| | | a.state = 0; |
| | | }); |
| | | row.insProduct = this.HaveJson(res.data); |
| | | this.productList = row.insProduct; |
| | | this.productList0 = JSON.parse(JSON.stringify(this.productList)); |
| | | // this.$refs.sampleTable.setCurrentRow(row) |
| | | // setTimeout(() => { |
| | | // this.productList.forEach(a => { |
| | | // if (a.state == 1) this.toggleSelection(a) |
| | | // }) |
| | | // }, 200) |
| | | this.$nextTick(() => { |
| | | this.methodCount++; |
| | | this.getProductLoad = false; |
| | | if (this.sampleSelectionList.length == this.methodCount) { |
| | | this.standardLoading = false; |
| | | } |
| | | }); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | this.searchProject(); |
| | | this.searchTemList(); |
| | |
| | | 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, |
| | | standardMethodListId: val, |
| | | factory: selectTreeList.join(" - "), |
| | | }, |
| | | { |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | } |
| | | ) |
| | | selectStandardProductList({ |
| | | model: |
| | | (this.addObj.model ? this.addObj.model : row.model) + |
| | | "-" + |
| | | row.modelNum, |
| | | standardMethodListId: val, |
| | | factory: selectTreeList.join(" - "), |
| | | }) |
| | | .then((res) => { |
| | | res.data.forEach((a) => { |
| | | a.state = 0; |
| | | }); |
| | | row.insProduct = this.HaveJson(res.data); |
| | | this.productList = row.insProduct; |
| | | this.productList0 = JSON.parse(JSON.stringify(this.productList)); |
| | | // this.$refs.sampleTable.setCurrentRow(row) |
| | | // setTimeout(() => { |
| | | // this.productList.forEach(a => { |
| | | // if (a.state == 1) this.toggleSelection(a) |
| | | // }) |
| | | // }, 200) |
| | | this.$nextTick(() => { |
| | | this.methodCount++; |
| | | this.getProductLoad = false; |
| | | if (this.sampleSelectionList.length == this.methodCount) { |
| | | this.standardLoading = false; |
| | | } |
| | | }); |
| | | if (res.code === 200) { |
| | | res.data.forEach((a) => { |
| | | a.state = 0; |
| | | }); |
| | | row.insProduct = this.HaveJson(res.data); |
| | | this.productList = row.insProduct; |
| | | this.productList0 = JSON.parse(JSON.stringify(this.productList)); |
| | | // this.$refs.sampleTable.setCurrentRow(row) |
| | | // setTimeout(() => { |
| | | // this.productList.forEach(a => { |
| | | // if (a.state == 1) this.toggleSelection(a) |
| | | // }) |
| | | // }, 200) |
| | | this.$nextTick(() => { |
| | | this.methodCount++; |
| | | this.getProductLoad = false; |
| | | if (this.sampleSelectionList.length == this.methodCount) { |
| | | this.standardLoading = false; |
| | | } |
| | | }); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | this.searchProject(); |
| | | this.searchTemList(); |
| | | }, |
| | | searchTemList() { |
| | | this.temperatureList = []; |
| | | this.$axios |
| | | .post(this.$api.enums.selectEnumByCategory, { |
| | | category: "电力温度循环检验", |
| | | }) |
| | | getDicts("temperature_cycling_type") |
| | | .then((res) => { |
| | | if (res.data.length > 0) { |
| | | if (res.code === 200) { |
| | | this.temperatureEngList = res.data; |
| | | res.data.forEach((item) => { |
| | | this.temperatureList.push(item.label); |
| | | this.temperatureList.push(item.dictLabel); |
| | | }); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | changeModel() { |
| | |
| | | // }) |
| | | }, |
| | | selectStandardMethods() { |
| | | this.$axios |
| | | .get(this.$api.standardTree.selectStandardMethodEnum) |
| | | selectStandardMethodEnum() |
| | | .then((res) => { |
| | | this.methods = res.data; |
| | | if (res.code === 200) { |
| | | this.methods = res.data; |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | selectable() { |
| | |
| | | return; |
| | | } |
| | | this.noLoading = true; |
| | | this.$axios |
| | | .post( |
| | | this.$api.insOrder.upInsOrderOfState, |
| | | { |
| | | state: 2, |
| | | id: this.currentId, |
| | | tell: this.tell, |
| | | }, |
| | | { |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | } |
| | | ) |
| | | upInsOrderOfState({ |
| | | state: 2, |
| | | id: this.currentId, |
| | | tell: this.tell, |
| | | }) |
| | | .then((res) => { |
| | | this.noLoading = false; |
| | | this.tell = ""; |
| | | if (res.code == 201) return; |
| | | this.$message.success("提交成功"); |
| | | this.issuedDialogVisible = false; |
| | | this.$parent.playOrder(0); |
| | | if (res.code === 200) { |
| | | this.noLoading = false; |
| | | this.tell = ""; |
| | | this.$message.success("提交成功"); |
| | | this.issuedDialogVisible = false; |
| | | this.$router.go(-1); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | selectEnumByCategoryForSonLaboratory() { |
| | | this.$axios |
| | | .post(this.$api.enums.selectEnumByCategory, { |
| | | category: "子实验室", |
| | | }) |
| | | getDicts("sys_sub_lab") |
| | | .then((res) => { |
| | | this.factory = []; |
| | | res.data.forEach((a) => { |
| | | this.filters.push({ |
| | | text: a.label, |
| | | value: a.value, |
| | | if (res.code === 200) { |
| | | this.factory = []; |
| | | res.data.forEach((a) => { |
| | | this.filters.push({ |
| | | text: a.dictLabel, |
| | | value: a.dictValue, |
| | | }); |
| | | }); |
| | | }); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | filterHandler(value, row, column) { |
| | |
| | | return; |
| | | } |
| | | this.sampleIds = [this.sampleId]; |
| | | this.$axios |
| | | .post(this.$api.insBushing.selectBushingBySampleId, { |
| | | sampleId: this.sampleId, |
| | | }) |
| | | selectBushingBySampleId({ |
| | | sampleId: this.sampleId, |
| | | }) |
| | | .then((res) => { |
| | | if (res.data.length === 0) { |
| | | this.$message.error("该样品没有配置光纤"); |
| | | return; |
| | | } |
| | | for (var i in this.sampleList) { |
| | | if ((this.sampleList[i].id = this.sampleId)) { |
| | | this.sampleList[i].bushing = res.data; |
| | | break; |
| | | if (res.code === 200) { |
| | | if (res.data.length === 0) { |
| | | this.$message.error("该样品没有配置光纤"); |
| | | return; |
| | | } |
| | | for (var i in this.sampleList) { |
| | | if ((this.sampleList[i].id = this.sampleId)) { |
| | | this.sampleList[i].bushing = res.data; |
| | | break; |
| | | } |
| | | } |
| | | this.$nextTick(() => { |
| | | this.configShow = true; |
| | | }); |
| | | } |
| | | this.$nextTick(() => { |
| | | this.configShow = true; |
| | | }); |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | } |
| | | }, |
| | |
| | | this.$message.error("未选中样品"); |
| | | return; |
| | | } |
| | | // this.$axios.post(this.$api.insBushing.selectBushingBySampleId, { |
| | | // sampleId: this.sampleId |
| | | // }).then(res => { |
| | | // if (res.data.length === 0) { |
| | | // this.$message.error('该样品没有配置光纤') |
| | | // return |
| | | // } |
| | | // for (var i in this.sampleList) { |
| | | // if (this.sampleList[i].id = this.sampleId) { |
| | | // this.sampleList[i].bushing = res.data |
| | | // break |
| | | // } |
| | | // } |
| | | // this.configShow = true |
| | | // }) |
| | | } |
| | | }, |
| | | openCableConfig() { |
| | |
| | | this.$message.error("未选中样品"); |
| | | return; |
| | | } |
| | | // this.$axios.post(this.$api.insBushing.selectBushingBySampleId, { |
| | | // sampleId: this.sampleId |
| | | // }).then(res => { |
| | | // if (res.data.length === 0) { |
| | | // this.$message.error('该样品没有配置光纤') |
| | | // return |
| | | // } |
| | | // for (var i in this.sampleList) { |
| | | // if (this.sampleList[i].id = this.sampleId) { |
| | | // this.sampleList[i].bushing = res.data |
| | | // break |
| | | // } |
| | | // } |
| | | // this.configShow = true |
| | | // }) |
| | | } |
| | | }, |
| | | upBsm1(val) { |