gjy пре 2 година
родитељ
комит
d13975759d

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

@@ -106,4 +106,6 @@ export const API_POST_YUNSHUSETPRICE = '/tranProcessInfo/api/setUpTranPrice'
 //汽运请款
 export const API_POST_SUBMITLOGISTICS = '/tranSettlementReport/api/submitLogistics'
 //船运反馈接口
-export const API_POST_EDITTRANTASK = '/tranTaskInfo/api/editTranTask'
+export const API_POST_EDITTRANTASK = '/tranTaskInfo/api/editTranTask'
+//粮食单价编辑
+export const API_POST_EDIT_TRANSETTLEMENT ='/tranSettlementReport/api/editTranSettlementReport'

+ 0 - 1
src/views/contractManagement/salesContractExamine.vue

@@ -64,7 +64,6 @@
         </ws-form-item>
         <ws-form-item  v-if="deptBudgetList.transactionSubject == '合营'" class="readonly" label="合营方" span="1" prop="seller">
           <div class="unchanged">{{ deptBudgetList.jointVentureParties }}</div>
-          
         </ws-form-item>
         <ws-form-item v-if="deptBudgetList.transactionSubject == '合营'" label="合营方电话" span="1" prop="jointPhone">
           <div class="unchanged">{{deptBudgetList.jointPhone}}</div>

+ 101 - 13
src/views/statisticalReport/autoSettlementList.vue

@@ -46,13 +46,18 @@
             " src="../../../public/img/sousuo.png" alt="" /></ws-button> -->
         </el-col>
       </el-row>
-      <!-- <el-row>
-        <div>粮食单价:<span v-if="grainPricetext=='编辑'">{{grainPrice}}</span><el-input></el-input><el-button type="primary" @click="editgrainPrice">{{grainPricetext}}</el-button></div>
-      </el-row> -->
+      <el-row>
+        <div style="display:flex;align-items:center;justify-content: flex-start;" v-if="contractNo!='全部合同'&&warehouseList.records.length>0"><div style="width:100px;">粮食单价:</div> <div v-if="grainPricetext=='编辑'">{{grainPrice}}</div><el-input style="margin:0;" v-else v-model="grainPrice"></el-input><el-button style="margin:0 0 0 5px;" type="primary" @click="editgrainPrice">{{grainPricetext}}</el-button></div>
+      </el-row>
       <el-row>
         <div style="color:red">注:审核时,同一运输阶段勾选任意复选框,当前运输阶段下所有条目都通过审核!</div>
       </el-row>
-      <!-- <div>合计 装车净重(吨):{{totalList.loadingWeight}} 卸车净重(吨):{{totalList.unloadingWeight}}</div> -->
+      <div v-if="modification.length>0">合计 装车净重(吨):{{totalList.loadingWeight}} 卸车净重(吨):{{totalList.unloadingWeight}} 公司承担运损:{{totalList.transportDamage}}
+        损耗:{{totalList.lossWeight}} 实际损耗:{{totalList.actualLoss}} 预计单价:{{totalList.transportPrice}} 结算单价:{{totalList.settlementPrice}}
+        结算重量:{{totalList.settlementWeight}} 货损:{{totalList.cargoDamage}} 扣款:{{totalList.deductionAmount}} 服务费:{{totalList.serviceCharge}}
+        实付金额(元):{{totalList.amountActuallyPaid}} 合计应付(元):{{totalList.totalPayable}} 已付金额(元):{{totalList.amountEdPayable}}
+        未付金额(元):{{totalList.amountNotPayable}} 已开发票(元):{{totalList.alreadyInvoice}}
+      </div>
       <el-table class="wenzi" :data="warehouseList.records" style="width: 100%; margin-top: 20px" ref="warehouseList"   @row-click="handleRowClick"
         @selection-change="handleSelectionChange">
         <el-table-column :selectable="selectInit" type="selection" width="55"></el-table-column>
@@ -576,6 +581,19 @@ export default {
     this.showType = this.isShow
   },
   methods: {
+    editgrainPrice(){
+      if(this.grainPricetext=='编辑'){
+        this.grainPricetext='提交'
+      }else{
+        editgrainprice({id:this.warehouseList.records[0].id,flag:7,grainPrice:this.grainPrice}).toPromise().then((response) => {
+          this.$message.success('提交粮食单价成功')
+          this.grainPrice=''
+          this.grainPricetext='编辑'
+          this.getList()
+        })
+        
+      }
+    },
     warehouseNameChange(){
       this.getList()
     },
@@ -585,7 +603,21 @@ export default {
     countTotal(data) {
       var sums={
         loadingWeight:0,
-        unloadingWeight:0
+        unloadingWeight:0,
+        transportDamage:0,
+        lossWeight:0,
+        actualLoss:0,
+        transportPrice:0,
+        settlementPrice:0,
+        settlementWeight:0,
+        cargoDamage:0,
+        deductionAmount:0,
+        serviceCharge:0,
+        amountActuallyPaid:0,
+        totalPayable:0,
+        amountEdPayable:0,
+        amountNotPayable:0,
+        alreadyInvoice:0
       }
         for (let i = 0; i < data.length; i++) {
           if(!isNaN(data[i].loadingWeight)){
@@ -594,7 +626,67 @@ export default {
           if(!isNaN(data[i].unloadingWeight)){
             sums.unloadingWeight+=Number(data[i].unloadingWeight)
           }
+          if(!isNaN(data[i].transportDamage)){
+            sums.transportDamage+=Number(data[i].transportDamage)
+          }
+          if(!isNaN(data[i].lossWeight)){
+            sums.lossWeight+=Number(data[i].lossWeight)
+          }
+          if(!isNaN(data[i].actualLoss)){
+            sums.actualLoss+=Number(data[i].actualLoss)
+          }
+          if(!isNaN(data[i].transportPrice)){
+            sums.transportPrice+=Number(data[i].transportPrice)
+          }
+          if(!isNaN(data[i].settlementPrice)){
+            sums.settlementPrice+=Number(data[i].settlementPrice)
+          }
+          if(!isNaN(data[i].settlementWeight)){
+            sums.settlementWeight+=Number(data[i].settlementWeight)
+          }
+          if(!isNaN(data[i].cargoDamage)){
+            sums.cargoDamage+=Number(data[i].cargoDamage)
+          }
+          if(!isNaN(data[i].deductionAmount)){
+            sums.deductionAmount+=Number(data[i].deductionAmount)
+          }
+          if(!isNaN(data[i].serviceCharge)){
+            sums.serviceCharge+=Number(data[i].serviceCharge)
+          }
+          if(!isNaN(data[i].amountActuallyPaid)){
+            sums.amountActuallyPaid+=Number(data[i].amountActuallyPaid)
+          }
+          if(!isNaN(data[i].totalPayable)){
+            sums.totalPayable+=Number(data[i].totalPayable)
+          }
+          if(!isNaN(data[i].amountEdPayable)){
+            sums.amountEdPayable+=Number(data[i].amountEdPayable)
+          }
+          if(!isNaN(data[i].amountNotPayable)){
+            sums.amountNotPayable+=Number(data[i].amountNotPayable)
+          }
+          if(!isNaN(data[i].alreadyInvoice)){
+            sums.alreadyInvoice+=Number(data[i].alreadyInvoice)
+          }
+          
         }
+        sums.loadingWeight=sums.loadingWeight.toFixed(2)
+        sums.unloadingWeight= sums.unloadingWeight.toFixed(2)
+        sums.transportDamage=sums.transportDamage.toFixed(2)
+        sums.lossWeight=sums.lossWeight.toFixed(2)
+        sums.actualLoss=sums.actualLoss.toFixed(2)
+        sums.transportPrice=sums.transportPrice.toFixed(2)
+        sums.settlementPrice=sums.settlementPrice.toFixed(2)
+        sums.settlementWeight=sums.settlementWeight.toFixed(2)
+        sums.cargoDamage=sums.cargoDamage.toFixed(2)
+        sums.deductionAmount=sums.deductionAmount.toFixed(2)
+        sums.serviceCharge=sums.serviceCharge.toFixed(2)
+        sums.amountActuallyPaid=sums.amountActuallyPaid.toFixed(2)
+        sums.totalPayable=sums.totalPayable.toFixed(2)
+        sums.amountEdPayable=sums.amountEdPayable.toFixed(2)
+        sums.amountNotPayable=sums.amountNotPayable.toFixed(2)
+        sums.alreadyInvoice=sums.alreadyInvoice.toFixed(2)
+
         return sums;
     },
     onChange() {
@@ -1270,10 +1362,7 @@ export default {
       if (this.modification.length == 0) {
         this.$message.warning('请选择要通过的条目')
       } else {
-        var contract = that.modification[0].contractNo
-        
         for (let i = 0; i < this.modification.length; i++) {
-        
           if(this.modification[i].status=='待请款'&&this.modification[i].approveStatus||this.modification[i].status!='待请款'&&this.modification[i].status!='已驳回'){
             this.$message.warning('请选择待请款的条目')
             return
@@ -1282,10 +1371,6 @@ export default {
             this.$message.warning('请选择已卸车的车辆')
             return
           }
-          if(that.modification[i].contractNo != contract){
-            this.$message.warning('请选择相同的合同条目进行请款!')
-            return
-          }
         }
         var arr=this.ArrSet(this.modification,this.contractNo)
         
@@ -1311,10 +1396,10 @@ export default {
       }
     },
     handleSelectionChange(val) {
-      this.modification = val
       if (val.length !== 0) {
         this.totalList = this.countTotal(val)
       }
+      this.modification = val
     },
     handlestatus(status) {
       this.searchType = status
@@ -1407,6 +1492,9 @@ export default {
           }
           this.deptBudgetTotal = response.total
           this.warehouseList = response
+          if(this.warehouseList.records.length>0&&this.contractNo!='全部合同'){
+            this.grainPrice=this.warehouseList.records[0].grainPrice
+          }
         })
       autocontract({
         compId: localStorage.getItem('ws-pf_compId'),

+ 6 - 4
src/views/statisticalReport/shippingList.vue

@@ -559,11 +559,12 @@
         }).then(() => {
           edittrantask({id:this.currecttask.id,shippedWeight:this.taskform.shippedWeight,enclosure:this.taskform.enclosure,tranProcessInfoList:[]}).toPromise().then((response) => {
               this.editshow=false
-              this.taskform={}
               this.$refs.upload.clearFiles()
               this.$message.success('提交成功')
               this.$nextTick(()=>{
-                this.$router.go(0)
+                this.shippedWeight=this.taskform.shippedWeight
+                this.enclosure=this.taskform.enclosure
+                this.taskform={}
               })
             })
             .catch((response) => {
@@ -587,11 +588,12 @@
         }).then(() => {
           edittrantask({id:this.currecttask.id,unloadingWeight:this.taskform.unloadingWeight,unEnclosure:this.taskform.unEnclosure,tranProcessInfoList:[]}).toPromise().then((response) => {
               this.editshow=false
-              this.taskform={}
               this.$refs.upload1.clearFiles()
               this.$message.success('提交成功')
               this.$nextTick(()=>{
-                this.$router.go(0)
+                this.unloadingWeight=this.taskform.unloadingWeight
+                this.unEnclosure=this.taskform.unEnclosure
+                this.taskform={}
               })
             })
             .catch((response) => {

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

@@ -547,6 +547,9 @@
 					if(localStorage.getItem('warehouseId')){
 						this.baseId=localStorage.getItem('warehouseId')
 					}
+					if(localStorage.getItem('goodsName')){
+						this.dataList.goodsName=localStorage.getItem('goodsName')
+					}
 					getstaff({compId: localStorage.getItem('ws-pf_compId'),warehouseId: this.dataList.warehouseId})
 					.toPromise()
 					.then(response => {
@@ -602,6 +605,7 @@
 					this.dataList.weight=this.dataList.weight.toFixed(3)
 				}else if(this.dataList.taskTypeKey==1||this.dataList.taskTypeKey==3){
 					var supplygoods=JSON.parse(localStorage.getItem('supplygoods1'))
+					
 					if(localStorage.getItem('supplygoodsstatus')&&localStorage.getItem('supplygoodsstatus')==0){
 						for (let i = 0; i < supplygoods.length; i++) {
 							this.goods=this.goods!=''?this.goods+',':''+supplygoods[i].goodsName
@@ -632,7 +636,7 @@
 							if(this.dataList.contractNo){
 								localStorage.setItem('contractNo',this.dataList.contractNo);
 							}
-							
+							localStorage.setItem('goodsName',this.dataList.goodsName);
 						}
             			localStorage.setItem('taskTypeKey',this.dataList.taskTypeKey);
 						localStorage.setItem('warehouseId',this.baseId);
@@ -1553,6 +1557,7 @@
 					for (let i = 0; i < data.length; i++) {
 						data[i].sourceId=data[i].id
 					}
+
 				}else{
 					// ||this.dataList1.taskTypeKey == 2&&this.dataList1.inOutType
 					if(this.dataList.taskTypeKey == 1||this.dataList.taskTypeKey == 3||this.dataList.taskTypeKey == 4){