| | |
| | | <div class="app-container"> |
| | | <div v-show="!cableConfigShow&&!auxiliaryShow"> |
| | | <div style="display: flex;justify-content: space-between;align-items:center;"> |
| | | <div> |
| | | 委托单信息 |
| | | </div> |
| | | <div>委托单信息</div> |
| | | <div> |
| | | <el-cascader |
| | | v-model="addObj.quarterItemId" |
| | |
| | | <el-button v-if="active==1&&addObj.sampleType!=undefined&&addObj.sampleType.indexOf('电缆')>-1" size="small" type="primary" @click="openAuxiliaryCore">辅助线芯配置</el-button> |
| | | <el-button v-show="active==1||(tabIndex==4&&active==2)" :loading="saveLoad" size="small" type="primary" @click="save">提交</el-button> |
| | | <!-- 审核 --> |
| | | <el-button v-show="active==3&&addObj.companyId" :disabled="saveLoad" :loading="saveLoad" size="small" |
| | | <el-button v-show="active==3" :disabled="saveLoad" :loading="saveLoad" size="small" |
| | | @click="upInsOrderOfState(2)">不通过</el-button> |
| | | <el-button v-show="active==3&&addObj.companyId" :loading="saveLoad" size="small" type="primary" |
| | | <el-button v-show="active==3" :loading="saveLoad" size="small" type="primary" |
| | | @click="upInsOrderOfState(1)">通过</el-button> |
| | | <el-button size="small" @click="goBack"> |
| | | <span style="color: #3A7BFA;">返回</span> |
| | |
| | | <div v-show="!cableConfigShow&&!auxiliaryShow" style="margin-top: 10px"> |
| | | <div class="search"> |
| | | <el-form ref="addObj" :inline="true" :model="addObj" :rules="addObjRules" label-width="108px" label-position="right"> |
| | | <el-form-item label="委托编号:"> |
| | | <el-input v-model="addObj.entrustCode" clearable disabled placeholder="系统生成" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="检验类别:" prop="orderType"> |
| | | <el-select v-model="addObj.orderType" :disabled="active>1&&tabIndex!=4" clearable size="small" style="width: 100%;"> |
| | | <el-option v-for="(a, ai) in dict.type.check_type1" :key="ai" :label="a.label" :value="a.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="制单人:"> |
| | | <el-input v-model="addObj.custom" disabled size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="委托单位:" prop="company"> |
| | | <el-input v-model="addObj.company" disabled placeholder="选择委托单位" size="small" style="width: 200px"> |
| | | <template slot="append"> |
| | | <el-button slot="append" :disabled="active>1&&tabIndex!=4" icon="el-icon-search" |
| | | @click="openCompanyList"></el-button> |
| | | </template> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="联系方式:" prop="phone"> |
| | | <el-input v-model="addObj.phone" :disabled="active>1&&tabIndex!=4" clearable placeholder="选择委托客户" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="紧急程度:" prop="type"> |
| | | <el-select v-model="addObj.type" :disabled="active>1&&tabIndex!=4" clearable size="small"> |
| | | <el-option v-for="(a, ai) in dict.type.urgency_level" :key="ai" :label="a.label" :value="a.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="样品名称:" prop="sample"> |
| | | <el-input v-model="addObj.sample" disabled size="small" style="width: 178px"> |
| | | <template slot="append"><el-button slot="append" :disabled="active>1&&tabIndex!=4" icon="el-icon-search" |
| | | @click="selectStandardTree = true"></el-button></template> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="样品数量:" prop="sampleNum"> |
| | | <el-input-number v-model="addObj.sampleNum" :disabled="active>1" :max="100" :min="1" :precision="0" |
| | | size="small" style="width: 65%;" @change="addStandardTree"></el-input-number> |
| | | </el-form-item> |
| | | <el-form-item label="样品状态:" prop="sampleStatus"> |
| | | <el-select v-model="addObj.sampleStatus" :disabled="active>1&&tabIndex!=4" size="small"> |
| | | <el-option v-for="(a,ai) in dict.type.sample_status_list" :key="ai" :label="a.label" :value="a.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="抽检数量:" prop="testQuantity"> |
| | | <el-input v-model="addObj.testQuantity" :disabled="active>1&&tabIndex!=4" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="来样方式:" prop="formType"> |
| | | <el-select v-model="addObj.formType" :disabled="active>1&&tabIndex!=4" size="small"> |
| | | <el-option v-for="(a,ai) in dict.type.form_type" :key="ai" :label="a.label" :value="a.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="报告发送方式:"> |
| | | <el-radio-group v-model="addObj.send" :disabled="active>1&&tabIndex!=4"> |
| | | <el-radio :label="1">自取</el-radio> |
| | | <el-radio :label="0">其他</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="样品处理方式:"> |
| | | <el-radio-group v-model="addObj.processing" :disabled="active>1&&tabIndex!=4"> |
| | | <el-radio :label="0">委托单位取回</el-radio> |
| | | <el-radio :label="1">实验室处理</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="生产单位:" prop="production"> |
| | | <el-input v-model="addObj.production" :disabled="active>1&&tabIndex!=4" clearable placeholder="请输入" |
| | | size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="生产单位EN:" prop="productionEn"> |
| | | <el-input v-model="addObj.productionEn" :disabled="active>1&&tabIndex!=4" clearable placeholder="请输入" |
| | | size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="是否留样:"> |
| | | <el-radio-group v-model="addObj.isLeave" :disabled="active>1&&tabIndex!=4"> |
| | | <el-radio :label="0">不留样</el-radio> |
| | | <el-radio :label="1">留样</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="委托人:"> |
| | | <el-input v-model="addObj.prepareUser" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '请输入'" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="委托人英文:"> |
| | | <el-input v-model="addObj.prepareUserEn" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '请输入'" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="备注:"> |
| | | <el-input v-model="addObj.remark" :autosize="{ minRows: 2, maxRows: 2}" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '请输入'" clearable |
| | | size="small" type="textarea"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="备注英文:"> |
| | | <el-input v-model="addObj.remarkEn" :autosize="{ minRows: 2, maxRows: 2}" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '请输入'" clearable |
| | | size="small" type="textarea"></el-input> |
| | | </el-form-item> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="委托编号:"> |
| | | <el-input v-model="addObj.entrustCode" clearable disabled placeholder="系统生成" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="检验类别:" prop="orderType"> |
| | | <el-select v-model="addObj.orderType" :disabled="active>1&&tabIndex!=4" clearable size="small" style="width: 100%;"> |
| | | <el-option v-for="(a, ai) in dict.type.check_type1" :key="ai" :label="a.label" :value="a.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="制单人:"> |
| | | <el-input v-model="addObj.custom" disabled size="small" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="委托单位:" prop="company"> |
| | | <el-input v-model="addObj.company" disabled placeholder="选择委托单位" size="small" style="width: 208px"> |
| | | <template slot="append"> |
| | | <el-button slot="append" :disabled="active>1&&tabIndex!=4" icon="el-icon-search" |
| | | @click="openCompanyList"></el-button> |
| | | </template> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="联系方式:" prop="phone"> |
| | | <el-input v-model="addObj.phone" :disabled="active>1&&tabIndex!=4" clearable placeholder="选择委托客户" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="紧急程度:" prop="type"> |
| | | <el-select v-model="addObj.type" :disabled="active>1&&tabIndex!=4" clearable size="small"> |
| | | <el-option v-for="(a, ai) in dict.type.urgency_level" :key="ai" :label="a.label" :value="a.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="样品名称:" prop="sample"> |
| | | <el-input v-model="addObj.sample" disabled size="small" style="width: 208px"> |
| | | <template slot="append"><el-button slot="append" :disabled="active>1&&tabIndex!=4" icon="el-icon-search" |
| | | @click="selectStandardTree = true"></el-button></template> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="样品数量:" prop="sampleNum" style="margin-right: 0"> |
| | | <el-input-number v-model="addObj.sampleNum" :disabled="active>1" :max="100" :min="1" :precision="0" |
| | | size="small" @change="addStandardTree"></el-input-number> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="样品状态:" prop="sampleStatus"> |
| | | <el-select v-model="addObj.sampleStatus" :disabled="active>1&&tabIndex!=4" size="small"> |
| | | <el-option v-for="(a,ai) in dict.type.sample_status_list" :key="ai" :label="a.label" :value="a.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="抽检数量:" prop="testQuantity"> |
| | | <el-input v-model="addObj.testQuantity" :disabled="active>1&&tabIndex!=4" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="来样方式:" prop="formType"> |
| | | <el-select v-model="addObj.formType" :disabled="active>1&&tabIndex!=4" size="small" clearable> |
| | | <el-option v-for="(a,ai) in dict.type.form_type" :key="ai" :label="a.label" :value="a.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="报告发送方式:"> |
| | | <el-radio-group v-model="addObj.send" :disabled="active>1&&tabIndex!=4" size="mini"> |
| | | <el-radio :label="1" border style="margin-right: 0">自取</el-radio> |
| | | <el-radio :label="0" border>其他</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="样品处理方式:"> |
| | | <el-radio-group v-model="addObj.processing" :disabled="active>1&&tabIndex!=4" size="mini" style="display: flex; flex-direction: column;"> |
| | | <el-radio :label="0" border style="margin-right: 0">委托单位取回</el-radio> |
| | | <el-radio :label="1" border>实验室处理</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="生产单位:" prop="production"> |
| | | <el-input v-model="addObj.production" :disabled="active>1&&tabIndex!=4" clearable placeholder="请输入" |
| | | size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="生产单位EN:" prop="productionEn"> |
| | | <el-input v-model="addObj.productionEn" :disabled="active>1&&tabIndex!=4" clearable placeholder="请输入" |
| | | size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="是否留样:"> |
| | | <el-radio-group v-model="addObj.isLeave" border :disabled="active>1&&tabIndex!=4" size="mini"> |
| | | <el-radio :label="0" border style="margin-right: 0">不留样</el-radio> |
| | | <el-radio :label="1" border>留样</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="委托人:"> |
| | | <el-input v-model="addObj.prepareUser" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '请输入'" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="委托人英文:"> |
| | | <el-input v-model="addObj.prepareUserEn" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '请输入'" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="备注:"> |
| | | <el-input v-model="addObj.remark" :autosize="{ minRows: 2, maxRows: 2}" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '请输入'" clearable |
| | | size="small" style="width: 100%" type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="备注英文:"> |
| | | <el-input v-model="addObj.remarkEn" :autosize="{ minRows: 2, maxRows: 2}" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '请输入'" clearable |
| | | size="small" type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="样品名称:"> |
| | |
| | | </el-form> |
| | | </div> |
| | | <div> |
| | | <div style="display: flex;justify-content: space-between;"> |
| | | <div style="display: flex;justify-content: space-between;background-color: #F5F7FB;margin-bottom: 6px"> |
| | | <div v-if="active==1"> |
| | | <el-form :inline="true" :model="addObj1" label-width="90px"> |
| | | <el-form-item label="样品型号:" style="margin-bottom: 6px"> |
| | | <el-form-item label="样品型号:" style="margin-bottom: 6px;margin-top: 6px"> |
| | | <el-select v-model="model" :placeholder="active>1 ? '' : '请输入'" |
| | | allow-create clearable default-first-option filterable |
| | | size="small" |
| | |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="检验标准:"> |
| | | <el-form-item label="检验标准:" style="margin-bottom: 6px;margin-top: 6px"> |
| | | <el-select v-model="standardMethodListId" :loading="methodLoad" |
| | | :placeholder="active>1 ? '' : '请输入'" clearable size="small" |
| | | @change="changeStandardMethodListId" @focus="methodFocus"> |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div style="display: flex;align-items: center"> |
| | | <div style="display: flex;align-items: center;margin-bottom: 6px;margin-top: 6px"> |
| | | <span style="width: 150px;font-size: 14px;text-align: right;">特殊标准:</span> |
| | | <el-input v-model="specialStandardMethod" :disabled="!isSpecial" clearable |
| | | size="small"></el-input> |
| | | <el-input v-model="specialStandardMethod" :disabled="!isSpecial" clearable size="small"></el-input> |
| | | <el-button v-show="active==1" size="small" style="margin-left: 10px" |
| | | type="primary" @click="editSpecial">编辑</el-button> |
| | | </div> |
| | | </div> |
| | | <el-table ref="sampleTable" :data="sampleList" border class="el-table sampleTable" highlight-current-row |
| | | :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" |
| | | max-height="400px" tooltip-effect="dark" @selection-change="selectSample" @row-click="rowClick"> |
| | | <el-table-column v-if="active==1" :selectable="selectable" type="selection" width="60"></el-table-column> |
| | | <el-table-column align="center" label="序号" type="index" width="65"></el-table-column> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-table ref="productTable" v-loading="getProductLoad" :data="productList" :row-class-name="tableRowClassName" border class="el-table" |
| | | <el-table ref="productTable" v-loading="getProductLoad" :data="productList" |
| | | :row-class-name="tableRowClassName" border class="el-table" |
| | | :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" |
| | | max-height="400px" style="margin-bottom: 10px;" tooltip-effect="dark" |
| | | @select="selectOne" @selection-change="selectProduct" @select-all="handleAll"> |
| | | <el-table-column v-if="active==1" :selectable="selectable0" type="selection" width="65"></el-table-column> |
| | |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-row> |
| | | <el-button @click="issuedDialogVisible=false;goBack">取 消</el-button> |
| | | <el-button @click="issuedDialogVisible=false;closeOpenPage">取 消</el-button> |
| | | <el-button :loading="upLoad" type="primary" @click="submitForm2">确 定</el-button> |
| | | </el-row> |
| | | </span> |
| | |
| | | } from "@/api/business/rawMaterialOrder"; |
| | | import { |
| | | addInsOrder, addInsOrderTemplate, delInsOrderTemplate, |
| | | getQuarterOnOrder, |
| | | getQuarterOnOrder, selectInsOrderTemplateById, |
| | | selectOrderManDay, |
| | | updateInsOrder, |
| | | upInsOrder, |
| | |
| | | import {selectsStandardMethodByFLSSM} from "@/api/standard/standardLibrary"; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import {selectCustomPageList} from "@/api/system/customer"; |
| | | import {mapGetters} from "vuex"; |
| | | |
| | | export default { |
| | | name: 'Add', |
| | | components: { |
| | | limsTable, |
| | | cableConfig, |
| | | AuxiliaryWireCore |
| | | }, |
| | | computed:{ |
| | | ...mapGetters(["nickName"]), |
| | | }, |
| | | dicts: ['check_type1', 'urgency_level', 'form_type', 'sample_status_list'], |
| | | data() { |
| | | return { |
| | | active: '', |
| | | tabIndex: '', |
| | | currentId: '', |
| | | sampleSelectionList: [],//样品表格选中数据 |
| | | editTable:[], |
| | | template: null, |
| | | templates: [], |
| | | addObj: { |
| | | entrustCode: null, |
| | | custom: null, |
| | | company: null, |
| | | userId: null, |
| | | type: '0', |
| | | code: null, |
| | | appointed: null, |
| | | remark: null, // 备注 |
| | | remarkEn: null, // 备注英文 |
| | | sample: null, |
| | | factory: null, |
| | | laboratory: null, |
| | | sampleType: null, |
| | | sampleNum: 1, |
| | | unit: null, |
| | | model: null, |
| | | method: null, |
| | | phone: null, |
| | | processing: 1, |
| | | isLeave: 0, |
| | | orderType: null, |
| | | send: 1, |
| | | formType: '送检', // 来样方式 |
| | | sampleStatus: 'In good condition', // 样品状态 |
| | | testQuantity: '', // 样品状态 |
| | | production: null, |
| | | productionEn: null, |
| | | companyId: null, |
| | | prepareUser:null, // 委托人 |
| | | prepareUserEn:null, // 委托人英文 |
| | | prepareCode: '', // 委托人工号 |
| | | quarterItemId: '', |
| | | sampleView: '', // 样品名称(报告展示字段) |
| | | sampleViewEn: '', // 样品名称英文(报告展示字段) |
| | | }, |
| | | addObjRules: { // 表单校验规则 |
| | | orderType: [ |
| | | { required: true, message: '请选择检验类别', trigger: 'change' } |
| | | ], |
| | | company: [ |
| | | { required: true, message: '请选择委托单位', trigger: 'change' } |
| | | ], |
| | | phone: [ |
| | | { required: true, message: '请填写联系方式', trigger: 'blur' } |
| | | ], |
| | | type: [ |
| | | { required: true, message: '请选择紧急程度', trigger: 'change' } |
| | | ], |
| | | sample: [ |
| | | { required: true, message: '请选择样品名称', trigger: 'change' } |
| | | ], |
| | | sampleNum: [ |
| | | { required: true, message: '请填写样品数量', trigger: 'blur' } |
| | | ], |
| | | sampleStatus: [ |
| | | { required: true, message: '请选择样品状态', trigger: 'change' } |
| | | ], |
| | | formType: [ |
| | | { required: true, message: '请选择来样方式', trigger: 'change' } |
| | | ], |
| | | testQuantity: [ |
| | | { required: true, message: '请填写抽检数量', trigger: 'blur' } |
| | | ], |
| | | production: [ |
| | | { required: true, message: '请填写生产单位', trigger: 'blur' } |
| | | ], |
| | | productionEn: [ |
| | | { required: true, message: '请填写生产单位EN', trigger: 'blur' } |
| | | ], |
| | | }, |
| | | sample: { |
| | | sampleCode: null, |
| | | laboratory: null, |
| | | factory: null, |
| | | sampleType: null, |
| | | sample: null, |
| | | model: null, |
| | | modelNum: null, |
| | | sampleNum: 1, |
| | | isLeave: 0, |
| | | unit: null |
| | | }, |
| | | type: [], |
| | | selectUserDia: false, |
| | | tableData1: [], |
| | | tableLoading1: false, |
| | | multipleSelection: [], |
| | | column1: [ |
| | | {label: '客户名称', prop: 'company'}, |
| | | {label: '客户单位EN', prop: 'companyEn'}, |
| | | {label: '单位地址', prop: 'address'}, |
| | | {label: '单位地址EN', prop: 'addressEn'}, |
| | | {label: '单位电话', prop: 'phone'}, |
| | | {label: '加急额度', prop: 'num'}, |
| | | {label: '客户编号', prop: 'code2'}, |
| | | {label: '工厂域', prop: 'code'} |
| | | ], |
| | | page1: { |
| | | total:0, |
| | | size:10, |
| | | current:1 |
| | | }, |
| | | selectStandardTree: false, |
| | | search: null, |
| | | list: [], |
| | | selectStandardTreeLoading: false, |
| | | selectTree: null, |
| | | sampleViewEn: null, |
| | | expandedKeys: [], |
| | | sampleList: [], |
| | | sampleIds: [], |
| | | methodList: [], |
| | | addSampleDia: false, |
| | | count: 1, |
| | | productList: [], |
| | | productList0: [], |
| | | bsm1DiaList: [], |
| | | productIds: [], |
| | | getProductLoad: false, |
| | | saveLoad: false, |
| | | templateDia: false, |
| | | templateLoading: false, |
| | | templateName: '', |
| | | issuedDialogVisible: false, |
| | | distributeData: { |
| | | appointed: '', |
| | | userId: '', |
| | | sonLaboratory:'' |
| | | }, |
| | | personList: [], |
| | | upLoad: false, |
| | | models: [], |
| | | methods: [], |
| | | methodLoad: false, |
| | | noDialogVisible: false, |
| | | tell: '', |
| | | noLoading: false, |
| | | orderType: [], |
| | | filters: [], |
| | | formType: [], |
| | | currentMethod: null, |
| | | isAskOnlyRead: false, |
| | | sampleId: null, |
| | | bsmRow: null, |
| | | bsm1: false, |
| | | bsm1Val: null, |
| | | bsm1DiaAll: false, |
| | | cableConfigShow: false, |
| | | auxiliaryShow: false, |
| | | bsm3Dia: false, |
| | | // total: 0, |
| | | RTS: '', |
| | | totalArr: [], |
| | | addObj1: {}, |
| | | data() { |
| | | return { |
| | | active: '', |
| | | tabIndex: '', |
| | | currentId: '', |
| | | sampleSelectionList: [],//样品表格选中数据 |
| | | editTable:[], |
| | | template: null, |
| | | templates: [], |
| | | addObj: { |
| | | entrustCode: null, |
| | | custom: null, |
| | | company: null, |
| | | userId: null, |
| | | type: '0', |
| | | code: null, |
| | | appointed: null, |
| | | remark: null, // 备注 |
| | | remarkEn: null, // 备注英文 |
| | | sample: null, |
| | | factory: null, |
| | | laboratory: null, |
| | | sampleType: null, |
| | | sampleNum: 1, |
| | | unit: null, |
| | | model: null, |
| | | standardMethodListId: null, |
| | | symbolList:['RTS'], |
| | | inspectionItem:null, |
| | | inspectionItemSubclass:null, |
| | | methodS:null, |
| | | isBsm2Val2:false, |
| | | temperatureEngList: [], |
| | | isShowInput: false, |
| | | temId: '', |
| | | sonLaboratoryList:[], |
| | | selectiveEcho: [], // 检验下单的时候勾选检验项目,如果使用筛选提交显示检验项目为空 回显列表 |
| | | quarterItemOptions: [], // 查询季度信息 |
| | | specialStandardMethod: '', |
| | | isSpecial: false, |
| | | } |
| | | method: null, |
| | | phone: null, |
| | | processing: 1, |
| | | isLeave: 0, |
| | | orderType: null, |
| | | send: 1, |
| | | formType: '送检', // 来样方式 |
| | | sampleStatus: 'In good condition', // 样品状态 |
| | | testQuantity: '', // 样品状态 |
| | | production: null, |
| | | productionEn: null, |
| | | companyId: null, |
| | | prepareUser:null, // 委托人 |
| | | prepareUserEn:null, // 委托人英文 |
| | | prepareCode: '', // 委托人工号 |
| | | quarterItemId: '', |
| | | sampleView: '', // 样品名称(报告展示字段) |
| | | sampleViewEn: '', // 样品名称英文(报告展示字段) |
| | | }, |
| | | addObjRules: { // 表单校验规则 |
| | | orderType: [ |
| | | { required: true, message: '请选择检验类别', trigger: 'change' } |
| | | ], |
| | | company: [ |
| | | { required: true, message: '请选择委托单位', trigger: 'change' } |
| | | ], |
| | | phone: [ |
| | | { required: true, message: '请填写联系方式', trigger: 'blur' } |
| | | ], |
| | | type: [ |
| | | { required: true, message: '请选择紧急程度', trigger: 'change' } |
| | | ], |
| | | sample: [ |
| | | { required: true, message: '请选择样品名称', trigger: 'change' } |
| | | ], |
| | | sampleNum: [ |
| | | { required: true, message: '请填写样品数量', trigger: 'blur' } |
| | | ], |
| | | sampleStatus: [ |
| | | { required: true, message: '请选择样品状态', trigger: 'change' } |
| | | ], |
| | | formType: [ |
| | | { required: true, message: '请选择来样方式', trigger: 'change' } |
| | | ], |
| | | testQuantity: [ |
| | | { required: true, message: '请填写抽检数量', trigger: 'blur' } |
| | | ], |
| | | production: [ |
| | | { required: true, message: '请填写生产单位', trigger: 'blur' } |
| | | ], |
| | | productionEn: [ |
| | | { required: true, message: '请填写生产单位EN', trigger: 'blur' } |
| | | ], |
| | | }, |
| | | sample: { |
| | | sampleCode: null, |
| | | laboratory: null, |
| | | factory: null, |
| | | sampleType: null, |
| | | sample: null, |
| | | model: null, |
| | | modelNum: null, |
| | | sampleNum: 1, |
| | | isLeave: 0, |
| | | unit: null |
| | | }, |
| | | type: [], |
| | | selectUserDia: false, |
| | | tableData1: [], |
| | | tableLoading1: false, |
| | | multipleSelection: [], |
| | | column1: [ |
| | | {label: '客户名称', prop: 'company'}, |
| | | {label: '客户单位EN', prop: 'companyEn'}, |
| | | {label: '单位地址', prop: 'address'}, |
| | | {label: '单位地址EN', prop: 'addressEn'}, |
| | | {label: '单位电话', prop: 'phone'}, |
| | | {label: '加急额度', prop: 'num'}, |
| | | {label: '客户编号', prop: 'code2'}, |
| | | {label: '工厂域', prop: 'code'} |
| | | ], |
| | | page1: { |
| | | total:0, |
| | | size:10, |
| | | current:1 |
| | | }, |
| | | selectStandardTree: false, |
| | | search: null, |
| | | list: [], |
| | | selectStandardTreeLoading: false, |
| | | selectTree: null, |
| | | sampleViewEn: null, |
| | | expandedKeys: [], |
| | | sampleList: [], |
| | | upIndex: 0, |
| | | sampleIds: [], |
| | | methodList: [], |
| | | addSampleDia: false, |
| | | count: 1, |
| | | productList: [], |
| | | productList0: [], |
| | | bsm1DiaList: [], |
| | | productIds: [], |
| | | getProductLoad: false, |
| | | saveLoad: false, |
| | | templateDia: false, |
| | | templateLoading: false, |
| | | templateName: '', |
| | | issuedDialogVisible: false, |
| | | distributeData: { |
| | | appointed: '', |
| | | userId: '', |
| | | sonLaboratory:'' |
| | | }, |
| | | personList: [], |
| | | upLoad: false, |
| | | models: [], |
| | | methods: [], |
| | | methodLoad: false, |
| | | noDialogVisible: false, |
| | | tell: '', |
| | | noLoading: false, |
| | | orderType: [], |
| | | filters: [], |
| | | formType: [], |
| | | currentMethod: null, |
| | | isAskOnlyRead: false, |
| | | sampleId: null, |
| | | bsmRow: null, |
| | | bsm1: false, |
| | | bsm1Val: null, |
| | | bsm1DiaAll: false, |
| | | cableConfigShow: false, |
| | | auxiliaryShow: false, |
| | | bsm3Dia: false, |
| | | // total: 0, |
| | | RTS: '', |
| | | totalArr: [], |
| | | addObj1: {}, |
| | | model: null, |
| | | standardMethodListId: null, |
| | | symbolList:['RTS'], |
| | | inspectionItem:null, |
| | | inspectionItemSubclass:null, |
| | | methodS:null, |
| | | isBsm2Val2:false, |
| | | temperatureEngList: [], |
| | | isShowInput: false, |
| | | temId: '', |
| | | sonLaboratoryList:[], |
| | | selectiveEcho: [], // 检验下单的时候勾选检验项目,如果使用筛选提交显示检验项目为空 回显列表 |
| | | quarterItemOptions: [], // 查询季度信息 |
| | | specialStandardMethod: '', |
| | | isSpecial: false, |
| | | } |
| | | }, |
| | | watch: { |
| | | sampleList() { |
| | | this.addObj.method = null |
| | | this.productList = [] |
| | | }, |
| | | watch: { |
| | | sampleList() { |
| | | this.addObj.method = null |
| | | this.productList = [] |
| | | }, |
| | | productList: { |
| | | deep: true, |
| | | handler(val) { |
| | | if (val && val.length > 0) { |
| | | let arr = []; |
| | | val.forEach(item => { |
| | | if (item.sonLaboratory && !arr.find(a => a.value == item.sonLaboratory)) { |
| | | arr.push({ |
| | | text: item.sonLaboratory, |
| | | value: item.sonLaboratory |
| | | }) |
| | | } |
| | | }) |
| | | this.filters = arr |
| | | } |
| | | } |
| | | }, |
| | | sampleList: { |
| | | deep: true, |
| | | handler(val) { |
| | | this.getTotal() |
| | | } |
| | | }, |
| | | 'addObj.sample'(val) { |
| | | this.model = null |
| | | this.standardMethodListId = null |
| | | }, |
| | | 'addObj.sampleNum'(val) { |
| | | this.model = null |
| | | this.standardMethodListId = null |
| | | }, |
| | | tabIndex(val){ |
| | | if(val==4&&this.active==2){ |
| | | this.isSpecial = true |
| | | }else{ |
| | | this.isSpecial = false |
| | | productList: { |
| | | deep: true, |
| | | handler(val) { |
| | | if (val && val.length > 0) { |
| | | let arr = []; |
| | | val.forEach(item => { |
| | | if (item.sonLaboratory && !arr.find(a => a.value == item.sonLaboratory)) { |
| | | arr.push({ |
| | | text: item.sonLaboratory, |
| | | value: item.sonLaboratory |
| | | }) |
| | | } |
| | | }) |
| | | this.filters = arr |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.active = this.$route.query.active |
| | | this.tabIndex = this.$route.query.tabIndex |
| | | this.currentId = this.$route.query.currentId |
| | | sampleList: { |
| | | deep: true, |
| | | handler(val) { |
| | | this.getTotal() |
| | | } |
| | | }, |
| | | 'addObj.sample'(val) { |
| | | this.model = null |
| | | this.standardMethodListId = null |
| | | }, |
| | | 'addObj.sampleNum'(val) { |
| | | this.model = null |
| | | this.standardMethodListId = null |
| | | }, |
| | | tabIndex(val){ |
| | | if(val==4&&this.active==2){ |
| | | this.isSpecial = true |
| | | }else{ |
| | | this.isSpecial = false |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.active = this.$route.query.active |
| | | this.tabIndex = this.$route.query.tabIndex |
| | | this.currentId = this.$route.query.currentId |
| | | this.getInfo() |
| | | }, |
| | | activated() { |
| | | this.active = this.$route.query.active |
| | | this.tabIndex = this.$route.query.tabIndex |
| | | this.currentId = this.$route.query.currentId |
| | | this.getInfo(); |
| | | }, |
| | | methods: { |
| | | getInfo() { |
| | | this.getUserNowData() |
| | | this.selectStandardTreeList() |
| | | this.getAuthorizedPerson(); |
| | |
| | | this.isSpecial = false |
| | | } |
| | | }, |
| | | methods: { |
| | | getPrepareUser () { |
| | | getPrepareUser () { |
| | | // this.addObj.prepareUser = JSON.parse(localStorage.getItem("user")).name; |
| | | // this.addObj.prepareUserEn = JSON.parse(localStorage.getItem("user")).nameEn |
| | | // this.addObj.prepareCode = JSON.parse(localStorage.getItem("user")).account |
| | | }, |
| | | }, |
| | | // 编辑要求值表格 |
| | | editSpecial () { |
| | | this.isSpecial = true |
| | | this.$nextTick(() => { |
| | | this.$refs.productTable.doLayout(); |
| | | }); |
| | | }, |
| | | getQuarterOnOrderList () { |
| | | getQuarterOnOrder().then(res => { |
| | |
| | | }, |
| | | // 获取用户列表 |
| | | getAuthorizedPerson() { |
| | | selectUserCondition().then(res => { |
| | | selectUserCondition({ type: 1 }).then(res => { |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | |
| | | this.saveLoad = false |
| | | this.$message.success('已提交') |
| | | this.bsm3Dia = false; |
| | | this.goBack() |
| | | this.closeOpenPage() |
| | | }).catch(e=>{ |
| | | this.saveLoad = false |
| | | }) |
| | |
| | | this.saveLoad = false |
| | | this.$message.success('已提交') |
| | | this.bsm3Dia = false; |
| | | this.goBack() |
| | | this.closeOpenPage() |
| | | }).catch(e=>{ |
| | | this.saveLoad = false |
| | | }) |
| | |
| | | company: this.addObj.company |
| | | }).then(res => { |
| | | this.saveLoad = false |
| | | if (res.code == 201) return |
| | | this.$message.success('提交成功') |
| | | selectOrderManDay({ |
| | | id: this.currentId |
| | |
| | | userId: this.distributeData.userId, |
| | | sonLaboratory:this.distributeData.sonLaboratory |
| | | }).then(res => { |
| | | if (res.code === 201) { |
| | | this.upLoad = false |
| | | return |
| | | } |
| | | this.$message.success('提交成功') |
| | | this.upLoad = false |
| | | this.issuedDialogVisible = false |
| | | this.goBack() |
| | | this.closeOpenPage() |
| | | }).catch(e => { |
| | | this.$message.error('提交失败') |
| | | this.upLoad = false |
| | |
| | | backtrack([], nums); |
| | | return result; |
| | | }, |
| | | tableRowClassName({ |
| | | row, |
| | | rowIndex |
| | | }) { |
| | | if (row.state === 0) { |
| | | tableRowClassName({row, rowIndex}) { |
| | | if (row.state == 1) { |
| | | console.log('row.state---', row.state) |
| | | return 'warning-row'; |
| | | } else { |
| | | return ''; |
| | | } |
| | | return 'warning-row'; |
| | | }, |
| | | selectInsOrderTemplate() { |
| | | selectInsOrderTemplate({company: this.addObj.company}).then(res => { |
| | |
| | | delInsOrderTemplate({ |
| | | id: row.id |
| | | }).then(res => { |
| | | if (res.code === 201) { |
| | | return |
| | | } |
| | | this.$message.success('删除成功') |
| | | this.selectInsOrderTemplate() |
| | | }).catch(e => { |
| | |
| | | selectInsOrderTemplateById({id: e}).then(res => { |
| | | let obj = JSON.parse(res.data) |
| | | //制单人设置为当前登录用户 |
| | | let user = JSON.parse(localStorage.getItem('user')) |
| | | let user = this.nickName |
| | | obj.addObj.custom = user.name |
| | | obj.addObj.userId = user.userId |
| | | this.addObj = obj.addObj; |
| | | this.sampleList = obj.sampleList; |
| | | this.selectTree = obj.selectTree |
| | | this.rowClick(this.sampleList[0]) |
| | | }) |
| | | }, |
| | | delSampleAndProduct() { |
| | |
| | | this.productList = row.insProduct |
| | | this.productList0 = JSON.parse(JSON.stringify(this.productList)) |
| | | this.$refs.sampleTable.setCurrentRow(row) |
| | | this.$nextTick(() => { |
| | | this.$refs.productTable.doLayout(); |
| | | this.upIndex++ |
| | | }); |
| | | setTimeout(() => { |
| | | this.productList.forEach(a => { |
| | | if (a.state == 1) this.toggleSelection(a) |
| | |
| | | state: 2, |
| | | id: this.currentId, |
| | | tell: this.tell |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | this.noLoading = false; |
| | | this.tell = ''; |
| | | this.$message.success('提交成功') |
| | | this.issuedDialogVisible = false; |
| | | this.goBack() |
| | | this.closeOpenPage() |
| | | }) |
| | | }, |
| | | filterHandler(value, row, column) { |
| | |
| | | this.productList0.splice(index,1) |
| | | }, |
| | | goBack () { |
| | | if (this.active == 1) { |
| | | this.$router.go(-1) |
| | | } else { |
| | | this.closeOpenPage() |
| | | } |
| | | }, |
| | | closeOpenPage() { |
| | | this.$router.go(-1) |
| | | } |
| | | this.$tab.closeOpenPage() |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .el-table .warning-row .cell { |
| | | color: #3A7BFA; |
| | | >>>.warning-row { |
| | | color: #1890FF; |
| | | } |
| | | </style> |