diff --git a/src/views/collect/DealOrder.vue b/src/views/collect/DealOrder.vue
index 7d2776f8..5aee9b8a 100644
--- a/src/views/collect/DealOrder.vue
+++ b/src/views/collect/DealOrder.vue
@@ -162,8 +162,8 @@
                   type="tel"
                   placeholder="请点击输入框进行扫码设置或者扫码录入"
                   v-model="scanCode"
-                  :disabled="scanDisabled"
                 ></el-input>
+                <!--                       :disabled="scanDisabled"-->
               </el-form-item>
             </el-col>
             <el-col :span="4">
@@ -171,7 +171,7 @@
                 <el-button
                   type="primary"
                   size="mini"
-                  icon="el-icon-plus"
+                  icon="el-icon-search"
                   @click.native.stop="addCode()"
                   style="margin-left: 15px"
                 >
@@ -193,6 +193,23 @@
             :dangerouslyUseHTMLString="true"
             :description="result">
           </el-alert>
+          <el-alert
+            v-if="warnVisible"
+            title="警告信息:"
+            type="warning"
+            :closable="true"
+            :dangerouslyUseHTMLString="true"
+            :description="warnResult">
+          </el-alert>
+          <el-alert
+            v-if="errVisible"
+            title="错误信息:"
+            type="warning"
+            :closable="true"
+            :dangerouslyUseHTMLString="true"
+            :description="errResult">
+          </el-alert>
+
 
         </div>
         <el-descriptions title="单据信息" :column="4" border style="margin-top: 15px">
@@ -354,14 +371,15 @@ import prescribeOriginPanel from "./PannelOrderBiz";
 import prescribeCodePanel from "./PanelOrderTagCode";
 import PannelOrderBiz from "./PannelOrderBiz";
 import {listPage} from "@/api/basic/workPlace/sysWorkplaceManage";
-import {enterCodeWeb} from "@/api/inout/order";
+import {batchVailCode, enterCodeWeb} from "@/api/inout/order";
 import {cancelOrder, draftOrder, finishOrder, startSplit, tagCode, updateOrder} from "@/api/collect/splitCreateOrder";
-import {selectCorpList} from "@/api/basic/basicUnitMaintain";
 import {getCurOrder, getNextOrder, findByBill, findFromCorp} from "@/api/collect/collectOrder";
 import PanelOrderAllDetail from "@/views/collect/PanelOrderAllDetail";
-import {getWorkBindBusTypes, removeBusTypeById} from '@/api/basic/workPlace/sysWorkplaceDocuments'
+import {getWorkBindBusTypes} from '@/api/basic/workPlace/sysWorkplaceDocuments'
 import {getInvListByUser} from "@/api/system/invWarehouse";
 import {orderbatchAddCode} from "@/api/inout/splitCode";
+import {isBlank} from "@/utils/strUtil";
+
 export default {
   /**
    * 处理处方
@@ -454,7 +472,11 @@ export default {
       invList: [],
       viewType: 1,
       scanDisabled: false,
-      valiCodes: []
+      valiCodes: [],
+      warnResult: "",
+      errResult: "",
+      warnVisible: false,
+      errVisible: false,
     }
   },
 
@@ -648,7 +670,6 @@ export default {
           this.filterQuery.code = response.data.code;
           this.scanCode = ""
           this.originCode = ""
-
           this.addCode();
         } else {
           if (response.code == 502) {
@@ -704,16 +725,19 @@ export default {
       });
     },
 
-    addCode() {
+    addCode(code) {
+      if (this.$isNotBlank(code)) {
+        this.filterQuery.code = code;
+      }
       if (this.$isBlank(this.filterQuery.code)) {
         this.filterQuery.code = this.scanCode.trim();
       }
       if (this.$isBlank(this.filterQuery.code) && this.$isBlank(this.scanCode)) {
         return;
       }
-      if (this.$isNotBlank(this.scanCode)) {
-        this.filterQuery.code = this.scanCode.trim();
-      }
+      // if (this.$isNotBlank(this.scanCode)) {
+      //   this.filterQuery.code = this.scanCode.trim();
+      // }
       let tagQuery = {
         workPlaceCode: this.formData.workPlaceCode,
         fromCorp: this.formData.fromCorp,
@@ -832,6 +856,7 @@ export default {
 
 
     updateOrder() {
+      this.formData.workPlaceCode = this.workplaceId;
       updateOrder(this.formData).then(res => {
         this.loading = false
       }).catch(() => {
@@ -888,15 +913,17 @@ export default {
             }).catch(() => {
             });
           } else if (temp.tagStatus === 2) {
-            this.$confirm('检测到当前工位存在正在处理单据,是否继续上一次单据处理?', '提示', {
-              confirmButtonText: '确定',
-              cancelButtonText: '取消',
-              type: 'warning'
-            }).then(() => {
-              this.formData = temp;
-              this.startDeal();
-            }).catch(() => {
-            });
+
+            this.formData = temp;
+            this.startDeal();
+            // this.$confirm('检测到当前工位存在正在处理单据,是否继续上一次单据处理?', '提示', {
+            //   confirmButtonText: '确定',
+            //   cancelButtonText: '取消',
+            //   type: 'warning'
+            // }).then(() => {
+            //
+            // }).catch(() => {
+            // });
           }
 
 
@@ -980,6 +1007,42 @@ export default {
         this.result = this.result + "\n" + message;
       }
     },
+
+    popupTip(data) {
+      this.$confirm(data.errMsg, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.formData.insert = true
+        this.addCode(data.code);
+      }).catch(() => {
+      });
+    },
+
+
+    async printMutiCodeResult(vailCodeResultResponses) {
+      this.warnVisible = false;
+      this.errVisible = false;
+      for (let i = 0; i < vailCodeResultResponses.length; i++) {
+        let data = vailCodeResultResponses[i]
+        if (data.status == 1)
+          this.result = this.result + ";" + vailCodeResultResponses[i].code;
+        else if (data.status == 2) {
+          this.warnResult = this.warnResult + "\n" + vailCodeResultResponses[i].code + ":" + vailCodeResultResponses[i].errMsg;
+        } else if (data.status == 3) {
+          this.result = this.result + "\n" + vailCodeResultResponses[i].code;
+          // this.warnResult = this.warnResult + "\n" + vailCodeResultResponses[i].code + ":" + vailCodeResultResponses[i].errMsg;
+          await this.popupTip(data)
+        }
+        // else
+        //   this.errResult = this.errResult + "\n" + vailCodeResultResponses[i].code + ":" + vailCodeResultResponses[i].errMsg;
+      }
+      if (!isBlank(this.warnResult))
+        this.warnVisible = true;
+      if (!isBlank(this.errResult))
+        this.errVisible = true;
+    },
     handleCommand(command) {
       // this.$message('click on item ' + command);
     },
@@ -1028,47 +1091,58 @@ export default {
     },
     //处理事件
     handleRecCodesEvent(event) {
-      console.log('接收 recCodes event:',event.detail.recCodes);
+      console.log('接收 recCodes event:', event.detail.recCodes);
       let params = {
-          codeList: event.detail.recCodes,
+        codeList: event.detail.recCodes,
       };
       //校验
       batchVailCode(params).then((res) => {
-          if (res.code === 20000) {
-            this.valiCodes = [];
-            console.log("==滴码接收==",res.data);
-            let list = res.data;
-            list.forEach(item => {
-              if (item.status === 1) {
-                  this.valiCodes.push(item.code);
+        if (res.code === 20000) {
+          this.valiCodes = [];
+          let list = res.data;
+          list.forEach(item => {
+            if (item.status === 1) {
+              this.valiCodes.push(item.code);
+            }
+          });
+          if (this.valiCodes != null && this.valiCodes.length > 0) {
+            //批量添加
+            let params2 = {
+              workPlaceCode: this.formData.workPlaceCode,
+              codeList: this.valiCodes,
+              fromCorp: this.formData.fromCorp,
+              billNo: this.formData.billNo,
+              insert: this.formData.insert,
+              busType: this.formData.busType,
+            }
+            orderbatchAddCode(params2).then((res) => {
+              if (res.code === 20000) {
+                this.formData.tagStatus = 2;
+                this.formData.insert = false;
+                this.curRow = this.formData;
+                this.$refs.inputRef.focus();
+                this.refreshCodesPanel(this);
+                this.printMutiCodeResult(res.data.vailCodeResultResponses)
+              } else {
+                this.$message.error(res.message)
               }
             });
-          }else{
-            this.$message.error(res.message)
-          }
-      });
-      if(this.valiCodes != null && this.valiCodes.length > 0){
-        //批量添加
-        let params2 = {
-          workPlaceCode:this.formData.workPlaceCode,
-          codeList:this.valiCodes
-        }
-        orderbatchAddCode(params2).then((res) => {
-          if (res.code === 20000) {
-            this.$message.success("添加成功")
-          }else{
-            this.$message.error(res.message)
+            this.scanCode = this.valiCodes.join(";");
           }
-        });
-          this.scanCode = this.valiCodes.join(";");
+
+        } else {
+          this.$message.error(res.message)
         }
+      });
+
     }
   },
   mounted() {
     this.$refs.inputRef.focus();
     //环境判断
-    if(window.navigator.userAgent.indexOf("GLXP_PC") != -1){
+    if (window.navigator.userAgent.indexOf("GLXP_PC") != -1) {
       this.scanDisabled = true;
+      window.removeEventListener('djcl', this.handleRecCodesEvent);
       window.addEventListener('djcl', this.handleRecCodesEvent);
     }
   },