package.json | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/components/do/b1-inspect-order-plan/Inspection.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/components/view/b1-inspect-order-plan.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/components/view/b1-inspection-order.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/components/view/b1-sample.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
package.json
@@ -49,6 +49,7 @@ "vue-axios": "^3.2.4", "vue-canvas-poster": "^1.2.1", "vue-qr": "^3.2.4", "vue-qrcode-reader": "^5.5.11", "vue-router": "^3.0.1", "vuedraggable": "^2.24.3", "wangeditor": "^4.7.15", src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -259,7 +259,7 @@ <el-row class="title"> <el-col :span="12" style="padding-left: 20px;text-align: left;" :class="{noShow:noBack}">检验单详情 </el-col> <el-col :span="12" style="text-align: right;display: flex;align-items: center;justify-content: end;margin-top: 0px;"> <el-col :span="12" style="text-align: right;display: flex;align-items: center;justify-content: end;margin-top: 16px;"> <el-button size="small" type="primary" @click="versionDialogVisible=true" v-if="state==1&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName.includes('电路试验')">电调/非电调模板切换</el-button> <el-select v-model="template" size="medium" placeholder="电路预设模板" style="margin-right: 10px;margin-left: 10px;" v-if="state==1&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName.includes('电路试验')" @change="selectInsProductTemplateById"> @@ -277,10 +277,11 @@ <el-button size="small" type="primary" @click="handleSubmit" v-if="state==1" :loading="submitLoading">提交</el-button> <!-- 复核 --> <el-button size="small" type="primary" @click="upInsReview(1,'继续试验')" :loading="reviewLoading" v-if="state>1&&!isLook">继续试验</el-button> <!-- <el-button size="small" type="primary" @click="upInsReview(1,'继续试验')" :loading="reviewLoading" v-if="state>1&&!isLook">继续测试下一个样品</el-button> <el-button size="small" @click="upInsReview(0,'再次试验')" v-if="state>1&&!isLook" type="danger">再次试验</el-button> <el-button size="small" @click="upInsReview(2,'结束试验')" v-if="state>1&&!isLook">结束试验</el-button> <el-button size="small" @click="upInsReview(2,'结束试验')" v-if="state>1&&!isLook">此委托单结束</el-button> --> <el-button size="small" type="primary" @click="upInsReviewDia=true" v-if="state>1&&!isLook">复核</el-button> <el-button size="small" @click="handleBack" v-if="!noBack">返回</el-button> </el-col> </el-row> @@ -940,6 +941,18 @@ <el-button type="primary" @click="addTemplateDia" :loading="templateLoading">确 定</el-button> </span> </el-dialog> <el-dialog title="复核" :visible.sync="upInsReviewDia" width="400px"> <el-radio-group v-model="upInsReviewType" style="display: flex;flex-direction: column"> <el-radio :label="1" style="margin: 10px 0; ">继续测试下一个样品或其他站点任务</el-radio> <el-radio :label="0" style="margin: 10px 0; ">再次检验该样品</el-radio> <el-radio :label="2" style="margin: 10px 0; ">此委托单结束</el-radio> <p style="font-size: 12px;color:red">慎重:如果还有其他样品在检,点击结束可能会中断,请确保所有样品都检验且复核完成再点击</p> </el-radio-group> <span slot="footer" class="dialog-footer"> <el-button @click="upInsReviewDia = false">取 消</el-button> <el-button type="primary" @click="upInsReview" :loading="reviewLoading">确 定</el-button> </span> </el-dialog> </div> </template> @@ -967,6 +980,8 @@ lookFileVisible:false,//预览文件 experimentDia:false, experimentDia0:false, upInsReviewDia:false, upInsReviewType:1, experimentInfo:{ note:'', term:'' @@ -3224,23 +3239,19 @@ }) }, // 复核 upInsReview(e,type) { this.$confirm(type=='结束试验'?'确认结束试验?确定后此委托单停止试验,并且无法再次检验!':`是否${type}?`, "提示", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" }).then(() => { if (e == 1||e==2) { upInsReview() { if (this.upInsReviewType == 1||this.upInsReviewType==2) { // 继续试验 this.reviewLoading = true; this.$axios.post(this.$api.insOrderPlan.verifyPlan, { sampleId: this.orderId, type: e, type: this.upInsReviewType, laboratory: this.sonLaboratory, tell: null }).then(res => { if (res.code === 200) { this.$message.success("操作成功") this.upInsReviewDia = false; this.$emit('goback') } this.reviewLoading = false; @@ -3252,7 +3263,6 @@ // 再次试验 this.reviewDia = true; } }) }, handleReviewDia() { if (this.noReason) { src/components/view/b1-inspect-order-plan.vue
@@ -391,6 +391,13 @@ </el-input> </div> </el-col> <el-col class="search_thing" :span="24"> <div class="search_label" style="width: 90px"><span class="required-span">* </span>订单编号:</div> <div class="search_input"> <el-input v-model="entrustCode" size="small" clearable :disabled="sampleCodeBtnDisabled"> </el-input> </div> </el-col> </el-row> <el-tree :data="storageList" ref="tree" :props="{ children: 'warehouseShelfList', label: 'name' }" node-key="id" :filter-node-method="filterNode" @node-click="handleNodeClick" highlight-current @node-expand="nodeOpen" @@ -414,12 +421,19 @@ <el-dialog title="出库" :visible.sync="exportVisible" width="400px"> <el-row> <el-col class="search_thing" :span="24"> <div class="search_label" style="width: 90px"><span class="required-span">* </span>样品编号:</div> <div class="search_label" style="width: 90px"><span class="required-span">* </span>委托编号:</div> <div class="search_input"> <el-input v-model="sampleCode" size="small" clearable :disabled="sampleCodeBtnDisabled"> <el-tooltip :content="sampleCodeBtnDisabled?'手动输入':'扫码枪输入'" placement="top" slot="append"> <el-button type="primary" icon="el-icon-edit" @click="sampleCodeBtnDisabled=!sampleCodeBtnDisabled"></el-button> </el-tooltip> </el-input> </div> </el-col> <el-col class="search_thing" :span="24"> <div class="search_label" style="width: 90px"><span class="required-span">* </span>委托编号:</div> <div class="search_input"> <el-input v-model="entrustCode" size="small" clearable :disabled="sampleCodeBtnDisabled"> </el-input> </div> </el-col> @@ -676,6 +690,7 @@ scanInsOrderState:false, qrCodeVisible: false, sampleCode: '', entrustCode:'', storageList:[], expandedKeys: [], selectTree: [], @@ -695,6 +710,7 @@ if(newVal){ // this.$message.success('扫码:打开') this.sampleCode = null this.entrustCode = null let input = document.getElementById('ScanCodeInfo'); input.focus(); this.startTime = setInterval(()=>{ @@ -710,6 +726,7 @@ if(newVal){ // this.$message.success('扫码:打开') this.sampleCode = null this.entrustCode = null let input = document.getElementById('ScanCodeInfo'); input.focus(); this.startTime = setInterval(()=>{ @@ -725,7 +742,8 @@ if(!val){ this.startTime&&clearInterval(this.startTime) }else if(this.exportVisible||this.qrCodeVisible){ this.sampleCode = null // this.sampleCode = null // this.entrustCode = null let input = document.getElementById('ScanCodeInfo'); input.focus(); this.startTime = setInterval(()=>{ @@ -796,6 +814,10 @@ this.$message.error('请填写样品编号') return } if (!this.entrustCode) { this.$message.error('请填写订单编号') return } if (this.selectTree.length < 4) { this.$message.error('请选择样品入库位置') return @@ -804,11 +826,13 @@ this.$axios.post(this.$api.insOrderPlan.scanInsOrderState, { trees: this.selectTree.join('-'), sampleCode:this.sampleCode, entrustCode:this.entrustCode, sonLaboratory: this.componentData.entity.sonLaboratory }).then(res => { this.upLoadStorage = false; this.qrCodeVisible = false this.sampleCode = ''; this.entrustCode = ''; this.selectTree = [] if (res.code == 201) { this.$message.error('添加失败') @@ -824,14 +848,20 @@ this.$message.error('请填写样品编号') return } if (!this.entrustCode) { this.$message.error('请填写订单编号') return } this.upLoadExport = true; this.$axios.post(this.$api.insOrderPlan.outInsOrderState, { sampleCode:this.sampleCode, entrustCode:this.entrustCode, sonLaboratory: this.componentData.entity.sonLaboratory }).then(res => { this.upLoadExport = false; this.exportVisible = false this.sampleCode = ''; this.entrustCode = ''; if (res.code == 201) { this.$message.error('出库失败') return @@ -842,13 +872,15 @@ }, // 扫码枪按下 keyup(e){ var code = '' var codeInfo = null try{ code = this.codeInfo.substring() if(code==null||code==undefined||code==''){ this.$message.error('该二维码有误') console.log(2222,this.codeInfo) codeInfo = JSON.parse(this.codeInfo) if(!codeInfo||codeInfo.sampleCode==undefined||codeInfo.entrustCode==undefined){ this.$message.error('该二维码有误') }else{ this.sampleCode = code this.sampleCode = codeInfo.sampleCode this.entrustCode = codeInfo.entrustCode } }catch(e){ this.$message.error('请调至英文键盘') src/components/view/b1-inspection-order.vue
@@ -397,10 +397,27 @@ <el-card class="box-card" v-for="(item, i) in qrData" :key="i+'wwwww'" style="margin-bottom: 15px; font-size: 16px !important;"> <el-checkbox :label="i" :key="i" style="position: relative;top:-10px;left:5px"><br></el-checkbox> <div> <p style="text-align: center;font-size: 18px;font-weight: 700;">{{ item.sample }}</p> <barcode :value="item.sampleCode" :height="34" :width="2" :displayValue="false" style="display: flex;justify-content: center;width: 100%;"></barcode> <div> <div style="width: 100%;line-height: 30px;"> <p style="text-align: center;font-size: 26px;font-weight: 700;">{{ item.sample }}({{item.model}})</p> <p style="text-align: center;font-size: 16px;">{{ item.sampleCode }}</p> <el-divider></el-divider> <el-row style="font-size: 16px;"> <el-col :span="16" style="text-align: left;line-height: 28px;"> <p><span> 委托单号: </span>{{ item.code }}</p> <p><span> 电机编号: </span>{{ item.motorNumber }}</p> <p><span> 样机完成时间: </span>{{ item.issueTime }}</p> <p><span> 样机员: </span>{{ item.issueName }}</p> <p class="ellipsis-multiline"><span> 检测项目: </span>{{ item.item }}</p> </el-col> <el-col :span="8" style="text-align: left;"> <vueQr :text="item.str" :size="140" :margin="2" ></vueQr> </el-col> </el-row> <!-- <div> <div> <el-row style="font-size: 16px;"> <el-col :span="16" style="text-align: left;"><span> 样品编号: </span>{{ item.sampleCode }}</el-col> <el-col :span="8" style="text-align: left;"><span> 规格型号: </span>{{ item.model }}</el-col> @@ -417,7 +434,7 @@ <el-col style="text-align: left;"><span> 检测项目: </span>{{ item.item }}</el-col> </el-row> </div> </div> </div> --> </div> </el-card> </el-checkbox-group> @@ -434,28 +451,27 @@ <div id="printMOrder" class="printMOrder" ref="printMOrder"> <el-card class="box-card" v-for="(item, i) in checkDataList" :key="i+'uuuuu'" style="font-size: 16px !important;page-break-after: always;color: #000;box-shadow: none;margin: 0 !important;padding: 0 !important;"> <div> <p style="text-align: center;font-size: 18px;font-weight: 500;margin-top: 10px;">{{ item.sample }}</p> <barcode :value="item.sampleCode" :height="34" :width="2" :displayValue="false" style="display: flex;justify-content: center;width: 100%;"></barcode> <div> <div style="width: 100%;line-height: 30px;"> <el-row style="font-size: 16px;"> <el-col :span="16" style="text-align: left;"><span>样品编号: </span>{{ item.sampleCode }}</el-col> <el-col :span="7" style="text-align: left;"><span>规格型号: </span>{{ item.model }}</el-col> </el-row> <el-row style="margin-top: 1px;font-size: 16px;"> <el-col :span="16" style="text-align: left;"><span>委托单号: </span>{{ item.code }}</el-col> <el-col :span="7" style="text-align: left;"><span>电机编号: </span>{{ item.motorNumber }}</el-col> </el-row> <el-row style="margin-top: 1px;font-size: 16px;"> <el-col :span="16" style="text-align: left;"><span>样机完成时间: </span>{{ item.issueTime }}</el-col> <el-col :span="7" style="text-align: left;"><span>样机员: </span>{{ item.issueName }}</el-col> </el-row> <el-row style="margin-top: 1px;font-size: 16px;" class="ellipsis-multiline"> <el-col style="text-align: left;"><span>检测项目: </span>{{ item.item }}</el-col> </el-row> </div> <p style="text-align: center;font-size: 26px;font-weight: 700;margin-top: 20px;">{{ item.sample }}({{item.model}})</p> <p style="text-align: center;font-size: 16px;">{{ item.sampleCode }}</p> <!-- <el-divider></el-divider> --> <p style="width: 100%;height:1px;background-color: #333333;margin: 6px 0;"></p> <el-row style="font-size: 16px;"> <el-col :span="16" style="text-align: left;line-height: 28px;"> <p><span> 委托单号: </span>{{ item.code }}</p> <p><span> 电机编号: </span>{{ item.motorNumber }}</p> <p><span> 样机完成时间: </span>{{ item.issueTime }}</p> <p><span> 样机员: </span>{{ item.issueName }}</p> <p class="ellipsis-multiline"><span> 检测项目: </span>{{ item.item }}</p> </el-col> <el-col :span="8" style="text-align: left;"> <vueQr :text="item.str" :size="140" :margin="2" ></vueQr> </el-col> </el-row> </div> </div> </el-card> </div> </div> @@ -937,7 +953,13 @@ }) a.item = [...new Set(arr1)].join(',') }) this.qrData = arr this.qrData = arr.map(m=>{ m.str = JSON.stringify({ sampleCode:m.sampleCode, entrustCode:m.code }) return m }) // console.log(this.qrData) }) }, @@ -972,27 +994,17 @@ targetStyles: ["*"], // 使用dom的所有样式,很重要 printable: 'printMOrder',//页面 type: "html",//文档类型 maxWidth:720, header: '', documentTitle: "二维码", style: `@page { margin: 0.4cm; margin-right: 0.4cm; margin-top: 0.4cm; margin-bottom: 0.4cm; padding-bottom: 0px; size: 800px 600px collapse; margin: 0; size: landscape; } html{ body{ zoom:100%; } @media print{ width: 800px; height: 600px; padding:30px 0; margin:0; }`, font_size: '16px', }); }, async print(){ src/components/view/b1-sample.vue
@@ -196,9 +196,13 @@ <div class="search_label">样品编号:</div> <div class="search_input"> <el-input placeholder="请输入样品编号" v-model="searchSampleCode" size="small" autocomplete="off" ref="organization" readonly="readonly" @focus="remove('organization')" @blur="setType('organization')"> <el-button slot="append" icon="el-icon-search" @click="handleSearch"></el-button> <!-- <el-button slot="append" icon="el-icon-search" @click="handleSearch"></el-button> --> </el-input> </div> </div> <div class="search_thing"> <el-button size="small" @click="handleShelf(entity.shelfId,''),searchSampleCode=''">重置</el-button> <el-button size="small" type="primary" @click="handleShelf(entity.shelfId,searchSampleCode)">查询</el-button> </div> <!-- <div class="search_thing" style="padding-left: 30px;"> <el-button size="small" @click="refresh()">重 置</el-button> @@ -262,6 +266,13 @@ </el-input> </div> </el-col> <el-col class="search_thing" :span="24"> <div class="search_label" style="width: 90px"><span class="required-span">* </span>订单编号:</div> <div class="search_input"> <el-input v-model="entrustCode" size="small" clearable :disabled="sampleCodeBtnDisabled"> </el-input> </div> </el-col> </el-row> <el-tree :data="storageList" ref="tree" :props="{ children: 'warehouseShelfList', label: 'name' }" node-key="id" :filter-node-method="filterNode" @node-click="handleNodeClick" highlight-current @node-expand="nodeOpen" @@ -295,6 +306,13 @@ <el-tooltip :content="sampleCodeBtnDisabled?'手动输入':'扫码枪输入'" placement="top" slot="append"> <el-button type="primary" icon="el-icon-edit" @click="sampleCodeBtnDisabled=!sampleCodeBtnDisabled"></el-button> </el-tooltip> </el-input> </div> </el-col> <el-col class="search_thing" :span="24"> <div class="search_label" style="width: 90px"><span class="required-span">* </span>委托编号:</div> <div class="search_input"> <el-input v-model="entrustCode" size="small" clearable :disabled="sampleCodeBtnDisabled"> </el-input> </div> </el-col> @@ -416,6 +434,7 @@ currentEdit:null,//当前要维护的信息 tableLoading:false, sampleCode:'', entrustCode:'', currentId:null, searchSampleCode:null, codeInfo:null, @@ -425,6 +444,7 @@ storageVisible(newVal){ if(newVal){ this.sampleCode = null this.entrustCode = null // this.$message.success('扫码:打开') let input = document.getElementById('ScanCodeInfo0'); input.focus(); @@ -441,6 +461,7 @@ if(newVal){ // this.$message.success('扫码:打开') this.sampleCode = null this.entrustCode = null let input = document.getElementById('ScanCodeInfo0'); input.focus(); this.startTime = setInterval(()=>{ @@ -456,7 +477,6 @@ if(!val){ this.startTime&&clearInterval(this.startTime) }else if(this.exportVisible||this.storageVisible){ this.sampleCode = null let input = document.getElementById('ScanCodeInfo'); input.focus(); this.startTime = setInterval(()=>{ @@ -475,14 +495,15 @@ }, methods: { keyup(e){ var code = '' var codeInfo = null try{ console.log(2222,this.codeInfo) code = this.codeInfo.substring() if(code==null||code==undefined||code==''){ codeInfo = JSON.parse(this.codeInfo) if(!codeInfo||codeInfo.sampleCode==undefined||codeInfo.entrustCode==undefined){ this.$message.error('该二维码有误') }else{ this.sampleCode = code this.sampleCode = codeInfo.sampleCode this.entrustCode = codeInfo.entrustCode } }catch(e){ this.$message.error('请调至英文键盘') @@ -555,6 +576,10 @@ this.$message.error('请填写样品编号') return } if (!this.entrustCode) { this.$message.error('请填写订单编号') return } if (this.selectTree.length < 4) { this.$message.error('请选择样品入库位置') return @@ -562,11 +587,13 @@ this.upLoadStorage = true; this.$axios.post(this.$api.warehouse.inWarehouse, { trees: this.selectTree.join('-'), sampleCode:this.sampleCode sampleCode:this.sampleCode, entrustCode:this.entrustCode }).then(res => { this.upLoadStorage = false; this.storageVisible = false this.sampleCode = ''; this.entrustCode = ''; this.selectTree = [] if (res.code == 201) { this.$message.error('入库失败') @@ -582,13 +609,19 @@ this.$message.error('请填写样品编号') return } if (!this.entrustCode) { this.$message.error('请填写订单编号') return } this.upLoadExport = true; this.$axios.post(this.$api.warehouse.outWarehouse, { sampleCode:this.sampleCode sampleCode:this.sampleCode, entrustCode:this.entrustCode, }).then(res => { this.upLoadExport = false; this.exportVisible = false this.sampleCode = ''; this.entrustCode = ''; if (res.code == 201) { this.$message.error('出库失败') return @@ -783,10 +816,10 @@ this.shelf = map.warehouseShelfList; this.entity.shelfId = ''; }, handleShelf(e){ handleShelf(e,sampleCode=''){ if(e){ this.tableLoading = true; this.$axios.get(this.$api.warehouse.getWarehouse+'?shelfId='+e).then(res => { this.$axios.get(this.$api.warehouse.getWarehouse+'?shelfId='+e+'&sampleCode='+sampleCode).then(res => { this.tableLoading = false; let data = res.data; let set =new Set() src/main.js
@@ -21,11 +21,11 @@ //本地 // Vue.prototype.LOCATIONVUE = "http://127.0.0.1:80"; // const javaApi = 'http://127.0.0.1:8001'; // const javaApi = 'http://172.20.10.5:8001'; const javaApi = 'http://172.20.10.5:8001'; // //通信测试库 // Vue.prototype.LOCATIONVUE = "http://10.1.13.77:8080"; const javaApi = 'http://10.1.13.77:8001'; // const javaApi = 'http://10.1.13.77:8001'; // 通信正式库 // Vue.prototype.LOCATIONVUE = "https://ztwxlims.ztt.cn:7443";