| | |
| | | <td colspan="6"> |
| | | <ul> |
| | | <li> |
| | | <i :class="`${infoForm.way == 1 ? 'el-icon-success' : 'el-icon-circle-check'}`"></i> 送样 |
| | | <span class="success-icon">{{infoForm.way == 1 ? '√' : ''}}</span> |
| | | <span>▢ 送样</span> |
| | | </li> |
| | | <li> |
| | | <i :class="`${infoForm.way == 2 ? 'el-icon-success' : 'el-icon-circle-check'}`"></i> 上门 |
| | | <span class="success-icon">{{infoForm.way == 2 ? '√' : ''}}</span> |
| | | <span>▢ 上门</span> |
| | | </li> |
| | | </ul> |
| | | </td> |
| | |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-form-item label="联系人:"> |
| | | <el-input style="width: 200px" v-model="infoForm.contacter" placeholder="请输入委托单位" size="small" /> |
| | | <el-input style="width: 200px" v-model="infoForm.contacter" placeholder="请输入联系人" size="small" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | |
| | | label-width="100px" size="mini"> |
| | | <el-row :gutter="50"> |
| | | <el-col :span="11"> |
| | | <el-form-item label="样品编号:"> |
| | | <el-form-item label="样品编号:" prop="sampleNumber"> |
| | | <el-input v-model="addPointerForm.sampleNumber" size="small" disabled> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="11"> |
| | | <el-form-item label="样品名称:"> |
| | | <el-form-item label="样品名称:" prop="sampleName"> |
| | | <el-select v-model="addPointerForm.sampleName" size="small" placeholder="请选择样品名称" |
| | | @change="upMaterialName"> |
| | | <el-option v-for="(options,index) in sampleoptions" :key="index" :value="options.key" :label="options.value"></el-option> |
| | |
| | | </el-row> |
| | | <el-row :gutter="50"> |
| | | <el-col :span="11"> |
| | | <el-form-item label="评定标准:"> |
| | | <el-form-item label="评定标准:" prop="addway"> |
| | | <el-select v-model="addPointerForm.addway" size="small" placeholder="请选择评定标准"> |
| | | <el-option v-for="options in model_spe_options" :value="options.value" |
| | | :key="options.key">{{ options.value }}</el-option> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="11"> |
| | | <el-form-item label="规格型号:"> |
| | | <el-form-item label="规格型号:" prop="specificationsModels"> |
| | | <el-select v-model="addPointerForm.specificationsModels" size="small" placeholder="请先选择样品名称" |
| | | @change="getProductList"> |
| | | <el-option v-for="options in model_sta_options" :value="options.key" :label="options.value" |
| | |
| | | </el-row> |
| | | <el-row :gutter="50"> |
| | | <el-col :span="11"> |
| | | <el-form-item label="样品单位:"> |
| | | <el-form-item label="样品单位:" prop="unit"> |
| | | <el-input type="text" v-model="addPointerForm.unit" placeholder="请输入单位" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="11"> |
| | | <el-form-item label="样品数量:"> |
| | | <el-form-item label="样品数量:" prop="samplesNumber"> |
| | | <el-input type="text" v-model="addPointerForm.samplesNumber" placeholder="请输入数量" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="50"> |
| | | <el-col :span="11"> |
| | | <el-form-item label="添加项目:"> |
| | | <el-form-item label="添加项目:" prop="experiment" :rules="[{required: true,message:'项目不能为空',trigger:'blur'}]"> |
| | | <el-checkbox-group v-model="addPointerForm.experiment" style="display: flex; flex-direction: column;"> |
| | | <el-checkbox v-for="(expers, ai) in productList" :label="expers" |
| | | :key="ai">{{ expers }}</el-checkbox> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="11"> |
| | | <el-form-item label="备注:"> |
| | | <el-form-item label="备注:" prop="remarks"> |
| | | <el-input type="textarea" :autosize="{ minRows: 4, maxRows: 20}" style="width: 200px;" |
| | | v-model="addPointerForm.remarks" placeholder="请输入备注" autocomplete="off" /> |
| | | </el-form-item> |
| | |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="addInspection">添加</el-button> |
| | | <el-button type="primary" @click="addInspection('addPointerForm')">添加</el-button> |
| | | <el-button @click="dialogueFormVisible = false">取 消</el-button> |
| | | </span> |
| | | </el-dialog> |
| | |
| | | } |
| | | }, |
| | | watch: { |
| | | dialogueFormVisible(val){ |
| | | if(val == false){ |
| | | this.addPointerForm = { |
| | | sampleNumber: '', |
| | | sampleName: '', |
| | | specificationsModels: '', |
| | | unit: '', |
| | | samplesNumber: '', |
| | | remarks: '', |
| | | experiment: [], |
| | | addway: '', |
| | | speName: '' |
| | | } |
| | | this.productList = []; |
| | | this.$refs['addPointerForm'].clearValidate(); |
| | | } |
| | | }, |
| | | addPointerForm: { |
| | | handler: function(val) { |
| | | if (val.addway != "") { |
| | |
| | | }, |
| | | methods: { |
| | | printCommision(){ |
| | | if(this.detectionInfo.length < 1){ |
| | | this.$message.error("请先添加一条样品数据!"); |
| | | return |
| | | } |
| | | console.log(this.infoForm); |
| | | PrintJS({ |
| | | printable: "printCommision", |
| | | type: "html", |
| | | css: [ |
| | | "https://unpkg.com/element-ui/lib/theme-chalk/fonts/element-icons.ttf", |
| | | "https://unpkg.com/element-ui/lib/theme-chalk/fonts/element-icons.woff", |
| | | "https://unpkg.com/element-ui/lib/theme-chalk/icon.css" |
| | | ], |
| | | targetStyles: ["*"], |
| | | ignoreElements: ["no-ignore"], |
| | | }); |
| | |
| | | } |
| | | }) |
| | | }, |
| | | addInspection() { |
| | | let sName = this.addPointerForm.sampleName; |
| | | this.sampleoptions.forEach(a=>{ |
| | | if(a.key == sName) this.sampleNameList.push(a.value); |
| | | }) |
| | | this.standardList.push(this.addPointerForm.addway); |
| | | this.testProjectList.push(this.addPointerForm.experiment); |
| | | let exper = this.addPointerForm.experiment[0] |
| | | for (let i = 1; i < this.addPointerForm.experiment.length; i++) { |
| | | exper += ',' + this.addPointerForm.experiment[i] |
| | | } |
| | | this.addPointerForm.experiment = exper |
| | | let tmp = this.addPointerForm |
| | | this.sampleoptions.forEach(a => { |
| | | if (a.key == tmp.sampleName) tmp.sampleName = a.value |
| | | }) |
| | | tmp.speName = tmp.addway + '-' + tmp.speName |
| | | tmp.addway = 1 |
| | | this.detectionInfo.push(tmp) |
| | | this.dialogueFormVisible = false |
| | | this.addPointerForm = { |
| | | sampleNumber: '', |
| | | sampleName: '', |
| | | specificationsModels: '', |
| | | unit: '', |
| | | samplesNumber: '', |
| | | remarks: '', |
| | | experiment: [], |
| | | addway: '', |
| | | speName: '' |
| | | } |
| | | console.log(this.sampleNameList); |
| | | addInspection(formName) { |
| | | this.$refs[formName].validate((valid)=>{ |
| | | if(valid){ |
| | | let sName = this.addPointerForm.sampleName; |
| | | this.sampleoptions.forEach(a=>{ |
| | | if(a.key == sName) this.sampleNameList.push(a.value); |
| | | }) |
| | | this.standardList.push(this.addPointerForm.addway); |
| | | this.testProjectList.push(this.addPointerForm.experiment); |
| | | let exper = this.addPointerForm.experiment[0] |
| | | for (let i = 1; i < this.addPointerForm.experiment.length; i++) { |
| | | exper += ',' + this.addPointerForm.experiment[i] |
| | | } |
| | | this.addPointerForm.experiment = exper |
| | | let tmp = this.addPointerForm |
| | | this.sampleoptions.forEach(a => { |
| | | if (a.key == tmp.sampleName) tmp.sampleName = a.value |
| | | }) |
| | | tmp.speName = tmp.addway + '-' + tmp.speName |
| | | tmp.addway = 1 |
| | | this.detectionInfo.push(tmp) |
| | | this.dialogueFormVisible = false |
| | | } |
| | | }); |
| | | }, |
| | | async submitInspection() { |
| | | if(this.detectionInfo.length < 1){ |
| | | this.$message.error("请先添加一条样品数据!"); |
| | | return |
| | | } |
| | | let sampledeliveryway |
| | | if (this.infoForm.way === '送样') { |
| | | sampledeliveryway = 1 |
| | |
| | | display: inline; |
| | | width:100px; |
| | | margin: 0 25px; |
| | | .success-icon{ |
| | | position: relative; |
| | | left: 15px; |
| | | bottom: 3px; |
| | | } |
| | | } |
| | | } |
| | | |