Explorar o código

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-pc

gjy %!s(int64=2) %!d(string=hai) anos
pai
achega
e34ceb9ea3

+ 2 - 0
src/api/V2/houseSelfCollect/index.js

@@ -120,4 +120,6 @@ export const API_POST_CHANE_NO = `/weighingManagement/api/changeWarehouse`
 export const API_GET_CONTRACT ='/contractManagementInfo/getInContract'
 export const API_GET_CONTRACT ='/contractManagementInfo/getInContract'
 // 发起人撤回
 // 发起人撤回
 export const API_SPONSOR_WITHDRAW ='/newWorkflow/api/stopInstance'
 export const API_SPONSOR_WITHDRAW ='/newWorkflow/api/stopInstance'
+// 获取仓库id
+export const API_GET_BASEID ='/qualityInspectionManagement/selectBaseId'
 
 

+ 28 - 4
src/layout/index/top/index.vue

@@ -219,7 +219,8 @@
     getLook
     getLook
   } from '@/model/warehouse/index'
   } from '@/model/warehouse/index'
   import {
   import {
-    getQRCodeData
+    getQRCodeData,
+    getBaseId
   } from '@/model/houseSelfCollect/index'
   } from '@/model/houseSelfCollect/index'
 
 
 
 
@@ -414,6 +415,9 @@
         if(_userCompId.indexOf(',') != -1){
         if(_userCompId.indexOf(',') != -1){
          _userCompId =  _userCompId.split(',')[1]
          _userCompId =  _userCompId.split(',')[1]
         }
         }
+        if(!_userHouseId){
+          this.obtainBaseId(_userCompId,_qualityNo)
+        }
         this.tmp = {
         this.tmp = {
           compId: _userCompId,
           compId: _userCompId,
           number: _qualityNo,
           number: _qualityNo,
@@ -421,7 +425,6 @@
         }
         }
         //  this.barCode = ''
         //  this.barCode = ''
         //判断当前账号公司是否是二维码上公司
         //判断当前账号公司是否是二维码上公司
-        debugger
         if (this.userINfo.userCompany != _userCompId) {
         if (this.userINfo.userCompany != _userCompId) {
           console.log('请切换公司在试!')
           console.log('请切换公司在试!')
           this.$message.error('当前身份不可操作');
           this.$message.error('当前身份不可操作');
@@ -429,8 +432,9 @@
           return
           return
         }
         }
         //判断二维码上的仓库当前账号是否有权限操作
         //判断二维码上的仓库当前账号是否有权限操作
-        this.getLook(this.cangid,localStorage.getItem('ws-pf_staffName'))
-        
+        if(this.cangid){
+          this.getLook(this.cangid,localStorage.getItem('ws-pf_staffName'))
+        }
       },
       },
       compNameChange(){
       compNameChange(){
       //   this.complogin({username:this.UserInfo.loginInfo.userMobilePhone,
       //   this.complogin({username:this.UserInfo.loginInfo.userMobilePhone,
@@ -578,6 +582,26 @@
             
             
           })
           })
       },
       },
+      //根据公司id、业务编号,获取仓库id
+      async obtainBaseId(compId, qualityNo){
+        await getBaseId({
+            compId: compId,
+            qualityNo: qualityNo,
+          })
+          .toPromise()
+          .then((response) => {
+             this.warehouseId = response.baseId
+             this.cangid = response.baseId
+             this.getLook(this.cangid,localStorage.getItem('ws-pf_staffName'))
+            this.tmp = {
+              compId: compId,
+              number: qualityNo,
+              warehouseId: this.warehouseId
+            }
+            // debugger
+            // this.getQRCodeData(this.tmp)
+          })
+      },
       // 二维码获取数据
       // 二维码获取数据
       async getQRCodeData(tmp) {
       async getQRCodeData(tmp) {
         await getQRCodeData(tmp)
         await getQRCodeData(tmp)

+ 4 - 1
src/model/houseSelfCollect/index.js

@@ -62,7 +62,8 @@ import {
   API_POST_CHANE_NO,
   API_POST_CHANE_NO,
   API_POST_DELETE,
   API_POST_DELETE,
   API_GET_CONTRACT,
   API_GET_CONTRACT,
-  API_SPONSOR_WITHDRAW
+  API_SPONSOR_WITHDRAW,
+  API_GET_BASEID
 } from '@/api/V2/houseSelfCollect'
 } from '@/api/V2/houseSelfCollect'
 //客户管理列表
 //客户管理列表
 export const getCustomerManage = appRx.get(API_GET_CUSTOMER_MANAGE, errorCatcher, errorHandle, filter)
 export const getCustomerManage = appRx.get(API_GET_CUSTOMER_MANAGE, errorCatcher, errorHandle, filter)
@@ -188,3 +189,5 @@ export const changeNo = appRx.post(API_POST_CHANE_NO, errorCatcher, errorHandle,
 export const getcontract = appRx.get(API_GET_CONTRACT, errorCatcher, errorHandle, filter)
 export const getcontract = appRx.get(API_GET_CONTRACT, errorCatcher, errorHandle, filter)
 // 发起人撤回
 // 发起人撤回
 export const sponsorWithdraw = appRx.post(API_SPONSOR_WITHDRAW, errorCatcher, errorHandle, filter)
 export const sponsorWithdraw = appRx.post(API_SPONSOR_WITHDRAW, errorCatcher, errorHandle, filter)
+// 获取仓库id
+export const getBaseId = appRx.get(API_GET_BASEID, errorCatcher, errorHandle, filter)

+ 5 - 4
src/views/houseSelfCollect/settlement.vue

@@ -114,7 +114,7 @@
             </ws-form-item>
             </ws-form-item>
             <ws-form-item v-if='paymentList.type=="潮粮"' label="干粮水分(%)" span="1" prop="waterContent">
             <ws-form-item v-if='paymentList.type=="潮粮"' label="干粮水分(%)" span="1" prop="waterContent">
               <ws-input type="number" @mousewheel.native.prevent
               <ws-input type="number" @mousewheel.native.prevent
-                v-model="paymentList.qualityInspectionManagement.waterMin" placeholder="请输入干粮水分" maxlength="100"
+                v-model="ganwater" placeholder="请输入干粮水分" maxlength="100"
                 size="small" disabled />
                 size="small" disabled />
             </ws-form-item>
             </ws-form-item>
             <ws-form-item v-if='paymentList.type=="潮粮" && paymentList.qualityInspectionManagement.paramType == "1"'
             <ws-form-item v-if='paymentList.type=="潮粮" && paymentList.qualityInspectionManagement.paramType == "1"'
@@ -130,7 +130,7 @@
             <ws-form-item v-if='paymentList.type=="潮粮" && paymentList.qualityInspectionManagement.paramType != 1'
             <ws-form-item v-if='paymentList.type=="潮粮" && paymentList.qualityInspectionManagement.paramType != 1'
               label="掉水(%)" span="1" prop="waterContent">
               label="掉水(%)" span="1" prop="waterContent">
               <ws-input type="number" @mousewheel.native.prevent
               <ws-input type="number" @mousewheel.native.prevent
-                v-model="paymentList.qualityInspectionManagement.waterContent-paymentList.qualityInspectionManagement.waterMin"
+                v-model="paymentList.qualityInspectionManagement.waterContent-ganwater"
                 placeholder="请输入掉水" maxlength="100" size="small" disabled />
                 placeholder="请输入掉水" maxlength="100" size="small" disabled />
             </ws-form-item>
             </ws-form-item>
             <ws-form-item v-if='paymentList.type=="潮粮" && paymentList.qualityInspectionManagement.paramType != 1'
             <ws-form-item v-if='paymentList.type=="潮粮" && paymentList.qualityInspectionManagement.paramType != 1'
@@ -305,6 +305,7 @@
           },
           },
           unitDeduction: 0
           unitDeduction: 0
         },
         },
+        ganwater:14,
         disabled: false,
         disabled: false,
         types: '',
         types: '',
         isShowPrint: false,
         isShowPrint: false,
@@ -400,7 +401,7 @@
           this.paymentList.tidalGrainPrice = this.paymentList.tidalGrainPrice.toFixed(4)
           this.paymentList.tidalGrainPrice = this.paymentList.tidalGrainPrice.toFixed(4)
           if (this.paymentList.qualityInspectionManagement.paramType == '2') {
           if (this.paymentList.qualityInspectionManagement.paramType == '2') {
             this.paymentList.qualityInspectionManagement.weightDeduction = (this.paymentList
             this.paymentList.qualityInspectionManagement.weightDeduction = (this.paymentList
-                .qualityInspectionManagement.waterContent - this.paymentList.qualityInspectionManagement.waterMin) *
+                .qualityInspectionManagement.waterContent - 14) *
               this.paymentList.buckleWeightRatio
               this.paymentList.buckleWeightRatio
             this.paymentList.qualityInspectionManagement.weightDeduction = this.paymentList
             this.paymentList.qualityInspectionManagement.weightDeduction = this.paymentList
               .qualityInspectionManagement.weightDeduction.toFixed(2)
               .qualityInspectionManagement.weightDeduction.toFixed(2)
@@ -686,7 +687,7 @@
       buckleWeightRatiochange(e) {
       buckleWeightRatiochange(e) {
         if (this.paymentList.buckleWeightRatio >= 0 && this.paymentList.buckleWeightRatio <= 2) {
         if (this.paymentList.buckleWeightRatio >= 0 && this.paymentList.buckleWeightRatio <= 2) {
           this.paymentList.qualityInspectionManagement.weightDeduction = (this.paymentList.qualityInspectionManagement
           this.paymentList.qualityInspectionManagement.weightDeduction = (this.paymentList.qualityInspectionManagement
-              .waterContent - this.paymentList.qualityInspectionManagement.waterMin) * this.paymentList
+              .waterContent - 14) * this.paymentList
             .buckleWeightRatio
             .buckleWeightRatio
           this.paymentList.qualityInspectionManagement.weightDeduction = this.paymentList.qualityInspectionManagement
           this.paymentList.qualityInspectionManagement.weightDeduction = this.paymentList.qualityInspectionManagement
             .weightDeduction.toFixed(2)
             .weightDeduction.toFixed(2)

+ 2 - 2
src/views/warehousenew/warehousingOrder.vue

@@ -1029,7 +1029,7 @@ export default {
     },
     },
     payout(item) {
     payout(item) {
       console.log(item)
       console.log(item)
-      if (localStorage.getItem('ws-pf_roleName') == '销售内勤' || localStorage.getItem('ws-pf_roleName') == '采购内勤') {
+      if (localStorage.getItem('ws-pf_roleName') == '销售内勤' || localStorage.getItem('ws-pf_roleName') == '采购内勤'||localStorage.getItem('ws-pf_roleName').indexOf('专员')> -1) {
         if (Object.keys(this.multipleSelection1).length != 0 && this.multipleSelection1[item.id].length > 0) {
         if (Object.keys(this.multipleSelection1).length != 0 && this.multipleSelection1[item.id].length > 0) {
           for (let i = 0; i < this.multipleSelection1[item.id].length; i++) {
           for (let i = 0; i < this.multipleSelection1[item.id].length; i++) {
             if (item.warehouseName == this.multipleSelection1[item.id][i].warehouseName) {
             if (item.warehouseName == this.multipleSelection1[item.id][i].warehouseName) {
@@ -1357,7 +1357,7 @@ export default {
       //   })
       //   })
     },
     },
     selectInit(row, index) {
     selectInit(row, index) {
-      if (localStorage.getItem('ws-pf_roleName') == '销售内勤' || localStorage.getItem('ws-pf_roleName') == '采购内勤') {
+      if (localStorage.getItem('ws-pf_roleName') == '销售内勤' || localStorage.getItem('ws-pf_roleName') == '采购内勤'||localStorage.getItem('ws-pf_roleName').indexOf('专员')> -1) {
         return true
         return true
 
 
       } else if (localStorage.getItem('ws-pf_staffName') == '杜大光') {
       } else if (localStorage.getItem('ws-pf_staffName') == '杜大光') {