gjy 2 năm trước cách đây
mục cha
commit
e910fab993

+ 3 - 1
src/api/V2/profitable/index.js

@@ -71,4 +71,6 @@ export const API_BUYPAYEEINFO ='/identityAuthenticationInfo/getPayeeInfo'
 // 获取关联合同
 export const API_RELATIONCONTRACT ='/contractManagementInfo/selectRelationContract'
 // 结算
-export const API_EDIT_CONTRACT ='/contractManagementInfo/editInfo'
+export const API_EDIT_CONTRACT ='/contractManagementInfo/editInfo'
+// 结算校验
+export const API_JUDGE_SETTLEMENT ='/contractManagementInfo/judgeSettlementConditions'

+ 5 - 2
src/model/profitable/index.js

@@ -37,7 +37,8 @@ import {
   API_PAYEEINFO,
   API_BUYPAYEEINFO,
   API_RELATIONCONTRACT,
-  API_EDIT_CONTRACT
+  API_EDIT_CONTRACT,
+  API_JUDGE_SETTLEMENT
 } from '@/api/V2/profitable'
 //收支明细列表
 export const getInOutDetailed = appRx.get(API_GET_INOUTDETAILED, errorCatcher, errorHandle, filter)
@@ -112,4 +113,6 @@ export const getbuypayeeinfo= appRx.get(API_BUYPAYEEINFO, errorCatcher, errorHan
 // 获取关联合同
 export const getrelationcontract= appRx.get(API_RELATIONCONTRACT, errorCatcher, errorHandle, filter)
 //结算
-export const editcontract= appRx.post(API_EDIT_CONTRACT, errorCatcher, errorHandle, filter)
+export const editcontract= appRx.post(API_EDIT_CONTRACT, errorCatcher, errorHandle, filter)
+//结算校验
+export const judgesettlement= appRx.get(API_JUDGE_SETTLEMENT, errorCatcher, errorHandle, filter)

+ 52 - 14
src/views/houseSelfCollect/inspectionManagementNew.vue

@@ -3,7 +3,7 @@
   <div style='overflow-y:scroll;'>
     <BaseHeaderLayout :leftSpan="16">
       <template slot="left">
-        <el-button v-if='this.zjJurisdiction' @click='warehousetypechange(1)' :type="serviceManagementType == 1 ? 'primary' : ''">贸易入库</el-button>
+        <el-button @click='warehousetypechange(1)' :type="serviceManagementType == 1 ? 'primary' : ''">贸易入库</el-button>
         <el-button @click='warehousetypechange(3)' :type="serviceManagementType == 3 ? 'primary' : ''">收购入库</el-button>
       </template>
       <template slot="right">
@@ -18,9 +18,9 @@
     <div style='margin:10px;'>
       <el-row :gutter="20">
         <el-col :span="8">
-          <el-button @click='statustypechange("初检")' :type="statusTypetext == '初检' ? 'primary' : ''">初检</el-button>
-          <el-button @click='statustypechange("复检")' :type="statusTypetext == '复检' ? 'primary' : ''">复检</el-button>
-          <el-button @click='statustypechange("确认")' :type="statusTypetext == '确认' ? 'primary' : ''">确认</el-button>
+          <el-button v-if="qyJurisdiction||zjJurisdiction"  @click='statustypechange("初检")' :type="statusTypetext == '初检' ? 'primary' : ''">初检</el-button>
+          <el-button v-if="fjJurisdiction" @click='statustypechange("复检")' :type="statusTypetext == '复检' ? 'primary' : ''">复检</el-button>
+          <el-button v-if="qrJurisdiction" @click='statustypechange("确认")' :type="statusTypetext == '确认' ? 'primary' : ''">确认</el-button>
         </el-col>
         <el-col :span="8">
           <div style='text-align:center;'>
@@ -504,6 +504,9 @@ import {
   getstaff,
   getReceiptTaskNo,
 } from '@/model/warehouse/index'
+import {
+    gettask,
+  } from '@/model/outboundManagement/index'
 import inspectInfoPrint from './component/inspectInfoPrint.vue'
 import html2canvas from 'html2canvas'
 import axios from 'axios'
@@ -686,6 +689,9 @@ export default {
       isZj: false,
       qyJurisdiction: false,
       zjJurisdiction: false,
+      fjJurisdiction:false,
+      qrJurisdiction:false
+      
     }
   },
   mounted() {
@@ -697,7 +703,10 @@ export default {
     //获取钎样员权限
     this.qyJurisdiction = getHp('acquisitionManagement.acquisitionQuality.qview')
     this.zjJurisdiction= getHp('acquisitionManagement.acquisitionQuality.initial')
-    
+// 复检
+    this.fjJurisdiction= getHp('acquisitionManagement.acquisitionQuality.again')
+    // 确认
+    this.qrJurisdiction= getHp('acquisitionManagement.acquisitionQuality.con')
     console.log(111111111)
     console.log(this.qyJurisdiction)
     //获取质检员权限
@@ -1410,16 +1419,17 @@ export default {
     },
     statustypechangelist(status) {
       // debugger
+      
+      // if (this.serviceManagementType == 3) {
+      //   if(this.statusTypetext=='初检'){
+      //     this.statusType = 0
+      //   }else if(this.statusTypetext=='复检'){
+      //     this.statusType = 1
+      //   }else{
+      //     this.statusType = 2
+      //   }
+      // }
       this.statusType = status
-      if (this.serviceManagementType == 3) {
-        if(this.statusTypetext=='初检'){
-          this.statusType = 0
-        }else if(this.statusTypetext=='复检'){
-          this.statusType = 1
-        }else{
-          this.statusType = 2
-        }
-      }
       getinspectList({
         compId: localStorage.getItem('ws-pf_compId'),
         currentPage: this.currentPage,
@@ -1982,6 +1992,13 @@ export default {
       if (this.reader) {
         this.reader.cancel()
       }
+      if(this.qyJurisdiction&&this.serviceManagementType==1&&this.statusTypetext=='初检'){
+        this.$message({
+            message: '钎样员只能进行收购入库添加',
+            type: 'warning',
+          })
+          return
+      }
       if(this.serviceManagementType==3&&this.zjJurisdiction&&this.statusTypetext=='初检'&&!this.deptBudgetList.id&&!this.qyJurisdiction){
          this.$message({
             message: '请选择待初检数据',
@@ -3136,6 +3153,15 @@ export default {
               this.serviceManagementType=3
               
             }
+            if(this.qyJurisdiction&&!this.fjJurisdiction&&!this.qrJurisdiction||this.zjJurisdiction&&!this.fjJurisdiction&&!this.qrJurisdiction){
+              this.statusTypetext='初检'
+              
+            }else if(this.fjJurisdiction&&!this.qyJurisdiction&&!this.qrJurisdiction&&!this.zjJurisdiction){
+              this.statusTypetext='复检'
+              
+            }else if(this.qrJurisdiction&&!this.qyJurisdiction&&!this.fjJurisdiction&&!this.zjJurisdiction){
+              this.statusTypetext='确认'
+            }
             if(this.serviceManagementType==3){
               this.contractFlag=10
               this.taskflag=3
@@ -3235,6 +3261,18 @@ export default {
           this.goodsNameChange(this.deptBudgetList.goodsName)
           this.deptBudgetList.grade = this.outContractNo[i].grade
           if (this.outContractNo[i].inOutType == '采购入库') {
+            if(this.outContractNo[i].deliverType==1){
+                gettask({contractNo:this.outContractNo[i].contractNo,compId:localStorage.getItem('ws-pf_compId')}).toPromise().then((response) => {
+                  // console.log(response)
+                  if(!response){
+                    this.$message({
+                        message: '联系内勤创建运输任务',
+                        type: 'warning',
+                        
+                      });
+                  }
+                })
+              }
             this.customerName = this.outContractNo[i].buyer
             this.customerPhone = this.outContractNo[i].buyerPhone
             this.warehouseTradeCount = this.warehouseTradeCount1

+ 2 - 1
src/views/houseSelfCollect/newWeighingManagement.vue

@@ -301,6 +301,7 @@
     getsettleaccout,
     newSubmit
   } from '@/model/houseSelfCollect/index'
+
   import {
     addstorageputList
   } from '@/model/warehouse/index'
@@ -2427,4 +2428,4 @@
     border-right: 4px solid #2aff7c;
     // border-bottom: 1px solid #2aff7c ;
   }
-</style>
+</style>

+ 18 - 4
src/views/outboundManagement/weighingManagementNew.vue

@@ -156,7 +156,7 @@
                       weighingList.outType == '汽运' ||
                       weighingList.outType == '集装箱船'
                     ">
-                        <el-input v-if="!carstatus || carjudge" v-model="weighingList.carNo" placeholder="请输入车牌号"
+                        <el-input :maxlength="'7'" v-if="!carstatus || carjudge" v-model="weighingList.carNo" placeholder="请输入车牌号"
                            size="small" :disabled="recheck1"/>
                         <el-select v-else filterable clearable v-model="weighingList.carNo" placeholder="请选择车牌号"
                           class="typeselect" @change="carChange" :disabled="recheck1">
@@ -448,7 +448,7 @@
         tpyeNo: 1,
         types: null,
         information: '皮重',
-        carChange1: '手动填写',
+        carChange1: '识别下拉',
         inWarehouseType: 1, //入库类型
         outContractNo: [],
         mListTop: [],
@@ -466,6 +466,7 @@
         weighingList: {
           grossWeight: '',
           tare: '',
+          selfLoading: 1,
           buckleMiscellaneous: 0,
           netWeight: 0,
           weight: '',
@@ -1579,7 +1580,7 @@
                   // this.isShowPrint = true
                   this.weighingList = {
                     grossWeight: 0,
-                    selfLoading: 0,
+                    selfLoading: 1,
                     tare: 0,
                     tips: '',
                     // contractNo:'',
@@ -1760,7 +1761,7 @@
         this.getList()
         this.weighingList = {
           grossWeight: 0,
-          selfLoading: 0,
+          selfLoading: 1,
           tare: 0,
           tips: '',
           // contractNo:'',
@@ -2063,6 +2064,19 @@
             this.weighingList.grade = this.outContractNo[i].grade
             this.weighingList.inOutType = this.outContractNo[i].inOutType
             if (this.outContractNo[i].inOutType == '销售出库') {
+              if(this.outContractNo[i].deliverType==1){
+                gettask({contractNo:this.outContractNo[i].contractNo,compId:localStorage.getItem('ws-pf_compId')}).toPromise().then((response) => {
+                  // console.log(response)
+                  if(!response){
+                    this.$message({
+                        message: '联系内勤创建运输任务',
+                        type: 'warning',
+                        
+                      });
+                  }
+                })
+              }
+              
               if(this.outContractNo[i].priceType=='随行就市'){
                 this.priceedit=false
               }else if(this.outContractNo[i].priceType=='定价销售'){

+ 39 - 40
src/views/profitable/contractprofitsdetails.vue

@@ -165,7 +165,8 @@
   import {
     getcontractdetails,
     getrelationcontract,
-    editcontract
+    editcontract,
+    judgesettlement
   } from '@/model/profitable/index'
   export default {
     components: {},
@@ -190,6 +191,7 @@
         intotal:0,
         contractList:[],
         tableData:{},
+        datalist:{},
         compId:localStorage.getItem('ws-pf_compId'),
       }
     },
@@ -221,46 +223,43 @@
         this.searchTypeCon= num
         this.getList()
       },
-      closeaccount(row){
-        var data=getrelationcontract({
+      async closeaccount(row){
+      
+        var data=await getrelationcontract({
           agreementType:row.agreementType,contractNo:row.contractNo,compId:this.compId})
             .toPromise()
-                  var weightprice=0
-                  for (let i = 0; i < data.length; i++) {
-                    // if(data[i].status=='已完成'){
-                      weightprice+=(data[i].weight*data[i].settlementPrice)
-                    // }else{
-                    //   this.$message({
-                    //         message: data[i].contractNo+'尚未完成!',
-                    //         type: 'warning',
-                    //   })
-                    // }
-                    // weightprice1-=(data[i].weight*data[i].settlementPrice)
-                  }
-                  if(row.agreementType=='收购合同'||row.agreementType=='采购合同'){
-                    row.profit=weightprice-(row.weight*row.settlementPrice)
-                  }else if(row.agreementType=='销售合同'){
-                    row.profit=(row.weight*row.settlementPrice)-weightprice
-                  }
-        this.$confirm('结算后当前合同和相关合同不可再进行费用相关操作', '提示', {
-            confirmButtonText: '确定',
-            cancelButtonText: '取消',
-            type: 'warning'
-          })
-          .then(() => {
-            editcontract({flag:2,id:row.id,profit:row.profit}).toPromise()
-          .then(response => {
-            this.$message({
-                message: '结算成功!',
-                type: 'success',
-          })
-          }).catch(()=>{
-            this.$message({
-                message: '结算失败!',
-                type: 'warning',
-          })
-          })
-          })
+            var arr=[row].concat(data)
+            console.log(arr)
+            this.datalist.contractManagementInfoList=JSON.stringify(arr)
+            var response=await judgesettlement(this.datalist).toPromise()
+        //           var weightprice=0
+        //           for (let i = 0; i < data.length; i++) {
+        //               weightprice+=(data[i].weight*data[i].settlementPrice)
+        //           }
+        //           if(row.agreementType=='收购合同'||row.agreementType=='采购合同'){
+        //             row.profit=weightprice-(row.weight*row.settlementPrice)
+        //           }else if(row.agreementType=='销售合同'){
+        //             row.profit=(row.weight*row.settlementPrice)-weightprice
+        //           }
+        // this.$confirm('结算后当前合同和相关合同不可再进行费用相关操作', '提示', {
+        //     confirmButtonText: '确定',
+        //     cancelButtonText: '取消',
+        //     type: 'warning'
+        //   })
+        //   .then(() => {
+        //     editcontract({flag:2,id:row.id,profit:row.profit}).toPromise()
+        //   .then(response => {
+        //     this.$message({
+        //         message: '结算成功!',
+        //         type: 'success',
+        //   })
+        //   }).catch(()=>{
+        //     this.$message({
+        //         message: '结算失败!',
+        //         type: 'warning',
+        //   })
+        //   })
+        //   })
       },
       finalstatement(row){
         this.tableData.contractNo=row.contractNo
@@ -295,7 +294,7 @@
             agreementType: this.agreementType,
             startDate:this.startDate,
             endDate:this.endDate,
-            currentPage: this.currentPage,
+            currentPage: 1,
             pageSize:9999 ,
             searchType:this.searchType,
             searchContractType:this.searchContractType,

+ 68 - 37
src/views/profitable/storageCharge.vue

@@ -1,9 +1,9 @@
-//库点库存
+//仓储费
 <template>
   <div class="container">
     <el-row class="row_top">
       <el-col :span="12">
-        <h2 class="bg-left title">库存分布</h2>
+        <h2 class="bg-left title">仓储费</h2>
       </el-col>
       <el-col :span="12" class="bg-right"><el-button class="bg-bottom" type="primary" size="small" @click="returnsales()"><img width="6" height="10"
             style="vertion-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
@@ -12,13 +12,17 @@
     <div class="center">
       <el-row style='margin-bottom:10px;'>
         <el-col :span="12">
-         <el-select v-model="warehouseName" filterable clearable placeholder="" @change="selectwarehouse" :value="searchType">
+         <el-select v-model="warehouseName" filterable clearable placeholder="选择仓库" @change="selectwarehouse" :value="searchType">
+          <el-option  key="0" label="全部仓库" value=""
+            style="color: #8890b1" />
           <el-option v-for="item in warehouse" :key="item.warehouseName" :label="item.warehouseName" :value="item.warehouseName"
             style="color: #8890b1" />
         </el-select>
         </el-col>
         <el-col :span="12">
-          <div class="datascreen">
+          <div style="text-align:right;padding-right:10px;" >
+            仓储费分摊金额:{{allotmentofMoney.value}}元/(吨·天) <el-button class="bg-bottom" type="primary" size="small" @click="edit()">修改
+        </el-button>
           </div>
         </el-col>
       </el-row>
@@ -30,10 +34,12 @@
               <span v-else>{{ scope.$index + 1 }}</span>
             </template>
           </el-table-column>
-          <el-table-column prop="warehouse" label="所属仓库"></el-table-column>
-          <el-table-column prop="locusWarehouse" label="所在仓库"></el-table-column>
-          <el-table-column prop="goodsName" label="货名"></el-table-column>
-          <el-table-column prop="inventory" label="剩余库存(吨)"></el-table-column>
+          <el-table-column prop="warehouseName" label="仓库名称"></el-table-column>
+          <el-table-column prop="agent" label="请款人"></el-table-column>
+          <el-table-column prop="amountMoney" label="金额(元)"></el-table-column>
+          <el-table-column prop="money" label="已分配(元)"></el-table-column>
+          <el-table-column prop="unallocatedAmount" label="未分配(元)"></el-table-column>
+          <el-table-column prop="paymentDate" label="付款日期"></el-table-column>
         </el-table>
       </div>
       <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
@@ -41,13 +47,25 @@
         layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
       </el-pagination>
     </div>
+    <el-dialog width='50%' :visible.sync="interestrateshow" title="设置分摊金额" top="20vh">
+        <el-input placeholder="输入分摊金额" v-model="allotmentofMoney.value"></el-input>
+        元/(吨·天) 
+        <div slot="footer" class="dialog-footer">
+          <el-button type="primary" @click="interestrateshow=false">取消</el-button>
+          <el-button type="primary" @click="interestratesubmit">确定</el-button>
+        </div>
+    </el-dialog>
   </div>
 </template>
 <script>
     import {
-    getinventoryinfo,
+    getexenseinfo,
     getwarehouse
   } from '@/model/profitable/index'
+  import {
+    getenabledinfo,
+  setenabledinfo
+} from '@/model/warehouse/index'
   export default {
     components: {},
     data() {
@@ -60,6 +78,7 @@
         deptCircularPage: {},
         taskTypeList:[],
         warehouse:[],
+        interestrateshow:false,
         searchType:"",
         searchKeyWord:"",
         startDate:"",
@@ -71,15 +90,18 @@
         expenseIncome:0,
         expensesPay:0,
         currentProfit:0,
-        warehouseName:'',
+        warehouseName:'全部仓库',
+        allotmentofMoney:{}
       }
     },
     activated() {
         //  this.getPassYearFormatDate()
-      this.warehouseName=this.$route.query.warehouseName
       this.getList()
     },
     methods: {
+      edit(){
+        this.interestrateshow=true
+      },
       typeChange(num){
         this.searchType = num
         this.getList()
@@ -87,6 +109,16 @@
       returnsales(){
         this.$router.go(-1)
       },
+      interestratesubmit(){
+        setenabledinfo({id:this.allotmentofMoney.id,value:this.allotmentofMoney.value}).toPromise()
+              .then((response) => {
+                this.$message({
+                  message: '修改利率成功',
+                  type: 'success'
+                });
+                this.interestrateshow=false
+              })
+      },
       getPassYearFormatDate () {
           var nowDate = new Date()
           var _date = new Date()
@@ -115,7 +147,11 @@
           this.value=[this.startDate,this.endDate]
         },
         selectwarehouse(e){
-          this.warehouseName=e
+          if(e=='全部仓库'){
+            this.warehouseName=''
+          }else{
+            this.warehouseName=e
+          }
           this.getList()
         },
       getList() {
@@ -124,40 +160,32 @@
             this.warehouse = response
           
           })
-         getinventoryinfo({
+          getenabledinfo({functionType:3}).toPromise()
+          .then((response) => {
+            this.allotmentofMoney=response
+          })
+          getexenseinfo({
+            // warehouseType: 1,
             compId: localStorage.getItem('ws-pf_compId'),
+            searchKeyWord:this.searchKeyWord,
             currentPage: this.currentPage,
-            warehouse:this.warehouseName,
+            searchTypeFee:1,
+            warehouseName:this.warehouseName,
             pageSize:this.pageSize ,
-            inventoryType:3,
+            searchType:this.searchType
           })
           .toPromise()
           .then(response => {
-            this.tableData = response.records
-             if(this.tableData){
-              this.foodExpenditure=0
-              this.grainIncome=0
-              this.expenseIncome=0
-              this.expensesPay=0
-              this.currentProfit=0
-              for (let i = 0; i < this.tableData.length; i++) {
-                if(this.tableData[i].foodExpenditure){
-                  this.foodExpenditure+=Number(this.tableData[i].foodExpenditure)
-                }
-                if(this.tableData[i].grainIncome){
-                  this.grainIncome+=Number(this.tableData[i].grainIncome)
-                }
-                if(this.tableData[i].expenseIncome){
-                  this.expenseIncome+=Number(this.tableData[i].expenseIncome)
-                }
-                if(this.tableData[i].expensesPay){
-                  this.expensesPay+=Number(this.tableData[i].expensesPay)
-                }
-                if(this.tableData[i].currentProfit){
-                  this.currentProfit+=Number(this.tableData[i].currentProfit)
+            if(response.records.length>0){
+              for (let i = 0; i < response.records.length; i++) {
+                response.records[i].money=response.records[i].amountMoney-response.records[i].unallocatedAmount
+                if(response.records[i].paymentDate){
+                  response.records[i].paymentDate=response.records[i].paymentDate.split(' ')[0]
                 }
               }
             }
+            this.tableData = response.records
+             
             
            this.deptBudgetTotal = response.total
           })
@@ -266,4 +294,7 @@
   .bg-right{
     padding-top:15px;
   }
+  /deep/.el-input{
+    width:90%;
+  }
 </style>

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

@@ -198,7 +198,7 @@
 							maxlength="120" size="small" class="huom" />
 						<el-button v-if='dataList.taskTypeKey!=3' class="bg-bottom" type="primary" size="small" @click="supplygoods()">选择货源</el-button>
 					</el-form-item>
-					<el-form-item v-else label="货源" class="huom">
+					<el-form-item v-else label="出库任务编号" class="huom">
 						
 						<el-select v-model="dataList1.inOutTaskNo" placeholder="请选择出库任务编号" class="huom" @change="selectinOutTaskNo"
 						filterable clearable>

+ 1 - 1
src/views/taskManagement/tranManagementWarehouseInOutTaskAudit.vue

@@ -231,7 +231,7 @@
 							maxlength="120" size="small" class="huom" />
 						<el-button v-if='dataList.taskTypeKey!=3' class="bg-bottom" type="primary" size="small" @click="supplygoods()">查看货源</el-button>
 					</el-form-item>
-          <el-form-item v-else label="货源" class="huom">
+          <el-form-item v-else label="出库任务编号" class="huom">
             <el-select disabled v-model="dataList1.inOutTaskNo" placeholder="请选择出库任务编号" class="huom"
 						filterable clearable>
 						<el-option v-for="item in taskNolist" :key="item.id" :label="item.inOutTaskNo"

+ 1 - 1
src/views/warehousenew/inventoryCheck.vue

@@ -627,7 +627,7 @@
             pageSize: this.pageSize,
             startDate:this.startDate,
             endDate:this.endDate,
-            searchType: this.searchType,
+            // searchType: this.searchType,
             searchKeyWord: this.searchKeyWord,
             warehouseName:this.warehouseName,
             inOutType:this.inOutType,

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

@@ -34,8 +34,8 @@
         </ws-button>
         </el-col>
         <el-col style='text-align:right;' :span="12">
-          <!-- <ws-button v-hasPermission="
-            `warehouseManagement.warehousingOrder.yufu`" type="primary" @click="interestrate()" >{{interestratevalue.value}}利率</ws-button> -->
+          <ws-button v-hasPermission="
+            // `warehouseManagement.warehousingOrder.yufu`" type="primary" @click="interestrate()" >{{interestratevalue.value}}利率</ws-button>
           <ws-button v-hasPermission="
             `warehouseManagement.warehousingOrder.yufu`" type="primary" @click="fieldrations()" >折干</ws-button>
            <ws-button v-hasPermission="