gjy 3 years ago
parent
commit
ae9a7d0233

+ 9 - 6
src/layout/index/top/index.vue

@@ -21,13 +21,12 @@
       <!-- 使用租户 -->
       <!-- 使用租户 -->
       
       
       <div class="hidden-content">
       <div class="hidden-content">
-        <el-input ref="hiddenFocus" style ="ime-mode:disabled"  type="text" class="input-Style" v-model="barCode" size="small" @focus="focus" @blur="blur"
+        <el-input ref="hiddenFocus" type="password" class="input-Style" v-model="barCode" size="small" @focus="focus" @blur="blur" autocomplete="new-password"
           @keyup.enter.native="payCode" placeholder="扫码枪内容"></el-input>
           @keyup.enter.native="payCode" placeholder="扫码枪内容"></el-input>
         <div v-show="isOpenCodeGun" class="code-scan-text">扫码枪已连接</div>
         <div v-show="isOpenCodeGun" class="code-scan-text">扫码枪已连接</div>
         <div v-show="!isOpenCodeGun" @click="setCodeGun" class="code-scan-text">点我扫码</div>
         <div v-show="!isOpenCodeGun" @click="setCodeGun" class="code-scan-text">点我扫码</div>
         <!--  -->
         <!--  -->
-        <el-dialog title="扫描二维码" :visible.sync="smAlert" width="200px374a8a02ecfe40dc9abdcd902dd564f5
-        ">
+        <el-dialog title="扫描二维码" :visible.sync="smAlert"  :before-close="cancel">
           <div class="btn-list">
           <div class="btn-list">
             <el-button v-hasPermission="`acquisitionManagement.acquisitionQuality.initial`"
             <el-button v-hasPermission="`acquisitionManagement.acquisitionQuality.initial`"
                 v-if="btnStatus.status1||btnStatus.status2" @click="goToPage(1)" class="btn_css">去初检
                 v-if="btnStatus.status1||btnStatus.status2" @click="goToPage(1)" class="btn_css">去初检
@@ -46,7 +45,7 @@
               <el-button v-hasPermission="`acquisitionManagement.acquisitionWeight.weight`" 
               <el-button v-hasPermission="`acquisitionManagement.acquisitionWeight.weight`" 
                 v-if="btnStatus.status2||btnStatus.status3||btnStatus.status4||btnStatus.status5" @click="goToPage(6)" v-show="toPageData.qualityInspectionManagement.confirm != '1'" class="btn_css">去称皮重
                 v-if="btnStatus.status2||btnStatus.status3||btnStatus.status4||btnStatus.status5" @click="goToPage(6)" v-show="toPageData.qualityInspectionManagement.confirm != '1'" class="btn_css">去称皮重
               </el-button>
               </el-button>
-              <el-button @click="smAlert = false" class="btn" >关闭</el-button>
+              <el-button @click="cancel" class="btn" >关闭</el-button>
           </div>
           </div>
         </el-dialog>
         </el-dialog>
       </div>
       </div>
@@ -375,8 +374,7 @@
           number: _qualityNo,
           number: _qualityNo,
           warehouseId: _userHouseId
           warehouseId: _userHouseId
         }
         }
-         this.barCode = ''
-         debugger
+        //  this.barCode = ''
         //判断当前账号公司是否是二维码上公司
         //判断当前账号公司是否是二维码上公司
         if (this.userINfo.userCompany != _userCompId) {
         if (this.userINfo.userCompany != _userCompId) {
           this.$message.error('当前身份不可操作');
           this.$message.error('当前身份不可操作');
@@ -386,6 +384,10 @@
         this.getLook(this.cangid, this.userINfo.userName)
         this.getLook(this.cangid, this.userINfo.userName)
         
         
       },
       },
+      cancel(){
+         this.barCode = ''
+        this.smAlert = false
+      },
       // 查看二维码仓库负责人
       // 查看二维码仓库负责人
       async getLook(compId, userName) {
       async getLook(compId, userName) {
         await getLook({
         await getLook({
@@ -449,6 +451,7 @@
         this.isOpenCodeGun = false
         this.isOpenCodeGun = false
       },
       },
       goToPage(type) {
       goToPage(type) {
+         this.barCode = ''
         let _url = ''
         let _url = ''
         if (type === 1) {
         if (type === 1) {
 // this.toPageData 
 // this.toPageData 

+ 26 - 26
src/views/home/index.vue

@@ -359,22 +359,22 @@
     },
     },
     async mounted() {
     async mounted() {
       var staffId=JSON.parse(localStorage.getItem('winseaview-userInfo')).content.staffId
       var staffId=JSON.parse(localStorage.getItem('winseaview-userInfo')).content.staffId
-      getAdminId().toPromise().then(response => {console.log(11111)})
-                this.loading = false
-                // WebSocket
-                // this.$store.dispatch('setAdminId', response.data.data)
-                if ('WebSocket' in window) {
-                  if (process.env.NODE_ENV === 'production') {
-                    this.websocket = new WebSocket('wss://www.zthymaoyi.com/wss/websocket/'+staffId )
-                  }
-                  else {
-                    //  this.websocket = new WebSocket('ws://192.168.1.115:8090/commonUser/api/onOpen?adminId=84f62127b7384dcdbaeaddfe460329fc' )
-                    this.websocket = new WebSocket('ws://192.168.1.115:8090/websocket/'+staffId )
-                  }
-                  this.initWebSocket()
-                } else {
-                  alert('当前浏览器不支持websocket')
-                }
+      // getAdminId().toPromise().then(response => {console.log(11111)})
+      this.loading = false
+      // WebSocket
+      // this.$store.dispatch('setAdminId', response.data.data)
+      if ('WebSocket' in window) {
+        if (process.env.NODE_ENV === 'production') {
+          this.websocket = new WebSocket('wss://www.zthymaoyi.com/wss/websocket/'+staffId )
+        }
+        else {
+          //  this.websocket = new WebSocket('ws://192.168.1.115:8090/commonUser/api/onOpen?adminId=84f62127b7384dcdbaeaddfe460329fc' )
+          this.websocket = new WebSocket('ws://192.168.1.119:9100/websocket/'+staffId )
+        }
+        this.initWebSocket()
+      } else {
+        alert('当前浏览器不支持websocket')
+      }
               
               
       let that = this
       let that = this
       this.getChartsData()
       this.getChartsData()
@@ -500,15 +500,15 @@
       contract(index){
       contract(index){
          if(index == 0){
          if(index == 0){
             this.$router.push({
             this.$router.push({
-              name:"buyContract"
+              name:'buyContract'
             })
             })
           }else if(index == 1){
           }else if(index == 1){
             this.$router.push({
             this.$router.push({
-              name:"salesContract"
+              name:'salesContract'
             })
             })
           }else if(index == 3){
           }else if(index == 3){
             this.$router.push({
             this.$router.push({
-              name:"warehouseManagementList"
+              name:'warehouseManagementList'
             })
             })
           }
           }
       },
       },
@@ -551,11 +551,11 @@
               data = [{
               data = [{
                 name: '已完成量',
                 name: '已完成量',
                 value: this.chartsData[i].biViewInfoList[0].count,
                 value: this.chartsData[i].biViewInfoList[0].count,
-                type:"采购合同"
+                type:'采购合同'
               }, {
               }, {
                 name: '待完成量',
                 name: '待完成量',
                 value: this.chartsData[i].biViewInfoList[1].count,
                 value: this.chartsData[i].biViewInfoList[1].count,
-                type:"采购合同"
+                type:'采购合同'
               }]
               }]
               text = '合同总量'
               text = '合同总量'
               formatter = '{b}{c}吨 </br> 占比{d}%'
               formatter = '{b}{c}吨 </br> 占比{d}%'
@@ -569,11 +569,11 @@
               data = [{
               data = [{
                 name: '已开票',
                 name: '已开票',
                 value: this.chartsData[i].biViewInfoList[0].count,
                 value: this.chartsData[i].biViewInfoList[0].count,
-                type:"采购合同"
+                type:'采购合同'
               }, {
               }, {
                 name: '待开票',
                 name: '待开票',
                 value: this.chartsData[i].biViewInfoList[1].count,
                 value: this.chartsData[i].biViewInfoList[1].count,
-                type:"采购合同"
+                type:'采购合同'
               }]
               }]
               text = '合同总额'
               text = '合同总额'
               formatter = '{b}{c}元 </br> 占比{d}%'
               formatter = '{b}{c}元 </br> 占比{d}%'
@@ -586,11 +586,11 @@
               data = [{
               data = [{
                 name: '已付款',
                 name: '已付款',
                 value: this.chartsData[i].biViewInfoList[0].count,
                 value: this.chartsData[i].biViewInfoList[0].count,
-                type: "采购合同"
+                type: '采购合同'
               }, {
               }, {
                 name: '待付款',
                 name: '待付款',
                 value: this.chartsData[i].biViewInfoList[1].count,
                 value: this.chartsData[i].biViewInfoList[1].count,
-                   type: "采购合同"
+                   type: '采购合同'
               }]
               }]
               text = '合同总额'
               text = '合同总额'
               formatter = '{b}{c}元 </br> 占比{d}%'
               formatter = '{b}{c}元 </br> 占比{d}%'
@@ -603,7 +603,7 @@
               data = [{
               data = [{
                 name: '已完成量',
                 name: '已完成量',
                 value: this.chartsData[i].biViewInfoList[0].count,
                 value: this.chartsData[i].biViewInfoList[0].count,
-                  type: "销售合同"
+                  type: '销售合同'
               }, {
               }, {
                 name: '待完成量',
                 name: '待完成量',
                 value: this.chartsData[i].biViewInfoList[1].count
                 value: this.chartsData[i].biViewInfoList[1].count

+ 3 - 3
src/views/taskManagement/tranManagementWarehouseInOutTaskAdd.vue

@@ -32,7 +32,7 @@
 				<el-form ref="dataList" :model="dataList" label-width="140px" input-width="300px">
 				<el-form ref="dataList" :model="dataList" label-width="140px" input-width="300px">
 					<!-- 仓库名 -->
 					<!-- 仓库名 -->
 					<el-form-item label="仓库名">
 					<el-form-item label="仓库名">
-						<el-select v-model="dataList.warehouseName" placeholder="请选择仓库名" class="typeselect"
+						<el-select v-model="dataList.warehouseName" placeholder="请选择仓库名" class="typeselect"  filterable  clearable
 							@change="selectwarehouseName">
 							@change="selectwarehouseName">
 							<el-option v-for="item in warehouseNameList" :key="item.constKey"
 							<el-option v-for="item in warehouseNameList" :key="item.constKey"
 								:label="item.warehouseName" :value="item.id" />
 								:label="item.warehouseName" :value="item.id" />
@@ -136,7 +136,7 @@
 				<el-form v-if="!deletetask" ref="form" :model="form" label-width="140px">
 				<el-form v-if="!deletetask" ref="form" :model="form" label-width="140px">
 					<!-- 仓库名 -->
 					<!-- 仓库名 -->
 					<el-form-item label="仓库名">
 					<el-form-item label="仓库名">
-						<el-select v-model="dataList1.warehouseName" placeholder="请选择仓库名" class="typeselect"
+						<el-select v-model="dataList1.warehouseName" placeholder="请选择仓库名" class="typeselect" filterable  clearable
 							@change="selectwarehouseName1">
 							@change="selectwarehouseName1">
 							<el-option v-for="item in warehouseNameList" :key="item.constKey"
 							<el-option v-for="item in warehouseNameList" :key="item.constKey"
 								:label="item.warehouseName" :value="item.id" />
 								:label="item.warehouseName" :value="item.id" />
@@ -243,7 +243,7 @@
 				<el-form ref="dataList" :model="dataList" label-width="140px">
 				<el-form ref="dataList" :model="dataList" label-width="140px">
 					<!-- 仓库名 -->
 					<!-- 仓库名 -->
 					<el-form-item label="仓库名">
 					<el-form-item label="仓库名">
-						<el-select v-model="dataList.warehouseName" placeholder="请选择仓库名" class="typeselect"
+						<el-select v-model="dataList.warehouseName" placeholder="请选择仓库名" class="typeselect" filterable  clearable
 							@change="selectwarehouseName">
 							@change="selectwarehouseName">
 							<el-option v-for="item in warehouseNameList" :key="item.constKey"
 							<el-option v-for="item in warehouseNameList" :key="item.constKey"
 								:label="item.warehouseName" :value="item.id" />
 								:label="item.warehouseName" :value="item.id" />