| | |
| | | |
| | | const insOrder = { |
| | | selectInsOrderParameter: "/insOrder/selectInsOrderParameter", //查询检验下单 |
| | | getDeviceManager: "/user/getDeviceManager", //获取指派人员 |
| | | addInsOrder: "/insOrder/addInsOrder", //添加检验下单数据 |
| | | selectOrderManDay: "/insOrder/selectOrderManDay", //查询订单总共预计时间 |
| | | upInsOrder: "/insOrder/upInsOrder", //检验下发 |
| | | } |
| | | |
| | | const sampleOrder = { |
| | |
| | | selectInsOrderPlanList: "/insOrderPlan/selectInsOrderPlanList", //查询检验任务 |
| | | claimInsOrderPlan: "/insOrderPlan/claimInsOrderPlan",//认领检验任务 |
| | | } |
| | | |
| | | |
| | | |
| | | const systemLog = { |
| | | selectSystemLogList: "/systemLog/selectSystemLogList", //获取日志 |
| | |
| | | delStandardProductByIds: "/standardTree/delStandardProductByIds", //删除标准树下的检验项目 |
| | | addStandardProduct: "/standardTree/addStandardProduct", //新增标准树下的检验项目 |
| | | delStandardTree: "/standardTree/delStandardTree", //删除标准树的层级 |
| | | selectStandardProductList: "/standardTree/selectStandardProductList", //通过标准树查询对应的检验项目 |
| | | } |
| | | |
| | | const standardMethod = { |
| | |
| | | .ins_order_add { |
| | | width: 100%; |
| | | height: 100%; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .ins_order_add::-webkit-scrollbar { |
| | | width: 0; |
| | | } |
| | | |
| | | .title { |
| | |
| | | .search { |
| | | width: calc(100% - 40px); |
| | | background-color: #fff; |
| | | padding: 10px 40px 10px 0; |
| | | padding: 5px 40px 5px 0; |
| | | } |
| | | |
| | | .search_thing { |
| | |
| | | color: orange; |
| | | font-size: 18px; |
| | | } |
| | | |
| | | </style> |
| | | <style> |
| | | .ins_order_add .el-input-group__append, |
| | |
| | | .ins_order_add .el-table__row .cell { |
| | | font-size: 12px; |
| | | } |
| | | |
| | | .ins_order_add .el-table .warning-row .cell{ |
| | | color: #bababa; |
| | | } |
| | | </style> |
| | | |
| | | <template> |
| | |
| | | <el-button size="medium" @click=""> |
| | | <span style="color: #3A7BFA;">保存模板</span> |
| | | </el-button> |
| | | <el-button size="medium" type="primary" @click="save">提交</el-button> |
| | | <el-button size="medium" type="primary" @click="save" :loading="saveLoad">提交</el-button> |
| | | <el-button size="medium" @click="$parent.playOrder(0)"> |
| | | <span style="color: #3A7BFA;">返回</span> |
| | | </el-button> |
| | |
| | | <div class="search_label">委托编号:</div> |
| | | <div class="search_input"> |
| | | <el-input v-model="addObj.entrustCode" size="small" placeholder="系统生成" disabled></el-input> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="6"> |
| | | <div class="search_label"><span class="required-span">* </span>样品编号:</div> |
| | | <div class="search_input"> |
| | | <el-input v-model="addObj.sampleCode" size="small" placeholder="请输入" clearable></el-input> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="6"> |
| | |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="6"> |
| | | <div class="search_label"><span class="required-span">* </span>样品名称:</div> |
| | | <div class="search_input"> |
| | | <el-input readonly size="small" v-model="addObj.sample"> |
| | | <template slot="append"><el-button slot="append" icon="el-icon-search" |
| | | @click="selectStandardTree = true"></el-button></template> |
| | | </el-input> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="6"> |
| | | <div class="search_label"><span class="required-span">* </span>实验室名称:</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" clearable disabled v-model="addObj.laboratory"></el-input> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="6"> |
| | | <div class="search_label"><span class="required-span">* </span>样品类型:</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" clearable disabled v-model="addObj.sampleType"></el-input> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="6"> |
| | | <div class="search_label"><span class="required-span">* </span>规格型号:</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" placeholder="请输入" clearable v-model="addObj.model"></el-input> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="6"> |
| | | <div class="search_label">约定时间:</div> |
| | | <div class="search_label">需求时间:</div> |
| | | <div class="search_input"> |
| | | <el-date-picker type="date" placeholder="选择日期" size="small" value-format="yyyy-MM-dd" style="width: 100%;" |
| | | v-model="addObj.appointedTime"></el-date-picker> |
| | | v-model="addObj.appointed"></el-date-picker> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="6"> |
| | |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="6"> |
| | | <div class="search_label"><span class="required-span">* </span>样品数量:</div> |
| | | <div class="search_input"> |
| | | <el-input-number size="small" v-model="addObj.sampleNum" :controls="false" :min="0" :max="1000" |
| | | :precision="0" style="width: 50%;" @change="onSample"></el-input-number> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="6"> |
| | | <div class="search_label">OTC订单号:</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" placeholder="请输入" clearable v-model="addObj.otcCode"></el-input> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="6"> |
| | | <div class="search_label">样品留样:</div> |
| | | <div class="search_input"> |
| | | <el-radio-group v-model="addObj.isLeave" @change="addObj.leaveNum = null"> |
| | | <el-radio :label="1">留样</el-radio> |
| | | <el-radio :label="0">不留样</el-radio> |
| | | <div class="search_label" style="width: 175px;">是否涉及配套样品:</div> |
| | | <div class="search_input" style="width: calc(100% - 175px);"> |
| | | <el-radio-group v-model="addObj.mating" @change="$refs.sampleTable.doLayout()"> |
| | | <el-radio :label="1">是</el-radio> |
| | | <el-radio :label="0">否</el-radio> |
| | | </el-radio-group> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="6"> |
| | | <div class="search_label">留样数量:</div> |
| | | <div class="search_input"> |
| | | <el-input-number size="small" v-model="addObj.leaveNum" :controls="false" :min="0" |
| | | :disabled="addObj.isLeave == 0" style="width: 50%;"></el-input-number> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="6" style="align-items: flex-start;margin: 8px 0;"> |
| | |
| | | v-model="addObj.remark"></el-input> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="6"> |
| | | <div class="search_label" style="width: 160px;">是否涉及配套样品:</div> |
| | | <div class="search_input" style="width: calc(100% - 160px);"> |
| | | <el-radio-group v-model="addObj.mating" @change="$refs.sampleTable.doLayout()"> |
| | | <el-radio :label="1">是</el-radio> |
| | | <el-radio :label="0">否</el-radio> |
| | | </el-radio-group> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div style="display: flex;"> |
| | | <el-table class="el-table" ref="sampleTable" :data="sampleList" height="300px" tooltip-effect="dark" border |
| | | @selection-change="selectSample"> |
| | | <div> |
| | | <div style="text-align: right;line-height: 45px;"> |
| | | <el-button type="primary" size="small" @click="addSampleDia = true">添加样品</el-button> |
| | | <el-button size="small" @click="delSample"> |
| | | <span style="color: #3A7BFA;">删除样品</span> |
| | | </el-button> |
| | | </div> |
| | | <el-table class="el-table" ref="sampleTable" :data="sampleList" height="250px" tooltip-effect="dark" border |
| | | @selection-change="selectSample" highlight-current-row @row-click="rowClick"> |
| | | <el-table-column type="selection" width="60"></el-table-column> |
| | | <el-table-column type="index" label="序号" width="65" align="center"></el-table-column> |
| | | <el-table-column prop="sample" label="样品名称" align="center" show-overflow-tooltip |
| | | min-width="100"></el-table-column> |
| | | <el-table-column prop="sampleCode" label="样品编号" width="140" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-input size="small" v-model="scope.row.sampleCode" clearable></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="factory" label="工厂" align="center" show-overflow-tooltip min-width="100"> |
| | | </el-table-column> |
| | | <el-table-column prop="laboratory" label="实验室" align="center" show-overflow-tooltip min-width="100"> |
| | | </el-table-column> |
| | | <el-table-column prop="sampleType" label="样品类型" align="center" show-overflow-tooltip min-width="100"> |
| | | </el-table-column> |
| | | <el-table-column prop="model" label="样品型号" align="center" show-overflow-tooltip min-width="100"> |
| | | </el-table-column> |
| | | <el-table-column prop="isLeave" label="是否留样" align="center" show-overflow-tooltip min-width="100"> |
| | | <template slot-scope="scope"> |
| | | <span>{{scope.row.isLeave==1?'是':'否'}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="joinName" label="配套样品名称" width="140" align="center" v-if="addObj.mating==1"> |
| | | <template slot-scope="scope"> |
| | | <el-input size="small" type="textarea" :autosize="{ minRows: 1, maxRows: 1}" |
| | |
| | | v-model="scope.row.joinModel"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="joinNum" label="配套样品数量" width="140" align="center" v-if="addObj.mating==1"> |
| | | <template slot-scope="scope"> |
| | | <el-input-number size="small" v-model="scope.row.joinNum" :min="1" :max="100" :precision="0" |
| | | :controls="false" style="width: 80%;"></el-input-number> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" width="65" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" size="small" @click="">删除</el-button> |
| | | {{scope.index}} |
| | | <el-button type="text" size="small" @click="sampleList.splice(scope.$index, 1)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-table class="el-table" ref="productTable" :data="productList" height="380px" tooltip-effect="dark" border |
| | | @selection-change="selectProduct" style="margin-bottom: 10px;" @select="upProductSelect" |
| | | :row-class-name="tableRowClassName"> |
| | | <el-table-column type="selection" width="65"></el-table-column> |
| | | <el-table-column prop="inspectionItem" label="检验项" min-width="140" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="inspectionItemSubclass" label="检验项子项" min-width="140" |
| | | show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="sonLaboratory" label="子实验室" width="130" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="method" label="检验标准" min-width="120" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="unit" label="计量单位" width="100" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="price" label="单价" width="100" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="manDay" label="预计时间(天)" width="120" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="manHourGroup" label="工时分组" width="100" show-overflow-tooltip></el-table-column> |
| | | <!-- <el-table-column prop="deviceGroup" label="设备组" width="120" show-overflow-tooltip></el-table-column> --> |
| | | <el-table-column prop="section" label="区间" width="120" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="ask" label="要求值" min-width="220px"> |
| | | <template slot-scope="scope"> |
| | | <el-input size="small" placeholder="要求值" v-model="scope.row.ask" clearable type="textarea" |
| | | :autosize="{ minRows: 1, maxRows: 3}"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | <el-button type="primary" @click="activeStandardTree">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog title="添加样品" :visible.sync="addSampleDia" 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 readonly size="small" v-model="sample.sample"> |
| | | <template slot="append"><el-button slot="append" icon="el-icon-search" |
| | | @click="selectStandardTree = true"></el-button></template> |
| | | </el-input> |
| | | </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-input size="small" clearable disabled v-model="sample.factory"></el-input> |
| | | </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-input size="small" clearable disabled v-model="sample.laboratory"></el-input> |
| | | </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-input size="small" clearable disabled v-model="sample.sampleType"></el-input> |
| | | </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-input size="small" placeholder="请输入" clearable v-model="sample.model"></el-input> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="22"> |
| | | <div class="search_label">样品编号:</div> |
| | | <div class="search_input"> |
| | | <el-input v-model="sample.sampleCode" size="small" placeholder="请输入" clearable></el-input> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="24"> |
| | | <div class="search_label">样品数量:</div> |
| | | <div class="search_input"> |
| | | <el-input-number size="small" v-model="sample.sampleNum" :min="1" :max="100" :precision="0" |
| | | style="width: 50%;"></el-input-number> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="22"> |
| | | <div class="search_label">样品留样:</div> |
| | | <div class="search_input"> |
| | | <el-radio-group v-model="sample.isLeave"> |
| | | <el-radio :label="1">留样</el-radio> |
| | | <el-radio :label="0">不留样</el-radio> |
| | | </el-radio-group> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="addSampleDia = false">取 消</el-button> |
| | | <el-button type="primary" @click="onSample()" :loading="getProductLoad">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | templates: [], |
| | | addObj: { |
| | | entrustCode: null, |
| | | sampleCode: null, |
| | | custom: null, |
| | | company: null, |
| | | userId: null, |
| | | type: '0', |
| | | code: null, |
| | | laboratory: null, |
| | | appointedTime: null, |
| | | factory: null, |
| | | sample: null, |
| | | sampleType: null, |
| | | sampleNum: null, |
| | | model: null, |
| | | isLeave: 0, |
| | | leaveNum: null, |
| | | appointed: null, |
| | | remark: null, |
| | | otcCode: null, |
| | | mating: 0 |
| | | }, |
| | | sample: { |
| | | sampleCode: null, |
| | | laboratory: null, |
| | | factory: null, |
| | | sampleType: null, |
| | | sample: null, |
| | | model: null, |
| | | sampleNum: 1, |
| | | isLeave: 0, |
| | | }, |
| | | type: [], |
| | | selectUserDia: false, |
| | |
| | | expandedKeys: [], |
| | | sampleList: [], |
| | | sampleIds: [], |
| | | methodList: [] |
| | | methodList: [], |
| | | addSampleDia: false, |
| | | count: 1, |
| | | productList: [], |
| | | productIds: [], |
| | | getProductLoad: false, |
| | | saveLoad: false |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | this.selectUserDia = false |
| | | }, |
| | | save() { |
| | | console.log(this.addObj); |
| | | this.saveLoad = true |
| | | this.$axios.post(this.$api.insOrder.addInsOrder,{ |
| | | insOrder: this.addObj, |
| | | list: this.sampleList |
| | | },{ |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res=>{ |
| | | this.saveLoad = false |
| | | if(res.code==201)return |
| | | this.$message.success('已提交') |
| | | this.$parent.playOrder(0) |
| | | }) |
| | | }, |
| | | getUserNow() { |
| | | this.$axios.get(this.$api.user.getUserNow).then(res => { |
| | |
| | | this.$message.error('未选择样品') |
| | | return |
| | | } |
| | | this.addObj.factory = trees[0] |
| | | this.addObj.laboratory = trees[1] |
| | | this.addObj.sampleType = trees[2] |
| | | this.addObj.sample = trees[3] |
| | | this.addObj.model = trees[4] |
| | | this.sample.factory = trees[0] |
| | | this.sample.laboratory = trees[1] |
| | | this.sample.sampleType = trees[2] |
| | | this.sample.sample = trees[3] |
| | | this.sample.model = trees[4] |
| | | this.selectStandardTree = false |
| | | this.onSample() |
| | | }, |
| | | selectSample(val) { |
| | | this.sampleIds = [] |
| | | val.forEach(a => { |
| | | this.sampleIds = a.id |
| | | this.sampleIds.push(a.id) |
| | | }) |
| | | }, |
| | | onSample() { |
| | | this.sampleList = [] |
| | | if (this.addObj.sampleNum == 0 || this.addObj.sample == null || this.addObj.sample == '') return |
| | | for (var i = 0; i < this.addObj.sampleNum; i++) { |
| | | this.sampleList.push({ |
| | | sample: this.addObj.sample, |
| | | joinName: null, |
| | | joinModel: null |
| | | }) |
| | | if (this.sample.sample == null || this.sample.sample == '') { |
| | | this.$message.error('请选择样品') |
| | | return |
| | | } |
| | | if (this.sample.model == null || this.sample.model == '') { |
| | | this.$message.error('请输入样品型号') |
| | | return |
| | | } |
| | | this.getProductLoad = true |
| | | this.$axios.post(this.$api.standardTree.selectStandardProductList, { |
| | | factory: this.sample.factory, |
| | | laboratory: this.sample.laboratory, |
| | | sampleType: this.sample.sampleType, |
| | | sample: this.sample.sample, |
| | | model: this.sample.model |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | res.data.forEach(a => { |
| | | a.state = 1 |
| | | }) |
| | | for (var i = 0; i < this.sample.sampleNum; i++) { |
| | | this.sample.joinName = null |
| | | this.sample.joinModel = null |
| | | this.sample.joinNum = 1 |
| | | this.sample.insProduct = res.data |
| | | this.sample.id = this.count |
| | | this.sampleList.push(this.HaveJson(this.sample)) |
| | | this.count++ |
| | | } |
| | | this.$refs.sampleTable.doLayout() |
| | | this.getProductLoad = false |
| | | this.addSampleDia = false |
| | | this.sample = { |
| | | sampleCode: null, |
| | | laboratory: null, |
| | | factory: null, |
| | | sampleType: null, |
| | | sample: null, |
| | | model: null, |
| | | sampleNum: 1, |
| | | isLeave: 0, |
| | | } |
| | | }) |
| | | }, |
| | | delSample() { |
| | | this.sampleIds.forEach(a => { |
| | | for (var i = 0; i < this.sampleList.length; i++) { |
| | | if (this.sampleList[i].id == a) { |
| | | this.sampleList.splice(i, 1) |
| | | i -= 1 |
| | | break |
| | | } |
| | | } |
| | | }) |
| | | this.$refs.sampleTable.doLayout() |
| | | }, |
| | | selectProduct(val) { |
| | | this.productIds = [] |
| | | val.forEach(a => { |
| | | this.productIds.push(a.id) |
| | | }) |
| | | }, |
| | | rowClick(row, column, event) { |
| | | this.productList = row.insProduct |
| | | setTimeout(() => { |
| | | this.productList.forEach(a => { |
| | | if (a.state == 1) this.toggleSelection(a) |
| | | }) |
| | | }, 300) |
| | | }, |
| | | toggleSelection(row) { |
| | | this.$refs.productTable.toggleRowSelection(row, true); |
| | | }, |
| | | upProductSelect(selection, row) { |
| | | row.state = row.state == 1 ? 0 : 1 |
| | | }, |
| | | tableRowClassName({ |
| | | row, |
| | | rowIndex |
| | | }) { |
| | | if (row.state === 0) { |
| | | return 'warning-row'; |
| | | } |
| | | return ''; |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | </script> |
| | |
| | | <el-table ref="eltable" :data="tableData" style="width: 100%;" height="100%" tooltip-effect="dark" border |
| | | @selection-change="selectChange" @select="select" v-loading="loading" @sort-change="sortChange" |
| | | @row-click="rowClick" :show-summary="data.countFleid!=undefined && data.countFleid.length > 0" |
| | | :summary-method="getSummaries" :key="Math.random()" :row-class-name="tableRowClassName"> |
| | | :summary-method="getSummaries" :row-class-name="tableRowClassName"> |
| | | <el-table-column type="selection" width="65" v-if="data.showSelect" :key="Math.random()"> |
| | | </el-table-column> |
| | | <el-table-column type="index" align="center" label="序号" width="70" v-if="data.isIndex" :key="Math.random()"> |
| | |
| | | return |
| | | } |
| | | for (var i = 0; i < this.data.requiredUp.length; i++) { |
| | | if (this.upData[this.data.requiredUp[i]] == null || this.upData[this.data.requiredUp[i]] == '') { |
| | | if (this.upData[this.data.requiredUp[i]] === null || this.upData[this.data.requiredUp[i]] === '') { |
| | | var list = this.upHead.filter(a => { |
| | | if (a.label == this.data.requiredUp[i]) return a |
| | | }) |
| | |
| | | if(val.method=='doDiy'){ |
| | | this.main(row,val) |
| | | }else{ |
| | | this.$emit(val.method,row) |
| | | this.$parent[val.method](row) |
| | | } |
| | | }, |
| | | getWidth(){ |
| | |
| | | <style scoped> |
| | | ins-order-plan-main .title{ |
| | | font-size:20px; |
| | | color:#3A7BFA |
| | | } |
| | | .ins-order-plan-main .search{ |
| | | width: 100%; |
| | | margin-bottom: 10px; |
| | | height: 10vh; |
| | | background-color: #fff; |
| | | border-radius: 3px; |
| | | } |
| | | .search .form-inline{ |
| | | height: 5vh; |
| | | padding-top:2.5vh; |
| | | padding-left: 1%; |
| | | } |
| | | .ins-order-plan-main .center{ |
| | | width: 100%; |
| | | height: 70vh; |
| | | background-color: #fff; |
| | | border-radius: 3px; |
| | | } |
| | | .ins-order-plan-main .center .value-table{ |
| | | width:98%; |
| | | height: 80%; |
| | | margin-left:1%; |
| | | } |
| | | .tab { |
| | | list-style-type: none; |
| | | display: flex; |
| | | padding: 10px 0px; |
| | | } |
| | | .tab li { |
| | | line-height: 24px; |
| | | padding: 6px 14px; |
| | | font-size: 14px; |
| | | color: #333333; |
| | | border: 1px solid #EEEEEE; |
| | | cursor: pointer; |
| | | } |
| | | ins-order-plan-main .title { |
| | | font-size: 20px; |
| | | color: #3A7BFA |
| | | } |
| | | |
| | | .tab li:nth-child(1) { |
| | | border-radius: 8px 0 0 8px; |
| | | } |
| | | .ins-order-plan-main .search { |
| | | width: 100%; |
| | | margin-bottom: 10px; |
| | | height: 80px; |
| | | background-color: #fff; |
| | | border-radius: 3px; |
| | | } |
| | | |
| | | .tab li:nth-child(3) { |
| | | border-radius: 0 8px 8px 0; |
| | | } |
| | | .search .form-inline { |
| | | height: 50px; |
| | | padding-top: 20px; |
| | | padding-left: 50px; |
| | | } |
| | | |
| | | .tab li.active { |
| | | border-color: #3A7BFA; |
| | | color: #3A7BFA; |
| | | } |
| | | .center .center-options:nth-child(1){ |
| | | padding-left: 1%; |
| | | } |
| | | .center .center-options .center-title { |
| | | width:85%; |
| | | padding-top: 20px; |
| | | text-align: left; |
| | | } |
| | | .center .center-options .center-title span:last-child{ |
| | | color: #3A7BFA; |
| | | font-size: 23px; |
| | | font-weight: 400; |
| | | } |
| | | .view-self-checkbox{ |
| | | margin-left: 20px; |
| | | } |
| | | .ins-order-plan-main .center { |
| | | width: calc(100% - 40px); |
| | | height: calc(100% - 60px - 80px - 40px); |
| | | background-color: #fff; |
| | | border-radius: 3px; |
| | | padding: 20px; |
| | | } |
| | | |
| | | .ins-order-plan-main .center .value-table { |
| | | width: 100%; |
| | | height: calc(100% - 68px); |
| | | } |
| | | |
| | | .tab { |
| | | list-style-type: none; |
| | | display: flex; |
| | | } |
| | | |
| | | .tab li { |
| | | line-height: 24px; |
| | | padding: 6px 14px; |
| | | font-size: 14px; |
| | | color: #333333; |
| | | border: 1px solid #EEEEEE; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .tab li:nth-child(1) { |
| | | border-radius: 8px 0 0 8px; |
| | | } |
| | | |
| | | .tab li:nth-child(3) { |
| | | border-radius: 0 8px 8px 0; |
| | | } |
| | | |
| | | .tab li.active { |
| | | border-color: #3A7BFA; |
| | | color: #3A7BFA; |
| | | } |
| | | |
| | | .center .center-options .center-title { |
| | | width: 100%; |
| | | text-align: right; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .center .center-options .center-title span:last-child { |
| | | color: #3A7BFA; |
| | | font-size: 23px; |
| | | font-weight: 400; |
| | | } |
| | | |
| | | .view-self-checkbox { |
| | | margin-left: 50px; |
| | | } |
| | | </style> |
| | | <style> |
| | | .ins-order-plan-main .el-form-item__label{ |
| | | color: #000; |
| | | } |
| | | </style> |
| | | <template> |
| | | <div class="ins-order-plan-main"> |
| | | <p style="font-size: 16px;padding:19.5px 0px">检验任务</p> |
| | | <div class="search"> |
| | | <el-form :inline="true" :model="searchForm" class="form-inline"> |
| | | <el-form-item label="样品名称:"> |
| | | <el-input clearable v-model="searchForm.sampleName" size="small" placeholder="请输入"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="状态:"> |
| | | <el-select clearable size="small" v-model="searchForm.state" placeholder="请选择"> |
| | | <el-option v-for="(item,index) in insStateList" :key="index" |
| | | :label="item.label" :value="item.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button size="small" @click="onReset">重置</el-button> |
| | | <el-button size="small" type="primary" @click="onSubmit">查询</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div class="center"> |
| | | <div class="center-options"> |
| | | <el-row> |
| | | <el-col :span="21"> |
| | | <div style="display: flex;align-items: center;"> |
| | | <ul class="tab"> |
| | | <li v-for="(m,i) in tabList" :key="i" :class="{active:i==tabIndex}" @click="handleTab(m,i)">{{m.label}}</li> |
| | | </ul> |
| | | <el-checkbox @change="changeCheckBox" class="view-self-checkbox" v-model="viewSelf"/><span> 我的任务</span> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <div class="center-title"> |
| | | <span>总计任务数量:</span> |
| | | <span v-if="$refs.insOrderPlan != undefined">{{$refs.insOrderPlan.total}}</span> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <ValueTable :tableRowClassName="changeRowClass" class="value-table" ref="insOrderPlan" :url="$api.insOrderPlan.selectInsOrderPlanList" :upUrl="$api.user.updateUser" :componentData="componentData" :key="upIndex" @upUser="upUser"/> |
| | | </div> |
| | | <el-dialog |
| | | title="提示" |
| | | :visible.sync="claimVisible" |
| | | width="40%"> |
| | | 是否认领委托编号<span style="color:#33C130">{{sampleUserForm.entrustCode}}</span>的任务 |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="claimVisible = false">取 消</el-button> |
| | | <el-button type="primary" @click="confirmClaim">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | <div class="ins-order-plan-main"> |
| | | <p style="font-size: 16px;padding:19.5px 0px">检验任务</p> |
| | | <div class="search"> |
| | | <el-form :inline="true" :model="searchForm" class="form-inline"> |
| | | <el-form-item label="样品名称:"> |
| | | <el-input clearable v-model="searchForm.sampleName" size="small" placeholder="请输入"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="状态:"> |
| | | <el-select clearable size="small" v-model="searchForm.state" placeholder="请选择"> |
| | | <el-option v-for="(item,index) in insStateList" :key="index" :label="item.label" |
| | | :value="item.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button size="small" @click="onReset">重置</el-button> |
| | | <el-button size="small" type="primary" @click="onSubmit">查询</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div class="center"> |
| | | <div class="center-options"> |
| | | <el-row> |
| | | <el-col :span="21"> |
| | | <div style="display: flex;align-items: center;margin-bottom: 10px;"> |
| | | <ul class="tab"> |
| | | <li v-for="(m,i) in tabList" :key="i" :class="{active:i==tabIndex}" @click="handleTab(m,i)">{{m.label}} |
| | | </li> |
| | | </ul> |
| | | <div> |
| | | <el-checkbox @change="changeCheckBox" class="view-self-checkbox" |
| | | v-model="viewSelf"><span>我的任务</span></el-checkbox> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <div class="center-title"> |
| | | <span>总计任务数量:</span> |
| | | <span v-if="$refs.insOrderPlan != undefined">{{$refs.insOrderPlan.total}}</span> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <ValueTable :tableRowClassName="changeRowClass" class="value-table" ref="insOrderPlan" |
| | | :url="$api.insOrderPlan.selectInsOrderPlanList" :upUrl="$api.user.updateUser" :componentData="componentData" |
| | | :key="upIndex" @upUser="upUser" /> |
| | | </div> |
| | | <el-dialog title="提示" :visible.sync="claimVisible" width="40%"> |
| | | 是否认领委托编号<span style="color:#33C130">{{sampleUserForm.entrustCode}}</span>的任务 |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="claimVisible = false">取 消</el-button> |
| | | <el-button type="primary" @click="confirmClaim">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import ValueTable from '../tool/value-table.vue' |
| | | import { getYearAndMonthAndDays } from '../../util/date' |
| | | export default { |
| | | components:{ |
| | | ValueTable |
| | | }, |
| | | data(){ |
| | | return { |
| | | viewSelf: false, |
| | | sampleUserForm:{ |
| | | entrustCode: null, |
| | | insSampleId: null, |
| | | userId: null |
| | | }, |
| | | claimVisible: false, |
| | | searchForm:{ |
| | | sampleName: null, |
| | | state: null |
| | | }, |
| | | tabList: [], |
| | | active: 1, |
| | | tabIndex: 0, |
| | | componentData: { |
| | | import ValueTable from '../tool/value-table.vue' |
| | | import { |
| | | getYearAndMonthAndDays |
| | | } from '../../util/date' |
| | | export default { |
| | | components: { |
| | | ValueTable |
| | | }, |
| | | data() { |
| | | return { |
| | | viewSelf: false, |
| | | sampleUserForm: { |
| | | entrustCode: null, |
| | | insSampleId: null, |
| | | userId: null |
| | | }, |
| | | claimVisible: false, |
| | | searchForm: { |
| | | sampleName: null, |
| | | state: null |
| | | }, |
| | | tabList: [], |
| | | active: 1, |
| | | tabIndex: 0, |
| | | componentData: { |
| | | entity: { |
| | | viewSelf: false, |
| | | state: 1, |
| | | childrenLaboratory: null, |
| | | insState: null, |
| | | sampleName: null, |
| | | viewSelf: false, |
| | | state: 1, |
| | | childrenLaboratory: null, |
| | | insState: null, |
| | | sampleName: null, |
| | | orderBy: { |
| | | field: 'type', |
| | | order: 'desc' |
| | |
| | | showSelect: false, |
| | | select: false, |
| | | do: [{ |
| | | id: '', |
| | | font: '检验', |
| | | type: 'text', |
| | | method: '', |
| | | field:[] |
| | | },{ |
| | | id: '', |
| | | font: '交接', |
| | | type: 'text', |
| | | method: '' |
| | | }, |
| | | { |
| | | id: '', |
| | | font: '复核', |
| | | type: 'text', |
| | | method: '' |
| | | },{ |
| | | id: '', |
| | | font: '认领', |
| | | type: 'text', |
| | | method: 'claimFun', |
| | | disabFun: (row,index)=>{return row.sampleUserId!=null} |
| | | }], |
| | | id: '', |
| | | font: '检验', |
| | | type: 'text', |
| | | method: '', |
| | | field: [] |
| | | }, { |
| | | id: '', |
| | | font: '交接', |
| | | type: 'text', |
| | | method: '' |
| | | }, |
| | | { |
| | | id: '', |
| | | font: '复核', |
| | | type: 'text', |
| | | method: '' |
| | | }, { |
| | | id: '', |
| | | font: '认领', |
| | | type: 'text', |
| | | method: 'claimFun', |
| | | disabFun: (row, index) => { |
| | | return row.sampleUserId != null |
| | | } |
| | | } |
| | | ], |
| | | tagField: { |
| | | type:{ |
| | | select:[] |
| | | }, |
| | | insState:{ |
| | | select:[] |
| | | } |
| | | }, |
| | | type: { |
| | | select: [] |
| | | }, |
| | | insState: { |
| | | select: [] |
| | | } |
| | | }, |
| | | selectField: {}, |
| | | requiredAdd:[], |
| | | requiredUp:[] |
| | | requiredAdd: [], |
| | | requiredUp: [] |
| | | }, |
| | | upIndex: 0, |
| | | planTotal: 0, |
| | | insStateList: [] |
| | | } |
| | | }, |
| | | created(){ |
| | | this.getTypeDicts() |
| | | this.getInsStateDicts() |
| | | this.getLaboratoryDicts() |
| | | this.$nextTick(()=>{ |
| | | this.refreshTable() |
| | | }) |
| | | }, |
| | | watch:{ |
| | | tabList(newVal){ |
| | | if(newVal && newVal.length>0){ |
| | | this.componentData.entity.childrenLaboratory = newVal[0].value |
| | | this.$nextTick(()=>{ |
| | | this.refreshTable() |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | methods:{ |
| | | upUser(){ |
| | | upIndex: 0, |
| | | planTotal: 0, |
| | | insStateList: [] |
| | | } |
| | | }, |
| | | created() { |
| | | this.getTypeDicts() |
| | | this.getInsStateDicts() |
| | | this.getLaboratoryDicts() |
| | | this.$nextTick(() => { |
| | | this.refreshTable() |
| | | }) |
| | | }, |
| | | watch: { |
| | | tabList(newVal) { |
| | | if (newVal && newVal.length > 0) { |
| | | this.componentData.entity.childrenLaboratory = newVal[0].value |
| | | this.$nextTick(() => { |
| | | this.refreshTable() |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | upUser() { |
| | | |
| | | }, |
| | | changeCheckBox(val){ |
| | | this.componentData.entity.viewSelf = val |
| | | this.$nextTick(()=>{ |
| | | this.refreshTable() |
| | | }) |
| | | }, |
| | | claimFun(row){ |
| | | console.log(row) |
| | | if(row){ |
| | | this.sampleUserForm = { |
| | | entrustCode : row.entrustCode, |
| | | insSampleId: row.id |
| | | } |
| | | this.claimVisible = true |
| | | } |
| | | }, |
| | | changeCheckBox(val) { |
| | | this.componentData.entity.viewSelf = val |
| | | this.$nextTick(() => { |
| | | this.refreshTable() |
| | | }) |
| | | }, |
| | | claimFun(row) { |
| | | console.log(row) |
| | | if (row) { |
| | | this.sampleUserForm = { |
| | | entrustCode: row.entrustCode, |
| | | insSampleId: row.id |
| | | } |
| | | this.claimVisible = true |
| | | } |
| | | |
| | | }, |
| | | confirmClaim(){ |
| | | this.$axios.post(this.$api.insOrderPlan.claimInsOrderPlan, this.sampleUserForm,{ |
| | | }, |
| | | confirmClaim() { |
| | | this.$axios.post(this.$api.insOrderPlan.claimInsOrderPlan, this.sampleUserForm, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res=>{ |
| | | if(res.code===200 && res.data){ |
| | | this.$message.success("认领成功") |
| | | this.claimVisible = false |
| | | this.refreshTable() |
| | | } |
| | | }).catch(error=>{ |
| | | console.error(error) |
| | | }) |
| | | }, |
| | | refreshTable() { |
| | | this.$refs.insOrderPlan.selectList() |
| | | }, |
| | | changeRowClass({row,rowIndex}){ |
| | | let currentTime = getYearAndMonthAndDays() |
| | | if(row.sendTime && currentTime===row.sendTime){ |
| | | return 'highlight-warning-row-border' |
| | | }else if(row.sendTime && currentTime>row.sendTime){ |
| | | return 'highlight-danger-row-border' |
| | | } |
| | | return '' |
| | | }, |
| | | onReset(){ |
| | | this.searchForm = { |
| | | sampleName: null, |
| | | state: null, |
| | | } |
| | | this.componentData.entity.insState = null |
| | | this.componentData.entity.sampleName = null |
| | | this.refreshTable() |
| | | }, |
| | | onSubmit(){ |
| | | this.componentData.entity.insState = this.searchForm.state |
| | | this.componentData.entity.sampleName = this.searchForm.sampleName |
| | | this.$nextTick(()=>{ |
| | | this.refreshTable() |
| | | }) |
| | | }, |
| | | handleTab(m, i) { |
| | | this.tabIndex = i; |
| | | this.componentData.entity.childrenLaboratory = m.value |
| | | this.refreshTable() |
| | | }, |
| | | getTypeDicts() { |
| | | this.$axios.post(this.$api.enums.selectEnumByCategory, { |
| | | category: "紧急程度" |
| | | }).then(res => { |
| | | let data = res.data |
| | | data.forEach(ele=>{ |
| | | if(ele.value==='0'){ |
| | | ele.type='success' |
| | | }else if(ele.value==='1'){ |
| | | ele.type='warning' |
| | | }else if(ele.value==='2'){ |
| | | ele.type='danger' |
| | | } |
| | | }) |
| | | this.componentData.tagField.type.select = data |
| | | }) |
| | | }, |
| | | getInsStateDicts() { |
| | | this.$axios.post(this.$api.enums.selectEnumByCategory, { |
| | | category: "检验任务状态" |
| | | }).then(res => { |
| | | let data = res.data |
| | | this.insStateList = data |
| | | data.forEach(ele=>{ |
| | | //0:待检验 1:检验中 2:已检验 3:待复核 4:复核未通过 5:复核通过 |
| | | if(['2','5'].includes(ele.value)){ |
| | | ele.type='success' |
| | | }else if(['1','3'].includes(ele.value)){ |
| | | ele.type='warning' |
| | | }else if(['0','4'].includes(ele.value)){ |
| | | ele.type='danger' |
| | | } |
| | | }) |
| | | this.componentData.tagField.insState.select = data |
| | | }) |
| | | }, |
| | | getLaboratoryDicts(){ |
| | | this.$axios.post(this.$api.enums.selectEnumByCategory, { |
| | | category: "子实验室" |
| | | }).then(res => { |
| | | this.tabList = res.data.map(ele=>{return {label:ele.label,value:ele.value}}) |
| | | this.$nextTick(()=>{ |
| | | this.componentData.entity.childrenLaboratory = this.tabList[0].value |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | }).then(res => { |
| | | if (res.code === 200 && res.data) { |
| | | this.$message.success("认领成功") |
| | | this.claimVisible = false |
| | | this.refreshTable() |
| | | } |
| | | }).catch(error => { |
| | | console.error(error) |
| | | }) |
| | | }, |
| | | refreshTable() { |
| | | this.$refs.insOrderPlan.selectList() |
| | | }, |
| | | changeRowClass({ |
| | | row, |
| | | rowIndex |
| | | }) { |
| | | let currentTime = getYearAndMonthAndDays() |
| | | if (row.sendTime && currentTime === row.sendTime) { |
| | | return 'highlight-warning-row-border' |
| | | } else if (row.sendTime && currentTime > row.sendTime) { |
| | | return 'highlight-danger-row-border' |
| | | } |
| | | return '' |
| | | }, |
| | | onReset() { |
| | | this.searchForm = { |
| | | sampleName: null, |
| | | state: null, |
| | | } |
| | | this.componentData.entity.insState = null |
| | | this.componentData.entity.sampleName = null |
| | | this.refreshTable() |
| | | }, |
| | | onSubmit() { |
| | | this.componentData.entity.insState = this.searchForm.state |
| | | this.componentData.entity.sampleName = this.searchForm.sampleName |
| | | this.$nextTick(() => { |
| | | this.refreshTable() |
| | | }) |
| | | }, |
| | | handleTab(m, i) { |
| | | this.tabIndex = i; |
| | | this.componentData.entity.childrenLaboratory = m.value |
| | | this.refreshTable() |
| | | }, |
| | | getTypeDicts() { |
| | | this.$axios.post(this.$api.enums.selectEnumByCategory, { |
| | | category: "紧急程度" |
| | | }).then(res => { |
| | | let data = res.data |
| | | data.forEach(ele => { |
| | | if (ele.value === '0') { |
| | | ele.type = 'success' |
| | | } else if (ele.value === '1') { |
| | | ele.type = 'warning' |
| | | } else if (ele.value === '2') { |
| | | ele.type = 'danger' |
| | | } |
| | | }) |
| | | this.componentData.tagField.type.select = data |
| | | }) |
| | | }, |
| | | getInsStateDicts() { |
| | | this.$axios.post(this.$api.enums.selectEnumByCategory, { |
| | | category: "检验任务状态" |
| | | }).then(res => { |
| | | let data = res.data |
| | | this.insStateList = data |
| | | data.forEach(ele => { |
| | | //0:待检验 1:检验中 2:已检验 3:待复核 4:复核未通过 5:复核通过 |
| | | if (['2', '5'].includes(ele.value)) { |
| | | ele.type = 'success' |
| | | } else if (['1', '3'].includes(ele.value)) { |
| | | ele.type = 'warning' |
| | | } else if (['0', '4'].includes(ele.value)) { |
| | | ele.type = 'danger' |
| | | } |
| | | }) |
| | | this.componentData.tagField.insState.select = data |
| | | }) |
| | | }, |
| | | getLaboratoryDicts() { |
| | | this.$axios.post(this.$api.enums.selectEnumByCategory, { |
| | | category: "子实验室" |
| | | }).then(res => { |
| | | this.tabList = res.data.map(ele => { |
| | | return { |
| | | label: ele.label, |
| | | value: ele.value |
| | | } |
| | | }) |
| | | this.$nextTick(() => { |
| | | this.componentData.entity.childrenLaboratory = this.tabList[0].value |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | } |
| | | |
| | | .search_thing { |
| | | width: 350px; |
| | | display: flex; |
| | | align-items: center; |
| | | height: 50px; |
| | | } |
| | | |
| | | |
| | | .search_label { |
| | | width: 110px; |
| | | width: 120px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | |
| | | .search_input { |
| | | width: calc(100% - 110px); |
| | | width: calc(100% - 120px); |
| | | } |
| | | |
| | | .table { |
| | |
| | | <el-row class="title"> |
| | | <el-col :span="12" style="padding-left: 20px;">检验下单</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <el-button size="medium" type="primary" @click="playOrder(1)">下单</el-button> |
| | | <el-button size="medium" type="primary" @click="playOrder(1)" v-if="addPower">下单</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | |
| | | <div class="search_thing"> |
| | | <div class="search_label">委托编号:</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请输入" clearable |
| | | v-model="componentData.entity.deviceName" @keyup.enter.native="refreshTable()"></el-input></div> |
| | | v-model="componentData.entity.entrustCode" @keyup.enter.native="refreshTable()"></el-input></div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">样品名称:</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请输入" clearable |
| | | v-model="componentData.entity.specificationModel" @keyup.enter.native="refreshTable()"></el-input></div> |
| | | v-model="componentData.entity.sample" @keyup.enter.native="refreshTable()"></el-input></div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | | <el-button size="small" @click="refresh()">重 置</el-button> |
| | |
| | | <ul class="tab"> |
| | | <li v-for="(m,i) in tabList" :key="i" :class="{active:i==tabIndex}" @click="handleTab(m,i)">{{m.label}}</li> |
| | | </ul> |
| | | <!-- 语法 子组件通过 this.$emit +传入方法名 调用父组件方法 例如 this.$emit(selectAllByOne) 就需在父组件声明并传入 @selectAllByOne="selectAllByOne"--> |
| | | <ValueTable ref="ValueTable" :url="$api.insOrder.selectInsOrderParameter" :componentData="componentData" |
| | | :key="upIndex" style="height: calc(100% - 44px)" @selectAllByOne="selectAllByOne" |
| | | @handleDataLook="handleDataLook" @download="download" @handleVerify="handleVerify" @handlEquash="handlEquash" |
| | | @handleIssued="handleIssued" /> |
| | | :key="upIndex" style="height: calc(100% - 44px)" /> |
| | | </div> |
| | | <!-- 审核 --> |
| | | <el-dialog title="下单审核" :visible.sync="verifyDialogVisible" width="30%" :before-close="handleClose"> |
| | |
| | | </span> |
| | | </el-dialog> |
| | | <!-- 下发 --> |
| | | <el-dialog title="检验下发" :visible.sync="issuedDialogVisible" width="30%" :before-close="handleClose"> |
| | | <el-form :label-position="labelPosition" :model="formData2" label-width="150px" ref="ruleForm"> |
| | | <el-form-item label="约定时间:"> |
| | | <el-date-picker style="width:100%" format="yyyy-MM-dd" value-format="yyyy-MM-dd" v-model="formData2.appointed2" |
| | | type="date" size="small" placeholder="选择时间"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item > |
| | | </el-form-item> |
| | | <el-form-item label="指派人员:"> |
| | | <el-select v-model="formData2.id" placeholder="请选择" size="small" style="width:100%"> |
| | | <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-dialog title="检验下发" :visible.sync="issuedDialogVisible" width="400px" :before-close="handleClose"> |
| | | <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" 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">* </span>指派人员:</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="distributeData.userId" placeholder="请选择" size="small" style="width: 100%;"> |
| | | <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-row> |
| | | <el-button @click="handleClose2">取 消</el-button> |
| | |
| | | </el-dialog> |
| | | </div> |
| | | <div style="width: 100%;height: 100%;" v-if="active == 1"> |
| | | <Add/> |
| | | <Add /> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | verifyDialogVisible: false, |
| | | quashDialogVisible: false, |
| | | issuedDialogVisible: false, |
| | | issuedDialogVisible2: false, |
| | | dataDialogVisible: false, |
| | | formData: {}, |
| | | formData0:{}, |
| | | formData1:{}, |
| | | formData2:{ |
| | | id:'', |
| | | orderName:'', |
| | | data:'', |
| | | formData0: {}, |
| | | formData1: {}, |
| | | distributeData: { |
| | | orderId: '', |
| | | sampleId: '', |
| | | appointed: '', |
| | | userId: '' |
| | | }, |
| | | // 人员列表 |
| | | personList: [], |
| | | labelPosition: 'right', |
| | | componentData: { |
| | | entity: { |
| | | entrustCode: null, |
| | | sample: null, |
| | | state: 1, |
| | | orderBy: { |
| | | field: 'id', |
| | |
| | | id: 'dataLook', |
| | | font: '数据查看', |
| | | type: 'text', |
| | | method: 'handleDataLook' |
| | | method: 'handleDataLook', |
| | | disabFun: (row, index) => { |
| | | return row.state != 1 |
| | | } |
| | | }, { |
| | | id: 'download', |
| | | font: '报告下载', |
| | | type: 'text', |
| | | method: 'download' |
| | | method: 'download', |
| | | disabFun: (row, index) => { |
| | | return row.state != 1 |
| | | } |
| | | }, { |
| | | id: 'verify', |
| | | font: '审核', |
| | | type: 'text', |
| | | method: 'handleVerify' |
| | | method: 'handleVerify', |
| | | disabFun: (row, index) => { |
| | | return row.state != 0 |
| | | } |
| | | }, { |
| | | id: 'quash', |
| | | font: '撤销', |
| | | type: 'text', |
| | | method: 'handlEquash' |
| | | }, { |
| | | id: 'issued', |
| | | font: '下发', |
| | | type: 'text', |
| | | method: 'handleIssued' |
| | | method: 'handleIssued', |
| | | disabFun: (row, index) => { |
| | | return row.state != 1 || row.sendTime != null |
| | | } |
| | | }], |
| | | linkEvent:{ |
| | | entrustCode:{ |
| | | method:'selectAllByOne' |
| | | } |
| | | }, |
| | | tagField: { |
| | | type: { |
| | | select: [{ |
| | |
| | | label: '紧急' |
| | | }] |
| | | }, |
| | | }, |
| | | linkEvent:{ |
| | | deviceName:{ |
| | | id: 'details', |
| | | method:'selectAllByOne', |
| | | } |
| | | createUser: { |
| | | select: [] |
| | | } |
| | | }, |
| | | selectField: {}, |
| | | requiredAdd: ['largeCategory', 'subclass', 'deviceName', 'internalCode', 'specificationModel', 'manufacturer'], |
| | | requiredUp: ['largeCategory', 'subclass', 'deviceName', 'internalCode', 'specificationModel', 'manufacturer'] |
| | | requiredAdd: [], |
| | | requiredUp: [] |
| | | }, |
| | | componentDataDataLook: { |
| | | entity: { |
| | |
| | | mounted() { |
| | | this.entityCopy = this.HaveJson(this.componentData.entity) |
| | | this.getPower() |
| | | this.getUserMenu() |
| | | this.getAuthorizedPerson() |
| | | }, |
| | | methods: { |
| | | getAuthorizedPerson(){ |
| | | this.$axios.post(this.$api.deviceScope.selectDevicePrincipal).then(res => { |
| | | getAuthorizedPerson() { |
| | | this.$axios.get(this.$api.user.getUserMenu).then(res => { |
| | | let data = [] |
| | | res.data.forEach(a=>{ |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id |
| | |
| | | }) |
| | | this.personList = data |
| | | }) |
| | | }, |
| | | }, |
| | | refreshTable() { |
| | | this.$refs['ValueTable'].selectList() |
| | | }, |
| | |
| | | let del = false |
| | | let add = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == 'upDeviceParameter') { |
| | | if (power[i].menuMethod == 'upInsOrder') { |
| | | up = true |
| | | } |
| | | if (power[i].menuMethod == 'delDeviceParameter') { |
| | | del = true |
| | | } |
| | | if (power[i].menuMethod == 'addDeviceParameter') { |
| | | if (power[i].menuMethod == 'addInsOrder') { |
| | | add = true |
| | | } |
| | | } |
| | | if (!del) { |
| | | this.componentData.do.splice(1, 1) |
| | | } |
| | | if (!up) { |
| | | this.componentData.do.splice(0, 1) |
| | | this.componentData.do.splice(4, 1) |
| | | } |
| | | this.addPower = add |
| | | }, |
| | |
| | | }, |
| | | // 详情 |
| | | selectAllByOne(row) { |
| | | console.log(row); |
| | | //打开弹框 |
| | | this.dialogVisible = true; |
| | | //row = 点击对应行值 |
| | |
| | | }, |
| | | // 下载报告 |
| | | download(row) { |
| | | |
| | | }, |
| | | // 审核 |
| | | handleVerify(row) { |
| | |
| | | // 下发 |
| | | handleIssued(row) { |
| | | this.issuedDialogVisible = true; |
| | | this.$axios.post(this.$api.insOrder.selectOrderManDay,{ |
| | | id: row.sampleId |
| | | }).then(res=>{ |
| | | this.distributeData.orderId = row.id |
| | | this.distributeData.sampleId = row.sampleId |
| | | this.distributeData.appointed = res.data |
| | | }) |
| | | }, |
| | | submitForm2(){ |
| | | submitForm2() { |
| | | if(this.distributeData.appointed==null||this.distributeData.appointed==''){ |
| | | this.$message.error('约定时间未填写') |
| | | return |
| | | } |
| | | this.upLoad = true; |
| | | this.$axios.post(this.$api.insOrder.getDeviceManager, this.formData2, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | this.$axios.post(this.$api.insOrder.upInsOrder, { |
| | | orderId: this.distributeData.orderId, |
| | | sampleId: this.distributeData.sampleId, |
| | | appointed: this.distributeData.appointed, |
| | | userId: this.distributeData.userId |
| | | }).then(res => { |
| | | if (res.code === 201) { |
| | | this.upLoad = false |
| | |
| | | } |
| | | this.$message.success('修改成功') |
| | | this.upLoad = false |
| | | this.issuedDialogVisible = false |
| | | this.refreshTable() |
| | | this.dialogVisible = false |
| | | }).catch(e => { |
| | | this.$message.error('修改失败') |
| | | this.dialogVisible = false |
| | | this.upLoad = false |
| | | }) |
| | | }, |
| | |
| | | delete this.formData.createUser |
| | | delete this.formData.updateUser |
| | | this.formData.authorizedPerson = authorizedPerson |
| | | this.$axios.post(this.$api.insOrder.getDeviceManager, this.formData, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | if (res.code === 201) { |
| | | this.upLoad = false |
| | | return |
| | | } |
| | | this.$message.success('修改成功') |
| | | this.upLoad = false |
| | | this.refreshTable() |
| | | this.dialogVisible = false |
| | | }).catch(e => { |
| | | this.$message.error('修改失败') |
| | | this.dialogVisible = false |
| | | this.upLoad = false |
| | | }) |
| | | }, |
| | | // 下单 |
| | | playOrder(num) { |
| | |
| | | this.tabIndex = i; |
| | | this.componentData.entity.state = m.value |
| | | this.refreshTable() |
| | | }, |
| | | getUserMenu() { |
| | | this.$axios.get(this.$api.user.getUserMenu).then(res => { |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id |
| | | }) |
| | | }) |
| | | this.componentData.tagField.createUser.select = data |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | </script> |
| | |
| | | <el-table-column prop="manHourGroup" label="工时分组" width="100" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="deviceGroup" label="设备组" width="120" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="section" label="区间" width="120" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="ask" label="要求值" width="220px"> |
| | | <el-table-column prop="ask" label="要求值" min-width="220px"> |
| | | <template slot-scope="scope"> |
| | | <el-input size="small" placeholder="要求值" v-model="scope.row.ask" clearable |
| | | @change="(value)=>upStandardProductList(value,scope.row.id)" v-if="upStandardProduct" type="textarea" :autosize="{ minRows: 1, maxRows: 3}"></el-input> |
| | |
| | | removeTab(index) { |
| | | this.tabs.splice(index, 1); |
| | | let data = this.tabs[this.tabs.length - 1] |
| | | this.activeP = data.k; |
| | | this.tabActive = data.k; |
| | | this.activeBox = data.k |
| | | this.saveClick() |
| | | this.upTabActive(data.k) |
| | | }, |
| | | allDel() { |
| | | this.activeBox = 0 |