ccj 3 سال پیش
والد
کامیت
33b2ac86de

+ 13 - 4
src/views/houseSelfCollect/inspectInfo.vue

@@ -72,7 +72,7 @@
           <div class="title">质检数据</div>
           <ws-info-table>
             <ws-form-item label="等级" span="1" prop="grade">
-              <ws-select v-model="inspect.grade" placeholder="请输入等级" class="typeselect" @change="waterContentChange"
+              <ws-select v-model="inspect.grade" placeholder="请输入等级" class="typeselect"
                 :disabled="disabled">
                 <ws-option v-for="item in gradeList" :key="item.constKey" :label="item.constValue"
                   :value="item.constValue" />
@@ -177,6 +177,7 @@
         imgUrl:"",
         printData:{},
         num:0,
+        tipFlag:true
       }
     },
     activated() {
@@ -619,7 +620,8 @@
           .then((response) => {
             for (let i = 0; i < this.purchasePriceList.length; i++) {
               if (this.inspect.goodsName == this.purchasePriceList[i].goodsName) {
-                if (this.purchasePriceList[i].saleLimit - response/1000 < 50 || count > 0) {
+                if ((this.purchasePriceList[i].saleLimit - response/1000 < 50 || count > 0)&&this.tipFlag) {
+                  this.tipFlag = false
                     this.$alert('当前客户已累计销售我司' +this.inspect.goodsName + (response/1000).toFixed(2) +'吨,最高可售' +this.purchasePriceList[i].saleLimit +'吨。',
                           '提示',
                           {
@@ -671,7 +673,11 @@
         if(this.inspect.goodsName && this.inspect.customerName ){
              // //查看当前用户对应货名有未结算状态的送货
        let count = 0
-        getCount({
+        if (
+          this.inspect.goodsName &&
+          this.inspect.customerName 
+        ) {
+          getCount({
           compId: sessionStorage.getItem('ws-pf_compId'),
           customerName: this.inspect.customerName,
           goodsName: this.inspect.goodsName,
@@ -689,7 +695,8 @@
           .then((response) => {
             for (let i = 0; i < this.purchasePriceList.length; i++) {
               if (this.inspect.goodsName == this.purchasePriceList[i].goodsName) {
-                if (this.purchasePriceList[i].saleLimit - response/1000 < 50 || count > 0) {
+                if ((this.purchasePriceList[i].saleLimit - response/1000 < 50 || count > 0 )&&this.tipFlag) {
+                  this.tipFlag = false
                     this.$alert('当前客户已累计销售我司' +this.inspect.goodsName + (response/1000).toFixed(2) +'吨,最高可售' +this.purchasePriceList[i].saleLimit +'吨。',
                           '提示',
                           {
@@ -703,6 +710,8 @@
             }
           })
         }
+        
+        }
       },
 
       getList(ids) {

+ 17 - 14
src/views/houseSelfCollect/inspectionManagement.vue

@@ -7,7 +7,7 @@
       </template>
       <template slot="right">
         <ws-select
-          v-model="warehouseName"
+          v-model="warehouseNameKey"
           placeholder=""
           @change="warehouseNameChange"
           :value="searchType"
@@ -15,9 +15,9 @@
         >
           <ws-option
             v-for="item in warehouseList"
-            :key="item.value"
-            :label="item.value"
-            :value="item.value"
+            :key="item.id"
+            :label="item.warehouseName"
+            :value="item.id"
             style="color: #8890b1"
           />
         </ws-select>
@@ -137,6 +137,7 @@ export default {
       taskTypeList: [],
       searchType: 0,
       warehouseName: '',
+      warehouseNameKey: '',
       inspect: [],
       warehouseList: [],
       cangid: "", //仓库id
@@ -184,8 +185,8 @@ export default {
     },
     warehouseNameChange(e) {
       for(let i = 0 ; i < this.warehouseList.length; i++){
-        if(this.warehouseList[i].value == e){
-           this.warehouseName = this.warehouseList[i].value
+        if(this.warehouseList[i].id == this.warehouseNameKey){
+           this.warehouseName = this.warehouseList[i].warehouseName
           this.warehouseCount = this.warehouseList[i].count
           this.warehouseNo = this.warehouseList[i].No
           this.cangid = this.warehouseList[i].id
@@ -241,7 +242,7 @@ export default {
           this.warehouseList = []
           for (let i = 0; i < response.length; i++) {
             this.warehouseList.push({
-              value: response[i].warehouseName,
+              warehouseName: response[i].warehouseName,
               id: response[i].id,
               count: response[i].count,
               purchasePriceList: response[i].purchasePriceList,
@@ -249,18 +250,20 @@ export default {
             })
           }
           if(this.warehouseList.length > 0){
-            this.warehouseName =  this.warehouseList[0].value
-             if (this.cangid) {
-            this.warehouseName = this.WAREHOUSE.payname
-          } else {
-            this.WAREHOUSE.payname = this.warehouseList[0].value
-          }
+            this.warehouseNameKey = this.warehouseList[0].id
+            this.warehouseName =  this.warehouseList[0].warehouseName
+            if (this.cangid) {
+              this.warehouseName = this.WAREHOUSE.payname
+            } else {
+             this.WAREHOUSE.payname = this.warehouseList[0].warehouseName
+            }
             this.warehouseCount =  this.warehouseList[0].count
             this.warehouseNo =  this.warehouseList[0].No
             this.cangid =  this.warehouseList[0].id
             this.purchasePriceList =  this.warehouseList[0].purchasePriceList
-            this.getList()
           }
+            this.getList()
+
         })
 
     },

+ 19 - 17
src/views/houseSelfCollect/paymentManagement.vue

@@ -90,12 +90,12 @@
         <template scope="scope">
           <el-button
             type="danger"
-            v-if="!scope.row.approveStatus && scope.row.status != '已驳回'"
+            v-if="(!scope.row.approveStatus || scope.row.approveStatus == '待结算')&& scope.row.status == '待结算'"
             @click="del(scope.row)"
             v-hasPermission="`acquisitionManagement.acquisitionPay.delete`"
           >删除</el-button>
           <el-button
-            v-if="!scope.row.approveStatus && scope.row.status != '已驳回'"
+            v-if="(!scope.row.approveStatus || scope.row.approveStatus == '待结算')&& scope.row.status == '待结算'"
             @click="settlement(1, scope.row)"
             v-hasPermission="`acquisitionManagement.acquisitionPay.add`"
           >结算</el-button>
@@ -300,26 +300,28 @@ export default {
       })
         .toPromise()
         .then(response => {
+          debugger
           this.paymentList = response
           this.deptBudgetTotal = response.total
         })
-     getpayment({
-        currentPage: 1,
-        pageSize: 99999,
-        warehouseName: this.warehouseName,
-        managementType : 1 
-      })
-        .toPromise()
-        .then((response) => {
-          for(let i = 0 ; i < response.length ; i++){
-            if(response[i].taskId){
-              this.isShowAdopt = true
-              return
-            }
+        this.isShowAdopt = true
+    //  getpayment({
+    //     currentPage: 1,
+    //     pageSize: 99999,
+    //     warehouseName: this.warehouseName,
+    //     managementType : 1 
+    //   })
+    //     .toPromise()
+    //     .then((response) => {
+    //       for(let i = 0 ; i < response.length ; i++){
+    //         if(response[i].taskId){
+    //           this.isShowAdopt = true
+    //           return
+    //         }
        
-          }
+    //       }
        
-        })
+    //     })
     },
     del(row) {
       this.$confirm(

+ 36 - 25
src/views/houseSelfCollect/settlement.vue

@@ -237,16 +237,6 @@
             >
               <ws-input @input='grainMoney' v-model="paymentList.grainMoney" placeholder="请输入粮款" maxlength="100" size="small" disabled/>
             </ws-form-item>
-            <ws-form-item label="称重补助" span="1" prop="waterContent">
-              <ws-input
-              @input='grainMoney'
-               v-model="paymentList.weighingSubsidy"
-                placeholder="请输入称重补助"
-                maxlength="100"
-                size="small"
-                :disabled="disabled"
-              />
-            </ws-form-item>
             <ws-form-item label="称重扣款" span="1" prop="waterContent">
               <ws-input
               @input='grainMoney'
@@ -257,16 +247,17 @@
                 :disabled="disabled"
               />
             </ws-form-item>
-            <ws-form-item label="运费补助" span="1" prop="waterContent">
+            <ws-form-item label="称重补助" span="1" prop="waterContent">
               <ws-input
               @input='grainMoney'
-              v-model="paymentList.freightSubsidy"
-                placeholder="请输入运费补助"
+               v-model="paymentList.weighingSubsidy"
+                placeholder="请输入称重补助"
                 maxlength="100"
-                :disabled="disabled"
                 size="small"
+                :disabled="disabled"
               />
             </ws-form-item>
+            
             <ws-form-item label="运费扣款" span="1" prop="waterContent">
               <ws-input
               @input='grainMoney'
@@ -277,11 +268,11 @@
                 size="small"
               />
             </ws-form-item>
-            <ws-form-item label="卸车补助" span="1" prop="waterContent">
+            <ws-form-item label="运费补助" span="1" prop="waterContent">
               <ws-input
               @input='grainMoney'
-              v-model="paymentList.unloadSubsidy"
-                placeholder="请输入卸车补助"
+              v-model="paymentList.freightSubsidy"
+                placeholder="请输入运费补助"
                 maxlength="100"
                 :disabled="disabled"
                 size="small"
@@ -297,11 +288,11 @@
                 size="small"
               />
             </ws-form-item>
-            <ws-form-item label="其他补助" span="1" prop="waterContent">
+            <ws-form-item label="卸车补助" span="1" prop="waterContent">
               <ws-input
               @input='grainMoney'
-              v-model="paymentList.otherSubsidy"
-                placeholder="请输入其他补助"
+              v-model="paymentList.unloadSubsidy"
+                placeholder="请输入卸车补助"
                 maxlength="100"
                 :disabled="disabled"
                 size="small"
@@ -317,6 +308,18 @@
                 size="small"
               />
             </ws-form-item>
+
+            <ws-form-item label="其他补助" span="1" prop="waterContent">
+              <ws-input
+              @input='grainMoney'
+              v-model="paymentList.otherSubsidy"
+                placeholder="请输入其他补助"
+                maxlength="100"
+                :disabled="disabled"
+                size="small"
+              />
+            </ws-form-item>
+            
             <ws-form-item label="其他扣款" span="1" prop="waterContent">
               <ws-input
               @input='grainMoney'
@@ -388,7 +391,7 @@
     >
       <paymentPrint :printData="printData" ref="saveImg"></paymentPrint>
       <div style="text-align:center">
-        <el-button type="primary" @click="isShowPrint = false">关闭</el-button>
+        <el-button type="primary" @click="closePrint">关闭</el-button>
         <!-- <el-button type="primary" @click="printSmall">打印小票</el-button> -->
         <el-button type="primary" @click="printBig">打印单据</el-button>
       </div>
@@ -485,13 +488,15 @@ export default {
           }
           if(this.paymentList.type =='潮粮'){
             this.paymentList.grainMoney=this.paymentList.qualityInspectionManagement.tidalGrainPrice*this.paymentList.weighingManagement.netWeight
-            this.paymentList.calculationPayable =  this.paymentList.grainMoney.toFixed(2)
+            this.paymentList.calculationPayable=Number(this.paymentList.grainMoney)+Number(this.paymentList.weighingSubsidy)+Number(this.paymentList.freightSubsidy)+Number(this.paymentList.unloadSubsidy)+Number(this.paymentList.otherSubsidy)-Number(this.paymentList.weighingDeduction)-this.paymentList.freightDeduction-Number(this.paymentList.unloadDeduction)-Number(this.paymentList.otherDeduction)-Number(this.paymentList.qualityDeduction)
+            this.paymentList.calculationPayable =  this.paymentList.calculationPayable.toFixed(2)
+      
               this.paymentList.actualPayment = this.paymentList.calculationPayable
               this.actualPayment( this.paymentList.actualPayment)
           }else{
             // this.paymentList.grainMoney=this.paymentList.qualityInspectionManagement.solidGrainPrice*this.paymentList.weighingManagement.netWeight
-             this.paymentList.grainMoney = this.paymentList.qualityInspectionManagement.dryGrainPrice * this.paymentList.weighingManagement.netWeight
-              this.paymentList.calculationPayable =  this.paymentList.grainMoney.toFixed(2)
+             this.paymentList.calculationPayable=Number(this.paymentList.grainMoney)+Number(this.paymentList.weighingSubsidy)+Number(this.paymentList.freightSubsidy)+Number(this.paymentList.unloadSubsidy)+Number(this.paymentList.otherSubsidy)-Number(this.paymentList.weighingDeduction)-this.paymentList.freightDeduction-Number(this.paymentList.unloadDeduction)-Number(this.paymentList.otherDeduction)-Number(this.paymentList.qualityDeduction)
+              this.paymentList.calculationPayable =  this.paymentList.calculationPayable.toFixed(2)
                 this.paymentList.actualPayment = this.paymentList.calculationPayable
                 this.actualPayment( this.paymentList.actualPayment)
           }
@@ -503,7 +508,7 @@ export default {
      this.paymentList.capitalize=this.convertCurrency(e)
     },
     grainMoney(){
-       this.paymentList.calculationPayable=(Number(this.paymentList.grainMoney)+Number(this.paymentList.weighingSubsidy)+Number(this.paymentList.freightSubsidy)+Number(this.paymentList.unloadSubsidy)+Number(this.paymentList.otherSubsidy))-this.paymentList.weighingDeduction-this.paymentList.freightDeduction-this.paymentList.unloadDeduction-this.paymentList.otherDeduction-this.paymentList.qualityDeduction.toFixed(2)
+       this.paymentList.calculationPayable=Number(this.paymentList.grainMoney)+Number(this.paymentList.weighingSubsidy)+Number(this.paymentList.freightSubsidy)+Number(this.paymentList.unloadSubsidy)+Number(this.paymentList.otherSubsidy)-Number(this.paymentList.weighingDeduction)-this.paymentList.freightDeduction-Number(this.paymentList.unloadDeduction)-Number(this.paymentList.otherDeduction)-Number(this.paymentList.qualityDeduction)
        this.paymentList.calculationPayable =  this.paymentList.calculationPayable.toFixed(2)
       this.paymentList.actualPayment = this.paymentList.calculationPayable
       this.actualPayment( this.paymentList.actualPayment)
@@ -733,9 +738,15 @@ export default {
       
     },
     cancel() {
+      this.isShowPrint = false
       this.paymentList = [] 
       this.$router.push({ path: 'paymentManagement' })
     },
+    closePrint(){
+        this.paymentList = [] 
+        this.isShowPrint = false
+        this.$router.push({path:'paymentManagement'})
+      },
   },
 }
 </script>

+ 23 - 12
src/views/houseSelfCollect/weighingManagement.vue

@@ -5,7 +5,7 @@
       <template slot="left"> </template>
       <template slot="right">
         <ws-select
-          v-model="warehouseName"
+          v-model="warehouseNameKey"
           placeholder=""
           @change="warehouseNameChange"
           :value="searchType"
@@ -13,9 +13,9 @@
         >
           <ws-option
             v-for="item in warehouseList"
-            :key="item.value"
-            :label="item.value"
-            :value="item.value"
+            :key="item.warehouseId"
+            :label="item.warehouseName"
+            :value="item.warehouseId"
             style="color: #8890b1"
           />
         </ws-select>
@@ -155,6 +155,7 @@ export default {
       searchKeyWord: '',
       searchType: [],
       warehouseName: '',
+      warehouseNameKey:'',
       value1: '', //选择时间
       warehouseList: [],
       warehouseId: '',
@@ -193,12 +194,21 @@ export default {
     },
     warehouseNameChange(e) {
       // this.warehouseName = e
+      // for (let i = 0; i < this.warehouseList.length; i++) {
+      //   if (this.warehouseList[i].value == e) {
+      //     this.warehouseId = this.warehouseList[i].warehouseId
+      //    this.purchasePriceList = this.warehouseList[i].warehouseList
+      //     this.allowEdit = this.warehouseList[i].allowEdit
+      //       this.WAREHOUSE.payname = this.warehouseList[i].value
+      //   }
+      // }
       for (let i = 0; i < this.warehouseList.length; i++) {
-        if (this.warehouseList[i].value == e) {
+        if (this.warehouseList[i].warehouseId == this.warehouseNameKey) {
+          this.warehouseName = this.warehouseList[i].warehouseName
+          this.WAREHOUSE.payname = this.warehouseList[i].id
           this.warehouseId = this.warehouseList[i].warehouseId
-         this.purchasePriceList = this.warehouseList[i].warehouseList
+          this.purchasePriceList = this.warehouseList[i].warehouseList
           this.allowEdit = this.warehouseList[i].allowEdit
-            this.WAREHOUSE.payname = this.warehouseList[i].value
         }
       }
       this.getList()
@@ -247,17 +257,18 @@ export default {
           this.warehouseList = []
           for (let i = 0; i < response.length; i++) {
             this.warehouseList.push({
-              value: response[i].warehouseName,
+              warehouseName: response[i].warehouseName,
               warehouseId: response[i].id,
               warehouseList:response[i].purchasePriceList,
               allowEdit:response[i].allowEdit
             })
           }
-                this.warehouseName =  this.warehouseList[0].value
-             if (this.warehouseId) {
-            this.warehouseName = this.WAREHOUSE.payname
+          console.log(this.WAREHOUSE.payname)
+          this.warehouseNameKey = this.warehouseList[0].id
+          if (this.warehouseName) {
+            this.warehouseNameKey = this.WAREHOUSE.payname
           } else {
-            this.WAREHOUSE.payname = this.warehouseList[0].value
+            this.WAREHOUSE.payname = this.warehouseList[0].id
           }
           this.allowEdit = this.warehouseList[0].allowEdit
           this.warehouseId = this.warehouseList[0].warehouseId

+ 2 - 2
src/views/houseSelfCollect/weightCheck.vue

@@ -438,13 +438,13 @@ export default {
                     this.weighingList.goodsName == this.purchasePriceList[i].goodsName
                   ) {
                     //累计售粮超上限不能完成毛检保存
-                    let count = this.purchasePriceList[i].saleLimit - response
+                    let count =  (this.purchasePriceList[i].saleLimit -response/1000).toFixed(2)
                     console.log(this.weighingList.grossWeight/1000,"毛重转吨")
                     if (count - this.weighingList.grossWeight/1000 < 0) {
                       this.$alert(
                         '该客户累计销售' +
                           this.weighingList.goodsName +
-                          response +
+                          (response/1000).toFixed(2) +
                           '吨,还可售粮' +
                           count +
                           '吨',

+ 1 - 1
src/views/login/index_ship.vue

@@ -170,7 +170,7 @@ export default {
     this.loginForm.password = Cookies.get('ws_login_pwd')
       ? Cookies.get('ws_login_pwd')
       : ''
-    this.rememberMe = Cookies.get('ws_login_rememberMe') === '1'
+    // this.rememberMe = Cookies.get('ws_login_rememberMe') === '1'
     const arr = JSON.parse(JSON.stringify(zhJs))
     this.loop(arr, null)
 

+ 1 - 1
vue.config.js

@@ -141,7 +141,7 @@ module.exports = {
         // target: 'https://product-server.winsea.com/', //目标地址
         // target: 'http://standard-dev.winsea.com/', //目标地址
         // target: 'http://localhost:8090/',
-        target: 'http://192.168.1.120:8090/',
+        target: 'http://192.168.1.103:9100/',
         // target: 'http://192.168.1.112:8090/',
         // target: 'http://192.168.1.121:8090/',
         // target: 'http://192.168.1.119:8090/',