Browse Source

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

zhongtianhaoyuan 2 năm trước cách đây
mục cha
commit
037449819f
60 tập tin đã thay đổi với 6226 bổ sung1431 xóa
  1. 5 8
      public/static/payprint.html
  2. 141 75
      public/static/payprint1.html
  3. 1271 0
      public/static/payprint1A5.html
  4. 69 86
      public/static/payprint2.html
  5. 12 2
      public/static/print.html
  6. 1 1
      public/static/warehousePrint.html
  7. 9 8
      public/static/weightCheck.html
  8. 10 0
      src/api/V2/platformaudit/index.js
  9. 3 1
      src/api/V2/transport/index.js
  10. 3 0
      src/api/V2/warehouse/index.js
  11. 2 0
      src/components/balanceAlert.vue
  12. 1 0
      src/lang/zh.js
  13. 1 1
      src/layout/index/top/index.vue
  14. 15 0
      src/model/platformaudit/index.js
  15. 5 2
      src/model/profitable/index.js
  16. 6 3
      src/model/transport/index.js
  17. 3 0
      src/model/warehouse/index.js
  18. 6 10
      src/views/contractManagement/acquisitionContract.vue
  19. 34 10
      src/views/contractManagement/purchaseContract.vue
  20. 12 4
      src/views/contractManagement/purchaseContractAdd.vue
  21. 34 8
      src/views/contractManagement/purchaseContractEdit.vue
  22. 57 1
      src/views/contractManagement/purchaseContractExamine.vue
  23. 4 2
      src/views/contractManagement/salesContract.vue
  24. 1 1
      src/views/home/index.vue
  25. 405 161
      src/views/houseSelfCollect/acquisitionManagementAdd.vue
  26. 4 4
      src/views/houseSelfCollect/inspectionManagementNew.vue
  27. 4 0
      src/views/houseSelfCollect/newWeighingManagement.vue
  28. 95 49
      src/views/houseSelfCollect/paymentManagement.vue
  29. 75 26
      src/views/houseSelfCollect/settlement.vue
  30. 30 28
      src/views/outboundManagement/newQualityInspectionManagement.vue
  31. 23 12
      src/views/outboundManagement/weighingManagementNew.vue
  32. 15 0
      src/views/platformAudit/component/routers/route.js
  33. 600 0
      src/views/platformAudit/tradeInformation.vue
  34. 299 84
      src/views/profitable/cashout.vue
  35. 67 50
      src/views/profitable/cashoutaduit.vue
  36. 324 80
      src/views/profitable/cashoutaduitNQ.vue
  37. 63 47
      src/views/profitable/cashoutedit.vue
  38. 135 134
      src/views/profitable/component/routers/route.js
  39. 52 48
      src/views/profitable/contractprofitsdetails.vue
  40. 324 40
      src/views/profitable/expenseallot.vue
  41. 72 8
      src/views/profitable/expenseallotaduit.vue
  42. 75 41
      src/views/profitable/expensemanagementdetails.vue
  43. 395 89
      src/views/profitable/expensemanagentedit.vue
  44. 79 52
      src/views/profitable/expensemanagentlook.vue
  45. 39 1
      src/views/purchasingManagement/procurementPlanAdd.vue
  46. 47 7
      src/views/salesManagement/salesPlanAdd.vue
  47. 64 8
      src/views/statisticalReport/autoSettlementList.vue
  48. 96 95
      src/views/taskManagement/component/routers/route.js
  49. 1 1
      src/views/taskManagement/moveWarehouseTaskLook.vue
  50. 33 2
      src/views/taskManagement/supplyofgoods.vue
  51. 77 5
      src/views/taskManagement/tranManagementWarehouseInOutTaskAdd.vue
  52. 16 0
      src/views/tranManagement/component/routers/route.js
  53. 110 94
      src/views/tranManagement/tranManagementVehicleDispatching.vue
  54. 632 0
      src/views/tranManagement/tranManagementVehicleDispatchinghistory.vue
  55. 1 1
      src/views/universalityAudit/audit.vue
  56. 16 15
      src/views/warehousenew/component/router/index.js
  57. 4 4
      src/views/warehousenew/transformation.vue
  58. 3 3
      src/views/warehousenew/warehouseManagementList.vue
  59. 240 19
      src/views/warehousenew/warehousingOrder.vue
  60. 6 0
      src/views/workNotification/utils/index.js

+ 5 - 8
public/static/payprint.html

@@ -282,7 +282,7 @@
                   <td class="col col-bgc">等级</td>
                   <td class="col col-bgc">水分%</td>
                   <td class="col col-bgc">杂质%</td>
-                  <td class="col col-bgc">容重(克/升)</td>
+                  <td class="col col-bgc">{{printData1[index].goodsName != '大豆'?'容重(克/升)':'蛋白'}}</td>
                   <td class="col col-bgc">毛重</td>
                   <td class="col col-bgc">皮重</td>
                   <td class="col col-bgc">扣杂重</td>
@@ -455,7 +455,7 @@
                   <td class="col">{{printData1[index].weighingManagement.goodsName}}</td>
                   <td class="col col-bgc">类型</td>
                   <td class="col">{{printData1[index].weighingManagement.type}}</td>
-                  <td class="col col-bgc">容量(克/升)</td>
+                  <td class="col col-bgc">{{printData1[index].weighingManagement.goodsName!='大豆'?'容量(克/升)':'蛋白'}}</td>
                   <td class="col">
                     {{printData1[index].qualityInspectionManagement?printData1[index].qualityInspectionManagement.bulkDensity:''}}
                   </td>
@@ -788,7 +788,7 @@
               <td class="col">{{tableData.goodsName}}</td>
               <td class="col col-bgc">类型</td>
               <td class="col">{{tableData.type}}</td>
-              <td class="col col-bgc">容量(克/升)</td>
+              <td class="col col-bgc">{{tableData.goodsName!= '大豆'?'容量(克/升)':'蛋白'}}</td>
               <td class="col">
                 {{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.bulkDensity:''}}
               </td>
@@ -1143,11 +1143,8 @@
         this.date = new Date().toLocaleString()
         // let _data = decodeURIComponent(this.getQueryVariable('dataList'))
         let _data  ={}
-        if(decodeURIComponent(localStorage.getItem('print_pay_data'))){
-            _data=decodeURIComponent(localStorage.getItem('print_pay_data'))
-        }
-        else{
-            _data = decodeURIComponent(this.getQueryVariable("dataList"))
+        if(localStorage.getItem('print_pay_data')){
+            _data=localStorage.getItem('print_pay_data')
         }
         if (!_data) {
           this.selectPrint = true

+ 141 - 75
public/static/payprint1.html

@@ -166,7 +166,7 @@
         
         .sfcard-content img {
             width: 100%;
-            height: 130vh;
+            height: 90vh;
         }
         
         .sfcard-title {
@@ -175,11 +175,11 @@
         }
         
         .center {
-            height: 140vh;
+            height: 99.5vh;
         }
         
         .part2 {
-            height: 140vh;
+            height: 99.5vh;
             /* background: red; */
         }
         
@@ -276,10 +276,10 @@
                                 <td class="col col-bgc">等级</td>
                                 <td class="col col-bgc">水分%</td>
                                 <td class="col col-bgc">杂质%</td>
-                                <td class="col col-bgc">容重(克/升)</td>
+                                <td class="col col-bgc">{{printData1[index].goodsName != '大豆'?'容重':'蛋白'}}</td>
                                 <td class="col col-bgc">毛重</td>
                                 <td class="col col-bgc">皮重</td>
-                                <td class="col col-bgc">扣重</td>
+                                <td class="col col-bgc">扣重</td>
                                 <td class="col col-bgc">净重</td>
                             </tr>
                             <tr class="row">
@@ -295,48 +295,59 @@
                                     {{ printData1[index].qualityInspectionManagement.impurity}}
                                 </td>
                                 <td class="col">
-                                    {{printData1[index].weighingManagement.qualityInspectionManagement?printData1[index].weighingManagement.qualityInspectionManagement.bulkDensity:''}}
+                                    {{printData1[index].qualityInspectionManagement?printData1[index].qualityInspectionManagement.bulkDensity:''}}
                                 </td>
                                 <td class="col">{{ printData1[index].grossWeight}}</td>
                                 <td class="col">{{ printData1[index].tare}}</td>
-                                <td class="col">
+                                <td class="col" v-if="compId!='6a713699e08c4cbc97a87f7648a95e3d' 
+                                ||  printData1[index].netWeight == null 
+                                ||  printData1[index].pureWeight == null">
                                     {{printData1[index].weighingManagement?printData1[index].weighingManagement.buckleMiscellaneous:''}}
                                 </td>
+                                <td class="col " v-if="compId=='6a713699e08c4cbc97a87f7648a95e3d' 
+                                && printData1[index].netWeight != null 
+                                && printData1[index].pureWeight != null ">{{printData1[index].netWeight-printData1[index].pureWeight}}</td>
                                 <td class="col">{{ printData1[index].netWeight}}</td>
                             </tr>
                             <tr class="row">
                                 <td class="col col-bgc">纯重</td>
-                                <td class="col col-bgc" v-if="printData1[index].type == '潮粮'">
-                                    净重单价
-                                </td>
-                                <td class="col col-bgc" v-if="printData1[index].type == '干粮'">
+                                <td class="col col-bgc" >
                                     单价
                                 </td>
                                 <td class="col col-bgc">扣单价</td>
                                 <td class="col col-bgc">粮款</td>
-                                <td class="col col-bgc">称重补助</td>
-                                <td class="col col-bgc">运费补助</td>
-                                <td class="col col-bgc">卸车补助</td>
-                                <td class="col col-bgc">其他补助</td>
-                                <td class="col col-bgc">称重扣款</td>
-                                <td class="col col-bgc">运费扣款</td>
+                                <td class="col col-bgc">霉变粒</td>
+                                <td class="col col-bgc">热损伤</td>
+                                <td class="col col-bgc">不完善粒</td>
+                                <td class="col col-bgc">扣重比</td>
+                                <td class="col col-bgc">扣量%</td>
+                                <td class="col col-bgc"></td>
                             </tr>
                             <tr class="row">
                                 <td class="col">{{ printData1[index].pureWeight}}</td>
-                                <td class="col " v-if="printData1[index].type == '潮粮'">
+                                <td class="col " v-if="printData1[index].type == '潮粮' && !pengyuPrint">
                                     {{printData1[index].tidalGrainPrice}}
                                 </td>
-                                <td class="col " v-if="printData1[index].type == '干粮'">
+                                <td class="col " v-if="printData1[index].type == '干粮' && !pengyuPrint">
                                     {{printData1[index].qualityInspectionManagement.dryGrainPrice}}
                                 </td>
+                                <td class="col " v-if="pengyuPrint">
+                                    {{printData1[index].unitContractPrice/1000}}
+                                </td>
                                 <td class="col ">{{ printData1[index].unitDeduction}}</td>
-                                <td class="col ">{{ printData1[index].grainMoney}}</td>
-                                <td class="col ">{{ printData1[index].weighingSubsidy}}</td>
-                                <td class="col ">{{ printData1[index].freightSubsidy}}</td>
-                                <td class="col ">{{ printData1[index].unloadSubsidy}}</td>
-                                <td class="col ">{{ printData1[index].otherSubsidy}}</td>
-                                <td class="col ">{{ printData1[index].weighingDeduction}}</td>
-                                <td class="col ">{{ printData1[index].freightDeduction}}</td>
+                                <td class="col " v-if="pengyuPrint">
+                                    {{Number(printData1[index].unitContractPrice/1000*printData1[index].pureWeight).toFixed(2)}}
+                                </td>
+                                <td class="col " v-if="!pengyuPrint">
+                                    {{printData1[index].grainMoney}}
+                                </td>
+                                <td class="col "> {{printData1[index].qualityInspectionManagement?printData1[index].qualityInspectionManagement.mildewGrain:''}}</td>
+                                <td class="col "> {{printData1[index].qualityInspectionManagement?printData1[index].qualityInspectionManagement.jiaorenli:''}}</td>
+                                <td class="col "> {{printData1[index].qualityInspectionManagement?printData1[index].qualityInspectionManagement.imperfectGrain:''}}</td>
+                                <td class="col ">{{compId=='6a713699e08c4cbc97a87f7648a95e3d'?'1.25':printData1[index].buckleWeightRatio}}</td>
+                                <td class="col " v-if="compId=='6a713699e08c4cbc97a87f7648a95e3d'">{{ (printData1[index].qualityInspectionManagement.waterContent-14.5)*1.25}}</td>
+                                <td class="col " v-if="compId!='6a713699e08c4cbc97a87f7648a95e3d'"></td>
+                                <td class="col "></td>
                                 <!-- <td class="col ">{{ printData1[index].unloadDeduction}}</td> -->
                             </tr>
                             <tr class="row">
@@ -358,8 +369,11 @@
                                 <!-- <td class="col " v-if="printData1[index].type == '潮粮'">
                                     {{ printData1[index].solidGrainPrice}}
                                 </td> -->
-                                <td class="col ">
-                                    {{ printData1[index].calculationPayable}}
+                                <td class="col " v-if="pengyuPrint">
+                                    {{Number(printData1[index].unitContractPrice/1000*printData1[index].pureWeight).toFixed(2)}}
+                                </td>
+                                <td class="col " v-if="!pengyuPrint">
+                                    {{printData1[index].calculationPayable}}
                                 </td>
                                 <td class="col ">
                                     {{ printData1[index].qualityInspectionManagement.natureOfGrainPurchase}}
@@ -372,12 +386,15 @@
                             <tr class="row">
                                 <td class="col col-bgc">实付金额</td>
                                 <td class="col " colspan="2">
-                                    {{printData1[index].actualPayment}}
+                                    
                                 </td>
                                 <td class="col col-bgc" colspan="3">人民币(大写)</td>
-                                <td class="col " colspan="4">
+                                <td class="col " v-if="!pengyuPrint" colspan="4">
                                     {{printData1[index].capitalize}}
                                 </td>
+                                <td class="col " v-if="pengyuPrint" colspan="4">
+                                    
+                                </td>
                             </tr>
                         </table>
 
@@ -444,7 +461,7 @@
                                 <td class="col">{{printData1[index].weighingManagement.goodsName}}</td>
                                 <td class="col col-bgc">类型</td>
                                 <td class="col">{{printData1[index].weighingManagement.type}}</td>
-                                <td class="col col-bgc">容量(克/升)</td>
+                                <td class="col col-bgc">{{printData1[index].weighingManagement.goodsName != '大豆'?'容量(克/升)':'蛋白'}}</td>
                                 <td class="col">
                                     {{printData1[index].qualityInspectionManagement?printData1[index].qualityInspectionManagement.bulkDensity:''}}
                                 </td>
@@ -492,7 +509,15 @@
                                 <td class="col col-bgc">皮重(公斤)</td>
                                 <td class="col">{{printData1[index].weighingManagement.tare}}</td>
                                 <td class="col col-bgc">扣重(公斤)</td>
-                                <td class="col">{{printData1[index].weighingManagement.buckleMiscellaneous}}</td>
+                                <td class="col" v-if="compId!='6a713699e08c4cbc97a87f7648a95e3d' 
+                                ||  printData1[index].netWeight == null 
+                                ||  printData1[index].pureWeight == null">
+                                    {{printData1[index].weighingManagement?printData1[index].weighingManagement.buckleMiscellaneous:''}}
+                                </td>
+                                <td class="col " v-if="compId=='6a713699e08c4cbc97a87f7648a95e3d' 
+                                && printData1[index].netWeight != null 
+                                && printData1[index].pureWeight != null ">{{printData1[index].netWeight-printData1[index].pureWeight}}</td>
+                                <!-- <td class="col">{{printData1[index].weighingManagement.buckleMiscellaneous}}</td> -->
                                 <td class="col col-bgc">净重(公斤)</td>
                                 <td class="col">{{printData1[index].weighingManagement.netWeight}}</td>
                             </tr>
@@ -546,9 +571,9 @@
                             </div>
                             <!-- <img :src="customerList1[index].imgURl.imageUrl3" class="avatar" /> -->
                             <img v-if="printData1[index].imgURl" :src="printData1[index].imgURl.imageUrl3" class="avatar" />
-                            <img v-else  class="avatar" />
-                            <img v-if="printData1[index].imgURl" :src="printData1[index].imgURl.imageUrl4" class="avatar" />
-                            <img v-else  class="avatar" />
+                            <img v-else class="avatar" />
+                            <!-- <img v-if="printData1[index].imgURl" :src="printData1[index].imgURl.imageUrl4" class="avatar" />
+                            <img v-else class="avatar" /> -->
 
                         </div>
                         <!--          <div class="sfcard-content part2">
@@ -624,11 +649,11 @@
                         <td class="col col-bgc">等级</td>
                         <td class="col col-bgc">水分%</td>
                         <td class="col col-bgc">杂质%</td>
+                        <td class="col col-bgc">{{printData.goodsName!= '大豆'?'容重':'蛋白'}}</td>
                         <td class="col col-bgc">毛重</td>
                         <td class="col col-bgc">皮重</td>
-                        <td class="col col-bgc">扣重</td>
+                        <td class="col col-bgc">扣重</td>
                         <td class="col col-bgc">净重</td>
-                        <td class="col col-bgc"></td>
                         <!-- <td class="col col-bgc">出库净重</td> -->
                         <!-- <td class="col col-bgc">纯重</td> -->
                     </tr>
@@ -644,47 +669,61 @@
                         <td class="col">
                             {{ printData.qualityInspectionManagement.impurity}}
                         </td>
+                        <td class="col">{{printData.qualityInspectionManagement?printData.qualityInspectionManagement.bulkDensity:''}}</td>
                         <td class="col">{{ printData.grossWeight}}</td>
                         <td class="col">{{ printData.tare}}</td>
-                        <td class="col">
-                            {{ printData.weighingManagement.buckleMiscellaneous}}
+                        <td class="col" v-if="compId!='6a713699e08c4cbc97a87f7648a95e3d' 
+                        ||  printData.netWeight == null 
+                        ||  printData.pureWeight == null">
+                            {{printData.weighingManagement?printData.weighingManagement.buckleMiscellaneous:''}}
                         </td>
+                        <td class="col " v-if="compId=='6a713699e08c4cbc97a87f7648a95e3d' 
+                        && printData.netWeight != null 
+                        && printData.pureWeight != null ">{{printData.netWeight-printData.pureWeight}}</td>
+                        <!-- <td class="col">
+                            {{ printData.weighingManagement.buckleMiscellaneous}}
+                        </td> -->
                         <td class="col">{{ printData.netWeight}}</td>
-                        <td class="col"></td>
                         <!-- <td class="col">{{ printData.pureWeight}}</td> -->
                     </tr>
                     <tr class="row">
                         <td class="col col-bgc">纯重</td>
-                        <td class="col col-bgc" v-if="printData.type == '潮粮'">
-                            净重单价
-                        </td>
-                        <td class="col col-bgc" v-if="printData.type == '干粮'">单价</td>
+                        <td class="col col-bgc">单价</td>
                         <td class="col col-bgc">扣单价</td>
                         <td class="col col-bgc">粮款</td>
-                        <td class="col col-bgc">称重补助</td>
-                        <td class="col col-bgc">运费补助</td>
-                        <td class="col col-bgc">卸车补助</td>
-                        <td class="col col-bgc">其他补助</td>
-                        <td class="col col-bgc">称重扣款</td>
-                        <td class="col col-bgc">运费扣款</td>
+                        <td class="col col-bgc">霉变粒</td>
+                        <td class="col col-bgc">热损伤</td>
+                        <td class="col col-bgc">不完善粒</td>
+                        <td class="col col-bgc">扣重比</td>
+                        <td class="col col-bgc">扣量%</td>
+                        <td class="col col-bgc"></td>
                         <!-- <td class="col col-bgc">1卸车扣款</td> -->
                     </tr>
                     <tr class="row">
                         <td class="col">{{ printData.pureWeight}}</td>
-                        <td class="col " v-if="printData.type == '潮粮'">
+                        <td class="col " v-if="printData.type == '潮粮' && !pengyuPrint">
                             {{printData.tidalGrainPrice}}
                         </td>
-                        <td class="col " v-if="printData.type == '干粮'">
+                        <td class="col " v-if="printData.type == '干粮' && !pengyuPrint">
                             {{printData.qualityInspectionManagement.dryGrainPrice}}
                         </td>
+                        <td class="col " v-if="pengyuPrint">
+                            {{printData.unitContractPrice/1000}}
+                        </td>
                         <td class="col ">{{ printData.unitDeduction}}</td>
-                        <td class="col ">{{ printData.grainMoney}}</td>
-                        <td class="col ">{{ printData.weighingSubsidy}}</td>
-                        <td class="col ">{{ printData.freightSubsidy}}</td>
-                        <td class="col ">{{ printData.unloadSubsidy}}</td>
-                        <td class="col ">{{ printData.otherSubsidy}}</td>
-                        <td class="col ">{{ printData.weighingDeduction}}</td>
-                        <td class="col ">{{ printData.freightDeduction}}</td>
+                        <td class="col " v-if="pengyuPrint">
+                            {{Number(printData.unitContractPrice/1000*printData.pureWeight).toFixed(2)}}
+                        </td>
+                        <td class="col " v-if="!pengyuPrint">
+                            {{printData.grainMoney}}
+                        </td>
+                        <td class="col "> {{printData.qualityInspectionManagement.mildewGrain}}</td>
+                        <td class="col "> {{printData.qualityInspectionManagement.jiaorenli}}</td>
+                        <td class="col "> {{printData.qualityInspectionManagement.imperfectGrain}}</td>
+                        <td class="col ">{{compId=='6a713699e08c4cbc97a87f7648a95e3d'?'1.25':printData.buckleWeightRatio}}</td>
+                        <td class="col " v-if="compId=='6a713699e08c4cbc97a87f7648a95e3d'">{{ (printData.qualityInspectionManagement.waterContent-14.5)*1.25}}</td>
+                        <td class="col " v-if="compId!='6a713699e08c4cbc97a87f7648a95e3d'"></td>
+                        <td class="col "></td>
                         <!-- <td class="col ">{{ printData.unloadDeduction}}</td> -->
                     </tr>
                     <tr class="row">
@@ -706,7 +745,12 @@
                         <!-- <td class="col " v-if="printData.type == '潮粮'">
                             {{ printData.solidGrainPrice}}
                         </td> -->
-                        <td class="col ">{{ printData.calculationPayable}}</td>
+                        <td class="col " v-if="pengyuPrint">
+                            {{Number(printData.unitContractPrice/1000*printData.pureWeight).toFixed(2)}}
+                        </td>
+                        <td class="col " v-if="!pengyuPrint">
+                            {{printData.calculationPayable}}
+                        </td>
                         <td class="col ">
                             {{ printData.qualityInspectionManagement.natureOfGrainPurchase}}
                         </td>
@@ -715,9 +759,14 @@
                     </tr>
                     <tr class="row">
                         <td class="col col-bgc">实付金额</td>
-                        <td class="col " colspan="2">{{printData.actualPayment}}</td>
+                        <td class="col " colspan="2"></td>
                         <td class="col col-bgc" colspan="3">人民币(大写)</td>
-                        <td class="col " colspan="4">{{printData.capitalize}}</td>
+                        <td class="col " v-if="!pengyuPrint" colspan="4">
+                            {{printData.capitalize}}
+                        </td>
+                        <td class="col " v-if="pengyuPrint" colspan="4">
+                            
+                        </td>
                     </tr>
                 </table>
                 <div class="bottom">
@@ -781,7 +830,7 @@
                         <td class="col">{{tableData.goodsName}}</td>
                         <td class="col col-bgc">类型</td>
                         <td class="col">{{tableData.type}}</td>
-                        <td class="col col-bgc">容量(克/升)</td>
+                        <td class="col col-bgc">{{tableData.goodsName != '大豆'?'容量(克/升)':'蛋白'}}</td>
                         <td class="col">
                             {{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.bulkDensity:''}}
                         </td>
@@ -867,12 +916,12 @@
                     </div>
                     <img :src="imageUrl1" class="avatar" />
                 </div>
-                <div class="sfcard-content">
+                <!-- <div class="sfcard-content">
                     <div class="sfcard-title">
                         {{ printData.customerName}}{{ printData.identityAuthenticationInfo.customerNumberCard}}
                     </div>
                     <img :src="imageUrl2" class="avatar" />
-                </div>
+                </div> -->
             </div>
 
             <div class="bankcard part4" v-if="isShowPrintType2">
@@ -882,12 +931,12 @@
                     </div>
                     <img :src="imageUrl3" class="avatar" />
                 </div>
-                <div class="sfcard-content">
+                <!-- <div class="sfcard-content">
                     <div class="sfcard-title">
                         {{printData.bankDeposit}}{{printData.bankCard}}
                     </div>
                     <img :src="imageUrl4" class="avatar" />
-                </div>
+                </div> -->
 
             </div>
         </div>
@@ -1098,7 +1147,9 @@
             bank: [],
             selectPrint: false,
             onlyShowPz: false,
-            tableData: []
+            tableData: [],
+            compId: '',
+            pengyuPrint:'false'
         },
         computed: {},
         methods: {
@@ -1131,6 +1182,16 @@
             printBig() {}
         },
         mounted() {
+            this.pengyuPrint = localStorage.getItem('pengyuPrint')
+            debugger
+            if(this.pengyuPrint == 'true'){
+                this.pengyuPrint = true
+            }
+            else{
+                this.pengyuPrint = false
+            }
+            //公司id
+            this.compId = localStorage.getItem('ws-pf_compId')
             this.date = new Date().toLocaleString()
                 // let _data = decodeURIComponent(this.getQueryVariable('dataList'))
             let _data = {}
@@ -1156,6 +1217,7 @@
                     }
                 }
             } else {
+                debugger
                 this.printData = JSON.parse(_data)
                     //地址过长截取
                 if (this.printData.identityAuthenticationInfo && this.printData.identityAuthenticationInfo.compAddress.length > 24) {
@@ -1174,19 +1236,25 @@
                 // }
                 // this.pageType = decodeURIComponent(this.getQueryVariable('printTypeList'))
             let _data1 = decodeURIComponent(this.getQueryVariable('customerList'))
+
+            var cwprint = localStorage.getItem('cwprint')
             if (!_data1) {
                 this.customerList1 = JSON.parse(
                     localStorage.getItem('selectPrint_selectCustomerList')
                 )
             } else {
-                this.customerList = JSON.parse(_data1)
+                debugger
+                if (cwprint == 'true') {
+                    this.customerList = JSON.parse(localStorage.getItem('printData1'))
+                }
+
             }
+            console.log(this.customerList)
             console.log('cwprint', localStorage.getItem('cwprint'))
-            var cwprint = localStorage.getItem('cwprint')
             if (cwprint == 'true') {
                 if (this.selectPrint) {
                     for (let i = 0; i < this.customerList1.length; i++) {
-                        let _url1 = this.customerList1[i].cardAddressUrl.split(',')
+                        let _url1 = this.customerList1[i].identityAuthenticationInfo.cardAddressUrl.split(',')
                             // let _url2 = this.customerList1[i].payeeAddressUrl.split(',')
                         this.customerList1[i].imgURl = {
                             imageUrl1: _url1[0],
@@ -1206,12 +1274,11 @@
 
                     }
                 } else {
-                    if (this.customerList.cardAddressUrl) {
-                        this.identity = this.customerList.cardAddressUrl.split(',')
+                    if (this.customerList.identityAuthenticationInfo.cardAddressUrl) {
+                        this.identity = this.customerList.identityAuthenticationInfo.cardAddressUrl.split(',')
                         this.imageUrl1 = this.identity[0]
                         this.imageUrl2 = this.identity[1]
                     }
-                    console.log(this.customerList)
                     if (this.customerList.payeeAddressUrl) {
                         this.bank = this.customerList.payeeAddressUrl.split(',')
                         this.imageUrl3 = this.bank[0]
@@ -1258,7 +1325,6 @@
             if (this.printData.compName == undefined) this.printData.compName = ''
             document.title = this.printData.compName + '结算凭证'
             window.print()
-            console.log(11111111111111)
                 // sessionStorage.removeItem('selectPrint_selectPrintList');
                 // sessionStorage.removeItem('selectPrint_selectCustomerList');
             window.onafterprint = function(event) {

+ 1271 - 0
public/static/payprint1A5.html

@@ -0,0 +1,1271 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="utf-8" />
+    <link rel="stylesheet" href="../cdn/element-ui/2.13.2/theme-chalk/index.css">
+    <title></title>
+    <style>
+        table tr td {
+            border: 2px solid #333333;
+            padding: 5px 0;
+        }
+        
+        #app {
+            height: 88vh;
+            position: relative;
+        }
+        
+        .simple {
+            height: 120vh !important;
+        }
+        
+        .content {
+            width: 1000px;
+            margin: auto;
+        }
+        
+        table {
+            width: 100%;
+            text-align: center;
+            border-collapse: collapse;
+        }
+        
+        .col-bgc {
+            background: #f6f7fb;
+        }
+        
+        .bottom-row1 {
+            display: flex;
+            justify-content: space-between;
+            margin: 20px 0;
+        }
+        
+        .bottom-row2 {
+            display: flex;
+            margin: 10px 0;
+        }
+        
+        img {
+            width: 80px;
+            height: 80px;
+            /* margin-right: 118px; */
+        }
+        
+        .leftimg {
+            width: 80px;
+            height: 80px;
+            position: absolute;
+            right: 20px;
+            top: 3px;
+        }
+        
+        .config {
+            margin-right: 240px;
+        }
+        
+        .bottom-row3 {
+            margin: 10px 0;
+        }
+        
+        .title {
+            text-align: center;
+            font-size: 24px;
+        }
+        
+        .number {
+            text-align: right;
+            margin-bottom: 10px;
+        }
+        
+        .number1 {
+            text-align: right;
+            margin-bottom: 10px;
+            margin-top: 60px;
+        }
+        
+        .small-row {
+            display: flex;
+        }
+        
+        .small-content {
+            width: 400px;
+            margin: 0 auto;
+            border: 1px solid #ccc;
+            padding: 20px 20px 160px 20px;
+            position: absolute;
+            top: 0;
+            bottom: 0;
+            left: 0;
+            right: 0;
+            margin: auto;
+            height: 650px;
+        }
+        
+        .small-title {
+            text-align: center;
+            font-size: 18px;
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
+        }
+        
+        .small-row {
+            display: flex;
+            justify-content: space-between;
+            margin: 10px;
+        }
+        
+        .small-img {
+            margin-right: 0;
+        }
+        
+        .sign {
+            margin-right: 100px;
+        }
+        
+        .header {
+            display: flex;
+            justify-content: space-between;
+            font-size: 16px;
+            margin: 10px 0;
+        }
+        
+        .header1 {
+            font-size: 24px;
+            /* margin: 30px 60px 10px 60px; */
+            display: flex;
+            justify-content: center;
+        }
+        
+        .line {
+            height: 2px;
+            width: 410px;
+            margin: 3px auto;
+            background: black;
+        }
+        
+        .line:nth-of-type(3) {
+            margin-bottom: 30px;
+        }
+        
+        .header-top {
+            display: flex;
+            justify-content: space-between;
+        }
+        
+        .sfcard {
+            background: red;
+        }
+        
+        .sfcard-content {
+            /*        display: flex;
+        align-items: center;
+        justify-content: space-evenly; */
+        }
+        
+        .sfcard-content img {
+            width: 100%;
+            height: 130vh;
+        }
+        
+        .sfcard-title {
+            font-size: 28px;
+            text-align: center;
+        }
+        
+        .center {
+            height: 140vh;
+        }
+        
+        .part2 {
+            height: 140vh;
+            /* background: red; */
+        }
+        
+        .part5 {
+            width: 100%
+        }
+        
+        .paymentScreenshot {
+            width: 100%;
+            height: 130vh
+        }
+        /* .onlypz-center{
+        height: 130vh;
+      } */
+    </style>
+</head>
+
+<body>
+    <div id="app">
+        <div v-if="selectPrint">
+            <div v-for="(item,index) in printData1" :key="index">
+                <div class="content">
+                    <!-- <div class="part5" v-if="isShowPrintType5">
+                        <div class="header1">
+                            付款回执单
+                        </div>
+                        <img :src="printData1[index].codeUrl" class="paymentScreenshot" />
+                    </div> -->
+                    <div class="center" v-if="isShowPrintType3">
+                        <div class="header1">{{ printData1[index].compName}}结算凭证</div>
+                        <div class="line"></div>
+                        <div class="line"></div>
+                        <div class="header">
+                            <div>单位名称:{{ printData1[index].compName}}</div>
+                            <!-- <div>税务登记编号:91230230MA1BNL7Q93</div> -->
+                        </div>
+                        <div class="header-top">
+                            <div>单位:公斤/元</div>
+                            <div>No.</div>
+                        </div>
+                        <div class="header-top">
+                            <div>开票日期:{{printData1[index].createDate}}</div>
+                            <!-- <div>开票日期:{{new Date(yyyy,mm,dd)}}</div> -->
+                            <div class="number">
+                                {{dealNo(printData1[index].paymentNo)}}
+                            </div>
+                        </div>
+                        <table class="table">
+                            <tr class="row">
+                                <td rowspan="4" class="col col-bgc">买方</td>
+                                <td class="col col-bgc">单位名称</td>
+                                <td class="col" colspan="3">
+                                    {{ printData1[index].compName}}
+                                </td>
+                                <td rowspan="4" class="col col-bgc">卖方</td>
+                                <td class="col col-bgc">姓名</td>
+                                <td class="col" colspan="4">
+                                    {{ printData1[index].customerName}}
+                                </td>
+                            </tr>
+                            <tr class="row">
+                                <td class="col col-bgc">税务登记号</td>
+                                <td class="col" colspan="3">
+                                    {{ printData1[index].taxRegistrationNo}}
+                                </td>
+                                <td class="col col-bgc">身份证号</td>
+                                <td class="col" colspan="4">
+                                    {{ printData1[index].identityAuthenticationInfo.customerNumberCard}}
+                                </td>
+                            </tr>
+                            <tr class="row">
+                                <td class="col col-bgc">业务编号</td>
+                                <td class="col" colspan="3">
+                                    {{ printData1[index].paymentNo}}
+                                </td>
+                                <td class="col col-bgc">卡号</td>
+                                <td class="col" colspan="4">
+                                    {{printData1[index].identityAuthenticationInfo.bankDeposit}}{{printData1[index].identityAuthenticationInfo.bankCard}}
+                                </td>
+                            </tr>
+                            <tr class="row">
+                                <td class="col col-bgc">收货仓库</td>
+                                <td class="col" colspan="3">
+                                    {{printData1[index].warehouseName}}
+                                </td>
+                                <td class="col col-bgc">地址</td>
+                                <td class="col" colspan="4">
+                                    {{printData1[index].identityAuthenticationInfo.compAddress}}
+                                </td>
+                            </tr>
+                            <tr class="row">
+                                <td class="col col-bgc">货名</td>
+                                <td class="col col-bgc">类型</td>
+                                <td class="col col-bgc">等级</td>
+                                <td class="col col-bgc">水分%</td>
+                                <td class="col col-bgc">杂质%</td>
+                                <td class="col col-bgc">{{ printData1[index].goodsName != '大豆'?'容重(克/升)':'蛋白'}}</td>
+                                <td class="col col-bgc">毛重</td>
+                                <td class="col col-bgc">皮重</td>
+                                <td class="col col-bgc">扣杂重</td>
+                                <td class="col col-bgc">净重</td>
+                            </tr>
+                            <tr class="row">
+                                <td class="col">{{ printData1[index].goodsName}}</td>
+                                <td class="col">{{ printData1[index].type}}</td>
+                                <td class="col">
+                                    {{ printData1[index].qualityInspectionManagement.grade}}
+                                </td>
+                                <td class="col">
+                                    {{ printData1[index].qualityInspectionManagement.waterContent}}
+                                </td>
+                                <td class="col">
+                                    {{ printData1[index].qualityInspectionManagement.impurity}}
+                                </td>
+                                <td class="col">
+                                    {{printData1[index].weighingManagement.qualityInspectionManagement?printData1[index].weighingManagement.qualityInspectionManagement.bulkDensity:''}}
+                                </td>
+                                <td class="col">{{ printData1[index].grossWeight}}</td>
+                                <td class="col">{{ printData1[index].tare}}</td>
+                                <td class="col">
+                                    {{printData1[index].weighingManagement?printData1[index].weighingManagement.buckleMiscellaneous:''}}
+                                </td>
+                                <td class="col">{{ printData1[index].netWeight}}</td>
+                            </tr>
+                            <tr class="row">
+                                <td class="col col-bgc">纯重</td>
+                                <td class="col col-bgc" v-if="printData1[index].type == '潮粮'">
+                                    净重单价
+                                </td>
+                                <td class="col col-bgc" v-if="printData1[index].type == '干粮'">
+                                    单价
+                                </td>
+                                <td class="col col-bgc">扣单价</td>
+                                <td class="col col-bgc">粮款</td>
+                                <td class="col col-bgc">称重补助</td>
+                                <td class="col col-bgc">运费补助</td>
+                                <td class="col col-bgc">卸车补助</td>
+                                <td class="col col-bgc">其他补助</td>
+                                <td class="col col-bgc">称重扣款</td>
+                                <td class="col col-bgc">运费扣款</td>
+                            </tr>
+                            <tr class="row">
+                                <td class="col">{{ printData1[index].pureWeight}}</td>
+                                <td class="col " v-if="printData1[index].type == '潮粮'">
+                                    {{printData1[index].tidalGrainPrice}}
+                                </td>
+                                <td class="col " v-if="printData1[index].type == '干粮'">
+                                    {{printData1[index].qualityInspectionManagement.dryGrainPrice}}
+                                </td>
+                                <td class="col ">{{ printData1[index].unitDeduction}}</td>
+                                <td class="col ">{{ printData1[index].grainMoney}}</td>
+                                <td class="col ">{{ printData1[index].weighingSubsidy}}</td>
+                                <td class="col ">{{ printData1[index].freightSubsidy}}</td>
+                                <td class="col ">{{ printData1[index].unloadSubsidy}}</td>
+                                <td class="col ">{{ printData1[index].otherSubsidy}}</td>
+                                <td class="col ">{{ printData1[index].weighingDeduction}}</td>
+                                <td class="col ">{{ printData1[index].freightDeduction}}</td>
+                                <!-- <td class="col ">{{ printData1[index].unloadDeduction}}</td> -->
+                            </tr>
+                            <tr class="row">
+                                <td class="col col-bgc">卸车扣款</td>
+                                <td class="col col-bgc">质量扣款</td>
+                                <td class="col col-bgc">其他扣款</td>
+                                <!-- <td class="col col-bgc" v-if="printData.type == '潮粮'">
+                                    纯重单价
+                                </td> -->
+                                <td class="col col-bgc">合计应付</td>
+                                <td class="col col-bgc">购粮性质</td>
+                                <td class="col col-bgc">车牌号</td>
+                                <td class="col col-bgc" colspan="4">记事</td>
+                            </tr>
+                            <tr class="row">
+                                <td class="col ">{{ printData1[index].unloadDeduction}}</td>
+                                <td class="col ">{{ printData1[index].qualityDeduction}}</td>
+                                <td class="col ">{{ printData1[index].otherDeduction}}</td>
+                                <!-- <td class="col " v-if="printData1[index].type == '潮粮'">
+                                    {{ printData1[index].solidGrainPrice}}
+                                </td> -->
+                                <td class="col ">
+                                    {{ printData1[index].calculationPayable}}
+                                </td>
+                                <td class="col ">
+                                    {{ printData1[index].qualityInspectionManagement.natureOfGrainPurchase}}
+                                </td>
+                                <td class="col ">{{ printData1[index].carNo}}</td>
+                                <td class="col " colspan="4">
+                                    {{ printData1[index].remarks}}
+                                </td>
+                            </tr>
+                            <tr class="row">
+                                <td class="col col-bgc">实付金额</td>
+                                <td class="col " colspan="2">
+                                    {{printData1[index].actualPayment}}
+                                </td>
+                                <td class="col col-bgc" colspan="3">人民币(大写)</td>
+                                <td class="col " colspan="4">
+                                    {{printData1[index].capitalize}}
+                                </td>
+                            </tr>
+                        </table>
+
+                        <div class="bottom">
+                            <div class="bottom-row1">
+                                <div>
+                                    质检:{{ printData1[index].qualityInspectionManagement.qualityInspector}}
+                                </div>
+                                <div>
+                                    毛检:{{ printData1[index].weighingManagement.secretaryWeigher}}
+                                </div>
+                                <div>
+                                    皮检:{{ printData1[index].weighingManagement.skinInspector}}
+                                </div>
+                                <div>结算:{{ printData1[index].settlementClerk}}</div>
+                                <div>付款:{{ printData1[index].cashier}}</div>
+                                <div>复点:{{ }}</div>
+                                <div></div>
+                            </div>
+                            <div class="bottom-row2">
+                                <!-- <div class="left">
+                   <img src="../../../../public/img/add.png" alt="" />
+                 </div> -->
+                                <div class="config">收货单位签名或盖章</div>
+                                <div class="">客户签名</div>
+                            </div>
+                            <!-- <div class="bottom-row3">扫一扫</div> -->
+                            <!-- <div class="bottom-row4">
+                 <el-button type="primary">关闭</el-button>
+                  <el-button type="primary" @click="printSmall">打印小票</el-button>
+                  <el-button type="primary" @click="printBig">打印单据</el-button>
+               </div> -->
+                        </div>
+                    </div>
+                    <div v-if="isShowPrintType4" class="part2">
+                        <div style="height: 120px;">
+
+                            <div class="title">入库检斤单</div>
+                            <!-- <div class="leftimg">
+                                <img :src="printData1[index].weighingManagement.codeUrl" alt="">
+                            </div> -->
+                            <div class="number1">{{printData1[index].weighingManagement.number}}</div>
+                        </div>
+
+                        <table class="table">
+                            <tr class="row">
+                                <td class="col col-bgc">客户姓名</td>
+                                <td class="col" colspan="2">{{printData1[index].weighingManagement.customer}}</td>
+                                <td class="col col-bgc">客户电话</td>
+                                <td class="col">{{printData1[index].weighingManagement.customerPhone}}</td>
+                                <td class="col col-bgc">车牌号</td>
+                                <td class="col" colspan="2">{{printData1[index].weighingManagement.carNumber}}</td>
+                            </tr>
+                            <tr class="row">
+                                <td class="col col-bgc">收货单位</td>
+                                <td class="col" colspan="2">{{printData1[index].weighingManagement.compName}}</td>
+                                <td class="col col-bgc">联系人</td>
+                                <td class="col">{{printData1[index].weighingManagement.person}}</td>
+                                <td class="col col-bgc">联系电话</td>
+                                <td class="col" colspan="2">{{printData1[index].weighingManagement.personPhone}}</td>
+                            </tr>
+                            <tr class="row">
+                                <td class="col col-bgc">货名</td>
+                                <td class="col">{{printData1[index].weighingManagement.goodsName}}</td>
+                                <td class="col col-bgc">类型</td>
+                                <td class="col">{{printData1[index].weighingManagement.type}}</td>
+                                <td class="col col-bgc">{{printData1[index].weighingManagement.goodsName != '大豆'?'容量(克/升)' :'蛋白'}}</td>
+                                <td class="col">
+                                    {{printData1[index].qualityInspectionManagement?printData1[index].qualityInspectionManagement.bulkDensity:''}}
+                                </td>
+                                <td class="col col-bgc">不完善粒(%)</td>
+                                <td class="col">
+                                    {{printData1[index].qualityInspectionManagement?printData1[index].qualityInspectionManagement.imperfectGrain:''}}
+                                </td>
+                            </tr>
+                            <tr class="row">
+                                <td class="col col-bgc">等级</td>
+                                <td class="col">
+                                    {{printData1[index].qualityInspectionManagement?printData1[index].qualityInspectionManagement.grade:''}}
+                                </td>
+                                <td class="col col-bgc">水分(%)</td>
+                                <td class="col">
+                                    {{printData1[index].qualityInspectionManagement?printData1[index].qualityInspectionManagement.waterContent:''}}
+                                </td>
+                                <td class="col col-bgc">热损伤(%)</td>
+                                <td class="col">
+                                    {{printData1[index].qualityInspectionManagement?printData1[index].qualityInspectionManagement.jiaorenli:''}}
+                                </td>
+                                <td class="col col-bgc">质检时间</td>
+                                <td class="col">
+                                    {{printData1[index].qualityInspectionManagement?printData1[index].qualityInspectionManagement.qualityDate:''}}
+                                </td>
+                            </tr>
+                            <tr class="row">
+                                <td class="col col-bgc">杂质(%)</td>
+                                <td class="col">
+                                    {{printData1[index].qualityInspectionManagement?printData1[index].qualityInspectionManagement.impurity:''}}
+                                </td>
+                                <td class="col col-bgc">霉变粒(%)</td>
+                                <td class="col">
+                                    {{printData1[index].qualityInspectionManagement?printData1[index].qualityInspectionManagement.mildewGrain:''}}
+                                </td>
+                                <td class="col col-bgc">扣杂</td>
+                                <td class="col">
+                                    {{printData1[index].qualityInspectionManagement?printData1[index].qualityInspectionManagement.buckleMiscellaneous:''}}
+                                </td>
+                                <td class="col " colspan="2"></td>
+                            </tr>
+                            <tr class="row">
+                                <td class="col col-bgc">毛重(公斤)</td>
+                                <td class="col">{{printData1[index].weighingManagement.grossWeight}}</td>
+                                <td class="col col-bgc">皮重(公斤)</td>
+                                <td class="col">{{printData1[index].weighingManagement.tare}}</td>
+                                <td class="col col-bgc">扣重(公斤)</td>
+                                <td class="col">{{printData1[index].weighingManagement.buckleMiscellaneous}}</td>
+                                <td class="col col-bgc">净重(公斤)</td>
+                                <td class="col">{{printData1[index].weighingManagement.netWeight}}</td>
+                            </tr>
+                            <tr class="row">
+                                <td class="col col-bgc" colspan="2">毛重检斤时间</td>
+                                <td class="col" colspan="2">{{printData1[index].weighingManagement.grossDate}}</td>
+                                <td class="col col-bgc" colspan="2">皮重检斤时间</td>
+                                <td class="col" colspan="2">{{printData1[index].weighingManagement.tareDate}}</td>
+                            </tr>
+                        </table>
+
+                        <div class="bottom">
+                            <div class="bottom-row1">
+                                <div>毛检:{{printData1[index].weighingManagement.secretaryWeigher}}</div>
+                                <div style="margin-left:60px">
+                                    皮检:{{printData1[index].weighingManagement.skinInspector}}
+                                </div>
+                                <!-- <div>{{tableData.qualityDate}}</div> -->
+                            </div>
+                            <div class="bottom-row2">
+                                <!-- <div class="leftimg">
+                    <img src="../img/add.png" alt="">
+                  </div> -->
+                                <div class="config">收货单位签名或盖章:</div>
+                                <div class="autograph">客户签名:</div>
+                            </div>
+                            <!-- <div class="bottom-row3">扫一扫</div> -->
+                        </div>
+                    </div>
+
+                    <div class="part1" v-if="isShowPrintType1">
+                        <div class="sfcard-content">
+                            <div class="sfcard-title">
+                                {{ printData1[index].customerName}}{{printData1[index].identityAuthenticationInfo.customerNumberCard}}
+                            </div>
+                            <img :src="customerList1[index].imgURl.imageUrl1" class="avatar" />
+                        </div>
+                        <!--     <div class="sfcard-content">
+                <div class="sfcard-title">
+                  {{
+                  printData1[index].customerName}}{{printData1[index].identityAuthenticationInfo.customerNumberCard}}
+                </div>
+                <img :src="customerList1[index].imgURl.imageUrl2" class="avatar" />
+              </div> -->
+                    </div>
+                    <div class="bankcard" v-if="isShowPrintType2">
+
+                        <div class="sfcard-content part2">
+                            <div class="sfcard-title">
+                                {{printData1[index].bankDeposit}}{{printData1[index].bankCard}}
+                            </div>
+                            <!-- <img :src="customerList1[index].imgURl.imageUrl3" class="avatar" /> -->
+                            <img v-if="printData1[index].imgURl" :src="printData1[index].imgURl.imageUrl3" class="avatar" />
+                            <img v-else class="avatar" />
+                            <!-- <img v-if="printData1[index].imgURl" :src="printData1[index].imgURl.imageUrl4" class="avatar" />
+                            <img v-else class="avatar" /> -->
+
+                        </div>
+                        <!--          <div class="sfcard-content part2">
+                <div class="sfcard-title">
+                  {{printData1[index].identityAuthenticationInfo.bankDeposit}}{{printData1[index].identityAuthenticationInfo.bankCard}}
+                </div>
+                <img :src="customerList1[index].imgURl.imageUrl4" class="avatar" />
+              </div> -->
+                    </div>
+                </div>
+            </div>
+        </div>
+        <div class="content" v-else>
+            <!-- <div class="part5" v-if="isShowPrintType5">
+                <div class="header1">
+                    付款回执单
+                </div>
+                <img :src="printData.paymentScreenshot" class="paymentScreenshot" />
+            </div> -->
+            <div class="center part1" v-if="isShowPrintType3" :class="!selectPrint? 'simple':''">
+                <div class="header1">{{ printData.compName}}结算凭证</div>
+                <div class="line"></div>
+                <div class="line"></div>
+                <div class="header">
+                    <div>单位名称:{{ printData.compName}}</div>
+                    <!-- <div>税务登记编号:91230230MA1BNL7Q93</div> -->
+                </div>
+                <div class="header-top">
+                    <div>单位:公斤/元</div>
+                    <div>No.</div>
+                </div>
+                <div class="header-top">
+                    <div>开票日期:{{printData.createDate}}</div>
+                    <!-- <div>开票日期:{{new Date(yyyy,mm,dd)}}</div> -->
+                    <div class="number">{{dealNo(printData.paymentNo)}}</div>
+                </div>
+                <table class="table">
+                    <tr class="row">
+                        <td rowspan="4" class="col col-bgc">买方</td>
+                        <td class="col col-bgc">单位名称</td>
+                        <td class="col" colspan="3">{{ printData.compName}}</td>
+                        <td rowspan="4" class="col col-bgc">卖方</td>
+                        <td class="col col-bgc">姓名</td>
+                        <td class="col" colspan="4">{{ printData.customerName}}</td>
+                    </tr>
+                    <tr class="row">
+                        <td class="col col-bgc">税务登记号</td>
+                        <td class="col" colspan="3">{{ printData.taxRegistrationNo}}</td>
+                        <td class="col col-bgc">身份证号</td>
+                        <td class="col" colspan="4">
+                            {{ printData.identityAuthenticationInfo.customerNumberCard}}
+                        </td>
+                    </tr>
+                    <tr class="row">
+                        <td class="col col-bgc">业务编号</td>
+                        <td class="col" colspan="3">{{ printData.paymentNo}}</td>
+                        <td class="col col-bgc">卡号</td>
+                        <td class="col" colspan="4">
+                            {{printData.identityAuthenticationInfo.bankDeposit}}{{printData.identityAuthenticationInfo.bankCard}}
+                        </td>
+                    </tr>
+                    <tr class="row">
+                        <td class="col col-bgc">收货仓库</td>
+                        <td class="col" colspan="3">{{printData.warehouseName}}</td>
+                        <td class="col col-bgc">地址</td>
+                        <td class="col" colspan="4">
+                            {{printData.identityAuthenticationInfo.compAddress}}
+                        </td>
+                    </tr>
+                    <tr class="row">
+                        <td class="col col-bgc">货名</td>
+                        <td class="col col-bgc">类型</td>
+                        <td class="col col-bgc">等级</td>
+                        <td class="col col-bgc">水分%</td>
+                        <td class="col col-bgc">杂质%</td>
+                        <td class="col col-bgc">毛重</td>
+                        <td class="col col-bgc">皮重</td>
+                        <td class="col col-bgc">扣杂重</td>
+                        <td class="col col-bgc">净重</td>
+                        <td class="col col-bgc"></td>
+                        <!-- <td class="col col-bgc">出库净重</td> -->
+                        <!-- <td class="col col-bgc">纯重</td> -->
+                    </tr>
+                    <tr class="row">
+                        <td class="col">{{ printData.goodsName}}</td>
+                        <td class="col">{{ printData.type}}</td>
+                        <td class="col">
+                            {{ printData.qualityInspectionManagement.grade}}
+                        </td>
+                        <td class="col">
+                            {{ printData.qualityInspectionManagement.waterContent}}
+                        </td>
+                        <td class="col">
+                            {{ printData.qualityInspectionManagement.impurity}}
+                        </td>
+                        <td class="col">{{ printData.grossWeight}}</td>
+                        <td class="col">{{ printData.tare}}</td>
+                        <td class="col">
+                            {{ printData.weighingManagement.buckleMiscellaneous}}
+                        </td>
+                        <td class="col">{{ printData.netWeight}}</td>
+                        <td class="col"></td>
+                        <!-- <td class="col">{{ printData.pureWeight}}</td> -->
+                    </tr>
+                    <tr class="row">
+                        <td class="col col-bgc">纯重</td>
+                        <td class="col col-bgc" v-if="printData.type == '潮粮'">
+                            净重单价
+                        </td>
+                        <td class="col col-bgc" v-if="printData.type == '干粮'">单价</td>
+                        <td class="col col-bgc">扣单价</td>
+                        <td class="col col-bgc">粮款</td>
+                        <td class="col col-bgc">称重补助</td>
+                        <td class="col col-bgc">运费补助</td>
+                        <td class="col col-bgc">卸车补助</td>
+                        <td class="col col-bgc">其他补助</td>
+                        <td class="col col-bgc">称重扣款</td>
+                        <td class="col col-bgc">运费扣款</td>
+                        <!-- <td class="col col-bgc">1卸车扣款</td> -->
+                    </tr>
+                    <tr class="row">
+                        <td class="col">{{ printData.pureWeight}}</td>
+                        <td class="col " v-if="printData.type == '潮粮'">
+                            {{printData.tidalGrainPrice}}
+                        </td>
+                        <td class="col " v-if="printData.type == '干粮'">
+                            {{printData.qualityInspectionManagement.dryGrainPrice}}
+                        </td>
+                        <td class="col ">{{ printData.unitDeduction}}</td>
+                        <td class="col ">{{ printData.grainMoney}}</td>
+                        <td class="col ">{{ printData.weighingSubsidy}}</td>
+                        <td class="col ">{{ printData.freightSubsidy}}</td>
+                        <td class="col ">{{ printData.unloadSubsidy}}</td>
+                        <td class="col ">{{ printData.otherSubsidy}}</td>
+                        <td class="col ">{{ printData.weighingDeduction}}</td>
+                        <td class="col ">{{ printData.freightDeduction}}</td>
+                        <!-- <td class="col ">{{ printData.unloadDeduction}}</td> -->
+                    </tr>
+                    <tr class="row">
+                        <td class="col col-bgc">卸车扣款</td>
+                        <td class="col col-bgc">质量扣款</td>
+                        <td class="col col-bgc">其他扣款</td>
+                        <!-- <td class="col col-bgc" v-if="printData.type == '潮粮'">
+                            纯重单价
+                        </td> -->
+                        <td class="col col-bgc">合计应付</td>
+                        <td class="col col-bgc">购粮性质</td>
+                        <td class="col col-bgc">车牌号</td>
+                        <td class="col col-bgc" colspan="4">记事</td>
+                    </tr>
+                    <tr class="row">
+                        <td class="col ">{{ printData.unloadDeduction}}</td>
+                        <td class="col ">{{ printData.qualityDeduction}}</td>
+                        <td class="col ">{{ printData.otherDeduction}}</td>
+                        <!-- <td class="col " v-if="printData.type == '潮粮'">
+                            {{ printData.solidGrainPrice}}
+                        </td> -->
+                        <td class="col ">{{ printData.calculationPayable}}</td>
+                        <td class="col ">
+                            {{ printData.qualityInspectionManagement.natureOfGrainPurchase}}
+                        </td>
+                        <td class="col ">{{ printData.carNo}}</td>
+                        <td class="col " colspan="4">{{ printData.remarks}}</td>
+                    </tr>
+                    <tr class="row">
+                        <td class="col col-bgc">实付金额</td>
+                        <td class="col " colspan="2">{{printData.actualPayment}}</td>
+                        <td class="col col-bgc" colspan="3">人民币(大写)</td>
+                        <td class="col " colspan="4">{{printData.capitalize}}</td>
+                    </tr>
+                </table>
+                <div class="bottom">
+                    <div class="bottom-row1">
+                        <div>
+                            质检:{{ printData.qualityInspectionManagement.qualityInspector}}
+                        </div>
+                        <div>
+                            毛检:{{ printData.weighingManagement.secretaryWeigher}}
+                        </div>
+                        <div>皮检:{{ printData.weighingManagement.skinInspector}}</div>
+                        <div>结算:{{ printData.settlementClerk}}</div>
+                        <div>付款:{{ printData.cashier}}</div>
+                        <div>复点:{{ }}</div>
+                        <div></div>
+                    </div>
+                    <div class="bottom-row2">
+                        <!-- <div class="left">
+               <img src="../../../../public/img/add.png" alt="" />
+             </div> -->
+                        <div class="config">收货单位签名或盖章</div>
+                        <div class="">客户签名</div>
+                    </div>
+                    <!-- <div class="bottom-row3">扫一扫</div> -->
+                    <!-- <div class="bottom-row4">
+             <el-button type="primary">关闭</el-button>
+              <el-button type="primary" @click="printSmall">打印小票</el-button>
+              <el-button type="primary" @click="printBig">打印单据</el-button>
+           </div> -->
+                </div>
+            </div>
+
+            <div v-if="isShowPrintType4" class="part2">
+                <div>
+
+                    <div class="title">入库检斤单</div>
+                    <!-- <div class="leftimg">
+                        <img :src="tableData.codeUrl" alt="">
+                    </div> -->
+                    <div class="number1">{{tableData.number}}</div>
+                </div>
+                <table class="table">
+                    <tr class="row">
+                        <td class="col col-bgc">客户姓名</td>
+                        <td class="col" colspan="2">{{tableData.customer}}</td>
+                        <td class="col col-bgc">客户电话</td>
+                        <td class="col">{{tableData.customerPhone}}</td>
+                        <td class="col col-bgc">车牌号</td>
+                        <td class="col" colspan="2">{{tableData.carNumber}}</td>
+                    </tr>
+                    <tr class="row">
+                        <td class="col col-bgc">收货单位</td>
+                        <td class="col" colspan="2">{{tableData.compName}}</td>
+                        <td class="col col-bgc">联系人</td>
+                        <td class="col">{{tableData.person}}</td>
+                        <td class="col col-bgc">联系电话</td>
+                        <td class="col" colspan="2">{{tableData.personPhone}}</td>
+                    </tr>
+                    <tr class="row">
+                        <td class="col col-bgc">货名</td>
+                        <td class="col">{{tableData.goodsName}}</td>
+                        <td class="col col-bgc">类型</td>
+                        <td class="col">{{tableData.type}}</td>
+                        <td class="col col-bgc">{{tableData.goodsName!= '大豆'?'容量(克/升)':'蛋白'}}</td>
+                        <td class="col">
+                            {{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.bulkDensity:''}}
+                        </td>
+                        <td class="col col-bgc">不完善粒(%)</td>
+                        <td class="col">
+                            {{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.imperfectGrain:''}}
+                        </td>
+                    </tr>
+                    <tr class="row">
+                        <td class="col col-bgc">等级</td>
+                        <td class="col">
+                            {{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.grade:''}}
+                        </td>
+                        <td class="col col-bgc">水分(%)</td>
+                        <td class="col">
+                            {{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.waterContent:''}}
+                        </td>
+                        <td class="col col-bgc">热损伤(%)</td>
+                        <td class="col">
+                            {{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.jiaorenli:''}}
+                        </td>
+                        <td class="col col-bgc">质检时间</td>
+                        <td class="col">
+                            {{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.qualityDate:''}}
+                        </td>
+                    </tr>
+                    <tr class="row">
+                        <td class="col col-bgc">杂质(%)</td>
+                        <td class="col">
+                            {{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.impurity:''}}
+                        </td>
+                        <td class="col col-bgc">霉变粒(%)</td>
+                        <td class="col">
+                            {{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.mildewGrain:''}}
+                        </td>
+                        <td class="col col-bgc">扣杂</td>
+                        <td class="col">
+                            {{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.buckleMiscellaneous:''}}
+                        </td>
+                        <td class="col " colspan="2"></td>
+                    </tr>
+                    <tr class="row">
+                        <td class="col col-bgc">毛重(公斤)</td>
+                        <td class="col">{{tableData.grossWeight}}</td>
+                        <td class="col col-bgc">皮重(公斤)</td>
+                        <td class="col">{{tableData.tare}}</td>
+                        <td class="col col-bgc">扣重(公斤)</td>
+                        <td class="col">{{tableData.buckleMiscellaneous}}</td>
+                        <td class="col col-bgc">净重(公斤)</td>
+                        <td class="col">{{tableData.netWeight}}</td>
+                    </tr>
+                    <tr class="row">
+                        <td class="col col-bgc" colspan="2">毛重检斤时间</td>
+                        <td class="col" colspan="2">{{tableData.grossDate}}</td>
+                        <td class="col col-bgc" colspan="2">皮重检斤时间</td>
+                        <td class="col" colspan="2">{{tableData.tareDate}}</td>
+                    </tr>
+                </table>
+
+                <div class="bottom">
+                    <div class="bottom-row1">
+                        <div>毛检:{{tableData.secretaryWeigher}}</div>
+                        <div style="margin-left:60px">
+                            皮检:{{tableData.skinInspector}}
+                        </div>
+                        <!-- <div>{{tableData.qualityDate}}</div> -->
+                    </div>
+                    <div class="bottom-row2">
+                        <!-- <div class="left">
+                <img src="../img/add.png" alt="">
+              </div> -->
+                        <div class="config">收货单位签名或盖章:</div>
+                        <div class="autograph">客户签名:</div>
+                    </div>
+                    <!-- <div class="bottom-row3">扫一扫</div> -->
+                </div>
+            </div>
+
+            <div class="sfcard part3" v-if="isShowPrintType1">
+                <div class="sfcard-content">
+                    <div class="sfcard-title">
+                        {{ printData.customerName}}{{ printData.identityAuthenticationInfo.customerNumberCard}}
+                    </div>
+                    <img :src="imageUrl1" class="avatar" />
+                </div>
+                <!-- <div class="sfcard-content">
+                    <div class="sfcard-title">
+                        {{ printData.customerName}}{{ printData.identityAuthenticationInfo.customerNumberCard}}
+                    </div>
+                    <img :src="imageUrl2" class="avatar" />
+                </div> -->
+            </div>
+
+            <div class="bankcard part4" v-if="isShowPrintType2">
+                <div class="sfcard-content">
+                    <div class="sfcard-title">
+                        {{printData.bankDeposit}}{{printData.bankCard}}
+                    </div>
+                    <img :src="imageUrl3" class="avatar" />
+                </div>
+                <!-- <div class="sfcard-content">
+                    <div class="sfcard-title">
+                        {{printData.bankDeposit}}{{printData.bankCard}}
+                    </div>
+                    <img :src="imageUrl4" class="avatar" />
+                </div> -->
+
+            </div>
+        </div>
+
+        <div class="small-content" v-if="smallContent">
+            <div class="small-title">
+                <div>
+                    {{printData.compName}}结算凭证
+                </div>
+                <img class="small-img" src="../img/add.png" alt="" />
+            </div>
+            <div class="small-row">
+                <div>开票日期</div>
+                <div>{{printData.createDate}}</div>
+            </div>
+            <div class="small-row">
+                <div>买方单位名称</div>
+                <div>{{printData.compName}}</div>
+            </div>
+            <div class="small-row">
+                <div>买方姓名</div>
+                <div>{{printData.customerName}}</div>
+            </div>
+            <div class="small-row">
+                <div>税务登记号</div>
+                <div>{{printData.taxRegistrationNo}}</div>
+            </div>
+            <div class="small-row">
+                <div>身份证号</div>
+                <div>{{printData.customerNumberCard}}</div>
+            </div>
+            <div class="small-row">
+                <div>化验单号</div>
+                <div>{{printData.paymentNo}}</div>
+            </div>
+            <div class="small-row">
+                <div>卡号</div>
+                <div>{{printData.bankCard}}</div>
+            </div>
+            <div class="small-row">
+                <div>收货仓库</div>
+                <div>{{printData.warehouseName}}</div>
+            </div>
+            <div class="small-row">
+                <div>货名</div>
+                <div>{{printData.goodsName}}</div>
+            </div>
+            <div class="small-row">
+                <div>类型</div>
+                <div>{{printData.type}}</div>
+            </div>
+            <div class="small-row">
+                <div>等级</div>
+                <div>{{printData.grade}}</div>
+            </div>
+            <div class="small-row">
+                <div>水分%</div>
+                <div>{{printData.waterContent}}</div>
+            </div>
+            <div class="small-row">
+                <div>杂质%</div>
+                <div>{{printData.impurity}}</div>
+            </div>
+            <div class="small-row">
+                <div>毛重</div>
+                <div>{{printData.grossWeight}}</div>
+            </div>
+            <div class="small-row">
+                <div>皮重</div>
+                <div>{{printData.tare}}</div>
+            </div>
+            <div class="small-row">
+                <div>扣杂重</div>
+                <div>{{printData.weighingManagement.buckleMiscellaneous}}</div>
+            </div>
+            <div class="small-row">
+                <div>净重</div>
+                <div>{{printData.netWeight}}</div>
+            </div>
+            <div class="small-row">
+                <div>纯重</div>
+                <div>{{printData.pureWeight}}</div>
+            </div>
+            <div class="small-row">
+                <div>净重单价</div>
+                <div>{{printData.tidalGrainPrice}}</div>
+            </div>
+            <div class="small-row">
+                <div>粮款</div>
+                <div>{{printData.grainMoney}}</div>
+            </div>
+            <div class="small-row">
+                <div>称重补助</div>
+                <div>{{printData.weighingSubsidy}}</div>
+            </div>
+            <div class="small-row">
+                <div>运费补助</div>
+                <div>{{printData.freightSubsidy}}</div>
+            </div>
+            <div class="small-row">
+                <div>卸车补助</div>
+                <div>{{printData.unloadSubsidy}}</div>
+            </div>
+            <div class="small-row">
+                <div>其他补助</div>
+                <div>{{printData.otherSubsidy}}</div>
+            </div>
+            <div class="small-row">
+                <div>称重扣款</div>
+                <div>{{printData.weighingDeduction}}</div>
+            </div>
+            <div class="small-row">
+                <div>运费扣款</div>
+                <div>{{printData.freightDeduction}}</div>
+            </div>
+            <div class="small-row">
+                <div>卸车扣款</div>
+                <div>{{printData.unloadDeduction}}</div>
+            </div>
+            <div class="small-row">
+                <div>质量扣款</div>
+                <div>{{printData.qualityDeduction}}</div>
+            </div>
+            <div class="small-row">
+                <div>其他扣款</div>
+                <div>{{printData.otherDeduction}}</div>
+            </div>
+            <div class="small-row">
+                <div>纯重单价</div>
+                <div>{{printData.solidGrainPrice}}</div>
+            </div>
+            <div class="small-row">
+                <div>合计应付</div>
+                <div>{{printData.calculationPayable}}</div>
+            </div>
+            <div class="small-row">
+                <div>购粮性质</div>
+                <div>{{printData.natureOfGrainPurchase}}</div>
+            </div>
+            <div class="small-row">
+                <div>车牌号</div>
+                <div>{{printData.carNo}}</div>
+            </div>
+            <div class="small-row">
+                <div>记事</div>
+                <div>{{printData.remarks}}</div>
+            </div>
+            <div class="small-row">
+                <div>实付金额</div>
+                <div>{{printData.actualPayment}}</div>
+            </div>
+            <div class="small-row">
+                <div>人民币(大写)</div>
+                <div>{{printData.capitalize}}</div>
+            </div>
+            <div class="small-row">
+                <div>质检</div>
+                <div>{{printData.qualityInspector}}</div>
+            </div>
+            <div class="small-row">
+                <div>毛检</div>
+                <div>{{printData.secretaryWeigher}}</div>
+            </div>
+            <div class="small-row">
+                <div>皮检</div>
+                <div>{{printData.skinInspector}}</div>
+            </div>
+            <div class="small-row">
+                <div>结算</div>
+                <div>{{printData.settlementClerk}}</div>
+            </div>
+            <div class="small-row">
+                <div>付款</div>
+                <div>{{printData.actualPayment}}</div>
+            </div>
+            <div class="small-row">
+                <div>复点</div>
+                <div>&nbsp;&nbsp;&nbsp;</div>
+            </div>
+        </div>
+    </div>
+</body>
+<script src="../cdn/vue/2.6.10/vue.min.js"></script>
+<script src="../cdn/element-ui/2.13.2/index.js"></script>
+<script type="text/javascript">
+    new Vue({
+        el: '#app',
+        data: {
+            isShowPrintType1: false,
+            isShowPrintType2: false,
+            isShowPrintType3: false,
+            isShowPrintType4: false,
+            isShowPrintType5: false,
+            showType: [],
+            printData: {},
+            printData1: [],
+            customerList: {},
+            customerList1: [],
+            name: '',
+            bigContent: false,
+            smallContent: false,
+            date: '',
+            imageUrl1: '',
+            imageUrl2: '',
+            imageUrl3: '',
+            imageUrl4: '',
+            identity: [],
+            bank: [],
+            selectPrint: false,
+            onlyShowPz: false,
+            tableData: []
+        },
+        computed: {},
+        methods: {
+            dealNo(str) {
+                return str.slice(4)
+            },
+            tableRowClassName({
+                row,
+                rowIndex
+            }) {
+                if (rowIndex === 1) {
+                    return 'warning-row'
+                } else if (rowIndex === 3) {
+                    return 'success-row'
+                }
+                return ''
+            },
+            getQueryVariable(variable) {
+                var query = window.location.search.substring(1)
+                var vars = query.split('&')
+                for (var i = 0; i < vars.length; i++) {
+                    var pair = vars[i].split('=')
+                    if (pair[0] == variable) {
+                        return pair[1]
+                    }
+                }
+                return false
+            },
+            printSmall() {},
+            printBig() {}
+        },
+        mounted() {
+            this.date = new Date().toLocaleString()
+                // let _data = decodeURIComponent(this.getQueryVariable('dataList'))
+            let _data = {}
+            if (localStorage.getItem('print_pay_data')) {
+                _data = localStorage.getItem('print_pay_data')
+            } else {
+                _data = decodeURIComponent(this.getQueryVariable("dataList"))
+            }
+            if (!_data || _data == 'false') {
+                this.selectPrint = true
+                this.printData1 = JSON.parse(
+                    localStorage.getItem('selectPrint_selectPrintList')
+                )
+                console.log("对象", this.printData1)
+                console.log("对象", this.printData)
+                for (let i = 0; i < this.printData1.length; i++) {
+                    if (!this.printData1[i].identityAuthenticationInfo.compAddress) this.printData1[i]
+                        .identityAuthenticationInfo.compAddress = ''
+                    if (this.printData1[i].identityAuthenticationInfo.compAddress.length > 24) {
+                        this.printData1[i].identityAuthenticationInfo.compAddress = this.printData1[i]
+                            .identityAuthenticationInfo
+                            .compAddress.substring(0, 24)
+                    }
+                }
+            } else {
+                this.printData = JSON.parse(_data)
+                    //地址过长截取
+                if (this.printData.identityAuthenticationInfo && this.printData.identityAuthenticationInfo.compAddress.length > 24) {
+                    this.printData.identityAuthenticationInfo.compAddress = this.printData.identityAuthenticationInfo
+                        .compAddress.substring(0, 24)
+                }
+                this.selectPrint = false
+            }
+            let _type = decodeURIComponent(this.getQueryVariable('type'))
+            this.showType = decodeURIComponent(
+                    this.getQueryVariable('printTypeList')
+                )
+                // this.pzList = this.showType.split(',')
+                // if((this.showType.indexOf('打印结算凭证')>-1)&&this.pzList.length==1){
+                //   this.onlyShowPz = true
+                // }
+                // this.pageType = decodeURIComponent(this.getQueryVariable('printTypeList'))
+            let _data1 = decodeURIComponent(this.getQueryVariable('customerList'))
+            if (!_data1) {
+                this.customerList1 = JSON.parse(
+                    localStorage.getItem('selectPrint_selectCustomerList')
+                )
+            } else {
+                this.customerList = JSON.parse(_data1)
+            }
+            console.log('cwprint', localStorage.getItem('cwprint'))
+            var cwprint = localStorage.getItem('cwprint')
+            if (cwprint == 'true') {
+                if (this.selectPrint) {
+                    for (let i = 0; i < this.customerList1.length; i++) {
+                        let _url1 = this.customerList1[i].cardAddressUrl.split(',')
+                            // let _url2 = this.customerList1[i].payeeAddressUrl.split(',')
+                        this.customerList1[i].imgURl = {
+                            imageUrl1: _url1[0],
+                            imageUrl2: _url1[1],
+                            // imageUrl3: _url2[0],
+                            // imageUrl4: _url2[0]
+                        }
+                    }
+                    for (let i = 0; i < this.printData1.length; i++) {
+                        if (this.printData1[i].payeeAddressUrl) {
+                            let _url2 = this.printData1[i].payeeAddressUrl.split(',')
+                            this.printData1[i].imgURl = {
+                                imageUrl3: _url2[0],
+                                imageUrl4: _url2[1]
+                            }
+                        }
+
+                    }
+                } else {
+                    if (this.customerList.cardAddressUrl) {
+                        this.identity = this.customerList.cardAddressUrl.split(',')
+                        this.imageUrl1 = this.identity[0]
+                        this.imageUrl2 = this.identity[1]
+                    }
+                    console.log(this.customerList)
+                    if (this.customerList.payeeAddressUrl) {
+                        this.bank = this.customerList.payeeAddressUrl.split(',')
+                        this.imageUrl3 = this.bank[0]
+                        this.imageUrl4 = this.bank[1]
+                    }
+                    if (this.printData.payeeAddressUrl) {
+                        this.bank = this.printData.payeeAddressUrl.split(',')
+                        this.imageUrl3 = this.bank[0]
+                        this.imageUrl4 = this.bank[1]
+                    }
+
+                    this.tableData = this.printData.weighingManagement
+                }
+                let _lsit = this.showType.split(',')
+                for (let i = 0; i < _lsit.length; i++) {
+                    switch (_lsit[i]) {
+                        case '打印身份证':
+                            this.isShowPrintType1 = !this.isShowPrintType1
+                            break
+                        case '打印银行卡':
+                            this.isShowPrintType2 = !this.isShowPrintType2
+                            break
+                        case '打印结算凭证':
+                            this.isShowPrintType3 = !this.isShowPrintType3
+                            break
+                        case '打印检斤单':
+                            this.isShowPrintType4 = !this.isShowPrintType4
+                            break
+                        case '打印回执单':
+                            this.isShowPrintType5 = !this.isShowPrintType5
+                            break
+                    }
+                }
+            } else {
+                this.isShowPrintType3 = true
+            }
+            if (_type == 2) {
+                this.bigContent = true
+                this.smallContent = false
+            } else {
+                this.smallContent = true
+                this.bigContent = false
+            }
+            if (this.printData.compName == undefined) this.printData.compName = ''
+            document.title = this.printData.compName + '结算凭证'
+            window.print()
+                // sessionStorage.removeItem('selectPrint_selectPrintList');
+                // sessionStorage.removeItem('selectPrint_selectCustomerList');
+            window.onafterprint = function(event) {
+                window.history.back(-1)
+            }
+        },
+        watch: {}
+    })
+</script>
+
+</html>

+ 69 - 86
public/static/payprint2.html

@@ -10,48 +10,48 @@
             border: 2px solid #333333;
             padding: 5px 0;
         }
-
+        
         #app {
             height: 88vh;
             position: relative;
         }
-
+        
         .simple {
-            height: 100vh !important;
+            height: 120vh !important;
         }
-
+        
         .content {
             width: 1000px;
             margin: auto;
         }
-
+        
         table {
             width: 100%;
             text-align: center;
             border-collapse: collapse;
         }
-
+        
         .col-bgc {
             background: #f6f7fb;
         }
-
+        
         .bottom-row1 {
             display: flex;
             justify-content: space-between;
             margin: 20px 0;
         }
-
+        
         .bottom-row2 {
             display: flex;
             margin: 10px 0;
         }
-
+        
         img {
             width: 80px;
             height: 80px;
             /* margin-right: 118px; */
         }
-
+        
         .leftimg {
             width: 80px;
             height: 80px;
@@ -59,35 +59,35 @@
             right: 20px;
             top: 3px;
         }
-
+        
         .config {
             margin-right: 240px;
         }
-
+        
         .bottom-row3 {
             margin: 10px 0;
         }
-
+        
         .title {
             text-align: center;
             font-size: 24px;
         }
-
+        
         .number {
             text-align: right;
             margin-bottom: 10px;
         }
-
+        
         .number1 {
             text-align: right;
             margin-bottom: 10px;
             margin-top: 60px;
         }
-
+        
         .small-row {
             display: flex;
         }
-
+        
         .small-content {
             width: 400px;
             margin: 0 auto;
@@ -101,7 +101,7 @@
             margin: auto;
             height: 650px;
         }
-
+        
         .small-title {
             text-align: center;
             font-size: 18px;
@@ -109,99 +109,88 @@
             justify-content: space-between;
             align-items: center;
         }
-
+        
         .small-row {
             display: flex;
             justify-content: space-between;
             margin: 10px;
         }
-
+        
         .small-img {
             margin-right: 0;
         }
-
+        
         .sign {
             margin-right: 100px;
         }
-
+        
         .header {
             display: flex;
             justify-content: space-between;
             font-size: 16px;
             margin: 10px 0;
         }
-
+        
         .header1 {
             font-size: 24px;
             /* margin: 30px 60px 10px 60px; */
             display: flex;
             justify-content: center;
         }
-
+        
         .line {
             height: 2px;
             width: 410px;
             margin: 3px auto;
             background: black;
         }
-
+        
         .line:nth-of-type(3) {
             margin-bottom: 30px;
         }
-
+        
         .header-top {
             display: flex;
             justify-content: space-between;
         }
-
+        
         .sfcard {
-            /* background: red; */
+            background: red;
         }
-
+        
         .sfcard-content {
             /*        display: flex;
         align-items: center;
         justify-content: space-evenly; */
-            /* background-color: red; */
-            /* height: 100vh; */
-        }
-        .sfcard-content_other{
-              height: 100vh;
         }
         
-
-        .sfcard-content img ,.sfcard-content_other img{
+        .sfcard-content img {
             width: 100%;
-            height: calc(100vh - 100px);
+            height: 90vh;
         }
-
+        
         .sfcard-title {
             font-size: 28px;
             text-align: center;
         }
-
+        
         .center {
-            height: 100vh;
+            height: 99.5vh;
         }
-
+        
         .part2 {
-            height: 100vh;
+            height: 99.5vh;
             /* background: red; */
         }
-
+        
         .part5 {
             width: 100%
         }
-
+        
         .paymentScreenshot {
             width: 100%;
             height: 130vh
         }
-        .bankCard_css{
-            width: 100%;
-            height: 100vh;
-        }
-
         /* .onlypz-center{
         height: 130vh;
       } */
@@ -287,7 +276,7 @@
                                 <td class="col col-bgc">等级</td>
                                 <td class="col col-bgc">水分%</td>
                                 <td class="col col-bgc">杂质%</td>
-                                <td class="col col-bgc">容重(克/升)</td>
+                                <td class="col col-bgc">{{printData1[index].goodsName != '大豆'? '容重(克/升)': '蛋白'}}</td>
                                 <td class="col col-bgc">毛重</td>
                                 <td class="col col-bgc">皮重</td>
                                 <td class="col col-bgc">扣杂重</td>
@@ -306,7 +295,7 @@
                                     {{ printData1[index].qualityInspectionManagement.impurity}}
                                 </td>
                                 <td class="col">
-                                    {{printData1[index].weighingManagement.qualityInspectionManagement?printData1[index].weighingManagement.qualityInspectionManagement.bulkDensity:''}}
+                                    {{printData1[index].qualityInspectionManagement?printData1[index].qualityInspectionManagement.bulkDensity:''}}
                                 </td>
                                 <td class="col">{{ printData1[index].grossWeight}}</td>
                                 <td class="col">{{ printData1[index].tare}}</td>
@@ -455,7 +444,7 @@
                                 <td class="col">{{printData1[index].weighingManagement.goodsName}}</td>
                                 <td class="col col-bgc">类型</td>
                                 <td class="col">{{printData1[index].weighingManagement.type}}</td>
-                                <td class="col col-bgc">容量(克/升)</td>
+                                <td class="col col-bgc">{{printData1[index].weighingManagement.goodsName != '大豆' ? '容量(克/升)' : '蛋白'}}</td>
                                 <td class="col">
                                     {{printData1[index].qualityInspectionManagement?printData1[index].qualityInspectionManagement.bulkDensity:''}}
                                 </td>
@@ -535,10 +524,9 @@
                     </div>
 
                     <div class="part1" v-if="isShowPrintType1">
-                        <div class="sfcard-content_other">
+                        <div class="sfcard-content">
                             <div class="sfcard-title">
-                                {{
-                                printData1[index].customerName}}{{printData1[index].identityAuthenticationInfo.customerNumberCard}}
+                                {{ printData1[index].customerName}}{{printData1[index].identityAuthenticationInfo.customerNumberCard}}
                             </div>
                             <img :src="customerList1[index].imgURl.imageUrl1" class="avatar" />
                         </div>
@@ -551,22 +539,17 @@
               </div> -->
                     </div>
                     <div class="bankcard" v-if="isShowPrintType2">
-                        <div class="sfcard-content">
+
+                        <div class="sfcard-content part2">
                             <div class="sfcard-title">
                                 {{printData1[index].bankDeposit}}{{printData1[index].bankCard}}
                             </div>
                             <!-- <img :src="customerList1[index].imgURl.imageUrl3" class="avatar" /> -->
-                            <div class="bankCard_css">
-                                <img v-if="printData1[index].imgURl" :src="printData1[index].imgURl.imageUrl3"
-                                class="avatar" />
+                            <img v-if="printData1[index].imgURl" :src="printData1[index].imgURl.imageUrl3" class="avatar" />
                             <img v-else class="avatar" />
+                            <!-- <img v-if="printData1[index].imgURl" :src="printData1[index].imgURl.imageUrl4" class="avatar" />
+                            <img v-else class="avatar" /> -->
 
-                            </div>
-                            <div class="bankCard_css">
-                                <img v-if="printData1[index].imgURl" :src="printData1[index].imgURl.imageUrl4"
-                                class="avatar" />
-                                <img v-else class="avatar" />
-                            </div>
                         </div>
                         <!--          <div class="sfcard-content part2">
                 <div class="sfcard-title">
@@ -798,7 +781,7 @@
                         <td class="col">{{tableData.goodsName}}</td>
                         <td class="col col-bgc">类型</td>
                         <td class="col">{{tableData.type}}</td>
-                        <td class="col col-bgc">容量(克/升)</td>
+                        <td class="col col-bgc">{{tableData.goodsName!= '大豆' ? '容量(克/升)' : '蛋白'}}</td>
                         <td class="col">
                             {{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.bulkDensity:''}}
                         </td>
@@ -884,12 +867,12 @@
                     </div>
                     <img :src="imageUrl1" class="avatar" />
                 </div>
-                <div class="sfcard-content">
+                <!-- <div class="sfcard-content">
                     <div class="sfcard-title">
                         {{ printData.customerName}}{{ printData.identityAuthenticationInfo.customerNumberCard}}
                     </div>
                     <img :src="imageUrl2" class="avatar" />
-                </div>
+                </div> -->
             </div>
 
             <div class="bankcard part4" v-if="isShowPrintType2">
@@ -899,12 +882,12 @@
                     </div>
                     <img :src="imageUrl3" class="avatar" />
                 </div>
-                <div class="sfcard-content">
+                <!-- <div class="sfcard-content">
                     <div class="sfcard-title">
                         {{printData.bankDeposit}}{{printData.bankCard}}
                     </div>
                     <img :src="imageUrl4" class="avatar" />
-                </div>
+                </div> -->
 
             </div>
         </div>
@@ -1144,12 +1127,12 @@
                 }
                 return false
             },
-            printSmall() { },
-            printBig() { }
+            printSmall() {},
+            printBig() {}
         },
         mounted() {
             this.date = new Date().toLocaleString()
-            // let _data = decodeURIComponent(this.getQueryVariable('dataList'))
+                // let _data = decodeURIComponent(this.getQueryVariable('dataList'))
             let _data = {}
             if (localStorage.getItem('print_pay_data')) {
                 _data = localStorage.getItem('print_pay_data')
@@ -1174,7 +1157,7 @@
                 }
             } else {
                 this.printData = JSON.parse(_data)
-                //地址过长截取
+                    //地址过长截取
                 if (this.printData.identityAuthenticationInfo && this.printData.identityAuthenticationInfo.compAddress.length > 24) {
                     this.printData.identityAuthenticationInfo.compAddress = this.printData.identityAuthenticationInfo
                         .compAddress.substring(0, 24)
@@ -1183,13 +1166,13 @@
             }
             let _type = decodeURIComponent(this.getQueryVariable('type'))
             this.showType = decodeURIComponent(
-                this.getQueryVariable('printTypeList')
-            )
-            // this.pzList = this.showType.split(',')
-            // if((this.showType.indexOf('打印结算凭证')>-1)&&this.pzList.length==1){
-            //   this.onlyShowPz = true
-            // }
-            // this.pageType = decodeURIComponent(this.getQueryVariable('printTypeList'))
+                    this.getQueryVariable('printTypeList')
+                )
+                // this.pzList = this.showType.split(',')
+                // if((this.showType.indexOf('打印结算凭证')>-1)&&this.pzList.length==1){
+                //   this.onlyShowPz = true
+                // }
+                // this.pageType = decodeURIComponent(this.getQueryVariable('printTypeList'))
             let _data1 = decodeURIComponent(this.getQueryVariable('customerList'))
             if (!_data1) {
                 this.customerList1 = JSON.parse(
@@ -1203,8 +1186,8 @@
             if (cwprint == 'true') {
                 if (this.selectPrint) {
                     for (let i = 0; i < this.customerList1.length; i++) {
-                        let _url1 = this.customerList1[i].cardAddressUrl.split(',')
-                        // let _url2 = this.customerList1[i].payeeAddressUrl.split(',')
+                        let _url1 = this.customerList1[i].identityAuthenticationInfo.cardAddressUrl.split(',')
+                            // let _url2 = this.customerList1[i].payeeAddressUrl.split(',')
                         this.customerList1[i].imgURl = {
                             imageUrl1: _url1[0],
                             imageUrl2: _url1[1],
@@ -1275,9 +1258,9 @@
             if (this.printData.compName == undefined) this.printData.compName = ''
             document.title = this.printData.compName + '结算凭证'
             window.print()
-            // sessionStorage.removeItem('selectPrint_selectPrintList');
-            // sessionStorage.removeItem('selectPrint_selectCustomerList');
-            window.onafterprint = function (event) {
+                // sessionStorage.removeItem('selectPrint_selectPrintList');
+                // sessionStorage.removeItem('selectPrint_selectCustomerList');
+            window.onafterprint = function(event) {
                 window.history.back(-1)
             }
         },

+ 12 - 2
public/static/print.html

@@ -152,10 +152,10 @@
     <div id="app">
       <div class="content"  v-if="type == 1"><!--容重打印-->
         <div class="title">
-          <div class="name">{{name}}价格对照表(按容重)</div>
+          <div class="name">{{name}}{{name != '大豆'? '价格对照表(按容重)' : '价格对照表(按蛋白)'}}</div>
           <div class="price">价格单位:元/公斤</div>
         </div>
-        <div class="table-row">
+        <div class="table-row" v-show="name != '大豆'">
           <el-table :data="tableData" :row-class-name="tableRowClassName" >
             <el-table-column prop="bulkDensityMax" label="容重上限" header-align="center">
             </el-table-column>
@@ -165,6 +165,16 @@
             </el-table-column>
           </el-table>
         </div>
+        <div class="table-row" v-show="name == '大豆'">
+          <el-table :data="tableData" :row-class-name="tableRowClassName" >
+            <el-table-column prop="bulkDensityMax" label="蛋白上限" header-align="center">
+            </el-table-column>
+            <el-table-column prop="bulkDensityMin" label="蛋白下限" header-align="center">
+            </el-table-column>
+            <el-table-column prop="bulkDensityPrice" label="蛋白单价" header-align="center">
+            </el-table-column>
+          </el-table>
+        </div>
       </div>
 
       <div v-else>

+ 1 - 1
public/static/warehousePrint.html

@@ -216,7 +216,7 @@
           <tr class="row" v-for="(item,index) in printData">
             <td class="col">{{item.inOutDate}}</td>
             <td class="col">{{item.carNo}}</td>
-            <td class="col">{{item.binNumber}}</td>
+            <td class="col">{{item.binNumber.indexOf("托盘")!= -1?item.binNumber.replace("托盘",""):item.binNumber}}</td>
             <td class="col">{{item.boxNo}}</td>
             <td class="col">{{item.boxNo}}</td>
             <td class="col">{{item.grossWeight}}</td>

+ 9 - 8
public/static/weightCheck.html

@@ -179,7 +179,7 @@
                             <td class="col">{{item.goodsName}}</td>
                             <td class="col col-bgc">类型</td>
                             <td class="col">{{item.type}}</td>
-                            <td class="col col-bgc">容量(克/升)</td>
+                            <td class="col col-bgc">{{item.goodsName != '大豆' ? '容量(克/升)' : '蛋白'}}</td>
                             <td class="col">
                                 {{item.qualityInspectionManagement?item.qualityInspectionManagement.bulkDensity:''}}
                             </td>
@@ -217,7 +217,7 @@
                                 {{item.qualityInspectionManagement?item.qualityInspectionManagement.buckleMiscellaneous:''}}
                             </td>
                             <td class="col col-bgc">仓位号</td>
-                            <td class="col">{{item.binNumber}}</td>
+                            <td class="col">{{_item.binNumber.indexOf("托盘") != -1?_item.binNumber.replace("托盘",""):_item.binNumber}}</td>
                         </tr>
                         <tr class="row">
                             <td class="col col-bgc">毛重(公斤)</td>
@@ -294,7 +294,7 @@
                             <td class="col">{{item.goodsName}}</td>
                             <td class="col col-bgc">类型</td>
                             <td class="col">{{item.type}}</td>
-                            <td class="col col-bgc">容量(克/升)</td>
+                            <td class="col col-bgc">{{item.goodsName != '大豆' ? '容量(克/升)' : '蛋白'}}</td>
                             <td class="col">
                                 {{item.qualityInspectionManagement?item.qualityInspectionManagement.bulkDensity:''}}
                             </td>
@@ -332,7 +332,7 @@
                                 {{item.qualityInspectionManagement?item.qualityInspectionManagement.buckleMiscellaneous:''}}
                             </td>
                             <td class="col col-bgc">仓位号</td>
-                            <td class="col">{{item.binNumber}}</td>
+                            <td class="col">{{_item.binNumber.indexOf("托盘") != -1?_item.binNumber.replace("托盘",""):_item.binNumber}}</td>
                         </tr>
                         <tr class="row">
                             <td class="col col-bgc">毛重(公斤)</td>
@@ -409,9 +409,10 @@
                         <td class="col">{{_item.goodsName}}</td>
                         <td class="col col-bgc">类型</td>
                         <td class="col">{{_item.type}}</td>
-                        <td class="col col-bgc">容量(克/升)</td>
+                        <td class="col col-bgc">{{_item.goodsName != '大豆' ? '容量(克/升)' :'蛋白'}}</td>
                         <td class="col">
-                            {{_item.qualityInspectionManagement?_item.qualityInspectionManagement.bulkDensity:''}}</td>
+                            {{_item.qualityInspectionManagement?_item.qualityInspectionManagement.bulkDensity:''}}
+                        </td>
                         <td class="col col-bgc">不完善粒(%)</td>
                         <td class="col">
                             {{_item.qualityInspectionManagement?_item.qualityInspectionManagement.imperfectGrain:''}}
@@ -443,7 +444,7 @@
                             {{_item.qualityInspectionManagement?_item.qualityInspectionManagement.buckleMiscellaneous:''}}
                         </td>
                         <td class="col col-bgc">仓位号</td>
-                        <td class="col">{{_item.binNumber}}</td>
+                        <td class="col">{{_item.binNumber.indexOf("托盘") != -1?_item.binNumber.replace("托盘",""):_item.binNumber}}</td>
                     </tr>
                     <tr class="row">
                         <td class="col col-bgc">毛重(公斤)</td>
@@ -516,7 +517,7 @@
             </div>
             <div class="small-row">
                 <div>仓位号:</div>
-                <div>{{tableData.binNumber}}</div>
+                <div>{{tableData.binNumber.indexOf("托盘")!= -1?tableData.binNumber.replace("托盘",""):tableData.binNumber}}</div> 
             </div>
             <div class="small-row">
                 <div>收货单位</div>

+ 10 - 0
src/api/V2/platformaudit/index.js

@@ -38,4 +38,14 @@ export const API_POST_SETTLED_EXAMINE = '/settledCompanyInfo/api/examine'
 export const API_POST_DELETE_SETTLED = '/settledCompanyInfo/api/deleteSettledCompanyInfo'
 //客服留言列表
 export const API_GET_OPENSERVICE_LIST = '/openServiceInfo/selectOpenServiceList'
+// 交易信息列表
+export const API_GET_TRANSATION_LIST = '/transactionExchangeInfo/selectTransactionExchangeInfo'
+// 交易信息查看
+export const API_GET_TRANSATION = '/transactionExchangeInfo/selectExchangeInfo'
+// 交易信息删除
+export const API_DEL_TRANSATION = '/transactionExchangeInfo/deleteInfo'
+// 交易信息审核
+export const API_ADUIT_TRANSATION = '/transactionExchangeInfo/editInfo'
+// 交易信息用户状态
+export const API_EDIT_USER_TRANSATION = '/transactionExchangeInfo/editUser'
 

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

@@ -66,4 +66,6 @@ export const API_GET_CARNUMBER= '/driverCarInfo/selectAllCarNumber'
 // 通过车牌号查找司机
 export const API_GET_DRIVERINFO='/driverViewInfo/selectDriverViewList'
 // 发起人撤回
-export const API_SPONSOR_WITHDRAW ='/newWorkflow/api/stopInstance'
+export const API_SPONSOR_WITHDRAW ='/newWorkflow/api/stopInstance'
+// 历史司机车队数据
+export const API_GET_HISTORICALCARS ='/tranProcessInfo/selectHistoricalCars'

+ 3 - 0
src/api/V2/warehouse/index.js

@@ -153,3 +153,6 @@ export const API_POST_DELETEINFO='/dryWarehouse/api/deleteDryWarehouse'
 export const API_GET_BINTYPE='/warehousePositionInfo/selectBinNumberList'
 // 发起人撤回
 export const API_SPONSOR_WITHDRAW ='/newWorkflow/api/stopInstance'
+API_EXPORT_ORDER
+// 导出入库单
+export const API_EXPORT_ORDER ='/warehousingOrder/exportWarehousingOrder'

+ 2 - 0
src/components/balanceAlert.vue

@@ -161,7 +161,9 @@ export default {
               this.deptBudgetList.warehouseName == '白城内陆港' ||
               this.deptBudgetList.warehouseName == '白城鹏羽库' ||
               this.deptBudgetList.warehouseName == '洮南胡力吐粮食储备库' ||
+              this.deptBudgetList.warehouseName == '杜尔伯特家禾库' ||
               this.deptBudgetList.warehouseName == '洮南向阳乡金昊' ||
+              this.deptBudgetList.warehouseName == '洮南光明储备库' ||
               this.deptBudgetList.warehouseName == '甘南林峰库' ||
               this.deptBudgetList.warehouseName == '肇东金信库' ||
               this.deptBudgetList.warehouseName == '呼兰大金仓'||

+ 1 - 0
src/lang/zh.js

@@ -657,6 +657,7 @@ export default {
     saletransactioninformationreview: '销售信息审核',
     grainpulseenterprisereview: '粮脉企业审核',
     grainPulseDynamic: '粮脉动态审核',
+    tradeInformation:'交易信息审核',
 
     // 通用审核
     aduitmanagement:'审核管理',

+ 1 - 1
src/layout/index/top/index.vue

@@ -56,7 +56,7 @@
       </div>
       <div class="compName-row">
         <!-- <span class="compName">{{compName}}</span> -->
-        <el-select style='width:260px;' @change='compNameChange' v-model="compName" placeholder="请选择">
+        <el-select style='width:260px;' @change='compNameChange' disabled v-model="compName" placeholder="请选择">
         <el-option
           v-for="item in compNameoptions"
           :key="item"

+ 15 - 0
src/model/platformaudit/index.js

@@ -21,6 +21,11 @@ import {
     API_POST_EDIT_SETTLEDCOMPANY,
     API_POST_SETTLED_EXAMINE,
     API_POST_DELETE_SETTLED,
+    API_GET_TRANSATION_LIST,
+    API_GET_TRANSATION,
+    API_DEL_TRANSATION,
+    API_ADUIT_TRANSATION,
+    API_EDIT_USER_TRANSATION
 } from '@/api/V2/platformaudit'
 // import { app } from 'electron'
 // 粮商审核
@@ -63,3 +68,13 @@ export const settledExamine = appRx.post(API_POST_SETTLED_EXAMINE, errorCatcher,
 export const deleteSettled = appRx.post(API_POST_DELETE_SETTLED, errorCatcher, errorHandle, filter)
 //客服留言列表
 export const openServiceList = appRx.get(API_GET_OPENSERVICE_LIST,errorCatcher, errorHandle, filter)
+// 交易信息列表
+export const gettransationList = appRx.get(API_GET_TRANSATION_LIST,errorCatcher, errorHandle, filter)
+// 交易信息查看
+export const gettransation = appRx.get(API_GET_TRANSATION,errorCatcher, errorHandle, filter)
+// 交易信息删除
+export const transationdelete = appRx.post(API_DEL_TRANSATION,errorCatcher, errorHandle, filter)
+// 交易信息审核
+export const transationaduit = appRx.post(API_ADUIT_TRANSATION,errorCatcher, errorHandle, filter)
+// 交易信息用户状态修改
+export const transationedituser = appRx.post(API_EDIT_USER_TRANSATION,errorCatcher, errorHandle, filter)

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

@@ -54,7 +54,8 @@ import {
   API_SPONSOR_WITHDRAW,
   API_GET_WAREHOUSINGORDER_LIST,
   API_POST_EXPORTFILE,
-  API_GET_CONSTNO
+  API_GET_CONSTNO,
+  API_IMPORT_FIXED,
 } from '@/api/V2/profitable'
 //收支明细列表
 export const getInOutDetailed = appRx.get(API_GET_INOUTDETAILED, errorCatcher, errorHandle, filter)
@@ -164,4 +165,6 @@ export const getwarehousingorderList = appRx.get(API_GET_WAREHOUSINGORDER_LIST,e
 // 导出费用明细信息
 export const exportFile = appRx.post(API_POST_EXPORTFILE)
   //费用编号
-  export const getcostNo = appRx.get(API_GET_CONSTNO,errorCatcher, errorHandle, filter)
+  export const getcostNo = appRx.get(API_GET_CONSTNO,errorCatcher, errorHandle, filter)
+	// 导入
+  export const importFixed = appRx.post(API_IMPORT_FIXED, errorCatcher, errorHandle, filter)

+ 6 - 3
src/model/transport/index.js

@@ -36,7 +36,8 @@ import {
     API_POST_AUTOMOBILE_TRANPRICE_CAR,
     API_GET_CARNUMBER,
     API_GET_DRIVERINFO,
-    API_SPONSOR_WITHDRAW
+    API_SPONSOR_WITHDRAW,
+    API_GET_HISTORICALCARS
 } from '@/api/V2/transport'
 // 司机列表
 export const selectDriver = appRx.get(API_GET_TRAN_DRIVERINFO, errorCatcher, errorHandle, filter)
@@ -104,5 +105,7 @@ export const importApplFileUrl = appRx.get(API_GET_IMPORT, errorCatcher, errorHa
 export const getcarNumber = appRx.get(API_GET_CARNUMBER, errorCatcher, errorHandle, filter)
 // 根据车牌号查找司机
 export const getdriverinfo = appRx.get(API_GET_DRIVERINFO, 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)
+// 历史司机车队
+export const gethistorycars = appRx.get(API_GET_HISTORICALCARS, errorCatcher, errorHandle, filter)

+ 3 - 0
src/model/warehouse/index.js

@@ -75,6 +75,7 @@ import {
      API_POST_DELETEINFO,
      API_GET_BINTYPE,
     API_SPONSOR_WITHDRAW,
+    API_EXPORT_ORDER
     // API_GET_EXPENSEINFO
 } from '@/api/V2/warehouse'
 // import { app } from 'electron'
@@ -229,3 +230,5 @@ export const delRecord= appRx.post(API_POST_DELETEINFO,errorCatcher, errorHandle
 export const getbintype= appRx.get(API_GET_BINTYPE,errorCatcher, errorHandle, filter)
 // 发起人撤回
 export const sponsorWithdraw = appRx.post(API_SPONSOR_WITHDRAW, errorCatcher, errorHandle, filter)
+// 导出入库单
+export const exportOrder = appRx.post(API_EXPORT_ORDER)

+ 6 - 10
src/views/contractManagement/acquisitionContract.vue

@@ -146,10 +146,10 @@
         </template>
       </el-table-column>
       <el-table-column width='120' prop="signingDate" label="签订日期"> </el-table-column>
-      <el-table-column width='120' prop="contractExpenditure" label="合同支出"> </el-table-column>
+      <el-table-column width='120' prop="contractExpenditure" label="粮款支出"> </el-table-column>
       <el-table-column width='120' prop="expenses" label="费用支出"> </el-table-column>
       
-      <el-table-column width='130' prop="mildewGrain" label="已付款(元)">
+      <!-- <el-table-column width='130' prop="mildewGrain" label="已付款(元)"> -->
       </el-table-column>
       <el-table-column prop="amountEdPayable" label="已付运费"> </el-table-column>
       <el-table-column width='130' prop="goodsNames" label="已开发票 (元)">
@@ -475,14 +475,14 @@
       handleClose() {
         this.dialogViewSpareMoney = false
       },
-      selectstatuschange(e,row){
+      async selectstatuschange(e,row){
         var data={}
         var text=`是否将状态改为${e}`
-        getsettlementprice({contractNo:row.contractNo}).toPromise()
-        .then((response) => {
-                if(e=='发运结束'){
+        
+        if(e=='发运结束'){
           data={id: row.id,endFlag:1}
         }else if(e=='已完成'){
+          var response=await getsettlementprice({contractNo:row.contractNo}).toPromise()
           data={id:row.id,settlementPrice:response}
           text=`合同单价${response}元/吨,确定合同已完成?`
         }else{
@@ -512,10 +512,6 @@
             row.status=row.currectstatus
             return false
           })
-          })
-          .catch((response) => {
-                // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-          })
         
       },
       handleSizeChange(val) {

+ 34 - 10
src/views/contractManagement/purchaseContract.vue

@@ -137,10 +137,10 @@
         </template>
       </el-table-column>
       <el-table-column width='120' prop="signingDate" label="签订日期"> </el-table-column>
-      <el-table-column width='120' prop="contractExpenditure" label="合同支出"> </el-table-column>
+      <el-table-column width='120' prop="contractExpenditure" label="粮款支出"> </el-table-column>
       <el-table-column width='120' prop="expenses" label="费用支出"> </el-table-column>
 
-      <el-table-column width='130' prop="mildewGrain" label="已付款(元)">
+      <!-- <el-table-column width='130' prop="mildewGrain" label="已付款(元)"> -->
       </el-table-column>
       <el-table-column prop="amountEdPayable" label="已付运费"> </el-table-column>
       <el-table-column prop="statementUrl" label="结算单">
@@ -583,15 +583,41 @@ export default {
       this.countMoney = false
       this.invoiceSwitch = false
     },
-    selectstatuschange(e, row) {
+    async selectstatuschange(e, row) {
       var data = {}
       var text = `是否将状态改为${e}`
-      getsettlementprice({ contractNo: row.contractNo }).toPromise()
-        .then((response) => {
+      // if(e!='已完成'){
+      //   this.$confirm(text, {
+      //       confirmButtonText: '确定',
+      //       cancelButtonText: '取消',
+      //       type: 'warning',
+      //     })
+      //       .then(() => {
+      //         editstatus(data)
+      //           .toPromise()
+      //           .then((response) => {
+      //             this.$notify.success({
+      //               title: '成功',
+      //               message: '状态修改成功',
+      //             })
+      //             this.getList()
+      //           })
+      //           .catch((response) => {
+      //             row.status = row.currectstatus
+      //             // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+      //           })
+      //       })
+      //       .catch(() => {
+      //         row.status = row.currectstatus
+      //         return false
+      //       })
+      // }else{
+      
           if (e == '发运结束') {
             data = { id: row.id, endFlag: 1 }
           } else if (e == '已完成') {
-            data = { id: row.id, settlementPrice: response }
+            var response=await getsettlementprice({ contractNo: row.contractNo }).toPromise()
+            data = { id: row.id, settlementPrice: response}
             text = `合同单价${response}元/吨,确定合同已完成?`
           } else {
             data = { id: row.id }
@@ -613,6 +639,7 @@ export default {
                   this.getList()
                 })
                 .catch((response) => {
+                  row.status = row.currectstatus
                   // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
                 })
             })
@@ -620,11 +647,8 @@ export default {
               row.status = row.currectstatus
               return false
             })
-        })
-        .catch((response) => {
-          // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-        })
 
+        // }
     },
     handleSizeChange(val) {
       console.log(`每页 ${val} 条`)

+ 12 - 4
src/views/contractManagement/purchaseContractAdd.vue

@@ -66,16 +66,17 @@
         <!-- 补充协议编号 -->
         <ws-form-item v-show="deptBudgetList.agreementType == '补充协议'" label="补充协议编号" span="1" prop="contractNo">
           <ws-input v-model="deptBudgetList.contractNo" placeholder="请输入补充协议编号" maxlength="100" size="small" />
+        </ws-form-item>
+         <!--合同编号-->
+        <ws-form-item label="合同编号" span="1" prop="contractNo" class="readonly" required v-show="deptBudgetList.agreementType =='采购合同'">
+          <ws-input v-model="deptBudgetList.contractNo" placeholder="请输入合同编号" maxlength="50" size="small" />
         </ws-form-item>
         <!--运输方式-->
         <ws-form-item label="运输方式" span="1" prop="shippingType">
           <ws-input v-model="deptBudgetList.shippingType" placeholder="请输入运输方式" maxlength="100" size="small" />
         </ws-form-item>
 
-        <!--合同编号-->
-        <ws-form-item label="合同编号" span="1" prop="contractNo" class="readonly" required v-show="deptBudgetList.agreementType =='采购合同'">
-          <ws-input v-model="deptBudgetList.contractNo" placeholder="请输入合同编号" maxlength="50" size="small" />
-        </ws-form-item>
+       
         <ws-form-item label="交易主体" span="1" prop="transactionSubject" class="readonly">
           <el-radio v-model="deptBudgetList.transactionSubject" label="自营">自营</el-radio>
           <el-radio v-model="deptBudgetList.transactionSubject" label="合营">合营</el-radio>
@@ -1318,6 +1319,13 @@ import { isUndefined } from 'xe-utils/methods'
           })
           return
         }
+        if(!this.deptBudgetList.personCharge){
+          this.$message({
+            message: '请选择临时仓库负责人!',
+            type: 'warning',
+          })
+          return
+        }
         if (!this.deptBudgetList.signingDate) {
           this.$message({
             message: '请选择签订日期',

+ 34 - 8
src/views/contractManagement/purchaseContractEdit.vue

@@ -149,7 +149,7 @@
           </ws-form-item>
         <!-- 合同单价(元/吨) -->
         <ws-form-item class="readonly" label="合同单价(元/吨)" span="1" prop="unitContractPrice" v-if="deptBudgetList.priceType == '定价采购'">
-          <ws-input @input="pricechange" v-model="deptBudgetList.unitContractPrice" placeholder="请输入合同单价"
+          <ws-input disabled @input="pricechange" v-model="deptBudgetList.unitContractPrice" placeholder="请输入合同单价"
             maxlength="100" size="small" />
         </ws-form-item>
         <!-- 合同总价(元) -->
@@ -211,8 +211,12 @@
 
         <!-- 临时仓库负责人 -->
         <ws-form-item label="临时仓库负责人" span="1" prop="packingMethod" v-if="deptBudgetList.deliverType != 2">
-          <el-select v-model="deptBudgetList.personCharge" placeholder="请选择临时仓库负责人" filterable clearable @change="selectstaff">
+          <!-- <el-select v-model="deptBudgetList.personCharge" placeholder="请选择临时仓库负责人" filterable clearable @change="selectstaff">
             <el-option v-for="item in options" :key="item.value" :label="item.staffName" :value="item.staffName" />
+          </el-select> -->
+          <el-select v-model="deptBudgetList.personPhone" multiple placeholder="请选择临时仓库负责人" filterable clearable
+            @change="selectstaff">
+            <el-option v-for="item in options" :key="item.value" :label="item.staffName" :value="item.staffMobilePhone" />
           </el-select>
         </ws-form-item>
         <ws-form-item class="readonly" label="结算重量方式" span="1" prop="settlementWeightMethod" v-if="deptBudgetList.deliverType==1">
@@ -323,7 +327,7 @@
     delxiala,
     examineList,
     editInfo,
-    getstafffind
+    getstaffall
   } from '@/model/contarct/index'
   import WsUpload from '@/components/WsUpload'
   import {
@@ -405,8 +409,8 @@
     },
 
     activated() {
-      getstafffind({
-          roles: 'd6a5c8a52da544309259f91f75de1ec6'
+      getstaffall({
+        compId:this.compId
         })
         .toPromise()
         .then((response) => {
@@ -476,13 +480,19 @@
           this.options = this.staffList
         }
       },
+
       selectstaff(e) {
+        console.log(e)
+        this.deptBudgetList.personCharge=''
         for (var i = 0; i < this.staffList.length; i++) {
-          if (this.staffList[i].staffName == e) {
-            this.deptBudgetList.personPhone = this.staffList[i].staffMobilePhone
-            this.deptBudgetList.personChargeKey = this.staffList[i].staffId
+          for (var j = 0; j < e.length; j++) {
+            if (this.staffList[i].staffMobilePhone == e[j]) {
+              this.deptBudgetList.personCharge += this.staffList[i].staffName + ' ' + this.staffList[i]
+                .staffMobilePhone + ','
+            }
           }
         }
+        console.log(this.deptBudgetList)
       },
       handleChange(value) {
         this.selectedOptions = value
@@ -497,6 +507,7 @@
           })
           .toPromise()
           .then((response) => {
+
             if (response.weight) {
               response.weight = String(response.weight)
             }
@@ -509,6 +520,20 @@
             if (response.unitContractPrice) {
               response.unitContractPrice = String(response.unitContractPrice)
             }
+            if(response.personCharge&&response.personCharge!=''){
+              var arr= response.personCharge.split(',')
+              var arr3=[]
+              for (let i = 0; i < arr.length; i++) {
+                if(arr[i]!=''){
+                  var arr1=arr[i].split(' ')
+                    if(arr1[1]!=''){
+                      arr3.push(arr1[1])
+                    }
+                }
+                
+              }
+              response.personPhone=arr3
+            }
             // var tmp = []
             // tmp[0] = TextToCode[response.sourceProvince].code
 
@@ -753,6 +778,7 @@
           })
       },
       submit() {
+        this.deptBudgetList.personPhone=this.deptBudgetList.personPhone.toString()
         if(this.deptBudgetList.transactionSubject == '合营'){
           if (!this.deptBudgetList.jointVentureParties) {
           this.$message({

+ 57 - 1
src/views/contractManagement/purchaseContractExamine.vue

@@ -223,9 +223,31 @@
         </el-table-column>
         <el-table-column prop="endTime" label="审核时间"></el-table-column>
         <el-table-column prop="auditMind" label="审核意见"></el-table-column>
+        <el-table-column prop="auditMind" label="审核附件">
+          <template scope="scope">
+            <img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
+            src="../../../public/img/fujian.png" @click="fujian(scope.row)" alt="" />
+          <span v-if="scope.row.auditImg != null">
+            {{
+                scope.row.auditImg.length == 0
+                  ? ''
+                  : scope.row.auditImg.length
+            }}
+          </span>
+          </template>
+        </el-table-column>
       </el-table>
     </ws-form>
-
+    <WinseaContentModal v-model="accessoryTFs" :title="$t('system.noticeCircular.information')"
+      @on-cancel="handleClose">
+      <div v-for="item in appendixIdss">
+        <el-image 
+        style="width: 100px; height: 100px"
+        :src="item" 
+        :preview-src-list="appendixIdss">
+      </el-image>
+      </div>
+    </WinseaContentModal>
     <div style="text-align: right; padding: 10px">
       <el-button class="bg-bottom" type="primary" size="small" @click="returnsales()">关闭</el-button>
     </div>
@@ -279,6 +301,8 @@
           contractProcessInfo: {},
           contractGoodsInfo: {},
         },
+        accessoryTFs:false,
+        appendixIdss:[],
         mainReportAdd: {},
         list: {},
         compId: localStorage.getItem('ws-pf_compId'),
@@ -291,12 +315,44 @@
       this.showType = this.isShow
     },
     methods: {
+      fujian(row) {
+      this.id = row.id
+      this.accessoryTFs = true
+      this.appendixIdss = row.auditImg
+      console.log(this.appendixIdss)
+    },
+    handleCloseq() {
+        this.accessoryTFs = false
+      },
       loaddata() {
         gettaskhistories({
             businessKey: this.$route.query.id,
             workflowId: this.$route.query.workflowId
           }).toPromise()
           .then((response) => {
+            if(response){
+              for (let i = 0; i < response.length; i++) {
+                if(response[i].auditMind){
+                  response[i].auditImg=[]
+                  var auditMind=response[i].auditMind.split('#')
+                  if(auditMind[2]!=''){
+                    var img=auditMind[2].split(',')
+                    for (let q = 0; q < img.length; q++) {
+                      if(img[q]!=''){
+                        response[i].auditImg.push(img[q])
+                      }
+                    }
+                  }
+                  if(auditMind[1]){
+                    response[i].auditMind=auditMind[1]
+                  }else{
+                    response[i].auditMind=''
+                  }
+                  console.log(auditMind[1],1111,auditMind[2])
+                }
+                
+              }
+            }
             this.taskhistories = response
           })
         // 数据

+ 4 - 2
src/views/contractManagement/salesContract.vue

@@ -142,7 +142,7 @@
         </template>
       </el-table-column>
       <el-table-column width='120' prop="signingDate" label="签订日期"> </el-table-column>
-      <el-table-column width='120' prop="contractRevenue" label="合同收入"> </el-table-column>
+      <el-table-column width='120' prop="contractRevenue" label="粮款收入"> </el-table-column>
       <el-table-column width='120' prop="expenses" label="费用支出"> </el-table-column>
       <el-table-column width='120' prop="mildewGrain" label="未回款(元)">
         <template slot-scope="scope">
@@ -525,12 +525,13 @@ export default {
         })
     },
     async selectstatuschange(e, row) {
-      var response = await getsettlementprice({ contractNo: row.contractNo }).toPromise()
+      
       var data = {}
       var text = `是否将状态改为${e}`
       if (e == '发运结束') {
         data = { id: row.id, endFlag: 1 }
       } else if (e == '已完成' && row.priceType != '随行就市') {
+        var response = await getsettlementprice({ contractNo: row.contractNo }).toPromise()
         data = { id: row.id, settlementPrice: response }
         text = `合同单价${response}元/吨,确定合同已完成?`
       } else {
@@ -564,6 +565,7 @@ export default {
                 this.getList()
               })
               .catch((response) => {
+                row.status = row.currectstatus
                 // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
               })
           })

+ 1 - 1
src/views/home/index.vue

@@ -169,7 +169,7 @@ export default {
 
     this.dataListTimer = setInterval(() => {
       this.selectData(1)
-      }, 30000);
+      }, 10*60000);
     
 
   },

+ 405 - 161
src/views/houseSelfCollect/acquisitionManagementAdd.vue

@@ -11,8 +11,8 @@
         <el-row class="base-info">
           <el-col :span="2" style="line-height: 32px;">基本信息</el-col>
           <el-col :span="22">
-            <el-button :type="!isSolidFood?'primary':''" @click="typeChange()" v-if="type == '新增'">以水分定价</el-button>
-            <el-button :type="isSolidFood?'primary':''" @click="typeChange(1)" v-if="type == '新增'">以容重定价</el-button>
+            <el-button :type="!isSolidFood ? 'primary' : ''" @click="typeChange()" v-if="type == '新增'">以水分定价</el-button>
+            <el-button :type="isSolidFood ? 'primary' : ''" @click="typeChange(1)" v-if="type == '新增'">以容重定价</el-button>
           </el-col>
         </el-row>
         <div class="row1">
@@ -114,7 +114,8 @@
                   <div class="item-style">
                     <div v-if="item1.type != 4" class="item-style-title">
                       <span>{{ item1.name }}{{ item1.index }}</span>
-                      <el-button class="add" @click="add(item, item1, index)" v-if="item1.type != 3" :disabled="!isEdit">+
+                      <el-button class="add" @click="add(item, item1, index)" v-if="item1.type != 3"
+                        :disabled="!isEdit">+
                       </el-button>
                       <el-button class="reduce" @click="reduce(item, item1, index)"
                         v-show="item1.type != 1 && item1.type != 2 && item1.type != 3" :disabled="!isEdit">-</el-button>
@@ -145,7 +146,8 @@
           <div class="content">
             <div class="count">
               <div class="left" style="align-items: center;justify-content: flex-end;">
-                <div>容重(g/L)</div>
+                <div v-if="this.baseInfoForm.goodsNameKey == 6">蛋白(g/L)</div>
+                <div v-else>容重(g/L)</div>
                 <div>价格(元/公斤)</div>
               </div>
 
@@ -153,7 +155,28 @@
                 <div class="jt-style1"></div>
                 <div class="line1"></div>
 
-                <div v-for="(item1, index) in priceRZObj.detailList" :key="index">
+                <div v-show="baseInfoForm.goodsNameKey == 6" v-for="(item1, index) in priceRZObjDb.detailListDb">
+                  <div class="item-style" v-if="item1.isShow">
+                    <div v-if="item1.type != 4" class="item-style-title">
+                      <span>{{ item1.name }}</span>
+                      <el-button class="add" @click="addDB(item1, index)" v-if="item1.type != 3" :disabled="!isEdit">+
+                      </el-button>
+                      <el-button class="reduce" @click="reduceDB(item1, index)"
+                        v-show="item1.type != 1 && priceRZObjDb.detailListDb.length > 2"
+                        :disabled="!isEdit">-</el-button>
+                    </div>
+                    <div v-show="item1.type != 4">
+                      <input class="water-price" :class="item1.isWrite ? 'white-bgc' : ''"
+                        v-model="item1.weight"></input>
+                    </div>
+                    <div class="circle" v-if="item1.type != 4"></div>
+                  </div>
+                  <div class="bottom-price">
+                    <input v-if="item1.type == 4" class="water-price" :class="isEdit ? 'white-bgc' : ''"
+                      v-model="item1.jfprice" :disabled="!isEdit"></input>
+                  </div>
+                </div>
+                <div v-show="baseInfoForm.goodsNameKey != 6" v-for="(item1, index) in priceRZObj.detailList" :key="index">
                   <div class="item-style" v-if="item1.isShow">
                     <div v-if="item1.type != 4" class="item-style-title">
                       <span>{{ item1.name }}</span>
@@ -163,7 +186,8 @@
                         v-show="item1.type != 1 && priceRZObj.detailList.length > 2" :disabled="!isEdit">-</el-button>
                     </div>
                     <div v-show="item1.type != 4">
-                      <input class="water-price" :class="item1.isWrite ? 'white-bgc' : ''" v-model="item1.weight"></input>
+                      <input class="water-price" :class="item1.isWrite ? 'white-bgc' : ''"
+                        v-model="item1.weight"></input>
                     </div>
                     <div class="circle" v-if="item1.type != 4"></div>
                   </div>
@@ -199,7 +223,7 @@
           </el-table-column>
         </el-table>
       </div>
-      <div class="page2-content" v-else>
+      <div v-else-if="this.baseInfoForm.bulkDensityStandard && this.baseInfoForm.goodsName != '大豆'" class="page2-content">
         <!-- 容重打印 -->
         <div class="titel">
           {{ selectVal }}价格对照表(按容重)
@@ -213,6 +237,20 @@
           </el-table-column>
         </el-table>
       </div>
+      <div v-else class="page2-content">
+        <!-- 容重打印 -->
+        <div class="titel">
+          {{ selectVal }}价格对照表(按蛋白)
+        </div>
+        <el-table :data="tableData1" style="width: 100%" :row-class-name="tableRowClassName">
+          <el-table-column prop="bulkDensityMax" label="蛋白上限">
+          </el-table-column>
+          <el-table-column prop="bulkDensityMin" label="蛋白下限">
+          </el-table-column>
+          <el-table-column prop="bulkDensityPrice" label="蛋白单价">
+          </el-table-column>
+        </el-table>
+      </div>
       <div class="bottom-btn">
         <div v-if="baseInfoForm.status == '审核中'" class="left">当前价格尚未通过审核,建议审核通过后进行打印</div>
         <div class="right">
@@ -276,6 +314,31 @@ export default {
           },
         ],
       },
+      priceRZObjDb: {
+        index: 0,
+        checkList: [],
+        basicUnitPrice: '',
+        detailListDb: [
+          {
+            type: 1,
+            name: '蛋白',
+            weight: '1000',
+            isWrite: false,
+            isShow: false,
+          },
+          {
+            type: 4,
+            jfprice: '',
+          },
+          {
+            type: 1,
+            name: '蛋白',
+            weight: '',
+            isWrite: true,
+            isShow: true,
+          },
+        ],
+      },
       priceList: [
         {
           index: 0,
@@ -331,6 +394,7 @@ export default {
         dryGrainPrice: '',
         details: [],
         detailPrints: [],
+        protein: '',
       },
       index: 0,
       type: '',
@@ -341,6 +405,7 @@ export default {
       checkList2: [],
       checkList3: [],
       checkList4: [],
+      bulkDensityStandard:'',
     }
   },
 
@@ -515,12 +580,14 @@ export default {
     }
   },
   methods: {
-    typeChange(val){
-      if(val == 1){
+    typeChange(val) {
+      if (val == 1) {
         this.isSolidFood = true
+        this.bulkDensityStandard = 1
         this.baseInfoForm.bulkDensityStandard = 1
-      }else{
+      } else {
         this.isSolidFood = false
+        this.bulkDensityStandard = ''
         this.baseInfoForm.bulkDensityStandard = ''
       }
     },
@@ -544,10 +611,10 @@ export default {
           //构造查看priceList数据
           this.priceList = []
           this.makeLookPriceList()
-          if(this.baseInfoForm.bulkDensityStandard == 1){
+          if (this.baseInfoForm.bulkDensityStandard == 1) {
             this.isSolidFood = true
             this.baseInfoForm.bulkDensityStandard = 1
-          }else{
+          } else {
             this.isSolidFood = false
             this.baseInfoForm.bulkDensityStandard = ''
           }
@@ -592,43 +659,44 @@ export default {
     },
     goodsChange(e) {
       this.baseInfoForm = {
-          //防止填完数据  后切换货名不清空多余数据
-          warehouseId: '',
-          warehouseName: '',
-          compId: this.$route.query.compId,
-          goodsNameKey: '',
-          goodsName: '',
-          waterBase: '',
-          deductWeight: '',
-          waterMin: '',
-          waterMax: '',
-          saleLimit: 2000,
-          statusFlag: '',
-          status: '',
-          workflowId: '',
-          approveStatus: '',
-          passDate: '',
-          dryGrainPrice: '',
-          details: [],
-          detailPrints: [],
-          paramType: '2',
-        }
-        this.baseInfoForm.warehouseId = this.$route.query.warehouseId
-        this.baseInfoForm.warehouseName = this.$route.query.warehouseName
-        this.baseInfoForm.compId = this.$route.query.compId
-      if (e == '玉米淀粉' ||
-        e == '玉米(机收)' ||
-        e == '玉米(酒精)' ||
-        e == '玉米(筛漏)' ||
-        e == '玉米(陈粮)' ||
-        e == '玉米(棒)' ||
-        e == '玉米'
-      ) {
-       
-        this.baseInfoForm.bulkDensityStandard = 1
-      }else{
-        this.baseInfoForm.bulkDensityStandard = ''
+        //防止填完数据  后切换货名不清空多余数据
+        warehouseId: '',
+        warehouseName: '',
+        compId: this.$route.query.compId,
+        goodsNameKey: '',
+        goodsName: '',
+        waterBase: '',
+        deductWeight: '',
+        waterMin: '',
+        waterMax: '',
+        saleLimit: 2000,
+        statusFlag: '',
+        status: '',
+        workflowId: '',
+        approveStatus: '',
+        passDate: '',
+        dryGrainPrice: '',
+        details: [],
+        detailPrints: [],
+        paramType: '2',
+        protein: '',
       }
+      this.baseInfoForm.warehouseId = this.$route.query.warehouseId
+      this.baseInfoForm.warehouseName = this.$route.query.warehouseName
+      this.baseInfoForm.compId = this.$route.query.compId
+      this.baseInfoForm.bulkDensityStandard = this.bulkDensityStandard
+      // if (e == '玉米淀粉' ||
+      //   e == '玉米(机收)' ||
+      //   e == '玉米(酒精)' ||
+      //   e == '玉米(筛漏)' ||
+      //   e == '玉米(陈粮)' ||
+      //   e == '玉米(棒)' ||
+      //   e == '玉米'
+      // ) {
+      //   this.baseInfoForm.bulkDensityStandard = 1
+      // } else {
+      //   this.baseInfoForm.bulkDensityStandard = ''
+      // }
       for (let num = 0; num < this.goodnameList.length; num++) {
         if (e == this.goodnameList[num].constValue) {
           this.baseInfoForm.goodsNameKey = this.goodnameList[num].constKey
@@ -705,19 +773,19 @@ export default {
       //     type: 'warning',
       //   })
       // } else {
-        item.index++
-        item.detailList.splice(index + 1, 0, {
-          name: '分界',
-          water: '',
-          type: 5,
-          index: 1,
-          isWrite: true,
-        })
-        item.detailList.splice(index + 1, 0, {
-          jfprice: '',
-          type: 4,
-        })
-        this.makeSpliceIndex(item, item1, index)
+      item.index++
+      item.detailList.splice(index + 1, 0, {
+        name: '分界',
+        water: '',
+        type: 5,
+        index: 1,
+        isWrite: true,
+      })
+      item.detailList.splice(index + 1, 0, {
+        jfprice: '',
+        type: 4,
+      })
+      this.makeSpliceIndex(item, item1, index)
       // }
     },
     // 减少分界
@@ -735,6 +803,22 @@ export default {
         }
       }
     },
+    addDB(item1, index) {
+      this.priceRZObjDb.detailListDb.splice(index + 1, 0, {
+        name: '蛋白',
+        water: '',
+        type: 1,
+        isWrite: true,
+        isShow: true,
+      })
+      this.priceRZObjDb.detailListDb.splice(index + 1, 0, {
+        jfprice: '',
+        type: 4,
+      })
+    },
+    reduceDB(index) {
+      this.priceRZObjDb.detailListDb.splice(index - 1, 2)
+    },
     // 复选框变化监听
     changeLevel(val, index) {
       let _data = this.priceList
@@ -873,38 +957,73 @@ export default {
     //构造新增价格数据
     makePriceDataList() {
       if (this.baseInfoForm.bulkDensityStandard == 1) {
-        //以容重构造数据
-        let _index = 0
-        let _index1 = 0
-        let _detailsObj = {
-          compId: this.baseInfoForm.warehouseId,
-          // basePrice: this.priceList[k].basicUnitPrice,
-          // level: '',
-          point: '',
-          pointPrice: '',
-        }
-        for (let k = 0; k < this.priceRZObj.detailList.length; k++) {
-          // 新增
-          if (this.priceRZObj.detailList[k].type == 4) {
-            //价格
-            if (_index == 0) {
-              _index++
-              _detailsObj.pointPrice += this.priceRZObj.detailList[k].jfprice
+        if (this.baseInfoForm.goodsNameKey == 6) {
+          //以容重构造数据
+          let _index = 0
+          let _index1 = 0
+          let _detailsObj = {
+            compId: this.baseInfoForm.warehouseId,
+            // basePrice: this.priceList[k].basicUnitPrice,
+            // level: '',
+            point: '',
+            pointPrice: '',
+          }
+          for (let k = 0; k < this.priceRZObjDb.detailListDb.length; k++) {
+            // 新增
+            if (this.priceRZObjDb.detailListDb[k].type == 4) {
+              //价格
+              if (_index == 0) {
+                _index++
+                _detailsObj.pointPrice += this.priceRZObjDb.detailListDb[k].jfprice
+              } else {
+                _detailsObj.pointPrice +=
+                  ',' + this.priceRZObjDb.detailListDb[k].jfprice
+              }
             } else {
-              _detailsObj.pointPrice +=
-                ',' + this.priceRZObj.detailList[k].jfprice
+              //容重
+              if (_index1 == 0) {
+                _index1++
+                _detailsObj.point += this.priceRZObjDb.detailListDb[k].weight
+              } else {
+                _detailsObj.point += ',' + this.priceRZObjDb.detailListDb[k].weight
+              }
             }
-          } else {
-            //容重
-            if (_index1 == 0) {
-              _index1++
-              _detailsObj.point += this.priceRZObj.detailList[k].weight
+          }
+          this.baseInfoForm.details.push(_detailsObj)
+        } else {
+          //货名不为大豆时,以容重构造数据
+          let _index = 0
+          let _index1 = 0
+          let _detailsObj = {
+            compId: this.baseInfoForm.warehouseId,
+            // basePrice: this.priceList[k].basicUnitPrice,
+            // level: '',
+            point: '',
+            pointPrice: '',
+          }
+          for (let k = 0; k < this.priceRZObj.detailList.length; k++) {
+            // 新增
+            if (this.priceRZObj.detailList[k].type == 4) {
+              //价格
+              if (_index == 0) {
+                _index++
+                _detailsObj.pointPrice += this.priceRZObj.detailList[k].jfprice
+              } else {
+                _detailsObj.pointPrice +=
+                  ',' + this.priceRZObj.detailList[k].jfprice
+              }
             } else {
-              _detailsObj.point += ',' + this.priceRZObj.detailList[k].weight
+              //容重
+              if (_index1 == 0) {
+                _index1++
+                _detailsObj.point += this.priceRZObj.detailList[k].weight
+              } else {
+                _detailsObj.point += ',' + this.priceRZObj.detailList[k].weight
+              }
             }
           }
+          this.baseInfoForm.details.push(_detailsObj)
         }
-        this.baseInfoForm.details.push(_detailsObj)
       } else {
         //已水分构造数据
         for (let k = 0; k < this.priceList.length; k++) {
@@ -1382,15 +1501,25 @@ export default {
     check() {
       let that = this
       for (let i = 0; i < this.baseInfoForm.detailPrints.length; i++) {
-        if (!this.baseInfoForm.detailPrints[i].bulkDensityMin || !this.baseInfoForm.detailPrints[i].bulkDensityMax || !this.baseInfoForm.detailPrints[i].bulkDensityPrice) {
-          that.$message.error('请输入容重和对应区间价格!')
-          return false
-        }
-
-        if (Number(this.baseInfoForm.detailPrints[i].bulkDensityMin) > Number(this.baseInfoForm.detailPrints[i].bulkDensityMax)) {
-          that.$message.error('请从左到右按大到小填写容重!')
-          return false
-        }
+        // if (this.baseInfoForm.goodsName != '大豆') {
+          if (!this.baseInfoForm.detailPrints[i].bulkDensityMin || !this.baseInfoForm.detailPrints[i].bulkDensityMax || !this.baseInfoForm.detailPrints[i].bulkDensityPrice) {
+            that.$message.error(this.baseInfoForm.goodsName != '大豆' ? '请输入容重和对应区间价格!':'请输入蛋白和对应区间价格!')
+            return false
+          }
+          if (Number(this.baseInfoForm.detailPrints[i].bulkDensityMin) > Number(this.baseInfoForm.detailPrints[i].bulkDensityMax)) {
+            that.$message.error(this.baseInfoForm.goodsName != '大豆' ? '请从左到右按大到小填写容重!':'请输入蛋白和对应区间价格!')
+            return false
+          }
+        // }else{
+        //   if (!this.baseInfoForm.detailPrints[i].bulkDensityMin || !this.baseInfoForm.detailPrints[i].bulkDensityMax || !this.baseInfoForm.detailPrints[i].bulkDensityPrice) {
+        //     that.$message.error('请输入蛋白和对应区间价格!')
+        //     return false
+        //   }
+        //   if (Number(this.baseInfoForm.detailPrints[i].bulkDensityMin) > Number(this.baseInfoForm.detailPrints[i].bulkDensityMax)) {
+        //     that.$message.error('请从左到右按大到小填写蛋白!')
+        //     return false
+        //   }
+        // }
       }
       return true
     },
@@ -1415,7 +1544,43 @@ export default {
     // 关闭
     closeCount() {
       this.isCountShow = true
-      this.splitPriceList = []
+      this.priceRZObjDb.detailListDb =[   {
+            type: 1,
+            name: '蛋白',
+            weight: '1000',
+            isWrite: false,
+            isShow: false,
+          },
+          {
+            type: 4,
+            jfprice: '',
+          },
+          {
+            type: 1,
+            name: '蛋白',
+            weight: '',
+            isWrite: true,
+            isShow: true,
+          },]
+      this.priceRZObj.detailList =[   {
+            type: 1,
+            name: '容重',
+            weight: '1000',
+            isWrite: false,
+            isShow: false,
+          },
+          {
+            type: 4,
+            jfprice: '',
+          },
+          {
+            type: 1,
+            name: '容重',
+            weight: '',
+            isWrite: true,
+            isShow: true,
+          },]
+      // this.baseInfoForm.splitPriceList = []
       this.$router.push({
         name: 'acquisitionManagement',
       })
@@ -1423,48 +1588,93 @@ export default {
     //处理价格表格数据
     makeTableList() {
       if (this.baseInfoForm.bulkDensityStandard == 1) {
-        //以容重构造打印数据
-        let price = []
-        let weight = []
-        let _obj1 = {}
-        let _Lists = []
-        for (let num = 0; num < this.priceRZObj.detailList.length; num++) {
-          if (this.priceRZObj.detailList[num].type == 4) {
-            price.push(this.priceRZObj.detailList[num].jfprice)
-          } else if (this.priceRZObj.detailList[num].type == 1) {
-            weight.push(this.priceRZObj.detailList[num].weight)
+        if (this.baseInfoForm.goodsName != '大豆') {
+          //以容重构造打印数据
+          let price = []
+          let weight = []
+          let _obj1 = {}
+          let _Lists = []
+          for (let num = 0; num < this.priceRZObj.detailList.length; num++) {
+            if (this.priceRZObj.detailList[num].type == 4) {
+              price.push(this.priceRZObj.detailList[num].jfprice)
+            } else if (this.priceRZObj.detailList[num].type == 1) {
+              weight.push(this.priceRZObj.detailList[num].weight)
+            }
           }
-        }
-        for (let val = 0; val < price.length; val++) {
-          if (val == 0) {
-            _obj1 = {
-              bulkDensityMax: weight[val],
-              bulkDensityMin: weight[val + 1],
-              bulkDensityPrice: price[val],
+          for (let val = 0; val < price.length; val++) {
+            if (val == 0) {
+              _obj1 = {
+                bulkDensityMax: weight[val],
+                bulkDensityMin: weight[val + 1],
+                bulkDensityPrice: price[val],
+              }
+            } else {
+              _obj1 = {
+                bulkDensityMax: weight[val] - 1,
+                bulkDensityMin: weight[val + 1],
+                bulkDensityPrice: price[val],
+              }
             }
-          } else {
-            _obj1 = {
-              bulkDensityMax: weight[val] - 1,
-              bulkDensityMin: weight[val + 1],
-              bulkDensityPrice: price[val],
+            _Lists.push(_obj1)
+          }
+          this.baseInfoForm.detailPrints = _Lists
+          this.tableData1 = _Lists
+          //  /**
+          //  * 容重下限
+          //  */
+          // private Float bulkDensityMin;
+          // /**
+          //  * 容重上限
+          //  */
+          // private Float bulkDensityMax;
+          // /**
+          //  * 容重单价
+          //  */
+          // private Float bulkDensityPrice;
+        } else {
+          //以容重构造打印数据
+          let price = []
+          let weight = []
+          let _obj1 = {}
+          let _Lists = []
+          for (let num = 0; num < this.priceRZObjDb.detailListDb.length; num++) {
+            if (this.priceRZObjDb.detailListDb[num].type == 4) {
+              price.push(this.priceRZObjDb.detailListDb[num].jfprice)
+            } else if (this.priceRZObjDb.detailListDb[num].type == 1) {
+              weight.push(this.priceRZObjDb.detailListDb[num].weight)
             }
           }
-          _Lists.push(_obj1)
+          for (let val = 0; val < price.length; val++) {
+            if (val == 0) {
+              _obj1 = {
+                bulkDensityMax: weight[val],
+                bulkDensityMin: weight[val + 1],
+                bulkDensityPrice: price[val],
+              }
+            } else {
+              _obj1 = {
+                bulkDensityMax: weight[val] - 1,
+                bulkDensityMin: weight[val + 1],
+                bulkDensityPrice: price[val],
+              }
+            }
+            _Lists.push(_obj1)
+          }
+          this.baseInfoForm.detailPrints = _Lists
+          this.tableData1 = _Lists
+          //  /**
+          //  * 容重下限
+          //  */
+          // private Float bulkDensityMin;
+          // /**
+          //  * 容重上限
+          //  */
+          // private Float bulkDensityMax;
+          // /**
+          //  * 容重单价
+          //  */
+          // private Float bulkDensityPrice;
         }
-        this.baseInfoForm.detailPrints = _Lists
-        this.tableData1 = _Lists
-        //  /**
-        //  * 容重下限
-        //  */
-        // private Float bulkDensityMin;
-        // /**
-        //  * 容重上限
-        //  */
-        // private Float bulkDensityMax;
-        // /**
-        //  * 容重单价
-        //  */
-        // private Float bulkDensityPrice;
       } else {
         //以水分构造打印数据
         // 获取等级对应分界钱数
@@ -1968,36 +2178,70 @@ export default {
       let _pointPrice = []
       let _basePrice = 0
       if (this.baseInfoForm.bulkDensityStandard == 1) {
-        // this.isSolidFood = true
-        //以容重查看
-        _pointPrice = _priceList[0].pointPrice.split(',')
-        _detailList = _priceList[0].point.split(',')
-        let count = _pointPrice.length + _detailList.length
-        let obj = {}
-        let index = 0
-        let index1 = 0
-        this.priceRZObj.detailList = []
-        for (let j = 0; j < count; j++) {
-          if (j % 2 == 0) {
-            obj = {
-              type: 1,
-              name: '容重',
-              weight: _detailList[index],
-              isWrite: false,
-              isShow: true,
-            }
-            if (j == 0) {
-              obj.isShow = false
+        if (this.baseInfoForm.goodsName == '大豆') {
+          //以容重查看
+          _pointPrice = _priceList[0].pointPrice.split(',')
+          _detailList = _priceList[0].point.split(',')
+          let count = _pointPrice.length + _detailList.length
+          let obj = {}
+          let index = 0
+          let index1 = 0
+          this.priceRZObjDb.detailListDb = []
+          for (let j = 0; j < count; j++) {
+            if (j % 2 == 0) {
+              obj = {
+                type: 1,
+                name: '蛋白',
+                weight: _detailList[index],
+                isWrite: false,
+                isShow: true,
+              }
+              if (j == 0) {
+                obj.isShow = false
+              }
+              index++
+            } else {
+              obj = {
+                type: 4,
+                jfprice: _pointPrice[index1],
+              }
+              index1++
             }
-            index++
-          } else {
-            obj = {
-              type: 4,
-              jfprice: _pointPrice[index1],
+            this.priceRZObjDb.detailListDb.push(obj)
+          }
+        }
+        else {
+          // this.isSolidFood = true
+          //以容重查看
+          _pointPrice = _priceList[0].pointPrice.split(',')
+          _detailList = _priceList[0].point.split(',')
+          let count = _pointPrice.length + _detailList.length
+          let obj = {}
+          let index = 0
+          let index1 = 0
+          this.priceRZObj.detailList = []
+          for (let j = 0; j < count; j++) {
+            if (j % 2 == 0) {
+              obj = {
+                type: 1,
+                name: '容重',
+                weight: _detailList[index],
+                isWrite: false,
+                isShow: true,
+              }
+              if (j == 0) {
+                obj.isShow = false
+              }
+              index++
+            } else {
+              obj = {
+                type: 4,
+                jfprice: _pointPrice[index1],
+              }
+              index1++
             }
-            index1++
+            this.priceRZObj.detailList.push(obj)
           }
-          this.priceRZObj.detailList.push(obj)
         }
       } else {
         //以水分查看

+ 4 - 4
src/views/houseSelfCollect/inspectionManagementNew.vue

@@ -138,7 +138,7 @@
                   <el-select :disabled="disabled2" v-if="carNumberList.length > 0 && serviceManagementType == 3"
                     filterable clearable :allow-create="true"  v-model="deptBudgetList.carNo"
                     placeholder="请选择车牌号" class="typeselect" @change="carChange($event, 1)">
-                    <el-option v-for="item in carNumberList" :key="item.constKey" :label="item.carNo"
+                    <el-option v-for="item in carNumberList" :key="item.id" :label="item.carNo"
                       :value="item.carNo" />
                   </el-select>
                   <!-- <el-select @change='carchange' v-if="statusTypetext=='初检'&&editcar==false&&carstatus||statusTypetext=='确认'&&editcar==false&&carstatus" v-model="deptBudgetList.carNo" placeholder="请选择车牌号">
@@ -1026,7 +1026,7 @@ export default {
       })
     },
     carChange(e, status) {
-      console.log(this.carNumberList)
+      console.log(this.carNumberList,e)
       if (status == 1) {
         this.$set(this.deptBudgetList, 'customerName', this.carNumberList[e].shipperName)
         this.$set(this.deptBudgetList, 'customerPhone', this.carNumberList[e].shipperPhone)
@@ -3588,7 +3588,7 @@ export default {
                           titleNoOther: '',
                           carNo:''
                         }
-      console.log(this.taskflag,22222222)
+      // console.log(this.taskflag,22222222)
       getReceiptTaskNo({
             flag: this.taskflag,
             warehouseName: this.warehouseName,
@@ -3596,7 +3596,7 @@ export default {
           })
             .toPromise()
             .then((response) => {
-              console.log(response,1111111111111111)
+              // console.log(response,1111111111111111)
               this.taskNolist = response
       })
       this.getList()

+ 4 - 0
src/views/houseSelfCollect/newWeighingManagement.vue

@@ -701,6 +701,7 @@
               managementType: 1,
               serviceManagementType: that.inWarehouseType,
               loadingstatus: 1,
+              pcFlag: 5
               // statusType:1
             })
             .toPromise()
@@ -717,6 +718,7 @@
               managementType: 1,
               serviceManagementType: that.inWarehouseType,
               loadingstatus: 1,
+              pcFlag: 5
               // statusType:1
             })
             .toPromise()
@@ -748,6 +750,7 @@
                   managementType: 1,
                   serviceManagementType: that.inWarehouseType,
                   loadingstatus: 1,
+                  pcFlag: 5
                   // statusType:1
                 })
                 .toPromise()
@@ -764,6 +767,7 @@
                   managementType: 1,
                   serviceManagementType: that.inWarehouseType,
                   loadingstatus: 1,
+                  pcFlag: 5
                   // statusType:1
                 })
                 .toPromise()

+ 95 - 49
src/views/houseSelfCollect/paymentManagement.vue

@@ -36,8 +36,8 @@
         <ws-button :type="invoicing === 0 ? 'primary' : ''" @click="screen(0)">未开票</ws-button>
       </template>
       <template slot="right">
-        <el-select class="warehouse_select" v-model="goodsName" placeholder="请选择货名" @change="goodsNameChange" filterable
-          clearable style="margin: 0 10px">
+        <el-select class="warehouse_select" v-model="goodNames" placeholder="请选择货名" @change="goodsNameChange" filterable
+          clearable  multiple :multiple-limit="multipleLimit" style="margin: 0 10px">
           <el-option label="全部货名" value="全部货名"></el-option>
           <el-option v-for="item in goodnameList" :key="item.id" :label="item.goodsName" :value="item.goodsName">
           </el-option>
@@ -125,8 +125,8 @@
       </el-table-column>
       <el-table-column fixed class="table_td" prop="carNo" label="车牌号"></el-table-column>
       <el-table-column  class="table_td" prop="contractNo" label="合同号"></el-table-column>
-      <el-table-column class="table_td" v-if='warehouseName=="鲅鱼圈金信库"' width='140' prop="actualWeighingFee"
-        label="卸车过磅费(元)"></el-table-column>
+      <!-- <el-table-column class="table_td" v-show='warehouseName=="鲅鱼圈金信库"' width='140' prop="actualWeighingFee"
+        label="卸车过磅费(元)"></el-table-column> -->
       <el-table-column class="table_td" prop="goodsName" width="70" label="货名"></el-table-column>
       <el-table-column class="table_td" prop="type" width="60" label="类型"></el-table-column>
       <el-table-column class="table_td" prop="tidalGrainPrice" width="140" label="净重单价(元/公斤)"></el-table-column>
@@ -164,26 +164,32 @@
       <el-table-column class="table_td" prop="collectionEdPayable" label="操作" width="600">
         <template scope="scope">
           <span v-hasPermission="`acquisitionManagement.acquisitionPay.add`">
-            <el-button v-if="
+            <el-button v-show="
                 (!scope.row.approveStatus ||scope.row.approveStatus == '待结算') &&
                 (scope.row.status == '待结算' || scope.row.status == '已驳回' )||scope.row.approveStatus&&scope.row.reverseFlag==1
               " @click="settlement(1, scope.row)">结算</el-button>
           </span>
           <el-button @click="settlement(2, scope.row)" v-hasPermission="`acquisitionManagement.acquisitionPay.view`">查看
           </el-button>
-          <el-button v-if="scope.row.approveStatus&&scope.row.reverseFlag!=1" @click="settleaccounts(scope.row)"
+          <el-button v-show="scope.row.approveStatus&&scope.row.reverseFlag!=1" @click="settleaccounts(scope.row)"
             v-hasPermission="`acquisitionManagement.acquisitionPay.seet`">反结算
           </el-button>
-          <el-button v-if="
+          <el-button v-show="
               scope.row.approveStatus ||
               (scope.row.status != '待结算' && !scope.row.approveStatus)
             " @click="print(scope.row)" v-hasPermission="`acquisitionManagement.acquisitionPay.print`">打印</el-button>
-          <el-button v-if="
+          <el-button v-show="
+              (scope.row.approveStatus ||
+              (scope.row.status != '待结算' && !scope.row.approveStatus))&&compId=='6a713699e08c4cbc97a87f7648a95e3d'
+            " @click="printPY(scope.row)" v-hasPermission="`acquisitionManagement.acquisitionPay.print`">三方打印</el-button>
+          <el-button v-show="
               scope.row.approveStatus ||
               (scope.row.status != '待结算' && !scope.row.approveStatus)
-            " @click="print1(scope.row)" v-hasPermission="`acquisitionManagement.acquisitionPay.finace`">财务打印
+            " @click="print1(scope.row)" 
+            v-hasPermission="`acquisitionManagement.acquisitionPay.finace`"
+            >财务打印
           </el-button>
-          <el-button v-if="
+          <el-button v-show="
               scope.row.approveStatus ||
               (scope.row.status != '待结算' && !scope.row.approveStatus)
             " @click="print1(scope.row,2)" v-hasPermission="`acquisitionManagement.acquisitionPay.yeda`">业务打印
@@ -191,7 +197,7 @@
           <el-button @click="previewPayOrder(scope.row)" class="my-pre"
             v-hasPermission="`acquisitionManagement.acquisitionPay.pay`">预览付款单
           </el-button>
-          <el-button type="danger" v-if="
+          <el-button type="danger" v-show="
               (!scope.row.approveStatus ||
                 scope.row.approveStatus == '待结算') &&
               scope.row.status == '待结算'
@@ -214,7 +220,7 @@
             <ws-form-item label="付款日期" prop=" paymentDate">
               <el-date-picker v-model="payments.paymentDate" type="date" placeholder="选择日期"></el-date-picker>
             </ws-form-item>
-            <ws-form-item label="上传截图" prop=" paymentScreenshot"></ws-form-item>
+            <ws-form-item label="上传截图" prop="paymentScreenshot"></ws-form-item>
             <div class="upLoad">
               <el-upload class="avatar-uploader" :action="global.uploadPath" :show-file-list="false"
                 :on-success="handleAvatarSuccess">
@@ -245,7 +251,7 @@
             <span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
               <i class="el-icon-zoom-in"></i>
             </span>
-            <span v-if="!disabled" class="el-upload-list__item-delete" @click="_handleRemove(file)">
+            <span v-show="!disabled" class="el-upload-list__item-delete" @click="_handleRemove(file)">
               <i class="el-icon-delete"></i>
             </span>
           </span>
@@ -319,10 +325,10 @@
         <el-form-item label="开户支行" label-width="100px">
           {{ customerlist.bankDepositBranch }}
         </el-form-item>
-        <el-form-item label="收款人姓名" label-width="100px" v-if="customerlist.customerTypeFlag == '1'">
+        <el-form-item label="收款人姓名" label-width="100px" v-show="customerlist.customerTypeFlag == '1'">
           {{ customerlist.payeeName }}
         </el-form-item>
-        <el-form-item label="收款人身份证号" label-width="120px" v-if="customerlist.customerTypeFlag == '1'">
+        <el-form-item label="收款人身份证号" label-width="120px" v-show="customerlist.customerTypeFlag == '1'">
           {{ customerlist.payeeNumberCard }}
         </el-form-item>
         <el-form-item label="手机号" label-width="100px">
@@ -337,8 +343,8 @@
       </div>
     </el-dialog>
     <el-dialog width="50%" title="付款回执单" :visible.sync="isPreviewPayOrder" :close="paymentReceiptClose">
-      <div class="no-messege" v-if="!paymentReceipt">暂未上传付款回执单</div>
-      <el-image class="my-img" ref="myImg" v-if="paymentReceipt" :src="paymentReceipt"
+      <div class="no-messege" v-show="!paymentReceipt">暂未上传付款回执单</div>
+      <el-image class="my-img" ref="myImg" v-show="paymentReceipt" :src="paymentReceipt"
         :preview-src-list="[paymentReceipt]">
       </el-image>
     </el-dialog>
@@ -412,6 +418,7 @@
         customerInfo: false,
         form: {},
         labelposition: 'right',
+        multipleLimit:0,
         invoicingList: [{
           label: '航天信息',
           value: 1
@@ -493,8 +500,10 @@
         appendixIdsAdd: '',
         excelFreightspace: [],
         goodnameList: [],
-        goodsName: '全部货名',
-        printTips:""
+        goodNames: [],
+        goodsName: '',
+        printTips:'',
+        compId:''
       }
     },
     mounted() {
@@ -504,6 +513,8 @@
       console.log( this.currentPage,this.pageSize)
       this.getPassYearFormatDate()
       this.getWarehouse()
+      this.compId=localStorage.getItem('ws-pf_compId')
+      localStorage.setItem('pengyuPrint', false)
     },
     // activated() {
     //   this.userJurisdiction = getHp('acquisitionManagement.acquisitionPay.print')
@@ -520,10 +531,15 @@
     },
     methods: {
       goodsNameChange(e) {
-        if(e == "全部货名"){
-          this.goodsName = ""
+        if(e.indexOf('全部货名')!=-1){
+          this.multipleLimit=1
+          this.goodNames=['全部货名']
+          this.goodsName = ''
+        }else{
+          this.goodsName=this.goodNames.toString()
+          this.multipleLimit=this.goodnameList.length
         }
-        this.getList()
+        // this.getList()
       },
       importClick(file, fileList) {
         this.fileTemp = file.raw
@@ -791,6 +807,7 @@
             })
           })
           .catch((res) => {
+            console.log(res)
             _this.$message.error('文件压缩失败')
           })
       },
@@ -903,17 +920,14 @@
           data
         } = param
         const sums = []
-        var _number = []
-        if (this.warehouseName == '鲅鱼圈金信库') {
-          _number = [11, 12,13, 16, 17, 18]
-        } else {
-          _number = [10, 11,12,15, 16, 17]
-        }
+        var _number = [11,12, 16, 17]
         if (this.modification.length > 0) {
           columns.forEach((column, index) => {
             if (index === 0) {
               sums[index] = '合计'
-            } else if (index === 10 || index === 11 || index === 15 || index === 16) {
+            
+            } else if (index === _number[0] || index === _number[1] || index === _number[2] || index === _number[
+                3] || index === _number[4]) {
               const values = this.modification.map((item) => Number(item[column.property]))
               if (!values.every((value) => isNaN(value))) {
                 sums[index] = values.reduce((prev, curr) => {
@@ -995,23 +1009,23 @@
           let index1 = 0
           let index2 = 0
           for (let i = 0; i < this.modification.length; i++) {
-            await getCustomerLook({  
-                id: this.modification[i].identityId,
-                authenticationStatusKey: 7,
-              })
-              .toPromise()
-              .then((response) => {
-                this.selectCustomerList.push(response)
-                index2++
-                if (
-                  index1 == this.modification.length &&
-                  index2 == this.modification.length
-                ) {
-                  this.printData.compName = ''
-                  // this.isShowPrint = true
-                  this.printBig()
-                }
-                getpaymentexamine({
+            //  getCustomerLook({  
+            //     id: this.modification[i].identityId,
+            //     authenticationStatusKey: 7,
+            //   })
+            //   .toPromise()
+            //   .then((response) => {
+            //     this.selectCustomerList.push(response)
+            //     index2++
+            //     if (
+            //       index1 == this.modification.length &&
+            //       index2 == this.modification.length
+            //     ) {
+            //       this.printData.compName = ''
+            //       // this.isShowPrint = true
+            //       this.printBig()
+            //     }
+                await getpaymentexamine({
                     id: this.modification[i].id,
                   })
                   .toPromise()
@@ -1028,17 +1042,17 @@
                       '月' +
                       date.getDate() +
                       '日'
+                    this.selectCustomerList.push(response)
                     this.selectPrintList.push(response)
                     if (
-                      index1 == this.modification.length &&
-                      index2 == this.modification.length
+                      index1 == this.modification.length 
                     ) {
                       this.printData.compName = ''
                       // this.isShowPrint = true
                       this.printBig()
                     }
                   })
-              })
+              // })
           }
         } else {
           let _url1 = process.env.VUE_APP_BASE_API + '/identityAuthenticationInfo/api/getIdentityAuthenticationInfo'
@@ -1060,6 +1074,7 @@
               // val 是数组中每个接口返回的值 res.data
               console.log('两个接口全部加载完成', val1, val2);
               this.printData = val2.data
+              console.log(this.printData)
               if (val2.data.compName == '黑龙江秋收有限公司') {
                 this.printData.compName = '黑龙江中天昊元贸易有限公司'
               }
@@ -1275,8 +1290,10 @@
         } else if (this.printType == 0) {
           localStorage.setItem('cwprint', true)
           _list1 = JSON.stringify(this.printData)
+          localStorage.setItem('printData1',_list1)
           _list2 = JSON.stringify(this.customerList)
         } else {
+          localStorage.setItem('printData1',_list1)
           _list1 = JSON.stringify(this.printData)
           _list2 = JSON.stringify(this.customerList)
         }
@@ -1632,6 +1649,7 @@
         }
       },
       print1(row,num) {
+      localStorage.setItem('pengyuPrint', false)
         if(num == 2){
           this.printTips = 2
         }
@@ -1641,8 +1659,36 @@
         localStorage.setItem('cwprint', true)
       },
       print(row) {
+      localStorage.setItem('pengyuPrint', false)
+        this.printType = 2
+        localStorage.setItem('cwprint', false)
+        getpaymentexamine({
+            id: row.id,
+          })
+          .toPromise()
+          .then((response) => {
+            this.printData = response
+            if (response.compName == '黑龙江秋收有限公司') {
+              this.printData.compName = '黑龙江中天昊元贸易有限公司'
+            }
+            this.isShowPrint = true
+            // if(this.printData.solidGrainPrice){
+            //   this.printData.solidGrainPrice = (this.printData.tidalGrainPrice * this.printData.netWeight)/this.printData.pureWeight
+            // }
+            let date = new Date()
+            this.printData.currentTime =
+              date.getFullYear() +
+              '年' +
+              Number(date.getMonth() + 1) +
+              '月' +
+              date.getDate() +
+              '日'
+          })
+      },
+      printPY(row) {
         this.printType = 2
         localStorage.setItem('cwprint', false)
+        localStorage.setItem('pengyuPrint', true)
         getpaymentexamine({
             id: row.id,
           })

+ 75 - 26
src/views/houseSelfCollect/settlement.vue

@@ -397,37 +397,86 @@
           if (!this.paymentList.unitDeduction) {
             this.paymentList.unitDeduction = 0
           }
-          this.paymentList.buckleWeightRatio = this.paymentList.qualityInspectionManagement.buckleWeightRatio
-          this.paymentList.tidalGrainPrice = this.paymentList.tidalGrainPrice.toFixed(4)
-          if (this.paymentList.qualityInspectionManagement.paramType == '2') {
-            this.paymentList.qualityInspectionManagement.weightDeduction = (this.paymentList
-                .qualityInspectionManagement.waterContent - 14) *
-              this.paymentList.buckleWeightRatio
-            this.paymentList.qualityInspectionManagement.weightDeduction = this.paymentList
-              .qualityInspectionManagement.weightDeduction.toFixed(2)
-            this.paymentList.base = (100 - this.paymentList.qualityInspectionManagement.weightDeduction) / 100
-            this.paymentList.base = this.paymentList.base.toFixed(3)
-            if (this.paymentList.type == '潮粮') {
-              if(this.paymentList.base > 1){
-                this.paymentList.base = 1
+          let compIdTmp  = localStorage.getItem('ws-pf_compId')
+          //白城市鹏羽粮食贸易有限公司 扣重比1.25 干粮水分15
+          if(compIdTmp == '6a713699e08c4cbc97a87f7648a95e3d'){
+            // this.paymentList.buckleWeightRatio = this.paymentList.qualityInspectionManagement.buckleWeightRatio
+            this.paymentList.buckleWeightRatio = 1.25
+            this.ganwater = 14.5
+            this.paymentList.tidalGrainPrice = this.paymentList.tidalGrainPrice.toFixed(4)
+            if (this.paymentList.qualityInspectionManagement.paramType == '2') {
+              this.paymentList.qualityInspectionManagement.weightDeduction = (this.paymentList
+                  .qualityInspectionManagement.waterContent - 15) *
+                this.paymentList.buckleWeightRatio
+              this.paymentList.qualityInspectionManagement.weightDeduction = this.paymentList
+                .qualityInspectionManagement.weightDeduction.toFixed(2)
+              this.paymentList.base = (100 - this.paymentList.qualityInspectionManagement.weightDeduction) / 100
+              this.paymentList.base = this.paymentList.base.toFixed(3)
+              if (this.paymentList.type == '潮粮') {
+                if(this.paymentList.base > 1){
+                  this.paymentList.base = 1
+                }
+                this.paymentList.pureWeight = this.paymentList.base * this.paymentList.weighingManagement.netWeight
+                this.paymentList.pureWeight = Math.round(this.paymentList.pureWeight)
               }
-              this.paymentList.pureWeight = this.paymentList.base * this.paymentList.weighingManagement.netWeight
-              this.paymentList.pureWeight = Math.round(this.paymentList.pureWeight)
-            }
 
-          } else {
-            if (this.paymentList.type == '潮粮') {
-              let paramtmp = (100 - this.paymentList.param) / 100
-              if(paramtmp > 1){
-                paramtmp = 1
+            } else {
+              if (this.paymentList.type == '潮粮') {
+                let paramtmp = (100 - this.paymentList.param) / 100
+                if(paramtmp > 1){
+                  paramtmp = 1
+                }
+                this.paymentList.pureWeight = this.paymentList.weighingManagement.netWeight * paramtmp
+                this.paymentList.pureWeight = Math.round(this.paymentList.pureWeight)
               }
-              this.paymentList.pureWeight = this.paymentList.weighingManagement.netWeight * paramtmp
-              this.paymentList.pureWeight = Math.round(this.paymentList.pureWeight)
+            }
+            if (!this.paymentList.dryGrainPrice) {
+              this.paymentList.dryGrainPrice = this.paymentList.qualityInspectionManagement.tidalGrainPrice / this
+                .paymentList.base
             }
           }
-          if (!this.paymentList.dryGrainPrice) {
-            this.paymentList.dryGrainPrice = this.paymentList.qualityInspectionManagement.tidalGrainPrice / this
-              .paymentList.base
+          else{
+            // this.paymentList.buckleWeightRatio = this.paymentList.qualityInspectionManagement.buckleWeightRatio
+            if(this.paymentList.qualityInspectionManagement.waterContent >= 30){
+              this.paymentList.buckleWeightRatio = 1.3
+            }
+            else if(this.paymentList.qualityInspectionManagement.waterContent <= 15){
+              this.paymentList.buckleWeightRatio = 1.15
+            }
+            else{
+              this.paymentList.buckleWeightRatio = 1.3 - (30 - this.paymentList.qualityInspectionManagement.waterContent)*0.01
+            }
+            this.paymentList.tidalGrainPrice = this.paymentList.tidalGrainPrice.toFixed(4)
+            if (this.paymentList.qualityInspectionManagement.paramType == '2') {
+              this.paymentList.qualityInspectionManagement.weightDeduction = (this.paymentList
+                  .qualityInspectionManagement.waterContent - 14) *
+                this.paymentList.buckleWeightRatio
+              this.paymentList.qualityInspectionManagement.weightDeduction = this.paymentList
+                .qualityInspectionManagement.weightDeduction.toFixed(2)
+              this.paymentList.base = (100 - this.paymentList.qualityInspectionManagement.weightDeduction) / 100
+              this.paymentList.base = this.paymentList.base.toFixed(3)
+              if (this.paymentList.type == '潮粮') {
+                if(this.paymentList.base > 1){
+                  this.paymentList.base = 1
+                }
+                this.paymentList.pureWeight = this.paymentList.base * this.paymentList.weighingManagement.netWeight
+                this.paymentList.pureWeight = Math.round(this.paymentList.pureWeight)
+              }
+
+            } else {
+              if (this.paymentList.type == '潮粮') {
+                let paramtmp = (100 - this.paymentList.param) / 100
+                if(paramtmp > 1){
+                  paramtmp = 1
+                }
+                this.paymentList.pureWeight = this.paymentList.weighingManagement.netWeight * paramtmp
+                this.paymentList.pureWeight = Math.round(this.paymentList.pureWeight)
+              }
+            }
+            if (!this.paymentList.dryGrainPrice) {
+              this.paymentList.dryGrainPrice = this.paymentList.qualityInspectionManagement.tidalGrainPrice / this
+                .paymentList.base
+            }
           }
           this.grainMoney()
         })

+ 30 - 28
src/views/outboundManagement/newQualityInspectionManagement.vue

@@ -524,31 +524,6 @@
         return year + '' + mouth + datetime
       },
       opendBtn() {
-        html2canvas(this.$refs.saveImg.$el).then((canvas) => {
-          let dataURL = canvas.toDataURL('image/png')
-          this.imgUrl = dataURL
-          if (this.imgUrl !== '') {
-            let b = this.dataURLtoFile(this.imgUrl, 'printImage')
-            let formdata = new FormData()
-            formdata.append('file', b)
-            axios({
-              method: 'post',
-              url:this.global.uploadPath,
-              data: formdata,
-            }).then((response) => {
-              // debugger
-              // console.log(response,111111111111)
-              //编辑接口
-              this.printData.pictureAddress = response.data.data.url
-              this.inspect.pictureAddress = response.data.data.url
-              addOut(this.inspect)
-                .toPromise()
-                .then((response) => {})
-            })
-          }
-        })
-      },
-      closeDialog() {
         // html2canvas(this.$refs.saveImg.$el).then((canvas) => {
         //   let dataURL = canvas.toDataURL('image/png')
         //   this.imgUrl = dataURL
@@ -561,15 +536,42 @@
         //       url:this.global.uploadPath,
         //       data: formdata,
         //     }).then((response) => {
+        //       // debugger
+        //       // console.log(response,111111111111)
         //       //编辑接口
-        //       this.printData.pictureAddress = response.data.url
-        //       this.inspect.pictureAddress = response.data.url
+        //       this.printData.pictureAddress = response.data.data.url
+        //       this.inspect.pictureAddress = response.data.data.url
         //       addOut(this.inspect)
         //         .toPromise()
         //         .then((response) => {})
         //     })
         //   }
         // })
+      },
+      closeDialog() {
+        html2canvas(this.$refs.saveImg.$el).then((canvas) => {
+          let dataURL = canvas.toDataURL('image/png')
+          this.imgUrl = dataURL
+          if (this.imgUrl !== '') {
+            let b = this.dataURLtoFile(this.imgUrl, 'printImage')
+            let formdata = new FormData()
+            formdata.append('file', b)
+            axios({
+              method: 'post',
+              url:this.global.uploadPath,
+              data: formdata,
+            }).then((response) => {
+              //编辑接口
+              this.printData.pictureAddress = response.data.url
+              this.inspect.pictureAddress = response.data.url
+              addOut(this.inspect)
+                .toPromise()
+                .then((response) => {
+                  this.getList()
+                })
+            })
+          }
+        })
         this.isShowPrint = false
       },
       print() {
@@ -767,7 +769,7 @@
                     this.printData.contractManagement = this.inspect.contractManagement
                     console.log(this.printData)
                     this.isShowPrint = true
-                    this.getList()
+                    
                   })
 
               })

+ 23 - 12
src/views/outboundManagement/weighingManagementNew.vue

@@ -147,12 +147,13 @@
                         </el-select>
                       </ws-form-item>
                       <ws-form-item v-if="fleetNameList.length > 0 && tpyeNo == 1&&weighingList.outType == '汽运'" label="车队" span="1" prop="fleetName">
-                        <el-select @change="fleetNameChange" :disabled="recheck" v-model="weighingList.fleet" placeholder="非车队车辆">
+                        <el-select @change="fleetNameChange" v-if="!recheck" v-model="weighingList.fleetId" placeholder="非车队车辆">
                           <el-option  key="" label="非车队"
                             value="非车队" />
                           <el-option v-for="item in fleetNameList" :key="item.value" :label="item.fleetName"
-                            :value="item.fleetName" />
+                            :value="item.id" />
                         </el-select>
+                        <ws-input v-model="weighingList.fleet" maxlength="20" size="small" :disabled="recheck"/>
                       </ws-form-item>
                       <ws-form-item v-if=" weighingList.outType == '火运'" label="流向" span="1" prop="carNo">
                     <el-select :disabled="recheck1" filterable clearable
@@ -166,12 +167,12 @@
                       weighingList.outType == '集装箱船'||
                       weighingList.outType == '火运'
                     ">
-                        <el-input :maxlength="'7'" v-if="carjudge" v-model="weighingList.carNo" placeholder="请输入车牌号"
+                        <el-input :maxlength="'7'" v-if="carjudge||!carjudge&&tpyeNo==2&&!weighingList.tranCarNo" v-model="weighingList.carNo" placeholder="请输入车牌号"
                            size="small" :disabled="recheck1"/>
-                        <el-select v-else filterable clearable v-model="weighingList.carNo" placeholder="请选择车牌号"
+                        <el-select v-if="!carjudge&&tpyeNo==1||!carjudge&&tpyeNo==2&&weighingList.tranCarNo" filterable clearable v-model="weighingList.carId" placeholder="请选择车牌号"
                           class="typeselect" @change="carChange" :disabled="recheck1">
                           <el-option v-for="item in options2" :key="item.constKey"
-                            :label="item.carNo + '(' + item.tranCarNo + ')'" :value="item.carNo" />
+                            :label="item.carNo + '(' + item.tranCarNo + ')'" :value="item.id" />
                         </el-select>
                         <el-button type="primary" @click="carNoTypeChange" v-if="carstatus">{{ carChange1 }}</el-button>
                       </ws-form-item>
@@ -311,7 +312,7 @@
                 </div>
               </div>
 
-              <el-table @cell-click="listclick" :data="deliveryList" style="width: 100%; margin-top: 20px"
+              <el-table v-show="tpyeNo==2" @cell-click="listclick" :data="deliveryList" style="width: 100%; margin-top: 20px"
                 ref="deliveryList" border>
                 <el-table-column prop="number" width="120" label="业务编号"></el-table-column>
                 <el-table-column prop="carNumber" label="车牌号"></el-table-column>
@@ -487,6 +488,7 @@
         statusType: '3',
         warehouseType: 1,
         weighingList: {
+          carNumber: '',
           grossWeight: '',
           tare: '',
           selfLoading: 0,
@@ -793,6 +795,7 @@
               warehouseName: that.warehouseName,
               managementType: 3,
               statusType: that.statusType,
+              pcFlag: 3
               // loadingstatus: 1,
             })
             .toPromise()
@@ -834,6 +837,7 @@
                   warehouseName: that.warehouseName,
                   managementType: 3,
                   statusType: that.statusType,
+                  pcFlag: 3
                   // loadingstatus: 1,
                 })
                 .toPromise()
@@ -1144,9 +1148,7 @@
 
       listclick(row) {
         if(this.tpyeNo == 2){
-          
-        }
-        this.id = row.id
+          this.id = row.id
         getweighing({
             id: row.id,
           })
@@ -1175,6 +1177,11 @@
             // this.weighingList.carNo =
               // response.qualityInspectionManagement.carNumber
         this.$set(this.weighingList,'carNo', response.qualityInspectionManagement.carNumber)
+        if(this.weighingList.inOutType=='移库出库'&&this.tpyeNo == 2){
+          this.options2=[]
+          this.options2.push({id:this.weighingList.carId,carNo:this.weighingList.carNo, tranCarNo:this.weighingList.tranCarNo,tranPrice:this.weighingList.freight })
+        }
+        // console.log(this.weighingList.carId)
             this.weighingList.boxNo = response.boxNo
             this.weighingList.boxNoOther = response.boxNoOther
             this.weighingList.titleNo = response.titleNo
@@ -1192,6 +1199,8 @@
               mildewGrain: '',
             }
           })
+        }
+        
         // if(){
 
         // }
@@ -2062,11 +2071,11 @@
       },
       carChange(e) {
         for (let i = 0; i < this.tranCarInfoList.length; i++) {
-          if (this.tranCarInfoList[i].carNo == this.weighingList.carNo) {
+          if (this.tranCarInfoList[i].id == this.weighingList.carId) {
+            this.weighingList.carNo = this.tranCarInfoList[i].carNo
             this.weighingList.carNumber = this.tranCarInfoList[i].carNo
             this.weighingList.tranCarNo = this.tranCarInfoList[i].tranCarNo
             this.weighingList.freight = this.tranCarInfoList[i].tranPrice
-            this.weighingList.carId = this.tranCarInfoList[i].id
           }
         }
       },
@@ -2078,7 +2087,8 @@
           this.carChange1 = '手动填写'
         }else{
           for (let i = 0; i < this.fleetNameList.length; i++) {
-            if (this.fleetNameList[i].carNo == this.weighingList.fleetName) {
+            if (this.fleetNameList[i].id == this.weighingList.fleetId) {
+              this.weighingList.fleetName=this.fleetNameList[i].carNo
               this.weighingList.freight = this.fleetNameList[i].tranPrice
               this.carjudge=true
               if (this.carjudge) {
@@ -2410,6 +2420,7 @@
             warehouseName: this.warehouseName,
             managementType: 3,
             statusType: this.statusType,
+            pcFlag: 3
           })
           .toPromise()
           .then((response) => {

+ 15 - 0
src/views/platformAudit/component/routers/route.js

@@ -106,6 +106,21 @@ const platformauditRouter = {
                 _title: '粮脉动态审核'
             },
         },
+        //交易信息审核
+        {
+            path: 'tradeInformation',
+            component: () =>
+                import ( /* webpackChunkName: "applDetail" */ '@/views/platformaudit/tradeInformation'),
+            name: 'tradeInformation',
+            meta: {
+                title: 'tradeInformation',
+                shortcutEntrance: 'tradeInformation',
+                module: 'audit.grainMerchant.grainMerchantInfo.review',
+                permissicon: [],
+                keepAlive: true,
+                _title: '交易信息审核'
+            },
+        },
         // 客服留言
         {
             path: 'customerService',

+ 600 - 0
src/views/platformAudit/tradeInformation.vue

@@ -0,0 +1,600 @@
+<!--交易信息审核-->
+<template>
+  <div>
+    <BaseHeaderLayout :leftSpan="15">
+      <template slot="right">
+        <ws-select v-model="statustext" placeholder="" class="typeselect" @change="selectExamineType">
+          <ws-option v-for="item in searchTypeList" :key="item.value" :label="item.value" :value="item.value"
+            style="color: #8890b1" />
+        </ws-select>
+        <ws-input class='findinput' v-model="searchKeyWord" placeholder="可按账号、发布者昵称查找" clearable maxlength="500"
+          @keyup.enter.native="lookUp()" type="input"></ws-input>
+        <ws-button class="find" type="primary" @click="lookUp()"><img width="16" height="16" style="
+              vertical-align: text-top;
+              position: relative;
+              top: 0px;
+              left: -8px;
+            " src="../../../public/img/sousuo.png" alt="" /></ws-button>
+        <!-- </div> -->
+      </template>
+    </BaseHeaderLayout>
+      <el-table class="wenzi" :data="dynamicsList.records" style="width: 100%" height="calc(100% - 110px)">
+        <el-table-column type="index" label="序号" width="50">
+          <template scope="scope">
+            <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
+            <span v-else>{{ scope.$index + 1 }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="publisher" label="昵称">
+        </el-table-column>
+        <el-table-column prop="phone" label="账号">
+          <template scope="scope">
+            {{scope.row.commonUser?scope.row.commonUser.phone:''}}
+          </template>
+        </el-table-column>
+        <el-table-column prop="placeDelivery" label="交货地/货源地"> </el-table-column>
+        <el-table-column prop="tranType" label="类型"> </el-table-column>
+        <el-table-column prop="title" label="用户状态">
+          <template slot-scope="scope">
+            <el-select  v-model="scope.row.flag" placeholder="" class="statusselect"
+            @change='selectstatuschange($event,scope.row)'>
+            <el-option label="自动通过" value="自动通过"
+              style="color: #8890b1" />
+              <el-option label="需审核" value="需审核"
+              style="color: #8890b1" />
+              <el-option label="禁止发布" value="禁止发布"
+              style="color: #8890b1" />
+          </el-select>
+          </template>
+        </el-table-column>
+        <el-table-column prop="updateDate" label="更新时间" width="140">
+        </el-table-column>
+        <el-table-column prop="" label="操作" width="180">
+          <template slot-scope="scope">
+            <div class="recordafter" @click="nocomplete(scope.row)"
+             >
+              查看
+            </div>
+            <div class="record" @click="deleteclick(scope.row)"
+              >
+              删除
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="address" label="审核">
+          <!-- class="record"
+           class="record" -->
+          <template slot-scope="scope">
+            <div class="recordafter" v-if="scope.row.status == '待审核'" @click="rejectList(scope.row)">
+              驳回
+            </div>
+            <div class="record" v-if="scope.row.status == '待审核'" @click="adoptList(scope.row)"
+              v-hasPermission="`audit.tranMerchant.tranMerchantInfo.view`">
+              通过
+            </div>
+            <template v-else v-hasPermission="`audit.tranMerchant.tranMerchantInfo.view`" slot-scope="scope">
+              {{ scope.row.status }}
+            </template>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+        :page-size="deptCircularPage.pageSize" layout="total, sizes, prev, pager, next, jumper"
+        :total="deptBudgetTotal">
+      </el-pagination>
+    <!--动态信息-->
+    <el-dialog width="40%" title="查看交易信息" :visible.sync="dialogFormVisible" :append-to-body="true">
+      <el-form class="customer" :model="form">
+        <el-form-item label="发布人" :label-width="formLabelWidth">
+          {{ SettledCompanyDynamicsList.publisher }}({{ SettledCompanyDynamicsList.tranType }})
+        </el-form-item>
+        <el-form-item label="交货地/货源地" :label-width="formLabelWidth">
+          {{ SettledCompanyDynamicsList.placeDelivery }}
+        </el-form-item>
+        <el-form-item label="发布内容" :label-width="formLabelWidth">
+          {{ SettledCompanyDynamicsList.publishingContent }}
+        </el-form-item>
+
+        <el-form-item label="附件" :label-width="formLabelWidth">
+          <div v-if="SettledCompanyDynamicsList.address">
+           <div :key="index" v-for="(item, index) in SettledCompanyDynamicsList.address">
+            <img style="float:left" v-if="item" :src="item" class="avatar">
+          </div> 
+          </div>
+          <div v-else>暂无附件</div>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <span v-if="SettledCompanyDynamicsList.status == '待审核'">
+          <el-button @click="reject(id)">驳回</el-button>
+          <el-button @click="adopt(id)">通过</el-button>
+        </span>
+        <span v-else>
+          <el-button @click="dialogFormVisible = fase">关闭</el-button>
+        </span>
+      </div>
+    </el-dialog>
+
+  </div>
+</template>
+<script>
+  import {
+    gettransation,
+    gettransationList,
+    transationdelete,
+    transationaduit,
+    transationedituser
+  } from '@/model/platformaudit/index'
+  import Pagination from '@/components/Pagination'
+  import WsUpload from '@/components/WsUpload'
+  import {
+    EventBus
+  } from 'base-core-lib'
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+      Pagination,
+    },
+    watch: {
+      vesselId(val) {
+        this.getList()
+      },
+      isShow(val) {
+        this.showType = val
+      },
+    },
+    data() {
+      return {
+        //弹出框
+        dialogFormVisible: false,
+        dialogViewSpareMoney: false,
+        // 表格显示数据
+        tableDate: [],
+        wrapstatus: false,
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+        currentPage: 1,
+        pageSize: 10,
+        status:'',
+        statustext:'全部',
+        deptBudgetTotal: 0,
+        searchTypeText: '待审核',
+        searchKeyWord: '',
+        imgUrl: '',
+        // 提交类型
+        submitType: true,
+        size: 10,
+        spanArr: [],
+        searchType: 1,
+        compId: localStorage.getItem('ws-pf_compId'),
+        deptCircularPage: {},
+        dynamicsList: [],
+        pcFlag: 1,
+        formLabelWidth: '120px',
+        form: {},
+        SettledCompanyDynamicsList: {
+          compName: '',
+          title: '',
+          content: '',
+          address: '',
+          city: '',
+        },
+        deptBudgetList: {},
+        searchTypeList: [{
+            value: '待审核',
+            type: 1
+          },
+          {
+            value: '已通过',
+            type: 2
+          },
+          {
+            value: '已驳回',
+            type: 2
+          },
+          {
+            value: '全部',
+            type: ''
+          },
+        ],
+        settledCompanyDynamicsInfo: {
+          id: '',
+          flag: '',
+        },
+        accessoryTFs: false,
+      }
+    },
+    activated() {
+      this.getList()
+    },
+    methods: {
+      selectstatuschange(e,row){
+        transationedituser(row)
+              .toPromise()
+              .then((response) => {
+                this.getList()
+              })
+      },
+      lookUp() {
+        this.currentPage = 1
+        this.getList()
+      },
+      deleteclick(row) {
+        this.$confirm(`确定删除交易信息?`, {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            transationdelete({
+                id: row.id,
+              })
+              .toPromise()
+              .then((response) => {
+                this.getList()
+              })
+          })
+          .catch(() => {
+            return false
+          })
+      },
+      selectExamineType(e) {
+        for (var i = 0; i < this.searchTypeList.length; i++) {
+          if (this.searchTypeList[i].value == e) {
+            if(e=='全部'){
+              this.status =''
+            }else{
+              this.status = this.searchTypeList[i].value
+            }
+            
+          }
+        }
+
+        this.currentPage = 1
+        this.getList()
+      },
+      nocomplete(row) {
+        gettransation({
+            id: row.id,
+          })
+          .toPromise()
+          .then((response) => {
+            this.SettledCompanyDynamicsList = response
+            if (response.urlImg != null) {
+              this.SettledCompanyDynamicsList.address = response.urlImg.split(',')
+            }
+            this.id = response.id
+          })
+        this.dialogFormVisible = true
+      },
+      //审核通过
+      adopt(id) {
+        this.settledCompanyDynamicsInfo.flag = 1
+        this.settledCompanyDynamicsInfo.id = id
+        this.$confirm(`确定通过交易信息?`, '提示', {
+            confirmButtonText: '通过',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            transationaduit(this.settledCompanyDynamicsInfo)
+              .toPromise()
+              .then((response) => {
+                this.$notify.success({
+                  title: '成功',
+                  message: '通过成功',
+                })
+                this.dialogFormVisible = false
+                this.getList()
+              })
+              .catch((response) => {
+                EventBus.$emit('error', response.message)
+              })
+          })
+          .catch(() => {
+            return false
+          })
+      },
+      //列表审核通过
+      adoptList(row) {
+        this.settledCompanyDynamicsInfo.flag = 1
+        this.settledCompanyDynamicsInfo.id = row.id
+        this.$confirm(`确定通过交易信息?`, '提示', {
+            confirmButtonText: '通过',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            transationaduit(this.settledCompanyDynamicsInfo)
+              .toPromise()
+              .then((response) => {
+                this.$notify.success({
+                  title: '成功',
+                  message: '通过成功',
+                })
+                this.getList()
+              })
+              .catch((response) => {
+                EventBus.$emit('error', response.message)
+              })
+          })
+          .catch(() => {
+            return false
+          })
+      },
+      //审核驳回
+      reject(id) {
+        this.settledCompanyDynamicsInfo.flag = 2
+        this.settledCompanyDynamicsInfo.id = id
+        this.$confirm(`确定驳回交易信息?`, '提示', {
+            confirmButtonText: '驳回',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            transationaduit(this.settledCompanyDynamicsInfo)
+              .toPromise()
+              .then((response) => {
+                this.$notify.success({
+                  title: '成功',
+                  message: '驳回成功',
+                })
+                this.dialogFormVisible = false
+                this.getList()
+              })
+              .catch((response) => {
+                console.log(response)
+                EventBus.$emit('error', response.message)
+              })
+          })
+          .catch(() => {
+            return false
+          })
+      },
+      //列表审核驳回
+      rejectList(row) {
+        this.settledCompanyDynamicsInfo.flag = 2
+        this.settledCompanyDynamicsInfo.id = row.id
+        this.$confirm(`确定驳回交易信息?`, '提示', {
+            confirmButtonText: '驳回',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            transationaduit(this.settledCompanyDynamicsInfo)
+              .toPromise()
+              .then((response) => {
+                this.$notify.success({
+                  title: '成功',
+                  message: '驳回成功',
+                })
+                this.getList()
+              })
+              .catch((response) => {
+                console.log(response)
+                EventBus.$emit('error', response.message)
+              })
+          })
+          .catch(() => {
+            return false
+          })
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+      //粮脉动态列表
+      getList() {
+        gettransationList({
+            status:this.status,
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            searchKeyWord: this.searchKeyWord
+          })
+          .toPromise()
+          .then((response) => {
+            if(response.records.length>0){
+              for (let i = 0; i < response.records.length; i++) {
+                if(!response.records[i].commonUser.transactionStatus){
+                  response.records[i].flag='需审核'
+                }else{
+                  response.records[i].flag=response.records[i].commonUser.transactionStatus
+                }
+                
+              }
+            }
+            
+            this.dynamicsList = response
+            this.deptCircularPage.currentPage = response.current
+            this.deptCircularPage.pageSize = response.size
+            this.deptBudgetTotal = response.total
+          })
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .container {
+    width: 100%;
+    margin: 0 auto;
+  }
+
+  .vertical-text-left {
+    width: 62px;
+    text-align: right;
+  }
+
+  .el-button--primary {
+    background-color: #5878e8;
+    border-color: #5878e8;
+  }
+
+  .el-button--default {
+    color: #8890b1;
+    border-color: #e8eaf1;
+  }
+
+  /deep/.base_header_layout .grid-content.right .find.el-button--primary {
+    width: 30px;
+    margin-left: 0;
+    border-top-left-radius: 0px;
+    border-bottom-left-radius: 0px;
+  }
+
+  /deep/.findValue .el-input__inner {
+    border-top-right-radius: 0px;
+    border-bottom-right-radius: 0px;
+  }
+
+  //操作按钮
+  .record,
+  .recordafter,
+  .adjustment {
+    display: inline-block;
+    color: #5878e8;
+    padding: 0 4px !important;
+    position: relative;
+    font-size: 14px;
+  }
+
+  .recordafter:after {
+    position: absolute;
+    content: '';
+    display: block;
+    top: 5px;
+    right: -2px;
+    width: 1px;
+    height: 12px;
+    background: #e9ecf7;
+  }
+
+  //状态样式
+  .executory,
+  .inExecution,
+  .done {
+    width: 6px;
+    height: 6px;
+    display: inline-block;
+    border-radius: 50%;
+    position: relative;
+    top: -1px;
+    font-size: 14px;
+  }
+
+  .executory {
+    background: #ff9f24;
+  }
+
+  .inExecution {
+    background: #5878e8;
+  }
+
+  .done {
+    background: #50cad4;
+  }
+
+  .putstorage.el-button--default,
+  .deliverystorage.el-button--default {
+    border-color: #8890b1;
+    background-color: #fff;
+    color: #8890b1;
+  }
+
+  /deep/.el-table td,
+  /deep/.el-table th.is-leaf {
+    border-right: 1px solid #e9ecf7;
+    text-align: center;
+  }
+
+  /deep/.el-table tr td:first-child,
+  /deep/.el-table tr th.is-leaf:first-child {
+    border-left: 1px solid #e9ecf7;
+  }
+
+  .el-row {
+    height: 60px;
+  }
+
+  .base_header_layout .grid-content {
+    margin-top: 80px;
+  }
+
+  .el-input--small .el-input__inner {
+    margin-left: 20px;
+  }
+
+  .el-range-editor--small.el-input__inner {
+    height: 32px;
+    margin: 0 10px;
+  }
+
+  /deep/.el-pagination {
+    text-align: center;
+    white-space: nowrap;
+    padding: 2px 5px;
+    color: #303133;
+    font-weight: 700;
+    margin-bottom: 20px;
+  }
+
+  .el-select {
+    width: 30%;
+    margin-right: 10px;
+  }
+
+  .el-tag+.el-tag {
+    margin-left: 10px;
+  }
+
+  .button-new-tag {
+    margin-left: 10px;
+    height: 32px;
+    line-height: 30px;
+    padding-top: 0;
+    padding-bottom: 0;
+  }
+
+  .input-new-tag {
+    width: 90px;
+    margin-left: 10px;
+    vertical-align: bottom;
+  }
+
+  .customer .el-form-item {
+    border-bottom: 1px solid #ccc;
+  }
+
+  /deep/.typeselect .el-input__inner {
+    color: #8890b1;
+  }
+
+  .avatar {
+    width: 178px;
+    height: 178px;
+    display: block;
+  }
+
+  .shade {
+    background: rgba(0, 0, 0, 0.1);
+  }
+
+  /deep/.base_header_layout .find.el-button--primary {
+    width: 30px;
+    border-top-left-radius: 0px;
+    border-bottom-left-radius: 0px;
+  }
+
+  /deep/.base_header_layout .findinput input {
+    border-top-right-radius: 0px;
+    border-bottom-right-radius: 0px;
+  }
+</style>

+ 299 - 84
src/views/profitable/cashout.vue

@@ -96,7 +96,7 @@
           </el-form-item>
         </el-form>
         <div v-if='deptBudgetList.purpose=="合同费用"&&deptBudgetList.type=="非粮款"||deptBudgetList.purpose=="库点费用"&&deptBudgetList.flag!="是"' class='expensetitle'>费用分配</div>
-        <div v-if='deptBudgetList.purpose=="合同费用"&&deptBudgetList.type=="非粮款"||deptBudgetList.purpose=="库点费用"&&deptBudgetList.flag!="是"' style='margin:0  auto 10px;width:90%;'>
+        <div v-if='deptBudgetList.purpose=="合同费用"&&deptBudgetList.type=="非粮款"||deptBudgetList.purpose=="库点费用"&&deptBudgetList.flag!="是"' style='margin:0  auto 10px;width:90%;display: flex;'>
             <ws-select v-model="mode" placeholder="费用分配方式" @change="modeselect">
           <ws-option v-for="item in modeList" :key="item.value" :label="item.value" :value="item.value"
             style="color: #8890b1" />
@@ -116,14 +116,27 @@
           <ws-option v-for="item in datesList" :key="item.value" :label="item.value" :value="item.value"
             style="color: #8890b1" />
         </ws-select> -->
-         <ws-select :disabled='disabled' v-model="moneys" v-if='mode!="暂不分配"' placeholder="费用分配金额">
+         <ws-select style="margin-left: 10px" :disabled='disabled' v-model="moneys" v-if='mode!="暂不分配"' placeholder="费用分配金额">
           <ws-option v-for="item in moneysList" :key="item.value" :label="item.value" :value="item.value"
             style="color: #8890b1" />
         </ws-select>
-        <span v-if='mode!="暂不分配"'>合计分配:{{amount}}元</span>  
+        <div style='width:30%;margin-left: 10px' v-if='deptBudgetList.purpose == "库点费用" && deptBudgetList.flag == "否" &&mode != "暂不分配"'>
+            <el-date-picker v-model="value2" type="daterange" align="right" unlink-panels range-separator="至"
+              start-placeholder="开始日期" value-format='yyyy-MM-dd' end-placeholder="结束日期" :picker-options="pickerOptions"
+              @change="dateChange">
+            </el-date-picker>
+        </div>
+        <el-button style="margin-left: 10px" type="primary" @click="queren" v-if='deptBudgetList.purpose == "库点费用" && deptBudgetList.flag == "否" &&mode != "暂不分配"'>确认</el-button>
+        <ws-select style="margin-left: 25px" v-if='(deptBudgetList.purpose == "库点费用"  &&mode != "暂不分配"&& deptBudgetList.flag == "否")'  v-model="goodsSource" placeholder="全部客户" 
+            @change='sourceChange'>
+            <ws-option key="全部客户" label="全部客户" value="全部客户" style="color: #8890b1" />
+            <ws-option v-for="item in customerList" :key="item.orderId" :label="item.goodsSource" :value="item.orderId"
+              style="color: #8890b1" />
+        </ws-select>
+        <span style="margin-top:5px;margin-left: 10px;" v-if='mode!="暂不分配"'>合计分配:{{amount}}元</span>  
         </div>
         <el-table ref="tableref" v-if='deptBudgetList.purpose=="合同费用"&&deptBudgetList.type=="非粮款"&&mode!="暂不分配"||deptBudgetList.purpose=="库点费用"&&mode!="暂不分配"&&deptBudgetList.flag!="是"' :data="feeDetailsDistributions" style="width: 90%;margin:0 auto;">
-          <el-table-column v-if='deptBudgetList.purpose=="合同费用"' prop="date" label="仓库名称" min-width="110">
+          <el-table-column key="1"  width="150" v-if='deptBudgetList.purpose=="合同费用"' prop="date" label="仓库名称" min-width="110">
             <template slot-scope="scope">
               <el-select v-model="scope.row.warehouseName" filterable placeholder="选择仓库" @change="((value)=>{selectware(value, scope.$index)})">
                 <el-option v-for="item in warehouseList" :key="item.warehouseName" :label="item.warehouseName" :value="item.warehouseName"
@@ -139,43 +152,52 @@
               </el-select>
             </template>
           </el-table-column> -->
-          <el-table-column v-if='deptBudgetList.purpose=="合同费用"' prop="date" label="日期">
+          <el-table-column key="2" width="200" v-if='deptBudgetList.purpose=="合同费用"' prop="date" label="日期">
             <template slot-scope="scope">
                 <el-date-picker @change="((value)=>{selectware(value, scope.$index)})" v-model="scope.row.receiptDocDate" type="date" placeholder="请选择日期"
               value-format="yyyy-MM-dd"   ></el-date-picker>
             </template>
           </el-table-column>
-          <el-table-column v-if='deptBudgetList.purpose=="库点费用"' prop="date" label="日期">
+          <el-table-column key="3" width="200" v-if='deptBudgetList.purpose=="库点费用"' prop="date" label="日期">
             <template slot-scope="scope">
                 <el-date-picker @change="((value)=>{receiptDocDatechange(value, scope.$index)})" v-model="scope.row.receiptDocDate" type="date" placeholder="请选择日期"
               value-format="yyyy-MM-dd"   ></el-date-picker>
             </template>
           </el-table-column>
-          <el-table-column v-if='deptBudgetList.purpose=="库点费用"||deptBudgetList.purpose=="合同费用"' prop="date" label="货源">
+          <el-table-column key="4" v-if='deptBudgetList.purpose=="库点费用"||deptBudgetList.purpose=="合同费用"' prop="date" label="货源">
               <template slot-scope="scope">
                 <!-- {{scope.row.goodsourcelist}} -->
-                <el-select v-model="scope.row.orderId" placeholder="选择货源" @change="((value)=>{selectgoodsSource(value, scope.row,scope.$index)})">
+                <!-- <el-select class="goodsource" v-if="scope.row.orderId &&confirmFlag==0" v-model="scope.row.orderId" placeholder="选择货源" @change="((value)=>{selectgoodsSource(value, scope.row,scope.$index)})">
+                    <el-option v-for="item in goodsourcelist[scope.$index]" :key="item.id" :label="item.goodsSource" :value="item.id"
+                        style="color: #8890b1" />
+                </el-select>
+                <el-select class="goodsource" v-else v-model="scope.row.goodsSource" placeholder="选择货源" @change="((value)=>{selectgoodsSource(value, scope.row,scope.$index)})"> -->
+                <el-select style="width: 100%;" v-if="(scope.row.orderId &&confirmFlag==0 && !scope.row.goodsSource)" v-model="scope.row.orderId" placeholder="选择货源" @change="((value)=>{selectgoodsSource(value, scope.row,scope.$index)})">
+                    <el-option v-for="item in goodsourcelist[scope.$index]" :key="item.id" :label="item.goodsSource" :value="item.id"
+                        style="color: #8890b1" />
+                </el-select>
+                <el-select style="width: 100%;" v-else v-model="scope.row.goodsSource" placeholder="选择货源" @change="((value)=>{selectgoodsSource(value, scope.row,scope.$index)})">
                     <el-option v-for="item in goodsourcelist[scope.$index]" :key="item.id" :label="item.goodsSource" :value="item.id"
                         style="color: #8890b1" />
                 </el-select>
             </template>
           </el-table-column>
-          <el-table-column v-if='deptBudgetList.purpose=="库点费用"' prop="date" label="货名">
+          <el-table-column key="5" width="150" v-if='deptBudgetList.purpose=="库点费用"' prop="date" label="货名">
             <template slot-scope="scope">
                <span>{{scope.row.goodsName?scope.row.goodsName:'自动获取'}}</span>
             </template>
           </el-table-column>
-          <el-table-column prop="inWarehouseWeight" label="入库量(吨)">
+          <el-table-column key="6" width="150" prop="inWarehouseWeight" label="入库量(吨)">
             <template slot-scope="scope">
                <span>{{scope.row.inWarehouseWeight?scope.row.inWarehouseWeight:'自动获取'}}</span>
             </template>
           </el-table-column>
-          <el-table-column prop="date" label="分配金额(元)">
+          <el-table-column key="7" width="200" prop="date" label="分配金额(元)">
             <template slot-scope="scope">
                 <el-input placeholder="输入费用名称,1-15个字" class="input_css" v-model="scope.row.distributionMoney"></el-input>
             </template>
           </el-table-column>
-          <el-table-column prop="address" label="操作" width="200">
+          <el-table-column key="8" prop="address" label="操作" width="200">
             <template slot-scope="scope">
                 <img class='add' @click='addlist()' src="../../../public/img/add.png" alt="">
                 <img class='del' @click='dellist(scope.row)' src="../../../public/img/del.png" alt="">
@@ -192,16 +214,31 @@
 </template>
 <script>
   import WsUpload from '@/components/WsUpload'
-  import {setexpense,getcontract,getwarehouse,addexenseinfo,getwarehousingorder,getexpensecount,getpayeeinfo} from '@/model/profitable/index'
+  import {setexpense,getcontract,getwarehouse,addexenseinfo,getwarehousingorder,getexpensecount,getpayeeinfo,getwarehousingorderList} from '@/model/profitable/index'
   export default {
     components: {
       WsUpload,
     },
     data() {
       return {
+        customerList: [],
+        goodsSource: '',
+        value2: '',
+        endDate: '',
+        startDate: '',
+        baseId: '',
+        currentPage: 1,
+        pageSize: 10,
+        searchType: '',
+        searchKeyWord: '',
+        goodsName: '',
+        //是否按时间筛选标识,1是
+        confirmFlag: 0,
+        datas: [],
+        orderId: '',
         value: [],
         profitList: [{
-          name: "玉米",
+          name: '玉米',
           count: 2000,
         }],
         mode:'全部分配',
@@ -213,7 +250,7 @@
         warecontractList:[],
         dateRange: this.disabledDate(),
         feeDetailsDistributions:[{receiptDocDate:'',inWarehouseWeight:0,distributionMoney:0,warehouseName:'',goodsName:'',goodsSource:'',index:0}],
-        deptBudgetList:{purpose:"合同费用",type:'粮款',flag:'否',payee:'',accountNumber:'',bank:'',bankBranch:'',wareExpenseType:'杂费',},
+        deptBudgetList:{purpose:'合同费用',type:'粮款',flag:'否',payee:'',accountNumber:'',bank:'',bankBranch:'',wareExpenseType:'杂费',},
         makeWordData: {},
         warehouseList:[],
         contractList:[],
@@ -243,7 +280,7 @@
 
     },
     activated() {
-      
+      this.value2 = this.getNowTime()
       getexpensecount({compId:localStorage.getItem('ws-pf_compId')}).toPromise()
           .then(response => {
             // this.Num=response
@@ -260,43 +297,72 @@
     // 计算属性的 getter
       amount: function () {
         // `this` 指向 vm 实例
-        var num=0
-        for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
-          if(this.feeDetailsDistributions[i].distributionMoney){
-            num+=Number(this.feeDetailsDistributions[i].distributionMoney)
+         var num = 0
+         if (this.feeDetailsDistributions) {
+           for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
+             if (this.feeDetailsDistributions[i].distributionMoney) {
+               num += Number(this.feeDetailsDistributions[i].distributionMoney)
+             }
+           }
+           return num.toFixed(2)
+         }
+       }
+    },
+    methods: {
+      sourceChange(e) {
+      if (e == '') {
+        this.goodsSource = '全部客户'
+      } else {
+        for(let i=0;i<this.customerList.length;i++){
+          if(this.customerList[i].orderId == e){
+            this.orderId = this.customerList[i].orderId
+            this.goodsSource  = this.customerList[i].goodsSource
+            break;
           }
         }
-        return num
+        
       }
+        this.selectOrderList()
+    },
+      getNowTime() {
+      const start = new Date(new Date().getTime() - 3600 * 1000 * 24)
+        .toISOString()
+        .replace('T', ' ')
+        .split('.')[0] //默认开始时间1天前
+      const end = new Date(new Date().getTime())
+        .toISOString()
+        .replace('T', ' ')
+        .split('.')[0]//默认结束时间今天
+      // console.log([start.split(' '), end])
+      return [start.split(' ')[0], end.split(' ')[0]]
     },
-    methods: {
       Previewf(file) {
       console.log(file);
       // window.open(file.response)
       if (file) {
-        const addTypeArray = file.name.split(".");
+        const addTypeArray = file.name.split('.');
         const addType = addTypeArray[addTypeArray.length - 1];
         console.log(addType);
-        if (addType === "pdf") {
+        if (addType === 'pdf') {
           let routeData = this.$router.resolve({
-            path: "/insurancePdf",
+            path: '/insurancePdf',
             query: { url: file.response, showBack: false },
           });
-          window.open(routeData.href, "_blank");
+          window.open(routeData.href, '_blank');
         }
         //".rar, .zip, .doc, .docx, .xls, .txt, .pdf, .jpg,  .png, .jpeg,"
-        else if (addType === "doc" || addType === "docx" || addType === "xls") {
+        else if (addType === 'doc' || addType === 'docx' || addType === 'xls') {
           window.open(
-            "http://view.officeapps.live.com/op/view.aspx?src=" + file.response
+            'http://view.officeapps.live.com/op/view.aspx?src=' + file.response
           );
-        } else if (addType === "txt") {
+        } else if (addType === 'txt') {
           window.open(file.response);
-        } else if (["png", "jpg", "jpeg"].includes(addType)) {
+        } else if (['png', 'jpg', 'jpeg'].includes(addType)) {
           window.open(file.response);
-        } else if (addType === "rar" || addType === "zip") {
+        } else if (addType === 'rar' || addType === 'zip') {
           this.$message({
-            message: "该文件类型暂不支持预览",
-            type: "warning",
+            message: '该文件类型暂不支持预览',
+            type: 'warning',
           });
            return false;
         }
@@ -328,9 +394,9 @@
       timeFun(unixtimestamp) {
         var unixtimestamp = new Date(unixtimestamp);
         var year = 1900 + unixtimestamp.getYear();
-        var month = "0" + (unixtimestamp.getMonth() + 1);
-        var date = "0" + unixtimestamp.getDate();
-        return year + "-" + month.substring(month.length - 2, month.length) + "-" +     date.substring(date.length - 2,date.length)      
+        var month = '0' + (unixtimestamp.getMonth() + 1);
+        var date = '0' + unixtimestamp.getDate();
+        return year + '-' + month.substring(month.length - 2, month.length) + '-' +     date.substring(date.length - 2,date.length)      
       },
       selectware(e,index){
         var arr=[]
@@ -345,47 +411,58 @@
             this.$set(this.goodsourcelist,index,JSON.parse(JSON.stringify(arr)))
           })
       },
-      selectgoodsSource(e,item,index){
-        var weight=0
-        console.log(e)
-        var money=0
-        if(!this.deptBudgetList.amountMoney&&this.moneys=='按重量自动分配'){
-          for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
-            if(this.feeDetailsDistributions[i].orderId==e){
-              this.feeDetailsDistributions[i].orderId=''
-            }
+      selectgoodsSource(e, item, index) {
+      var weight = 0
+      var money = 0
+      var moneyDiff = 0
+      if (!this.deptBudgetList.amountMoney && this.moneys == '按重量自动分配') {
+        for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
+          if (this.feeDetailsDistributions[i].orderId && this.feeDetailsDistributions[i].orderId == e) {
+            this.feeDetailsDistributions[i].orderId = ''
           }
-          this.$message({
-                message: '请输入金额之后进行操作',
-                type: 'warning',
-              })
-          return
         }
-        for (let i = 0; i < this.goodsourcelist[index].length; i++) {
-          if(this.goodsourcelist[index][i].id==e){
-            this.feeDetailsDistributions[index].goodsSource=this.goodsourcelist[index][i].goodsSource
-            this.feeDetailsDistributions[index].inWarehouseWeight=this.goodsourcelist[index][i].weight
-            this.feeDetailsDistributions[index].goodsName=this.goodsourcelist[index][i].goodsName
-            this.feeDetailsDistributions[index].goodsNameKey=this.goodsourcelist[index][i].goodsNameKey
-            }
+        this.$message({
+          message: '请输入金额之后进行操作',
+          type: 'warning',
+        })
+        return
+      }
+      for (let i = 0; i < this.goodsourcelist[index].length; i++) {
+        if (this.goodsourcelist[index][i].id == e) {
+          this.feeDetailsDistributions[index].goodsSource = this.goodsourcelist[index][i].goodsSource
+          this.feeDetailsDistributions[index].inWarehouseWeight = this.goodsourcelist[index][i].weight
+          this.feeDetailsDistributions[index].goodsName = this.goodsourcelist[index][i].goodsName
+          this.feeDetailsDistributions[index].goodsNameKey = this.goodsourcelist[index][i].goodsNameKey
+          this.feeDetailsDistributions[index].orderId = this.goodsourcelist[index][i].id
         }
-        if(this.moneys=='按重量自动分配'){
-          weight = this.feeDetailsDistributions.reduce(function (total, currentValue, currentIndex, arr) {
-              return total + currentValue.inWarehouseWeight;
-          }, 0)
-          for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
-              this.feeDetailsDistributions[i].distributionMoney=Math.round((this.feeDetailsDistributions[i].inWarehouseWeight/weight)*this.deptBudgetList.amountMoney)
-              money+=this.feeDetailsDistributions[i].distributionMoney
-          }
+      }
+      if (this.moneys == '按重量自动分配') {
+        for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
+          weight += Number(this.feeDetailsDistributions[i].inWarehouseWeight)
         }
-      },
+        for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
+          if (i != this.feeDetailsDistributions.length - 1) {
+                this.feeDetailsDistributions[i].distributionMoney = Math.round((this.feeDetailsDistributions[i].inWarehouseWeight / weight) * this.deptBudgetList.amountMoney)
+                if (this.feeDetailsDistributions[i].distributionMoney) {
+                  moneyDiff += Number(this.feeDetailsDistributions[i].distributionMoney)
+                }
+              }
+              if (i == this.feeDetailsDistributions.length - 1) {
+                this.feeDetailsDistributions[i].distributionMoney = (this.deptBudgetList.amountMoney - moneyDiff).toFixed(2)
+              }
+              money = (this.feeDetailsDistributions[i].distributionMoney + moneyDiff).toFixed(2)
+        }
+      }
+    },
       selecttime(e,item,index){
         var weight=0
         var money=0
         if(!this.deptBudgetList.amountMoney&&this.moneys=='按重量自动分配'){
           for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
             if(this.feeDetailsDistributions[i].receiptDocDate==e){
-              this.feeDetailsDistributions[i].receiptDocDate=''
+              // this.feeDetailsDistributions[i].receiptDocDate=''
+              this.$set(this.feeDetailsDistributions[index],'receiptDocDate','')
+
             }
           }
           this.$message({
@@ -415,7 +492,8 @@
         // console.log(this.feeDetailsDistributions)
       },
       receiptDocDatechange(e,index){
-        this.feeDetailsDistributions[index].orderId=''
+        // this.feeDetailsDistributions[index].orderId=''
+        this.$set(this.feeDetailsDistributions[index],'orderId','')
         var arr=[]
         this.goodsourcelist[index]=[]
         getwarehousingorder({warehouseName:this.deptBudgetList.warehouseName,receiptDocDate:e}).toPromise()
@@ -426,6 +504,97 @@
              this.$set(this.goodsourcelist,index,JSON.parse(JSON.stringify(arr)))
           })
       },
+      queren() {
+      if (!this.deptBudgetList.amountMoney && this.moneys == '按重量自动分配') {
+        this.$message({
+          message: '请输入金额之后进行操作',
+          type: 'warning',
+        })
+        return
+      }
+      this.confirmFlag = 1
+      this.selectOrderList()
+    },
+    dateChange(e) {
+      this.value2 = e
+    },
+    selectOrderList() {
+      var arr = []
+      var weight = 0
+      var money = 0
+      var moneyDiff = 0
+      this.startDate = this.value2[0]
+      this.endDate = this.value2[1]
+      if(!this.deptBudgetList.warehouseId){
+        this.$message({
+          message: '请选择仓库之后进行操作',
+          type: 'warning',
+        })
+        return
+      }
+      getwarehousingorderList({
+        compId: localStorage.getItem('ws-pf_compId'),
+        startDate: this.startDate,
+        endDate: this.endDate,
+        baseId: this.deptBudgetList.warehouseId,
+        currentPage: this.currentPage,
+        pageSize: this.pageSize,
+        searchType: this.searchType,
+        searchKeyWord: this.searchKeyWord,
+        goodsName: this.goodsName,
+        goodsSource: this.goodsSource == '全部客户' ? '' : this.goodsSource,
+        confirmFlag : this.confirmFlag
+      })
+        .toPromise()
+        .then((response) => {
+          this.datas = []
+          if (this.goodsSource && this.goodsSource != '全部客户') {
+            for (let i = 0; i < response.records.length; i++) {
+              this.datas.push(response.records[i])
+            }
+            for (let z = 0; z < this.datas.length; z++) {
+              arr.push({ receiptDocDate: this.datas[z].issuingTime, goodsSource: this.datas[z].goodsSource,orderId:this.datas[z].id, id:'', weight: this.datas[z].inWarehouseWeight, goodsName: this.datas[z].goodsName, goodsNameKey: this.datas[z].goodsNameKey })
+            }
+            this.feeDetailsDistributions = arr
+          } else {
+            for (let i = 0; i < response.records.length; i++) {
+              for (let j = 0; j < response.records[i].warehousingOrderList.length; j++) {
+                this.datas.push(response.records[i].warehousingOrderList[j])
+              }
+            }
+            for (let z = 0; z < this.datas.length; z++) {
+              arr.push({ receiptDocDate: this.datas[z].issuingTime, goodsSource: this.datas[z].goodsSource,orderId:this.datas[z].id, id:'', weight: this.datas[z].inWarehouseWeight, goodsName: this.datas[z].goodsName, goodsNameKey: this.datas[z].goodsNameKey })
+            }
+            this.feeDetailsDistributions = arr
+
+            //获取客户
+            this.customerList = this.unique(arr)
+          }
+          for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
+            this.feeDetailsDistributions[i].inWarehouseWeight = this.feeDetailsDistributions[i].weight
+            weight += Number(this.feeDetailsDistributions[i].inWarehouseWeight)
+          }
+          if (this.moneys == '按重量自动分配') {
+            for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
+              if (i != this.feeDetailsDistributions.length - 1) {
+                this.feeDetailsDistributions[i].distributionMoney = Math.round((this.feeDetailsDistributions[i].inWarehouseWeight / weight) * this.deptBudgetList.amountMoney)
+                if (this.feeDetailsDistributions[i].distributionMoney) {
+                  moneyDiff += Number(this.feeDetailsDistributions[i].distributionMoney)
+                }
+              }
+              if (i == this.feeDetailsDistributions.length - 1) {
+                this.feeDetailsDistributions[i].distributionMoney = Number(this.deptBudgetList.amountMoney - moneyDiff).toFixed(2)
+              }
+              // this.feeDetailsDistributions[i].distributionMoney = Math.round((this.feeDetailsDistributions[i].inWarehouseWeight / weight) * this.deptBudgetList.amountMoney)
+              money = Number(this.feeDetailsDistributions[i].distributionMoney + moneyDiff).toFixed(2)
+            }
+          }
+        })
+    },
+    unique(arr) {
+      const res = new Map();
+      return arr.filter((arr) => !res.has(arr.goodsSource) && res.set(arr.goodsSource, 1));
+    },
       selectcontent(e){
 
       },
@@ -436,7 +605,7 @@
             this.signingDate=this.contractList[i].signingDate
             getpayeeinfo({compId:localStorage.getItem('ws-pf_compId'),contractNo:e}).toPromise()
               .then((response1) => {
-                this.deptBudgetList.payee=response1.customerType=="企业客户"?response1.compName:response1.customerName
+                this.deptBudgetList.payee=response1.customerType=='企业客户'?response1.compName:response1.customerName
                 this.deptBudgetList.accountNumber=response1.bankCard
                 this.deptBudgetList.bank=response1.bankDeposit
                 this.deptBudgetList.bankBranch=response1.bankDepositBranch
@@ -449,7 +618,12 @@
         }
       },
       returnsales(){
-        this.$router.go(-1)
+        // this.$router.go(-1)
+        this.feeDetailsDistributions = [{receiptDocDate:'',inWarehouseWeight:0,distributionMoney:0,warehouseName:'',goodsName:'',goodsSource:'',index:0}]
+        this.goodsourcelist = []
+        this.$router.push({
+          path:'expensemanagementdetails'
+        })
       },
       handlefujian(file) {
         // console.log(file)
@@ -519,7 +693,7 @@
           })
           return
         }
-        if(this.deptBudgetList.purpose=='合同费用'&&this.deptBudgetList.type=='非粮款'||this.deptBudgetList.purpose=='库点费用'&&this.deptBudgetList.flag!="是"){
+        if(this.deptBudgetList.purpose=='合同费用'&&this.deptBudgetList.type=='非粮款'&&this.mode!='暂不分配'||this.deptBudgetList.purpose=='库点费用'&&this.deptBudgetList.flag!='是'&&this.mode!='暂不分配'){
           for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
             // if(!this.feeDetailsDistributions[i].goodsSource){
             //   this.$message({
@@ -528,7 +702,7 @@
             //   })
             //   return
             // }
-            if(!this.feeDetailsDistributions[i].distributionMoney&&this.mode!="暂不分配"){
+            if(!this.feeDetailsDistributions[i].distributionMoney&&this.mode!='暂不分配'){
               this.$message({
                 message: '分配金额不能为空!',
                 type: 'warning',
@@ -542,6 +716,13 @@
               })
               return
             }
+            if(!this.feeDetailsDistributions[i].orderId){
+              this.$message({
+                message: '货源不能为空!',
+                type: 'warning',
+              })
+              return
+            }
             if((String(this.feeDetailsDistributions[i].distributionMoney).indexOf('.') != -1 &&
               String(this.feeDetailsDistributions[i].distributionMoney).length -
               (String(this.feeDetailsDistributions[i].distributionMoney).indexOf('.') + 1) >
@@ -568,7 +749,7 @@
             this.deptBudgetList.expenseAllocationInfoList=[]
           }else{
             this.deptBudgetList.storageFeeFlag=0
-            if(this.mode=="暂不分配"){
+            if(this.mode=='暂不分配'){
             this.deptBudgetList.expenseAllocationInfoList=[]
             }else{
               this.deptBudgetList.expenseAllocationInfoList=this.feeDetailsDistributions
@@ -586,7 +767,7 @@
             this.deptBudgetList.expenseAllocationInfoList=[]
           }else if(this.deptBudgetList.type=='非粮款'){
             this.deptBudgetList.costType=3
-            if(this.mode!="暂不分配"){
+            if(this.mode!='暂不分配'){
               this.deptBudgetList.expenseAllocationInfoList=this.feeDetailsDistributions
             }
           }else if(this.deptBudgetList.type=='保证金'){
@@ -632,6 +813,7 @@
             }else{
               var repetition=data.filter((item,index)=>{
                 return this.feeDetailsDistributions[i].warehouseName==item.warehouseName&&this.feeDetailsDistributions[i].receiptDocDate==item.receiptDocDate
+                && this.feeDetailsDistributions[i].goodsSource == item.goodsSource && this.feeDetailsDistributions[i].orderId==item.orderId
               })
               if(repetition.length==0){
                 data.push(this.feeDetailsDistributions[i])
@@ -671,6 +853,7 @@
         }
        
         if(this.deptBudgetList.expensesPurpose==1&&this.deptBudgetList.costType==3&&this.mode=='全部分配'||this.deptBudgetList.expensesPurpose==3&&this.mode=='全部分配'&&this.deptBudgetList.storageFeeFlag!=1){
+          this.deptBudgetList.amountMoney = Number(this.deptBudgetList.amountMoney).toFixed(2)
           if(this.amount!=this.deptBudgetList.amountMoney){
             this.$message({
                 message: '请款金额与分配金额不相等!',
@@ -700,6 +883,7 @@
                 message: '费用名称输入错误!',
                 type: 'warning',
           })
+          return
         }
         if(!this.deptBudgetList.amountMoney){
           this.$message({
@@ -737,7 +921,7 @@
             })
             }
             this.mode='全部分配'
-            this.deptBudgetList={purpose:"合同费用",type:'粮款',flag:'否',payee:'',accountNumber:'',bank:'',bankBranch:'',wareExpenseType:'杂费',}
+            this.deptBudgetList={purpose:'合同费用',type:'粮款',flag:'否',payee:'',accountNumber:'',bank:'',bankBranch:'',wareExpenseType:'杂费',}
             this.feeDetailsDistributions=[{receiptDocDate:'',inWarehouseWeight:0,distributionMoney:0,warehouseName:'',goodsName:'',goodsSource:'',index:0}]
             this.paymentScreenshot=[]
             this.$refs.upload.clearFiles()
@@ -758,18 +942,46 @@
           console.log(e)
       },
       addlist(){
+        this.confirmFlag = 0
         this.feeDetailsDistributions.push({receiptDocDate:'',inWarehouseWeight:0,distributionMoney:0,warehouseName:'',time:0,id:0,weight:0,goodsName:'',goodsSource:'',index:0,   goodsNameKey: null,index:this.feeDetailsDistributions.length})
       },
-      dellist(row){
-        if(this.feeDetailsDistributions.length>1){
-          this.feeDetailsDistributions.splice(row.index,1)
-        }else{
-          this.$message({
-            message: '至少保留一条!',
-            type: 'warning',
-          })
+      dellist(row) {
+      var weight = 0
+      var money = 0
+      var moneyDiff = 0
+      if (this.feeDetailsDistributions.length > 1) {
+        for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
+          if (this.feeDetailsDistributions[i]) {
+            if (this.feeDetailsDistributions[i] == row) {
+              this.feeDetailsDistributions.splice(i, 1)
+              if (this.moneys == '按重量自动分配' ) {
+                for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
+                  weight += this.feeDetailsDistributions[i].inWarehouseWeight
+                }
+                for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
+                  if (i != this.feeDetailsDistributions.length - 1) {
+                this.feeDetailsDistributions[i].distributionMoney = Math.round((this.feeDetailsDistributions[i].inWarehouseWeight / weight) * this.deptBudgetList.amountMoney)
+                if (this.feeDetailsDistributions[i].distributionMoney) {
+                  moneyDiff += Number(this.feeDetailsDistributions[i].distributionMoney)
+                }
+              }
+              if (i == this.feeDetailsDistributions.length - 1) {
+                this.feeDetailsDistributions[i].distributionMoney = (this.deptBudgetList.amountMoney - moneyDiff).toFixed(2)
+              }
+              money = (this.feeDetailsDistributions[i].distributionMoney + moneyDiff).toFixed(2)
+
+                }
+              }
+            }
+          }
         }
-      },
+      } else {
+        this.$message({
+          message: '至少保留一条!',
+          type: 'warning',
+        })
+      }
+    },
       getList() {
         getcontract({
         compId:localStorage.getItem('ws-pf_compId'),
@@ -903,4 +1115,7 @@
   width: 110px;
   height:140px;
 }
+.goodsource{
+  width:100%;
+}
 </style>

+ 67 - 50
src/views/profitable/cashoutaduit.vue

@@ -15,6 +15,8 @@
           <el-form-item  label-width='100px' label="用途" span="1" prop="purpose" class="readonly">
             <ws-select disabled v-model="deptBudgetList.expensesPurpose" placeholder="" class="typeselect" >
               <ws-option label="合同费用" value="1"
+                style="color: #8890b1" />
+                <ws-option label="运费" value="2"
                 style="color: #8890b1" />
                 <ws-option label="库点费用" value="3"
                 style="color: #8890b1" />
@@ -29,6 +31,10 @@
                 <ws-option label="保证金" value="5" style="color: #8890b1" />
             </ws-select>
           </el-form-item>
+          <el-form-item label-width='100px' v-if='deptBudgetList.purpose=="库点费用"' label="仓储费" span="1" prop="contractNo" class="readonly">
+            <span v-if='(deptBudgetList.storageFeeFlag==1)'>是</span>
+              <span v-if='(deptBudgetList.storageFeeFlag==0)'>否</span>
+          </el-form-item>
           <el-form-item v-if='deptBudgetList.expensesPurpose==3' label-width='100px' label="仓库名称" span="1" prop="warehouse" class="readonly">
           {{deptBudgetList.warehouseName}}
           </el-form-item>
@@ -129,58 +135,69 @@
           </el-table>
 
       </div> -->
-      <div>
-        <div class="wenzi">车辆详情</div>
-        <el-table :data="deptBudgetList.tranSettlementReportList" style="width: 90%; margin: 20px auto; " ref="warehouseList"  >
-        <el-table-column type="index" label="序号" width="50"></el-table-column>
-        <el-table-column class="table_td" prop="contractNo" width="120" label="合同编号"></el-table-column>
-        <el-table-column class="table_td" prop="startAddress" width="120" label="发货库"></el-table-column>
-        <el-table-column class="table_td" prop="createDate" width="120" label="发货时间"></el-table-column>
-        <el-table-column class="table_td" prop="carNo" label="车牌号" width="140"></el-table-column>
-        <el-table-column width="100" class="table_td" prop="loadingWeight" label="装车净重(吨)">
-        </el-table-column>
-        <el-table-column width="100" class="table_td" prop="unloadingWeight" label="卸车净重(吨)">
-        </el-table-column>
-        <el-table-column width="120" class="table_td" prop="transportDamage" label="公司承担运损">
-        </el-table-column>
-        <el-table-column width="100" class="table_td" prop="lossWeight" label="损耗(吨)">
-        </el-table-column>
-        <el-table-column width="120" class="table_td" prop="actualLoss" label="实际损耗">
-        </el-table-column>
-        <el-table-column width="120" class="table_td" prop="transportPrice" label="预计单价(元/吨)"></el-table-column>
-        <el-table-column width="120" class="table_td" prop="settlementPrice" label="结算单价(元/吨)">
-        </el-table-column>
-        <el-table-column width="120" class="table_td" prop="settlementWeight" label="结算重量(吨)"></el-table-column>
-        <el-table-column width="120" class="table_td" prop="cargoDamage" label="货损">
-        </el-table-column>
-        <el-table-column width="120" class="table_td" prop="deductionAmount" label="扣款(元)"></el-table-column>
-        <el-table-column width="100" class="table_td" label="服务费(元)" prop="serviceCharge">
-        </el-table-column>
-        <el-table-column width="100" class="table_td" label="实付金额(元)" prop="amountActuallyPaid"></el-table-column>
-        <el-table-column width="100" class="table_td" label="税点(元)" prop="taxPoint"></el-table-column>
-        <el-table-column width="100" class="table_td" label="合计应付(元)" prop="totalPayable"></el-table-column>
-        <el-table-column width="100" class="table_td" label="已付金额(元)" prop="amountEdPayable">
-        </el-table-column>
-        <el-table-column width="100" class="table_td" label="未付金额(元)" prop="amountNotPayable"></el-table-column>
-        <el-table-column width="100" class="table_td" label="已开发票(元)" prop="alreadyInvoice">
-        </el-table-column>
-        <el-table-column width="150" class="table_td" label="付款日期" prop="paymentDate"></el-table-column>
-          <el-table-column width="150" class="table_td" label="司机/车队" prop="name">
-            <template
-              slot-scope="scope">
-              {{ scope.row.name }}
-              <span v-if="scope.row.fleetFlag==1">(队)</span>
-            </template>
-            </el-table-column>
-          </el-table>
-        <div style='width:90%;margin:10px auto;text-align:right;'>
+      <div v-if='deptBudgetList.expensesPurpose==2'>
+          <div v-for="item in deptBudgetList.tranTaskInfoList">
+            <el-form label-position="left">
+              <el-form-item label-width='100px' label="运输编号" span="1" prop="payee">
+                {{item.taskNo}}
+              </el-form-item>
+              <el-form-item label-width='100px' label="发货地" span="1" prop="accountNumber">
+              {{item.startPrivate}}{{item.startCity}}{{item.startArea}}{{item.startDetailedAddress}}
+              </el-form-item>
+              <el-form-item label-width='100px' label="收货地" span="1" prop="bank">
+                {{item.endPrivate}}{{item.endCity}}{{item.endArea}}{{item.endDetailedAddress}}
+              </el-form-item>
+            </el-form>
+            <el-table :data="item.tranSettlementReportList" style="width: 90%; margin: 20px auto; " ref="warehouseList" v-if='deptBudgetList.expensesPurpose==2' >
+          <el-table-column type="index" label="序号" width="50"></el-table-column>
+          <el-table-column class="table_td" prop="contractNo" width="120" label="合同编号"></el-table-column>
+          <el-table-column class="table_td" prop="startAddress" width="120" label="发货库"></el-table-column>
+          <el-table-column class="table_td" prop="createDate" width="120" label="发货时间"></el-table-column>
+          <el-table-column class="table_td" prop="carNo" label="车牌号" width="140"></el-table-column>
+          <el-table-column width="100" class="table_td" prop="loadingWeight" label="装车净重(吨)">
+          </el-table-column>
+          <el-table-column width="100" class="table_td" prop="unloadingWeight" label="卸车净重(吨)">
+          </el-table-column>
+          <el-table-column width="120" class="table_td" prop="transportDamage" label="公司承担运损">
+          </el-table-column>
+          <el-table-column width="100" class="table_td" prop="lossWeight" label="损耗(吨)">
+          </el-table-column>
+          <el-table-column width="120" class="table_td" prop="actualLoss" label="实际损耗">
+          </el-table-column>
+          <el-table-column width="120" class="table_td" prop="transportPrice" label="预计单价(元/吨)"></el-table-column>
+          <el-table-column width="120" class="table_td" prop="settlementPrice" label="结算单价(元/吨)">
+          </el-table-column>
+          <el-table-column width="120" class="table_td" prop="settlementWeight" label="结算重量(吨)"></el-table-column>
+          <el-table-column width="120" class="table_td" prop="cargoDamage" label="货损">
+          </el-table-column>
+          <el-table-column width="120" class="table_td" prop="deductionAmount" label="扣款(元)"></el-table-column>
+          <el-table-column width="100" class="table_td" label="服务费(元)" prop="serviceCharge">
+          </el-table-column>
+          <el-table-column width="100" class="table_td" label="实付金额(元)" prop="amountActuallyPaid"></el-table-column>
+          <el-table-column width="100" class="table_td" label="税点(元)" prop="taxPoint"></el-table-column>
+          <el-table-column width="100" class="table_td" label="合计应付(元)" prop="totalPayable"></el-table-column>
+          <el-table-column width="100" class="table_td" label="已付金额(元)" prop="amountEdPayable">
+          </el-table-column>
+          <el-table-column width="100" class="table_td" label="未付金额(元)" prop="amountNotPayable"></el-table-column>
+          <el-table-column width="100" class="table_td" label="已开发票(元)" prop="alreadyInvoice">
+          </el-table-column>
+          <el-table-column width="150" class="table_td" label="付款日期" prop="paymentDate"></el-table-column>
+            <el-table-column width="150" class="table_td" label="司机/车队" prop="name">
+              <template
+                slot-scope="scope">
+                {{ scope.row.name }}
+                <span v-if="scope.row.fleetFlag==1">(队)</span>
+              </template>
+              </el-table-column>
+            </el-table>
+          </div>
+        </div>
+        <div style='margin-top:10px;text-align:right;width:90%;'>
           <el-button class="bg-bottom" type="primary" size="small" @click="reject()">驳回
-        </el-button>
-        <el-button class="bg-bottom" type="primary" size="small" @click="pass()">通过
+          </el-button>
+          <el-button class="bg-bottom" type="primary" size="small" @click="pass()">通过
         </el-button>
         </div>
-      
-    </div>
     <el-dialog
       :title="title"
       :visible.sync="rejectshow"
@@ -217,7 +234,7 @@ import WsUpload from '@/components/WsUpload'
       return {
         value: [],
         profitList: [{
-          name: "玉米",
+          name: '玉米',
           count: 2000,
         }],
         mode:'全部分配',

+ 324 - 80
src/views/profitable/cashoutaduitNQ.vue

@@ -16,6 +16,7 @@
           <div style='margin:0 -30px 10px;font-weight:bold'>基本信息</div>
          <el-form-item label-width='100px' label="用途" span="1" prop="expensesPurpose">
               <span v-if='deptBudgetList.expensesPurpose==1'>合同费用</span>
+              <span v-if='deptBudgetList.expensesPurpose==2'>运费</span>
               <span v-if='deptBudgetList.expensesPurpose==3'>库点费用</span>
               <span v-if='deptBudgetList.expensesPurpose==5'>经营性费用</span>
           </el-form-item>
@@ -24,6 +25,10 @@
               <span v-if='deptBudgetList.costType==3'>非粮款</span>
               <span v-if='deptBudgetList.costType==5'>保证金</span>
           </el-form-item>
+          <el-form-item label-width='100px' v-if='deptBudgetList.purpose=="库点费用"' label="仓储费" span="1" prop="contractNo" class="readonly">
+            <span v-if='(deptBudgetList.storageFeeFlag==1)'>是</span>
+              <span v-if='(deptBudgetList.storageFeeFlag==0)'>否</span>
+          </el-form-item>
           <el-form-item v-if='deptBudgetList.expensesPurpose==3' label-width='100px' label="仓库名称" span="1" prop="warehouse" class="readonly">
           {{deptBudgetList.warehouseName}}
           </el-form-item>
@@ -71,67 +76,100 @@
             <el-input disabled class='input50 input_css' placeholder="输入开户支行" v-model="deptBudgetList.bankBranch"></el-input>
           </el-form-item>
         </el-form>
-        <div class="wenzi">车辆详情</div>
-        <el-table :data="deptBudgetList.tranSettlementReportList" style="width: 90%; margin: 20px auto; " ref="warehouseList"  >
-        <el-table-column type="index" label="序号" width="50"></el-table-column>
-        <el-table-column class="table_td" prop="contractNo" width="120" label="合同编号"></el-table-column>
-        <el-table-column class="table_td" prop="startAddress" width="120" label="发货库"></el-table-column>
-        <el-table-column class="table_td" prop="createDate" width="120" label="发货时间"></el-table-column>
-        <el-table-column class="table_td" prop="carNo" label="车牌号" width="140"></el-table-column>
-        <el-table-column width="100" class="table_td" prop="loadingWeight" label="装车净重(吨)">
-        </el-table-column>
-        <el-table-column width="100" class="table_td" prop="unloadingWeight" label="卸车净重(吨)">
-        </el-table-column>
-        <el-table-column width="120" class="table_td" prop="transportDamage" label="公司承担运损">
-        </el-table-column>
-        <el-table-column width="100" class="table_td" prop="lossWeight" label="损耗(吨)">
-        </el-table-column>
-        <el-table-column width="120" class="table_td" prop="actualLoss" label="实际损耗">
-        </el-table-column>
-        <el-table-column width="120" class="table_td" prop="transportPrice" label="预计单价(元/吨)"></el-table-column>
-        <el-table-column width="120" class="table_td" prop="settlementPrice" label="结算单价(元/吨)">
-        </el-table-column>
-        <el-table-column width="120" class="table_td" prop="settlementWeight" label="结算重量(吨)"></el-table-column>
-        <el-table-column width="120" class="table_td" prop="cargoDamage" label="货损">
-        </el-table-column>
-        <el-table-column width="120" class="table_td" prop="deductionAmount" label="扣款(元)"></el-table-column>
-        <el-table-column width="100" class="table_td" label="服务费(元)" prop="serviceCharge">
-        </el-table-column>
-        <el-table-column width="100" class="table_td" label="实付金额(元)" prop="amountActuallyPaid"></el-table-column>
-        <el-table-column width="100" class="table_td" label="税点(元)" prop="taxPoint"></el-table-column>
-        <el-table-column width="100" class="table_td" label="合计应付(元)" prop="totalPayable"></el-table-column>
-        <el-table-column width="100" class="table_td" label="已付金额(元)" prop="amountEdPayable">
-        </el-table-column>
-        <el-table-column width="100" class="table_td" label="未付金额(元)" prop="amountNotPayable"></el-table-column>
-        <el-table-column width="100" class="table_td" label="已开发票(元)" prop="alreadyInvoice">
-        </el-table-column>
-        <el-table-column width="150" class="table_td" label="付款日期" prop="paymentDate"></el-table-column>
-          <el-table-column width="150" class="table_td" label="司机/车队" prop="name">
-            <template
-              slot-scope="scope">
-              {{ scope.row.name }}
-              <span v-if="scope.row.fleetFlag==1">(队)</span>
-            </template>
-            </el-table-column>
-          </el-table>
+        <div v-if='deptBudgetList.expensesPurpose==2'>
+          <div v-for="item in deptBudgetList.tranTaskInfoList">
+            <el-form label-position="left">
+              <el-form-item label-width='100px' label="运输编号" span="1" prop="payee">
+                {{item.taskNo}}
+              </el-form-item>
+              <el-form-item label-width='100px' label="发货地" span="1" prop="accountNumber">
+              {{item.startPrivate}}{{item.startCity}}{{item.startArea}}{{item.startDetailedAddress}}
+              </el-form-item>
+              <el-form-item label-width='100px' label="收货地" span="1" prop="bank">
+                {{item.endPrivate}}{{item.endCity}}{{item.endArea}}{{item.endDetailedAddress}}
+              </el-form-item>
+            </el-form>
+            <el-table :data="item.tranSettlementReportList" style="width: 90%; margin: 20px auto; " ref="warehouseList" v-if='deptBudgetList.expensesPurpose==2' >
+          <el-table-column type="index" label="序号" width="50"></el-table-column>
+          <el-table-column class="table_td" prop="contractNo" width="120" label="合同编号"></el-table-column>
+          <el-table-column class="table_td" prop="startAddress" width="120" label="发货库"></el-table-column>
+          <el-table-column class="table_td" prop="createDate" width="120" label="发货时间"></el-table-column>
+          <el-table-column class="table_td" prop="carNo" label="车牌号" width="140"></el-table-column>
+          <el-table-column width="100" class="table_td" prop="loadingWeight" label="装车净重(吨)">
+          </el-table-column>
+          <el-table-column width="100" class="table_td" prop="unloadingWeight" label="卸车净重(吨)">
+          </el-table-column>
+          <el-table-column width="120" class="table_td" prop="transportDamage" label="公司承担运损">
+          </el-table-column>
+          <el-table-column width="100" class="table_td" prop="lossWeight" label="损耗(吨)">
+          </el-table-column>
+          <el-table-column width="120" class="table_td" prop="actualLoss" label="实际损耗">
+          </el-table-column>
+          <el-table-column width="120" class="table_td" prop="transportPrice" label="预计单价(元/吨)"></el-table-column>
+          <el-table-column width="120" class="table_td" prop="settlementPrice" label="结算单价(元/吨)">
+          </el-table-column>
+          <el-table-column width="120" class="table_td" prop="settlementWeight" label="结算重量(吨)"></el-table-column>
+          <el-table-column width="120" class="table_td" prop="cargoDamage" label="货损">
+          </el-table-column>
+          <el-table-column width="120" class="table_td" prop="deductionAmount" label="扣款(元)"></el-table-column>
+          <el-table-column width="100" class="table_td" label="服务费(元)" prop="serviceCharge">
+          </el-table-column>
+          <el-table-column width="100" class="table_td" label="实付金额(元)" prop="amountActuallyPaid"></el-table-column>
+          <el-table-column width="100" class="table_td" label="税点(元)" prop="taxPoint"></el-table-column>
+          <el-table-column width="100" class="table_td" label="合计应付(元)" prop="totalPayable"></el-table-column>
+          <el-table-column width="100" class="table_td" label="已付金额(元)" prop="amountEdPayable">
+          </el-table-column>
+          <el-table-column width="100" class="table_td" label="未付金额(元)" prop="amountNotPayable"></el-table-column>
+          <el-table-column width="100" class="table_td" label="已开发票(元)" prop="alreadyInvoice">
+          </el-table-column>
+          <el-table-column width="150" class="table_td" label="付款日期" prop="paymentDate"></el-table-column>
+            <el-table-column width="150" class="table_td" label="司机/车队" prop="name">
+              <template
+                slot-scope="scope">
+                {{ scope.row.name }}
+                <span v-if="scope.row.fleetFlag==1">(队)</span>
+              </template>
+              </el-table-column>
+            </el-table>
+          </div>
+        </div>
         <!-- 经营性费用不分配 -->
-        <div v-if='deptBudgetList.expensesPurpose!=5'>
-          <div style='margin:0 50px 10px;font-weight:bold'>费用分配</div>
-        <div style='margin:10px auto;width:90%;'>
+        <div v-if='deptBudgetList.expensesPurpose==1&&deptBudgetList.costType==3||deptBudgetList.expensesPurpose==3&&deptBudgetList.storageFeeFlag!=1'>
+        <!-- <div v-if='deptBudgetList.expensesPurpose!=5'> -->
+          <div style="display:flex">
+            <div style='margin:0 50px 10px;font-weight:bold'>费用分配</div>
+            <div>可分配金额{{deptBudgetList.unallocatedAmount}}元</div>
+          </div>
+        <div style='margin:10px auto;width:90%;display: flex;'>
             <ws-select v-model="mode" placeholder="费用分配方式" class="typeselect" @change="modeselect">
           <ws-option v-for="item in modeList" :key="item.value" :label="item.value" :value="item.value"
             style="color: #8890b1" />
         </ws-select>
-         <ws-select v-model="moneys" placeholder="费用分配金额" class="typeselect" >
+         <ws-select style='margin-left: 10px' v-model="moneys" placeholder="费用分配金额" class="typeselect" >
           <ws-option v-for="item in moneysList" :key="item.value" :label="item.value" :value="item.value"
             style="color: #8890b1" />
         </ws-select>
-        合计分配:{{amount}}元
+        <div style='width:30%;margin-left: 10px' v-if='(deptBudgetList.purpose == "库点费用" &&mode != "暂不分配" && deptBudgetList.storageFeeFlag==0)'>
+            <el-date-picker v-model="value2" type="daterange" align="right" unlink-panels range-separator="至"
+              start-placeholder="开始日期" value-format='yyyy-MM-dd' end-placeholder="结束日期" :picker-options="pickerOptions"
+              @change="dateChange">
+            </el-date-picker>
+        </div>
+        <!-- && deptBudgetList.flag == "否" -->
+        <!-- :disabled='disabled' -->
+        <el-button style='margin-left: 10px' type="primary" @click="queren" v-if='(deptBudgetList.purpose == "库点费用" &&mode != "暂不分配" && deptBudgetList.storageFeeFlag==0)'>确认</el-button>
+        <ws-select style='margin-left: 25px' v-if='(deptBudgetList.purpose == "库点费用"  &&mode != "暂不分配"&& deptBudgetList.storageFeeFlag==0)'  v-model="goodsSource" placeholder="全部客户" 
+            @change='sourceChange'>
+            <ws-option key="全部客户" label="全部客户" value="全部客户" style="color: #8890b1" />
+            <ws-option v-for="item in customerList" :key="item.orderId" :label="item.goodsSource" :value="item.orderId"
+              style="color: #8890b1" />
+        </ws-select>
+        <span style="margin-top:5px;margin-left: 10px" v-if='mode!="暂不分配"'>合计分配:{{amount}}元</span>
         </div>
         </div>
  
         <el-table ref="tableref" v-if='deptBudgetList.purpose=="合同费用"&&deptBudgetList.type=="非粮款"&&mode!="暂不分配"||deptBudgetList.purpose=="库点费用"&&mode!="暂不分配"' :data="feeDetailsDistributions" style="width: 90%;margin:0 auto;">
-          <el-table-column v-if='deptBudgetList.purpose=="合同费用"' prop="date" label="仓库名称" min-width="110">
+          <el-table-column key="1" width="200" v-if='deptBudgetList.purpose=="合同费用"' prop="date" label="仓库名称" min-width="110">
             <template slot-scope="scope">
               <el-select v-model="scope.row.warehouseName" placeholder="选择仓库" @change="((value)=>{selectware(value, scope.$index)})">
                 <el-option v-for="item in warehouseList" :key="item.warehouseName" :label="item.warehouseName" :value="item.warehouseName"
@@ -139,7 +177,7 @@
               </el-select>
             </template>
           </el-table-column>
-          <el-table-column v-if='deptBudgetList.purpose=="合同费用"' prop="date" label="日期">
+          <el-table-column key="2" width="200" v-if='deptBudgetList.purpose=="合同费用"' prop="date" label="日期">
             <template slot-scope="scope">
                <ws-select v-model="scope.row.receiptDocDate" placeholder="选择日期" @change="((value)=>{selecttime(value, scope.row,scope.$index)})">
                 <ws-option v-for="item in datelist[scope.$index]" :key="item.time" :label="item.time" :value="item.time"
@@ -147,37 +185,45 @@
               </ws-select>
             </template>
           </el-table-column>
-          <el-table-column v-if='deptBudgetList.purpose=="库点费用"' prop="date" label="日期">
+          <el-table-column key="3" width="200" v-if='deptBudgetList.purpose=="库点费用"' prop="date" label="日期">
             <template slot-scope="scope">
                 <el-date-picker @change="((value)=>{receiptDocDatechange(value, scope.$index)})" v-model="scope.row.receiptDocDate" type="date" placeholder="请选择日期"
               value-format="yyyy-MM-dd"   ></el-date-picker>
             </template>
           </el-table-column>
-          <el-table-column v-if='deptBudgetList.purpose=="库点费用"' prop="date" label="货源">
+          <el-table-column key="4" v-if='deptBudgetList.purpose=="库点费用"' prop="date" label="货源">
               <template slot-scope="scope">
                 <!-- {{scope.row.goodsourcelist}} -->
-                <el-select v-model="scope.row.orderId" placeholder="选择货源" @change="((value)=>{selectgoodsSource(value, scope.row,scope.$index)})">
+                <!-- <el-select v-model="scope.row.orderId" placeholder="选择货源" @change="((value)=>{selectgoodsSource(value, scope.row,scope.$index)})">
+                    <el-option v-for="item in goodsourcelist[scope.$index]" :key="item.id" :label="item.goodsSource" :value="item.id"
+                        style="color: #8890b1" />
+                </el-select> -->
+                <el-select style="width: 100%;" v-if="(scope.row.orderId &&confirmFlag==0 && !scope.row.goodsSource)" v-model="scope.row.orderId" placeholder="选择货源" @change="((value)=>{selectgoodsSource(value, scope.row,scope.$index)})">
+                    <el-option v-for="item in goodsourcelist[scope.$index]" :key="item.id" :label="item.goodsSource" :value="item.id"
+                        style="color: #8890b1" />
+                </el-select>
+                <el-select style="width: 100%;" v-else v-model="scope.row.goodsSource" placeholder="选择货源" @change="((value)=>{selectgoodsSource(value, scope.row,scope.$index)})">
                     <el-option v-for="item in goodsourcelist[scope.$index]" :key="item.id" :label="item.goodsSource" :value="item.id"
                         style="color: #8890b1" />
                 </el-select>
             </template>
           </el-table-column>
-          <el-table-column v-if='deptBudgetList.purpose=="库点费用"' prop="date" label="货名">
+          <el-table-column key="5"  width="200" v-if='deptBudgetList.purpose=="库点费用"' prop="date" label="货名">
             <template slot-scope="scope">
                <span>{{scope.row.goodsName?scope.row.goodsName:'自动获取'}}</span>
             </template>
           </el-table-column>
-          <el-table-column prop="inWarehouseWeight" label="入库量(吨)">
+          <el-table-column key="6" width="200" prop="inWarehouseWeight" label="入库量(吨)">
             <template slot-scope="scope">
                <span>{{scope.row.inWarehouseWeight?scope.row.inWarehouseWeight:'自动获取'}}</span>
             </template>
           </el-table-column>
-          <el-table-column prop="date" label="分配金额(元)">
+          <el-table-column key="7" width="200" prop="date" label="分配金额(元)">
             <template slot-scope="scope">
                 <el-input placeholder="输入费用名称,1-15个字" class="input_css" v-model="scope.row.distributionMoney"></el-input>
             </template>
           </el-table-column>
-          <el-table-column prop="address" label="操作" width="200">
+          <el-table-column key="8" prop="address" label="操作" width="200">
             <template slot-scope="scope">
                 <img class='add' @click='addlist()' src="../../../public/img/add.png" alt="">
                 <img class='del' @click='dellist(scope.row)' src="../../../public/img/del.png" alt="">
@@ -220,13 +266,30 @@
     import {
     woekflowhandle
   } from '@/model/tasksport/index'
-  import {lookexenseinfo,getcontract,getwarehouse,addexenseinfo,getwarehousingorder,editexenseinfo} from '@/model/profitable/index'
+  import {lookexenseinfo,getcontract,getwarehouse,addexenseinfo,getwarehousingorder,editexenseinfo,getwarehousingorderList,deloneallocationinfo } from '@/model/profitable/index'
   export default {
     components: {
       WsUpload,
     },
     data() {
       return {
+        customerList: [],
+        goodsSource: '',
+        value2: '',
+        endDate: '',
+        startDate: '',
+        baseId: '',
+        warehouseName:'',
+        currentPage: 1,
+        pageSize: 10,
+        searchType: '',
+        searchKeyWord: '',
+        goodsName: '',
+        //是否按时间筛选标识,1是
+        confirmFlag: 0,
+        datas: [],
+        datas1: [],
+        orderId: '',
         value: [],
         profitList: [{
           name: '玉米',
@@ -269,22 +332,132 @@
       }
     },
     activated() {
+      this.value2 = this.getNowTime()
       this.getList()
     },
     computed: {
     // 计算属性的 getter
       amount: function () {
         // `this` 指向 vm 实例
-        var num=0
-        for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
-          if(this.feeDetailsDistributions[i].distributionMoney){
-            num+=Number(this.feeDetailsDistributions[i].distributionMoney)
+        var num = 0
+        if (this.feeDetailsDistributions) {
+          for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
+            if (this.feeDetailsDistributions[i].distributionMoney) {
+              num += Number(this.feeDetailsDistributions[i].distributionMoney)
+            }
           }
+          return num.toFixed(2)
         }
-        return num
       }
     },
     methods: {
+      sourceChange(e) {
+      if (e == '') {
+        this.goodsSource = '全部客户'
+      } else {
+        for(let i=0;i<this.customerList.length;i++){
+          if(this.customerList[i].orderId == e){
+            this.orderId = this.customerList[i].orderId
+            this.goodsSource  = this.customerList[i].goodsSource
+            break;
+          }
+        }
+        
+      }
+        this.selectOrderList()
+    },
+      getNowTime() {
+      const start = new Date(new Date().getTime() - 3600 * 1000 * 24)
+        .toISOString()
+        .replace('T', ' ')
+        .split('.')[0] //默认开始时间1天前
+      const end = new Date(new Date().getTime())
+        .toISOString()
+        .replace('T', ' ')
+        .split('.')[0]//默认结束时间今天
+      // console.log([start.split(' '), end])
+      return [start.split(' ')[0], end.split(' ')[0]]
+    },
+      queren() {
+      this.confirmFlag = 1
+      this.selectOrderList()
+    },
+    dateChange(e) {
+      this.value2 = e
+    },
+    selectOrderList() {
+      var arr = []
+      var weight = 0
+      var money = 0
+      var moneyDiff = 0
+      this.startDate = this.value2[0]
+      this.endDate = this.value2[1]
+      getwarehousingorderList({
+        compId: localStorage.getItem('ws-pf_compId'),
+        startDate: this.startDate,
+        endDate: this.endDate,
+        baseId: this.deptBudgetList.warehouseId,
+        warehouseName : this.deptBudgetList.warehouseName,
+        currentPage: this.currentPage,
+        pageSize: this.pageSize,
+        searchType: this.searchType,
+        searchKeyWord: this.searchKeyWord,
+        goodsName: this.goodsName,
+        goodsSource: this.goodsSource == '全部客户' ? '' : this.goodsSource,
+        confirmFlag : this.confirmFlag
+      })
+        .toPromise()
+        .then((response) => {
+          this.datas = []
+          this.datas1 = []
+          if (this.goodsSource && this.goodsSource != '全部客户') {
+            for (let i = 0; i < response.records.length; i++) {
+              this.datas.push(response.records[i])
+            }
+            //
+            for (let z = 0; z < this.datas.length; z++) {
+              arr.push({ receiptDocDate: this.datas[z].issuingTime, goodsSource: this.datas[z].goodsSource ,orderId:this.datas[z].id, id: '', weight: this.datas[z].inWarehouseWeight, goodsName: this.datas[z].goodsName, goodsNameKey: this.datas[z].goodsNameKey })
+            }
+            this.feeDetailsDistributions = arr
+          } else {
+            for (let i = 0; i < response.records.length; i++) {
+              for (let j = 0; j < response.records[i].warehousingOrderList.length; j++) {
+                this.datas.push(response.records[i].warehousingOrderList[j])
+              }
+              
+            }
+            for (let z = 0; z < this.datas.length; z++) {
+              arr.push({ receiptDocDate: this.datas[z].issuingTime, goodsSource: this.datas[z].goodsSource,orderId:this.datas[z].id, id: '', weight: this.datas[z].inWarehouseWeight, goodsName: this.datas[z].goodsName, goodsNameKey: this.datas[z].goodsNameKey })
+            }
+            this.feeDetailsDistributions = arr
+
+            //获取客户
+            this.customerList = this.unique(arr)
+          }
+          for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
+            this.feeDetailsDistributions[i].inWarehouseWeight = this.feeDetailsDistributions[i].weight
+            weight += Number(this.feeDetailsDistributions[i].inWarehouseWeight)
+          }
+          if (this.moneys == '按重量自动分配') {
+            for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
+              if (i != this.feeDetailsDistributions.length - 1) {
+                this.feeDetailsDistributions[i].distributionMoney = Math.round((this.feeDetailsDistributions[i].inWarehouseWeight / weight) * this.deptBudgetList.unallocatedAmount)
+                if (this.feeDetailsDistributions[i].distributionMoney) {
+                  moneyDiff += Number(this.feeDetailsDistributions[i].distributionMoney)
+                }
+              }
+              if (i == this.feeDetailsDistributions.length - 1) {
+                this.feeDetailsDistributions[i].distributionMoney = Number(this.deptBudgetList.unallocatedAmount - moneyDiff).toFixed(2)
+              }
+              money = Number(this.feeDetailsDistributions[i].distributionMoney + moneyDiff).toFixed(2)
+            }
+          }
+        })
+    },
+    unique(arr) {
+      const res = new Map();
+      return arr.filter((arr) => !res.has(arr.goodsSource) && res.set(arr.goodsSource, 1));
+    },
       handleClose(){
         this.rejectshow=false
       },
@@ -322,6 +495,7 @@
       },
       selectgoodsSource(e,item,index){
         var weight=0
+        var moneyDiff = 0
         console.log(e)
         var money=0
         if(!this.deptBudgetList.amountMoney&&this.moneys=='按重量自动分配'){
@@ -338,21 +512,41 @@
         }
         for (let i = 0; i < this.goodsourcelist[index].length; i++) {
           if(this.goodsourcelist[index][i].id==e){
-            this.feeDetailsDistributions[index].goodsSource=this.goodsourcelist[index][i].goodsSource
+            // this.feeDetailsDistributions[index].goodsSource=this.goodsourcelist[index][i].goodsSource
+            this.$set(this.feeDetailsDistributions[index],'goodsSource',this.goodsourcelist[index][i].goodsSource)
             this.feeDetailsDistributions[index].inWarehouseWeight=this.goodsourcelist[index][i].weight
             this.feeDetailsDistributions[index].goodsName=this.goodsourcelist[index][i].goodsName
             this.feeDetailsDistributions[index].goodsNameKey=this.goodsourcelist[index][i].goodsNameKey
+            this.feeDetailsDistributions[index].orderId = this.goodsourcelist[index][i].id
+            this.$forceUpdate()
             }
         }
-        if(this.moneys=='按重量自动分配'){
-          weight = this.feeDetailsDistributions.reduce(function (total, currentValue, currentIndex, arr) {
-              return total + currentValue.inWarehouseWeight;
-          }, 0)
-          for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
-              this.feeDetailsDistributions[i].distributionMoney=Math.round((this.feeDetailsDistributions[i].inWarehouseWeight/weight)*this.deptBudgetList.amountMoney)
-              money+=this.feeDetailsDistributions[i].distributionMoney
-          }
+        // if(this.moneys=='按重量自动分配'){
+        //   weight = this.feeDetailsDistributions.reduce(function (total, currentValue, currentIndex, arr) {
+        //       return total + currentValue.inWarehouseWeight;
+        //   }, 0)
+        //   for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
+        //       this.feeDetailsDistributions[i].distributionMoney=Math.round((this.feeDetailsDistributions[i].inWarehouseWeight/weight)*this.deptBudgetList.amountMoney)
+        //       money+=this.feeDetailsDistributions[i].distributionMoney
+        //   }
+        // }
+        if (this.moneys == '按重量自动分配') {
+        for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
+          weight += Number(this.feeDetailsDistributions[i].inWarehouseWeight)
+        }
+        for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
+          if (i != this.feeDetailsDistributions.length - 1) {
+                this.feeDetailsDistributions[i].distributionMoney = Math.round((this.feeDetailsDistributions[i].inWarehouseWeight / weight) * this.deptBudgetList.unallocatedAmount)
+                if (this.feeDetailsDistributions[i].distributionMoney) {
+                  moneyDiff += Number(this.feeDetailsDistributions[i].distributionMoney)
+                }
+              }
+              if (i == this.feeDetailsDistributions.length - 1) {
+                this.feeDetailsDistributions[i].distributionMoney = Number(this.deptBudgetList.unallocatedAmount - moneyDiff).toFixed(2)
+              }
+              money = Number(this.feeDetailsDistributions[i].distributionMoney + moneyDiff).toFixed(2)
         }
+      }
       },
       selecttime(e,item,index){
         var weight=0
@@ -382,7 +576,7 @@
           }
           for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
             // console.log(weight,this.feeDetailsDistributions[i].inWarehouseWeight)
-              this.feeDetailsDistributions[i].distributionMoney=Math.round((this.feeDetailsDistributions[i].inWarehouseWeight/weight)*this.deptBudgetList.amountMoney)
+              this.feeDetailsDistributions[i].distributionMoney=Math.round((this.feeDetailsDistributions[i].inWarehouseWeight/weight)*this.deptBudgetList.unallocatedAmount)
               money+=this.feeDetailsDistributions[i].distributionMoney
 
           }
@@ -401,11 +595,17 @@
           })
       },
       returnsales(){
-        this.$router.go(-1)
+        // this.$router.go(-1)
+        this.feeDetailsDistributions = [{proDate:'',weight:'',money:'',warehouse:'',belonging:'',index:0}],
+        this.goodsourcelist = []
+        this.$router.push({
+          path:'expensemanagementdetails'
+        })
       },
        submit(status){
         //经营性费用不进行分配
-        if(this.deptBudgetList.expensesPurpose!=5&&this.mode!='暂不分配'){
+        if(this.deptBudgetList.expensesPurpose==1&&this.deptBudgetList.costType==3&&this.mode!='暂不分配'||this.deptBudgetList.expensesPurpose=='3'&&this.deptBudgetList.storageFeeFlag!=1&&this.mode!='暂不分配'){
+        // if(this.deptBudgetList.expensesPurpose!=5&&this.mode!='暂不分配'){
           for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
             if(!this.feeDetailsDistributions[i].distributionMoney){
               this.$message({
@@ -421,6 +621,14 @@
               })
               return
             }
+            
+            if(!this.feeDetailsDistributions[i].orderId){
+              this.$message({
+                message: '货源不能为空!',
+                type: 'warning',
+              })
+              return
+            }
             if((String(this.feeDetailsDistributions[i].distributionMoney).indexOf('.') != -1 &&
               String(this.feeDetailsDistributions[i].distributionMoney).length -
               (String(this.feeDetailsDistributions[i].distributionMoney).indexOf('.') + 1) >
@@ -443,6 +651,7 @@
             }else{
               var repetition=data.filter((item,index)=>{
                 return this.feeDetailsDistributions[i].orderId==item.orderId&&this.feeDetailsDistributions[i].receiptDocDate==item.receiptDocDate
+                && this.feeDetailsDistributions[i].goodsSource == item.goodsSource
               })
               if(repetition.length==0){
                 data.push(this.feeDetailsDistributions[i])
@@ -473,6 +682,7 @@
             }else{
               var repetition=data.filter((item,index)=>{
                 return this.feeDetailsDistributions[i].warehouseName==item.warehouseName&&this.feeDetailsDistributions[i].receiptDocDate==item.receiptDocDate
+                && this.feeDetailsDistributions[i].goodsSource == item.goodsSource && this.feeDetailsDistributions[i].orderId==item.orderId
               })
               if(repetition.length==0){
                 data.push(this.feeDetailsDistributions[i])
@@ -489,7 +699,8 @@
           }
         }
         if(this.mode=='全部分配'){
-          if(this.amount!=this.deptBudgetList.amountMoney){
+          this.deptBudgetList.unallocatedAmount = Number(this.deptBudgetList.unallocatedAmount).toFixed(2)
+          if(this.amount!=this.deptBudgetList.unallocatedAmount){
             this.$message({
                 message: '请款金额与分配金额不相等!',
                 type: 'warning',
@@ -498,7 +709,7 @@
           }
         }
         if(this.mode=='部分分配'){
-          if(this.amount>this.deptBudgetList.amountMoney){
+          if(this.amount>this.deptBudgetList.unallocatedAmount){
             this.$message({
                 message: '分配金额不可超过请款金额!',
                 type: 'warning',
@@ -598,11 +809,41 @@
           console.log(e)
       },
       addlist(){
+        this.confirmFlag = 0
         this.feeDetailsDistributions.push({proDate:'',weight:'',money:'',warehouse:'',belonging:'',index:this.feeDetailsDistributions.length})
       },
-      dellist(row){
-          this.feeDetailsDistributions.splice(row.index,1)
-      },
+      dellist(row) {
+      var weight = 0
+      var money = 0
+      var moneyDiff = 0
+        for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
+          if (this.feeDetailsDistributions[i]) {
+            if (this.feeDetailsDistributions[i] == row) {
+              this.feeDetailsDistributions.splice(i, 1)
+              if (this.moneys == '按重量自动分配' ) {
+                for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
+                  weight += this.feeDetailsDistributions[i].inWarehouseWeight
+                }
+                for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
+                  if (i != this.feeDetailsDistributions.length - 1) {
+                this.feeDetailsDistributions[i].distributionMoney = Math.round((this.feeDetailsDistributions[i].inWarehouseWeight / weight) * this.deptBudgetList.unallocatedAmount)
+                if (this.feeDetailsDistributions[i].distributionMoney) {
+                  moneyDiff += Number(this.feeDetailsDistributions[i].distributionMoney)
+                }
+              }
+              if (i == this.feeDetailsDistributions.length - 1) {
+                this.feeDetailsDistributions[i].distributionMoney = Number(this.deptBudgetList.unallocatedAmount - moneyDiff).toFixed(2)
+              }
+              money = Number(this.feeDetailsDistributions[i].distributionMoney + moneyDiff).toFixed(2)
+              
+                }
+              }
+              deloneallocationinfo({ id: row.id }).toPromise().then((response) => {
+                  })
+            }
+          }
+        }
+    },
       getList() {
         getcontract({
           compId:localStorage.getItem('ws-pf_compId'),
@@ -803,4 +1044,7 @@
   width: 110px;
   height:140px;
 }
+.goodsource{
+  width:100%;
+}
 </style>

+ 63 - 47
src/views/profitable/cashoutedit.vue

@@ -16,6 +16,8 @@
           <el-form-item  label-width='100px' label="用途" span="1" prop="purpose" class="readonly">
             <ws-select v-model="deptBudgetList.purpose" placeholder="" class="typeselect" >
               <ws-option label="合同费用" value="合同费用"
+                style="color: #8890b1" />
+                <ws-option label="运费" value="运费"
                 style="color: #8890b1" />
                 <ws-option label="库点费用" value="库点费用"
                 style="color: #8890b1" />
@@ -78,6 +80,63 @@
             <el-input class='input50 input_css' placeholder="输入开户支行" v-model="deptBudgetList.bankBranch"></el-input>
           </el-form-item>
         </el-form>
+        <div v-if='deptBudgetList.expensesPurpose==2'>
+          <div v-for="item in deptBudgetList.tranTaskInfoList">
+            <el-form label-position="left">
+              <el-form-item label-width='100px' label="运输编号" span="1" prop="payee">
+                {{item.taskNo}}
+              </el-form-item>
+              <el-form-item label-width='100px' label="发货地" span="1" prop="accountNumber">
+              {{item.startPrivate}}{{item.startCity}}{{item.startArea}}{{item.startDetailedAddress}}
+              </el-form-item>
+              <el-form-item label-width='100px' label="收货地" span="1" prop="bank">
+                {{item.endPrivate}}{{item.endCity}}{{item.endArea}}{{item.endDetailedAddress}}
+              </el-form-item>
+            </el-form>
+            <el-table :data="item.tranSettlementReportList" style="width: 90%; margin: 20px auto; " ref="warehouseList" v-if='deptBudgetList.expensesPurpose==2' >
+          <el-table-column type="index" label="序号" width="50"></el-table-column>
+          <el-table-column class="table_td" prop="contractNo" width="120" label="合同编号"></el-table-column>
+          <el-table-column class="table_td" prop="startAddress" width="120" label="发货库"></el-table-column>
+          <el-table-column class="table_td" prop="createDate" width="120" label="发货时间"></el-table-column>
+          <el-table-column class="table_td" prop="carNo" label="车牌号" width="140"></el-table-column>
+          <el-table-column width="100" class="table_td" prop="loadingWeight" label="装车净重(吨)">
+          </el-table-column>
+          <el-table-column width="100" class="table_td" prop="unloadingWeight" label="卸车净重(吨)">
+          </el-table-column>
+          <el-table-column width="120" class="table_td" prop="transportDamage" label="公司承担运损">
+          </el-table-column>
+          <el-table-column width="100" class="table_td" prop="lossWeight" label="损耗(吨)">
+          </el-table-column>
+          <el-table-column width="120" class="table_td" prop="actualLoss" label="实际损耗">
+          </el-table-column>
+          <el-table-column width="120" class="table_td" prop="transportPrice" label="预计单价(元/吨)"></el-table-column>
+          <el-table-column width="120" class="table_td" prop="settlementPrice" label="结算单价(元/吨)">
+          </el-table-column>
+          <el-table-column width="120" class="table_td" prop="settlementWeight" label="结算重量(吨)"></el-table-column>
+          <el-table-column width="120" class="table_td" prop="cargoDamage" label="货损">
+          </el-table-column>
+          <el-table-column width="120" class="table_td" prop="deductionAmount" label="扣款(元)"></el-table-column>
+          <el-table-column width="100" class="table_td" label="服务费(元)" prop="serviceCharge">
+          </el-table-column>
+          <el-table-column width="100" class="table_td" label="实付金额(元)" prop="amountActuallyPaid"></el-table-column>
+          <el-table-column width="100" class="table_td" label="税点(元)" prop="taxPoint"></el-table-column>
+          <el-table-column width="100" class="table_td" label="合计应付(元)" prop="totalPayable"></el-table-column>
+          <el-table-column width="100" class="table_td" label="已付金额(元)" prop="amountEdPayable">
+          </el-table-column>
+          <el-table-column width="100" class="table_td" label="未付金额(元)" prop="amountNotPayable"></el-table-column>
+          <el-table-column width="100" class="table_td" label="已开发票(元)" prop="alreadyInvoice">
+          </el-table-column>
+          <el-table-column width="150" class="table_td" label="付款日期" prop="paymentDate"></el-table-column>
+            <el-table-column width="150" class="table_td" label="司机/车队" prop="name">
+              <template
+                slot-scope="scope">
+                {{ scope.row.name }}
+                <span v-if="scope.row.fleetFlag==1">(队)</span>
+              </template>
+              </el-table-column>
+            </el-table>
+          </div>
+        </div>
        <div style='text-align:right;margin-right:30px;'>
         <el-button class="bg-bottom" type="primary" size="small" @click="submit()">提交
         </el-button>
@@ -273,34 +332,7 @@
       submit(){
         this.deptBudgetList.compId=localStorage.getItem('ws-pf_compId')
         this.deptBudgetList.agent=localStorage.getItem('ws-pf_staffName')
-        if(this.deptBudgetList.purpose=='合同费用'&&this.deptBudgetList.type=='非粮款'||this.deptBudgetList.purpose=='库点费用'){
-          for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
-            if(!this.feeDetailsDistributions[i].distributionMoney){
-              this.$message({
-                message: '分配金额不能为空!',
-                type: 'warning',
-              })
-              return
-            }
-            if(this.feeDetailsDistributions[i].distributionMoney<0){
-              this.$message({
-                message: '分配金额应大于0!',
-                type: 'warning',
-              })
-              return
-            }
-            if((String(this.feeDetailsDistributions[i].distributionMoney).indexOf('.') != -1 &&
-              String(this.feeDetailsDistributions[i].distributionMoney).length -
-              (String(this.feeDetailsDistributions[i].distributionMoney).indexOf('.') + 1) >
-              2)){
-              this.$message({
-                message: '分配金额最多保留两位小数!',
-                type: 'warning',
-              })
-              return
-            }
-          }
-        }
+
         this.deptBudgetList.totalDistribution=this.amount
         if(this.deptBudgetList.purpose=='合同费用'){
           this.deptBudgetList.expensesPurpose=1
@@ -308,6 +340,9 @@
         }else if(this.deptBudgetList.purpose=='库点费用'){
           this.deptBudgetList.expensesPurpose=3
           //  this.deptBudgetList.costNo='KDF'+this.getdate()+this.MathRand()
+        }else if(this.deptBudgetList.purpose=='运费'){
+          this.deptBudgetList.expensesPurpose=2
+          //  this.deptBudgetList.costNo='KDF'+this.getdate()+this.MathRand()
         }else if(this.deptBudgetList.purpose=='经营性费用'){
           this.deptBudgetList.expensesPurpose=5
           //  this.deptBudgetList.costNo='JYF'+this.getdate()+this.MathRand()
@@ -336,25 +371,6 @@
               })
               return
         }
-       
-        if(this.deptBudgetList.expensesPurpose==1&&this.deptBudgetList.costType==3&&this.mode=='全部分配'||this.deptBudgetList.expensesPurpose==3&&this.mode=='全部分配'){
-          if(this.amount!=this.deptBudgetList.amountMoney){
-            this.$message({
-                message: '请款金额与分配金额不相等!',
-                type: 'warning',
-          })
-          return
-          }
-        }
-        if(this.deptBudgetList.expensesPurpose==1&&this.deptBudgetList.costType==3&&this.mode=='部分分配'||this.deptBudgetList.expensesPurpose==3&&this.mode=='部分分配'){
-          if(this.amount>this.deptBudgetList.amountMoney){
-            this.$message({
-                message: '分配金额不可超过请款金额!',
-                type: 'warning',
-          })
-          return
-          }
-        }
         if(!this.deptBudgetList.expenseName){
           this.$message({
                 message: '费用名称不能为空!',

+ 135 - 134
src/views/profitable/component/routers/route.js

@@ -27,140 +27,6 @@ const profitableRouter = {
     //     // module: 'procurement.sparepart.applDetail'
     //   }
     // },  
-      // 合同利润
-      {
-        path: 'contractprofits',
-        component: () =>
-          import(/* webpackChunkName: "applDetail" */ '@/views/profitable/contractprofits'),
-        name: 'contractprofits',
-        meta: {
-          title: 'contractprofits',
-          shortcutEntrance: 'profitable',
-          module: 'lirunhesuan',
-          permissicon: [],
-          keepAlive: true,
-          _title:'合同利润'
-          // module: 'procurement.sparepart.applDetail'
-        }
-      },  
-     // 合同利润详情
-     {
-      path: 'contractprofitsdetails',
-      component: () =>
-        import(/* webpackChunkName: "applDetail" */ '@/views/profitable/contractprofitsdetails'),
-      name: 'contractprofitsdetails',
-      meta: {
-        title: 'contractprofitsdetails',
-        shortcutEntrance: 'profitable',
-        module: 'lirunhesuan',
-        permissicon: [],
-        keepAlive: true,
-        _title:'合同利润详情'
-        // module: 'procurement.sparepart.applDetail'
-      },
-      hidden:true,
-    }, 
-    // 合同利润库存
-    {
-      path: 'contractinventory',
-      component: () =>
-        import(/* webpackChunkName: "applDetail" */ '@/views/profitable/contractinventory'),
-      name: 'contractinventory',
-      meta: {
-        title: 'contractinventory',
-        shortcutEntrance: 'profitable',
-        module: 'lirunhesuan',
-        permissicon: [],
-        keepAlive: true,
-        _title:'合同利润库存'
-        // module: 'procurement.sparepart.applDetail'
-      },
-      hidden:true,
-    },
-    // 合同利润费用
-    {
-      path: 'contractcost',
-      component: () =>
-        import(/* webpackChunkName: "applDetail" */ '@/views/profitable/contractcost'),
-      name: 'contractcost',
-      meta: {
-        title: 'contractcost',
-        shortcutEntrance: 'profitable',
-        module: 'lirunhesuan',
-        permissicon: [],
-        keepAlive: true,
-        _title:'合同利润费用'
-        // module: 'procurement.sparepart.applDetail'
-      },
-      hidden:true,
-    },
-    // 库点利润
-    {
-      path: 'warehouseprofits',
-      component: () =>
-        import(/* webpackChunkName: "applDetail" */ '@/views/profitable/warehouseprofits'),
-      name: 'warehouseprofits',
-      meta: {
-        title: 'warehouseprofits',
-        shortcutEntrance: 'profitable',
-        module: 'lirunhesuan',
-        permissicon: [],
-        keepAlive: true,
-        _title:'库点利润'
-        // module: 'procurement.sparepart.applDetail'
-      }
-    }, 
-    // 库点利润详情
-     {
-      path: 'warehouseprofitsdetails',
-      component: () =>
-        import(/* webpackChunkName: "applDetail" */ '@/views/profitable/warehouseprofitsdetails'),
-      name: 'warehouseprofitsdetails',
-      meta: {
-        title: 'warehouseprofitsdetails',
-        shortcutEntrance: 'profitable',
-        module: 'lirunhesuan',
-        permissicon: [],
-        keepAlive: true,
-        _title:'库点利润详情'
-        // module: 'procurement.sparepart.applDetail'
-      },
-      hidden:true,
-    }, 
-    // 库点利润库存
-    {
-      path: 'warehouseinventory',
-      component: () =>
-        import(/* webpackChunkName: "applDetail" */ '@/views/profitable/warehouseinventory'),
-      name: 'warehouseinventory',
-      meta: {
-        title: 'warehouseinventory',
-        shortcutEntrance: 'profitable',
-        module: 'lirunhesuan',
-        permissicon: [],
-        keepAlive: true,
-        _title:'库点利润库存'
-        // module: 'procurement.sparepart.applDetail'
-      },
-      hidden:true,
-    },
-    // 库点利润费用
-    {
-      path: 'warehousecost',
-      component: () =>
-        import(/* webpackChunkName: "applDetail" */ '@/views/profitable/warehousecost'),
-      name: 'warehousecost',
-      meta: {
-        title: 'warehousecost',
-        shortcutEntrance: 'profitable',
-        module: 'lirunhesuan',
-        permissicon: [],
-        keepAlive: true,
-        _title:'库点利润费用'
-        // module: 'procurement.sparepart.applDetail'
-      },
-      hidden:true,
-    }, 
     // 费用管理
     {
       path: 'expensemanagement',
@@ -382,6 +248,141 @@ const profitableRouter = {
       },
       hidden:true,
     }, 
+      // 合同利润
+      {
+        path: 'contractprofits',
+        component: () =>
+          import(/* webpackChunkName: "applDetail" */ '@/views/profitable/contractprofits'),
+        name: 'contractprofits',
+        meta: {
+          title: 'contractprofits',
+          shortcutEntrance: 'profitable',
+          module: 'lirunhesuan',
+          permissicon: [],
+          keepAlive: true,
+          _title:'合同利润'
+          // module: 'procurement.sparepart.applDetail'
+        }
+      },  
+     // 合同利润详情
+     {
+      path: 'contractprofitsdetails',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/profitable/contractprofitsdetails'),
+      name: 'contractprofitsdetails',
+      meta: {
+        title: 'contractprofitsdetails',
+        shortcutEntrance: 'profitable',
+        module: 'lirunhesuan',
+        permissicon: [],
+        keepAlive: true,
+        _title:'合同利润详情'
+        // module: 'procurement.sparepart.applDetail'
+      },
+      hidden:true,
+    }, 
+    // 合同利润库存
+    {
+      path: 'contractinventory',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/profitable/contractinventory'),
+      name: 'contractinventory',
+      meta: {
+        title: 'contractinventory',
+        shortcutEntrance: 'profitable',
+        module: 'lirunhesuan',
+        permissicon: [],
+        keepAlive: true,
+        _title:'合同利润库存'
+        // module: 'procurement.sparepart.applDetail'
+      },
+      hidden:true,
+    },
+    // 合同利润费用
+    {
+      path: 'contractcost',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/profitable/contractcost'),
+      name: 'contractcost',
+      meta: {
+        title: 'contractcost',
+        shortcutEntrance: 'profitable',
+        module: 'lirunhesuan',
+        permissicon: [],
+        keepAlive: true,
+        _title:'合同利润费用'
+        // module: 'procurement.sparepart.applDetail'
+      },
+      hidden:true,
+    },
+    // 库点利润
+    {
+      path: 'warehouseprofits',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/profitable/warehouseprofits'),
+      name: 'warehouseprofits',
+      meta: {
+        title: 'warehouseprofits',
+        shortcutEntrance: 'profitable',
+        module: 'lirunhesuan',
+        permissicon: [],
+        keepAlive: true,
+        _title:'库点利润'
+        // module: 'procurement.sparepart.applDetail'
+      }
+    }, 
+    // 库点利润详情
+     {
+      path: 'warehouseprofitsdetails',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/profitable/warehouseprofitsdetails'),
+      name: 'warehouseprofitsdetails',
+      meta: {
+        title: 'warehouseprofitsdetails',
+        shortcutEntrance: 'profitable',
+        module: 'lirunhesuan',
+        permissicon: [],
+        keepAlive: true,
+        _title:'库点利润详情'
+        // module: 'procurement.sparepart.applDetail'
+      },
+      hidden:true,
+    }, 
+    // 库点利润库存
+    {
+      path: 'warehouseinventory',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/profitable/warehouseinventory'),
+      name: 'warehouseinventory',
+      meta: {
+        title: 'warehouseinventory',
+        shortcutEntrance: 'profitable',
+        module: 'lirunhesuan',
+        permissicon: [],
+        keepAlive: true,
+        _title:'库点利润库存'
+        // module: 'procurement.sparepart.applDetail'
+      },
+      hidden:true,
+    },
+    // 库点利润费用
+    {
+      path: 'warehousecost',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/profitable/warehousecost'),
+      name: 'warehousecost',
+      meta: {
+        title: 'warehousecost',
+        shortcutEntrance: 'profitable',
+        module: 'lirunhesuan',
+        permissicon: [],
+        keepAlive: true,
+        _title:'库点利润费用'
+        // module: 'procurement.sparepart.applDetail'
+      },
+      hidden:true,
+    }, 
+    
      // 仓储费
      {
       path: 'storageCharge',

+ 52 - 48
src/views/profitable/contractprofitsdetails.vue

@@ -11,14 +11,15 @@
     </el-row>
     <div class="center">
       <el-row style='margin-bottom:10px;'>
-        <el-col :span="12">
+        <el-col :span="6">
           <!-- <el-button style="margin-left:10px" @click="typeChange('')" type="primary">导出</el-button> -->
         </el-col>
-        <el-col :span="12">
+        <el-col :span="18">
           <div style='margin-left:10px;' class="datascreen">
-            <el-date-picker value-format='yyyy-MM-dd' v-model="value" type="daterange" align="right" unlink-panels range-separator="至"
+            <div style="display:inline-block;width:50;">
+              <el-date-picker value-format='yyyy-MM-dd' v-model="value" type="daterange" align="right" unlink-panels range-separator="至"
               start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions" class="data_css" @change="changeDate" >
-            </el-date-picker>
+            </el-date-picker></div>
             <el-input placeholder="可按合同编号、买方名称、卖方名称查找" class="input_css" v-model="searchKeyWord"></el-input>
             <el-button class="find" type="primary" @click="find()"><img width="16" height="16" style="left: -8px;"
                 src="../../../public/img/sousuo.png" alt="" /></el-button>
@@ -41,7 +42,7 @@
       </el-row>
       <el-row style='margin-bottom:10px;'>
         <el-col :span="18">
-          <el-button style="margin-left:10px" @click="typeChange1('')" :type="searchType == ''?'primary':''">全部状态</el-button>
+          <el-button style="margin-left:10px" @click="typeChange1('')" :type="searchTypeCon == ''?'primary':''">全部状态</el-button>
           <el-button @click="typeChange1(4)" :type="searchTypeCon == 4?'primary':''">待执行</el-button>
           <el-button @click="typeChange1(1)" :type="searchTypeCon == 1?'primary':''">执行中</el-button>
           <el-button @click="typeChange1(3)" :type="searchTypeCon == 3?'primary':''">发运结束</el-button>
@@ -81,16 +82,18 @@
           </el-table-column>
           <el-table-column prop="buyer" label="买方/收购方"></el-table-column>
           <el-table-column prop="seller" label="卖方/合营方"></el-table-column>
-          <el-table-column prop="surplus" label="剩余(吨)">
+          <el-table-column width="120" prop="surplus" label="剩余(吨)">
              <template slot-scope="scope">
               <span v-if='scope.row.agreementType=="销售合同"'>-</span>
               <span v-else>{{scope.row.surplus}}</span>
             </template>
           </el-table-column>
-          <el-table-column prop="profit" label="利润(万元)">
+           <el-table-column width="150" prop="settlementPrice" label="结算单价(元/吨)">
           </el-table-column>
-          <el-table-column prop="status" label="状态"></el-table-column>
-          <el-table-column prop="signingDate" label="签订日期"></el-table-column>
+          <el-table-column width="120" prop="profit" label="利润(万元)">
+          </el-table-column>
+          <el-table-column width="80" prop="status" label="状态"></el-table-column>
+          <el-table-column width="100" prop="signingDate" label="签订日期"></el-table-column>
           <el-table-column prop="address" label="操作" width="300">
             <template slot-scope="scope">
               <el-button v-if="scope.row.status=='已结算'" @click="finalstatement(scope.row)" type="primary">结算单</el-button>
@@ -113,7 +116,7 @@
   :before-close="handleClose">
   <div v-if="contractList.length>0">
     <div style="display:flex;justify-content: space-between;" v-for="item in contractList"><div>{{item.contractNo}}</div>
-  <div><span v-if="item.status!='已完成'&&item.status!='已结算'&&item.status!='发运结束'">未完成</span><span v-else>完成</span></div>
+  <div><span v-if="item.status!='已完成'&&item.status!='已结算'&&item.status!='发运结束'">未完成</span><span v-else>完成</span></div>
      </div>
   </div>
   <div v-else>暂无关联合同</div>
@@ -121,7 +124,7 @@
 <el-dialog
   title="合同结算单"
   :visible.sync="show"
-  width="30%"
+  width="47%"
   :before-close="handleClose1">
   <div>
     <table class="table">
@@ -232,13 +235,14 @@
             judgesettlement(this.datalist).toPromise().then(response => {
                          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
+                      // weightprice+=(data[i].weight*data[i].settlementPrice)
+                      if(row.agreementType=='收购合同'||row.agreementType=='采购合同'){
+                      weightprice+=(data[i].weight*(data[i].settlementPrice-row.settlementPrice))
+                    }else if(row.agreementType=='销售合同'){
+                      weightprice+=(data[i].weight*(row.settlementPrice-data[i].settlementPrice))
+                    }
                   }
+                    row.profit=weightprice
         this.$confirm('结算后当前合同和相关合同不可再进行费用相关操作', '提示', {
             confirmButtonText: '确定',
             cancelButtonText: '取消',
@@ -262,16 +266,25 @@
         })
       },
       finalstatement(row){
+        console.log(row)
         this.tableData.contractNo=row.contractNo
         this.tableData.agreementType=row.agreementType
         this.tableData.buyer=row.buyer
         this.tableData.seller=row.seller
         this.tableData.settlementPrice=row.settlementPrice
-        this.tableData.profit=row.profit
+        this.tableData.profit=(row.profit*10000).toFixed(2)
         getrelationcontract({
           agreementType:row.agreementType,contractNo:row.contractNo,compId:this.compId})
           .toPromise()
           .then(response => {
+            for (let q = 0; q < response.length; q++) {
+              if(row.agreementType=='收购合同'||row.agreementType=='采购合同'){
+                response[q].profit=(response[q].weight*(response[q].settlementPrice-row.settlementPrice)).toFixed(2)
+              }else if(row.agreementType=='销售合同'){
+                response[q].profit=(response[q].weight*(row.settlementPrice-response[q].settlementPrice)).toFixed(2)
+              }
+              
+            }
             this.tableData.contractList=response
             this.show=true
           })
@@ -289,20 +302,6 @@
         this.$router.push({name:'contractcost',query:{contractNo:row.contractNo,contractType:row.contractType,buyer:row.buyer,seller:row.seller}})
       },
       getPassYearFormatDate () {
-        getcontractdetails({
-            // warehouseType: 1,
-            agreementType: this.agreementType,
-            startDate:this.startDate,
-            endDate:this.endDate,
-            currentPage: 1,
-            pageSize:9999 ,
-            searchType:this.searchType,
-            searchContractType:this.searchContractType,
-            searchTypeCon:this.searchTypeCon
-          })
-          .toPromise()
-          .then(response => {
-            this.tableData = response.records
              var _date = new Date()
             var year1 = _date.getFullYear()
             var month1 = _date.getMonth() + 1
@@ -313,14 +312,14 @@
             if (strDate1 >= 0 && strDate1 <= 9) {
               strDate1 = '0' + strDate1
             }
-            this.startDate = response.records[response.records.length-1].signingDate
+            this.startDate = year1 + '-' + (month1-1) +'-' + strDate1
             this.endDate = year1 + '-' + month1 +'-' + strDate1
             this.value=[this.startDate,this.endDate]
             this.getList()
-          })
+          // })
         },
       async getList() {
-         getcontractdetails({
+         var response=await getcontractdetails({
             // warehouseType: 1,
             agreementType: this.agreementType,
             startDate:this.startDate,
@@ -333,24 +332,27 @@
             searchTypeCon:this.searchTypeCon
           })
           .toPromise()
-          .then(response => {
-            if(response.records.length){
+          
+          if(response.records.length){
               for (let i = 0; i < response.records.length; i++) {
                 if(response.records[i].status=='已结算'){
-                  var data=getrelationcontract({
+                  var data=await getrelationcontract({
                   agreementType:response.records[i].agreementType,contractNo:response.records[i].contractNo,compId:this.compId})
                   .toPromise()
                   var weightprice=0
                   var weightprice1=0
-                  for (let i = 0; i < data.length; i++) {
-                    weightprice+=(data[i].weight*data[i].settlementPrice)
-                    // weightprice1-=(data[i].weight*data[i].settlementPrice)
-                  }
-                  if(response.records[i].agreementType=='收购合同'||response.records[i].agreementType=='采购合同'){
-                    response.records[i].profit=weightprice-(response.records[i].weight*response.records[i].settlementPrice)
-                  }else if(response.records[i].agreementType=='销售合同'){
-                    response.records[i].profit=(response.records[i].weight*response.records[i].settlementPrice)-weightprice
+                  console.log(data)
+                  for (let q = 0; q < data.length; q++) {
+                    if(response.records[i].agreementType=='收购合同'||response.records[i].agreementType=='采购合同'){
+                      weightprice+=(data[q].weight*(data[q].settlementPrice-response.records[i].settlementPrice))
+                    }else if(response.records[i].agreementType=='销售合同'){
+                      weightprice+=(data[q].weight*(response.records[i].settlementPrice-data[q].settlementPrice))
+                    }
+                    data[q].profit=data[q].weight*data[q].settlementPrice
+                    console.log(data[q],222222)
                   }
+                    response.records[i].profit=weightprice
+                 
                 }
                 response.records[i].profit=Number(Number(response.records[i].profit/10000).toFixed(3))
                 response.records[i].surplus=Number(Number(response.records[i].surplus).toFixed(3))
@@ -364,7 +366,6 @@
             }
             
            this.deptBudgetTotal = response.total
-          })
       },
 
       changeDate(){
@@ -501,4 +502,7 @@
   .bg-right{
     padding-top:15px;
   }
-</style>
+  .el-icon-connection{
+    color:#409eff;
+  }
+</style>

+ 324 - 40
src/views/profitable/expenseallot.vue

@@ -25,6 +25,10 @@
               <span v-if='deptBudgetList.costType==3'>非粮款</span>
               <span v-if='deptBudgetList.costType==5'>保证金</span>
           </el-form-item>
+          <el-form-item label-width='100px' v-if='deptBudgetList.purpose=="库点费用"' label="仓储费" span="1" prop="contractNo" class="readonly">
+            <span v-if='(deptBudgetList.storageFeeFlag==1)'>是</span>
+              <span v-if='(deptBudgetList.storageFeeFlag==0)'>否</span>
+          </el-form-item>
           <el-form-item v-if='deptBudgetList.expensesPurpose==3' label-width='100px' label="仓库名称" span="1" prop="warehouse" class="readonly">
           {{deptBudgetList.warehouseName}}
           </el-form-item>
@@ -60,24 +64,94 @@
           <div v-else>暂无附件</div>
         </el-form-item>
         </el-form>
+        <div v-if='deptBudgetList.expensesPurpose==2'>
+          <div v-for="item in deptBudgetList.tranTaskInfoList">
+            <el-form label-position="left">
+              <el-form-item label-width='100px' label="运输编号" span="1" prop="payee">
+                {{item.taskNo}}
+              </el-form-item>
+              <el-form-item label-width='100px' label="发货地" span="1" prop="accountNumber">
+              {{item.startPrivate}}{{item.startCity}}{{item.startArea}}{{item.startDetailedAddress}}
+              </el-form-item>
+              <el-form-item label-width='100px' label="收货地" span="1" prop="bank">
+                {{item.endPrivate}}{{item.endCity}}{{item.endArea}}{{item.endDetailedAddress}}
+              </el-form-item>
+            </el-form>
+            <el-table :data="item.tranSettlementReportList" style="width: 90%; margin: 20px auto; " ref="warehouseList" v-if='deptBudgetList.expensesPurpose==2' >
+          <el-table-column type="index" label="序号" width="50"></el-table-column>
+          <el-table-column class="table_td" prop="contractNo" width="120" label="合同编号"></el-table-column>
+          <el-table-column class="table_td" prop="startAddress" width="120" label="发货库"></el-table-column>
+          <el-table-column class="table_td" prop="createDate" width="120" label="发货时间"></el-table-column>
+          <el-table-column class="table_td" prop="carNo" label="车牌号" width="140"></el-table-column>
+          <el-table-column width="100" class="table_td" prop="loadingWeight" label="装车净重(吨)">
+          </el-table-column>
+          <el-table-column width="100" class="table_td" prop="unloadingWeight" label="卸车净重(吨)">
+          </el-table-column>
+          <el-table-column width="120" class="table_td" prop="transportDamage" label="公司承担运损">
+          </el-table-column>
+          <el-table-column width="100" class="table_td" prop="lossWeight" label="损耗(吨)">
+          </el-table-column>
+          <el-table-column width="120" class="table_td" prop="actualLoss" label="实际损耗">
+          </el-table-column>
+          <el-table-column width="120" class="table_td" prop="transportPrice" label="预计单价(元/吨)"></el-table-column>
+          <el-table-column width="120" class="table_td" prop="settlementPrice" label="结算单价(元/吨)">
+          </el-table-column>
+          <el-table-column width="120" class="table_td" prop="settlementWeight" label="结算重量(吨)"></el-table-column>
+          <el-table-column width="120" class="table_td" prop="cargoDamage" label="货损">
+          </el-table-column>
+          <el-table-column width="120" class="table_td" prop="deductionAmount" label="扣款(元)"></el-table-column>
+          <el-table-column width="100" class="table_td" label="服务费(元)" prop="serviceCharge">
+          </el-table-column>
+          <el-table-column width="100" class="table_td" label="实付金额(元)" prop="amountActuallyPaid"></el-table-column>
+          <el-table-column width="100" class="table_td" label="税点(元)" prop="taxPoint"></el-table-column>
+          <el-table-column width="100" class="table_td" label="合计应付(元)" prop="totalPayable"></el-table-column>
+          <el-table-column width="100" class="table_td" label="已付金额(元)" prop="amountEdPayable">
+          </el-table-column>
+          <el-table-column width="100" class="table_td" label="未付金额(元)" prop="amountNotPayable"></el-table-column>
+          <el-table-column width="100" class="table_td" label="已开发票(元)" prop="alreadyInvoice">
+          </el-table-column>
+          <el-table-column width="150" class="table_td" label="付款日期" prop="paymentDate"></el-table-column>
+            <el-table-column width="150" class="table_td" label="司机/车队" prop="name">
+              <template
+                slot-scope="scope">
+                {{ scope.row.name }}
+                <span v-if="scope.row.fleetFlag==1">(队)</span>
+              </template>
+              </el-table-column>
+            </el-table>
+          </div>
+        </div>
         <div style="display:flex;">
           <div style='margin:0 50px 10px;font-weight:bold'>费用分配</div>
           <div>可分配金额{{deptBudgetList.unallocatedAmount}}元</div>
         </div>
-        
-        <div style='margin:10px auto;width:90%;'>
+        <div style='margin:10px auto;width:90%;display: flex;'>
             <ws-select v-model="mode" placeholder="费用分配方式" class="typeselect" @change="modeselect">
           <ws-option v-for="item in modeList" :key="item.value" :label="item.value" :value="item.value"
             style="color: #8890b1" />
         </ws-select>
-         <ws-select v-model="moneys" placeholder="费用分配金额" class="typeselect" >
+         <ws-select style="margin-left: 10px" v-model="moneys" placeholder="费用分配金额" class="typeselect" >
           <ws-option v-for="item in moneysList" :key="item.value" :label="item.value" :value="item.value"
             style="color: #8890b1" />
         </ws-select>
-        合计分配:{{amount}}元
+        <div style='width:30%;margin-left: 10px' v-if='(deptBudgetList.purpose == "库点费用" &&mode != "暂不分配" && deptBudgetList.storageFeeFlag==0)'>
+            <el-date-picker v-model="value2" type="daterange" align="right" unlink-panels range-separator="至"
+              start-placeholder="开始日期" value-format='yyyy-MM-dd' end-placeholder="结束日期" :picker-options="pickerOptions"
+              @change="dateChange">
+            </el-date-picker>
+        </div>
+        <!-- && deptBudgetList.flag == "否"  :disabled='disabled'-->
+        <el-button style="margin-left: 10px" type="primary" @click="queren" v-if='(deptBudgetList.purpose == "库点费用" &&mode != "暂不分配" && deptBudgetList.storageFeeFlag==0)'>确认</el-button>
+        <ws-select style="margin-left: 25px" v-if='(deptBudgetList.purpose == "库点费用"  &&mode != "暂不分配"&& deptBudgetList.storageFeeFlag==0)'  v-model="goodsSource" placeholder="全部客户" 
+            @change='sourceChange'>
+            <ws-option key="全部客户" label="全部客户" value="全部客户" style="color: #8890b1" />
+            <ws-option v-for="item in customerList" :key="item.orderId" :label="item.goodsSource" :value="item.orderId"
+              style="color: #8890b1" />
+        </ws-select>
+        <span style="margin-top:5px;margin-left: 10px" v-if='mode!="暂不分配"'>合计分配:{{amount}}元</span>  
         </div>
         <el-table ref="tableref" v-if='deptBudgetList.expensesPurpose==1&&deptBudgetList.type=="非粮款"&&mode!="暂不分配"||deptBudgetList.expensesPurpose==3&&mode!="暂不分配"||deptBudgetList.expensesPurpose==2&&mode!="暂不分配"' :data="feeDetailsDistributions" style="width: 90%;margin:0 auto;">
-          <el-table-column v-if='deptBudgetList.expensesPurpose==1' prop="date" label="仓库名称" min-width="110">
+          <el-table-column key="1" width="200" v-if='deptBudgetList.expensesPurpose==1' prop="date" label="仓库名称" min-width="110">
             <template slot-scope="scope">
               <el-select v-model="scope.row.warehouseName" placeholder="选择仓库" @change="((value)=>{selectware(value, scope.$index)})">
                 <el-option v-for="item in warehouseList" :key="item.warehouseName" :label="item.warehouseName" :value="item.warehouseName"
@@ -85,7 +159,7 @@
               </el-select>
             </template>
           </el-table-column>
-          <el-table-column v-if='deptBudgetList.expensesPurpose==2' prop="date" label="仓库名称" min-width="110">
+          <el-table-column key="2" width="200" v-if='deptBudgetList.expensesPurpose==2' prop="date" label="仓库名称" min-width="110">
             <template slot-scope="scope">
               <el-select  @change="((value)=>{receiptDocDatechange1(value, scope.$index)})" v-model="scope.row.warehouseName" placeholder="选择仓库">
                 <el-option v-for="item in warehouseList" :key="item.warehouseName" :label="item.warehouseName" :value="item.warehouseName"
@@ -93,49 +167,57 @@
               </el-select>
             </template>
           </el-table-column>
-          <el-table-column v-if='deptBudgetList.expensesPurpose==1' prop="date" label="日期">
+          <el-table-column key="3" width="200" v-if='deptBudgetList.expensesPurpose==1' prop="date" label="日期">
             <template slot-scope="scope">
               <el-date-picker @change="((value)=>{selectware(value, scope.$index)})" v-model="scope.row.receiptDocDate" type="date" placeholder="请选择日期"
               value-format="yyyy-MM-dd"   ></el-date-picker>
             </template>
           </el-table-column>
-          <el-table-column v-if='deptBudgetList.expensesPurpose==2' prop="date" label="日期">
+          <el-table-column key="4" width="200" v-if='deptBudgetList.expensesPurpose==2' prop="date" label="日期">
             <template slot-scope="scope">
                 <el-date-picker @change="((value)=>{receiptDocDatechange1(value, scope.$index)})" v-model="scope.row.receiptDocDate" type="date" placeholder="请选择日期"
               value-format="yyyy-MM-dd"   ></el-date-picker>
             </template>
           </el-table-column>
-          <el-table-column v-if='deptBudgetList.expensesPurpose==3' prop="date" label="日期">
+          <el-table-column key="5" width="200" v-if='deptBudgetList.expensesPurpose==3' prop="date" label="日期">
             <template slot-scope="scope">
                 <el-date-picker @change="((value)=>{receiptDocDatechange(value, scope.$index)})" v-model="scope.row.receiptDocDate" type="date" placeholder="请选择日期"
               value-format="yyyy-MM-dd"   ></el-date-picker>
             </template>
           </el-table-column>
-          <el-table-column v-if='deptBudgetList.expensesPurpose==3||deptBudgetList.expensesPurpose==2||deptBudgetList.expensesPurpose==1' prop="date" label="货源">
-              <template slot-scope="scope">
+          <el-table-column key="6"  v-if='deptBudgetList.expensesPurpose==3||deptBudgetList.expensesPurpose==2||deptBudgetList.expensesPurpose==1' prop="date" label="货源">
+              <template slot-scope="scope" >
                 <!-- {{scope.row.goodsourcelist}} -->
-                <el-select v-model="scope.row.orderId" placeholder="选择货源" @change="((value)=>{selectgoodsSource(value, scope.row,scope.$index)})">
+                <!-- <el-select v-model="scope.row.orderId" placeholder="选择货源" @change="((value)=>{selectgoodsSource(value, scope.row,scope.$index)})">
+                    <el-option v-for="item in goodsourcelist[scope.$index]" :key="item.id" :label="item.goodsSource" :value="item.id"
+                        style="color: #8890b1" />
+                </el-select> -->
+                <el-select style="width: 100%;" v-if="(scope.row.orderId && confirmFlag==0 && !scope.row.goodsSource)" v-model="scope.row.orderId" placeholder="选择货源" @change="((value)=>{selectgoodsSource(value, scope.row,scope.$index)})">
+                    <el-option v-for="item in goodsourcelist[scope.$index]" :key="item.id" :label="item.goodsSource" :value="item.id"
+                        style="color: #8890b1" />
+                </el-select>
+                <el-select style="width: 100%;" v-else v-model="scope.row.goodsSource" placeholder="选择货源" @change="((value)=>{selectgoodsSource(value, scope.row,scope.$index)})">
                     <el-option v-for="item in goodsourcelist[scope.$index]" :key="item.id" :label="item.goodsSource" :value="item.id"
                         style="color: #8890b1" />
                 </el-select>
             </template>
           </el-table-column>
-          <el-table-column v-if='deptBudgetList.expensesPurpose==3' prop="date" label="货名">
+          <el-table-column key="7" width="200" v-if='deptBudgetList.expensesPurpose==3' prop="date" label="货名">
             <template slot-scope="scope">
                <span>{{scope.row.goodsName?scope.row.goodsName:'自动获取'}}</span>
             </template>
           </el-table-column>
-          <el-table-column prop="inWarehouseWeight" label="入库量(吨)">
+          <el-table-column key="8" width="200" prop="inWarehouseWeight" label="入库量(吨)">
             <template slot-scope="scope">
                <span>{{scope.row.inWarehouseWeight?scope.row.inWarehouseWeight:'自动获取'}}</span>
             </template>
           </el-table-column>
-          <el-table-column prop="date" label="分配金额(元)">
+          <el-table-column key="9" width="200" prop="date" label="分配金额(元)">
             <template slot-scope="scope">
                 <el-input placeholder="输入分配金额" class="input_css" v-model="scope.row.distributionMoney"></el-input>
             </template>
           </el-table-column>
-          <el-table-column prop="address" label="操作" width="200">
+          <el-table-column key="10" prop="address" label="操作" width="200">
             <template slot-scope="scope">
                 <img class='add' @click='addlist()' src="../../../public/img/add.png" alt="">
                 <img class='del' @click='dellist(scope.row)' src="../../../public/img/del.png" alt="">
@@ -155,7 +237,7 @@
 </template>
 <script>
   import WsUpload from '@/components/WsUpload'
-  import {lookexenseinfo,getcontract,getwarehouse,addexenseinfo,getwarehousingorder,editexenseinfo} from '@/model/profitable/index'
+  import {lookexenseinfo,getcontract,getwarehouse,addexenseinfo,getwarehousingorder,editexenseinfo,getwarehousingorderList,deloneallocationinfo} from '@/model/profitable/index'
   export default {
     components: {
       WsUpload,
@@ -163,8 +245,25 @@
     data() {
       return {
         value: [],
+        customerList: [],
+        goodsSource: '',
+        value2: '',
+        endDate: '',
+        startDate: '',
+        baseId: '',
+        warehouseName:'',
+        currentPage: 1,
+        pageSize: 10,
+        searchType: '',
+        searchKeyWord: '',
+        goodsName: '',
+        //是否按时间筛选标识,1是
+        confirmFlag: 0,
+        datas: [],
+        datas1:[],
+        orderId: '',
         profitList: [{
-          name: "玉米",
+          name: '玉米',
           count: 2000,
         }],
         mode:'全部分配',
@@ -201,6 +300,7 @@
       }
     },
     activated() {
+      this.value2 = this.getNowTime()
       this.getList()
     },
     computed: {
@@ -208,15 +308,134 @@
       amount: function () {
         // `this` 指向 vm 实例
         var num=0
-        for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
-          if(this.feeDetailsDistributions[i].distributionMoney){
-            num+=Number(this.feeDetailsDistributions[i].distributionMoney)
+        if (this.feeDetailsDistributions) {
+          for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
+            if (this.feeDetailsDistributions[i].distributionMoney) {
+              num += Number(this.feeDetailsDistributions[i].distributionMoney)
+            }
           }
+          return num.toFixed(2)
         }
-        return num
+        
       }
     },
     methods: {
+      sourceChange(e) {
+      if (e == '') {
+        this.goodsSource = '全部客户'
+      } else {
+        for(let i=0;i<this.customerList.length;i++){
+          if(this.customerList[i].orderId == e){
+            this.orderId = this.customerList[i].orderId
+            this.goodsSource  = this.customerList[i].goodsSource
+            break;
+          }
+        }
+        
+      }
+        this.selectOrderList()
+    },
+      getNowTime() {
+      const start = new Date(new Date().getTime() - 3600 * 1000 * 24)
+        .toISOString()
+        .replace('T', ' ')
+        .split('.')[0] //默认开始时间1天前
+      const end = new Date(new Date().getTime())
+        .toISOString()
+        .replace('T', ' ')
+        .split('.')[0]//默认结束时间今天
+      // console.log([start.split(' '), end])
+      return [start.split(' ')[0], end.split(' ')[0]]
+    },
+      queren() {
+      if (!this.deptBudgetList.amountMoney && this.moneys == '按重量自动分配') {
+        this.$message({
+          message: '请输入金额之后进行操作',
+          type: 'warning',
+        })
+        return
+      }
+      this.confirmFlag = 1
+      this.selectOrderList()
+    },
+    dateChange(e) {
+      this.value2 = e
+    },
+    selectOrderList() {
+      var arr = []
+      var weight = 0
+      var money = 0
+      var moneyDiff = 0
+      this.startDate = this.value2[0]
+      this.endDate = this.value2[1]
+      getwarehousingorderList({
+        compId: localStorage.getItem('ws-pf_compId'),
+        startDate: this.startDate,
+        endDate: this.endDate,
+        baseId: this.deptBudgetList.warehouseId,
+        warehouseName : this.deptBudgetList.warehouseName,
+        currentPage: this.currentPage,
+        pageSize: this.pageSize,
+        searchType: this.searchType,
+        searchKeyWord: this.searchKeyWord,
+        goodsName: this.goodsName,
+        goodsSource: this.goodsSource == '全部客户' ? '' : this.goodsSource,
+        confirmFlag : this.confirmFlag
+      })
+        .toPromise()
+        .then((response) => {
+          this.datas = []
+          this.datas1 = []
+          if (this.goodsSource && this.goodsSource != '全部客户') {
+            for (let i = 0; i < response.records.length; i++) {
+              this.datas.push(response.records[i])
+              // for (let x = 0; x < response.records[i].expenseAllocationInfoList.length; x++) {
+              //     this.datas1.push(response.records[i].expenseAllocationInfoList[x])
+              //   }
+            }
+            for (let z = 0; z < this.datas.length; z++) {
+              // this.datas[z].id
+              arr.push({ receiptDocDate: this.datas[z].issuingTime, goodsSource: this.datas[z].goodsSource,orderId:this.datas[z].id, id: '', weight: this.datas[z].inWarehouseWeight, goodsName: this.datas[z].goodsName, goodsNameKey: this.datas[z].goodsNameKey })
+            }
+            this.feeDetailsDistributions = arr
+          } else {
+            for (let i = 0; i < response.records.length; i++) {
+              for (let j = 0; j < response.records[i].warehousingOrderList.length; j++) {
+                this.datas.push(response.records[i].warehousingOrderList[j])
+              }
+            }
+            for (let z = 0; z < this.datas.length; z++) {
+              arr.push({ receiptDocDate: this.datas[z].issuingTime, goodsSource: this.datas[z].goodsSource,orderId:this.datas[z].id, id:'', weight: this.datas[z].inWarehouseWeight, goodsName: this.datas[z].goodsName, goodsNameKey: this.datas[z].goodsNameKey })
+            }
+            this.feeDetailsDistributions = arr
+
+            //获取客户
+            this.customerList = this.unique(arr)
+          }
+          for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
+            this.feeDetailsDistributions[i].inWarehouseWeight = this.feeDetailsDistributions[i].weight
+            weight += Number(this.feeDetailsDistributions[i].inWarehouseWeight)
+          }
+          if (this.moneys == '按重量自动分配') {
+            for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
+              if (i != this.feeDetailsDistributions.length - 1) {
+                this.feeDetailsDistributions[i].distributionMoney = Math.round((this.feeDetailsDistributions[i].inWarehouseWeight / weight) * this.deptBudgetList.unallocatedAmount)
+                if (this.feeDetailsDistributions[i].distributionMoney) {
+                  moneyDiff += Number(this.feeDetailsDistributions[i].distributionMoney)
+                }
+              }
+              if (i == this.feeDetailsDistributions.length - 1) {
+                this.feeDetailsDistributions[i].distributionMoney = Number(this.deptBudgetList.unallocatedAmount - moneyDiff).toFixed(2)
+              }
+              money = Number(this.feeDetailsDistributions[i].distributionMoney + moneyDiff).toFixed(2)
+            }
+          }
+        })
+    },
+    unique(arr) {
+      const res = new Map();
+      return arr.filter((arr) => !res.has(arr.goodsSource) && res.set(arr.goodsSource, 1));
+    },
       modeselect(e){
         if(e=='全部分配'){
           this.moneys='按重量自动分配'
@@ -240,12 +459,13 @@
       },
       selectgoodsSource(e,item,index){
         var weight=0
-        console.log(e)
         var money=0
+        var moneyDiff = 0
         if(!this.deptBudgetList.amountMoney&&this.moneys=='按重量自动分配'){
           for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
             if(this.feeDetailsDistributions[i].orderId==e){
-              this.feeDetailsDistributions[i].orderId=''
+              this.$set(this.feeDetailsDistributions[index],'orderId','')
+              // this.feeDetailsDistributions[i].orderId=''
             }
           }
           this.$message({
@@ -256,21 +476,41 @@
         }
         for (let i = 0; i < this.goodsourcelist[index].length; i++) {
           if(this.goodsourcelist[index][i].id==e){
-            this.feeDetailsDistributions[index].goodsSource=this.goodsourcelist[index][i].goodsSource
+            // this.feeDetailsDistributions[index].goodsSource=this.goodsourcelist[index][i].goodsSource
+            this.$set(this.feeDetailsDistributions[index],'goodsSource',this.goodsourcelist[index][i].goodsSource)
             this.feeDetailsDistributions[index].inWarehouseWeight=this.goodsourcelist[index][i].weight
             this.feeDetailsDistributions[index].goodsName=this.goodsourcelist[index][i].goodsName
             this.feeDetailsDistributions[index].goodsNameKey=this.goodsourcelist[index][i].goodsNameKey
+            this.feeDetailsDistributions[index].orderId = this.goodsourcelist[index][i].id
+            this.$forceUpdate()
             }
         }
-        if(this.moneys=='按重量自动分配'){
-          weight = this.feeDetailsDistributions.reduce(function (total, currentValue, currentIndex, arr) {
-              return total + currentValue.inWarehouseWeight;
-          }, 0)
-          for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
-              this.$set(this.feeDetailsDistributions[i],'distributionMoney',Math.round((this.feeDetailsDistributions[i].inWarehouseWeight/weight)*this.deptBudgetList.amountMoney))
-              money+=this.feeDetailsDistributions[i].distributionMoney
-          }
+        // if(this.moneys=='按重量自动分配'){
+        //   weight = this.feeDetailsDistributions.reduce(function (total, currentValue, currentIndex, arr) {
+        //       return total + currentValue.inWarehouseWeight;
+        //   }, 0)
+        //   for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
+        //       this.$set(this.feeDetailsDistributions[i],'distributionMoney',Math.round((this.feeDetailsDistributions[i].inWarehouseWeight/weight)*this.deptBudgetList.amountMoney))
+        //       money+=this.feeDetailsDistributions[i].distributionMoney
+        //   }
+        // }
+        if (this.moneys == '按重量自动分配') {
+        for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
+          weight += Number(this.feeDetailsDistributions[i].inWarehouseWeight)
+        }
+        for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
+          if (i != this.feeDetailsDistributions.length - 1) {
+                this.feeDetailsDistributions[i].distributionMoney = Math.round((this.feeDetailsDistributions[i].inWarehouseWeight / weight) * this.deptBudgetList.unallocatedAmount)
+                if (this.feeDetailsDistributions[i].distributionMoney) {
+                  moneyDiff += Number(this.feeDetailsDistributions[i].distributionMoney)
+                }
+              }
+              if (i == this.feeDetailsDistributions.length - 1) {
+                this.feeDetailsDistributions[i].distributionMoney = Number(this.deptBudgetList.unallocatedAmount - moneyDiff).toFixed(2)
+              }
+              money = Number(this.feeDetailsDistributions[i].distributionMoney + moneyDiff).toFixed(2)
         }
+      }
       },
       selecttime(e,item,index){
         var weight=0
@@ -301,7 +541,7 @@
           }
           for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
             // console.log(weight,this.feeDetailsDistributions[i].inWarehouseWeight)
-              this.feeDetailsDistributions[i].distributionMoney=Math.round((this.feeDetailsDistributions[i].inWarehouseWeight/weight)*this.deptBudgetList.amountMoney)
+              this.feeDetailsDistributions[i].distributionMoney=Math.round((this.feeDetailsDistributions[i].inWarehouseWeight/weight)*this.deptBudgetList.unallocatedAmount)
               money+=this.feeDetailsDistributions[i].distributionMoney
 
           }
@@ -328,15 +568,22 @@
             for (let i = 0; i < response.length; i++) {
               arr.push({goodsSource:response[i].goodsSource,id:response[i].id,weight:response[i].inWarehouseWeight,goodsName:response[i].goodsName,goodsNameKey:response[i].goodsNameKey})
             }
-            this.feeDetailsDistributions[index].goodsSource=''
-            this.feeDetailsDistributions[index].weight=''
+            this.$set(this.feeDetailsDistributions[index],'goodsSource','')
+            this.$set(this.feeDetailsDistributions[index],'weight','')
+            // this.feeDetailsDistributions[index].goodsSource=''
+            // this.feeDetailsDistributions[index].weight=''
              this.$set(this.goodsourcelist,index,JSON.parse(JSON.stringify(arr)))
           })
         }
         
       },
       returnsales(){
-        this.$router.go(-1)
+        // this.$router.go(-1)
+        this.feeDetailsDistributions=[{proDate:'',weight:'',money:'',warehouse:'',belonging:'',index:0}]
+        this.goodsourcelist = []
+        this.$router.push({
+          path:'expensemanagementdetails'
+        })
       },
        submit(){
           for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
@@ -374,6 +621,7 @@
             }else{
               var repetition=data.filter((item,index)=>{
                 return this.feeDetailsDistributions[i].orderId==item.orderId&&this.feeDetailsDistributions[i].receiptDocDate==item.receiptDocDate
+                && this.feeDetailsDistributions[i].goodsSource == item.goodsSource
               })
               if(repetition.length==0){
                 data.push(this.feeDetailsDistributions[i])
@@ -404,6 +652,7 @@
             }else{
               var repetition=data.filter((item,index)=>{
                 return this.feeDetailsDistributions[i].warehouseName==item.warehouseName&&this.feeDetailsDistributions[i].receiptDocDate==item.receiptDocDate
+                && this.feeDetailsDistributions[i].goodsSource == item.goodsSource && this.feeDetailsDistributions[i].orderId==item.orderId
               })
               if(repetition.length==0){
                 data.push(this.feeDetailsDistributions[i])
@@ -420,6 +669,7 @@
           }
         }
         if(this.mode=='全部分配'){
+          this.deptBudgetList.unallocatedAmount = Number(this.deptBudgetList.unallocatedAmount).toFixed(2)
           if(this.amount!=this.deptBudgetList.unallocatedAmount){
             this.$message({
                 message: '请款金额与分配金额不相等!',
@@ -460,11 +710,41 @@
           console.log(e)
       },
       addlist(){
+        this.confirmFlag = 0
         this.feeDetailsDistributions.push({proDate:'',weight:'',money:'',warehouse:'',belonging:'',index:this.feeDetailsDistributions.length})
       },
-      dellist(row){
-          this.feeDetailsDistributions.splice(row.index,1)
-      },
+      dellist(row) {
+      var weight = 0
+      var money = 0
+      var moneyDiff = 0
+        for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
+          if (this.feeDetailsDistributions[i]) {
+            if (this.feeDetailsDistributions[i] == row) {
+              this.feeDetailsDistributions.splice(i, 1)
+              if (this.moneys == '按重量自动分配' ) {
+                for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
+                  weight += this.feeDetailsDistributions[i].inWarehouseWeight
+                }
+                for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
+                  if (i != this.feeDetailsDistributions.length - 1) {
+                this.feeDetailsDistributions[i].distributionMoney = Math.round((this.feeDetailsDistributions[i].inWarehouseWeight / weight) * this.deptBudgetList.unallocatedAmount)
+                if (this.feeDetailsDistributions[i].distributionMoney) {
+                  moneyDiff += Number(this.feeDetailsDistributions[i].distributionMoney)
+                }
+              }
+              if (i == this.feeDetailsDistributions.length - 1) {
+                this.feeDetailsDistributions[i].distributionMoney = Number(this.deptBudgetList.unallocatedAmount - moneyDiff).toFixed(2)
+              }
+              money = Number(this.feeDetailsDistributions[i].distributionMoney + moneyDiff).toFixed(2)
+              
+                }
+              }
+              deloneallocationinfo({ id: row.id }).toPromise().then((response) => {
+                  })
+            }
+          }
+        }
+    },
       getList() {
         getcontract({
           compId:localStorage.getItem('ws-pf_compId'),
@@ -494,6 +774,7 @@
             response.type='保证金'
           }
           this.deptBudgetList=response 
+          // this.feeDetailsDistributions = this.deptBudgetList.expenseAllocationInfoList
           if(response.addressUrl){
             var arr=[]
             var srcs=response.addressUrl.split(',')
@@ -636,4 +917,7 @@
   width: 110px;
   height:140px;
 }
+.goodsource{
+  width:100%;
+}
 </style>

+ 72 - 8
src/views/profitable/expenseallotaduit.vue

@@ -31,6 +31,10 @@
                 <ws-option label="保证金" value="5" style="color: #8890b1" />
             </ws-select>
           </el-form-item>
+          <el-form-item label-width='100px' v-if='deptBudgetList.purpose=="库点费用"' label="仓储费" span="1" prop="contractNo" class="readonly">
+            <span v-if='(deptBudgetList.storageFeeFlag==1)'>是</span>
+              <span v-if='(deptBudgetList.storageFeeFlag==0)'>否</span>
+          </el-form-item>
           <el-form-item v-if='deptBudgetList.expensesPurpose==3' label-width='100px' label="仓库名称" span="1" prop="warehouse" class="readonly">
           {{deptBudgetList.warehouseName}}
           </el-form-item>
@@ -78,12 +82,69 @@
               <el-input disabled class='input50 input_css' placeholder="输入开户支行" v-model="deptBudgetList.bankBranch"></el-input>
             </el-form-item>
         </el-form>
+        <div v-if='deptBudgetList.expensesPurpose==2'>
+          <div v-for="item in deptBudgetList.tranTaskInfoList">
+            <el-form label-position="left">
+              <el-form-item label-width='100px' label="运输编号" span="1" prop="payee">
+                {{item.taskNo}}
+              </el-form-item>
+              <el-form-item label-width='100px' label="发货地" span="1" prop="accountNumber">
+              {{item.startPrivate}}{{item.startCity}}{{item.startArea}}{{item.startDetailedAddress}}
+              </el-form-item>
+              <el-form-item label-width='100px' label="收货地" span="1" prop="bank">
+                {{item.endPrivate}}{{item.endCity}}{{item.endArea}}{{item.endDetailedAddress}}
+              </el-form-item>
+            </el-form>
+            <el-table :data="item.tranSettlementReportList" style="width: 90%; margin: 20px auto; " ref="warehouseList" v-if='deptBudgetList.expensesPurpose==2' >
+          <el-table-column type="index" label="序号" width="50"></el-table-column>
+          <el-table-column class="table_td" prop="contractNo" width="120" label="合同编号"></el-table-column>
+          <el-table-column class="table_td" prop="startAddress" width="120" label="发货库"></el-table-column>
+          <el-table-column class="table_td" prop="createDate" width="120" label="发货时间"></el-table-column>
+          <el-table-column class="table_td" prop="carNo" label="车牌号" width="140"></el-table-column>
+          <el-table-column width="100" class="table_td" prop="loadingWeight" label="装车净重(吨)">
+          </el-table-column>
+          <el-table-column width="100" class="table_td" prop="unloadingWeight" label="卸车净重(吨)">
+          </el-table-column>
+          <el-table-column width="120" class="table_td" prop="transportDamage" label="公司承担运损">
+          </el-table-column>
+          <el-table-column width="100" class="table_td" prop="lossWeight" label="损耗(吨)">
+          </el-table-column>
+          <el-table-column width="120" class="table_td" prop="actualLoss" label="实际损耗">
+          </el-table-column>
+          <el-table-column width="120" class="table_td" prop="transportPrice" label="预计单价(元/吨)"></el-table-column>
+          <el-table-column width="120" class="table_td" prop="settlementPrice" label="结算单价(元/吨)">
+          </el-table-column>
+          <el-table-column width="120" class="table_td" prop="settlementWeight" label="结算重量(吨)"></el-table-column>
+          <el-table-column width="120" class="table_td" prop="cargoDamage" label="货损">
+          </el-table-column>
+          <el-table-column width="120" class="table_td" prop="deductionAmount" label="扣款(元)"></el-table-column>
+          <el-table-column width="100" class="table_td" label="服务费(元)" prop="serviceCharge">
+          </el-table-column>
+          <el-table-column width="100" class="table_td" label="实付金额(元)" prop="amountActuallyPaid"></el-table-column>
+          <el-table-column width="100" class="table_td" label="税点(元)" prop="taxPoint"></el-table-column>
+          <el-table-column width="100" class="table_td" label="合计应付(元)" prop="totalPayable"></el-table-column>
+          <el-table-column width="100" class="table_td" label="已付金额(元)" prop="amountEdPayable">
+          </el-table-column>
+          <el-table-column width="100" class="table_td" label="未付金额(元)" prop="amountNotPayable"></el-table-column>
+          <el-table-column width="100" class="table_td" label="已开发票(元)" prop="alreadyInvoice">
+          </el-table-column>
+          <el-table-column width="150" class="table_td" label="付款日期" prop="paymentDate"></el-table-column>
+            <el-table-column width="150" class="table_td" label="司机/车队" prop="name">
+              <template
+                slot-scope="scope">
+                {{ scope.row.name }}
+                <span v-if="scope.row.fleetFlag==1">(队)</span>
+              </template>
+              </el-table-column>
+            </el-table>
+          </div>
+        </div>
         <div v-if='deptBudgetList.expensesPurpose==1&&deptBudgetList.costType==3||deptBudgetList.expensesPurpose==3||deptBudgetList.expensesPurpose==2' style='width:90%;margin:10px auto;'>
           <div style='margin-bottom:20px;display:flex;justify-content: space-between;'>
             <div>费用分配</div><span>合计分配:{{amount}}元</span>  </div>
           <!-- <div> -->
           <el-table :data="feeDetailsDistributions">
-            <el-table-column v-if='deptBudgetList.purpose=="合同费用"||deptBudgetList.expensesPurpose==2' prop="date" label="仓库名称" min-width="110">
+            <el-table-column width="200" v-if='deptBudgetList.purpose=="合同费用"||deptBudgetList.expensesPurpose==2' prop="date" label="仓库名称" min-width="110">
               <template slot-scope="scope">
                 <ws-select disabled v-model="scope.row.warehouseName" placeholder="选择仓库" >
                   <ws-option v-for="item in warehouseList" :key="item.warehouseName" :label="item.warehouseName" :value="item.warehouseName"
@@ -91,7 +152,7 @@
                 </ws-select>
               </template>
             </el-table-column>
-            <el-table-column v-if='deptBudgetList.expensesPurpose==1||deptBudgetList.expensesPurpose==2' prop="date" label="日期">
+            <el-table-column width="200" v-if='deptBudgetList.expensesPurpose==1||deptBudgetList.expensesPurpose==2' prop="date" label="日期">
               <template slot-scope="scope">
                 <ws-select disabled v-model="scope.row.receiptDocDate" placeholder="选择日期" >
                   <ws-option v-for="item in datelist" :key="item.time" :label="item.time" :value="item.time"
@@ -99,7 +160,7 @@
                 </ws-select>
               </template>
             </el-table-column>
-            <el-table-column v-if='deptBudgetList.expensesPurpose==3' prop="date" label="日期">
+            <el-table-column width="200" v-if='deptBudgetList.expensesPurpose==3' prop="date" label="日期">
               <template slot-scope="scope">
                   <el-date-picker disabled v-model="scope.row.receiptDocDate" type="date" placeholder="请选择日期"
                 value-format="yyyy-MM-dd"   ></el-date-picker>
@@ -109,23 +170,23 @@
             </el-table-column>
             <el-table-column v-if='deptBudgetList.expensesPurpose==3' prop="date" label="货源">
                 <template slot-scope="scope">
-                  <ws-select disabled v-model="scope.row.goodsSource" placeholder="选择货源">
+                  <ws-select disabled v-model="scope.row.goodsSource" placeholder="选择货源" style="width: 100%;">
                       <ws-option v-for="item in goodsourcelist" :key="item.id" :label="item.goodsSource" :value="item.id"
                           style="color: #8890b1" />
                   </ws-select>
               </template>
             </el-table-column>
-            <el-table-column v-if='deptBudgetList.expensesPurpose==3' prop="date" label="货名">
+            <el-table-column width="200" v-if='deptBudgetList.expensesPurpose==3' prop="date" label="货名">
               <template slot-scope="scope">
                 <span>{{scope.row.goodsName?scope.row.goodsName:'自动获取'}}</span>
               </template>
             </el-table-column>
-            <el-table-column prop="inWarehouseWeight" label="入库量(吨)">
+            <el-table-column width="200" prop="inWarehouseWeight" label="入库量(吨)">
               <template slot-scope="scope">
                 <span>{{scope.row.inWarehouseWeight?scope.row.inWarehouseWeight:'自动获取'}}</span>
               </template>
             </el-table-column>
-            <el-table-column prop="date" label="分配金额(元)">
+            <el-table-column width="200" prop="date" label="分配金额(元)">
               <template slot-scope="scope">
                   <el-input disabled placeholder="输入分配金额" class="input_css" v-model="scope.row.distributionMoney"></el-input>
               </template>
@@ -175,7 +236,7 @@
       return {
         value: [],
         profitList: [{
-          name: "玉米",
+          name: '玉米',
           count: 2000,
         }],
         mode:'全部分配',
@@ -465,4 +526,7 @@
   width: 110px;
   height:140px;
 }
+.goodsource{
+  width:100%;
+}
 </style>

+ 75 - 41
src/views/profitable/expensemanagementdetails.vue

@@ -23,41 +23,43 @@
         <el-col :span="18">
           <div class="datascreen">
             <!-- <el-input placeholder="可按费用名称、流向、经办人查找" class="input_css" v-model="searchKeyWord" clearable></el-input> -->
-            <el-select v-model="warehouseName"  filterable placeholder="按仓库筛选" clearable @change="getList" class="options_css">
+            <el-select v-model="warehouseName"  filterable placeholder="按仓库筛选" clearable @change="getList1" class="options_css">
               <el-option label="全部仓库" value=""></el-option>
               <el-option v-for="item in warehousNameList" :key="item.id" :label="item.warehouseName" :value="item.warehouseName"></el-option>
             </el-select>
-            <el-select v-model="costNo" multiple filterable allow-create default-first-option placeholder="按编号筛选" clearable @change="getList" class="options_css">
+            <el-select v-model="costNo" multiple filterable allow-create default-first-option placeholder="按编号筛选" clearable @change="getList1" class="options_css">
               <el-option v-for="item in choiceObj" :key="item.id" :label="item.costNo" :value="item.costNo">
               </el-option>
             </el-select>
-            <el-select v-model="purpose" multiple filterable allow-create default-first-option placeholder="按用途筛选" clearable  @change="getList" class="options_css">
+            <el-select v-model="purpose" multiple filterable allow-create default-first-option placeholder="按用途筛选" clearable  @change="getList1" class="options_css">
               <el-option v-for="item in costChoice" :key="item.id" :label="item.name" :value="item.name">
               </el-option>
             </el-select>
-            <el-select v-model="flowTo" multiple filterable allow-create default-first-option placeholder="按流向筛选" clearable  @change="getList" class="options_css">
+            <el-select v-model="flowTo" multiple filterable allow-create default-first-option placeholder="按流向筛选" clearable  @change="getList1" class="options_css">
               <el-option v-for="item in flowToList" :key="item.id" :label="item.flowTo" :value="item.flowTo">
               </el-option>
             </el-select>
             
-            <el-select v-model="expenseName" multiple filterable allow-create default-first-option placeholder="按费用名称筛选" clearable  @change="getList" class="options_css">
+            <el-select v-model="expenseName" multiple filterable allow-create default-first-option placeholder="按费用名称筛选" clearable  @change="getList1" class="options_css">
               <el-option v-for="item in costNameList" :key="item.id" :label="item.expenseName" :value="item.expenseName">
               </el-option>
             </el-select>
-            <el-select v-model="unallocatedAmount" multiple filterable allow-create default-first-option placeholder="按未分配金额筛选" clearable  @change="getList" class="options_css">
+            <el-select v-model="unallocatedAmount" multiple filterable allow-create default-first-option placeholder="按未分配金额筛选" clearable  @change="getList1" class="options_css">
               <el-option v-for="item in moneyList" :key="item.id" :label="item.unallocatedAmount" :value="item.unallocatedAmount">
               </el-option>
             </el-select> 
-            <el-select v-model="agent" multiple filterable allow-create default-first-option placeholder="按经办人筛选" clearable  @change="getList" class="options_css">
+            <el-select v-model="agent" multiple filterable allow-create default-first-option placeholder="按经办人筛选" clearable  @change="getList1" class="options_css">
               <el-option v-for="item in personList" :key="item.id" :label="item.agent" :value="item.agent">
               </el-option>
             </el-select>
-            
+            <el-select v-model="toExamineType"  filterable  clearable @change="getList1" class="options_css">
+              <el-option label="全部状态" value=""></el-option>
+              <el-option label="待审核" value="1"></el-option>
+            </el-select>
             <!-- <el-select v-model="deptBudgetList.otherPersonPhone" placeholder="请选择其他驻库人员,可选多人"  allow-create default-first-option @change="selectstaffOther" multiple filterable clearable>
             <el-option v-for="item in optionsOther" :key="item.staffMobilePhone" :label="item.staffName" :value="item.staffMobilePhone" />
           </el-select> -->
-            <el-button class="find" type="primary" @click="find()"><img width="16" height="16" style="left: -8px"
-                src="../../../public/img/sousuo.png" alt="" /></el-button>
+            <el-button class="find" type="primary" @click="find()"><img width="16" height="16" style="left: -8px" src="../../../public/img/sousuo.png" alt="" /></el-button>
           </div>
         </el-col>
       </el-row>
@@ -150,7 +152,7 @@
               </span>
             </template>
           </el-table-column>
-          <el-table-column prop="agent" label="经办人"></el-table-column>
+          <el-table-column prop="creater" label="发起人"></el-table-column>
           <el-table-column prop="createDate" label="发起日期" width="90"></el-table-column>
           <el-table-column prop="status" label="费用状态" width="100">
             <template slot-scope="scope">
@@ -333,6 +335,7 @@ export default {
       expensesPurpose: '',
       recordList: [],
       dialogVisible:false,
+      toExamineType:'',
       compId: localStorage.getItem('ws-pf_compId'),
       dialogVisible1: false,
       deptCircularPage: {},
@@ -384,11 +387,10 @@ export default {
       moneyList:[],
       personList:[],
       warehousNameList:[],
-      warehouseName:""
+      warehouseName:''
     }
   },
   activated() {
-  
     this.getPassYearFormatDate()
     this.getList()
     this.xiala()
@@ -396,7 +398,23 @@ export default {
   methods: {
     async exportFile(){
         let _data = {
-          expenseInfoExportList:this.choiceObj
+          // expenseInfoExportList:this.choiceObj,
+          compId: localStorage.getItem('ws-pf_compId'),
+          startDate: this.startDate,
+          endDate: this.endDate,
+          searchKeyWord: this.searchKeyWord,
+          currentPage: this.currentPage,
+          pageSize: 9999,
+          searchType: this.searchType,
+          expensesPurpose: this.expensesPurpose,
+          costNo:this.costNo.length>0?this.costNo.toString():'',
+          purpose:this.purpose.length>0?this.purpose.toString():'',
+          expenseName:this.expenseName.length>0?this.expenseName.toString():'',
+          unallocatedNumber:this.unallocatedAmount.length>0?this.unallocatedAmount.toString():'',
+          agent:this.agent.length>0?this.agent.toString():'',
+          flowTo:this.flowTo.length>0?this.flowTo.toString():'',
+          warehouseName:this.warehouseName,
+          toExamineType:this.toExamineType
         }
         const {
           data
@@ -465,8 +483,8 @@ export default {
             }
           }
         })
-          //费用名称
-          getXialaList({
+      //费用名称
+      getXialaList({
         removeRepeatFlag: 2,
       })
         .toPromise()
@@ -509,6 +527,11 @@ export default {
         // this.$router.go(-1)
       })
     },
+    getList1(){
+      console.log(this.toExamineType)
+      this.currentPage=1
+      this.getList()
+    },
     onChange() {
         this.$refs.upload1
           .handleSaveBill()
@@ -785,30 +808,35 @@ export default {
     //   this.$router.push({name:'contractinventory'})
     // },
     getPassYearFormatDate() {
-      var nowDate = new Date()
-      var _date = new Date()
-      nowDate.setTime(nowDate.getTime() - 24 * 60 * 60 * 1000 * 30)
-      var year = nowDate.getFullYear()
-      var year1 = _date.getFullYear()
-      var month = nowDate.getMonth() + 1
-      var month1 = _date.getMonth() + 1
-      var strDate = nowDate.getDate()
-      var strDate1 = _date.getDate()
-      if (month >= 1 && month <= 9) {
-        month = '0' + month
-      }
-      if (month1 >= 1 && month1 <= 9) {
-        month1 = '0' + month1
-      }
+      if (!localStorage.getItem('startDate') && !localStorage.getItem('endDate')) {
+        var nowDate = new Date()
+        var _date = new Date()
+        nowDate.setTime(nowDate.getTime() - 24 * 60 * 60 * 1000 * 30)
+        var year = nowDate.getFullYear()
+        var year1 = _date.getFullYear()
+        var month = nowDate.getMonth() + 1
+        var month1 = _date.getMonth() + 1
+        var strDate = nowDate.getDate()
+        var strDate1 = _date.getDate()
+        if (month >= 1 && month <= 9) {
+          month = '0' + month
+        }
+        if (month1 >= 1 && month1 <= 9) {
+          month1 = '0' + month1
+        }
 
-      if (strDate >= 0 && strDate <= 9) {
-        strDate = '0' + strDate
-      }
-      if (strDate1 >= 0 && strDate1 <= 9) {
-        strDate1 = '0' + strDate1
+        if (strDate >= 0 && strDate <= 9) {
+          strDate = '0' + strDate
+        }
+        if (strDate1 >= 0 && strDate1 <= 9) {
+          strDate1 = '0' + strDate1
+        }
+        this.startDate = year + '-' + month + '-' + strDate
+        this.endDate = year1 + '-' + month1 + '-' + strDate1
+      }else{
+        this.startDate = localStorage.getItem('startDate')
+        this.endDate = localStorage.getItem('endDate')
       }
-      this.startDate = year + '-' + month + '-' + strDate
-      this.endDate = year1 + '-' + month1 + '-' + strDate1
       this.value = [this.startDate, this.endDate]
     },
     getList() {
@@ -816,8 +844,10 @@ export default {
       getexenseinfo({
         // warehouseType: 1,
         compId: localStorage.getItem('ws-pf_compId'),
-        startDate: this.startDate,
-        endDate: this.endDate,
+        // startDate: this.startDate,
+        // endDate: this.endDate,
+        startDate: localStorage.getItem('startDate'),
+        endDate: localStorage.getItem('endDate'),
         searchKeyWord: this.searchKeyWord,
         currentPage: this.currentPage,
         pageSize: this.pageSize,
@@ -829,7 +859,8 @@ export default {
         unallocatedNumber:this.unallocatedAmount.length>0?this.unallocatedAmount.toString():'',
         agent:this.agent.length>0?this.agent.toString():'',
         flowTo:this.flowTo.length>0?this.flowTo.toString():'',
-        warehouseName:this.warehouseName
+        warehouseName:this.warehouseName,
+        toExamineType:this.toExamineType,
       })
         .toPromise()
         .then((response) => {
@@ -861,11 +892,14 @@ export default {
       if (this.value) {
         this.startDate = this.value[0]
         this.endDate = this.value[1]
+        localStorage.setItem('startDate', this.startDate)
+        localStorage.setItem('endDate', this.endDate)
       }
       this.getList()
     },
     pickerOptions() { },
     find() {
+      this.currentPage=1
       this.getList()
     },
     handleSizeChange(val) {

+ 395 - 89
src/views/profitable/expensemanagentedit.vue

@@ -34,6 +34,10 @@
                 <ws-option label="保证金" value="5" style="color: #8890b1" />
             </ws-select>
           </el-form-item>
+          <el-form-item label-width='100px' v-if='deptBudgetList.purpose=="库点费用"' label="仓储费" span="1" prop="contractNo" class="readonly">
+            <span v-if='(deptBudgetList.storageFeeFlag==1)'>是</span>
+              <span v-if='(deptBudgetList.storageFeeFlag==0)'>否</span>
+          </el-form-item>
           <el-form-item v-if='deptBudgetList.expensesPurpose==3' label-width='100px' label="仓库名称" span="1" prop="warehouse" class="readonly">
           {{deptBudgetList.warehouseName}}
           </el-form-item>
@@ -86,11 +90,70 @@
               <el-input disabled class='input50 input_css' placeholder="输入开户支行" v-model="deptBudgetList.bankBranch"></el-input>
             </el-form-item>
         </el-form>
-        <div v-if='deptBudgetList.purpose=="合同费用"&&deptBudgetList.type=="非粮款"||deptBudgetList.purpose=="库点费用"||deptBudgetList.expensesPurpose==2' class='expensetitle'>费用分配</div>
-        <div v-if='deptBudgetList.purpose=="合同费用"&&deptBudgetList.type=="非粮款"||deptBudgetList.purpose=="库点费用"||deptBudgetList.expensesPurpose==2' style='margin:0  auto 10px;width:90%;'>
-            <ws-select v-model="mode" placeholder="费用分配方式" @change="modeselect">
+        <div v-if='deptBudgetList.expensesPurpose==2'>
+          <div v-for="item in deptBudgetList.tranTaskInfoList">
+            <el-form label-position="left">
+              <el-form-item label-width='100px' label="运输编号" span="1" prop="payee">
+                {{item.taskNo}}
+              </el-form-item>
+              <el-form-item label-width='100px' label="发货地" span="1" prop="accountNumber">
+              {{item.startPrivate}}{{item.startCity}}{{item.startArea}}{{item.startDetailedAddress}}
+              </el-form-item>
+              <el-form-item label-width='100px' label="收货地" span="1" prop="bank">
+                {{item.endPrivate}}{{item.endCity}}{{item.endArea}}{{item.endDetailedAddress}}
+              </el-form-item>
+            </el-form>
+            <el-table :data="item.tranSettlementReportList" style="width: 90%; margin: 20px auto; " ref="warehouseList" v-if='deptBudgetList.expensesPurpose==2' >
+              <el-table-column type="index" label="序号" width="50"></el-table-column>
+              <el-table-column class="table_td" prop="contractNo" width="120" label="合同编号"></el-table-column>
+              <el-table-column class="table_td" prop="startAddress" width="120" label="发货库"></el-table-column>
+              <el-table-column class="table_td" prop="createDate" width="120" label="发货时间"></el-table-column>
+              <el-table-column class="table_td" prop="carNo" label="车牌号" width="140"></el-table-column>
+              <el-table-column width="100" class="table_td" prop="loadingWeight" label="装车净重(吨)">
+              </el-table-column>
+              <el-table-column width="100" class="table_td" prop="unloadingWeight" label="卸车净重(吨)">
+              </el-table-column>
+              <el-table-column width="120" class="table_td" prop="transportDamage" label="公司承担运损">
+              </el-table-column>
+              <el-table-column width="100" class="table_td" prop="lossWeight" label="损耗(吨)">
+              </el-table-column>
+              <el-table-column width="120" class="table_td" prop="actualLoss" label="实际损耗">
+              </el-table-column>
+              <el-table-column width="120" class="table_td" prop="transportPrice" label="预计单价(元/吨)"></el-table-column>
+              <el-table-column width="120" class="table_td" prop="settlementPrice" label="结算单价(元/吨)">
+              </el-table-column>
+              <el-table-column width="120" class="table_td" prop="settlementWeight" label="结算重量(吨)"></el-table-column>
+              <el-table-column width="120" class="table_td" prop="cargoDamage" label="货损">
+              </el-table-column>
+              <el-table-column width="120" class="table_td" prop="deductionAmount" label="扣款(元)"></el-table-column>
+              <el-table-column width="100" class="table_td" label="服务费(元)" prop="serviceCharge">
+              </el-table-column>
+              <el-table-column width="100" class="table_td" label="实付金额(元)" prop="amountActuallyPaid"></el-table-column>
+              <el-table-column width="100" class="table_td" label="税点(元)" prop="taxPoint"></el-table-column>
+              <el-table-column width="100" class="table_td" label="合计应付(元)" prop="totalPayable"></el-table-column>
+              <el-table-column width="100" class="table_td" label="已付金额(元)" prop="amountEdPayable">
+              </el-table-column>
+              <el-table-column width="100" class="table_td" label="未付金额(元)" prop="amountNotPayable"></el-table-column>
+              <el-table-column width="100" class="table_td" label="已开发票(元)" prop="alreadyInvoice">
+              </el-table-column>
+              <el-table-column width="150" class="table_td" label="付款日期" prop="paymentDate"></el-table-column>
+              <el-table-column width="150" class="table_td" label="司机/车队" prop="name">
+                  <template
+                    slot-scope="scope">
+                    {{ scope.row.name }}
+                    <span v-if="scope.row.fleetFlag==1">(队)</span>
+                  </template>
+                </el-table-column>
+            </el-table>
+          </div>
+        </div>
+        <div style="display:flex" v-if='(deptBudgetList.purpose=="合同费用"&&deptBudgetList.type=="非粮款"||deptBudgetList.purpose=="库点费用"&&deptBudgetList.storageFeeFlag==0||deptBudgetList.expensesPurpose==2&&deptBudgetList.storageFeeFlag==0)' class='expensetitle'>费用分配
+          <div style="margin-left:15px">可分配金额{{deptBudgetList.unallocatedAmount}}元</div></div>
+        <div v-if='(deptBudgetList.purpose=="合同费用"&&deptBudgetList.type=="非粮款"||deptBudgetList.purpose=="库点费用"&&deptBudgetList.storageFeeFlag==0||deptBudgetList.expensesPurpose==2&&deptBudgetList.storageFeeFlag==0)' style='margin:0  auto 10px;width:90%;display: flex;'>
+          <ws-select v-model="mode" placeholder="费用分配方式" @change="modeselect">
           <ws-option v-for="item in modeList" :key="item.value" :label="item.value" :value="item.value"
             style="color: #8890b1" />
+            
         </ws-select>
          <!-- <ws-select v-if='deptBudgetList.purpose==1' v-model="ware" placeholder="费用分配仓库" class="typeselect" @change="selectwareType"
           :value="searchType">
@@ -107,14 +170,28 @@
           <ws-option v-for="item in datesList" :key="item.value" :label="item.value" :value="item.value"
             style="color: #8890b1" />
         </ws-select> -->
-         <ws-select :disabled='disabled' v-model="moneys" placeholder="费用分配金额">
+         <ws-select style='margin-left: 10px' :disabled='disabled' v-model="moneys" placeholder="费用分配金额">
           <ws-option v-for="item in moneysList" :key="item.value" :label="item.value" :value="item.value"
             style="color: #8890b1" />
         </ws-select>
-        <span v-if='mode!="暂不分配"'>合计分配:{{amount}}元</span>  
+        <div style='width:30%;margin-left: 10px' v-if='(deptBudgetList.purpose == "库点费用" &&mode != "暂不分配" && deptBudgetList.storageFeeFlag==0)'>
+            <el-date-picker v-model="value2" type="daterange" align="right" unlink-panels range-separator="至"
+              start-placeholder="开始日期" value-format='yyyy-MM-dd' end-placeholder="结束日期" :picker-options="pickerOptions"
+              @change="dateChange">
+            </el-date-picker>
+        </div>
+        <!-- && deptBudgetList.flag == "否"  :disabled='disabled'-->
+        <el-button style='margin-left: 10px' type="primary" @click="queren" v-if='(deptBudgetList.purpose == "库点费用" &&mode != "暂不分配" && deptBudgetList.storageFeeFlag==0)'>确认</el-button>
+        <ws-select style='margin-left: 25px' v-if='(deptBudgetList.purpose == "库点费用"  &&mode != "暂不分配"&& deptBudgetList.storageFeeFlag==0)'  v-model="goodsSource" placeholder="全部客户" 
+            @change='sourceChange'>
+            <ws-option key="全部客户" label="全部客户" value="全部客户" style="color: #8890b1" />
+            <ws-option v-for="item in customerList" :key="item.orderId" :label="item.goodsSource" :value="item.orderId"
+              style="color: #8890b1" />
+        </ws-select>
+        <span style="margin-top:5px;margin-left: 10px" v-if='mode!="暂不分配"'>合计分配:{{amount}}元</span>  
         </div>
         <el-table ref="tableref" v-if='deptBudgetList.purpose=="合同费用"&&deptBudgetList.type=="非粮款"&&mode!="暂不分配"||deptBudgetList.purpose=="库点费用"&&mode!="暂不分配"||deptBudgetList.expensesPurpose==2&&mode!="暂不分配"' :data="feeDetailsDistributions" style="width: 90%;margin:0 auto;">
-          <el-table-column v-if='deptBudgetList.purpose=="合同费用"' prop="date" label="仓库名称" min-width="110">
+          <el-table-column key="1" width="150" v-if='deptBudgetList.purpose=="合同费用"' prop="date" label="仓库名称" min-width="110">
             <template slot-scope="scope">
               <el-select v-model="scope.row.warehouseName" placeholder="选择仓库" @change="((value)=>{selectware(value, scope.$index)})">
                 <el-option v-for="item in warehouseList" :key="item.warehouseName" :label="item.warehouseName" :value="item.warehouseName"
@@ -122,7 +199,7 @@
               </el-select>
             </template>
           </el-table-column>
-          <el-table-column v-if='deptBudgetList.expensesPurpose==2' prop="date" label="仓库名称" min-width="110">
+          <el-table-column key="2" width="150" v-if='deptBudgetList.expensesPurpose==2' prop="date" label="仓库名称" min-width="110">
             <template slot-scope="scope">
               <el-select  @change="((value)=>{receiptDocDatechange1(value, scope.$index)})" v-model="scope.row.warehouseName" placeholder="选择仓库">
                 <el-option v-for="item in warehouseList" :key="item.warehouseName" :label="item.warehouseName" :value="item.warehouseName"
@@ -138,43 +215,51 @@
               </ws-select>
             </template>
           </el-table-column> -->
-          <el-table-column v-if='deptBudgetList.purpose=="库点费用"' prop="date" label="日期">
+          <el-table-column key="3" width="200" v-if='deptBudgetList.purpose=="库点费用"' prop="date" label="日期">
             <template slot-scope="scope">
                 <el-date-picker @change="((value)=>{receiptDocDatechange(value, scope.$index)})" v-model="scope.row.receiptDocDate" type="date" placeholder="请选择日期"
               value-format="yyyy-MM-dd"   ></el-date-picker>
             </template>
           </el-table-column>
-          <el-table-column v-if='deptBudgetList.expensesPurpose==1||deptBudgetList.expensesPurpose==2' prop="date" label="日期">
+          <el-table-column  key="4" width="200" v-if='deptBudgetList.expensesPurpose==1||deptBudgetList.expensesPurpose==2' prop="date" label="日期">
             <template slot-scope="scope">
                 <el-date-picker @change="((value)=>{receiptDocDatechange1(value, scope.$index)})" v-model="scope.row.receiptDocDate" type="date" placeholder="请选择日期"
               value-format="yyyy-MM-dd"   ></el-date-picker>
             </template>
           </el-table-column>
-          <el-table-column v-if='deptBudgetList.purpose=="库点费用"||deptBudgetList.expensesPurpose==2||deptBudgetList.expensesPurpose==1' prop="date" label="货源">
+          <el-table-column key="5" v-if='deptBudgetList.purpose=="库点费用"||deptBudgetList.expensesPurpose==2||deptBudgetList.expensesPurpose==1' prop="date" label="货源">
               <template slot-scope="scope">
                 <!-- {{scope.row.goodsourcelist}} -->
-                <el-select v-model="scope.row.orderId" placeholder="选择货源" @change="((value)=>{selectgoodsSource(value, scope.row,scope.$index)})">
+                <!-- <el-select v-model="scope.row.orderId" placeholder="选择货源" @change="((value)=>{selectgoodsSource(value, scope.row,scope.$index)})">
+                    <el-option v-for="item in goodsourcelist[scope.$index]" :key="item.id" :label="item.goodsSource" :value="item.id"
+                        style="color: #8890b1" />
+                </el-select> -->
+                <el-select style="width: 100%;" v-if="(scope.row.orderId &&confirmFlag==0 && !scope.row.goodsSource)" v-model="scope.row.orderId" placeholder="选择货源" @change="((value)=>{selectgoodsSource(value, scope.row,scope.$index)})">
+                    <el-option v-for="item in goodsourcelist[scope.$index]" :key="item.id" :label="item.goodsSource" :value="item.id"
+                        style="color: #8890b1" />
+                </el-select>
+                <el-select style="width: 100%;" v-else v-model="scope.row.goodsSource" placeholder="选择货源" @change="((value)=>{selectgoodsSource(value, scope.row,scope.$index)})">
                     <el-option v-for="item in goodsourcelist[scope.$index]" :key="item.id" :label="item.goodsSource" :value="item.id"
                         style="color: #8890b1" />
                 </el-select>
             </template>
           </el-table-column>
-          <el-table-column v-if='deptBudgetList.purpose=="库点费用"' prop="date" label="货名">
+          <el-table-column key="6" width="150" v-if='deptBudgetList.purpose=="库点费用"' prop="date" label="货名">
             <template slot-scope="scope">
                <span>{{scope.row.goodsName?scope.row.goodsName:'自动获取'}}</span>
             </template>
           </el-table-column>
-          <el-table-column prop="inWarehouseWeight" label="入库量(吨)">
+          <el-table-column key="7" width="150" prop="inWarehouseWeight" label="入库量(吨)">
             <template slot-scope="scope">
                <span>{{scope.row.inWarehouseWeight?scope.row.inWarehouseWeight:'自动获取'}}</span>
             </template>
           </el-table-column>
-          <el-table-column prop="date" label="分配金额(元)">
+          <el-table-column key="8" width="200" prop="date" label="分配金额(元)">
             <template slot-scope="scope">
                 <el-input placeholder="输入费用名称,1-15个字" class="input_css" v-model="scope.row.distributionMoney"></el-input>
             </template>
           </el-table-column>
-          <el-table-column prop="address" label="操作" width="200">
+          <el-table-column key="9" prop="address" label="操作" width="200">
             <template slot-scope="scope">
                 <img class='add' @click='addlist()' src="../../../public/img/add.png" alt="">
                 <img class='del' @click='dellist(scope.row)' src="../../../public/img/del.png" alt="">
@@ -192,16 +277,34 @@
 </template>
 <script>
   import WsUpload from '@/components/WsUpload'
-  import {lookexenseinfo,getcontract,getwarehouse,getwarehousingorder,editexenseinfo,deloneallocationinfo} from '@/model/profitable/index'
+  import {lookexenseinfo,getcontract,getwarehouse,getwarehousingorder,editexenseinfo,deloneallocationinfo,getwarehousingorderList} from '@/model/profitable/index'
   export default {
     components: {
       WsUpload,
     },
     data() {
       return {
+        customerList: [],
+        goodsSource: '',
+        value2: '',
+        endDate: '',
+        startDate: '',
+        baseId: '',
+        warehouseName:'',
+        currentPage: 1,
+        pageSize: 10,
+        searchType: '',
+        searchKeyWord: '',
+        goodsName: '',
+        storageFeeFlag:'',
+        //是否按时间筛选标识,1是
+        confirmFlag: 0,
+        datas: [],
+        datas1:[],
+        orderId: '',
         value: [],
         profitList: [{
-          name: "玉米",
+          name: '玉米',
           count: 2000,
         }],
         mode:'全部分配',
@@ -214,16 +317,16 @@
         compId:localStorage.getItem('ws-pf_compId'),
         // dateRange: this.disabledDate(),
         feeDetailsDistributions:[{receiptDocDate:'',inWarehouseWeight:0,distributionMoney:0,warehouseName:'',goodsName:'',goodsSource:'',index:0,}],
-        deptBudgetList:{purpose:"合同费用",type:'粮款'},
+        deptBudgetList:{purpose:'合同费用',type:'粮款'},
         makeWordData: {},
         warehouseList:[],
         contractList:[],
         choosablewareList:[],
         paymentScreenshot:[],
-        goodsourcelist:[[{goodsName: "玉米",
+        goodsourcelist:[[{goodsName: '玉米',
 goodsNameKey: null,
-goodsSource: "张跃文",
-id: "34e710ed3883484798ab37ec4ee9b9cd",
+goodsSource: '张跃文',
+id: '34e710ed3883484798ab37ec4ee9b9cd',
 weight: 4000}]],
         signingDate:'',
         datelist:[],
@@ -248,6 +351,7 @@ weight: 4000}]],
       // this.makeWordData = this.getData(2)
       // this.initCharts()
       // this.getPassYearFormatDate()
+      this.value2 = this.getNowTime()
       this.getList()
     },
      computed: {
@@ -255,19 +359,126 @@ weight: 4000}]],
       amount: function () {
         // `this` 指向 vm 实例
         var num=0
-        for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
-          num+=Number(this.feeDetailsDistributions[i].distributionMoney)
+         if (this.feeDetailsDistributions) {
+           for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
+             num += Number(this.feeDetailsDistributions[i].distributionMoney)
+           }
+           return num.toFixed(2)
+         }
+       }
+    },
+    methods: {
+      sourceChange(e) {
+      if (e == '') {
+        this.goodsSource = '全部客户'
+      } else {
+        for(let i=0;i<this.customerList.length;i++){
+          if(this.customerList[i].orderId == e){
+            this.orderId = this.customerList[i].orderId
+            this.goodsSource  = this.customerList[i].goodsSource
+            break;
+          }
         }
-        return num
+        
       }
+        this.selectOrderList()
+    },
+      getNowTime() {
+      const start = new Date(new Date().getTime() - 3600 * 1000 * 24)
+        .toISOString()
+        .replace('T', ' ')
+        .split('.')[0] //默认开始时间1天前
+      const end = new Date(new Date().getTime())
+        .toISOString()
+        .replace('T', ' ')
+        .split('.')[0]//默认结束时间今天
+      // console.log([start.split(' '), end])
+      return [start.split(' ')[0], end.split(' ')[0]]
+    },
+      queren() {
+      this.confirmFlag = 1
+      this.selectOrderList()
+    },
+    dateChange(e) {
+      this.value2 = e
+    },
+    selectOrderList() {
+      var arr = []
+      var weight = 0
+      var money = 0
+      var moneyDiff = 0
+      this.startDate = this.value2[0]
+      this.endDate = this.value2[1]
+      getwarehousingorderList({
+        compId: localStorage.getItem('ws-pf_compId'),
+        startDate: this.startDate,
+        endDate: this.endDate,
+        baseId: this.deptBudgetList.warehouseId,
+        warehouseName : this.deptBudgetList.warehouseName,
+        currentPage: this.currentPage,
+        pageSize: this.pageSize,
+        searchType: this.searchType,
+        searchKeyWord: this.searchKeyWord,
+        goodsName: this.goodsName,
+        goodsSource: this.goodsSource == '全部客户' ? '' : this.goodsSource,
+        confirmFlag : this.confirmFlag
+      })
+        .toPromise()
+        .then((response) => {
+          this.datas = []
+          this.datas1 = []
+          if (this.goodsSource && this.goodsSource != '全部客户') {
+            for (let i = 0; i < response.records.length; i++) {
+              this.datas.push(response.records[i])
+            }
+            for (let z = 0; z < this.datas.length; z++) {
+              arr.push({ receiptDocDate: this.datas[z].issuingTime, goodsSource: this.datas[z].goodsSource,orderId:this.datas[z].id, id: '', weight: this.datas[z].inWarehouseWeight, goodsName: this.datas[z].goodsName, goodsNameKey: this.datas[z].goodsNameKey })
+            }
+            this.feeDetailsDistributions = arr
+          } else {
+            for (let i = 0; i < response.records.length; i++) {
+              for (let j = 0; j < response.records[i].warehousingOrderList.length; j++) {
+                this.datas.push(response.records[i].warehousingOrderList[j])
+              }
+            }
+            for (let z = 0; z < this.datas.length; z++) {
+              arr.push({ receiptDocDate: this.datas[z].issuingTime, goodsSource: this.datas[z].goodsSource,orderId:this.datas[z].id, id: '', weight: this.datas[z].inWarehouseWeight, goodsName: this.datas[z].goodsName, goodsNameKey: this.datas[z].goodsNameKey })
+            }
+            this.feeDetailsDistributions = arr
+
+            //获取客户
+            this.customerList = this.unique(arr)
+          }
+          for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
+            this.feeDetailsDistributions[i].inWarehouseWeight = this.feeDetailsDistributions[i].weight
+            weight += Number(this.feeDetailsDistributions[i].inWarehouseWeight)
+          }
+          if (this.moneys == '按重量自动分配') {
+            for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
+              if (i != this.feeDetailsDistributions.length - 1) {
+                this.feeDetailsDistributions[i].distributionMoney = Math.round((this.feeDetailsDistributions[i].inWarehouseWeight / weight) * this.deptBudgetList.unallocatedAmount)
+                if (this.feeDetailsDistributions[i].distributionMoney) {
+                  moneyDiff += Number(this.feeDetailsDistributions[i].distributionMoney)
+                }
+              }
+              if (i == this.feeDetailsDistributions.length - 1) {
+                this.feeDetailsDistributions[i].distributionMoney = Number(this.deptBudgetList.unallocatedAmount - moneyDiff).toFixed(2)
+              }
+              money = Number(this.feeDetailsDistributions[i].distributionMoney + moneyDiff).toFixed(2)
+            }
+          }
+        })
+    },
+    unique(arr) {
+      const res = new Map();
+      return arr.filter((arr) => !res.has(arr.goodsSource) && res.set(arr.goodsSource, 1));
     },
-    methods: {
       timeFun(unixtimestamp) {
         var unixtimestamp = new Date(unixtimestamp);
         var year = 1900 + unixtimestamp.getYear();
-        var month = "0" + (unixtimestamp.getMonth() + 1);
-        var date = "0" + unixtimestamp.getDate();
-        return year + "-" + month.substring(month.length - 2, month.length) + "-" +     date.substring(date.length - 2,date.length)      
+        var month = '0' + (unixtimestamp.getMonth() + 1);
+        var date = '0' + unixtimestamp.getDate();
+        return year + '-' + month.substring(month.length - 2, month.length) + '-' +     date.substring(date.length - 2,date.length)      
       },
       selectware(e,index){
         var arr=[]
@@ -282,9 +493,10 @@ weight: 4000}]],
           })
       },
       selectgoodsSource(e,item,index){
+        debugger
         var weight=0
-        console.log(e)
         var money=0
+        var moneyDiff = 0
         if(!this.deptBudgetList.amountMoney&&this.moneys=='按重量自动分配'){
           for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
             if(this.feeDetailsDistributions[i].orderId==e){
@@ -299,21 +511,41 @@ weight: 4000}]],
         }
         for (let i = 0; i < this.goodsourcelist[index].length; i++) {
           if(this.goodsourcelist[index][i].id==e){
-            this.feeDetailsDistributions[index].goodsSource=this.goodsourcelist[index][i].goodsSource
+            // this.feeDetailsDistributions[index].goodsSource=this.goodsourcelist[index][i].goodsSource
+            this.$set(this.feeDetailsDistributions[index],'goodsSource',this.goodsourcelist[index][i].goodsSource) 
             this.feeDetailsDistributions[index].inWarehouseWeight=this.goodsourcelist[index][i].weight
             this.feeDetailsDistributions[index].goodsName=this.goodsourcelist[index][i].goodsName
             this.feeDetailsDistributions[index].goodsNameKey=this.goodsourcelist[index][i].goodsNameKey
+            this.feeDetailsDistributions[index].orderId = this.goodsourcelist[index][i].id
+            this.$forceUpdate()
             }
         }
-        if(this.moneys=='按重量自动分配'){
-          weight = this.feeDetailsDistributions.reduce(function (total, currentValue, currentIndex, arr) {
-              return total + currentValue.inWarehouseWeight;
-          }, 0)
-          for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
-              this.feeDetailsDistributions[i].distributionMoney=Math.round((this.feeDetailsDistributions[i].inWarehouseWeight/weight)*this.deptBudgetList.amountMoney)
-              money+=this.feeDetailsDistributions[i].distributionMoney
-          }
+        // if(this.moneys=='按重量自动分配'){
+        //   weight = this.feeDetailsDistributions.reduce(function (total, currentValue, currentIndex, arr) {
+        //       return total + currentValue.inWarehouseWeight;
+        //   }, 0)
+        //   for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
+        //       this.feeDetailsDistributions[i].distributionMoney=Math.round((this.feeDetailsDistributions[i].inWarehouseWeight/weight)*this.deptBudgetList.amountMoney)
+        //       money+=this.feeDetailsDistributions[i].distributionMoney
+        //   }
+        // }
+        if (this.moneys == '按重量自动分配') {
+        for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
+          weight += Number(this.feeDetailsDistributions[i].inWarehouseWeight)
         }
+        for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
+          if (i != this.feeDetailsDistributions.length - 1) {
+                this.feeDetailsDistributions[i].distributionMoney = Math.round((this.feeDetailsDistributions[i].inWarehouseWeight / weight) * this.deptBudgetList.unallocatedAmount)
+                if (this.feeDetailsDistributions[i].distributionMoney) {
+                  moneyDiff += Number(this.feeDetailsDistributions[i].distributionMoney)
+                }
+              }
+              if (i == this.feeDetailsDistributions.length - 1) {
+                this.feeDetailsDistributions[i].distributionMoney = Number(this.deptBudgetList.unallocatedAmount - moneyDiff).toFixed(2)
+              }
+              money = Number(this.feeDetailsDistributions[i].distributionMoney + moneyDiff).toFixed(2)
+        }
+      }
       },
       selecttime(e,item,index){
         var weight=0
@@ -343,7 +575,7 @@ weight: 4000}]],
           }
           for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
             // console.log(weight,this.feeDetailsDistributions[i].inWarehouseWeight)
-              this.feeDetailsDistributions[i].distributionMoney=Math.round((this.feeDetailsDistributions[i].inWarehouseWeight/weight)*this.deptBudgetList.amountMoney)
+              this.feeDetailsDistributions[i].distributionMoney=Math.round((this.feeDetailsDistributions[i].inWarehouseWeight/weight)*this.deptBudgetList.unallocatedAmount)
               money+=this.feeDetailsDistributions[i].distributionMoney
 
           }
@@ -370,8 +602,10 @@ weight: 4000}]],
             for (let i = 0; i < response.length; i++) {
               arr.push({goodsSource:response[i].goodsSource,id:response[i].id,weight:response[i].inWarehouseWeight,goodsName:response[i].goodsName,goodsNameKey:response[i].goodsNameKey})
             }
-            this.feeDetailsDistributions[index].goodsSource=''
-            this.feeDetailsDistributions[index].weight=''
+            // this.feeDetailsDistributions[index].goodsSource=''
+            // this.feeDetailsDistributions[index].weight=''
+            this.$set(this.feeDetailsDistributions[index],'goodsSource','')
+            this.$set(this.feeDetailsDistributions[index],'weight','')
              this.$set(this.goodsourcelist,index,JSON.parse(JSON.stringify(arr)))
           })
         }
@@ -397,16 +631,23 @@ weight: 4000}]],
         this.deptBudgetList.totalDistribution=this.amount
         if(this.deptBudgetList.purpose=='合同费用'&&this.deptBudgetList.type=='非粮款'||this.deptBudgetList.purpose=='库点费用'){
           for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
-            if(!this.feeDetailsDistributions[i].distributionMoney){
+            if(!this.feeDetailsDistributions[i].distributionMoney&&this.feeDetailsDistributions[i].distributionMoney!=0){
               this.$message({
                 message: '分配金额不能为空!',
                 type: 'warning',
               })
               return
             }
-            if(this.feeDetailsDistributions[i].distributionMoney<0){
+            // if(this.feeDetailsDistributions[i].distributionMoney<0){
+            //   this.$message({
+            //     message: '分配金额应大于0!',
+            //     type: 'warning',
+            //   })
+            //   return
+            // }
+            if(!this.feeDetailsDistributions[i].orderId){
               this.$message({
-                message: '分配金额应大于0!',
+                message: '货源不能为空!',
                 type: 'warning',
               })
               return
@@ -442,17 +683,18 @@ weight: 4000}]],
             this.deptBudgetList.expenseAllocationInfoList=[]
           }
         }
-        if(this.deptBudgetList.expensesPurpose==2){
+        if(this.deptBudgetList.expensesPurpose==2 || this.deptBudgetList.expensesPurpose==3&&this.storageFeeFlag==0){
           this.deptBudgetList.expenseAllocationInfoList=this.feeDetailsDistributions
         }
          if(this.deptBudgetList.expensesPurpose==1||this.deptBudgetList.expensesPurpose==2){
-        var data=[]
+          var data=[]
           for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
             if(data.length==0){
               data.push(this.feeDetailsDistributions[i])
             }else{
               var repetition=data.filter((item,index)=>{
                 return this.feeDetailsDistributions[i].orderId==item.orderId&&this.feeDetailsDistributions[i].receiptDocDate==item.receiptDocDate
+                && this.feeDetailsDistributions[i].goodsSource == item.goodsSource
               })
               if(repetition.length==0){
                 data.push(this.feeDetailsDistributions[i])
@@ -468,13 +710,14 @@ weight: 4000}]],
           }
         }
         if(this.deptBudgetList.expensesPurpose==3){
-        var data=[]
+          var data=[]
           for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
             if(data.length==0){
               data.push(this.feeDetailsDistributions[i])
             }else{
               var repetition=data.filter((item,index)=>{
                 return this.feeDetailsDistributions[i].warehouseName==item.warehouseName&&this.feeDetailsDistributions[i].receiptDocDate==item.receiptDocDate
+                && this.feeDetailsDistributions[i].goodsSource == item.goodsSource && this.feeDetailsDistributions[i].orderId==item.orderId
               })
               if(repetition.length==0){
                 data.push(this.feeDetailsDistributions[i])
@@ -486,7 +729,6 @@ weight: 4000}]],
                   return
               }
             }
-            
           }
         }
         this.deptBudgetList.expensesType=2
@@ -506,7 +748,8 @@ weight: 4000}]],
         }
        
         if(this.deptBudgetList.expensesPurpose==1&&this.deptBudgetList.costType==3&&this.mode=='全部分配'||this.deptBudgetList.expensesPurpose==3&&this.mode=='全部分配'){
-          if(this.amount!=this.deptBudgetList.amountMoney){
+          this.deptBudgetList.unallocatedAmount = Number(this.deptBudgetList.unallocatedAmount).toFixed(2)
+          if(this.amount!=this.deptBudgetList.unallocatedAmount){
             this.$message({
                 message: '请款金额与分配金额不相等!',
                 type: 'warning',
@@ -515,7 +758,7 @@ weight: 4000}]],
           }
         }
         if(this.deptBudgetList.expensesPurpose==1&&this.deptBudgetList.costType==3&&this.mode=='部分分配'||this.deptBudgetList.expensesPurpose==3&&this.mode=='部分分配'){
-          if(this.amount>this.deptBudgetList.amountMoney){
+          if(this.amount>this.deptBudgetList.unallocatedAmount){
             this.$message({
                 message: '分配金额不可超过请款金额!',
                 type: 'warning',
@@ -530,12 +773,13 @@ weight: 4000}]],
           })
           return
         }
-        if(this.deptBudgetList.expenseName.length<1||this.deptBudgetList.expenseName.length>15){
-          this.$message({
-                message: '费用名称输入错误!',
-                type: 'warning',
-          })
-        }
+        // if(this.deptBudgetList.expenseName.length<1||this.deptBudgetList.expenseName.length>15){
+        //   this.$message({
+        //         message: '费用名称输入错误!',
+        //         type: 'warning',
+        //   })
+        // return
+        // }
         if(!this.deptBudgetList.amountMoney){
           this.$message({
                 message: '金额不能为空!',
@@ -569,32 +813,84 @@ weight: 4000}]],
           console.log(e)
       },
       addlist(){
+        this.confirmFlag = 0
         this.feeDetailsDistributions.push({receiptDocDate:'',inWarehouseWeight:0,distributionMoney:0,warehouseName:'',time:0,id:0,weight:0,goodsName:'',goodsSource:'',index:0,   goodsNameKey: null,index:this.feeDetailsDistributions.length})
       },
       dellist(row){
-        if(this.feeDetailsDistributions.length>1){
-          if(row.id==0){
-            this.feeDetailsDistributions.splice(row.index,1)
-          }else{
-            this.feeDetailsDistributions.splice(row.index,1)
-            var data=localStorage.getItem('expensebh')
-            var data1=[]
-            for (let i = 0; i < data.length; i++) {
-              if(data[i].id==row.id){
-                var data1=data.splice(row.i,1)
-              }
-            }
-            if(data1.length>0){
-              localStorage.setItem('expensebh',data1)
-            }else{
-              localStorage.removeItem('expensebh')
-            }
-            
-            deloneallocationinfo({id:row.id}).toPromise().then((response) => {
-            })
-            
+        // var weight=0
+        // var money=0
+        // var moneyDiff = 0
+        // if(this.feeDetailsDistributions.length>1){
+        //   debugger
+        //   if(row.id==0){
+        //     this.feeDetailsDistributions.splice(row.index,1)
+        //   }else{
+        //     this.feeDetailsDistributions.splice(row.index,1)
+        //     var data=localStorage.getItem('expensebh')
+        //     var data1=[]
+        //     for (let i = 0; i < data.length; i++) {
+        //       if(data[i].id==row.id){
+        //         var data1=data.splice(row.i,1)
+               
+        //       }
+        //     }
+        //     if(data1.length>0){
+        //       localStorage.setItem('expensebh',data1)
+        //     }else{
+        //       localStorage.removeItem('expensebh')
+        //     }
+        //     deloneallocationinfo({id:row.id}).toPromise().then((response) => {
+              
+        //     })
             
             
+        //   }
+        var weight = 0
+        var money = 0
+        var moneyDiff = 0
+        if (this.feeDetailsDistributions.length > 1) {
+          if (row.id == 0) {
+            this.feeDetailsDistributions.splice(row.index, 1)
+          } else {
+            for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
+              if (this.feeDetailsDistributions[i]) {
+                if (this.feeDetailsDistributions[i] == row) {
+                  this.feeDetailsDistributions.splice(i, 1)
+                  if (this.moneys == '按重量自动分配' ) {
+                for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
+                  weight += this.feeDetailsDistributions[i].inWarehouseWeight
+                }
+                for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
+                  if (i != this.feeDetailsDistributions.length - 1) {
+                this.feeDetailsDistributions[i].distributionMoney = Math.round((this.feeDetailsDistributions[i].inWarehouseWeight / weight) * this.deptBudgetList.unallocatedAmount)
+                if (this.feeDetailsDistributions[i].distributionMoney) {
+                  moneyDiff += Number(this.feeDetailsDistributions[i].distributionMoney)
+                }
+              }
+              if (i == this.feeDetailsDistributions.length - 1) {
+                this.feeDetailsDistributions[i].distributionMoney = (this.deptBudgetList.unallocatedAmount - moneyDiff).toFixed(2)
+              }
+              money = (this.feeDetailsDistributions[i].distributionMoney + moneyDiff).toFixed(2)
+
+                }
+              }
+                  var data = localStorage.getItem('expensebh')
+                  var data1 = []
+                  for (let i = 0; i < data.length; i++) {
+                    if (data[i].id == row.id) {
+                      var data1 = data.splice(row.i, 1)
+                    }
+                  }
+                  if (data1.length > 0) {
+                    localStorage.setItem('expensebh', data1)
+                  } else {
+                    localStorage.removeItem('expensebh')
+                  }
+                  deloneallocationinfo({ id: row.id }).toPromise().then((response) => {
+                  })
+                }
+              }
+            }
           }
         }else{
           this.$message({
@@ -603,17 +899,18 @@ weight: 4000}]],
           })
           return
         }
-        var weight=0
-        var money=0
-        if(this.moneys=='按重量自动分配'){
-          for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
-          weight+=this.feeDetailsDistributions[i].inWarehouseWeight
-          }
-          for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
-              this.feeDetailsDistributions[i].distributionMoney=Math.round((this.feeDetailsDistributions[i].inWarehouseWeight/weight)*this.deptBudgetList.amountMoney)
-              money+=this.feeDetailsDistributions[i].distributionMoney
-          }
-        }
+        // var weight=0
+        // var money=0
+        // if(this.moneys=='按重量自动分配'){
+        //   for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
+        //   weight+=this.feeDetailsDistributions[i].inWarehouseWeight
+        //   }
+        //   for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
+        //       this.feeDetailsDistributions[i].distributionMoney=Math.round((this.feeDetailsDistributions[i].inWarehouseWeight/weight)*this.deptBudgetList.amountMoney)
+        //       money+=this.feeDetailsDistributions[i].distributionMoney
+        //   }
+        // } 
+        
       },
       getList() {
         getcontract({
@@ -645,6 +942,7 @@ weight: 4000}]],
             response.type='保证金'
           }
           this.deptBudgetList=response
+          // this.feeDetailsDistributions = this.deptBudgetList.expenseAllocationInfoList
           this.dataList=[]
           if(response.addressUrl){
             var arr=[]
@@ -702,7 +1000,12 @@ weight: 4000}]],
           }
      },
       returnsales(){
-        this.$router.go(-1)
+        // this.$router.go(-1)
+        this.feeDetailsDistributions = [{receiptDocDate:'',inWarehouseWeight:0,distributionMoney:0,warehouseName:'',goodsName:'',goodsSource:'',index:0,}],
+        this.goodsourcelist = []
+        this.$router.push({
+          path:'expensemanagementdetails'
+        })
       },
       handlefujian(file) {
         // console.log(file)
@@ -846,4 +1149,7 @@ weight: 4000}]],
   width: 110px;
   height:140px;
 }
+.goodsource{
+  width:100%;
+}
 </style>

+ 79 - 52
src/views/profitable/expensemanagentlook.vue

@@ -27,6 +27,10 @@
               <span v-if='deptBudgetList.costType==3'>非粮款</span>
               <span v-if='deptBudgetList.costType==5'>保证金</span>
           </el-form-item>
+          <el-form-item label-width='100px' v-if='deptBudgetList.purpose=="库点费用"' label="仓储费" span="1" prop="contractNo" class="readonly">
+            <span v-if='(deptBudgetList.storageFeeFlag==1)'>是</span>
+              <span v-if='(deptBudgetList.storageFeeFlag==0)'>否</span>
+          </el-form-item>
           <el-form-item v-if='deptBudgetList.expensesPurpose==3' label-width='100px' label="仓库名称" span="1" prop="warehouseName" class="readonly">
           {{deptBudgetList.warehouseName}}
           </el-form-item>
@@ -80,54 +84,71 @@
             </el-form-item>
           </el-form>
         </div>
-        <div class="wenzi">车辆详情</div>
-        <el-table :data="deptBudgetList.tranSettlementReportList" style="width: 90%; margin: 20px auto; " ref="warehouseList"  >
-        <el-table-column type="index" label="序号" width="50"></el-table-column>
-        <el-table-column class="table_td" prop="contractNo" width="120" label="合同编号"></el-table-column>
-        <el-table-column class="table_td" prop="startAddress" width="120" label="发货库"></el-table-column>
-        <el-table-column class="table_td" prop="createDate" width="120" label="发货时间"></el-table-column>
-        <el-table-column class="table_td" prop="carNo" label="车牌号" width="140"></el-table-column>
-        <el-table-column width="100" class="table_td" prop="loadingWeight" label="装车净重(吨)">
-        </el-table-column>
-        <el-table-column width="100" class="table_td" prop="unloadingWeight" label="卸车净重(吨)">
-        </el-table-column>
-        <el-table-column width="120" class="table_td" prop="transportDamage" label="公司承担运损">
-        </el-table-column>
-        <el-table-column width="100" class="table_td" prop="lossWeight" label="损耗(吨)">
-        </el-table-column>
-        <el-table-column width="120" class="table_td" prop="actualLoss" label="实际损耗">
-        </el-table-column>
-        <el-table-column width="120" class="table_td" prop="transportPrice" label="预计单价(元/吨)"></el-table-column>
-        <el-table-column width="120" class="table_td" prop="settlementPrice" label="结算单价(元/吨)">
-        </el-table-column>
-        <el-table-column width="120" class="table_td" prop="settlementWeight" label="结算重量(吨)"></el-table-column>
-        <el-table-column width="120" class="table_td" prop="cargoDamage" label="货损">
-        </el-table-column>
-        <el-table-column width="120" class="table_td" prop="deductionAmount" label="扣款(元)"></el-table-column>
-        <el-table-column width="100" class="table_td" label="服务费(元)" prop="serviceCharge">
-        </el-table-column>
-        <el-table-column width="100" class="table_td" label="实付金额(元)" prop="amountActuallyPaid"></el-table-column>
-        <el-table-column width="100" class="table_td" label="税点(元)" prop="taxPoint"></el-table-column>
-        <el-table-column width="100" class="table_td" label="合计应付(元)" prop="totalPayable"></el-table-column>
-        <el-table-column width="100" class="table_td" label="已付金额(元)" prop="amountEdPayable">
-        </el-table-column>
-        <el-table-column width="100" class="table_td" label="未付金额(元)" prop="amountNotPayable"></el-table-column>
-        <el-table-column width="100" class="table_td" label="已开发票(元)" prop="alreadyInvoice">
-        </el-table-column>
-        <el-table-column width="150" class="table_td" label="付款日期" prop="paymentDate"></el-table-column>
-          <el-table-column width="150" class="table_td" label="司机/车队" prop="name">
-            <template
-              slot-scope="scope">
-              {{ scope.row.name }}
-              <span v-if="scope.row.fleetFlag==1">(队)</span>
-            </template>
-            </el-table-column>
-          </el-table>
-        <div v-if='deptBudgetList.expensesPurpose==1&&deptBudgetList.costType==3||deptBudgetList.expensesPurpose==2' style='width:90%;margin:10px auto;'>
+        <div class="wenzi" v-if='deptBudgetList.expensesPurpose==2'>车辆详情</div>
+        <div v-if='deptBudgetList.expensesPurpose==2'>
+          <div v-for="item in deptBudgetList.tranTaskInfoList">
+            <el-form label-position="left">
+              <el-form-item label-width='100px' label="运输编号" span="1" prop="payee">
+                {{item.taskNo}}
+              </el-form-item>
+              <el-form-item label-width='100px' label="发货地" span="1" prop="accountNumber">
+              {{item.startPrivate}}{{item.startCity}}{{item.startArea}}{{item.startDetailedAddress}}
+              </el-form-item>
+              <el-form-item label-width='100px' label="收货地" span="1" prop="bank">
+                {{item.endPrivate}}{{item.endCity}}{{item.endArea}}{{item.endDetailedAddress}}
+              </el-form-item>
+            </el-form>
+            <el-table :data="item.tranSettlementReportList" style="width: 90%; margin: 20px auto; " ref="warehouseList" v-if='deptBudgetList.expensesPurpose==2' >
+          <el-table-column type="index" label="序号" width="50"></el-table-column>
+          <el-table-column class="table_td" prop="contractNo" width="120" label="合同编号"></el-table-column>
+          <el-table-column class="table_td" prop="startAddress" width="120" label="发货库"></el-table-column>
+          <el-table-column class="table_td" prop="createDate" width="120" label="发货时间"></el-table-column>
+          <el-table-column class="table_td" prop="carNo" label="车牌号" width="140"></el-table-column>
+          <el-table-column width="100" class="table_td" prop="loadingWeight" label="装车净重(吨)">
+          </el-table-column>
+          <el-table-column width="100" class="table_td" prop="unloadingWeight" label="卸车净重(吨)">
+          </el-table-column>
+          <el-table-column width="120" class="table_td" prop="transportDamage" label="公司承担运损">
+          </el-table-column>
+          <el-table-column width="100" class="table_td" prop="lossWeight" label="损耗(吨)">
+          </el-table-column>
+          <el-table-column width="120" class="table_td" prop="actualLoss" label="实际损耗">
+          </el-table-column>
+          <el-table-column width="120" class="table_td" prop="transportPrice" label="预计单价(元/吨)"></el-table-column>
+          <el-table-column width="120" class="table_td" prop="settlementPrice" label="结算单价(元/吨)">
+          </el-table-column>
+          <el-table-column width="120" class="table_td" prop="settlementWeight" label="结算重量(吨)"></el-table-column>
+          <el-table-column width="120" class="table_td" prop="cargoDamage" label="货损">
+          </el-table-column>
+          <el-table-column width="120" class="table_td" prop="deductionAmount" label="扣款(元)"></el-table-column>
+          <el-table-column width="100" class="table_td" label="服务费(元)" prop="serviceCharge">
+          </el-table-column>
+          <el-table-column width="100" class="table_td" label="实付金额(元)" prop="amountActuallyPaid"></el-table-column>
+          <el-table-column width="100" class="table_td" label="税点(元)" prop="taxPoint"></el-table-column>
+          <el-table-column width="100" class="table_td" label="合计应付(元)" prop="totalPayable"></el-table-column>
+          <el-table-column width="100" class="table_td" label="已付金额(元)" prop="amountEdPayable">
+          </el-table-column>
+          <el-table-column width="100" class="table_td" label="未付金额(元)" prop="amountNotPayable"></el-table-column>
+          <el-table-column width="100" class="table_td" label="已开发票(元)" prop="alreadyInvoice">
+          </el-table-column>
+          <el-table-column width="150" class="table_td" label="付款日期" prop="paymentDate"></el-table-column>
+            <el-table-column width="150" class="table_td" label="司机/车队" prop="name">
+              <template
+                slot-scope="scope">
+                {{ scope.row.name }}
+                <span v-if="scope.row.fleetFlag==1">(队)</span>
+              </template>
+              </el-table-column>
+            </el-table>
+          </div>
+        </div>
+        
+        
+        <div v-if='deptBudgetList.expensesPurpose==1&&deptBudgetList.costType==3||deptBudgetList.expensesPurpose==3||deptBudgetList.expensesPurpose==2' style='width:90%;margin:10px auto;'>
           <div style='margin-bottom:20px;'>费用分配</div>
           <!-- <div> -->
           <el-table :data="deptBudgetList.expenseAllocationInfoList">
-            <el-table-column v-if='deptBudgetList.purpose=="合同费用"||deptBudgetList.expensesPurpose==2' prop="date" label="仓库名称" min-width="110">
+            <el-table-column width="200" v-if='deptBudgetList.purpose=="合同费用"||deptBudgetList.expensesPurpose==2' prop="date" label="仓库名称" min-width="110">
               <template slot-scope="scope">
                 <ws-select disabled v-model="scope.row.warehouseName" placeholder="选择仓库" @change="((value)=>{selectware(value, scope.row)})">
                   <ws-option v-for="item in warehouseList" :key="item.warehouseName" :label="item.warehouseName" :value="item.warehouseName"
@@ -135,7 +156,7 @@
                 </ws-select>
               </template>
             </el-table-column>
-            <el-table-column v-if='deptBudgetList.expensesPurpose==1||deptBudgetList.expensesPurpose==2' prop="date" label="日期">
+            <el-table-column width="200" v-if='deptBudgetList.expensesPurpose==1||deptBudgetList.expensesPurpose==2' prop="date" label="日期">
               <template slot-scope="scope">
                 <ws-select disabled v-model="scope.row.receiptDocDate" placeholder="选择日期" @change="((value)=>{selecttime(value, scope.row)})">
                   <ws-option v-for="item in datelist" :key="item.time" :label="item.time" :value="item.time"
@@ -143,7 +164,7 @@
                 </ws-select>
               </template>
             </el-table-column>
-            <el-table-column v-if='deptBudgetList.expensesPurpose==3' prop="date" label="日期">
+            <el-table-column width="200" v-if='deptBudgetList.expensesPurpose==3' prop="date" label="日期">
               <template slot-scope="scope">
                   <el-date-picker disabled @change="receiptDocDatechange" v-model="scope.row.receiptDocDate" type="date" placeholder="请选择日期"
                 value-format="yyyy-MM-dd"   ></el-date-picker>
@@ -153,23 +174,24 @@
             </el-table-column>
             <el-table-column v-if='deptBudgetList.expensesPurpose==3' prop="date" label="货源">
                 <template slot-scope="scope">
-                  <ws-select disabled v-model="scope.row.orderId" placeholder="选择货源" @change="((value)=>{selectgoodsSource(value, scope.row)})">
+                  <!-- <ws-select class="goodsource" disabled v-model="scope.row.orderId" placeholder="选择货源" @change="((value)=>{selectgoodsSource(value, scope.row)})"> -->
+                  <ws-select disabled v-model="scope.row.goodsSource" placeholder="选择货源" @change="((value)=>{selectgoodsSource(value, scope.row)})">
                       <ws-option v-for="item in goodsourcelist" :key="item.id" :label="item.goodsSource" :value="item.id"
                           style="color: #8890b1" />
                   </ws-select>
               </template>
             </el-table-column>
-            <el-table-column v-if='deptBudgetList.expensesPurpose==3' prop="date" label="货名">
+            <el-table-column width="200" v-if='deptBudgetList.expensesPurpose==3' prop="date" label="货名">
               <template slot-scope="scope">
                 <span>{{scope.row.goodsName?scope.row.goodsName:'自动获取'}}</span>
               </template>
             </el-table-column>
-            <el-table-column prop="inWarehouseWeight" label="入库量(吨)">
+            <el-table-column width="200" prop="inWarehouseWeight" label="入库量(吨)">
               <template slot-scope="scope">
                 <span>{{scope.row.inWarehouseWeight?scope.row.inWarehouseWeight:'自动获取'}}</span>
               </template>
             </el-table-column>
-            <el-table-column prop="date" label="分配金额(元)">
+            <el-table-column width="200" prop="date" label="分配金额(元)">
               <template slot-scope="scope">
                   <el-input disabled placeholder="输入费用名称,1-15个字" class="input_css" v-model="scope.row.distributionMoney"></el-input>
               </template>
@@ -191,7 +213,7 @@
       return {
         value: [],
         profitList: [{
-          name: "玉米",
+          name: '玉米',
           count: 2000,
         }],
         deptBudgetList:{},
@@ -228,6 +250,7 @@
         .toPromise()
         .then((response) => {
           this.deptBudgetList=response
+          this.expenseAllocationInfoList = this.deptBudgetList.expenseAllocationInfoList
           this.srcList=[]
           var arr=response.addressUrl.split(',')
           for (let i = 0; i < arr.length; i++) {
@@ -349,4 +372,8 @@
   width:90%;
   margin:0 auto;
 }
+
+.goodsource{
+  width:100%;
+}
 </style>

+ 39 - 1
src/views/purchasingManagement/procurementPlanAdd.vue

@@ -154,6 +154,19 @@
           </el-form-item>
         </el-form>
       </div>
+      <!--备注信息-->
+      <div class="center1">
+        <div class="small-title">
+          <h3>备注信息</h3>
+        </div>
+        <el-form style="display: block;" ref="dataList" :model="dataList" label-width="140px">
+          <el-form-item label="备注" span="1" prop="remark">
+            <el-input v-model="dataList.remark" maxlength="3000" class="typeselect" placeholder="请输入备注" />
+          </el-form-item>
+          <ws-upload  ref="upload" :comp-id="compId" :appendix-ids="dataList.addressUrl" :size-limit="size"
+            @onChange="onChangeAddressUrl" accept=".jpg, .jpeg, .png" />
+        </el-form>
+      </div>
     </div>
     <!-- 提交 -->
     <div style="text-align: right; padding: 10px" class="center">
@@ -281,7 +294,8 @@
           priceType: '定价采购',
           priceTypeKey: 2,
           packingType: '散装',
-          packingTypeKey: 1
+          packingTypeKey: 1,
+          addressUrl:'',
         },
         historyList: [],
         pickerBeginDateBefore: {
@@ -297,6 +311,17 @@
     },
     mounted() {},
     methods: {
+      onChangeAddressUrl() {
+        this.$refs.upload
+          .handleSaveBill()
+          .then(async response => {
+            this.dataList.addressUrl = response
+          })
+          .catch(res => {
+            EventBus.$emit('error', (JSON.parse(res) || {}).message)
+            this.$refs.upload.clearFiles()
+          })
+      },
       //返回按钮
       revert() {
         this.$router.go(-1)
@@ -788,6 +813,19 @@
                   .toPromise()
                   .then(response => {
                     this.$message.success('添加成功');
+                    this.dataList = {
+                      taskTypeKey: '1',
+                      goodsName: '玉米',
+                      goodsNameKey: 1,
+                      salePlanType: '现货',
+                      salePlanTypeKey: 2,
+                      priceType: '定价销售',
+                      priceTypeKey: 2,
+                      packingType: '散装',
+                      packingTypeKey: 1,
+                      addressUrl: '',
+                      selectedOptions:''
+                    },
                     (this.outputYear = ''),
                     this.$router.push({
                       path: 'procurementPlanList'

+ 47 - 7
src/views/salesManagement/salesPlanAdd.vue

@@ -73,8 +73,8 @@
             <span class="unchangeable">*</span>
           </ws-form-item>
           <ws-form-item label="出货库所在地区" span="1" prop="sendArea">
-            <el-cascader :options="options_" v-model="selectedOptions" clearable class="typeselect"
-              placeholder="请选择出货库所在地区" @change="handleChange" style="width: 200%" />
+            <el-cascader :options="options_" v-model="selectedOptions" clearable class="typeselect" placeholder="请选择出货库所在地区"
+              @change="handleChange" style="width: 200%" />
             <span class="unchangeable">*</span>
           </ws-form-item>
           <ws-form-item label="运费承担方" span="1" prop="freightPayer">
@@ -142,14 +142,12 @@
           </el-form-item>
           <ws-form-item label="粒型" span="1" prop="grain">
             <ws-select v-model="dataList.grain" placeholder class="typeselect" @change="selectgrain">
-              <ws-option v-for="item in grainList" :key="item.constKey" :label="item.constValue"
-                :value="item.constValue" />
+              <ws-option v-for="item in grainList" :key="item.constKey" :label="item.constValue" :value="item.constValue" />
             </ws-select>
           </ws-form-item>
           <ws-form-item label="品级" span="1" prop="grade">
             <ws-select v-model="dataList.grade" placeholder class="typeselect" @change="selectgrade">
-              <ws-option v-for="item in gradeList" :key="item.constKey" :label="item.constValue"
-                :value="item.constValue" />
+              <ws-option v-for="item in gradeList" :key="item.constKey" :label="item.constValue" :value="item.constValue" />
             </ws-select>
           </ws-form-item>
           <ws-form-item label="产地" span="1" prop="unitPrice">
@@ -162,6 +160,19 @@
           </el-form-item>
         </el-form>
       </div>
+      <!--备注信息-->
+      <div class="center1">
+        <div class="small-title">
+          <h3>备注信息</h3>
+        </div>
+        <el-form style="display: block;" ref="dataList" :model="dataList" label-width="140px">
+          <el-form-item label="备注" span="1" prop="remark">
+            <el-input v-model="dataList.remark" maxlength="3000" class="typeselect" placeholder="请输入备注" />
+          </el-form-item>
+          <ws-upload ref="upload" :comp-id="compId" :appendix-ids="dataList.addressUrl" :size-limit="size"
+            @onChange="onChangeAddressUrl" accept=".jpg, .jpeg, .png" />
+        </el-form>
+      </div>
     </div>
     <!-- 提交 -->
     <div style="text-align: right; padding: 10px" class="center">
@@ -212,6 +223,7 @@
         //弹出框
         dialogViewSpareMoney: false,
         dialogApproveFormVisible: false,
+        dialogVisible: false,
         // 是否显示
         showType: true,
         // 年
@@ -288,6 +300,7 @@
           priceTypeKey: 2,
           packingType: '散装',
           packingTypeKey: 1,
+          addressUrl:'',
         },
         historyList: [],
         pickerBeginDateBefore: {
@@ -303,6 +316,17 @@
     },
     mounted() {},
     methods: {
+      onChangeAddressUrl() {
+        this.$refs.upload
+          .handleSaveBill()
+          .then(async response => {
+            this.dataList.addressUrl = response
+          })
+          .catch(res => {
+            EventBus.$emit('error', (JSON.parse(res) || {}).message)
+            this.$refs.upload.clearFiles()
+          })
+      },
       //返回按钮
       revert() {
         this.$router.go(-1)
@@ -811,6 +835,19 @@
                   .toPromise()
                   .then((response) => {
                     this.$message.success('添加成功');
+                    this.dataList = {
+                      taskTypeKey: '1',
+                      goodsName: '玉米',
+                      goodsNameKey: 1,
+                      salePlanType: '现货',
+                      salePlanTypeKey: 2,
+                      priceType: '定价销售',
+                      priceTypeKey: 2,
+                      packingType: '散装',
+                      packingTypeKey: 1,
+                      addressUrl: '',
+                      selectedOptions:''
+                    },
                     (this.outputYear = ''),
                     this.$router.push({
                       path: 'salesPlanList'
@@ -1150,7 +1187,10 @@
     width: 400px;
     height: 20px;
   }
-
+  .addressUrl {
+    margin: 0px 10px;
+    border-radius: 3px;
+  }
   //*号
   .unchangeable {
     position: absolute;

+ 64 - 8
src/views/statisticalReport/autoSettlementList.vue

@@ -48,7 +48,7 @@
           <el-date-picker @change="datechange" format="yyyy-MM-dd" v-model="value2" type="daterange" unlink-panels range-separator="至"
           start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions">
         </el-date-picker>
-          <el-input v-model="carNo" placeholder="可按车牌号进行查找" clearable maxlength="500" type="input"
+          <el-input v-model="searchKeyWord" placeholder="可按车牌号进行查找" clearable maxlength="500" type="input"
           class="findValue" @keyup.enter.native="find()"></el-input>
         <ws-button class="find" type="primary" @click="find()"><img width="16" height="16" style="
               vertical-align: text-top;
@@ -445,6 +445,19 @@
             v-model="deptBudgetList.remark">
             </el-input>
         </el-form-item>
+        <ws-upload
+          style="margin-left:30px"
+          ref="upload"
+          table-name="maintain_work_order"
+          oss-key="mainPlan"
+          :comp-id="compId"
+          :appendix-ids="appendixIdsAdd"
+          :vesselId="deptBudgetList.addressUrl"
+          :size-limit="size"
+          @uploadSuccess="uploadSuccess"
+          @onChange="onChange"
+          accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
+        />
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="handleClose3">取 消</el-button>
@@ -507,6 +520,7 @@ export default {
       needReapply: true,
       totalList:[],
       carNo:'',
+      appendixIdsAdd: '',
       deptBudgetList:{},
       pickerOptions: {
           shortcuts: [{
@@ -616,12 +630,8 @@ export default {
       compId: localStorage.getItem('ws-pf_compId'),
       roleId: localStorage.getItem('ws-pf_roleId'),
       deptCircularPage: {},
-      warehouseList: [],
       orderList: {},
       tranPriceApproveList: [],
-      deptBudgetList: {},
-      id: '',
-
       pcFlag: 1,
       carryoverlist: {},
       modification: [],
@@ -677,6 +687,16 @@ export default {
     this.showType = this.isShow
   },
   methods: {
+    // 上传附件
+    uploadSuccess(data, files, url) {
+      console.log(data, files, url)
+    },
+    onChange(files) {
+      this.fileNum = files
+      this.$refs.upload.handleSaveBill().then((res) => {
+        console.log(files)
+      })
+    },
     datechange(e){
       if (this.value2) {
           this.startDate = this.dateFormat('YYYY-mm-dd', this.value2[0])
@@ -1277,14 +1297,35 @@ export default {
         })
     },
     editsettlementWeight(item) {
+      if (item.approveStatus) {
+        this.$message({
+          message: '请选择待请款的条目进行修改!',
+          type: 'warning',
+        })
+        return
+      }
       this.settlementWeight = item.settlementWeight
       item.settlementWeightchange = true
     },
     editsettlementPrice(item) {
+      if (item.approveStatus) {
+        this.$message({
+          message: '请选择待请款的条目进行修改!',
+          type: 'warning',
+        })
+        return
+      }
       this.settlementPrice = item.settlementPrice
       item.settlementPricechange = true
     },
     editactualLoss(item) {
+      if (item.approveStatus) {
+        this.$message({
+          message: '请选择待请款的条目进行修改!',
+          type: 'warning',
+        })
+        return
+      }
       this.actualLoss = item.actualLoss
       item.actualLosschange = true
     },
@@ -1327,6 +1368,13 @@ export default {
         })
     },
     editdeductionAmount(item) {
+      if (item.approveStatus) {
+        this.$message({
+          message: '请选择待请款的条目进行修改!',
+          type: 'warning',
+        })
+        return
+      }
       this.deductionAmount = item.deductionAmount
       item.deductionAmountchange = true
     },
@@ -1369,6 +1417,13 @@ export default {
         })
     },
     editserviceCharge(item) {
+      if (item.approveStatus) {
+        this.$message({
+          message: '请选择待请款的条目进行修改!',
+          type: 'warning',
+        })
+        return
+      }
       this.serviceCharge = item.serviceCharge
       item.serviceChargechange = true
     },
@@ -1627,7 +1682,8 @@ export default {
         carType:this.carType,
         carNo:this.carNo,
         startDate:this.startDate,
-        endDate:this.endDate
+        endDate:this.endDate,
+        searchKeyWord: this.searchKeyWord,
       })
         .toPromise()
         .then((response) => {
@@ -1638,8 +1694,8 @@ export default {
             response.records[i].deductionAmountchange = false
             response.records[i].amountIngPayable = response.records[i].amountIngPayable.toFixed(2)
             response.records[i].amountEdPayable = response.records[i].amountEdPayable.toFixed(2)
-            response.records[i].amountNotPayable = (response.records[i].totalPayable - response.records[i]
-              .amountEdPayable).toFixed(2)
+            response.records[i].amountNotPayable =((response.records[i].totalPayable - response.records[i]
+              .amountEdPayable)*100)/100
             if (response.records[i].tranPriceApproveList) {
               for (var j = 0; j < response.records[i].tranPriceApproveList.length; j++) {
                 this.tranPriceApproveList.push(response.records[i].tranPriceApproveList[j])

+ 96 - 95
src/views/taskManagement/component/routers/route.js

@@ -13,101 +13,6 @@ const tranManagementRouter = {
     icon: '-renwuguanli'
   },
   children: [
-    //运输任务
-    {
-      path: 'tranManagementTransport',
-      component: () =>
-        import(/* webpackChunkName: "applDetail" */ '@/views/taskManagement/tranManagementTransport'),
-      name: 'tranManagementTransport',
-      meta: {
-        title: 'tranManagementTransport',
-        shortcutEntrance: 'tranManagement',
-        module: 'transportationTask.transportation.transportationInfo',
-        permissicon: [],
-        keepAlive: true,
-        _title:'运输任务'
-      },
-
-      // hidden: true
-    },
-    //运输查看
-    {
-      path: 'tranManagementLook',
-      component: () =>
-        import(/* webpackChunkName: "applDetail" */ '@/views/taskManagement/tranManagementLook'),
-      name: 'tranManagementLook',
-      meta: {
-        title: 'tranManagementLook',
-        shortcutEntrance: 'tranManagement',
-        module: 'transportationTask.transportation.transportationInfo.view',
-        permissicon: [],
-        keepAlive: true,
-        _title:'运输任务查看'
-      },
-      hidden: true
-    },
-    //运输添加
-    {
-      path: 'tranManagementTransportAdd',
-      component: () =>
-        import(/* webpackChunkName: "applDetail" */ '@/views/taskManagement/tranManagementTransportAdd'),
-      name: 'tranManagemen  tTransportAdd',
-      meta: {
-        title: 'tranManagementTransportAdd',
-        shortcutEntrance: 'tranManagement',
-        module: 'transportationTask.transportation.transportationInfo.add',
-        permissicon: [],
-        keepAlive: true,
-        _title:'运输任务添加'
-      },
-      hidden: true
-    },
-    //运输编辑
-    {
-      path: 'tranManagementTransportEdit',
-      component: () =>
-        import(/* webpackChunkName: "applDetail" */ '@/views/taskManagement/tranManagementTransportEdit'),
-      name: 'tranManagementTransportEdit',
-      meta: {
-        title: 'tranManagementTransportEdit',
-        shortcutEntrance: 'tranManagement',
-        module: 'transportationTask.transportation.transportationInfo.view',
-        permissicon: [],
-        keepAlive: true,
-        _title:'运输任务编辑'
-      },
-      hidden: true
-
-    },
-    //移库任务
-    {
-      path: 'moveWarehouseTask',
-      component: () =>
-        import(/* webpackChunkName: "applDetail" */ '@/views/taskManagement/moveWarehouseTask'),
-      name: 'moveWarehouseTask',
-      meta: {
-        title: 'moveWarehouseTask',
-        shortcutEntrance: 'tranManagement',
-        module: 'warehouseManagement.warehouse.warehouseInfoTask',
-        permissicon: [],
-        keepAlive: true,
-        _title:'移库任务'
-      },
-    },
-    //移库查看 
-    {
-      path: 'moveWarehouseTaskLook',
-      component: () =>
-        import(/* webpackChunkName: "applDetail" */ '@/views/taskManagement/moveWarehouseTaskLook'),
-      name: 'moveWarehouseTaskLook',
-      meta: {
-        title: 'moveWarehouseTaskLook',
-        shortcutEntrance: 'tranManagement',
-        module: 'warehouseManagement.warehouse.warehouseInfoTask',
-        _title:'移库任务查看'
-      },
-      hidden: true,
-    },
     //出入库任务
     {
       path: 'tranManagementWarehouseInOuttask',
@@ -267,6 +172,102 @@ const tranManagementRouter = {
       },
       hidden: true
     },
+    //运输任务
+    {
+      path: 'tranManagementTransport',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/taskManagement/tranManagementTransport'),
+      name: 'tranManagementTransport',
+      meta: {
+        title: 'tranManagementTransport',
+        shortcutEntrance: 'tranManagement',
+        module: 'transportationTask.transportation.transportationInfo',
+        permissicon: [],
+        keepAlive: true,
+        _title:'运输任务'
+      },
+
+      // hidden: true
+    },
+    //运输查看
+    {
+      path: 'tranManagementLook',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/taskManagement/tranManagementLook'),
+      name: 'tranManagementLook',
+      meta: {
+        title: 'tranManagementLook',
+        shortcutEntrance: 'tranManagement',
+        module: 'transportationTask.transportation.transportationInfo.view',
+        permissicon: [],
+        keepAlive: true,
+        _title:'运输任务查看'
+      },
+      hidden: true
+    },
+    //运输添加
+    {
+      path: 'tranManagementTransportAdd',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/taskManagement/tranManagementTransportAdd'),
+      name: 'tranManagemen  tTransportAdd',
+      meta: {
+        title: 'tranManagementTransportAdd',
+        shortcutEntrance: 'tranManagement',
+        module: 'transportationTask.transportation.transportationInfo.add',
+        permissicon: [],
+        keepAlive: true,
+        _title:'运输任务添加'
+      },
+      hidden: true
+    },
+    //运输编辑
+    {
+      path: 'tranManagementTransportEdit',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/taskManagement/tranManagementTransportEdit'),
+      name: 'tranManagementTransportEdit',
+      meta: {
+        title: 'tranManagementTransportEdit',
+        shortcutEntrance: 'tranManagement',
+        module: 'transportationTask.transportation.transportationInfo.view',
+        permissicon: [],
+        keepAlive: true,
+        _title:'运输任务编辑'
+      },
+      hidden: true
+
+    },
+    //移库任务
+    {
+      path: 'moveWarehouseTask',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/taskManagement/moveWarehouseTask'),
+      name: 'moveWarehouseTask',
+      meta: {
+        title: 'moveWarehouseTask',
+        shortcutEntrance: 'tranManagement',
+        module: 'warehouseManagement.warehouse.warehouseInfoTask',
+        permissicon: [],
+        keepAlive: true,
+        _title:'移库任务'
+      },
+    },
+    //移库查看 
+    {
+      path: 'moveWarehouseTaskLook',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/taskManagement/moveWarehouseTaskLook'),
+      name: 'moveWarehouseTaskLook',
+      meta: {
+        title: 'moveWarehouseTaskLook',
+        shortcutEntrance: 'tranManagement',
+        module: 'warehouseManagement.warehouse.warehouseInfoTask',
+        _title:'移库任务查看'
+      },
+      hidden: true,
+    },
+    
 
   ],
 

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

@@ -175,7 +175,7 @@
           </el-table-column>
           <el-table-column prop="transportLoss" label="累计运输损耗(吨)">
             <template scope="scope">
-              {{ scope.row.weightOut - scope.row.weightIn - Number(count)}}
+              {{ Number(scope.row.weightOut - scope.row.weightIn - Number(count)).toFixed(2)}}
             </template>
           </el-table-column>
         </el-table>

+ 33 - 2
src/views/taskManagement/supplyofgoods.vue

@@ -14,12 +14,19 @@
 		</el-row>
     <BaseHeaderLayout :leftSpan="16">
       <template slot="left">
-          <div style='width:50%;margin-right:10px;'>
+          <div style='width:40%;margin-right:10px;'>
             <el-date-picker v-model="value2" type="daterange" align="right" unlink-panels range-separator="至"
           start-placeholder="开始日期" value-format='yyyy-MM-dd' end-placeholder="结束日期" @change='datechange' :picker-options="pickerOptions">
         </el-date-picker>
-  
           </div>
+          <div style='width:50%;margin-right:10px;display: flex;'>
+          <el-select v-model="goodsName" filterable placeholder="" @change="goodsNameChange" 
+            style="margin: 0 10px">
+            <el-option key="全部货名" label="全部货名" value="0" style="color: #8890b1" />
+            <el-option v-for="(item,index) in goodsList" :key="item.id" :label="item.constValue"
+              :value="(index+1)" style="color: #8890b1" />
+          </el-select>
+        </div>
         <ws-button :type="flag==0?'primary':''" @click="costsort(0)">按日期排序
         </ws-button>
         <ws-button :type="flag==1?'primary':''" @click="costsort(1)">按成本排序
@@ -94,6 +101,9 @@
     fmoney,
     EventBus
   } from 'base-core-lib'
+  import {
+    packList,
+  } from '@/model/contarct/index'
 // import { toFixed } from 'xe-utils/methods'
   export default {
     name: 'viewSpareMoney',
@@ -111,6 +121,7 @@
     },
     data() {
       return {
+        
         //弹出框
         dialogViewSpareMoney: false,
         dialogApproveFormVisible: false,
@@ -123,6 +134,8 @@
         showType: true,
         // 年
         year: '',
+        goodsName:'0',
+        goodsList:[],
         gainList: [],
         gainList1:[],
         flag:0,
@@ -193,6 +206,7 @@
         type:0,
         warehouseName: '',
         baseId:'',
+        goodsName1:'',
         deptBudgetTotal: 0,
         compId: localStorage.getItem('ws-pf_compId'),
         deptCircularPage: {},
@@ -210,12 +224,26 @@
       // this.showType = this.isShow
     // },
     mounted() {
+      packList({
+            constId: 'CON2',
+          })
+          .toPromise()
+          .then((response) => {
+            this.goodsList = response
+          })
       this.getNowTime()
       this.baseId=this.$route.query.baseId
       
       this.showType = this.isShow
     },
     methods: {
+      goodsNameChange(e){
+        console.log(e)
+        if(e!=0){
+          this.goodsName1=this.goodsList[e-1].constValue
+        }
+        this.getList()
+      },
       selectinOutType(){
         this.getList()
       },
@@ -231,6 +259,7 @@
             pageSize: this.pageSize,
             searchType: this.searchType,
             searchKeyWord: this.searchKeyWord,
+            
             // inOutType:this.inOutType,
             baseId:this.baseId,
             flag:this.flag
@@ -338,6 +367,7 @@
       getList() {
         this.startDate=this.value2[0]
         this.endDate=this.value2[1]
+        
          getSourceOfGoodsinfo({
             compId: localStorage.getItem('ws-pf_compId'),
             currentPage: this.currentPage,
@@ -345,6 +375,7 @@
             startDate:this.startDate,
             endDate:this.endDate,
             searchType: this.searchType,
+            goodsName:this.goodsName==0?'':this.goodsName1,
             searchKeyWord: this.searchKeyWord,
             // inOutType:this.inOutType,
             baseId:this.baseId,

+ 77 - 5
src/views/taskManagement/tranManagementWarehouseInOutTaskAdd.vue

@@ -548,6 +548,7 @@
 					}
 					if(localStorage.getItem('goodsName')){
 						this.dataList.goodsName=localStorage.getItem('goodsName')
+						this.dataList.goodsNameKey=localStorage.getItem('goodsName')
 					}
 					getstaff({compId: localStorage.getItem('ws-pf_compId'),warehouseId: this.dataList.warehouseId})
 					.toPromise()
@@ -580,6 +581,16 @@
 						//  this.agent = response
 					})
 					this.dataList1.contractNo=localStorage.getItem('contractNo')
+					if(this.dataList.taskTypeKey==2){
+						if(localStorage.getItem('goodsName')){
+							this.dataList1.goodsName=localStorage.getItem('goodsName')
+							this.dataList1.goodsNameKey=localStorage.getItem('goodsNameKey')
+						}
+						if(localStorage.getItem('weight')){
+							this.dataList1.weight=localStorage.getItem('weight')
+						}
+					}
+					
 				}
 			}
 			if(localStorage.getItem('supplygoods1')){
@@ -884,11 +895,13 @@
 				}
 			},
 			changecontract1(e) {
+				localStorage.setItem('contractNo',e)
 				if (this.dataList1.taskTypeKey != 3) {
 					for (let i = 0; i < this.contractNoList1.length; i++) {
 						if (this.contractNoList1[i].contractNo == e) {
 							if(this.dataList1.inOutType=='收购入库'){
 								this.dataList1.weight=this.contractNoList1[i].weight
+								localStorage.setItem('weight',this.contractNoList1[i].weight)
 							}
 							this.inOutType=this.contractNoList1[i].inOutType
 							if(this.contractNoList1[i].priceType == '随行就市'){
@@ -902,6 +915,8 @@
 								})
 								.toPromise()
 								.then(response => {
+									localStorage.setItem('goodsName',response.goodsName)
+									localStorage.setItem('goodsNameKey',response.goodsNameKey)
 									this.$set(this.dataList1, 'goodsName', response.goodsName)
 									this.$set(this.dataList1, 'goodsNameKey', response.goodsNameKey)
 									this.$set(this.dataList1, 'grade', response.grade)
@@ -919,6 +934,7 @@
 										})
 									}else{
 										this.$set(this.dataList1, 'weight', response.weight)
+										localStorage.setItem('weight',response.weight)
 									}
 									this.$set(
 										this.dataList1,
@@ -1548,6 +1564,12 @@
 				localStorage.removeItem('warehouse')
 				localStorage.removeItem('contractNo');
             	localStorage.removeItem('taskTypeKey');
+				localStorage.removeItem('inOutType')
+				localStorage.removeItem('inOutTypeKey')
+				localStorage.removeItem('contractNo')
+				localStorage.removeItem('goodsName')
+				localStorage.removeItem('goodsNameKey')
+				localStorage.removeItem('weight')
 				// this.dataList.goodsNameKey =
 				// this.dataList.positionId =
 				// this.dataList.baseId =
@@ -1621,6 +1643,7 @@
 				}
 			},
 			selectgoodsName(e) {
+
 				for (var i = 0; i < this.goodnameList.length; i++) {
 					if (this.goodnameList[i].constValue == e) {
 						this.dataList.goodsNameKey = this.goodnameList[i].constKey
@@ -1697,9 +1720,11 @@
 						this.flag = 5
 						break
 				}
+				localStorage.setItem('inOutType',e)
 				for (var i = 0; i < this.storageType1.length; i++) {
 					if (this.storageType1[i].constValue == e) {
 						this.dataList1.inOutTypeKey = this.storageType1[i].constKey
+						localStorage.setItem('inOutTypeKey',this.storageType1[i].constKey)
 					}
 				}
 			},
@@ -1720,6 +1745,25 @@
 				this.getList()
 			},
 			tasknumber() {
+				console.log(this.dataList.taskTypeKey)
+				if (this.dataList.taskTypeKey == 1) {
+					this.inOutTaskNo = 'CK' + this.getdate() + this.MathRand()
+				} else if (this.dataList.taskTypeKey == 2) {
+					this.inOutTaskNo1 = 'RK' + this.getdate() + this.MathRand()
+				} else if (this.dataList.taskTypeKey == 3) {
+					var random = this.getdate() + this.MathRand()
+					this.inOutTaskNo = 'YKC' + random
+					this.inOutTaskNo1 = 'YKR' + random
+        //   this.dataList.moveTaskNo = 'YKRW' + random
+		//    this.dataList1.moveTaskNo = 'YKRW' + random
+				} else if (this.dataList.taskTypeKey == 4) {
+					var random = this.getdate() + this.MathRand()
+					this.inOutTaskNo = 'TCC' + random
+					this.inOutTaskNo1 = 'TCR' + random
+				}
+			},
+			tasknumber1() {
+				console.log(this.dataList.taskTypeKey)
 				if (this.dataList.taskTypeKey == 1) {
 					this.inOutTaskNo = 'CK' + this.getdate() + this.MathRand()
 				} else if (this.dataList.taskTypeKey == 2) {
@@ -1735,10 +1779,22 @@
 					this.inOutTaskNo = 'TCC' + random
 					this.inOutTaskNo1 = 'TCR' + random
 				}
+				localStorage.removeItem('warehouse')
+				localStorage.removeItem('contractNo');
+            	localStorage.removeItem('taskTypeKey');
+				localStorage.removeItem('inOutType')
+				localStorage.removeItem('inOutTypeKey')
+				localStorage.removeItem('contractNo')
+				localStorage.removeItem('goodsName')
+				localStorage.removeItem('goodsNameKey')
+				localStorage.removeItem('weight')
 			},
 			tasktypechange(e) {
+				localStorage.setItem('taskTypeKey',e)
+				console.log('localStorage.getItem(\'taskTypeKey\')',localStorage.getItem('taskTypeKey'))
+				
 				if (!this.$route.query.relevanceId) {
-					this.tasknumber()
+					this.tasknumber1()
 				}
 				this.dataList1.taskTypeKey = e
 				if (this.dataList.taskTypeKey == 1) {
@@ -1772,18 +1828,33 @@
 				return Min + Math.round(Rand * Range)
 			},
 			getList() {
+				if(localStorage.getItem('taskTypeKey')){
+					this.dataList.taskTypeKey =localStorage.getItem('taskTypeKey')
+				}
 				this.tasknumber()
 				if(localStorage.getItem('taskTypeKey')){
 					if(localStorage.getItem('taskTypeKey') == 1){
-						this.$set(this.dataList, 'inOutType', '销售出库')
-						this.$set(this.dataList, 'inOutTypeKey', '1')
+						if(localStorage.getItem('inOutType')){
+							this.$set(this.dataList, 'inOutType', localStorage.getItem('inOutType'))
+							this.$set(this.dataList, 'inOutTypeKey', localStorage.getItem('inOutTypeKey'))
+						}else{
+							this.$set(this.dataList, 'inOutType', '销售出库')
+							this.$set(this.dataList, 'inOutTypeKey', '1')
+						}
 						this.$set(this.dataList, 'goodsName', '玉米')
 						this.$set(this.dataList, 'goodsNameKey', '1')
 						this.$set(this.dataList1, 'goodsName', '玉米')
 						this.$set(this.dataList1, 'goodsNameKey', '1')
+						this.flag = 1
 					}else if(localStorage.getItem('taskTypeKey') == 2){
-						this.$set(this.dataList1, 'inOutType', '采购入库')
-						this.$set(this.dataList1, 'inOutTypeKey', '2')
+						if(localStorage.getItem('inOutType')){
+							this.$set(this.dataList1, 'inOutType', localStorage.getItem('inOutType'))
+							this.$set(this.dataList1, 'inOutTypeKey', localStorage.getItem('inOutTypeKey'))
+						}else{
+							this.$set(this.dataList1, 'inOutType', '采购入库')
+							this.$set(this.dataList1, 'inOutTypeKey', '2')
+						}
+						this.flag = 8
 					}else if(localStorage.getItem('taskTypeKey') == 3){
 						this.$set(this.dataList, 'inOutType', '移库出库')
 						this.$set(this.dataList, 'inOutTypeKey', '3')
@@ -1794,6 +1865,7 @@
 						this.$set(this.dataList, 'inOutTypeKey', '4')
 						this.$set(this.dataList1, 'inOutType', '退库')
 						this.$set(this.dataList1, 'inOutTypeKey', '4')
+						this.flag = 2
 					}
 					this.$set(this.dataList, 'grade', '一等品')
 					this.$set(this.dataList, 'gradeKey', '1')

+ 16 - 0
src/views/tranManagement/component/routers/route.js

@@ -206,6 +206,22 @@ const tranManagementRouter = {
       },
       hidden: true
     },
+    //汽车调度历史
+    {
+      path: 'vehicleDispatching/historycar',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/tranManagement/tranManagementVehicleDispatchinghistory'),
+      name: 'vehicleDispatchinghistorycar',
+      meta: {
+        title: 'tranManagementVehicleDispatching',
+        shortcutEntrance: 'transportationTask',
+        module: 'tranManager.vehicleDispatching.car',
+        permissicon: [],
+        keepAlive: true,
+        _title:'汽车调度历史'
+      },
+      hidden: true
+    },
     //查看派车详情
     {
       path: 'vehicleDispatching/view',

+ 110 - 94
src/views/tranManagement/tranManagementVehicleDispatching.vue

@@ -6,6 +6,8 @@
         <h2 class="bg-left title">汽车调度</h2>
       </el-col>
       <el-col :span="4" class="bg-right">
+        <el-button class="bg-bottom" type="primary" size="small" @click="history()">历史司机车队
+        </el-button>
         <el-button class="bg-bottom" type="primary" size="small" @click="revert()"><img width="6" height="10"
             style="vertical-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
         </el-button>
@@ -148,7 +150,7 @@
                                carchange(val, item.tranCarIndex)
                              }
                            ">
-                    <el-option v-for="(items, index) in carList" :key="index" :label="items.driverName"
+                    <el-option v-for="(items) in carList" :key="items.id" :label="items.driverName"
                       :value="items.driverName" />
                   </el-select>
                   <span v-show="
@@ -165,7 +167,7 @@
                                  phonechange(val, item.tranCarIndex)
                                }
                              ">
-                    <el-option v-for="(items, index) in carList" :key="items.id" :label="items.driverPhone"
+                    <el-option v-for="(items) in carList" :key="items.id" :label="items.driverPhone"
                       :value="items.driverPhone" />
                   </el-select>
                   <span v-show="
@@ -176,15 +178,16 @@
               </el-col>
               <el-col :span="8">
                 <el-form-item label="车牌号:" span="1" prop="carNo" label-width="125px">
-                  <el-select :disabled="item.id?true:false" v-model="item.carNo" placeholder="请选择车牌号"
+                  <el-select v-if="!item.id" v-model="item.carNo" placeholder="请选择车牌号"
                     filterable clearable @clear="clear" class="row-item" @change="
                                (val) => {
                                  carNochange(val, item.tranCarIndex)
                                }
                              ">
-                    <el-option v-for="(items, index) in carNoList" :key="items.id" :label="items.carNumber"
+                    <el-option v-for="(items) in carNoList" :key="items.id" :label="items.carNumber"
                       :value="items.carNumber" />
                   </el-select>
+                  <span v-else>{{ item.carNo }}</span>
                   <!-- <el-input :disabled="readonly" v-model="item.carNo" placeholder="" maxlength="120" size="small" /> -->
                 </el-form-item>
               </el-col>
@@ -354,12 +357,14 @@
     },
     computed: {
       total: function() {
-        if (this.deptBudgetList.tranCarInfoList.length > 0) {
+        
+        if (this.deptBudgetList.tranCarInfoList1&&this.deptBudgetList.tranCarInfoList1.length > 0&&this.deptBudgetList.tranCarInfoList&&this.deptBudgetList.tranCarInfoList.length > 0) {
+          var arr=this.deptBudgetList.tranCarInfoList.concat(this.deptBudgetList.tranCarInfoList1)
           var maxStorage = 0
-          for (var i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
-            if(this.deptBudgetList.tranCarInfoList[i].loadWeight){
+          for (var i = 0; i < arr.length; i++) {
+            if(arr[i].loadWeight){
               maxStorage += Number(
-                this.deptBudgetList.tranCarInfoList[i].loadWeight
+                arr[i].loadWeight
               )
             }
             
@@ -368,24 +373,24 @@
         }
       },
       teamlist: function() {
-        if (this.deptBudgetList.tranCarInfoList.length > 0) {
+        if (this.deptBudgetList.tranCarInfoList1&&this.deptBudgetList.tranCarInfoList1.length > 0) {
           var arr = []
-          for (var i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
-            if(this.deptBudgetList.tranCarInfoList[i].fleetFlag==1){
-              this.deptBudgetList.tranCarInfoList[i].tranCarIndex=i
-              arr.push(this.deptBudgetList.tranCarInfoList[i])
+          for (var i = 0; i < this.deptBudgetList.tranCarInfoList1.length; i++) {
+            if(this.deptBudgetList.tranCarInfoList1[i].fleetFlag==1){
+              this.deptBudgetList.tranCarInfoList1[i].tranCarIndex=i
+              arr.push(this.deptBudgetList.tranCarInfoList1[i])
             }
           }
           return arr
         }
       },
       driverlist: function() {
-        if (this.deptBudgetList.tranCarInfoList.length > 0) {
+        if (this.deptBudgetList.tranCarInfoList1&&this.deptBudgetList.tranCarInfoList1.length > 0) {
           var arr = []
-          for (var i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
-            if(this.deptBudgetList.tranCarInfoList[i].fleetFlag==0){
-              this.deptBudgetList.tranCarInfoList[i].tranCarIndex=i
-              arr.push(this.deptBudgetList.tranCarInfoList[i])
+          for (var i = 0; i < this.deptBudgetList.tranCarInfoList1.length; i++) {
+            if(this.deptBudgetList.tranCarInfoList1[i].fleetFlag==0){
+              this.deptBudgetList.tranCarInfoList1[i].tranCarIndex=i
+              arr.push(this.deptBudgetList.tranCarInfoList1[i])
             }
           }
           return arr
@@ -393,6 +398,11 @@
       },
     },
     methods: {
+      history(){
+        this.$router.push({name:'vehicleDispatchinghistorycar',query: {
+            id: this.$route.query.id,
+          },})
+      },
       withdraw() {
       this.$confirm(`撤回成功后,可再次提交,确定撤回该单价吗?`, {
         cancelButtonText: '取消',
@@ -412,14 +422,14 @@
       pricetypechange(e){
         console.log(e)
         this.deptBudgetList.billingMethod=e
-        if (this.deptBudgetList.tranCarInfoList.length > 0) {
-          for (var i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
-           if(!this.deptBudgetList.tranCarInfoList[i].id){
-             this.deptBudgetList.tranCarInfoList[i].billingMethod=e
+        if (this.deptBudgetList.tranCarInfoList1.length > 0) {
+          for (var i = 0; i < this.deptBudgetList.tranCarInfoList1.length; i++) {
+           if(!this.deptBudgetList.tranCarInfoList1[i].id){
+             this.deptBudgetList.tranCarInfoList1[i].billingMethod=e
              if(e==1){
-               this.deptBudgetList.tranCarInfoList[i].tranPrice=this.deptBudgetList.tranPrice
+               this.deptBudgetList.tranCarInfoList1[i].tranPrice=this.deptBudgetList.tranPrice
              }else{
-               this.deptBudgetList.tranCarInfoList[i].tranPrice=this.deptBudgetList.tranPriceCar
+               this.deptBudgetList.tranCarInfoList1[i].tranPrice=this.deptBudgetList.tranPriceCar
              }
            }
           }
@@ -440,27 +450,27 @@
       del(index, row,status) {
         if (row.status == null) {
           if(status==1){
-            if (this.deptBudgetList.tranCarInfoList.length > 1) {
-              for (let i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
-                console.log(this.deptBudgetList.tranCarInfoList[i])
-                if(this.deptBudgetList.tranCarInfoList[i].index){
-                  if(this.deptBudgetList.tranCarInfoList[i].index==row.index){
-                    this.deptBudgetList.tranCarInfoList.splice(i, 1)
+            if (this.deptBudgetList.tranCarInfoList1.length > 1) {
+              for (let i = 0; i < this.deptBudgetList.tranCarInfoList1.length; i++) {
+                console.log(this.deptBudgetList.tranCarInfoList1[i])
+                if(this.deptBudgetList.tranCarInfoList1[i].index){
+                  if(this.deptBudgetList.tranCarInfoList1[i].index==row.index){
+                    this.deptBudgetList.tranCarInfoList1.splice(i, 1)
                   }
                 }
               }
             }
           }else{
-            if (this.deptBudgetList.tranCarInfoList.length > 1) {
-              this.deptBudgetList.tranCarInfoList.splice(index, 1)
-              for (let i = index; i < this.deptBudgetList.tranCarInfoList.length; i++) {
-                let number = Number(this.deptBudgetList.tranCarInfoList[i].tranCarNo.split('C')[1]) - 1
+            if (this.deptBudgetList.tranCarInfoList1.length > 1) {
+              this.deptBudgetList.tranCarInfoList1.splice(index, 1)
+              for (let i = index; i < this.deptBudgetList.tranCarInfoList1.length; i++) {
+                let number = Number(this.deptBudgetList.tranCarInfoList1[i].tranCarNo.split('C')[1]) - 1
                 if (number < 10) {
-                  this.deptBudgetList.tranCarInfoList[i].tranCarNo = 'C00' + number
+                  this.deptBudgetList.tranCarInfoList1[i].tranCarNo = 'C00' + number
                 } else if (number < 100) {
-                  this.deptBudgetList.tranCarInfoList[i].tranCarNo = 'C0' + number
+                  this.deptBudgetList.tranCarInfoList1[i].tranCarNo = 'C0' + number
                 } else {
-                  this.deptBudgetList.tranCarInfoList[i].tranCarNo = 'C' + number
+                  this.deptBudgetList.tranCarInfoList1[i].tranCarNo = 'C' + number
                 }
               }
             }
@@ -478,8 +488,8 @@
               .toPromise()
               .then((response) => {
                 this.$message.success('删除成功')
-                if (this.deptBudgetList.tranCarInfoList.length > 1) {
-                  this.deptBudgetList.tranCarInfoList.splice(index, 1)
+                if (this.deptBudgetList.tranCarInfoList1.length > 1) {
+                  this.deptBudgetList.tranCarInfoList1.splice(index, 1)
                 }
                 this.getList()
               })
@@ -494,10 +504,10 @@
               type: 'warning',
             })
           } else {
-              this.deptBudgetList.tranCarInfoList.push({
+              this.deptBudgetList.tranCarInfoList1.push({
                 fleetName:'',
                 fleetFlag:1,
-                index:this.deptBudgetList.tranCarInfoList.length,
+                index:this.deptBudgetList.tranCarInfoList1.length,
                 billingMethod:this.pricetype,
                 tranPrice:this.deptBudgetList.tranPrice,
                 tranType: '1',
@@ -510,10 +520,10 @@
               type: 'warning',
             })
           } else {
-              this.deptBudgetList.tranCarInfoList.push({
+              this.deptBudgetList.tranCarInfoList1.push({
                 fleetName:'',
                 fleetFlag:1,
-                index:this.deptBudgetList.tranCarInfoList.length,
+                index:this.deptBudgetList.tranCarInfoList1.length,
                 billingMethod:this.pricetype,
                 tranPrice:this.deptBudgetList.tranPriceCar,
                 tranType: '1',
@@ -523,6 +533,7 @@
          
       },
       add() {
+
         if(this.pricetype==1){
           if (!this.deptBudgetList.tranPrice) {
             this.$message({
@@ -532,8 +543,9 @@
           } else {
             var tmp1 = 'C00'
             this.deptBudgetList.count++
-            if (this.deptBudgetList.tranCarInfoList.length < 10) {
-              this.deptBudgetList.tranCarInfoList.push({
+            console.log(this.deptBudgetList.tranCarInfoList,this.deptBudgetList.tranCarInfoList1.length)
+            if ((this.deptBudgetList.tranCarInfoList.length+this.deptBudgetList.tranCarInfoList1.length) < 10) {
+              this.deptBudgetList.tranCarInfoList1.push({
                 driverName: '',
                 driverPhone: '',
                 carLength: 0,
@@ -548,14 +560,14 @@
                 tranPriceCar:this.deptBudgetList.tranPriceCar,
                 billingMethod:this.pricetype,
                 // tranCarNo: tmp1+(this.deptBudgetList.count),
-                tranCarNo: 'C00' + (this.deptBudgetList.tranCarInfoList.length + 1),
+                tranCarNo: 'C00' + (this.deptBudgetList.tranCarInfoList.length+this.deptBudgetList.tranCarInfoList1.length+1),
                 tranPrice: this.deptBudgetList.tranPrice
               })
-            } else if (this.deptBudgetList.tranCarInfoList.length < 100 && this.deptBudgetList.tranCarInfoList.length >=
+            } else if ((this.deptBudgetList.tranCarInfoList.length+this.deptBudgetList.tranCarInfoList1.length) < 100 && (this.deptBudgetList.tranCarInfoList.length+this.deptBudgetList.tranCarInfoList1.length) >=
               10) {
               tmp1 = 'C0'
               this.deptBudgetList.count++
-              this.deptBudgetList.tranCarInfoList.push({
+              this.deptBudgetList.tranCarInfoList1.push({
                 driverName: '',
                 driverPhone: '',
                 carLength: 0,
@@ -570,14 +582,15 @@
                 tranPriceCar:this.deptBudgetList.tranPriceCar,
                 billingMethod:this.pricetype,
                 // tranCarNo: tmp1+(this.deptBudgetList.count),
-                tranCarNo: 'C0' + (this.deptBudgetList.tranCarInfoList.length + 1),
+                tranCarNo: 'C0' + (this.deptBudgetList.tranCarInfoList.length+this.deptBudgetList.tranCarInfoList1.length+1),
                 tranPrice: this.deptBudgetList.tranPrice
               })
-            } else if (this.deptBudgetList.tranCarInfoList.length < 1000 && this.deptBudgetList.tranCarInfoList.length >=
+            } else if ((this.deptBudgetList.tranCarInfoList.length+this.deptBudgetList.tranCarInfoList1.length) < 1000 && (this.deptBudgetList.tranCarInfoList.length+this.deptBudgetList.tranCarInfoList1.length) >=
               100) {
+                console.log(111111)
               tmp1 = 'C'
               this.deptBudgetList.count++
-              this.deptBudgetList.tranCarInfoList.push({
+              this.deptBudgetList.tranCarInfoList1.push({
                 driverName: '',
                 driverPhone: '',
                 carLength: 0,
@@ -592,7 +605,7 @@
                 billingMethod:this.pricetype,
                 tranPriceCar:this.deptBudgetList.tranPriceCar,
                 // tranCarNo: tmp1+(this.deptBudgetList.count),
-                tranCarNo: 'C' + (this.deptBudgetList.tranCarInfoList.length + 1),
+                tranCarNo: 'C' + (this.deptBudgetList.tranCarInfoList.length+this.deptBudgetList.tranCarInfoList1.length+1),
                 tranPrice: this.deptBudgetList.tranPrice
               })
             }
@@ -606,8 +619,8 @@
           } else {
             var tmp1 = 'C00'
             this.deptBudgetList.count++
-            if (this.deptBudgetList.tranCarInfoList.length < 10) {
-              this.deptBudgetList.tranCarInfoList.push({
+            if ((this.deptBudgetList.tranCarInfoList.length+this.deptBudgetList.tranCarInfoList1.length) < 10) {
+              this.deptBudgetList.tranCarInfoList1.push({
                 driverName: '',
                 driverPhone: '',
                 carLength: 0,
@@ -622,14 +635,14 @@
                 tranPriceCar:this.deptBudgetList.tranPriceCar,
                 billingMethod:this.pricetype,
                 // tranCarNo: tmp1+(this.deptBudgetList.count),
-                tranCarNo: 'C00' + (this.deptBudgetList.tranCarInfoList.length + 1),
+                tranCarNo: 'C00' + (this.deptBudgetList.tranCarInfoList.length+this.deptBudgetList.tranCarInfoList1.length+1),
                 tranPrice: this.deptBudgetList.tranPrice
               })
-            } else if (this.deptBudgetList.tranCarInfoList.length < 100 && this.deptBudgetList.tranCarInfoList.length >=
+            } else if ((this.deptBudgetList.tranCarInfoList.length+this.deptBudgetList.tranCarInfoList1.length) < 100 && (this.deptBudgetList.tranCarInfoList.length+this.deptBudgetList.tranCarInfoList1.length) >=
               10) {
               tmp1 = 'C0'
               this.deptBudgetList.count++
-              this.deptBudgetList.tranCarInfoList.push({
+              this.deptBudgetList.tranCarInfoList1.push({
                 driverName: '',
                 driverPhone: '',
                 carLength: 0,
@@ -644,14 +657,14 @@
                 tranPriceCar:this.deptBudgetList.tranPriceCar,
                 billingMethod:this.pricetype,
                 // tranCarNo: tmp1+(this.deptBudgetList.count),
-                tranCarNo: 'C0' + (this.deptBudgetList.tranCarInfoList.length + 1),
+                tranCarNo: 'C0' + (this.deptBudgetList.tranCarInfoList.length+this.deptBudgetList.tranCarInfoList1.length+1),
                 tranPrice: this.deptBudgetList.tranPrice
               })
-            } else if (this.deptBudgetList.tranCarInfoList.length < 1000 && this.deptBudgetList.tranCarInfoList.length >=
+            } else if ((this.deptBudgetList.tranCarInfoList.length+this.deptBudgetList.tranCarInfoList1.length) < 1000 && (this.deptBudgetList.tranCarInfoList.length+this.deptBudgetList.tranCarInfoList1.length) >=
               100) {
               tmp1 = 'C'
               this.deptBudgetList.count++
-              this.deptBudgetList.tranCarInfoList.push({
+              this.deptBudgetList.tranCarInfoList1.push({
                 driverName: '',
                 driverPhone: '',
                 carLength: 0,
@@ -666,7 +679,7 @@
                 billingMethod:this.pricetype,
                 tranPriceCar:this.deptBudgetList.tranPriceCar,
                 // tranCarNo: tmp1+(this.deptBudgetList.count),
-                tranCarNo: 'C' + (this.deptBudgetList.tranCarInfoList.length + 1),
+                tranCarNo: 'C' + (this.deptBudgetList.tranCarInfoList.length+this.deptBudgetList.tranCarInfoList1.length+1),
                 tranPrice: this.deptBudgetList.tranPrice
               })
             }
@@ -780,22 +793,22 @@
           })
           return
         } else {
-          for (var i = this.index; i < this.deptBudgetList.tranCarInfoList.length; i++) {
-            if (!this.deptBudgetList.tranCarInfoList[i].driver&&this.deptBudgetList.tranCarInfoList[i].fleetFlag==0) {
+          for (var i = this.index; i < this.deptBudgetList.tranCarInfoList1.length; i++) {
+            if (!this.deptBudgetList.tranCarInfoList1[i].driver&&this.deptBudgetList.tranCarInfoList1[i].fleetFlag==0) {
               this.$message({
                 message: '姓名不能为空!',
                 type: 'warning',
               })
               return
             }
-            if (!this.deptBudgetList.tranCarInfoList[i].fleetName&&this.deptBudgetList.tranCarInfoList[i].fleetFlag==1) {
+            if (!this.deptBudgetList.tranCarInfoList1[i].fleetName&&this.deptBudgetList.tranCarInfoList1[i].fleetFlag==1) {
               this.$message({
                 message: '车队名称不能为空!',
                 type: 'warning',
               })
               return
             }
-            if (this.deptBudgetList.tranCarInfoList[i].fleetName&&this.deptBudgetList.tranCarInfoList[i].fleetName.length<1&&this.deptBudgetList.tranCarInfoList[i].fleetFlag==1||this.deptBudgetList.tranCarInfoList[i].fleetName&&this.deptBudgetList.tranCarInfoList[i].fleetName.length>10&&this.deptBudgetList.tranCarInfoList[i].fleetFlag==1) {
+            if (this.deptBudgetList.tranCarInfoList1[i].fleetName&&this.deptBudgetList.tranCarInfoList1[i].fleetName.length<1&&this.deptBudgetList.tranCarInfoList1[i].fleetFlag==1||this.deptBudgetList.tranCarInfoList1[i].fleetName&&this.deptBudgetList.tranCarInfoList1[i].fleetName.length>10&&this.deptBudgetList.tranCarInfoList1[i].fleetFlag==1) {
               this.$message({
                 message: '车队名称1-10个字!',
                 type: 'warning',
@@ -803,7 +816,7 @@
               return
             }
             for (var j = 0; j < this.carList.length; j++) {
-              if (this.carList[j].driverName == this.deptBudgetList.tranCarInfoList[i].driver && this.carList[j]
+              if (this.carList[j].driverName == this.deptBudgetList.tranCarInfoList1[i].driver && this.carList[j]
                 .disableStatusFlag == 1) {
                 this.$message({
                   message: this.deptBudgetList.tranCarInfoList[i].driver + '该司机已被禁用!',
@@ -827,7 +840,7 @@
                   tranCarInfo.tranPrice = this.deptBudgetList.tranPrice
                   tranCarInfo.infoId = this.deptBudgetList.infoId
                   tranCarInfo.billingMethod=this.pricetype
-                  tranCarInfo.tranCarInfoList = this.deptBudgetList.tranCarInfoList
+                  tranCarInfo.tranCarInfoList = this.deptBudgetList.tranCarInfoList.concat(this.deptBudgetList.tranCarInfoList1)
                   dispatchCat(tranCarInfo)
                     .toPromise()
                     .then((response) => {
@@ -875,8 +888,12 @@
             if (this.deptBudgetList.tranPriceIng == 0) {
               this.deptBudgetList.tranPriceIng = ''
             }
-            if (this.deptBudgetList.tranCarInfoList.length == 0) {
-              this.deptBudgetList.tranCarInfoList = [{
+            var carno='0000'
+            if (this.deptBudgetList.tranCarInfoList) {
+              var len=carno+Number(this.deptBudgetList.tranCarInfoList.length+1)
+              carno='C'+(len.substring(len.length-3))
+            }
+            this.deptBudgetList.tranCarInfoList1 = [{
                 driverName: '',
                 driverPhone: '',
                 carLength: 0,
@@ -888,11 +905,10 @@
                 disabled: false,
                 fleetFlag:0,
                 tranType: '1',
-                tranCarNo: 'C001',
+                tranCarNo: carno,
                 billingMethod:1,
                 tranPrice: this.deptBudgetList.tranPrice
               }, ]
-            }
           })
         nameXiala({
             compId: this.compId
@@ -913,29 +929,29 @@
       carchange(val, index) {
         for (var i = 0; i < this.carList.length; i++) {
           if (this.carList[i].driverName == val) {
-            this.deptBudgetList.tranCarInfoList[index].driverPhone =
+            this.deptBudgetList.tranCarInfoList1[index].driverPhone =
               this.carList[i].driverPhone
             arrange({
                 id: this.carList[i].id
               })
               .toPromise()
               .then((response) => {
-                console.log(index,this.deptBudgetList.tranCarInfoList)
-                this.deptBudgetList.tranCarInfoList[index].carNo =
+                console.log(index,this.deptBudgetList.tranCarInfoList1)
+                this.deptBudgetList.tranCarInfoList1[index].carNo =
                   response.carNumber
                 if (response.carLoad != null) {
-                  this.deptBudgetList.tranCarInfoList[index].loadWeight =
+                  this.deptBudgetList.tranCarInfoList1[index].loadWeight =
                     response.carLoad
                 } else {
-                  this.deptBudgetList.tranCarInfoList[index].loadWeight = 0
+                  this.deptBudgetList.tranCarInfoList1[index].loadWeight = 0
                 }
-                this.deptBudgetList.tranCarInfoList[index].carModel =
+                this.deptBudgetList.tranCarInfoList1[index].carModel =
                   response.carModel
-                this.deptBudgetList.tranCarInfoList[index].carLength =
+                this.deptBudgetList.tranCarInfoList1[index].carLength =
                   response.carLength
-                this.deptBudgetList.tranCarInfoList[index].carLengthKey =
+                this.deptBudgetList.tranCarInfoList1[index].carLengthKey =
                   response.carLengthKey
-                this.deptBudgetList.tranCarInfoList[index].carModelKey =
+                this.deptBudgetList.tranCarInfoList1[index].carModelKey =
                   response.carModelKey
                   this.$forceUpdate()
               })
@@ -950,18 +966,18 @@
           if (this.carNoList[i].carNumber == val) {
             console.log(this.carNoList[i])
             if (this.carNoList[i].carLoad != null) {
-                  this.deptBudgetList.tranCarInfoList[index].loadWeight =
+                  this.deptBudgetList.tranCarInfoList1[index].loadWeight =
                   this.carNoList[i].carLoad
                 } else {
-                  this.deptBudgetList.tranCarInfoList[index].loadWeight = 0
+                  this.deptBudgetList.tranCarInfoList1[index].loadWeight = 0
                 }
-                this.deptBudgetList.tranCarInfoList[index].carModel =
+                this.deptBudgetList.tranCarInfoList1[index].carModel =
                 this.carNoList[i].carModel
-                this.deptBudgetList.tranCarInfoList[index].carLength =
+                this.deptBudgetList.tranCarInfoList1[index].carLength =
                 this.carNoList[i].carLength
-                this.deptBudgetList.tranCarInfoList[index].carLengthKey =
+                this.deptBudgetList.tranCarInfoList1[index].carLengthKey =
                 this.carNoList[i].carLengthKey
-                this.deptBudgetList.tranCarInfoList[index].carModelKey =
+                this.deptBudgetList.tranCarInfoList1[index].carModelKey =
                 this.carNoList[i].carModelKey
             getdriverinfo({
               carNumber: this.carNoList[i].carNumber
@@ -977,7 +993,7 @@
       phonechange(val, index) {
         for (var i = 0; i < this.carList.length; i++) {
           if (this.carList[i].driverPhone == val) {
-            this.deptBudgetList.tranCarInfoList[index].driver =
+            this.deptBudgetList.tranCarInfoList1[index].driver =
               this.carList[i].driverName
             arrange({
                 id: this.carList[i].id
@@ -985,21 +1001,21 @@
               .toPromise()
               .then((response) => {
                 console.log(this, response)
-                this.deptBudgetList.tranCarInfoList[index].carNo =
+                this.deptBudgetList.tranCarInfoList1[index].carNo =
                   response.carNumber
                 if (response.carLoad != null) {
-                  this.deptBudgetList.tranCarInfoList[index].loadWeight =
+                  this.deptBudgetList.tranCarInfoList1[index].loadWeight =
                     response.carLoad
                 } else {
-                  this.deptBudgetList.tranCarInfoList[index].loadWeight = 0
+                  this.deptBudgetList.tranCarInfoList1[index].loadWeight = 0
                 }
-                this.deptBudgetList.tranCarInfoList[index].carModel =
+                this.deptBudgetList.tranCarInfoList1[index].carModel =
                   response.carModel
-                this.deptBudgetList.tranCarInfoList[index].carLength =
+                this.deptBudgetList.tranCarInfoList1[index].carLength =
                   response.carLength
-                this.deptBudgetList.tranCarInfoList[index].carLengthKey =
+                this.deptBudgetList.tranCarInfoList1[index].carLengthKey =
                   response.carLengthKey
-                this.deptBudgetList.tranCarInfoList[index].carModelKey =
+                this.deptBudgetList.tranCarInfoList1[index].carModelKey =
                   response.carModelKey
               })
           }

+ 632 - 0
src/views/tranManagement/tranManagementVehicleDispatchinghistory.vue

@@ -0,0 +1,632 @@
+// 汽车调度派车
+<template>
+  <div class="container">
+    <el-row>
+      <el-col :span="20">
+        <h2 class="bg-left title">汽车调度历史</h2>
+      </el-col>
+      <el-col :span="4" class="bg-right">
+       
+        <el-button class="bg-bottom" type="primary" size="small" @click="revert()"><img width="6" height="10"
+            style="vertical-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
+        </el-button>
+      </el-col>
+    </el-row>
+    <div class="center">
+      <el-form ref="deptBudgetList"  label-width="110px">
+        <div class="basicInformation">
+          <div class="content3" v-for="(item, index) in driverlist" :key="item.id">
+            <div class="content3-item1">
+              <div>
+                <span style="margin-left: 30px;font-weight: 600;">司机-{{ index + 1 }}</span>
+                <span class="noservice" v-show="item.status == '未装车'">{{
+                     item.status
+                   }}</span>
+                <span class="service" v-show="item.status == '已装车'">{{
+                     item.status
+                   }}</span>
+                <span class="serviced" v-show="item.status == '已送达'">{{
+                     item.status
+                   }}</span>
+              </div>
+              <el-col :span="8">
+
+                <el-form-item label="姓名:" span="1" prop="driverName" label-width="125px">
+                  <el-select ref="driverSelect" v-show="!item.temporaryDriverFlag" @visible-change="clearBlur"
+                    v-model="item.driver" filterable clearable placeholder="请选择司机" class="row-item" @change="
+                             (val) => {
+                               carchange(val, item.tranCarIndex)
+                             }
+                           ">
+                    <el-option v-for="(items) in carList" :key="items.id" :label="items.driverName"
+                      :value="items.driverName" />
+                  </el-select>
+                  <span v-show="
+                             item.temporaryDriverFlag == 0 ||
+                             item.temporaryDriverFlag == 1
+                           ">{{ item.driver }}</span>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="司机电话:" span="1" prop="impurity" label-width="125px">
+                  <el-select v-show="!item.temporaryDriverFlag" v-model="item.driverPhone" placeholder="请选择司机电话"
+                    filterable clearable class="row-item" @change="
+                               (val) => {
+                                 phonechange(val, item.tranCarIndex)
+                               }
+                             ">
+                    <el-option v-for="(items) in carList" :key="items.id" :label="items.driverPhone"
+                      :value="items.driverPhone" />
+                  </el-select>
+                  <span v-show="
+                               item.temporaryDriverFlag == 0 ||
+                               item.temporaryDriverFlag == 1
+                             ">{{ item.driverPhone }}</span>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="车牌号:" span="1" prop="carNo" label-width="125px">
+                  <el-select v-if="!item.id" v-model="item.carNo" placeholder="请选择车牌号"
+                    filterable clearable @clear="clear" class="row-item" @change="
+                               (val) => {
+                                 carNochange(val, item.tranCarIndex)
+                               }
+                             ">
+                    <el-option v-for="(items) in carNoList" :key="items.id" :label="items.carNumber"
+                      :value="items.carNumber" />
+                  </el-select>
+                  <span v-else>{{ item.carNo }}</span>
+                  <!-- <el-input :disabled="readonly" v-model="item.carNo" placeholder="" maxlength="120" size="small" /> -->
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="派车编号:" span="1" prop="carModel" label-width="125px">
+                  <el-input v-if="!readonly" v-model="item.tranCarNo" maxlength="120" size="small" />
+                  <span v-else>{{item.tranCarNo}}</span>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="箱号:" span="1" prop="carModel" label-width="125px">
+                  <el-input v-if="item.status == '已装车'||item.status == '已送达'" :disabled="readonly" v-model="item.caseNo"
+                    maxlength="120" size="small" />
+                  <el-input v-else v-model="item.caseNo" placeholder="请输入箱号" maxlength="120" size="small" />
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="封号:" span="1" prop="carModel" label-width="125px">
+                  <el-input v-if="item.status == '已装车'||item.status == '已送达'" v-model="item.titleNo" placeholder=""
+                    :disabled="readonly" maxlength="120" size="small" />
+                  <el-input v-model="item.titleNo" placeholder="请输入封号" v-else maxlength="120" size="small" />
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="车型:" span="1" prop="carModel" label-width="125px">
+                  <el-input :disabled="readonly" v-model="item.carModel" placeholder="" maxlength="120" size="small" />
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+
+                <el-form-item label="车长:" span="1" prop="carLength" label-width="125px">
+                  <el-input :disabled="readonly" v-model="item.carLength" placeholder="" maxlength="120" size="small" />
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="载重(吨):" span="1" prop="loadWeight" label-width="125px">
+                  <el-input :disabled="readonly" v-model="item.loadWeight" placeholder="" maxlength="120"
+                    size="small" />
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item v-if='item.billingMethod==1' label="运输单价(元/吨):" span="1" prop="carModel" label-width="125px">
+                  <el-input :disabled="readonly" v-model="item.tranPrice" size="small" />
+                </el-form-item>
+                <el-form-item v-else label="运输单价(元/车):" span="1" prop="carModel" label-width="125px">
+                  <el-input :disabled="readonly" v-model="item.tranPrice" size="small" />
+                </el-form-item>
+              </el-col>
+              <span v-if="item.status == '未装车'||item.temporaryDriverFlag!=0" width="22" height="22" class="del"
+                @click="del(index, item,0)" src="../../../public/img/del.png" alt="">×</span>
+            </div>
+
+
+          </div>
+          <div class="contentitem" v-for="(item, index) in teamlist" :key="'team'+index">
+            <div class="content3-item1">
+              <el-col :span="8">
+                <!-- <span style="margin-left: 30px;font-weight: 600;">车队-{{ index + 1 }}</span> -->
+                 <el-form-item  :label="'车队-'+(index + 1 )" span="1" prop="carModel" label-width="125px">
+                  <el-input :disabled="item.id?true:false" v-model="item.fleetName" size="small" />
+                </el-form-item>
+              </el-col>
+              
+              <el-col :span="8">
+                <el-form-item v-if='item.billingMethod==1' label="运输单价(元/吨):" span="1" prop="carModel" label-width="125px">
+                  <el-input :disabled="readonly" v-model="item.tranPrice" size="small" />
+                </el-form-item>
+                <el-form-item v-else label="运输单价(元/车):" span="1" prop="carModel" label-width="125px">
+                  <el-input :disabled="readonly" v-model="item.tranPrice" size="small" />
+                </el-form-item>
+              </el-col>
+              <span v-if="!item.id" width="22" height="22" class="del"
+                @click="del(index, item,1)" src="../../../public/img/del.png" alt="">×</span>
+            </div>
+          </div>
+          <div style="text-align: right; color: #8890b1; font-size: 16px">
+            共{{ total }}
+          </div>
+          <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+        :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper"
+        :total="deptBudgetTotal">
+      </el-pagination>
+          <div style="text-align: right; padding: 10px">
+            <el-button class="bg-bottom-up" type="primary" size="small" @click="revert()">关闭</el-button>
+          </div>
+        </div>
+      </el-form>
+    </div>
+  </div>
+</template>
+<script>
+  import Pagination from '@/components/Pagination'
+  import WsUpload from '@/components/WsUpload'
+  import {
+    seeCat,
+    nameXiala,
+    arrange,
+    dispatchCat,
+    delhaulagestage,
+    setUpTranPrice,
+    setUpTranPriceCar,
+    getcarNumber,
+    getdriverinfo,
+    sponsorWithdraw,
+    gethistorycars
+  } from '@/model/transport/index'
+  // import { dayjs, fmoney, EventBus } from 'base-core-lib'
+  import {
+    dayjs,
+    EventBus
+  } from 'base-core-lib'
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+      Pagination,
+    },
+    watch: {
+      // vesselId(val) {
+      //   this.getList()
+      // },
+      isShow(val) {
+        this.showType = val
+      },
+    },
+    data() {
+      return {
+        fhaddress: '',
+        shaddress: '',
+        // 是否显示
+        showType: true,
+        deptBudgetTotal: 0,
+        currentPage: 1,
+        pageSize: 10,
+        pricetype:'1',
+        searchType: 1,
+        startDate: null,
+        endDate: null,
+        carList: [],
+        carNoList:[],
+        // 提交类型
+        readonly: true,
+        tranPriceApprove: {},
+        carList1:[],
+        size: 10,
+        compId: localStorage.getItem('ws-pf_compId'),
+        deptBudgetList: {
+          tranCarInfoList: [],
+        },
+        pickerBeginDateBefore: {
+          disabledDate: (time) => {
+            return time.getTime() > Date.now()
+          },
+        },
+        accessoryTFs: false,
+        index: 0,
+      }
+    },
+    activated() {
+      this.getList()
+    },
+    computed: {
+      
+      total: function() {
+        if (this.deptBudgetList.records&&this.deptBudgetList.records.length > 0) {
+          var maxStorage = 0
+          for (var i = 0; i < this.deptBudgetList.records.length; i++) {
+            if(this.deptBudgetList.records[i].loadWeight){
+              maxStorage += Number(
+                this.deptBudgetList.records[i].loadWeight
+              )
+            }
+            
+          }
+          return maxStorage
+        }
+      },
+      teamlist: function() {
+        if (this.deptBudgetList.records&&this.deptBudgetList.records.length > 0) {
+          var arr = []
+          for (var i = 0; i < this.deptBudgetList.records.length; i++) {
+            if(this.deptBudgetList.records[i].fleetFlag==1){
+              this.deptBudgetList.records[i].tranCarIndex=i
+              arr.push(this.deptBudgetList.records[i])
+            }
+          }
+          return arr
+        }
+      },
+      driverlist: function() {
+        if (this.deptBudgetList.records&&this.deptBudgetList.records.length > 0) {
+          var arr = []
+          for (var i = 0; i < this.deptBudgetList.records.length; i++) {
+            if(this.deptBudgetList.records[i].fleetFlag==0){
+              this.deptBudgetList.records[i].tranCarIndex=i
+              arr.push(this.deptBudgetList.records[i])
+            }
+          }
+          return arr
+        }
+      },
+    },
+    methods: {
+      clearBlur(e) {
+        let k = this.$refs.driverSelect
+        if (!e) {
+          for (let i = 0; i < k.length; i++) {
+            k[i].blur()
+          }
+        }
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+      //返回按钮
+      revert() {
+        this.$router.go(-1)
+      },
+      del(index, row,status) {
+        if (row.status == null) {
+          if(status==1){
+            if (this.deptBudgetList.records.length > 1) {
+              for (let i = 0; i < this.deptBudgetList.records.length; i++) {
+                console.log(this.deptBudgetList.records[i])
+                if(this.deptBudgetList.records[i].index){
+                  if(this.deptBudgetList.records[i].index==row.index){
+                    this.deptBudgetList.records.splice(i, 1)
+                  }
+                }
+              }
+            }
+          }else{
+            if (this.deptBudgetList.records.length > 1) {
+              this.deptBudgetList.records.splice(index, 1)
+              for (let i = index; i < this.deptBudgetList.records.length; i++) {
+                let number = Number(this.deptBudgetList.records[i].tranCarNo.split('C')[1]) - 1
+                if (number < 10) {
+                  this.deptBudgetList.records[i].tranCarNo = 'C00' + number
+                } else if (number < 100) {
+                  this.deptBudgetList.records[i].tranCarNo = 'C0' + number
+                } else {
+                  this.deptBudgetList.records[i].tranCarNo = 'C' + number
+                }
+              }
+            }
+          }
+          
+        } else {
+          this.$confirm('派车信息删除后不可恢复,是否确定删除?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          }).then(() => {
+            delhaulagestage({
+                id: row.id
+              })
+              .toPromise()
+              .then((response) => {
+                this.$message.success('删除成功')
+                if (this.deptBudgetList.records.length > 1) {
+                  this.deptBudgetList.records.splice(index, 1)
+                }
+                this.getList()
+              })
+          })
+        }
+      },
+
+      //审核
+      examine(status) {
+        
+        
+        this.$prompt('运输单价审核', {
+          cancelButtonText: '取消',
+          confirmButtonText: '确定',
+          inputValue: status==1?this.deptBudgetList.tranPriceIng:this.deptBudgetList.tranPriceIngCar
+        }).then(({
+          value
+        }) => {
+          var tranProcessInfo = {}
+          tranProcessInfo.reviewer = localStorage.getItem('ws-pf_roleName') +
+            localStorage.getItem('ws-pf_staffName')
+          tranProcessInfo.id = this.deptBudgetList.id
+          tranProcessInfo.flag = '2'
+          tranProcessInfo.tranTypeKey = 1
+          tranProcessInfo.billingMethod= this.deptBudgetList.billingMethod
+          if(this.deptBudgetList.billingMethod==2){
+             tranProcessInfo.tranPriceIngCar=value
+              setUpTranPriceCar(tranProcessInfo)
+              .toPromise()
+              .then((response) => {
+                this.$message.success('提交成功')
+                this.getList()
+              })
+            }else{
+              tranProcessInfo.tranPriceIng = value
+              setUpTranPrice(tranProcessInfo)
+                .toPromise()
+                .then((response) => {
+                  this.$message.success('审核成功')
+                  this.getList()
+                });
+            }
+        }).catch(() => {
+          this.$message.warning(
+            '取消审核'
+          );
+        });
+      },
+     
+      handleClose() {
+        this.accessoryTFs = false
+      },
+
+      getList() {
+        gethistorycars({
+          processId: this.$route.query.id,
+          currentPage: this.currentPage,
+          pageSize: this.pageSize,
+          })
+          .toPromise()
+          .then((response) => {
+            if (response.records.length > 0) {
+              this.index = response.records.length
+              for (var i = 0; i < response.records.length; i++) {
+                response.records[i].disabled = true
+              }
+            }
+            this.deptBudgetTotal=response.total
+            this.deptBudgetList=response
+          })
+        nameXiala({
+            compId: this.compId
+          })
+          .toPromise()
+          .then((response) => {
+            this.carList = response
+            this.carList1 = response
+          })
+          getcarNumber({
+            compId: this.compId
+          })
+          .toPromise()
+          .then((response) => {
+            this.carNoList = response
+          })
+      },
+      carchange(val, index) {
+        for (var i = 0; i < this.carList.length; i++) {
+          if (this.carList[i].driverName == val) {
+            this.deptBudgetList.tranCarInfoList1[index].driverPhone =
+              this.carList[i].driverPhone
+            arrange({
+                id: this.carList[i].id
+              })
+              .toPromise()
+              .then((response) => {
+                console.log(index,this.deptBudgetList.tranCarInfoList1)
+                this.deptBudgetList.tranCarInfoList1[index].carNo =
+                  response.carNumber
+                if (response.carLoad != null) {
+                  this.deptBudgetList.tranCarInfoList1[index].loadWeight =
+                    response.carLoad
+                } else {
+                  this.deptBudgetList.tranCarInfoList1[index].loadWeight = 0
+                }
+                this.deptBudgetList.tranCarInfoList1[index].carModel =
+                  response.carModel
+                this.deptBudgetList.tranCarInfoList1[index].carLength =
+                  response.carLength
+                this.deptBudgetList.tranCarInfoList1[index].carLengthKey =
+                  response.carLengthKey
+                this.deptBudgetList.tranCarInfoList1[index].carModelKey =
+                  response.carModelKey
+                  this.$forceUpdate()
+              })
+          }
+        }
+      },
+      clear(){
+        this.carList=this.carList1
+      },
+      carNochange(val,index){
+        for (var i = 0; i < this.carNoList.length; i++) {
+          if (this.carNoList[i].carNumber == val) {
+            console.log(this.carNoList[i])
+            if (this.carNoList[i].carLoad != null) {
+                  this.deptBudgetList.tranCarInfoList1[index].loadWeight =
+                  this.carNoList[i].carLoad
+                } else {
+                  this.deptBudgetList.tranCarInfoList1[index].loadWeight = 0
+                }
+                this.deptBudgetList.tranCarInfoList1[index].carModel =
+                this.carNoList[i].carModel
+                this.deptBudgetList.tranCarInfoList1[index].carLength =
+                this.carNoList[i].carLength
+                this.deptBudgetList.tranCarInfoList1[index].carLengthKey =
+                this.carNoList[i].carLengthKey
+                this.deptBudgetList.tranCarInfoList1[index].carModelKey =
+                this.carNoList[i].carModelKey
+            getdriverinfo({
+              carNumber: this.carNoList[i].carNumber
+              })
+              .toPromise()
+              .then((response) => {
+                this.carList=response
+                
+              })
+          }
+        }
+      },
+      phonechange(val, index) {
+        for (var i = 0; i < this.carList.length; i++) {
+          if (this.carList[i].driverPhone == val) {
+            this.deptBudgetList.tranCarInfoList1[index].driver =
+              this.carList[i].driverName
+            arrange({
+                id: this.carList[i].id
+              })
+              .toPromise()
+              .then((response) => {
+                console.log(this, response)
+                this.deptBudgetList.tranCarInfoList1[index].carNo =
+                  response.carNumber
+                if (response.carLoad != null) {
+                  this.deptBudgetList.tranCarInfoList1[index].loadWeight =
+                    response.carLoad
+                } else {
+                  this.deptBudgetList.tranCarInfoList1[index].loadWeight = 0
+                }
+                this.deptBudgetList.tranCarInfoList1[index].carModel =
+                  response.carModel
+                this.deptBudgetList.tranCarInfoList1[index].carLength =
+                  response.carLength
+                this.deptBudgetList.tranCarInfoList1[index].carLengthKey =
+                  response.carLengthKey
+                this.deptBudgetList.tranCarInfoList1[index].carModelKey =
+                  response.carModelKey
+              })
+          }
+        }
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+
+  /deep/.el-form-item--small.el-form-item {
+    margin-bottom: 0px
+  }
+
+  .input-item-margin {
+    margin-right: 20px;
+  }
+
+  .row-item {
+    width: 100%;
+  }
+
+  .bg-right {
+    text-align: right;
+    padding: 16px 20px;
+  }
+
+  .center {
+    margin: 0 auto;
+    width: 70%;
+  }
+
+  //蓝标
+  .small-title {
+    position: relative;
+    padding: 10px;
+    font-weight: 600;
+  }
+
+  //小标题文字
+  .small-title::before {
+    position: absolute;
+    content: '';
+    display: block;
+    background: #5473e8;
+    width: 4px;
+    height: 14px;
+    left: 0px;
+    top: 16px;
+    padding: 4px 2px;
+  }
+
+  .bg-left {
+    padding-left: 30px;
+  }
+
+  .title::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
+  }
+
+  .myTest {
+    display: flex;
+    margin-bottom: 20px;
+    // background: green;
+    padding-left: 20px;
+    align-items: center;
+    width: 999px;
+  }
+
+  .myTest .el-form-item {
+    width: 33.333%;
+  }
+
+  .content3 ,.contentitem{
+    width: calc(100% + 20px);
+
+    .content3-item1 {
+      position: relative;
+      background: #F5F7FA;
+      border: 1px solid #E4E7ED;
+      border-radius: 5px;
+      height: 200px;
+      width: 100%;
+      padding: 10px 20px 0 0;
+      margin-top: 20px;
+    }
+  }
+.contentitem{
+    .content3-item1 {
+      height: 90px;
+    }
+}
+
+
+  .del {
+    position: absolute;
+    right: 4px;
+    top: 0px;
+    cursor: pointer;
+    font-size: 20px;
+    width: 16px;
+    height: 10px;
+  }
+</style>

+ 1 - 1
src/views/universalityAudit/audit.vue

@@ -140,7 +140,7 @@
   :before-close="handleClose1">
   <div v-for="item in blocks">
   <div style="margin:10px 0;">{{item.title}}</div>
-  <div style="display:inline-block;" v-for="(item1,index) in item.subBlocks">{{item1.desc}} <span v-if="index!=item.subBlocks.length-1">----></span>  </div>
+  <div style="display:inline-block;" v-for="(item1,index) in item.subBlocks"><span v-if="item1.desc!='_PLACEHOLDER_'">{{item1.desc}}</span> <span v-if="item1.desc!='_PLACEHOLDER_'&&index!=item.subBlocks.length-1">----></span>  </div>
   </div>
 </el-dialog>
 <el-dialog

+ 16 - 15
src/views/warehousenew/component/router/index.js

@@ -12,6 +12,21 @@ const warehouseManagementRouter = {
     icon: '-cangkubeifen'
   },
   children: [
+    {
+      path: 'warehousingOrder',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/warehousenew/warehousingOrder'),
+      name: 'warehousingOrder',
+      meta: {
+        title: 'warehousingOrder',
+        shortcutEntrance: 'warehousingOrder',
+        module: 'warehouseManagement.warehousingOrder',
+        permissicon: [],
+        keepAlive: true,
+        _title:'入库单'
+        // module: 'procurement.sparepart.applDetail'
+      },
+    },
     {
       path: 'warehouseManagementList',
       component: () =>
@@ -432,21 +447,7 @@ const warehouseManagementRouter = {
       },
       hidden: true
     },  
-    {
-      path: 'warehousingOrder',
-      component: () =>
-        import(/* webpackChunkName: "applDetail" */ '@/views/warehousenew/warehousingOrder'),
-      name: 'warehousingOrder',
-      meta: {
-        title: 'warehousingOrder',
-        shortcutEntrance: 'warehousingOrder',
-        module: 'warehouseManagement.warehousingOrder',
-        permissicon: [],
-        keepAlive: true,
-        _title:'入库单'
-        // module: 'procurement.sparepart.applDetail'
-      },
-    },
+    
     {
       path: 'inventoryCheck',
       component: () =>

+ 4 - 4
src/views/warehousenew/transformation.vue

@@ -293,10 +293,10 @@ export default {
         this.$message.error('请选择折转后重量')
         return
       }
-      if (Number(this.transformationAdd.afterWeight) > Number(this.transformationAdd.beforeWeight)) {
-        this.$message.error('折转后重量不可超过折转前重量')
-        return
-      }
+      // if (Number(this.transformationAdd.afterWeight) > Number(this.transformationAdd.beforeWeight)) {
+      //   this.$message.error('折转后重量不可超过折转前重量')
+      //   return
+      // }
       this.$confirm(`确定提交折转信息?`, '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',

+ 3 - 3
src/views/warehousenew/warehouseManagementList.vue

@@ -750,7 +750,7 @@
               inside: false, // 是否朝内
               rotate: 0, // 旋转角度
               margin: 10, // 刻度标签与轴线之间的距离
-              color: '#D9DDE7', // 默认取轴线的颜色
+              color: '#929AB8', // 默认取轴线的颜色
               interval: 0,
             },
             splitArea: { // 网格区域
@@ -768,7 +768,7 @@
               inside: false, // 是否朝内
               rotate: 0, // 旋转角度
               margin: 8, // 刻度标签与轴线之间的距离
-              color: '#D9DDE7', // 默认轴线的颜色
+              color: '#929AB8', // 默认轴线的颜色
             },
             splitLine: { // gird 区域中的分割线
               show: true, // 是否显示
@@ -1338,7 +1338,7 @@
 .reservesInfo{
   display: inline-flex;
   .reservesInfo_item{
-    width: 100px;
+    width: 120px;
     background: #F5F7FA;
     // height: 54px;
     text-align: center;

+ 240 - 19
src/views/warehousenew/warehousingOrder.vue

@@ -62,6 +62,7 @@
       <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  type="primary" @click="exportList()">导出</ws-button>
         <ws-button v-hasPermission="
         `warehouseManagement.warehousingOrder.yufu`" type="primary" @click="fieldrations()">折干</ws-button>
         <ws-button v-hasPermission="
@@ -180,13 +181,13 @@
           </template>
         </el-table-column>
         <el-table-column prop="avgCost" width="90" class="table_td" label="平均成本"></el-table-column>
-        <el-table-column prop="requestFunds" width="100" class="table_td tablerequestFunds" label="请款">
+        <el-table-column prop="requestFunds" width="150" class="table_td tablerequestFunds" label="请款">
           <template scope="scope">
             <span v-if="!scope.row.select">{{ scope.row.requestFunds }}</span>
             <el-input @focus="qingkuan(scope.row, item.id)" v-else v-model='scope.row.requestFunds'></el-input>
           </template>
         </el-table-column>
-        <el-table-column prop="remark" width="100" class="table_td" label="请款备注">
+        <el-table-column prop="remark" width="150" class="table_td" label="请款备注">
           <template scope="scope">
             <div v-if="!scope.row.select" @click.stop="lookRemark(scope.row)">
               <span class="text_css">查看</span>
@@ -402,7 +403,7 @@
         <el-button type="primary" @click="fieldrationssubmit">提交</el-button>
       </span>
     </el-dialog>
-    <el-dialog :title="'输入' + titletype" :visible.sync="dialogVisiblecontent" width="30%" :before-close="handleClose5"
+    <el-dialog :title="'输入' + titletype" :visible.sync="dialogVisiblecontent" width="30%" @close="handleClose5"
       :close-on-click-modal="false">
       <div>
         <el-input type="textarea" :rows="5" maxlength="500" placeholder="请输入内容" v-model="textarea">
@@ -416,6 +417,34 @@
 
       </div>
     </el-dialog>
+    <div class="mask" v-show="isShowPrintType"></div>
+    <div class="print-type" v-show="isShowPrintType">
+      <div class="print-type-content">
+        <div class="print-type-title">{{headerText}}</div>
+        <div class="print-type-checkbox">
+          <el-form ref="form" label-width="110px">
+            <el-form-item label="起始日期">
+              <el-date-picker type="datetime" @change="startDataChange" format="yyyy-MM-dd HH:mm:ss"  value-format="yyyy-MM-dd HH:mm:ss" placeholder="请选择起始日期" v-model="parameter.exportStartDate"  default-time="00:00:00"></el-date-picker>
+            </el-form-item>
+            <el-form-item label="截止日期">
+              <el-date-picker type="datetime" @change="endDataChange" format="yyyy-MM-dd HH:mm:ss"  value-format="yyyy-MM-dd HH:mm:ss" placeholder="请选择截止日期" v-model="parameter.exportEndDate"  default-time="00:00:00">
+              </el-date-picker>
+            </el-form-item>
+            <!--仓库名称-->
+            <el-form-item label="仓库名称" span="1" prop="warehouseName" >
+              <el-select v-model="parameter.warehouseName" placeholder="请选择仓库名称" filterable clearable>
+                 <el-option  key="" label="全部仓库" value="全部仓库" />
+                <el-option v-for="item in warehouseList" :key="item.warehouseName" :label="item.warehouseName" :value="item.warehouseName" />
+              </el-select>
+            </el-form-item>
+          </el-form>
+        </div>
+      </div>
+      <div class="bottom-btn">
+        <el-button @click="submitClick()">确定</el-button>
+        <el-button @click="removePrint">取消</el-button>
+      </div>
+    </div>
     <!-- <el-dialog
       title="提示"
       :visible.sync="dialogVisible"
@@ -456,6 +485,14 @@
         :appendix-ids="appendixIdss" :editable="false" accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
     </el-dialog>
     <el-dialog width='30%' :visible.sync="dialogVisible1" title="费用" top="20vh">
+      <div style="justify-content:space-between;" class="flex">
+        <div>累计利息</div>
+        <div>{{interest}}</div>
+      </div>
+      <div style="justify-content:space-between;" class="flex">
+        <div>累计仓储费</div>
+        <div>{{storageFee}}</div>
+      </div>
       <div v-for="(item, index) in costlist" :key="index" class="audit">
         <div class="audit_item">
           <div class="audit_left">
@@ -475,7 +512,7 @@
       :title="title1"
       :visible.sync="rejectshow"
       width="30%"
-      :before-close="handleClose5">
+      @close="handleClose6">
       <span>{{title1=='驳回'?'驳回审核':'通过审核'}}</span>
       <div>
         <el-input
@@ -507,11 +544,12 @@ import {
   workflowhandle,
   getposition,
   dryout,
+  xiala,
   getenabledinfo,
   setenabledinfo,
   getbyname,
   sponsorWithdraw,
-  updateApprove
+  exportOrder
 } from '@/model/warehouse/index'
 import {
   selectWarehouseSelf,
@@ -544,7 +582,6 @@ export default {
   },
   data() {
     return {
-
       currectdata: {},
       //弹出框
       dialogViewSpareMoney: false,
@@ -553,10 +590,17 @@ export default {
       dataList: [],
       payeeinfo: [],
       title1:'',
+      StartDate:'',
+      EndDate:'',
       rejectshow:false,
       options: [],
+      isShowPrintType: false,
+      // warehouseAllXiaLa:[],
       textarea: '',
       weightGreater:'',
+      warehouseList:[],
+      // warehouseXiaLaCopy:[],
+      headerText: '入库单导出',
       dialogVisiblecontent: false,
       // 船舶类型
       monetaryKey: null,
@@ -641,6 +685,7 @@ export default {
       searchKeyWord: '',
       inOutType: '',
       contractType: 2,
+      warehouseType:1,
       auditdata:[],
       fieldrationsshow: false,
       // 提交类型
@@ -650,7 +695,7 @@ export default {
       spanArr: [],
       options1: [],
       id: '',
-
+      avgCost:'',
       customerInfo: {},
       appendixIdss: [],
       paymentScreenshot: '',
@@ -663,6 +708,8 @@ export default {
       compId: localStorage.getItem('ws-pf_compId'),
       historyList: [],
       money: 0,
+      interest:'',
+      storageFee:'',
       multipleSelection1: {},
       aduitshow: false,
       distributionshow: false,
@@ -673,7 +720,15 @@ export default {
           return time.getTime() > Date.now()
         },
       },
-      warehouseList: [],
+      parameter:{
+          startDate:'',
+          endDate:'',
+        },
+        date: {
+          year: dayjs().format('YYYY'),
+          month: dayjs().format('MM'),
+        },
+      // warehouseList: [],
       currectfocusdata: {},
       customershow: false,
       interestratevalue: {},
@@ -707,6 +762,92 @@ export default {
     this.showType = this.isShow
   },
   methods: {
+    exportList() {
+          let date = new Date()
+          var year = date.getFullYear();
+          var month = date.getMonth() + 1;
+          var strDate = date.getDate()
+          if(strDate<10){ 
+             strDate = '0'+strDate
+          }
+          var pastdate = new Date(date.getTime() - 24 * 60 * 60 * 1000)
+          this.StartDate =pastdate.getFullYear() + '-' + (pastdate.getMonth() + 1) + '-' + (pastdate.getDate()>10?pastdate.getDate():'0'+pastdate.getDate())+' 00:00:00'
+          this.$set(this.parameter,'exportStartDate',this.StartDate)
+          this.EndDate = '' + year + '-' + month + '-' + strDate+' 00:00:00'
+          this.$set(this.parameter,'exportEndDate',this.EndDate)
+        this.$forceUpdate();
+        this.isShowPrintType = true
+        
+      },
+      startDataChange(e){
+          var d = new Date(e);
+          let year =  d.getFullYear()
+          let month =  (d.getMonth() + 1)
+          month= month<10?'0'+month:month
+          let date = d.getDate()<10?'0'+d.getDate():d.getDate()
+          let hours = d.getHours()<10?'0'+d.getHours():d.getHours()
+          let minutes = d.getMinutes()<10?'0'+d.getMinutes():d.getMinutes()
+          let seconds = d.getSeconds()<10?'0'+d.getSeconds():d.getSeconds()
+          this.parameter.exportStartDate = year + '-' + month+ '-' +date + ' '+hours+':'+minutes+':'+seconds;
+      },
+      endDataChange(e){
+            var d = new Date(e);
+            let year =  d.getFullYear()
+          let month =  (d.getMonth() + 1)
+          month= month<10?'0'+month:month
+          let date = d.getDate()<10?'0'+d.getDate():d.getDate()
+          let hours = d.getHours()<10?'0'+d.getHours():d.getHours()
+          let minutes = d.getMinutes()<10?'0'+d.getMinutes():d.getMinutes()
+          let seconds = d.getSeconds()<10?'0'+d.getSeconds():d.getSeconds()
+           this.parameter.exportEndDate = year + '-' + month+ '-' +date + ' '+hours+':'+minutes+':'+seconds;
+      },
+       removePrint() {
+        this.parameter.warehouseName = ''
+        this.isShowPrintType = false
+      },
+      // warehouseQuery(query){
+      //   if(query){
+      //     this.warehouseList = this.warehouseAllXiaLa
+      //     this.warehouseList = this.warehouseAllXiaLa.filter(item=>item.warehouseName.indexOf(query)>-1)
+      //   }else{
+      //     this.warehouseList = this.warehouseXiaLaCopy
+      //   }
+      // },
+      async submitClick() {
+        if (!this.parameter.exportStartDate) {
+          this.$message.error('请选择起始日期')
+          return
+        }
+        if (!this.parameter.exportEndDate) {
+          this.$message.error('请选择截止日期')
+          return
+        }
+        if (new Date(this.parameter.exportEndDate).getTime() < new Date(this.parameter.exportStartDate).getTime()) {
+          this.$message.error('截止日期输入错误')
+          return
+        }
+        if (this.parameter.warehouseName == '全部仓库') {
+          this.parameter.warehouseName = ''
+        }
+        this.isShowPrintType = false
+        const {
+          data
+        } = await exportOrder({
+          exportStartDate: this.parameter.exportStartDate,
+          exportEndDate: this.parameter.exportEndDate,
+          warehouseName: this.parameter.warehouseName,
+        }, {}, {
+          
+          responseType: 'blob'
+        }).toPromise()
+        downloadFile({
+          res: data,
+          fileName: `${this.date.year + (this.date.month ? `-${this.date.month}` : '')
+            }导出入库单`,
+          type: 'xls',
+        })
+        this.parameter.warehouseName = ''
+      },
     weightGreaterChange(e){
       this.getList()
     },
@@ -747,7 +888,9 @@ export default {
       }else{
         for(let i =0 ; i<this.warehouseList.length;i++){
           if(this.warehouseList[i].warehouseName == e){
-            for(let j = 0;j<this.warehouseList[i].goodsNameInfos.length;j++){//构造数据,合并重复货名
+            console.log(this.warehouseList[i])
+            if(this.warehouseList[i].goodsNameInfos){
+              for(let j = 0;j<this.warehouseList[i].goodsNameInfos.length;j++){//构造数据,合并重复货名
               if(j==0){
                 this.goodsList.push(this.warehouseList[i].goodsNameInfos[j])
               }else{
@@ -764,13 +907,23 @@ export default {
                 // 
               }
             }
+            }
+            
             this.baseId = this.warehouseList[i].id
+            
+
             break
           }
+          // console.log(this.reserve)
+          if(this.reserves){
+            this.reserves=this.reserves.toFixed(3)
+          }
         }
         this.goodsName= '0'
         this.reserves = ''
       }
+      this.warehouseXiaLaCopy = this.warehouseList
+      this.warehouseAllXiaLa = this.warehouseList
       this.multipleSelection1={}
       this.getList()
     },
@@ -925,7 +1078,9 @@ export default {
         }
 
       }
-      item.summation = item.summation.toFixed(3)
+      if(item.summation){
+        item.summation = item.summation.toFixed(3)
+      }
       this.$forceUpdate()
       // console.log(val,item.summation,1111111111)
       this.multipleSelection1[item.id] = val
@@ -1348,7 +1503,10 @@ export default {
       }
     },
     costclick(row) {
+      this.interest=row.interest
+      this.storageFee=row.storageFee
       this.costlist = row.expenseAllocationInfoList
+      console.log(this.interest,this.storageFee)
       this.dialogVisible1 = true
       // getexenseinfo({id:row.id}).toPromise()
       //   .then((response) => {
@@ -1716,18 +1874,24 @@ export default {
     },
     aduit(row) {
       var arr2 = this.multipleSelection1[row.id]
+      if(!this.multipleSelection1[row.id]){
+        this.$message({
+            message: '至少选择一条待审核的条目',
+            type: 'error'
+          });
+      }
       // console.log(arr2)
       if (arr2.length == 0) {
         if (localStorage.getItem('ws-pf_staffName') == '杜大光') {
           this.$message({
             message: '至少选择一条待决策人审核的条目',
-            type: 'eroor'
+            type: 'error'
           });
           return
         } else if (localStorage.getItem('ws-pf_roleName') == '财务') {
           this.$message({
             message: '至少选择一条待财务审核的条目',
-            type: 'eroor'
+            type: 'error'
           });
           return
         }
@@ -1736,14 +1900,14 @@ export default {
         if (!arr2[i].approveStatus) {
           this.$message({
             message: '至少选择一条待审核的条目',
-            type: 'eroor'
+            type: 'error'
           });
           return
         }
         if (!arr2[i].taskId) {
           this.$message({
             message: '至少选择一条待审核的条目',
-            type: 'eroor'
+            type: 'error'
           });
           return
         }
@@ -1773,7 +1937,7 @@ export default {
         })
     },
     rejectclick(){
-      if(this.title=='通过'){
+      if(this.title1=='通过'){
         this.aduithandle(this.auditdata, 0, true)
       }else{
         this.aduithandle(this.auditdata, 0, false)
@@ -1814,8 +1978,10 @@ export default {
             message: '驳回成功',
             type: 'success'
           });
+          this.rejectshow=false
           this.getList()
         }
+        this.rejectshow = false
       }
 
     },
@@ -1864,6 +2030,7 @@ export default {
                 data[q].inWarehouseWeight1 = data[q].inWarehouseWeight.toFixed(3)
                 data[q].surplusWeight =(data[q].inWarehouseWeight - data[q].outWarehouseWeight + data[q].profitAndLoss).toFixed(3)
               }
+              data[q].avgCost = Number(data[q].avgCost).toFixed(2)
               console.log(response.records[i].warehouseType)
               data[q].select = false
               data[q].weightedit = false
@@ -1997,7 +2164,7 @@ export default {
     handleClose() {
       this.aduitshow = false
     },
-    handleClose5() {
+    handleClose6() {
       this.rejectshow = false
     },
     handleClose3() {
@@ -2157,7 +2324,61 @@ export default {
   padding: 10px;
 }
 
-// /deep/.el-table .cell{
-//   padding:0;
-// }
+//打印弹窗
+.mask {
+    background: black;
+    width: 100vw;
+    height: 100vh;
+    position: fixed;
+    top: 0;
+    z-index: 99;
+    opacity: 0.3;
+  }
+
+  .count {
+    text-align: center;
+    margin-bottom: 10px;
+  }
+
+  .print-type {
+    position: absolute;
+    top: 0;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    margin: auto;
+    width: 400px;
+    height: 250px;
+    background: white;
+    border-radius: 10px;
+    z-index: 999;
+
+    .bottom-btn {
+      margin-top: 10px;
+      text-align: center;
+    }
+  }
+
+  .print-type-title {
+    text-align: center;
+    font-size: 18px;
+    // margin: 20px;
+    margin: 20px 20px 10px;
+  }
+
+  .print-type-checkbox {
+    padding-left: 20px;
+
+    .el-date-editor.el-input {
+      width: 85% !important;
+    }
+
+    .proportion_css {
+      width: 85%;
+    }
+  }
+    /deep/.el-table td,/deep/.el-table th{
+      text-align: center;
+     
+    }
 </style>

+ 6 - 0
src/views/workNotification/utils/index.js

@@ -33,6 +33,8 @@ export function code2Url (type, code, state,status,message,businessId) {
       return warehouseReceiptRegulation(code, state)
     case 'ROLE':
       return stock(code, state)
+    case 'FEIYONGYUNFEI':
+      return profitable(code,state)  
     case 'TRANSPORTATIONTASK':
       return trantask(code,state,message)
     case 'WAREHOUSE':
@@ -117,6 +119,10 @@ export function profitable(code, state){
     case 'FEIYONGGUANLI-APPROVE':
       url = 'expensemanagementdetails'
       break
+      //费用运费管理
+    case 'FEIYONGYUNFEI-APPROVE':
+      url = 'expensemanagementdetails'
+      break
   }
   return url
 }