| | |
| | | claimInsOrderPlan: "/insOrderPlan/claimInsOrderPlan",//认领检验任务 |
| | | doInsOrder: "/insOrderPlan/doInsOrder",//执行检验操作 |
| | | saveInsContext: "/insOrderPlan/saveInsContext",//保存检验内容 |
| | | upPlanUser: "/insOrderPlan/upPlanUser",//任务交接 |
| | | verifyPlan: "/insOrderPlan/verifyPlan",//复核检验任务 |
| | | } |
| | | |
| | | const systemLog = { |
| | |
| | | <span style="color: #3A7BFA;">保存模板</span> |
| | | </el-button> |
| | | <el-button size="medium" type="primary" @click="save" :loading="saveLoad" v-show="active==1">提交</el-button> |
| | | <!-- 审核 --> |
| | | <el-button size="medium" @click="upInsOrderOfState(2)" :loading="saveLoad" v-show="active==3">不通过</el-button> |
| | | <el-button size="medium" type="primary" @click="upInsOrderOfState(1)" :loading="saveLoad" |
| | | v-show="active==3">通过</el-button> |
| | |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | this.$nextTick(()=>{ |
| | | this.$refs.productTable.doLayout() |
| | | }) |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | |
| | | .center { |
| | | width: calc(100% - 40px); |
| | | height: calc(100% - 60px - 80px - 40px); |
| | | max-height: 580px; |
| | | background-color: #fff; |
| | | border-radius: 3px; |
| | | padding: 20px; |
| | | position: relative; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .center-box { |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | flex-wrap: wrap; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .tables { |
| | | /* width: 800px; */ |
| | | margin-bottom: 16px; |
| | | } |
| | | |
| | |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <el-button size="small" type="primary" @click="sampleVisible=true">样品切换</el-button> |
| | | <el-button size="small" type="primary" @click="taskVisible=true">任务切换</el-button> |
| | | <!-- 复核 --> |
| | | <el-button size="medium" type="primary" @click="upInsReview(1)" :loading="reviewLoading" |
| | | v-show="state>1">通过</el-button> |
| | | <el-button size="medium" @click="upInsReview(0)" v-show="state>1">不通过</el-button> |
| | | <el-button size="small" @click="$emit('goback')">返回</el-button> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <div class="content" :class="`content-h-${n.v.ht} content-v-${n.v.vt}`"> |
| | | <template v-if="n.v.ps!=undefined && n.v.ps.value==='检验值'"> |
| | | <el-input v-if="getInspectionValueType(n.i) == 1" class="table_input" v-model="n.v.v" |
| | | :disabled="getInspectionItemType(n.i) == 1 || (n.u != userId && n.u != undefined && n.u != '')" |
| | | :disabled="getInspectionItemType(n.i) == 1 || (n.u != userId && n.u != undefined && n.u != '')||state>1" |
| | | @change="m=>changeInput(m,`${item.templateId}-${n.r}-${n.c}-${n.i}`)" /> |
| | | <el-input v-else-if="getInspectionValueType(n.i) == 2" class="table_input" type="textarea" |
| | | :autosize="{ minRows: 1}" v-model="n.v.v" /> |
| | | <el-select v-else-if="getInspectionValueType(n.i) == 5" class="table_input" v-model="n.v.v"> |
| | | :autosize="{ minRows: 1}" v-model="n.v.v" :disabled="state>1" /> |
| | | <el-select v-else-if="getInspectionValueType(n.i) == 5" class="table_input" v-model="n.v.v" :disabled="state>1"> |
| | | <el-option label="是" value="是"></el-option> |
| | | <el-option label="否" value="否"></el-option> |
| | | </el-select> |
| | |
| | | v-else-if="getInspectionValueType(n.i) == 4">/</span> |
| | | <el-button type="primary" icon="el-icon-edit" size="mini" circle |
| | | v-if="getInspectionItemType(n.i) == 1" style="border: 0;margin-left: 2px;" |
| | | @click="getSystemValue(n)" :disabled="n.u != userId && n.u != undefined && n.u != ''"> |
| | | @click="getSystemValue(n)" :disabled="(n.u != userId && n.u != undefined && n.u != '')||state>1"> |
| | | </el-button> |
| | | </template> |
| | | <template v-else-if="n.v.ps!=undefined && n.v.ps.value==='结论'"> |
| | |
| | | <span v-else :style="`font-family:${n.v.ff} !important;`">待定</span> |
| | | </template> |
| | | <template v-else-if="n.v.ps!=undefined && n.v.ps.value==='设备'"> |
| | | <el-select v-model="n.v.v" placeholder="请选择" @visible-change="e=>getEquipOptions(e,n.i)"> |
| | | <el-select v-model="n.v.v" placeholder="请选择" @visible-change="e=>getEquipOptions(e,n.i)" :disabled="state>1"> |
| | | <el-option |
| | | v-for="item in equipOptions" |
| | | :key="item.value" |
| | |
| | | <ValueTable class="value-table" ref="insOrderPlan" :url="$api.insOrderPlan.selectInsOrderPlanList" |
| | | :componentData="componentData" :key="upIndex" /> |
| | | </el-drawer> |
| | | <el-dialog title="检验复核" :visible.sync="reviewDia" width="400px"> |
| | | <div class="body" style="display: flex;align-items: center;" v-if="reviewDia"> |
| | | <div class="search_label" style="width: 120px;"><span class="required-span">* </span>不通过原因:</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" clearable v-model="noReason" type="textarea" :autosize="{ minRows: 3, maxRows: 5}"></el-input> |
| | | </div> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="reviewDia = false">取 消</el-button> |
| | | <el-button type="primary" @click="handleReviewDia" :loading="reviewLoading">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import ValueTable from '../../tool/value-table.vue' |
| | | export default { |
| | | props: ['sonLaboratory', 'orderId'], |
| | | props: ['sonLaboratory', 'orderId','state'], |
| | | components: { |
| | | ValueTable, |
| | | }, |
| | |
| | | comparisonList: [], |
| | | excelMethodList: [], |
| | | equipOptions:[], |
| | | userId: 0 |
| | | userId: 0, |
| | | reviewLoading:false, |
| | | reviewDia:false, |
| | | noReason:'' |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | this.userId = res.data.id |
| | | }) |
| | | }, |
| | | // 复核 |
| | | upInsReview(e){ |
| | | if(e==1){ |
| | | // 通过 |
| | | this.reviewLoading = true; |
| | | this.$axios.post(this.$api.insOrderPlan.verifyPlan, { |
| | | orderId:this.orderId, |
| | | type:1, |
| | | laboratory:this.sonLaboratory, |
| | | tell:null |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | if (res.code === 200 && res.data) { |
| | | this.reviewLoading = false; |
| | | this.$message.success("复核通过") |
| | | this.$emit('goback') |
| | | } |
| | | }).catch(error => { |
| | | console.error(error) |
| | | this.reviewLoading = false; |
| | | }) |
| | | }else{ |
| | | // 不通过 |
| | | this.reviewDia = true; |
| | | } |
| | | }, |
| | | handleReviewDia(){ |
| | | if(this.noReason){ |
| | | this.reviewLoading = true; |
| | | this.$axios.post(this.$api.insOrderPlan.verifyPlan, { |
| | | orderId:this.orderId, |
| | | type:0, |
| | | laboratory:this.sonLaboratory, |
| | | tell:this.noReason |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | if (res.code === 200 && res.data) { |
| | | this.reviewLoading = false; |
| | | this.$message.success("复核不通过") |
| | | this.$emit('goback') |
| | | } |
| | | }).catch(error => { |
| | | console.error(error) |
| | | this.reviewLoading = false; |
| | | }) |
| | | }else{ |
| | | this.$message.error('未输入不通过原因') |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | @row-click="rowClick" :show-summary="data.countFleid!=undefined && data.countFleid.length > 0" |
| | | :summary-method="getSummaries" :row-class-name="tableRowClassName" |
| | | :row-key="record=>record.id" :current-row-key="data.currentId" |
| | | highlight-current-row> |
| | | highlight-current-row |
| | | :span-method="spanMethod"> |
| | | <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()"> |
| | |
| | | uploadDia: false, |
| | | token: null, |
| | | fileList: [], |
| | | init: true |
| | | init: true, |
| | | testArr: [], |
| | | testPosition: 0, |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | rowspan(spanArr, position, spanName) { |
| | | this.tableData.forEach((item, index) => { |
| | | if (index === 0) { |
| | | spanArr.push(1); |
| | | position = 0; |
| | | } else { |
| | | if ( |
| | | this.tableData[index][spanName] === |
| | | this.tableData[index - 1][spanName] |
| | | ) { |
| | | spanArr[position] += 1; |
| | | spanArr.push(0); |
| | | } else { |
| | | spanArr.push(1); |
| | | position = index; |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | spanMethod({ row, column, rowIndex, columnIndex }){ |
| | | if(this.data.spanConfig!=undefined&&this.data.spanConfig.rows){ |
| | | if (columnIndex === this.data.spanConfig.rows.index) { |
| | | const _row = this.testArr[rowIndex]; |
| | | const _col = _row > 0 ? 1 : 0; |
| | | return { |
| | | rowspan: _row, |
| | | colspan: _col, |
| | | }; |
| | | } |
| | | } |
| | | }, |
| | | selectChange(val) { |
| | | if (this.data.select) { |
| | | this.multipleSelection = val; |
| | |
| | | }) |
| | | } |
| | | } |
| | | if(this.data.spanConfig!=undefined&&this.data.spanConfig.rows){ |
| | | this.testArr = [] |
| | | this.testPosition = 0 |
| | | this.rowspan(this.testArr, this.testPosition, this.data.spanConfig.rows.name); |
| | | } |
| | | this.loading = false |
| | | }).catch(e => { |
| | | this.loading = false |
| | |
| | | border-radius: 8px 0 0 8px; |
| | | } |
| | | |
| | | .tab li:nth-child(3) { |
| | | .tab li:nth-last-child(1) { |
| | | border-radius: 0 8px 8px 0; |
| | | } |
| | | |
| | |
| | | 是否认领委托编号<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> |
| | | <el-button type="primary" @click="confirmClaim" :loading="loading">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog title="检验交接" :visible.sync="connectVisible" width="400px"> |
| | | <div class="search_thing"> |
| | | <div class="search_label" style="width:90px">交接人员:</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="connectPerson" placeholder="请选择" style="width: 100%;"> |
| | | <el-option |
| | | v-for="item in personList" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="connectVisible = false">取 消</el-button> |
| | | <el-button type="primary" @click="confirmConnect" :loading="loading">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <div style="width: 100%;height: 100%;" v-if="activeFace >0"> |
| | | <Add :active="activeFace" :currentId="currentId"/> |
| | | </div> |
| | | <Inspection v-if="state==1" @goback="goback" :orderId="orderId" :sonLaboratory="componentData.entity.sonLaboratory"/> |
| | | <Inspection v-if="state>0" @goback="goback" :orderId="orderId" :sonLaboratory="componentData.entity.sonLaboratory" :state="state"/> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | getYearAndMonthAndDays |
| | | } from '../../util/date' |
| | | import Add from '../do/b1-ins-order/add.vue' |
| | | import { number } from 'echarts' |
| | | export default { |
| | | components: { |
| | | ValueTable, |
| | |
| | | id: '', |
| | | font: '交接', |
| | | type: 'text', |
| | | method: '' |
| | | method: 'handleConnect' |
| | | }, |
| | | { |
| | | id: '', |
| | | font: '复核', |
| | | type: 'text', |
| | | method: '' |
| | | method: 'handleReview', |
| | | }, { |
| | | id: '', |
| | | font: '认领', |
| | |
| | | }] |
| | | } |
| | | }, |
| | | spanConfig:{ |
| | | rows:'entrustCode',//合并行,通常涉及一个字段 |
| | | cols:[],//合并列,通常涉及几个字段 |
| | | }, |
| | | selectField: {}, |
| | | requiredAdd: [], |
| | | requiredUp: [] |
| | |
| | | upIndex: 0, |
| | | planTotal: 0, |
| | | insStateList: [], |
| | | state:0,//0:台账页,1:检验页面,默认为0 |
| | | activeFace: 0, //1:下单,2:查看,3:审核 |
| | | state:0,//0:台账页,1:检验页面,2检验页面(复核),默认为0 |
| | | activeFace: 0, //1:下单,2:查看,3:审核,默认为0 |
| | | currentId: null, |
| | | entityCopy: {}, |
| | | orderId: 0, |
| | | personList:[], |
| | | connectVisible:false, |
| | | connectPerson:'', |
| | | loading:false, |
| | | } |
| | | }, |
| | | created() { |
| | | this.getLaboratoryDicts() |
| | | this.getTypeDicts() |
| | | this.getInsStateDicts() |
| | | this.getAuthorizedPerson() |
| | | }, |
| | | mounted() { |
| | | this.entityCopy = this.HaveJson(this.componentData.entity) |
| | | this.getPower() |
| | | }, |
| | | methods: { |
| | | // 权限分配 |
| | | getPower(radio) { |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let inspection = false |
| | | let connect = false |
| | | let review = false |
| | | let claim = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == 'doInsOrder') { |
| | | inspection = true |
| | | } |
| | | if (power[i].menuMethod == 'upPlanUser') { |
| | | connect = true |
| | | } |
| | | if (power[i].menuMethod == 'verifyPlan') { |
| | | review = true |
| | | } |
| | | if (power[i].menuMethod == 'claimInsOrderPlan') { |
| | | claim = true |
| | | } |
| | | } |
| | | if (!claim) { |
| | | this.componentData.do.splice(3, 1) |
| | | } |
| | | if (!review) { |
| | | this.componentData.do.splice(2, 1) |
| | | } |
| | | if (!connect) { |
| | | this.componentData.do.splice(1, 1) |
| | | } |
| | | if (!inspection) { |
| | | this.componentData.do.splice(0, 1) |
| | | } |
| | | }, |
| | | changeCheckBox(val) { |
| | | this.componentData.entity.userId = val?0:null |
| | | this.refreshTable() |
| | |
| | | } |
| | | }, |
| | | confirmClaim() { |
| | | this.loading = true; |
| | | this.$axios.post(this.$api.insOrderPlan.claimInsOrderPlan, this.sampleUserForm, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | if (res.code === 200 && res.data) { |
| | | this.loading = false; |
| | | this.$message.success("认领成功") |
| | | this.claimVisible = false |
| | | this.refreshTable() |
| | | } |
| | | }).catch(error => { |
| | | console.error(error) |
| | | this.loading = false; |
| | | }) |
| | | }, |
| | | refreshTable() { |
| | |
| | | handleInspection(row){ |
| | | this.state = 1; |
| | | this.orderId = row.id |
| | | } |
| | | }, |
| | | handleConnect(row){ |
| | | this.orderId = row.id |
| | | this.connectVisible=true; |
| | | }, |
| | | confirmConnect(){ |
| | | if(this.connectPerson){ |
| | | this.loading = true; |
| | | this.$axios.post(this.$api.insOrderPlan.upPlanUser, { |
| | | orderId:this.orderId, |
| | | userId:this.connectPerson |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | if (res.code === 200 && res.data) { |
| | | this.loading = false; |
| | | this.$message.success("交接成功") |
| | | this.connectVisible = false |
| | | this.refreshTable() |
| | | } |
| | | }).catch(error => { |
| | | console.error(error) |
| | | this.loading = false; |
| | | }) |
| | | }else{ |
| | | this.$message.error('未选择交接人员') |
| | | } |
| | | }, |
| | | handleReview(row){ |
| | | this.state = 2; |
| | | this.orderId = row.id |
| | | }, |
| | | getAuthorizedPerson() { |
| | | this.$axios.get(this.$api.user.getUserMenu).then(res => { |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id |
| | | }) |
| | | }) |
| | | this.personList = data |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | }], |
| | | tagField: {}, |
| | | selectField: {}, |
| | | spanConfig:{ |
| | | rows:{ |
| | | name:'category', |
| | | index:1 |
| | | },//合并行,通常涉及一个字段 |
| | | }, |
| | | requiredAdd:['category','label','value'], |
| | | requiredUp:['category','label','value'] |
| | | }, |
| | |
| | | |
| | | //本地 |
| | | Vue.prototype.LOCATIONVUE = "http://127.0.0.1:80"; |
| | | const javaApi = 'http://192.168.0.24:8001';//李 |
| | | const javaApi = 'http://192.168.0.10:8001';//李 |
| | | // const javaApi = 'http://114.132.189.42:9006';//测试服 |
| | | //胜云服务器 |
| | | // Vue.prototype.LOCATIONVUE = "http://syxt.shxiao2.cn"; |