| | |
| | | <div class="search_thing"> |
| | | <div class="search_label">检验子项:</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请输入" clearable |
| | | v-model="itemParameterData.entity.inspectionItemSubclass" @keyup.enter.native="refreshTable()"></el-input></div> |
| | | v-model="itemParameterData.entity.inspectionItemSubclass" @keyup.enter.native="refreshTable()"></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | | <el-button size="small" @click="refresh()">重 置</el-button> |
| | |
| | | <div class="bodys"> |
| | | <div class="search" v-if="radio==1"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">样品名称:</div> |
| | | <div class="search_label">检验对象:</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请输入" clearable |
| | | v-model="testObjectData.entity.specimenName" @keyup.enter.native="refreshTable()"></el-input></div> |
| | | </div> |
| | |
| | | :componentData="testObjectData" :key="upIndex" /> |
| | | </div> |
| | | </div> |
| | | <el-dialog title="产品维护" :visible.sync="diaProduct" width="600px"> |
| | | <div class="body" v-if="diaProduct" style="height: 350px;overflow-y: auto;padding: 5px 0;"> |
| | | <ValueTable ref="productData" :url="$api.capacityScope.selectProductListByObjectId" |
| | | :upUrl="$api.capacityScope.upProduct" :delUrl="$api.capacityScope.delProduct" |
| | | :componentData="productData" :key="upIndex" /> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="diaProduct = false">取 消</el-button> |
| | | <el-button type="primary" @click="openAdd2" :loading="productLoad">新 增</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | laboratory:{ |
| | | select:[] |
| | | }, |
| | | method:{select:[]}, |
| | | method: { |
| | | select: [] |
| | | }, |
| | | templateId:{ |
| | | select:[] |
| | | }, |
| | | sonLaboratory: {select:[]}, |
| | | unit: {select:[]}, |
| | | sample: {select:[]}, |
| | | dic: {select:[]}, |
| | | sonLaboratory: { |
| | | select: [] |
| | | }, |
| | | unit: { |
| | | select: [] |
| | | }, |
| | | dic: { |
| | | select: [] |
| | | }, |
| | | }, |
| | | selectField: { |
| | | inspectionItemType: { |
| | |
| | | templateId:{ |
| | | select:[] |
| | | }, |
| | | method:{select:[],choose: true}, |
| | | sample: {select:[]}, |
| | | sonLaboratory: {select:[]}, |
| | | unit: {select:[]}, |
| | | dic:{select:[]}, |
| | | method: { |
| | | select: [], |
| | | choose: true |
| | | }, |
| | | requiredAdd: ['sonLaboratory','inspectionItem', 'manHour', 'inspectionItemType','inspectionValueType','laboratory','unit','method','price','manDay','sample'], |
| | | requiredUp: ['sonLaboratory','inspectionItem', 'manHour', 'inspectionItemType','inspectionValueType','laboratory','unit','method','price','manDay','sample'] |
| | | sonLaboratory: { |
| | | select: [] |
| | | }, |
| | | unit: { |
| | | select: [] |
| | | }, |
| | | dic: { |
| | | select: [] |
| | | }, |
| | | }, |
| | | cascaderField:{ |
| | | sample:{ |
| | | tree:[] |
| | | }, |
| | | // 字段配置 |
| | | props:{ |
| | | value:'name', |
| | | label:'name', |
| | | checkStrictly: false |
| | | } |
| | | }, |
| | | requiredAdd: ['sonLaboratory', 'inspectionItem', 'manHour', 'inspectionItemType', 'inspectionValueType', |
| | | 'unit', 'method', 'price', 'manDay' |
| | | ], |
| | | requiredUp: ['sonLaboratory', 'inspectionItem', 'manHour', 'inspectionItemType', 'inspectionValueType', |
| | | 'unit', 'method', 'price', 'manDay' |
| | | ] |
| | | }, |
| | | testObjectData: { |
| | | entity: { |
| | |
| | | font: '编辑', |
| | | type: 'text', |
| | | method: 'doDiy', |
| | | field: ['createUserName', 'updateUserName'] |
| | | field: ['createUserName', 'updateUserName', 'product'] |
| | | }, { |
| | | id: 'delete', |
| | | font: '删除', |
| | | type: 'text', |
| | | method: 'doDiy' |
| | | }, { |
| | | font: '产品维护', |
| | | type: 'text', |
| | | method: 'upProduct' |
| | | }], |
| | | tagField: { |
| | | laboratoryId: { |
| | | select: [] |
| | | } |
| | | }, |
| | | selectField: { |
| | | laboratoryId: { |
| | | select: [] |
| | | } |
| | | }, |
| | | requiredAdd: ['specimenName', 'code', 'laboratoryId'], |
| | | requiredUp: ['specimenName', 'code', 'laboratoryId'] |
| | | }, |
| | | itemParameterEntityCopy: {}, |
| | | testObjectDataEntityCopy: {}, |
| | | upIndex: 0, |
| | | addDia: false, |
| | | addPower: true, |
| | | select: 0, |
| | | laboratory: [], |
| | | productLoad: false, |
| | | diaProduct: false, |
| | | productData: { |
| | | entity: { |
| | | objectId: 0, |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'asc' |
| | | } |
| | | }, |
| | | isPage: false, |
| | | isIndex: true, |
| | | showSelect: false, |
| | | select: true, |
| | | do: [{ |
| | | id: 'update', |
| | | font: '编辑', |
| | | type: 'text', |
| | | method: 'doDiy', |
| | | field: [] |
| | | }, { |
| | | id: 'delete', |
| | | font: '删除', |
| | |
| | | }], |
| | | tagField: {}, |
| | | selectField: {}, |
| | | requiredAdd: ['specimenName','code'], |
| | | requiredUp: ['specimenName','code'] |
| | | }, |
| | | itemParameterEntityCopy: {}, |
| | | testObjectDataEntityCopy: {}, |
| | | upIndex: 0, |
| | | addDia: false, |
| | | addPower: true, |
| | | select: 0 |
| | | requiredAdd: ['name','nameEn'], |
| | | requiredUp: ['name','nameEn'] |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | res.data.forEach(a=>{ |
| | | data.push({ |
| | | label: a.laboratoryName, |
| | | value: a.laboratoryName |
| | | value: a.id |
| | | }) |
| | | }) |
| | | this.itemParameterData.selectField.laboratory.select = data |
| | | this.itemParameterData.tagField.laboratory.select = data |
| | | this.testObjectData.selectField.laboratoryId.select = data |
| | | this.testObjectData.tagField.laboratoryId.select = data |
| | | this.laboratory = data |
| | | }) |
| | | }, |
| | | selectStandardMethods() { |
| | |
| | | }) |
| | | }, |
| | | selectTestObjectByName() { |
| | | this.$axios.get(this.$api.capacityScope.selectTestObjectByName).then(res => { |
| | | let data = [] |
| | | this.$axios.get(this.$api.capacityScope.getItemTree).then(res => { |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | | label: a.specimenName, |
| | | value: a.id, |
| | | type: 'success' |
| | | this.cascaderFieldData(a) |
| | | }) |
| | | this.itemParameterData.cascaderField.sample.tree = res.data |
| | | }) |
| | | this.itemParameterData.selectField.sample.select = data |
| | | this.itemParameterData.tagField.sample.select = data |
| | | }, |
| | | cascaderFieldData(val){ |
| | | if(val.children === undefined) { |
| | | return |
| | | }else if(val.children.length==0){[ |
| | | delete val.children |
| | | ]}else{ |
| | | val.children.forEach(a=>{ |
| | | this.cascaderFieldData(a) |
| | | }) |
| | | } |
| | | }, |
| | | getStandardTemplate() { |
| | | this.$axios.get(this.$api.StandardTemplate.getStandardTemplate).then(res => { |
| | |
| | | let up = false |
| | | let add = false |
| | | let del = false |
| | | let product = false |
| | | let select = 0 |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == 'selectItemParameterList') { |
| | |
| | | if (power[i].menuMethod == 'addTestObject') { |
| | | add = true |
| | | } |
| | | if (power[i].menuMethod == 'selectProductListByObjectId') { |
| | | product = true |
| | | } |
| | | } |
| | | } |
| | | if (this.radio === '0') { |
| | |
| | | this.itemParameterData.do.splice(0, 1) |
| | | } |
| | | } else { |
| | | if (!product) { |
| | | this.testObjectData.do.splice(2, 1) |
| | | } |
| | | if (!del) { |
| | | this.testObjectData.do.splice(1, 1) |
| | | } |
| | |
| | | if (select == 1 || select == 3) this.radio = radio |
| | | else if (select == 2) this.radio = '1' |
| | | else this.radio = '-1' |
| | | } |
| | | }, |
| | | upProduct(row) { |
| | | this.productData.entity.objectId = row.id |
| | | this.diaProduct = true |
| | | }, |
| | | openAdd2(){ |
| | | this.$refs.productData.openAddDia(this.$api.capacityScope.addProduct, {objectId: this.productData.entity.objectId}); |
| | | }, |
| | | } |
| | | } |
| | | </script> |