| | |
| | | style="width: 200px;" |
| | | > |
| | | </el-input>--> |
| | | <el-button type="primary" size="small" style="background-color: rgb(1, 102, 226);">重置</el-button> |
| | | </div> |
| | | <el-table ref="detectionInfo" :max-height="800" :cell-style="{textAlign: 'center'}" |
| | | :header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'center'}" |
| | | :data="detectionInfo" style="width: 100%;margin-bottom: 20px;"> |
| | | <el-table-column type="index" label="序号" min-width="10%" /> |
| | | <el-table-column prop="sampleNumber" label="样品编号" min-width="8%" /> |
| | | |
| | | <el-table-column prop="sampleName" label="样品名称" min-width="10%" /> |
| | | |
| | | <el-table-column prop="specificationsModels" label="规格型号" min-width="10%" /> |
| | | <el-table-column prop="unit" label="单位" min-width="8%" /> |
| | | <el-table-column prop="samplesNumber" label="数量" min-width="8%" /> |
| | |
| | | <el-table-column prop="remarks" label="备注" min-width="8%" /> |
| | | <el-table-column label="操作" min-width="8%"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" size="small">修改</el-button> |
| | | <el-button type="text" size="small" @click="deleteRow(scope.row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | </el-row> |
| | | <el-row :gutter="50"> |
| | | <el-col :span="11"> |
| | | <el-form-item label="规格型号:"> |
| | | <el-select v-model="addPointerForm.specificationsModels" size="small" placeholder="请先选择样品名称"> |
| | | <el-form-item label="评定标准:"> |
| | | <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-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="11"> |
| | | <el-form-item label="样品单位:"> |
| | | <el-input type="text" v-model="addPointerForm.unit" placeholder="请输入单位" autocomplete="off" /> |
| | | <el-form-item label="规格型号:"> |
| | | <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" |
| | | :key="options.key">{{ options.value }}</el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="50"> |
| | | <el-col :span="11"> |
| | | <el-form-item label="样品单位:"> |
| | | <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-input type="text" v-model="addPointerForm.samplesNumber" placeholder="请输入数量" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="11"> |
| | | <el-form-item label="备注:"> |
| | | <el-input type="text" v-model="addPointerForm.remarks" placeholder="请输入备注" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="50"> |
| | | <el-col :span="10"> |
| | | <el-col :span="9"> |
| | | <el-form-item label="添加项目:"> |
| | | <el-checkbox-group v-model="addPointerForm.experiment" style="display: flex; flex-direction: column;"> |
| | | <el-checkbox v-for="expers in experList" :label="expers.label" |
| | | :key="expers.key">{{ expers.label }}</el-checkbox> |
| | | <el-checkbox v-for="(expers, ai) in productList" :label="expers" |
| | | :key="ai">{{ expers }}</el-checkbox> |
| | | </el-checkbox-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="41"> |
| | | <el-form-item label="备注:"> |
| | | <el-input type="textarea" :autosize="{ minRows: 4, maxRows: 20}" style="width: 200px;" |
| | | v-model="addPointerForm.remarks" placeholder="请输入备注" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | getModelSpecification, |
| | | getlink, |
| | | addInspection, |
| | | isIfViewUUID |
| | | isIfViewUUID, |
| | | getProductList |
| | | } from '@/api/inspection/commisioninspection' |
| | | export default { |
| | | data() { |
| | |
| | | value: '' |
| | | }], |
| | | model_spe_options: [], |
| | | model_sta_options: [], |
| | | model_options: [], |
| | | sampleDeliveryMode: [{ |
| | | key: '1', |
| | | value: '送样' |
| | |
| | | }], |
| | | dialogueFormVisible: false, |
| | | showDetail: false, |
| | | viewId: null |
| | | viewId: null, |
| | | productList: [] |
| | | } |
| | | }, |
| | | watch: { |
| | | addPointerForm: { |
| | | handler: function(val) { |
| | | if(val.addway!=""){ |
| | | this.model_sta_options = [] |
| | | this.model_options.forEach(a=>{ |
| | | if(a.specificationsName==val.addway){ |
| | | this.model_sta_options = a.children.map(item=>{ |
| | | return{ |
| | | key: item.modelId, |
| | | value: item.modelName |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | deep: true |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | const res = await getModelSpecification({ |
| | | materialId: val |
| | | }) |
| | | this.model_options = res.data |
| | | this.model_spe_options = res.data.map((item) => { |
| | | return { |
| | | key: item.specificationsId, |
| | |
| | | for (let i = 1; i < this.addPointerForm.experiment.length; i++) { |
| | | exper += ',' + this.addPointerForm.experiment[i] |
| | | } |
| | | |
| | | // console.log(exper) |
| | | this.addPointerForm.experiment = exper |
| | | let tmp = this.addPointerForm |
| | |
| | | message: '恭喜你!', |
| | | type: 'success' |
| | | }) |
| | | // 跳转页面 |
| | | this.$router.push('/inspectionManagement/commissionInspection') |
| | | this.showDetail = true |
| | | } else { |
| | | this.$message.error(res.message) |
| | |
| | | } |
| | | }) |
| | | this.getModelSpecification(val) |
| | | }, |
| | | getProductList(val){ |
| | | getProductList({modelId: val}).then(res=>{ |
| | | this.productList = res.data.map(item=>{ |
| | | return item.name |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .content-main{ |
| | | padding: 20px 40px; |
| | | background-color: #f0f2f5; |
| | | width: 100%; |
| | | height: 100vh; |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: space-between; |
| | | // align-items: center; |
| | | .content-main { |
| | | padding: 20px 40px; |
| | | background-color: #f0f2f5; |
| | | width: 100%; |
| | | height: 100vh; |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: space-between; |
| | | // align-items: center; |
| | | |
| | | .firstBox { |
| | | .title { |