Ver código fonte

Merge branch 'dev' of http://47.100.3.209:3000/gdc/yiliangyiyun-pc into dev

zhongtianhaoyuan 3 anos atrás
pai
commit
c710d6efaa

+ 14 - 3
src/views/houseSelfCollect/acquisitionManagementAdd.vue

@@ -14,7 +14,7 @@
         <div class="row1">
           <div class="grid-content">
             <el-form-item label="货名">
-              <el-select v-model="selectVal" placeholder="请选择" @change="goodsChange" :disabled="!isEdit" filterable clearable>
+              <el-select v-model="selectVal" placeholder="请选择" @change="goodsChange" :disabled="!isEdit" filterable clearable ref="elSelect">
                 <el-option v-for="item in goodnameList" :key="item.constValue" :label="item.constValue"
                   :value="item.constValue">
                 </el-option>
@@ -256,6 +256,7 @@
         checkList4: []
       }
     },
+
     activated() {
       // 货名
       let _goodsNameList = []
@@ -380,8 +381,17 @@
           break
       }
     },
-    mounted() {},
+     mounted() {
+         if (window.history && window.history.pushState) {
+             history.pushState(null, null, document.URL);
+             window.addEventListener("popstate", this.onCloseGoodSelect, false);
+         }
+     },
     methods: {
+      //修改点击浏览器返回还显示下拉菜单为题
+      onCloseGoodSelect(){
+        this.$refs.elSelect.blur()
+      },
       paramTypeChange(e){
         // this.makeTableList()
       },
@@ -678,6 +688,7 @@
         let that = this
 
         function _baseWaterValidate(min, max, saveNum, point, type, inputVal) {
+          console.log(min, max, saveNum, point, type, inputVal)
           let _val1 = inputVal
           let _pointVal1 = _val1.toString().split('.')[1]
           if (_pointVal1 == undefined) _pointVal1 = 0
@@ -1012,7 +1023,7 @@
               }
 
             _list.push(_obj)
-            console.log('_list', _list)
+            // console.log('_list', _list)
 
           }
         }

+ 47 - 24
src/views/houseSelfCollect/inspectionManagementNew.vue

@@ -431,6 +431,7 @@
         fleetNameList:[],
         outContractNo:[],
         carNumberList:[],
+        warehouseTradeCount:0,
         options1:[],
         editcar:false,
         isGetCost:'',
@@ -781,16 +782,16 @@
                     titleNo:'',
                     titleNoOther:'',
                   }
+                  var count=''
                   if(this.serviceManagementType==3){
-                    var count=''
-                    if(this.warehouseCount<10){
-                      count='000'+(this.warehouseCount+1)
+                    if(this.warehouseTradeCount<10){
+                      count='000'+(this.warehouseTradeCount+1)
                     }
-                    if(this.warehouseCount<100&&this.warehouseCount>=10){
-                      count='00'+(this.warehouseCount+1)
+                    if(this.warehouseTradeCount<100&&this.warehouseTradeCount>=10){
+                      count='00'+(this.warehouseTradeCount+1)
                     }
-                    if(this.warehouseCount<1000&&this.warehouseCount>=100){
-                      count='0'+(this.warehouseCount+1)
+                    if(this.warehouseTradeCount<1000&&this.warehouseTradeCount>=100){
+                      count='0'+(this.warehouseTradeCount+1)
                     }
                     this.deptBudgetList.qualityNo='SGRK'+this.getTime()+this.warehouseNo+count
                   }
@@ -869,14 +870,14 @@
               }
                if(this.serviceManagementType==3){
                     var count=''
-                    if(this.warehouseCount<10){
-                      count='000'+(this.warehouseCount+1)
+                    if(this.warehouseTradeCount<10){
+                      count='000'+(this.warehouseTradeCount+1)
                     }
-                    if(this.warehouseCount<100&&this.warehouseCount>=10){
-                      count='00'+(this.warehouseCount+1)
+                    if(this.warehouseTradeCount<100&&this.warehouseTradeCount>=10){
+                      count='00'+(this.warehouseTradeCount+1)
                     }
-                    if(this.warehouseCount<1000&&this.warehouseCount>=100){
-                      count='0'+(this.warehouseCount+1)
+                    if(this.warehouseTradeCount<1000&&this.warehouseTradeCount>=100){
+                      count='0'+(this.warehouseTradeCount+1)
                     }
                     this.deptBudgetList.qualityNo='SGRK'+this.getTime()+this.warehouseNo+count
                   }
@@ -1027,14 +1028,14 @@
         }
         if(this.serviceManagementType==3){
           var count=''
-          if(this.warehouseCount<10){
-            count='000'+(this.warehouseCount+1)
+          if(this.warehouseTradeCount<10){
+            count='000'+(this.warehouseTradeCount+1)
           }
-          if(this.warehouseCount<100&&this.warehouseCount>=10){
-            count='00'+(this.warehouseCount+1)
+          if(this.warehouseTradeCount<100&&this.warehouseTradeCount>=10){
+            count='00'+(this.warehouseTradeCount+1)
           }
-           if(this.warehouseCount<1000&&this.warehouseCount>=100){
-            count='0'+(this.warehouseCount+1)
+           if(this.warehouseTradeCount<1000&&this.warehouseTradeCount>=100){
+            count='0'+(this.warehouseTradeCount+1)
           }
           this.deptBudgetList.qualityNo='SGRK'+this.getTime()+this.warehouseNo+count
         }
@@ -1702,7 +1703,10 @@
                       if (this.reader) {
                         this.reader.cancel()
                       }
-                      this.warehouseCount+=1
+                      if(this.serviceManagementType==3){
+                        this.warehouseTradeCount+=1
+                      }
+                      
                       this.$message.success('添加成功')
                       this.getList()
                       // this.$router.push({
@@ -1937,6 +1941,7 @@
             for (let i = 0; i < response.length; i++) {
               if (_wareHouse && response[i].warehouseName == _wareHouse.value) {
                 this.warehouseCount = response[i].count
+                this.warehouseTradeCount = response[i].tradeCount
                 this.allowEdit = response[i].allowEdit
                 this.cangid = _wareHouse.warehouseId
                 this.warehouseName = response[i].warehouseName
@@ -1947,6 +1952,7 @@
                 value: response[i].warehouseName,
                 warehouseId: response[i].id,
                 count: response[i].count,
+                tradeCount : response[i].tradeCount,
                 No: response[i].commonWarehouseNo,
                 allowEdit: response[i].allowEdit,
                 compId: localStorage.getItem('ws-pf_compId')
@@ -1955,12 +1961,14 @@
                 if (this.cangid && this.cangid == response[i].id) {
                   this.warehouseName = response[i].warehouseName
                   this.warehouseCount = response[i].count
+                  this.warehouseTradeCount = response[i].tradeCount
                   this.warehouseNo = response[i].commonWarehouseNo
                   this.allowEdit = response[i].allowEdit
                 }
                 if (this.warehouseList.length > 0 && !this.cangid) {
                   this.warehouseName = this.warehouseList[0].value
                   this.warehouseCount = this.warehouseList[0].count
+                  this.warehouseTradeCount = this.warehouseList[0][0].tradeCount
                   this.warehouseNo = this.warehouseList[0].No
                   this.cangid = this.warehouseList[0].warehouseId
                   this.allowEdit = this.warehouseList[0].allowEdit
@@ -1989,8 +1997,8 @@
         this.serviceManagementType=status
         if(status==3){
           //解决冲突别解决没了(注意)
-          this.warehouseCount = '000' + Number(this.warehouseCount + 1)
-          this.deptBudgetList.qualityNo='SGRK'+this.getTime()+this.warehouseNo+this.warehouseCount.substring(this.warehouseCount.length - 4)
+          this.warehouseTradeCount = '000' + Number(this.warehouseTradeCount + 1)
+          this.deptBudgetList.qualityNo='SGRK'+this.getTime()+this.warehouseNo+this.warehouseTradeCount.substring(this.warehouseTradeCount.length - 4)
         }
         this.getList()
       },
@@ -2040,7 +2048,8 @@
             if (this.outContractNo[i].inOutType == '采购入库') {
               this.customerName=this.carNumberList[e].buyer
               this.customerPhone=this.carNumberList[e].buyerPhone
-              this.deptBudgetList.qualityNo='CGRK'+this.getTime()+this.warehouseNo+this.warehouseCount
+              this.warehouseCount = '000' + Number(this.warehouseCount + 1)
+              this.deptBudgetList.qualityNo='CGRK'+this.getTime()+this.warehouseNo+this.warehouseCount.substring(this.warehouseCount.length - 4)
               if (!this.outContractNo[i].unitContractPrice) {
                 this.deptBudgetList.tips = '卖方' + this.outContractNo[i].seller
               } else {
@@ -2049,7 +2058,8 @@
               this.deptBudgetList.inOutTypeKey = 1
             } else if (this.outContractNo[i].inOutType == '移库入库') {
               this.customerName=localStorage.getItem('ws-pf_compName')
-              this.deptBudgetList.qualityNo='YKRK'+this.getTime()+this.warehouseNo+this.warehouseCount
+                this.warehouseCount = '000' + Number(this.warehouseCount + 1)
+              this.deptBudgetList.qualityNo='YKRK'+this.getTime()+this.warehouseNo+this.warehouseCount.substring(this.warehouseCount.length - 4)
               this.deptBudgetList.goodsName = data.goodsName
               this.deptBudgetList.goodsNameKey = data.goodsNameKey
               this.deptBudgetList.grade = data.grade
@@ -2186,6 +2196,19 @@
           titleNo:'',
           titleNoOther:'',
         }
+        if(this.serviceManagementType==3){
+                    var count=''
+                    if(this.warehouseTradeCount<10){
+                      count='000'+(this.warehouseTradeCount+1)
+                    }
+                    if(this.warehouseTradeCount<100&&this.warehouseTradeCount>=10){
+                      count='00'+(this.warehouseTradeCount+1)
+                    }
+                    if(this.warehouseTradeCount<1000&&this.warehouseTradeCount>=100){
+                      count='0'+(this.warehouseTradeCount+1)
+                    }
+                    this.deptBudgetList.qualityNo='SGRK'+this.getTime()+this.warehouseNo+count
+                  }
               this.getList()
           }
         }

+ 5 - 1
src/views/outboundManagement/newQualityInspectionManagement.vue

@@ -161,7 +161,7 @@
       <!-- <inspectInfoPrint :printData="printData"></inspectInfoPrint> -->
       <outInspectPrint :printData="printData" ref="saveImg"></outInspectPrint>
       <div style="text-align:center">
-        <el-button type="primary" @click="isShowPrint = false">关闭</el-button>
+        <el-button type="primary" @click="printclose">关闭</el-button>
         <el-button type="primary" @click="printSmall">打印小票</el-button>
         <el-button type="primary" @click="printBig">打印单据</el-button>
       </div>
@@ -272,6 +272,10 @@
         })
     },
     methods: {
+      printclose(){
+        this.isShowPrint = false
+        this.getList()
+      },
       printSmall(){
         this.inspect.type = 1
         localStorage.setItem('out-Warehouse_print',JSON.stringify( this.inspect))

+ 22 - 17
src/views/outboundManagement/weighingManagementNew.vue

@@ -750,14 +750,13 @@
 					this.weighingList.baseId=this.warehouseId
 					this.weighingList.skinInspector = localStorage.getItem('ws-pf_staffName')
 					if(this.weighingList.id){
-						tareEdit(this.weighingList)
+						addstorageputList(this.weighingList)
 						.toPromise()
 						.then((response) => {
-							
-							addstorageputList(this.weighingList)
+							this.weighingList.warehouseInOutId=response
+							tareEdit(this.weighingList)
 							.toPromise()
 							.then((response) => {
-								
 								getweighing({id:this.weighingList.id})
 								toPromise()
 								.then((response) => {
@@ -769,6 +768,7 @@
 										message: '提交成功',
 									})
 									this.getList()
+									this.warehouseCount+=1
 									this.weighingList.grossWeight=this.weighingList.grossWeight*1000
 									this.weighingList.tare=this.weighingList.tare*1000
 									this.weighingList.netWeight=this.weighingList.netWeight*1000
@@ -802,19 +802,25 @@
 								})
 							})
 						})
-						.catch((response) => {})
+						.catch((response) => {
+							this.$notify.warning(response)
+						})
 					}else{
 						this.weighingList.relationId = this.relationId
 						this.weighingList.warehouseId = this.warehouseId
 						this.weighingList.baseId=this.warehouseId
 						// console.log(this.weighingList)
+						addstorageputList(this.weighingList)
+						.toPromise()
+						.then((response) => {
+						this.weighingList.warehouseInOutId=response
 						tareAdd(this.weighingList)
 						.toPromise()
 						.then((response) => {
-						getweighing({id:response})
+							getweighing({id:response})
 								.toPromise()
 								.then((response) => {
-									
+									this.warehouseCount+=1
 									this.weighingList.grossWeight=this.weighingList.grossWeight*1000
 									this.weighingList.tare=this.weighingList.tare*1000
 									this.weighingList.netWeight=this.weighingList.netWeight*1000
@@ -823,9 +829,7 @@
 									this.isShowPrint=true
 									
 								})
-						addstorageputList(this.weighingList)
-						.toPromise()
-						.then((response) => {
+						
 							if (this.reader) {
 									this.reader.cancel()
 									}
@@ -905,13 +909,12 @@
 					this.weighingList.secretaryWeigher = localStorage.getItem('ws-pf_staffName')
 					this.weighingList.warehouseId = this.warehouseId
 					this.weighingList.baseId=this.warehouseId
-					grossWeight(this.weighingList)
+					addstorageputList(this.weighingList).toPromise()
+					.then((response) => {
+						this.weighingList.warehouseInOutId=response
+						grossWeight(this.weighingList)
 						.toPromise()
 						.then((response) => {
-							
-							addstorageputList(this.weighingList)
-							.toPromise()
-							.then((response) => {
 								if (this.reader) {
 									this.reader.cancel()
 								}
@@ -1196,7 +1199,8 @@
 						this.weighingList.grade = this.outContractNo[i].grade
 						this.weighingList.inOutType = this.outContractNo[i].inOutType
 					if (this.outContractNo[i].inOutType == '销售出库') {
-						this.weighingList.number='XSCK'+this.getTime()+this.warehouseNo+this.warehouseCount
+						this.warehouseCount = '000' + Number(this.warehouseCount + 1)
+						this.weighingList.number='XSCK'+this.getTime()+this.warehouseNo+this.warehouseCount.substring(this.warehouseCount.length - 4)
 						this.weighingList.buyer = this.outContractNo[i].buyer
 						this.weighingList.seller = localStorage.getItem('ws-pf_compName')
 						if (!this.outContractNo[i].unitContractPrice) {
@@ -1207,7 +1211,8 @@
 						}
 						this.weighingList.inOutTypeKey = 1
 					} else if (this.outContractNo[i].inOutType == '移库出库') {
-						this.weighingList.number='YKCK'+this.getTime()+this.warehouseNo+this.warehouseCount
+						this.warehouseCount = '000' + Number(this.warehouseCount + 1)
+						this.weighingList.number='YKCK'+this.getTime()+this.warehouseNo+this.warehouseCount.substring(this.warehouseCount.length - 4)
 						this.weighingList.buyer = this.outContractNo[i].receiveWarehouse
 						this.weighingList.seller = this.outContractNo[i].sendWarehouse
 						this.weighingList.goodsName = data.goodsName

+ 2 - 2
src/views/taskManagement/tranManagementWarehouseInOutTask.vue

@@ -96,9 +96,9 @@
 
             <span class="corles" v-hasPermission="
                 `warehouseManagement.warehouse.warehouseInfoTask.audit`
-              " v-if="scope.row.taskStatus == '待审核'" @click="audit(scope.row)">审核</span>
+              " v-if="scope.row.taskStatus == '待审核'&&scope.row.taskId" @click="audit(scope.row)">审核</span>
             <el-divider direction="vertical" class="divider" v-if="
-                scope.row.taskStatus == '待审核' ||
+                scope.row.taskStatus == '待审核'&&scope.row.taskId ||
                 scope.row.taskStatus == '执行中' ||
                 scope.row.taskStatus == '已驳回'
               "></el-divider>